tree 593421beaa683526ed187fd540c156c9a1536f74
parent 8ec4b4ff1c89bb280e662b84eba503ca44abe836
author Sam Ravnborg <[EMAIL PROTECTED](none)> Mon, 25 Jul 2005 20:26:04 +0000
committer Sam Ravnborg <[EMAIL PROTECTED](none)> Mon, 25 Jul 2005 20:26:04 +0000

kbuild: fix make O=...

kbuild failed to locate Kbuild.include.
Teach kbuild how to find Kbuild files when using make O=...

Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>
---

 Makefile               |    2 +-
 scripts/Makefile.build |    4 +++-
 scripts/Makefile.clean |    4 +++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -310,7 +310,7 @@ cc-version = $(shell $(CONFIG_SHELL) $(s
 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)
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -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
diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean
--- a/scripts/Makefile.clean
+++ b/scripts/Makefile.clean
@@ -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
 # ==========================================================================
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to