[klibc] [PATCH 04/16] Fix srctree references in build.

Mike Waychison mikew at google.com
Mon Mar 1 23:45:49 PST 2010


Fix references in the build where we need to specify expliclity that we are
referring to files in the $(srctree)

Signed-off-by: Mike Waychison <mikew at google.com>
---
 Makefile             |    4 ++--
 scripts/Kbuild.klibc |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index dcee00e..e9d003b 100644
--- a/Makefile
+++ b/Makefile
@@ -4,12 +4,12 @@ SRCROOT = .
 export srctree  := $(shell pwd)
 export objtree  := $(shell pwd)
 export KLIBCSRC := usr/klibc
-export VERSION := $(shell cat $(KLIBCSRC)/version)
+export VERSION := $(shell cat $(srctree)/$(KLIBCSRC)/version)
 export KLIBCINC := usr/include
 export KLIBCOBJ := usr/klibc
 export KLIBCKERNELSRC := linux/
 export KLIBCKERNELOBJ := linux/
-include scripts/Kbuild.include
+include $(srctree)/scripts/Kbuild.include
 
 KLIBCROSS	?= $(CROSS_COMPILE)
 export KLIBCROSS
diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
index 78bc665..9baada8 100644
--- a/scripts/Kbuild.klibc
+++ b/scripts/Kbuild.klibc
@@ -76,7 +76,7 @@ KLIBCLDFLAGS      :=
 KLIBCCFLAGS       :=
 
 # Arch specific definitions for klibc
-include $(KLIBCSRC)/arch/$(KLIBCARCHDIR)/MCONFIG
+include $(srctree)/$(KLIBCSRC)/arch/$(KLIBCARCHDIR)/MCONFIG
 
 # include/asm-* architecture
 KLIBCASMARCH	  ?= $(KLIBCARCH)
@@ -141,7 +141,7 @@ export KLIBCCRT0 KLIBCLIBC SHLIBDIR
 objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o)))
 
 # Kbuild file in the directory that is being build
-include $(obj)/Kbuild
+include $(srctree)/$(obj)/Kbuild
 
 #####
 # static-y + shared-y handling
@@ -412,4 +412,4 @@ endif
 # Shorthand for $(Q)$(MAKE) -f scripts/Kbuild.klibc obj
 # Usage:
 # $(Q)$(MAKE) $(klibc)=dir
-klibc := -rR -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Kbuild.klibc obj
+klibc := -rR -f $(srctree)/scripts/Kbuild.klibc obj



More information about the klibc mailing list