Allow clean to be run without BOARD being set
This commit is contained in:
21
Makefile
21
Makefile
@ -1,16 +1,14 @@
|
|||||||
-include config.mk
|
-include config.mk
|
||||||
|
|
||||||
# Target to remove build artifacts
|
|
||||||
clean:
|
|
||||||
rm -rf build
|
|
||||||
|
|
||||||
# Parameter for current board
|
# Parameter for current board
|
||||||
ifeq ($(BOARD),)
|
ifeq ($(BOARD),)
|
||||||
$(info $(shell echo Please set BOARD to one of the following))
|
all:
|
||||||
$(info $(shell cd src/board && echo */*))
|
@echo "Please set BOARD to one of the following:"
|
||||||
$(error BOARD not set)
|
@cd src/board && for board in */*; do \
|
||||||
endif
|
echo " $$board"; \
|
||||||
|
done
|
||||||
|
@exit 1
|
||||||
|
else
|
||||||
# Calculate version
|
# Calculate version
|
||||||
DATE=$(shell git show --format="%cd" --date="format:%Y-%m-%d" --no-patch)
|
DATE=$(shell git show --format="%cd" --date="format:%Y-%m-%d" --no-patch)
|
||||||
REV=$(shell git describe --always --dirty)
|
REV=$(shell git describe --always --dirty)
|
||||||
@ -54,3 +52,8 @@ CFLAGS+=-I$(ARCH_DIR)/include -D__ARCH__=$(ARCH)
|
|||||||
include $(ARCH_DIR)/arch.mk
|
include $(ARCH_DIR)/arch.mk
|
||||||
|
|
||||||
# The architecture defines build targets, no more is required
|
# The architecture defines build targets, no more is required
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Target to remove build artifacts
|
||||||
|
clean:
|
||||||
|
rm -rf build
|
||||||
|
Reference in New Issue
Block a user