Skip to content

Commit b87a2d3

Browse files
committed
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
2 parents 53a94c7 + ab94e46 commit b87a2d3

4 files changed

Lines changed: 27 additions & 12 deletions

File tree

‎Makefile‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ endif
421421
# of make so .config is not included in this case either (for *config).
422422

423423
no-dot-config-targets := clean mrproper distclean \
424-
cscope TAGS tags help %docs check% coccicheck \
424+
cscope gtags TAGS tags help %docs check% coccicheck \
425425
include/linux/version.h headers_% \
426426
kernelversion %src-pkg
427427

@@ -1135,7 +1135,7 @@ CLEAN_FILES += vmlinux System.map \
11351135
MRPROPER_DIRS += include/config usr/include include/generated
11361136
MRPROPER_FILES += .config .config.old .version .old_version \
11371137
include/linux/version.h \
1138-
Module.symvers tags TAGS cscope*
1138+
Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS
11391139

11401140
# clean - Delete most, but leave enough to build external modules
11411141
#
@@ -1222,6 +1222,7 @@ help:
12221222
@echo ' modules_prepare - Set up for building external modules'
12231223
@echo ' tags/TAGS - Generate tags file for editors'
12241224
@echo ' cscope - Generate cscope index'
1225+
@echo ' gtags - Generate GNU GLOBAL index'
12251226
@echo ' kernelrelease - Output the release version string'
12261227
@echo ' kernelversion - Output the version stored in Makefile'
12271228
@echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \
@@ -1380,7 +1381,7 @@ clean: $(clean-dirs)
13801381
quiet_cmd_tags = GEN $@
13811382
cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@
13821383

1383-
tags TAGS cscope: FORCE
1384+
tags TAGS cscope gtags: FORCE
13841385
$(call cmd,tags)
13851386

13861387
# Scripts to check various things for consistency

‎scripts/extract-ikconfig‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,11 @@ trap "rm -f $tmp1 $tmp2" 0
5656
dump_config "$img"
5757

5858
# That didn't work, so retry after decompression.
59-
try_decompress '\037\213\010' xy gunzip
60-
try_decompress 'BZh' xy bunzip2
61-
try_decompress '\135\0\0\0' xxx unlzma
62-
try_decompress '\211\114\132' xy 'lzop -d'
59+
try_decompress '\037\213\010' xy gunzip
60+
try_decompress '\3757zXZ\000' abcde unxz
61+
try_decompress 'BZh' xy bunzip2
62+
try_decompress '\135\0\0\0' xxx unlzma
63+
try_decompress '\211\114\132' xy 'lzop -d'
6364

6465
# Bail out:
6566
echo "$me: Cannot find kernel config." >&2

‎scripts/setlocalversion‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,16 @@ scm_version()
8686

8787
# Check for mercurial and a mercurial repo.
8888
if test -d .hg && hgid=`hg id 2>/dev/null`; then
89-
tag=`printf '%s' "$hgid" | cut -s -d' ' -f2`
90-
91-
# Do we have an untagged version?
92-
if [ -z "$tag" -o "$tag" = tip ]; then
93-
id=`printf '%s' "$hgid" | sed 's/[+ ].*//'`
89+
# Do we have an tagged version? If so, latesttagdistance == 1
90+
if [ "`hg log -r . --template '{latesttagdistance}'`" == "1" ]; then
91+
id=`hg log -r . --template '{latesttag}'`
9492
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
9599
fi
96100

97101
# Are there uncommitted changes?

‎scripts/tags.sh‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ docscope()
114114
cscope -b -f cscope.out
115115
}
116116

117+
dogtags()
118+
{
119+
all_sources | gtags -f -
120+
}
121+
117122
exuberant()
118123
{
119124
all_sources | xargs $1 -a \
@@ -187,6 +192,10 @@ case "$1" in
187192
docscope
188193
;;
189194

195+
"gtags")
196+
dogtags
197+
;;
198+
190199
"tags")
191200
rm -f tags
192201
xtags ctags

0 commit comments

Comments
 (0)