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.

This commit is contained in:
Anders Hoglund 2016-06-14 12:28:11 +02:00
parent 1dcb84579b
commit ea3856f8a8
1 changed files with 9 additions and 8 deletions

View File

@ -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=<target>] [OPTIONS=\"<options>\"]"
@echo "Or:"
@echo " make <target> [OPTIONS=\"<options>\"]"
@echo ""
@echo "Valid TARGET values are: $(VALID_TARGETS)"
@echo ""