diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-13 13:20:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-13 13:20:53 -0400 |
commit | 25d591587d3b0676fb89c29e7e55fe4a08597ec1 (patch) | |
tree | 90f1d5d3bab243e14138d47bd9b9c1bb5613fb17 /scripts/mkcompile_h | |
parent | 86ae13b006e48959981248493efd3ff4b2828b3d (diff) | |
parent | 2331d1a6cd3d6e580bc88b9a160066d9e1177fe1 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
kbuild: revert "save ARCH & CROSS_COMPILE ..."
warn about use of uninstalled kernel headers
kbuild: mkcompile_h: trivial cleanups
kbuild: fix warning when domainname is not available
kbuild: Fix size_append issue for bzip2/lzma kernel
kbuild,scripts: use non-builtin echo for '-e'
kbuild: fix the binrpm-pkg target to work with KBUILD_OUTPUT set
Diffstat (limited to 'scripts/mkcompile_h')
-rwxr-xr-x | scripts/mkcompile_h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h index 6a12dd9f1181..bce3d0fe6fbd 100755 --- a/scripts/mkcompile_h +++ b/scripts/mkcompile_h | |||
@@ -1,3 +1,5 @@ | |||
1 | #!/bin/sh | ||
2 | |||
1 | TARGET=$1 | 3 | TARGET=$1 |
2 | ARCH=$2 | 4 | ARCH=$2 |
3 | SMP=$3 | 5 | SMP=$3 |
@@ -50,7 +52,7 @@ UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS $TIMESTAMP" | |||
50 | # Truncate to maximum length | 52 | # Truncate to maximum length |
51 | 53 | ||
52 | UTS_LEN=64 | 54 | UTS_LEN=64 |
53 | UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/" | 55 | UTS_TRUNCATE="cut -b -$UTS_LEN" |
54 | 56 | ||
55 | # Generate a temporary compile.h | 57 | # Generate a temporary compile.h |
56 | 58 | ||
@@ -66,9 +68,13 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/" | |||
66 | echo \#define LINUX_COMPILE_HOST \"`hostname | $UTS_TRUNCATE`\" | 68 | echo \#define LINUX_COMPILE_HOST \"`hostname | $UTS_TRUNCATE`\" |
67 | 69 | ||
68 | if [ -x /bin/dnsdomainname ]; then | 70 | if [ -x /bin/dnsdomainname ]; then |
69 | echo \#define LINUX_COMPILE_DOMAIN \"`dnsdomainname | $UTS_TRUNCATE`\" | 71 | domain=`dnsdomainname 2> /dev/null` |
70 | elif [ -x /bin/domainname ]; then | 72 | elif [ -x /bin/domainname ]; then |
71 | echo \#define LINUX_COMPILE_DOMAIN \"`domainname | $UTS_TRUNCATE`\" | 73 | domain=`domainname 2> /dev/null` |
74 | fi | ||
75 | |||
76 | if [ -n "$domain" ]; then | ||
77 | echo \#define LINUX_COMPILE_DOMAIN \"`echo $domain | $UTS_TRUNCATE`\" | ||
72 | else | 78 | else |
73 | echo \#define LINUX_COMPILE_DOMAIN | 79 | echo \#define LINUX_COMPILE_DOMAIN |
74 | fi | 80 | fi |