Răsfoiți Sursa

app_ruby: Makefile - updated how to detect ruby version

- GH #1762
Daniel-Constantin Mierla 6 ani în urmă
părinte
comite
1569f91121
1 a modificat fișierele cu 8 adăugiri și 6 ștergeri
  1. 8 6
      src/modules/app_ruby/Makefile

+ 8 - 6
src/modules/app_ruby/Makefile

@@ -7,20 +7,22 @@ include ../../Makefile.defs
 auto_gen=
 NAME=app_ruby.so
 
-RUBYVER=$(shell pkg-config --list-all | grep ruby-2 | tail -1 | cut -f 1 -d " ")
-ifeq ($(RUBYVER),)
-RUBYVER=ruby-2.3
-endif
+PKGLIBRUBY=1
+
 ifeq ($(CROSS_COMPILE),)
 	BUILDER = $(shell which pkg-config)
 ifneq ($(BUILDER),)
+	RUBYVER = $(shell $(BUILDER) --list-all | grep ruby | tail -1 | cut -f 1 -d " ")
+ifneq ($(RUBYVER),)
 	PKGLIBRUBY = $(shell $(BUILDER) --exists $(RUBYVER) > /dev/null 2>&1 ; echo $$? )
-ifneq ($(PKGLIBRUBY),0)
-	BUILDER =
 endif
 endif
 endif
 
+ifneq ($(PKGLIBRUBY),0)
+	BUILDER =
+endif
+
 ifneq ($(BUILDER),)
 	DEFS += $(shell $(BUILDER) --cflags $(RUBYVER))
 	LIBS = $(shell $(BUILDER) --libs $(RUBYVER))