kbuild: escape meta characters in regular expression in make TAGS
PATCH 1/1 kbuild: escape meta characters in regular expression in make TAGS
Hi,
Alexey Dobriyan <[email protected]> introduced a code adds menuconfig SOMETHING in Kconfig to tags output when you did "make tags".
"make tags" may work fine with his code. However make TAGS doesn't work well because etags command requires backslashes to escape meta characters like (', )' and `|'.
Here is a patch.
Makefile +1 -1
@@ -1431,7 +1431,7 @@ define xtags elif $1 --version 2>&1 | grep -iq emacs; then \ $(all-sources) | xargs $1 -a; \ $(all-kconfigs) | xargs $1 -a \ - --regex='/^[ \t]*(menu|)config[ \t]+\([a-zA-Z0-9_]+\)/\2/'; \ + --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/'; \ $(all-defconfigs) | xargs -r $1 -a \ --regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'; \ else \
Quoted 8 lines · Masatake YAMATO
Hi,
Alexey Dobriyan <[email protected]> introduced a code adds menuconfig SOMETHING in
Kconfigto tags output when you did "make tags".
Quoted 7 lines
"make tags" may work fine with his code. However make TAGS doesn't work well because etags command requires backslashes to escape meta characters like
(',)' and `|'.Here is a patch.
Signed-off-by Masatake YAMATO <[email protected]>
Thanks Masatake.
Applied and pushed out to kbuild-fixes.
Sam