aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Ravnborg <sam@saturn.ravnborg.org>2007-12-09 02:55:13 -0500
committerSam Ravnborg <sam@saturn.ravnborg.org>2007-12-09 02:55:13 -0500
commit18c32dac75b187d1a4e858f3cfdf03e844129f5e (patch)
treec41a33a7077356c0e75fcbe40ecb49890d506051
parent1cacc9ab8bf10e60b3ed93d7a10b070c4cbc6c9f (diff)
kbuild: fix building with O=.. options
The check introduced in commit: 4f1127e204377cbd2a56d112d323466f668e8334 "kbuild: fix infinite make recursion" caused certain external modules not to build and also caused 'make targz-pkg' to fail. This is a minimal fix so we revert to previous behaviour - but we do not overwrite the Makefile in the top-level directory. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Tested-by: Jay Cliburn <jacliburn@bellsouth.net> Cc: Jay Cliburn <jacliburn@bellsouth.net>
-rw-r--r--Makefile3
-rw-r--r--scripts/mkmakefile6
2 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index a5252f451bfd..7fb1a2c08305 100644
--- a/Makefile
+++ b/Makefile
@@ -118,9 +118,6 @@ saved-output := $(KBUILD_OUTPUT)
118KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd) 118KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd)
119$(if $(KBUILD_OUTPUT),, \ 119$(if $(KBUILD_OUTPUT),, \
120 $(error output directory "$(saved-output)" does not exist)) 120 $(error output directory "$(saved-output)" does not exist))
121# Check that OUTPUT directory is not the same as where we have kernel src
122$(if $(filter-out $(KBUILD_OUTPUT),$(shell /bin/pwd)),, \
123 $(error Output directory (O=...) specifies kernel src dir))
124 121
125PHONY += $(MAKECMDGOALS) sub-make 122PHONY += $(MAKECMDGOALS) sub-make
126 123
diff --git a/scripts/mkmakefile b/scripts/mkmakefile
index ee39facee152..9ad1bd793252 100644
--- a/scripts/mkmakefile
+++ b/scripts/mkmakefile
@@ -11,6 +11,12 @@
11 11
12 12
13test ! -r $2/Makefile -o -O $2/Makefile || exit 0 13test ! -r $2/Makefile -o -O $2/Makefile || exit 0
14# Only overwrite automatically generated Makefiles
15# (so we do not overwrite kernel Makefile)
16if ! grep -q Automatically $2/Makefile
17then
18 exit 0
19fi
14echo " GEN $2/Makefile" 20echo " GEN $2/Makefile"
15 21
16cat << EOF > $2/Makefile 22cat << EOF > $2/Makefile