From 5d1cfb5b12f72145d30ba0f53c9f238144b122b8 Mon Sep 17 00:00:00 2001 From: Kai Germaschewski Date: Sat, 27 Jul 2002 02:53:19 -0500 Subject: 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 ", 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 ". --- scripts/mkcompile_h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'scripts') diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h index 6313db961724..cd956380978a 100755 --- a/scripts/mkcompile_h +++ b/scripts/mkcompile_h @@ -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 " +# 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 -- cgit v1.2.3 From 11acbbbb8a50f4de7dbe4bc1b5acc440dfe81810 Mon Sep 17 00:00:00 2001 From: Kai Germaschewski Date: Sat, 27 Jul 2002 03:13:32 -0500 Subject: kbuild: Make scripts/compile.h when sh != bash Contributed by Arkadiusz Miskiewicz --- scripts/mkcompile_h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts') diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h index cd956380978a..57b032952c00 100755 --- a/scripts/mkcompile_h +++ b/scripts/mkcompile_h @@ -14,6 +14,9 @@ if [ -r $TARGET -a ! -O ../include/linux/autoconf.h ]; then exit 0 fi +# Do not expand names +set -f + if [ -r ../.version ]; then VERSION=`cat ../.version` else -- cgit v1.2.3