summaryrefslogtreecommitdiffstats
path: root/scripts/mkmakefile
diff options
context:
space:
mode:
authorJan Beulich2006-05-02 12:33:20 +0200
committerSam Ravnborg2006-05-08 06:55:32 +0200
commitfd5f0cd6b0cef59ba18e5ac13be5b2775fa6ec28 (patch)
tree3ae3209f1846261c9a455339ddcd40d16cd2bf99 /scripts/mkmakefile
parentkbuild: drivers/video/logo/ - fix ident glitch (diff)
downloadkernel-qcow2-linux-fd5f0cd6b0cef59ba18e5ac13be5b2775fa6ec28.tar.gz
kernel-qcow2-linux-fd5f0cd6b0cef59ba18e5ac13be5b2775fa6ec28.tar.xz
kernel-qcow2-linux-fd5f0cd6b0cef59ba18e5ac13be5b2775fa6ec28.zip
kbuild: Do not overwrite makefile as anohter user
Change the conditional of the outputmakefile rule to be evaluated entirely in make, and add a conditional to not touch the generated makefile when e.g. running 'make install' as root while the build was done as non-root. Also adjust the comment describing this, and move the message printing and redirection to mkmakefile. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/mkmakefile')
-rw-r--r--scripts/mkmakefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/mkmakefile b/scripts/mkmakefile
index a22cbedd3b3e..7f9d544f9b6c 100644
--- a/scripts/mkmakefile
+++ b/scripts/mkmakefile
@@ -10,7 +10,10 @@
# $4 - patchlevel
-cat << EOF
+test ! -r $2/Makefile -o -O $2/Makefile || exit 0
+echo " GEN $2/Makefile"
+
+cat << EOF > $2/Makefile
# Automatically generated by $0: don't edit
VERSION = $3