From 38b3439d84f4a310bd29e3dbc21dffe9119ef157 Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Wed, 12 Jan 2011 00:53:52 -0500 Subject: setlocalversion: update mercurial tag parsing The tag output of hg doesn't quite match what setlocalversion currently expects, so update it to handle the latest format. Signed-off-by: Mike Crowe Signed-off-by: Mike Frysinger Signed-off-by: Michal Marek diff --git a/scripts/setlocalversion b/scripts/setlocalversion index ef8729f..4d40384 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -86,12 +86,16 @@ scm_version() # Check for mercurial and a mercurial repo. if test -d .hg && hgid=`hg id 2>/dev/null`; then - tag=`printf '%s' "$hgid" | cut -s -d' ' -f2` - - # Do we have an untagged version? - if [ -z "$tag" -o "$tag" = tip ]; then - id=`printf '%s' "$hgid" | sed 's/[+ ].*//'` + # Do we have an tagged version? If so, latesttagdistance == 1 + if [ "`hg log -r . --template '{latesttagdistance}'`" == "1" ]; then + id=`hg log -r . --template '{latesttag}'` printf '%s%s' -hg "$id" + else + tag=`printf '%s' "$hgid" | cut -d' ' -f2` + if [ -z "$tag" -o "$tag" = tip ]; then + id=`printf '%s' "$hgid" | sed 's/[+ ].*//'` + printf '%s%s' -hg "$id" + fi fi # Are there uncommitted changes? -- cgit v0.10.2 From f4ed1009fcea8502d1191ef3e435e9d83c286b80 Mon Sep 17 00:00:00 2001 From: Jianbin Kang Date: Fri, 14 Jan 2011 20:07:05 +0800 Subject: kbuild: add GNU GLOBAL tags generation GNU GLOBAL (http://www.gnu.org/software/global/) is a source code tagging system It is really cheap to support it in kbuild system. Signed-off-by: Jianbin Kang Signed-off-by: Michal Marek diff --git a/Makefile b/Makefile index 6619720..d4a9d5b 100644 --- a/Makefile +++ b/Makefile @@ -420,7 +420,7 @@ endif # of make so .config is not included in this case either (for *config). no-dot-config-targets := clean mrproper distclean \ - cscope TAGS tags help %docs check% coccicheck \ + cscope gtags TAGS tags help %docs check% coccicheck \ include/linux/version.h headers_% \ kernelversion %src-pkg @@ -1134,7 +1134,7 @@ CLEAN_FILES += vmlinux System.map \ MRPROPER_DIRS += include/config usr/include include/generated MRPROPER_FILES += .config .config.old .version .old_version \ include/linux/version.h \ - Module.symvers tags TAGS cscope* + Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS # clean - Delete most, but leave enough to build external modules # @@ -1221,6 +1221,7 @@ help: @echo ' modules_prepare - Set up for building external modules' @echo ' tags/TAGS - Generate tags file for editors' @echo ' cscope - Generate cscope index' + @echo ' gtags - Generate GNU GLOBAL index' @echo ' kernelrelease - Output the release version string' @echo ' kernelversion - Output the version stored in Makefile' @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \ @@ -1379,7 +1380,7 @@ clean: $(clean-dirs) quiet_cmd_tags = GEN $@ cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@ -tags TAGS cscope: FORCE +tags TAGS cscope gtags: FORCE $(call cmd,tags) # Scripts to check various things for consistency diff --git a/scripts/tags.sh b/scripts/tags.sh index e091db3..5d17c71 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -114,6 +114,11 @@ docscope() cscope -b -f cscope.out } +dogtags() +{ + all_sources | gtags -f - +} + exuberant() { all_sources | xargs $1 -a \ @@ -185,6 +190,10 @@ case "$1" in docscope ;; + "gtags") + dogtags + ;; + "tags") rm -f tags xtags ctags -- cgit v0.10.2 From ab94e4666d5cee0e393367671eeab4111105bffb Mon Sep 17 00:00:00 2001 From: Dick Streefland Date: Mon, 24 Jan 2011 00:44:57 +0100 Subject: scripts/extract-ikconfig: add xz compression support Add support for kernels compressed with xz to the extract-ikconfig script. Signed-off-by: Dick Streefland Acked-by: WANG Cong Signed-off-by: Michal Marek diff --git a/scripts/extract-ikconfig b/scripts/extract-ikconfig index 1512c0a..e186242 100755 --- a/scripts/extract-ikconfig +++ b/scripts/extract-ikconfig @@ -56,10 +56,11 @@ trap "rm -f $tmp1 $tmp2" 0 dump_config "$img" # That didn't work, so retry after decompression. -try_decompress '\037\213\010' xy gunzip -try_decompress 'BZh' xy bunzip2 -try_decompress '\135\0\0\0' xxx unlzma -try_decompress '\211\114\132' xy 'lzop -d' +try_decompress '\037\213\010' xy gunzip +try_decompress '\3757zXZ\000' abcde unxz +try_decompress 'BZh' xy bunzip2 +try_decompress '\135\0\0\0' xxx unlzma +try_decompress '\211\114\132' xy 'lzop -d' # Bail out: echo "$me: Cannot find kernel config." >&2 -- cgit v0.10.2