Browse Source

Merge branch 'pu-autopatch-hint' of https://github.com/kaos/erlang.mk

Loïc Hoguin 10 years ago
parent
commit
cc9347f495
2 changed files with 6 additions and 4 deletions
  1. 3 2
      core/deps.mk
  2. 3 2
      erlang.mk

+ 3 - 2
core/deps.mk

@@ -35,9 +35,10 @@ PKG_FILE_URL ?= https://raw.githubusercontent.com/ninenines/erlang.mk/master/pac
 deps:: $(ALL_DEPS_DIRS)
 deps:: $(ALL_DEPS_DIRS)
 	@for dep in $(ALL_DEPS_DIRS) ; do \
 	@for dep in $(ALL_DEPS_DIRS) ; do \
 		if [ -f $$dep/GNUmakefile ] || [ -f $$dep/makefile ] || [ -f $$dep/Makefile ] ; then \
 		if [ -f $$dep/GNUmakefile ] || [ -f $$dep/makefile ] || [ -f $$dep/Makefile ] ; then \
-			$(MAKE) -C $$dep ; \
+			$(MAKE) -C $$dep || exit $$? ; \
 		else \
 		else \
-			echo "include $(CURDIR)/erlang.mk" | ERLC_OPTS=+debug_info $(MAKE) -f - -C $$dep ; \
+			echo "ERROR: No makefile to build dependency $$dep. Consider adding it to AUTOPATCH." ; \
+			exit 1 ; \
 		fi ; \
 		fi ; \
 	done
 	done
 
 

+ 3 - 2
erlang.mk

@@ -140,9 +140,10 @@ PKG_FILE_URL ?= https://raw.githubusercontent.com/ninenines/erlang.mk/master/pac
 deps:: $(ALL_DEPS_DIRS)
 deps:: $(ALL_DEPS_DIRS)
 	@for dep in $(ALL_DEPS_DIRS) ; do \
 	@for dep in $(ALL_DEPS_DIRS) ; do \
 		if [ -f $$dep/GNUmakefile ] || [ -f $$dep/makefile ] || [ -f $$dep/Makefile ] ; then \
 		if [ -f $$dep/GNUmakefile ] || [ -f $$dep/makefile ] || [ -f $$dep/Makefile ] ; then \
-			$(MAKE) -C $$dep ; \
+			$(MAKE) -C $$dep || exit $$? ; \
 		else \
 		else \
-			echo "include $(CURDIR)/erlang.mk" | ERLC_OPTS=+debug_info $(MAKE) -f - -C $$dep ; \
+			echo "ERROR: No makefile to build dependency $$dep. Consider adding it to AUTOPATCH." ; \
+			exit 1 ; \
 		fi ; \
 		fi ; \
 	done
 	done