diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-06 16:21:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-06 16:21:57 -0400 |
commit | 15700770ef7c5d12e2f1659d2ddbeb3f658d9f37 (patch) | |
tree | 7fa2f81c33c9efcb1a1568385beead75c5892cfb /scripts/mkcompile_h | |
parent | 6de410c2b0cc055ae9ee640c84331f6a70878d9b (diff) | |
parent | 11de39e2fbbc592018e0a231d0ee773653dcc8d6 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (38 commits)
kconfig: fix mconf segmentation fault
kbuild: enable use of code from a different dir
kconfig: error out if recursive dependencies are found
kbuild: scripts/basic/fixdep segfault on pathological string-o-death
kconfig: correct minor typo in Kconfig warning message.
kconfig: fix path to modules.txt in Kconfig help
usr/Kconfig: fix typo
kernel-doc: alphabetically-sorted entries in index.html of 'htmldocs'
kbuild: be more explicit on missing .config file
kbuild: clarify the creation of the LOCALVERSION_AUTO string.
kbuild: propagate errors from find in scripts/gen_initramfs_list.sh
kconfig: refer to qt3 if we cannot find qt libraries
kbuild: handle compressed cpio initramfs-es
kbuild: ignore section mismatch warning for references from .paravirtprobe to .init.text
kbuild: remove stale comment in modpost.c
kbuild/mkuboot.sh: allow spaces in CROSS_COMPILE
kbuild: fix make mrproper for Documentation/DocBook/man
kbuild: remove kconfig binaries during make mrproper
kconfig/menuconfig: do not hardcode '.config'
kbuild: override build timestamp & version
...
Diffstat (limited to 'scripts/mkcompile_h')
-rwxr-xr-x | scripts/mkcompile_h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h index 82d0af46f0ef..a8740df07b09 100755 --- a/scripts/mkcompile_h +++ b/scripts/mkcompile_h | |||
@@ -18,19 +18,32 @@ fi | |||
18 | # Do not expand names | 18 | # Do not expand names |
19 | set -f | 19 | set -f |
20 | 20 | ||
21 | if [ -r .version ]; then | 21 | # Fix the language to get consistent output |
22 | VERSION=`cat .version` | 22 | LC_ALL=C |
23 | export LC_ALL | ||
24 | |||
25 | if [ -z "$KBUILD_BUILD_VERSION" ]; then | ||
26 | if [ -r .version ]; then | ||
27 | VERSION=`cat .version` | ||
28 | else | ||
29 | VERSION=0 | ||
30 | echo 0 > .version | ||
31 | fi | ||
23 | else | 32 | else |
24 | VERSION=0 | 33 | VERSION=$KBUILD_BUILD_VERSION |
25 | echo 0 > .version | ||
26 | fi | 34 | fi |
27 | 35 | ||
36 | if [ -z "$KBUILD_BUILD_TIMESTAMP" ]; then | ||
37 | TIMESTAMP=`date` | ||
38 | else | ||
39 | TIMESTAMP=$KBUILD_BUILD_TIMESTAMP | ||
40 | fi | ||
28 | 41 | ||
29 | UTS_VERSION="#$VERSION" | 42 | UTS_VERSION="#$VERSION" |
30 | CONFIG_FLAGS="" | 43 | CONFIG_FLAGS="" |
31 | if [ -n "$SMP" ] ; then CONFIG_FLAGS="SMP"; fi | 44 | if [ -n "$SMP" ] ; then CONFIG_FLAGS="SMP"; fi |
32 | if [ -n "$PREEMPT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"; fi | 45 | if [ -n "$PREEMPT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"; fi |
33 | UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS `LC_ALL=C LANG=C date`" | 46 | UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS $TIMESTAMP" |
34 | 47 | ||
35 | # Truncate to maximum length | 48 | # Truncate to maximum length |
36 | 49 | ||
@@ -46,7 +59,7 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/" | |||
46 | 59 | ||
47 | echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\" | 60 | echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\" |
48 | 61 | ||
49 | echo \#define LINUX_COMPILE_TIME \"`LC_ALL=C LANG=C date +%T`\" | 62 | echo \#define LINUX_COMPILE_TIME \"`date +%T`\" |
50 | echo \#define LINUX_COMPILE_BY \"`whoami`\" | 63 | echo \#define LINUX_COMPILE_BY \"`whoami`\" |
51 | echo \#define LINUX_COMPILE_HOST \"`hostname | $UTS_TRUNCATE`\" | 64 | echo \#define LINUX_COMPILE_HOST \"`hostname | $UTS_TRUNCATE`\" |
52 | 65 | ||
@@ -58,7 +71,7 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/" | |||
58 | echo \#define LINUX_COMPILE_DOMAIN | 71 | echo \#define LINUX_COMPILE_DOMAIN |
59 | fi | 72 | fi |
60 | 73 | ||
61 | echo \#define LINUX_COMPILER \"`LC_ALL=C LANG=C $CC -v 2>&1 | tail -n 1`\" | 74 | echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | tail -n 1`\" |
62 | ) > .tmpcompile | 75 | ) > .tmpcompile |
63 | 76 | ||
64 | # Only replace the real compile.h if the new one is different, | 77 | # Only replace the real compile.h if the new one is different, |