From 7dee3902f3b325f6bce911c138d273981d39c7c4 Mon Sep 17 00:00:00 2001 From: Trammell hudson Date: Thu, 19 Apr 2018 20:06:36 -0400 Subject: [PATCH] ensure clean builds work even if BOARD is not specified in the environment --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 38d23b1c..929814bc 100644 --- a/Makefile +++ b/Makefile @@ -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