From a91be6b38d2734514da967848cab92bd5bdd83a3 Mon Sep 17 00:00:00 2001 From: Trammell hudson Date: Thu, 19 Apr 2018 19:37:45 -0400 Subject: [PATCH] move log directory creation above the make version check (issue #375) --- Makefile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index e4180bae..38d23b1c 100644 --- a/Makefile +++ b/Makefile @@ -9,12 +9,20 @@ config := $(pwd)/config INSTALL := $(pwd)/install log_dir := $(build)/log +# Controls how many parallel jobs are invoked in subshells +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)" ) + # Check that we have a correct version of make LOCAL_MAKE_VERSION := $(shell $(MAKE) --version | head -1 | cut -d' ' -f3) include modules/make ifeq "$(LOCAL_MAKE_VERSION)" "$(make_version)" +# This is the correct version of Make BOARD ?= qemu-coreboot CONFIG := $(pwd)/boards/$(BOARD)/$(BOARD).config @@ -28,13 +36,6 @@ include $(CONFIG) # Unless otherwise specified, we are building for heads CONFIG_HEADS ?= y -# Controls how many parallel jobs are invoked in subshells -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)" ) - # Some things want usernames, we use the current checkout # so that they are reproducible GIT_HASH := $(shell git rev-parse HEAD) @@ -510,7 +511,7 @@ HEADS_MAKE := $(build)/$(make_dir)/make # Once we have a proper Make, we can just pass arguments into it all bootstrap linux cpio: $(HEADS_MAKE) - LANG=C MAKE=$(HEADS_MAKE) $(HEADS_MAKE) $@ + LANG=C MAKE=$(HEADS_MAKE) $(HEADS_MAKE) $(MAKE_JOBS) $@ %.clean %.intermediate %.vol: $(HEADS_MAKE) LANG=C MAKE=$(HEADS_MAKE) $(HEADS_MAKE) $@