Skip to content

Commit

Permalink
ensure clean builds work even if BOARD is not specified in the enviro…
Browse files Browse the repository at this point in the history
…nment
  • Loading branch information
osresearch committed Apr 20, 2018
1 parent a91be6b commit 7dee390
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ CPUS := $(shell nproc)
#MAKE_JOBS ?= -j$(CPUS) --max-load 16

# Create the log directory if it doesn't already exist
BUILD_LOG := $(shell mkdir -p "$(log_dir)" "$(build)/$(BOARD)" )
BUILD_LOG := $(shell mkdir -p "$(log_dir)" )

# Check that we have a correct version of make
LOCAL_MAKE_VERSION := $(shell $(MAKE) --version | head -1 | cut -d' ' -f3)
Expand All @@ -27,6 +27,9 @@ ifeq "$(LOCAL_MAKE_VERSION)" "$(make_version)"
BOARD ?= qemu-coreboot
CONFIG := $(pwd)/boards/$(BOARD)/$(BOARD).config

# Create the board output directory if it doesn't already exist
BOARD_LOG := $(shell mkdir -p "$(build)/$(BOARD)" )

ifneq "y" "$(shell [ -r '$(CONFIG)' ] && echo y)"
$(error $(CONFIG): board configuration does not exist)
endif
Expand Down

0 comments on commit 7dee390

Please sign in to comment.