Skip to content

Commit

Permalink
move log directory creation above the make version check (issue #375)
Browse files Browse the repository at this point in the history
  • Loading branch information
osresearch committed Apr 19, 2018
1 parent ee9bb29 commit a91be6b
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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) $@

Expand Down

0 comments on commit a91be6b

Please sign in to comment.