aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile7
-rwxr-xr-xscripts/extract-ikconfig9
-rwxr-xr-xscripts/setlocalversion14
-rwxr-xr-xscripts/tags.sh9
4 files changed, 27 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 92b8bed3059e..9193f94ddf83 100644
--- a/Makefile
+++ b/Makefile
@@ -421,7 +421,7 @@ endif
421# of make so .config is not included in this case either (for *config). 421# of make so .config is not included in this case either (for *config).
422 422
423no-dot-config-targets := clean mrproper distclean \ 423no-dot-config-targets := clean mrproper distclean \
424 cscope TAGS tags help %docs check% coccicheck \ 424 cscope gtags TAGS tags help %docs check% coccicheck \
425 include/linux/version.h headers_% \ 425 include/linux/version.h headers_% \
426 kernelversion %src-pkg 426 kernelversion %src-pkg
427 427
@@ -1135,7 +1135,7 @@ CLEAN_FILES += vmlinux System.map \
1135MRPROPER_DIRS += include/config usr/include include/generated 1135MRPROPER_DIRS += include/config usr/include include/generated
1136MRPROPER_FILES += .config .config.old .version .old_version \ 1136MRPROPER_FILES += .config .config.old .version .old_version \
1137 include/linux/version.h \ 1137 include/linux/version.h \
1138 Module.symvers tags TAGS cscope* 1138 Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS
1139 1139
1140# clean - Delete most, but leave enough to build external modules 1140# clean - Delete most, but leave enough to build external modules
1141# 1141#
@@ -1222,6 +1222,7 @@ help:
1222 @echo ' modules_prepare - Set up for building external modules' 1222 @echo ' modules_prepare - Set up for building external modules'
1223 @echo ' tags/TAGS - Generate tags file for editors' 1223 @echo ' tags/TAGS - Generate tags file for editors'
1224 @echo ' cscope - Generate cscope index' 1224 @echo ' cscope - Generate cscope index'
1225 @echo ' gtags - Generate GNU GLOBAL index'
1225 @echo ' kernelrelease - Output the release version string' 1226 @echo ' kernelrelease - Output the release version string'
1226 @echo ' kernelversion - Output the version stored in Makefile' 1227 @echo ' kernelversion - Output the version stored in Makefile'
1227 @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \ 1228 @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \
@@ -1380,7 +1381,7 @@ clean: $(clean-dirs)
1380quiet_cmd_tags = GEN $@ 1381quiet_cmd_tags = GEN $@
1381 cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@ 1382 cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@
1382 1383
1383tags TAGS cscope: FORCE 1384tags TAGS cscope gtags: FORCE
1384 $(call cmd,tags) 1385 $(call cmd,tags)
1385 1386
1386# Scripts to check various things for consistency 1387# Scripts to check various things for consistency
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