From ea3856f8a8de441b39c61a0d5343f4b8ba69a0dd Mon Sep 17 00:00:00 2001 From: Anders Hoglund Date: Tue, 14 Jun 2016 12:28:11 +0200 Subject: [PATCH] Changed recursive all goal for proper return values. Failures had return value 0 (ok). Now also possible to use target name as make goal. Updated help texts to match this change. --- Makefile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 12352a0ba..53159fa34 100644 --- a/Makefile +++ b/Makefile @@ -658,15 +658,14 @@ $(OBJECT_DIR)/$(TARGET)/%.o: %.S @$(CC) -c -o $@ $(ASFLAGS) $< -## all : default task; compile C code, build firmware -all: - for build_target in $(VALID_TARGETS); do \ +## all : Build all valid targets +all: $(VALID_TARGETS) + +$(VALID_TARGETS): echo "" && \ - echo "Building $$build_target" && \ - $(MAKE) -j binary hex TARGET=$$build_target || \ - break; \ - echo "Building $$build_target succeeded."; \ - done + echo "Building $@" && \ + $(MAKE) -j binary hex TARGET=$@ && \ + echo "Building $@ succeeded." ## clean : clean up all temporary / machine-generated files clean: @@ -725,6 +724,8 @@ help: Makefile @echo "" @echo "Usage:" @echo " make [TARGET=] [OPTIONS=\"\"]" + @echo "Or:" + @echo " make [OPTIONS=\"\"]" @echo "" @echo "Valid TARGET values are: $(VALID_TARGETS)" @echo ""