Browse code

makefile: modules install obeys $(err_fail)

- if err_fail is 1 and a library fails to install the whole make
install will fail

Andrei Pelinescu-Onciul authored on 01/10/2009 11:45:15
Showing 1 changed files
... ...
@@ -64,10 +64,12 @@ LDFLAGS:=$(MOD_LDFLAGS)
64 64
 endif
65 65
 
66 66
 
67
+err_fail?=1
67 68
 
68 69
 include $(COREPATH)/Makefile.dirs
69 70
 include $(COREPATH)/Makefile.targets
70 71
 include $(COREPATH)/Makefile.rules
72
+include $(COREPATH)/Makefile.shared
71 73
 
72 74
 # default: if not overwritten by the main Makefile, install in modules
73 75
 mods_dst=$(modules_prefix)/$(modules_dir)/modules
... ...
@@ -86,7 +88,7 @@ install: $(NAME) $(mods_dst) install-libs
86 88
 
87 89
 install-libs:
88 90
 	@for lib in $(dir $(SER_LIBS)); do \
89
-		$(MAKE) -C "$${lib}" install-if-newer ;\
91
+		$(call try_err, $(MAKE) -C "$${lib}" install-if-newer ) ;\
90 92
 	done
91 93
 
92 94
 # README build rules