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

Johannes Berg johannes at sipsolutions.net
Fri Sep 18 05:50:00 EDT 2020


From: Johannes Berg <johannes.berg at 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 at intel.com>
---
 src/build.rules | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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:%/=%)
-- 
2.26.2




More information about the Hostap mailing list