changeset 2913:1c1600cc9f02

makefiles: Stop if a component fails to build The unconditional looping of subdirectories in the makefiles would just carry on even if one of them failed. To avoid that build errors go unnoticed, the build should stop on any error. For this, commands should be chained with "&&" and not ";" in makefile recipes.
author Tormod Volden <debian.tormod@gmail.com>
date Sun, 12 Jan 2014 01:32:45 +0100
parents 14b4f2791bb3
children f1fba5550fee
files 3rdparty/drivers/makefile 3rdparty/makefile 3rdparty/packages/makefile 3rdparty/packages/os9l2bbs/makefile 3rdparty/packages/sierra/makefile 3rdparty/utils/makefile level1/atari/makefile level1/coco1/makefile level1/makefile level2/coco3/makefile level2/makefile level3/coco3/makefile level3/coco3_6309/makefile
diffstat 13 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/3rdparty/drivers/makefile	Sun Jan 12 00:45:16 2014 +0100
+++ b/3rdparty/drivers/makefile	Sun Jan 12 01:32:45 2014 +0100
@@ -9,7 +9,7 @@
 	@$(ECHO) "*             3rd Party Device Drivers           *"
 	@$(ECHO) "*                                                *"
 	@$(ECHO) "**************************************************"
-	$(foreach dir, $(dirs), ($(CD) $(dir); make);)
+	$(foreach dir,$(dirs),$(MAKE) -C $(dir) &&) :
 
 # Clean all components
 clean:
--- a/3rdparty/makefile	Sun Jan 12 00:45:16 2014 +0100
+++ b/3rdparty/makefile	Sun Jan 12 01:32:45 2014 +0100
@@ -9,7 +9,7 @@
 	@$(ECHO) "*               3rd Party Software               *"
 	@$(ECHO) "*                                                *"
 	@$(ECHO) "**************************************************"
-	$(foreach dir, $(dirs), ($(CD) $(dir); make);)
+	$(foreach dir,$(dirs),$(MAKE) -C $(dir) &&) :
 
 # Clean all components
 clean:
--- a/3rdparty/packages/makefile	Sun Jan 12 00:45:16 2014 +0100
+++ b/3rdparty/packages/makefile	Sun Jan 12 01:32:45 2014 +0100
@@ -9,7 +9,7 @@
 	@$(ECHO) "*               3rd Party Packages               *"
 	@$(ECHO) "*                                                *"
 	@$(ECHO) "**************************************************"
-	$(foreach dir, $(dirs), ($(CD) $(dir); make);)
+	$(foreach dir,$(dirs),$(MAKE) -C $(dir) &&) :
 
 # Clean all components
 clean:
--- a/3rdparty/packages/os9l2bbs/makefile	Sun Jan 12 00:45:16 2014 +0100
+++ b/3rdparty/packages/os9l2bbs/makefile	Sun Jan 12 01:32:45 2014 +0100
@@ -9,7 +9,7 @@
 	@$(ECHO) "*                OS-9 LEVEL 2 BBS                *"
 	@$(ECHO) "*                                                *"
 	@$(ECHO) "**************************************************"
-	$(foreach dir, $(dirs), ($(CD) $(dir); make);)
+	$(foreach dir,$(dirs),$(MAKE) -C $(dir) &&) :
 
 # Clean all components
 clean:
--- a/3rdparty/packages/sierra/makefile	Sun Jan 12 00:45:16 2014 +0100
+++ b/3rdparty/packages/sierra/makefile	Sun Jan 12 01:32:45 2014 +0100
@@ -12,7 +12,7 @@
 	@$(ECHO) "*             Sierra Adventure Games             *"
 	@$(ECHO) "*                                                *"
 	@$(ECHO) "**************************************************"
-	$(foreach dir, $(dirs), ($(CD) $(dir); make);)
+	$(foreach dir,$(dirs),$(MAKE) -C $(dir) &&) :
 
 # Clean all components
 clean:
--- a/3rdparty/utils/makefile	Sun Jan 12 00:45:16 2014 +0100
+++ b/3rdparty/utils/makefile	Sun Jan 12 01:32:45 2014 +0100
@@ -9,7 +9,7 @@
 	@$(ECHO) "*                    Utilities                   *"
 	@$(ECHO) "*                                                *"
 	@$(ECHO) "**************************************************"
-	$(foreach dir, $(dirs), ($(CD) $(dir); make);)
+	$(foreach dir,$(dirs),$(MAKE) -C $(dir) &&) :
 
 # Clean all components
 clean:
