ensure clean builds work even if BOARD is not specified in the environment

This commit is contained in:
Trammell hudson 2018-04-19 20:06:36 -04:00
parent a91be6b38d
commit 7dee3902f3
Failed to extract signature

View File

@ -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)
@ -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