projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ext4: Use BUG_ON() instead of BUG()
[deliverable/linux.git]
/
scripts
/
mkcompile_h
diff --git
a/scripts/mkcompile_h
b/scripts/mkcompile_h
index d7b8a384b4a7991960d33c7c01c60d6f58f92fd6..a8740df07b09fc1b08c603620bc1ccaaf783199e 100755
(executable)
--- a/
scripts/mkcompile_h
+++ b/
scripts/mkcompile_h
@@
-18,19
+18,32
@@
fi
# Do not expand names
set -f
# Do not expand names
set -f
-if [ -r .version ]; then
- VERSION=`cat .version`
+# Fix the language to get consistent output
+LC_ALL=C
+export LC_ALL
+
+if [ -z "$KBUILD_BUILD_VERSION" ]; then
+ if [ -r .version ]; then
+ VERSION=`cat .version`
+ else
+ VERSION=0
+ echo 0 > .version
+ fi
else
else
- VERSION=0
- echo 0 > .version
+ VERSION=$KBUILD_BUILD_VERSION
fi
fi
+if [ -z "$KBUILD_BUILD_TIMESTAMP" ]; then
+ TIMESTAMP=`date`
+else
+ TIMESTAMP=$KBUILD_BUILD_TIMESTAMP
+fi
UTS_VERSION="#$VERSION"
CONFIG_FLAGS=""
if [ -n "$SMP" ] ; then CONFIG_FLAGS="SMP"; fi
if [ -n "$PREEMPT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"; fi
UTS_VERSION="#$VERSION"
CONFIG_FLAGS=""
if [ -n "$SMP" ] ; then CONFIG_FLAGS="SMP"; fi
if [ -n "$PREEMPT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"; fi
-UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS
`LC_ALL=C LANG=C date`
"
+UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS
$TIMESTAMP
"
# Truncate to maximum length
# Truncate to maximum length
@@
-46,7
+59,7
@@
UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/"
echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\"
echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\"
- echo \#define LINUX_COMPILE_TIME \"`
LC_ALL=C LANG=C
date +%T`\"
+ echo \#define LINUX_COMPILE_TIME \"`date +%T`\"
echo \#define LINUX_COMPILE_BY \"`whoami`\"
echo \#define LINUX_COMPILE_HOST \"`hostname | $UTS_TRUNCATE`\"
echo \#define LINUX_COMPILE_BY \"`whoami`\"
echo \#define LINUX_COMPILE_HOST \"`hostname | $UTS_TRUNCATE`\"
This page took
0.024054 seconds
and
5
git commands to generate.