Mercurial > hg > Members > kono > nitros9-code
view level2/makefile @ 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 | ab3f9eb5fc5c |
line wrap: on
line source
include $(NITROS9DIR)/rules.mak dirs = coco3 coco3_6309 ifdef PORTS dirs = $(PORTS) endif # Make all components all: @$(ECHO) "**************************************************" @$(ECHO) "* *" @$(ECHO) "* NitrOS-9 Level 2 Ports *" @$(ECHO) "* *" @$(ECHO) "**************************************************" $(foreach dir,$(dirs),$(MAKE) -C $(dir) &&) : # Clean all components clean: $(foreach dir, $(dirs), ($(CD) $(dir); make clean);) # Make DSK images dsk: $(foreach dir, $(dirs), ($(CD) $(dir); make dsk);) # Copy DSK images dskcopy: $(foreach dir, $(dirs), ($(CD) $(dir); make dskcopy);) # Clean DSK images dskclean: $(foreach dir, $(dirs), ($(CD) $(dir); make dskclean);) # Info info: @$(foreach dir, $(dirs), $(MAKE) -C $(dir) info; $(ECHO);)