diff options
-rw-r--r-- | Makefile | 7 | ||||
-rwxr-xr-x | scripts/extract-ikconfig | 9 | ||||
-rwxr-xr-x | scripts/setlocalversion | 14 | ||||
-rwxr-xr-x | scripts/tags.sh | 9 |
4 files changed, 27 insertions, 12 deletions
@@ -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 | ||
423 | no-dot-config-targets := clean mrproper distclean \ | 423 | no-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 \ | |||
1135 | MRPROPER_DIRS += include/config usr/include include/generated | 1135 | MRPROPER_DIRS += include/config usr/include include/generated |
1136 | MRPROPER_FILES += .config .config.old .version .old_version \ | 1136 | MRPROPER_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) | |||
1380 | quiet_cmd_tags = GEN $@ | 1381 | quiet_cmd_tags = GEN $@ |
1381 | cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@ | 1382 | cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@ |
1382 | 1383 | ||
1383 | tags TAGS cscope: FORCE | 1384 | tags 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 | |||
56 | dump_config "$img" | 56 | dump_config "$img" |
57 | 57 | ||
58 | # That didn't work, so retry after decompression. | 58 | # That didn't work, so retry after decompression. |
59 | try_decompress '\037\213\010' xy gunzip | 59 | try_decompress '\037\213\010' xy gunzip |
60 | try_decompress 'BZh' xy bunzip2 | 60 | try_decompress '\3757zXZ\000' abcde unxz |
61 | try_decompress '\135\0\0\0' xxx unlzma | 61 | try_decompress 'BZh' xy bunzip2 |
62 | try_decompress '\211\114\132' xy 'lzop -d' | 62 | try_decompress '\135\0\0\0' xxx unlzma |
63 | try_decompress '\211\114\132' xy 'lzop -d' | ||
63 | 64 | ||
64 | # Bail out: | 65 | # Bail out: |
65 | echo "$me: Cannot find kernel config." >&2 | 66 | echo "$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 | ||
117 | dogtags() | ||
118 | { | ||
119 | all_sources | gtags -f - | ||
120 | } | ||
121 | |||
117 | exuberant() | 122 | exuberant() |
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 |