changeset 2859:3a3cbc11ea9d lwtools-port

Make build fail if first level subdirectory fails The build process was ignoring a failed target and kept on building others. For instance, If NITROS9DIR was not set and there was no $HOME/nitros9 the build would spiral down in infinite make recursion instead of just quit on first failure (at least for some targets). Now all listed subdirectories must build successfully. This change should be generalized to lower level directories as well. Also add some dummy targets where appropriate so that the build does not fail where nothing really should be built.
author Tormod Volden <debian.tormod@gmail.com>
date Sat, 13 Jul 2013 14:59:26 +0200
parents 632187a1083e
children 8bd3a42345b2
files 3rdparty/packages/os9l2bbs/6809l2/makefile level3/makefile lib/makefile makefile
diffstat 4 files changed, 20 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/3rdparty/packages/os9l2bbs/6809l2/makefile	Sat Jul 13 12:06:44 2013 +0200
+++ b/3rdparty/packages/os9l2bbs/6809l2/makefile	Sat Jul 13 14:59:26 2013 +0200
@@ -27,6 +27,8 @@
 
 all: $(CMDS)
 
+dsk: $(DSK)
+
 $(DSK): $(CMDS)
 	$(OS9FORMAT) -q $(DSK)
 	$(MAKDIR) $(DSK),CMDS
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/level3/makefile	Sat Jul 13 14:59:26 2013 +0200
@@ -0,0 +1,7 @@
+
+all:
+info:
+clean:
+dsk:
+dskcopy:
+dskclean:
--- a/lib/makefile	Sat Jul 13 12:06:44 2013 +0200
+++ b/lib/makefile	Sat Jul 13 14:59:26 2013 +0200
@@ -33,7 +33,10 @@
 libalib.a:
 	$(MAKE) -C alib
 
+info:
+dsk:
 dskcopy:
+dskclean:
 
 clean:
 	$(RM) *.a *.o
--- a/makefile	Sat Jul 13 12:06:44 2013 +0200
+++ b/makefile	Sat Jul 13 14:59:26 2013 +0200
@@ -9,12 +9,12 @@
 	@$(ECHO) "*              THE NITROS-9 PROJECT              *"
 	@$(ECHO) "*                                                *"
 	@$(ECHO) "**************************************************"
-	$(foreach dir, $(dirs), ($(CD) $(dir); make);)
+	$(foreach dir,$(dirs),$(MAKE) -C $(dir) &&) :
 
 # Clean all components
 clean:
 	$(RM) nitros9project.zip $(DSKDIR)/*.dsk $(DSKDIR)/ReadMe $(DSKDIR)/index.shtml
-	$(foreach dir, $(dirs), ($(CD) $(dir); make clean);)
+	$(foreach dir,$(dirs),$(MAKE) -C $(dir) clean &&) :
 	$(RM) $(DSKDIR)/ReadMe
 	$(RM) $(DSKDIR)/index.html
 
@@ -25,18 +25,18 @@
 
 # Make DSK images
 dsk:	all
-	$(foreach dir, $(dirs), ($(CD) $(dir); make dsk);)
+	$(foreach dir,$(dirs),$(MAKE) -C $(dir) dsk &&) :
 
 # Copy DSK images
 dskcopy:	all
 	mkdir -p $(DSKDIR)
-	$(foreach dir, $(dirs), ($(CD) $(dir); make dskcopy);)
+	$(foreach dir,$(dirs),$(MAKE) -C $(dir) dskcopy &&) :
 	$(MKDSKINDEX) $(DSKDIR) > $(DSKDIR)/index.html
 
 
 # Clean DSK images
 dskclean:
-	$(foreach dir, $(dirs), ($(CD) $(dir); make dskclean);)
+	$(foreach dir,$(dirs),$(MAKE) -C $(dir) dskclean &&) :
 
 # DriveWire DSK images
 dwdsk = $(LEVEL1)/coco/nos96809l1coco1_dw.dsk $(LEVEL1)/coco/nos96809l1coco2_dw.dsk \
@@ -53,7 +53,7 @@
 	$(ARCHIVE) nitros9_becker.zip $(beckerdsk)
 
 info:
-	@$(foreach dir, $(dirs), ($(CD) $(dir); make info);)
+	$(foreach dir,$(dirs),$(MAKE) -C $(dir) info &&) :
 	
 # This section is to do the nightly build and upload 
 # to sourceforge.net you must set the environment
@@ -62,7 +62,7 @@
 # on your ssh account at sourceforge.net
 ifdef	SOURCEUSER
 nightly: clean hgupdate dskcopy
-	make info>$(DSKDIR)/ReadMe
+	$(MAKE) info > $(DSKDIR)/ReadMe
 	$(ARCHIVE) nitros9project $(DSKDIR)/*
 	scp nitros9project.zip $(SOURCEUSER),nitros9@web.sourceforge.net:/home/groups/n/ni/nitros9/htdocs
 	ssh $(SOURCEUSER),nitros9@shell.sourceforge.net create
@@ -88,7 +88,7 @@
 ifdef	TESTSSHSERVER
 ifdef	TESTSSHDIR
 nightlytest: clean hgupdate dskcopy
-	make info>$(DSKDIR)/ReadMe
+	$(MAKE) info > $(DSKDIR)/ReadMe
 	$(ARCHIVE) nitros9project $(DSKDIR)/*
 	scp nitros9project.zip $(TESTSSHSERVER):$(TESTSSHDIR)
 	ssh $(TESTSSHSERVER) "./burst"