[klibc] [klibc:master] Makefile: Honour KBUILD_SRC variable

klibc-bot for Ben Hutchings ben at decadent.org.uk
Thu Jan 24 18:57:04 PST 2019


Commit-ID:  22b36d1ae34416bc48869619cbb0cccb2070f48f
Gitweb:     http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=22b36d1ae34416bc48869619cbb0cccb2070f48f
Author:     Ben Hutchings <ben at decadent.org.uk>
AuthorDate: Fri, 25 Jan 2019 01:20:36 +0000
Committer:  Ben Hutchings <ben at decadent.org.uk>
CommitDate: Fri, 25 Jan 2019 02:38:03 +0000

[klibc] Makefile: Honour KBUILD_SRC variable

Currently it's necessary to specify both KBUILD_SRC and srctree to
make everything work properly in an out-of-tree build.  It should
only be necessary to specify KBUILD_SRC.  Initialise srctree
accordingly.

Signed-off-by: Ben Hutchings <ben at decadent.org.uk>

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 7567f6f..a60161c 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ SRCROOT = .
 # To see a list of typical targets execute "make help"
 
 # kbuild compatibility
-export srctree  := $(shell pwd)
+export srctree  := $(or $(KBUILD_SRC),$(shell pwd))
 export objtree  := $(shell pwd)
 export KLIBCSRC := usr/klibc
 export VERSION := $(shell cat $(srctree)/$(KLIBCSRC)/version)


More information about the klibc mailing list