* + scripts-support-compiled-source-improved-precise.patch added to -mm tree
@ 2020-05-05 20:22 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2020-05-05 20:22 UTC (permalink / raw)
To: corbet, gregkh, masahiroy, mchehab+huawei, mm-commits, xujialu
The patch titled
Subject: scripts/tags.sh: support compiled source, improved precise
has been added to the -mm tree. Its filename is
scripts-support-compiled-source-improved-precise.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/scripts-support-compiled-source-improved-precise.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/scripts-support-compiled-source-improved-precise.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: xujialu <xujialu@vimux.org>
Subject: scripts/tags.sh: support compiled source, improved precise
Original 'COMPILED_SOURCE=1 make cscope' collects nearly 30000 files
include too many unused files, this patch precisely collects source
files from *.cmd, in this case just 3000 files include dts and dtsi.
Usage:
1) COMPILED_SOURCE=1 make {cscope,gtags}
2) COMPILED_SOURCE=1 KBUILD_ABS_SRCTREE=1 make {cscope,gtags}
3) COMPILED_SOURCE=1 ./scripts/tags.sh {cscope,gtags}
4) COMPILED_SOURCE=1 ABSPWD=$PWD/ ./scripts/tags.sh {cscope,gtags}
Link: http://lkml.kernel.org/r/20200502052619.26457-2-xujialu@vimux.org
Signed-off-by: xujialu <xujialu@vimux.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
scripts/tags.sh | 36 ++++++++++++++++++++++--------------
1 file changed, 22 insertions(+), 14 deletions(-)
--- a/scripts/tags.sh~scripts-support-compiled-source-improved-precise
+++ a/scripts/tags.sh
@@ -89,22 +89,30 @@ all_sources()
find_other_sources '*.[chS]'
}
+# COMPILED_SOURCE=1 make {cscope,gtags}
+# COMPILED_SOURCE=1 KBUILD_ABS_SRCTREE=1 make {cscope,gtags}
+# COMPILED_SOURCE=1 ./scripts/tags.sh {cscope,gtags}
+# COMPILED_SOURCE=1 ABSPWD=$PWD/ ./scripts/tags.sh {cscope,gtags}
+xtags_juggle_list()
+{
+ SRCTREE=$(realpath ${tree}.)
+
+ cd $(dirname $(find -name .config -print -quit).)
+
+ realpath -e --relative-to=${SRCTREE} $(find -name "*.cmd" -exec \
+ grep -Poh '(?(?=^source_.* \K).*|(?=^ \K\S).*(?= \\))' {} \+ |
+ awk '!a[$0]++') include/generated/autoconf.h |
+ sed -e "/\.\./d" -e "s,^,${ABSPWD}${tree},"
+}
+
all_compiled_sources()
{
- for i in $(all_sources); do
- case "$i" in
- *.[cS])
- j=${i/\.[cS]/\.o}
- j="${j#$tree}"
- if [ -e $j ]; then
- echo $i
- fi
- ;;
- *)
- echo $i
- ;;
- esac
- done
+ # Consider 'git ls-files' features:
+ # 1) sort and uniq target files
+ # 2) limit target files by index
+ # git ls-files $(xtags_juggle_list)
+
+ xtags_juggle_list | sort -u
}
all_target_sources()
_
Patches currently in -mm which might be from xujialu@vimux.org are
scripts-support-compiled-source-improved-precise.patch
scripts-add-a-intermediate-file-for-make-gtags.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-05-05 20:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-05 20:22 + scripts-support-compiled-source-improved-precise.patch added to -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).