Commit:     18c32dac75b187d1a4e858f3cfdf03e844129f5e
Parent:     1cacc9ab8bf10e60b3ed93d7a10b070c4cbc6c9f
Author:     Sam Ravnborg <[EMAIL PROTECTED]>
AuthorDate: Sun Dec 9 08:55:13 2007 +0100
Committer:  Sam Ravnborg <[EMAIL PROTECTED]>
CommitDate: Sun Dec 9 08:55:13 2007 +0100

    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 <[EMAIL PROTECTED]>
    Tested-by: Jay Cliburn <[EMAIL PROTECTED]>
    Cc: Jay Cliburn <[EMAIL PROTECTED]>
 Makefile           |    3 ---
 scripts/mkmakefile |    6 ++++++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index a5252f4..7fb1a2c 100644
--- a/Makefile
+++ b/Makefile
@@ -118,9 +118,6 @@ saved-output := $(KBUILD_OUTPUT)
 KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd)
 $(if $(KBUILD_OUTPUT),, \
      $(error output directory "$(saved-output)" does not exist))
-# Check that OUTPUT directory is not the same as where we have kernel src
-$(if $(filter-out $(KBUILD_OUTPUT),$(shell /bin/pwd)),, \
-     $(error Output directory (O=...) specifies kernel src dir))
 PHONY += $(MAKECMDGOALS) sub-make
diff --git a/scripts/mkmakefile b/scripts/mkmakefile
index ee39fac..9ad1bd7 100644
--- a/scripts/mkmakefile
+++ b/scripts/mkmakefile
@@ -11,6 +11,12 @@
 test ! -r $2/Makefile -o -O $2/Makefile || exit 0
+# Only overwrite automatically generated Makefiles
+# (so we do not overwrite kernel Makefile)
+if ! grep -q Automatically $2/Makefile
+       exit 0
 echo "  GEN     $2/Makefile"
 cat << EOF > $2/Makefile
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

Reply via email to