]> err.no Git - linux-2.6/commitdiff
kbuild: fix make O=...
authorSam Ravnborg <sam@mars.(none)>
Mon, 25 Jul 2005 20:26:04 +0000 (20:26 +0000)
committerSam Ravnborg <sam@mars.(none)>
Mon, 25 Jul 2005 20:26:04 +0000 (20:26 +0000)
kbuild failed to locate Kbuild.include.
Teach kbuild how to find Kbuild files when using make O=...

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---

Makefile
scripts/Makefile.build
scripts/Makefile.clean

index 7c607dc64479da16fb323b0dd1d159f96e659ad3..ed1f4b5b714f85dbc543af39a098b75a233e237e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -310,7 +310,7 @@ cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \
 MAKEFLAGS += --include-dir=$(srctree)
 
 # We need some generic definitions
-include scripts/Kbuild.include
+include  $(srctree)/scripts/Kbuild.include
 
 # For maximum performance (+ possibly random breakage, uncomment
 # the following)
index ebed6a41bc69bf0e75ca29c694e8114846bfeda9..8f4f5a347767d642307479fea8cd6045b2b50fb9 100644 (file)
@@ -10,7 +10,9 @@ __build:
 # Read .config if it exist, otherwise ignore
 -include .config
 
-include $(if $(wildcard $(obj)/Kbuild), $(obj)/Kbuild, $(obj)/Makefile)
+# The filename Kbuild has precedence over Makefile
+include $(if $(wildcard $(srctree)/$(src)/Kbuild), \
+                        $(srctree)/$(src)/Kbuild, $(srctree)/$(src)/Makefile)
 
 include scripts/Kbuild.include
 include scripts/Makefile.lib
index ff3e87dbf387412448f8f1d1359120a997636234..9c978b7bbdf189b7cdb45ae95464b3f99bb3c899 100644 (file)
@@ -7,7 +7,9 @@ src := $(obj)
 .PHONY: __clean
 __clean:
 
-include $(if $(wildcard $(obj)/Kbuild), $(obj)/Kbuild, $(obj)/Makefile)
+# The filename Kbuild has precedence over Makefile
+include $(if $(wildcard $(srctree)/$(src)/Kbuild), \
+                        $(srctree)/$(src)/Kbuild, $(srctree)/$(src)/Makefile)
 
 # Figure out what we need to build from the various variables
 # ==========================================================================