Browse Source

Add another test for rebar detection

If we can't find "rebar" in the Makefile, we now try 'make -n'
and check the output. This will catch cases where the "rebar"
stuff is defined in included files.
Loïc Hoguin 10 years ago
parent
commit
ec976404fc
1 changed files with 2 additions and 0 deletions
  1. 2 0
      core/deps.mk

+ 2 - 0
core/deps.mk

@@ -62,6 +62,8 @@ define dep_autopatch
 	if [ -f $(DEPS_DIR)/$(1)/Makefile ]; then \
 	if [ -f $(DEPS_DIR)/$(1)/Makefile ]; then \
 		if [ 0 != `grep -ci rebar $(DEPS_DIR)/$(1)/Makefile` ]; then \
 		if [ 0 != `grep -ci rebar $(DEPS_DIR)/$(1)/Makefile` ]; then \
 			$(call dep_autopatch2,$(1)); \
 			$(call dep_autopatch2,$(1)); \
+		elif [ 0 != `cd $(DEPS_DIR)/$(1)/ && make -n | grep -ci rebar` ]; then \
+			$(call dep_autopatch2,$(1)); \
 		else \
 		else \
 			$(call dep_autopatch_erlang_mk,$(1)); \
 			$(call dep_autopatch_erlang_mk,$(1)); \
 		fi \
 		fi \