Browse Source

Ignore Makefiles that include non-existing .mk files

Loïc Hoguin 10 years ago
parent
commit
dfb186c781
1 changed files with 3 additions and 1 deletions
  1. 3 1
      core/deps.mk

+ 3 - 1
core/deps.mk

@@ -60,7 +60,9 @@ distclean:: distclean-deps distclean-pkg
 # in practice only Makefile is needed so far.
 # in practice only Makefile is needed so far.
 define dep_autopatch
 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 -c "include ../\w*\.mk" $(DEPS_DIR)/$(1)/Makefile` ]; then \
+			$(call dep_autopatch2,$(1)); \
+		elif [ 0 != `grep -ci rebar $(DEPS_DIR)/$(1)/Makefile` ]; then \
 			$(call dep_autopatch2,$(1)); \
 			$(call dep_autopatch2,$(1)); \
 		elif [ 0 != `find $(DEPS_DIR)/$(1)/ -type f -name \*.mk -not -name erlang.mk | xargs grep -ci rebar` ]; then \
 		elif [ 0 != `find $(DEPS_DIR)/$(1)/ -type f -name \*.mk -not -name erlang.mk | xargs grep -ci rebar` ]; then \
 			$(call dep_autopatch2,$(1)); \
 			$(call dep_autopatch2,$(1)); \