On Thu, 19 Oct 2023, Mathias Krause wrote: > Commit 974241c78a6f ("rt-tests: Makefile: ctags: Change obsolete extra > to extras") is Universal Ctags specific and broke Exuberant Ctags. > > Restore support for Exuberant Ctags by automatically detecting which > variant to use. > > Signed-off-by: Mathias Krause <minipli@xxxxxxxxxxxxxx> > --- > Makefile | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index 223a839151ec..8d3268d19901 100644 > --- a/Makefile > +++ b/Makefile > @@ -251,6 +251,11 @@ help: > @echo " tarball : make a rt-tests tarball suitable for release" > @echo " help : print this message" > > +# Universal Ctags warns about the backward compatible option '--extra' and > +# wants it to be called '--extras'. > +CTAGS_BIN = ctags > +CTAGS_EXTRA := $(shell $(CTAGS_BIN) --version 2>&1 | grep -iq universal && echo extras || echo extra) > + > .PHONY: tags > tags: > - ctags -R --extras=+f --c-kinds=+p --exclude=tmp --exclude=BUILD * > + $(CTAGS_BIN) -R --$(CTAGS_EXTRA)=+f --c-kinds=+p --exclude=tmp --exclude=BUILD * > -- Signed-off-by: John Kacur <jkacur@xxxxxxxxxx>