1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

makefiles: reuse CSCOPE_DIRS for ctags

Create ctags only from real source files.
This commit is contained in:
Zdenek Kabelac 2021-04-09 15:27:12 +02:00
parent ebf33323b9
commit 2e84dd47d4

View File

@ -76,8 +76,8 @@ daemons.cflow: tools.cflow
cflow: include.cflow cflow: include.cflow
endif endif
CSCOPE_DIRS = base daemons device_mapper include lib libdaemon scripts tools libdm test
ifneq ("@CSCOPE_CMD@", "") ifneq ("@CSCOPE_CMD@", "")
CSCOPE_DIRS = base daemons device_mapper include lib libdaemon scripts tools
cscope.out: cscope.out:
@CSCOPE_CMD@ -b -R $(patsubst %,-s%,$(addprefix $(srcdir)/,$(CSCOPE_DIRS))) @CSCOPE_CMD@ -b -R $(patsubst %,-s%,$(addprefix $(srcdir)/,$(CSCOPE_DIRS)))
all: cscope.out all: cscope.out
@ -204,8 +204,8 @@ endif
ifneq ($(shell which ctags 2>/dev/null),) ifneq ($(shell which ctags 2>/dev/null),)
.PHONY: tags .PHONY: tags
tags: tags:
test -z "$(shell find $(top_srcdir) -type f -name '*.[ch]' -newer tags 2>/dev/null | head -1)" || $(RM) tags test -z "$(shell find $(addprefix $(top_srcdir)/,$(CSCOPE_DIRS)) -type f -name '*.[ch]' -newer tags 2>/dev/null | head -1)" || $(RM) tags
test -f tags || find $(top_srcdir) -maxdepth 5 -type f -name '*.[ch]' -exec ctags -a '{}' + test -f tags || find $(addprefix $(top_srcdir)/,$(CSCOPE_DIRS)) -maxdepth 5 -type f -name '*.[ch]' -exec ctags -a '{}' +
CLEAN_TARGETS += tags CLEAN_TARGETS += tags
endif endif