Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54139
b: refs/heads/master
c: 87c94bf
h: refs/heads/master
i:
  54137: 1ff1e1a
  54135: 0b3529e
v: v3
  • Loading branch information
Sam Ravnborg authored and Sam Ravnborg committed May 2, 2007
1 parent c1897c6 commit 364d3f1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b72e53f8bbbec8421316220291d8a8002a5562ba
refs/heads/master: 87c94bfb8ad354fb43d2caf870d7ca0b3f98dab3
27 changes: 20 additions & 7 deletions trunk/scripts/mkcompile_h
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,32 @@ fi
# 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
VERSION=0
echo 0 > .version
VERSION=$KBUILD_BUILD_VERSION
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="$UTS_VERSION $CONFIG_FLAGS `LC_ALL=C LANG=C date`"
UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS $TIMESTAMP"

# Truncate to maximum length

Expand All @@ -46,7 +59,7 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/"

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`\"

Expand All @@ -58,7 +71,7 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/"
echo \#define LINUX_COMPILE_DOMAIN
fi

echo \#define LINUX_COMPILER \"`LC_ALL=C LANG=C $CC -v 2>&1 | tail -n 1`\"
echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | tail -n 1`\"
) > .tmpcompile

# Only replace the real compile.h if the new one is different,
Expand Down

0 comments on commit 364d3f1

Please sign in to comment.