From ce963433bd9316eaf825ba5d20d84404adf786e1 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Fri, 18 Sep 2020 11:50:00 +0200 Subject: [PATCH] build: Allow overriding BUILDDIR from command line 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 --- src/build.rules | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/build.rules b/src/build.rules index bdcae6551..32f45ae1e 100644 --- a/src/build.rules +++ b/src/build.rules @@ -7,7 +7,8 @@ all: _all # setup some variables ROOTDIR := $(dir $(lastword $(MAKEFILE_LIST))) ROOTDIR := $(dir $(ROOTDIR:%../src/=%))../ -BUILDDIR := $(ROOTDIR)build +BUILDDIR ?= $(abspath $(ROOTDIR)build) +BUILDDIR := $(BUILDDIR:%/=%) _PROJ := $(abspath $(dir $(firstword $(MAKEFILE_LIST)))) ABSROOT := $(abspath $(ROOTDIR)) _PROJ := $(_PROJ:$(ABSROOT)/%=%)