Commit 5d1cfb5b authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: Fix compiling/installing as different users

"make bzImage && sudo make install" had the problem that during
the "sudo make install" the build system would notice that the information
in include/linux/compile.h is not accurate (it says "compiled by <user>",
but we are root), thus causing compile.h to be updated and leading to
some recompiles.

We now only update "compile.h" if the current user is the owner of
include/linux/autoconf.h, i.e. the user who did the "make *config". So the
above sequence will correctly state "compiled by <user>".
parent 3b89dbbd
......@@ -3,6 +3,17 @@ ARCH=$2
SMP=$3
CC=$4
# If compile.h exists already and we don't own autoconf.h
# (i.e. we're not the same user who did make *config), don't
# modify compile.h
# So "sudo make install" won't change the "compiled by <user>"
# do "compiled by root"
if [ -r $TARGET -a ! -O ../include/linux/autoconf.h ]; then
echo ' (not modified)'
exit 0
fi
if [ -r ../.version ]; then
VERSION=`cat ../.version`
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment