make: don't ignore failures in for loops

Add `|| exit 1` to all constructs like `@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;`, so that compilation stops on the first error.
This commit is contained in:
Ludwig Ortmann 2014-03-12 11:03:34 +01:00
parent 0c9fd83693
commit 9b61d95545
30 changed files with 59 additions and 59 deletions

View File

@ -4,10 +4,10 @@ DIRS = $(RIOTCPU)/$(CPU) core drivers sys
all:
mkdir -p $(BINDIR)
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
clean:
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;
-@if [ -d $(BINDIR) ] ; \
then rm -rf $(BINDIR) ; \
fi

View File

@ -128,7 +128,7 @@ $(USEPKG:%=${BINDIR}%.a)::
"$(MAKE)" -C $(RIOTBASE)/pkg/$(patsubst ${BINDIR}%.a,%,$@)
clean:
@for i in $(USEPKG) ; do "$(MAKE)" -C $(RIOTBASE)/pkg/$$i clean ; done ;
@for i in $(USEPKG) ; do "$(MAKE)" -C $(RIOTBASE)/pkg/$$i clean || exit 1; done ;
"$(MAKE)" -C $(RIOTBOARD)/$(BOARD) clean
"$(MAKE)" -C $(RIOTBASE) clean
rm -rf $(BINDIR)

View File

@ -3,9 +3,9 @@ MODULE =$(BOARD)_base
DIRS = drivers $(RIOTBOARD)/msba2-common
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -4,9 +4,9 @@ INCLUDES += -I$(RIOTBOARD)/$(BOARD)/drivers/include
DIRS = drivers
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -3,9 +3,9 @@ MODULE =$(BOARD)_base
DIRS = drivers
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -3,9 +3,9 @@ MODULE =$(BOARD)_base
DIRS = $(RIOTBOARD)/msb-430-common
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -3,9 +3,9 @@ MODULE =$(BOARD)_base
DIRS = $(RIOTBOARD)/msb-430-common
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -3,9 +3,9 @@ MODULE =$(BOARD)_base
DIRS = drivers
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -4,9 +4,9 @@ INCLUDES += -I$(RIOTBASE)/drivers/cc110x
DIRS = $(RIOTBOARD)/msba2-common
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -3,7 +3,7 @@ MODULE =$(BOARD)_base
DIRS = drivers
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
@ -14,4 +14,4 @@ $(BINDIR)%.o: %.c
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -1,7 +1,7 @@
MODULE =$(BOARD)_base
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base

View File

@ -4,9 +4,9 @@ INCLUDES += -I$(RIOTBASE)/drivers/cc110x
DIRS = $(RIOTBOARD)/msba2-common
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -3,9 +3,9 @@ MODULE =$(BOARD)_base
DIRS = drivers
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -3,9 +3,9 @@ MODULE =$(BOARD)_base
DIRS = drivers
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -3,9 +3,9 @@ MODULE =$(BOARD)_base
DIRS = $(RIOTBOARD)/wsn430-common
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -3,9 +3,9 @@ MODULE = $(BOARD)_base
DIRS = $(RIOTBOARD)/wsn430-common
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -3,9 +3,9 @@ MODULE = cpu
DIRS = $(RIOTCPU)/msp430-common
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -12,7 +12,7 @@ all: $(BINDIR)$(MODULE).a
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;
# This is needed for NXP Cortex M devices
nxpsum:

View File

@ -17,9 +17,9 @@ ifneq (,$(filter i2c,$(USEMODULE)))
endif
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -9,9 +9,9 @@ ifneq (,$(filter mc1322x_asm,$(USEMODULE)))
endif
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -3,9 +3,9 @@ MODULE =msp430_common
DIRS =
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -5,9 +5,9 @@ include $(RIOTCPU)/$(CPU)/Makefile.include
DIRS = $(RIOTCPU)/msp430-common/
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -9,7 +9,7 @@ ifneq (,$(filter nativenet,$(USEMODULE)))
endif
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
@ -20,4 +20,4 @@ $(BINDIR)%.o: %.c
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -36,10 +36,10 @@ ifneq (,$(filter lm75a,$(USEMODULE)))
endif
all:
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
# remove compilation products
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -3,9 +3,9 @@ MODULE =at86rf231
DIRS =
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -12,9 +12,9 @@ ifneq (,$(filter wsn430-v1_3b,$(BOARD)))
endif
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -3,9 +3,9 @@ MODULE =cc2420
DIRS =
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -2,8 +2,8 @@ DIRS =
DIRS += openwsn
all::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
# remove compilation products
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -18663,7 +18663,7 @@ diff -crB openwsn/07-App/Makefile ../../../sys/net/openwsn/07-App/Makefile
+ DIRS += udpstorm
+
+ all: $(BINDIR)$(SUBMOD)
+ @for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
+ @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
+
+ $(BINDIR)$(SUBMOD): $(OBJ)
+ $(AD)$(AR) rcs $(BINDIR)$(MODULE) $(OBJ)
@ -18679,7 +18679,7 @@ diff -crB openwsn/07-App/Makefile ../../../sys/net/openwsn/07-App/Makefile
+ @printf "$(BINDIR)"|cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d
+
+ clean::
+ @for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
+ @for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;
diff -crB openwsn/07-App/heli/heli.c ../../../sys/net/openwsn/07-App/heli/heli.c
*** openwsn/07-App/heli/heli.c Thu Mar 21 21:36:59 2013
--- ../../../sys/net/openwsn/07-App/heli/heli.c Wed Jan 15 13:48:27 2014
@ -27111,7 +27111,7 @@ diff -crB openwsn/Makefile ../../../sys/net/openwsn/Makefile
+ DIRS += 07-App
+
+ all: $(BINDIR)$(MODULE)
+ @for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
+ @for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
+
+ $(BINDIR)$(MODULE): $(OBJ)
+ $(AD)$(AR) rcs $(BINDIR)$(MODULE) $(OBJ)
@ -27129,7 +27129,7 @@ diff -crB openwsn/Makefile ../../../sys/net/openwsn/Makefile
+
+ # remove compilation products
+ clean::
+ @for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
+ @for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;
diff -crB openwsn/board_info.h ../../../sys/net/openwsn/board_info.h
*** openwsn/board_info.h Thu Mar 21 21:36:59 2013
--- ../../../sys/net/openwsn/board_info.h Wed Jan 15 13:48:27 2014

View File

@ -107,10 +107,10 @@ ifneq (,$(findstring quad_math,$(USEMODULE)))
endif
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
# remove compilation products
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;