changeset 829:8a98756c57b8 trunk

[svn] - if make fails, exit -1 recursively
author nenolod
date Sun, 12 Mar 2006 20:57:18 -0800
parents 45ec63505a4e
children 4d60baab67a0
files mk/objective.mk
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/mk/objective.mk	Sun Mar 12 15:18:35 2006 -0800
+++ b/mk/objective.mk	Sun Mar 12 20:57:18 2006 -0800
@@ -28,7 +28,7 @@
 	@if test "$(SUBDIRS)" != "none"; then \
 		for i in $(SUBDIRS); do \
 			echo "[installing subobjective: $$i]"; \
-			(cd $$i; $(MAKE) install; cd ..); \
+			(cd $$i; $(MAKE) install || exit -1; cd ..); \
 		done; \
 	fi
 	@if test "$(OBJECTIVE_DIRECTORIES)" != "none"; then \
@@ -74,7 +74,7 @@
 	@if test "$(SUBDIRS)" != "none"; then \
 		for i in $(SUBDIRS); do \
 			echo "[cleaning subobjective: $$i]"; \
-			(cd $$i; $(MAKE) clean; cd ..); \
+			(cd $$i; $(MAKE) clean || exit -1; cd ..); \
 		done; \
 	fi
 	$(MAKE) clean-posthook
@@ -85,7 +85,7 @@
 	@if test "$(SUBDIRS)" != "none"; then \
 		for i in $(SUBDIRS); do \
 			echo "[distcleaning subobjective: $$i]"; \
-			(cd $$i; $(MAKE) distclean; cd ..); \
+			(cd $$i; $(MAKE) distclean || exit -1; cd ..); \
 			echo "[distcleaning subobjective: $$i]"; \
 		done; \
 	fi
@@ -101,28 +101,28 @@
 	@if test "$(SUBDIRS)" != "none"; then \
 		for i in $(SUBDIRS); do \
 			echo "[building subobjective: $$i]"; \
-			(cd $$i; $(MAKE); cd ..); \
+			(cd $$i; $(MAKE) || exit -1; cd ..); \
 			echo "[finished subobjective: $$i]"; \
 		done; \
 	fi
 	@if test "$(OBJECTIVE_LIBS)" != "none"; then \
 		for i in $(OBJECTIVE_LIBS); do \
 			echo "[building library objective: $$i]"; \
-			$(MAKE) $$i; \
+			$(MAKE) $$i || exit -1; \
 			echo "[finished library objective: $$i]"; \
 		done; \
 	fi
 	@if test "$(OBJECTIVE_LIBS_NOINST)" != "none"; then \
 		for i in $(OBJECTIVE_LIBS_NOINST); do \
 			echo "[building library dependency: $$i]"; \
-			$(MAKE) $$i; \
+			$(MAKE) $$i || exit -1; \
 			echo "[finished library dependency: $$i]"; \
 		done; \
 	fi
 	@if test "$(OBJECTIVE_BINS)" != "none"; then \
 		for i in $(OBJECTIVE_BINS); do \
 			echo "[building binary objective: $$i]"; \
-			$(MAKE) $$i; \
+			$(MAKE) $$i || exit -1; \
 			echo "[finished binary objective: $$i]"; \
 		done; \
 	fi
@@ -147,21 +147,21 @@
 
 %.so: $(OBJECTS)
 	if test "x$(OBJECTS)" != "x"; then \
-		$(MAKE) $(OBJECTS);		\
+		$(MAKE) $(OBJECTS) || exit -1;		\
 		printf "%10s     %-20s\n" LINK $@; \
 		$(CC) -fPIC -DPIC -shared -o $@ -Wl,-soname=$@ $(OBJECTS) $(LDFLAGS) $(LIBADD); \
 	fi
 
 %.a: $(OBJECTS)
 	if test "x$(OBJECTS)" != "x"; then \
-		$(MAKE) $(OBJECTS);		\
+		$(MAKE) $(OBJECTS) || exit -1;		\
 		printf "%10s     %-20s\n" LINK $@; \
 		$(AR) cq $@ $(OBJECTS); \
 	fi
 
 $(OBJECTIVE_BINS): $(OBJECTS)
 	if test "x$(OBJECTS)" != "x"; then \
-		$(MAKE) $(OBJECTS);		\
+		$(MAKE) $(OBJECTS) || exit -1;		\
 		printf "%10s     %-20s\n" LINK $@; \
 		$(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBADD); \
 	fi