aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-20 21:13:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-20 21:13:09 -0400
commitb87a2d3e3147bd140da2eae584772c353d11421b (patch)
treeb07334f4a0b6bef83be8f061e76694c267d5fa34 /scripts
parent53a94c7d55dceb73aab2876afce4c563bc9111fe (diff)
parentab94e4666d5cee0e393367671eeab4111105bffb (diff)
Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: scripts/extract-ikconfig: add xz compression support kbuild: add GNU GLOBAL tags generation setlocalversion: update mercurial tag parsing
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/extract-ikconfig9
-rwxr-xr-xscripts/setlocalversion14
-rwxr-xr-xscripts/tags.sh9
3 files changed, 23 insertions, 9 deletions
diff --git a/scripts/extract-ikconfig b/scripts/extract-ikconfig
index 1512c0a755ac..e1862429ccda 100755
--- a/scripts/extract-ikconfig
+++ b/scripts/extract-ikconfig
@@ -56,10 +56,11 @@ trap "rm -f $tmp1 $tmp2" 0
56dump_config "$img" 56dump_config "$img"
57 57
58# That didn't work, so retry after decompression. 58# That didn't work, so retry after decompression.
59try_decompress '\037\213\010' xy gunzip 59try_decompress '\037\213\010' xy gunzip
60try_decompress 'BZh' xy bunzip2 60try_decompress '\3757zXZ\000' abcde unxz
61try_decompress '\135\0\0\0' xxx unlzma 61try_decompress 'BZh' xy bunzip2
62try_decompress '\211\114\132' xy 'lzop -d' 62try_decompress '\135\0\0\0' xxx unlzma
63try_decompress '\211\114\132' xy 'lzop -d'
63 64
64# Bail out: 65# Bail out:
65echo "$me: Cannot find kernel config." >&2 66echo "$me: Cannot find kernel config." >&2
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index ef8729f48586..4d403844e137 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -86,12 +86,16 @@ scm_version()
86 86
87 # Check for mercurial and a mercurial repo. 87 # Check for mercurial and a mercurial repo.
88 if test -d .hg && hgid=`hg id 2>/dev/null`; then 88 if test -d .hg && hgid=`hg id 2>/dev/null`; then
89 tag=`printf '%s' "$hgid" | cut -s -d' ' -f2` 89 # Do we have an tagged version? If so, latesttagdistance == 1
90 90 if [ "`hg log -r . --template '{latesttagdistance}'`" == "1" ]; then
91 # Do we have an untagged version? 91 id=`hg log -r . --template '{latesttag}'`
92 if [ -z "$tag" -o "$tag" = tip ]; then
93 id=`printf '%s' "$hgid" | sed 's/[+ ].*//'`
94 printf '%s%s' -hg "$id" 92 printf '%s%s' -hg "$id"
93 else
94 tag=`printf '%s' "$hgid" | cut -d' ' -f2`
95 if [ -z "$tag" -o "$tag" = tip ]; then
96 id=`printf '%s' "$hgid" | sed 's/[+ ].*//'`
97 printf '%s%s' -hg "$id"
98 fi
95 fi 99 fi
96 100
97 # Are there uncommitted changes? 101 # Are there uncommitted changes?
diff --git a/scripts/tags.sh b/scripts/tags.sh
index 92fdc4546141..bd6185d529cf 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -114,6 +114,11 @@ docscope()
114 cscope -b -f cscope.out 114 cscope -b -f cscope.out
115} 115}
116 116
117dogtags()
118{
119 all_sources | gtags -f -
120}
121
117exuberant() 122exuberant()
118{ 123{
119 all_sources | xargs $1 -a \ 124 all_sources | xargs $1 -a \
@@ -187,6 +192,10 @@ case "$1" in
187 docscope 192 docscope
188 ;; 193 ;;
189 194
195 "gtags")
196 dogtags
197 ;;
198
190 "tags") 199 "tags")
191 rm -f tags 200 rm -f tags
192 xtags ctags 201 xtags ctags