Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.24 /scripts/mkmakefile

Filename:/scripts/mkmakefile
Lines Added:11
Lines Deleted:3
Also changed in: (Previous) 2.6.24-rc8  2.6.24-rc7  2.6.24-rc6  2.6.24-rc5-git7  2.6.24-rc5-git6  2.6.24-rc5-git5 
(Following) 2.6.24-git6  2.6.24-git7  2.6.24-git8  2.6.24-git9  2.6.24-git10  2.6.24-git11 

Location
[  2.6.24
  [  scripts
     o  mkmakefile

Patch

diff --git a/scripts/mkmakefile b/scripts/mkmakefile
index 7f9d544..e0f54b9 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 test -e $2/Makefile && ! grep -q Automatically $2/Makefile
+then
+   exit 0
+fi
 echo "  GEN     $2/Makefile"
 
 cat << EOF > $2/Makefile
@@ -26,11 +32,13 @@ MAKEFLAGS += --no-print-directory
 
 .PHONY: all \$(MAKECMDGOALS)
 
+all   := \$(filter-out all Makefile,\$(MAKECMDGOALS))
+
 all:
-   \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT)
+   \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$(all)
 
 Makefile:;
 
-\$(filter-out all Makefile,\$(MAKECMDGOALS)) %/:
-   \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@
+\$(all) %/: all
+   @:
 EOF


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.