summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mkcompile_h14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index 6313db961724..57b032952c00 100755
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -3,6 +3,20 @@ 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
+
+# Do not expand names
+set -f
+
if [ -r ../.version ]; then
VERSION=`cat ../.version`
else