diff mbox series

[v7,14/15] build: allow overriding BUILDDIR from command line

Message ID 1600422562-I3dda8359cfcdef249aebe01cbbc7caf429925d1d@changeid
State Accepted
Headers show
Series build improvements | expand

Commit Message

Johannes Berg Sept. 18, 2020, 9:50 a.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

You can now specify BUILDDIR= on the make command line,
e.g. in order to put that into a tmpfs or similar.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 src/build.rules | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/src/build.rules b/src/build.rules
index 1b830490cfe0..ec1cd66ce2a6 100644
--- a/src/build.rules
+++ b/src/build.rules
@@ -7,8 +7,8 @@  all: _all
 # setup some variables
 ROOTDIR := $(dir $(lastword $(MAKEFILE_LIST)))
 ROOTDIR := $(dir $(ROOTDIR:%../src/=%))../
-BUILDDIR := $(ROOTDIR)build
-BUILDDIR := $(abspath $(BUILDDIR))
+BUILDDIR ?= $(abspath $(ROOTDIR)build)
+BUILDDIR := $(BUILDDIR:%/=%)
 ABSROOT := $(abspath $(ROOTDIR))
 ifeq ($(origin OUT),command line)
 _PROJ := $(OUT:%/=%)