--- a/level1/atari/makefile	Sun Jan 12 00:45:16 2014 +0100
+++ b/level1/atari/makefile	Sun Jan 12 01:32:45 2014 +0100
@@ -31,7 +31,7 @@
 	@$(ECHO) "*      NitrOS-9/$(CPU) Level $(LEVEL) $(MACHINE) ($(PORT))"
 	@$(ECHO) "*"
 	@$(ECHO) "************************************************************"
-	$(foreach dir, $(DIRS), ($(CD) $(dir); make);)
+	$(foreach dir,$(DIRS),$(MAKE) -C $(dir) &&) :
 
 # Clean all components
 clean:	dskclean
--- a/level1/coco1/makefile	Sun Jan 12 00:45:16 2014 +0100
+++ b/level1/coco1/makefile	Sun Jan 12 01:32:45 2014 +0100
@@ -77,7 +77,7 @@
 	@$(ECHO) "*      NitrOS-9/$(CPU) Level $(LEVEL) $(MACHINE) ($(PORT))"
 	@$(ECHO) "*"
 	@$(ECHO) "************************************************************"
-	$(foreach dir, $(DIRS), ($(CD) $(dir); make);)
+	$(foreach dir,$(DIRS),$(MAKE) -C $(dir) &&) :
 
 # Clean all components
 clean:	dskclean
--- a/level1/makefile	Sun Jan 12 00:45:16 2014 +0100
+++ b/level1/makefile	Sun Jan 12 01:32:45 2014 +0100
@@ -12,7 +12,7 @@
 	@$(ECHO) "*             NitrOS-9 Level 1 Ports             *"
 	@$(ECHO) "*                                                *"
 	@$(ECHO) "**************************************************"
-	$(foreach dir, $(dirs), ($(CD) $(dir); make);)
+	$(foreach dir,$(dirs),$(MAKE) -C $(dir) &&) :
 
 # Clean all components
 clean:
--- a/level2/coco3/makefile	Sun Jan 12 00:45:16 2014 +0100
+++ b/level2/coco3/makefile	Sun Jan 12 01:32:45 2014 +0100
@@ -91,8 +91,8 @@
 	@$(ECHO) "*      NitrOS-9/$(CPU) Level $(LEVEL) $(MACHINE) ($(PORT))"
 	@$(ECHO) "*"
 	@$(ECHO) "************************************************************"
-	cd $(NITROS9DIR)/lib; make
-	$(foreach dir, $(DIRS), ($(CD) $(dir); make);)
+	$(MAKE) -C $(NITROS9DIR)/lib
+	$(foreach dir,$(DIRS),$(MAKE) -C $(dir) &&) :
 
 # Clean all components
 clean: dskclean
--- a/level2/makefile	Sun Jan 12 00:45:16 2014 +0100
+++ b/level2/makefile	Sun Jan 12 01:32:45 2014 +0100
@@ -12,7 +12,7 @@
 	@$(ECHO) "*             NitrOS-9 Level 2 Ports             *"
 	@$(ECHO) "*                                                *"
 	@$(ECHO) "**************************************************"
-	$(foreach dir, $(dirs), ($(CD) $(dir); make);)
+	$(foreach dir,$(dirs),$(MAKE) -C $(dir) &&) :
 
 # Clean all components
 clean:
--- a/level3/coco3/makefile	Sun Jan 12 00:45:16 2014 +0100
+++ b/level3/coco3/makefile	Sun Jan 12 01:32:45 2014 +0100
@@ -59,7 +59,7 @@
 	@$(ECHO) "*        NitrOS-9/$(CPU) Level 2 Distribution      *"
 	@$(ECHO) "*                                                *"
 	@$(ECHO) "**************************************************"
-	$(foreach dir, $(DIRS), ($(CD) $(dir); make);)
+	$(foreach dir,$(DIRS),$(MAKE) -C $(dir) &&) :
 
 # Clean all components
 clean: dskclean
--- a/level3/coco3_6309/makefile	Sun Jan 12 00:45:16 2014 +0100
+++ b/level3/coco3_6309/makefile	Sun Jan 12 01:32:45 2014 +0100
@@ -55,7 +55,7 @@
 	@$(ECHO) "*        NitrOS-9/$(CPU) Level 3 Distribution      *"
 	@$(ECHO) "*                                                *"
 	@$(ECHO) "**************************************************"
-	$(foreach dir, $(DIRS), ($(CD) $(dir); make);)
+	$(foreach dir,$(DIRS),$(MAKE) -C $(dir) &&) :
 
 # Clean all components
 clean: dskclean