"make cscope" will always clean cscope files before generating the index. Signed-off-by: Murilo Opsfelder Araujo <muriloo at linux.vnet.ibm.com> --- Makefile.am | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Makefile.am b/Makefile.am index ef7a906..68f167d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -52,6 +52,7 @@ pkgconfig_DATA = openconnect.pc EXTRA_DIST = version.sh COPYING.LGPL $(lib_srcs_openssl) $(lib_srcs_gnutls) +CLEANFILES = cscope.files cscope.out DISTCLEANFILES = $(pkgconfig_DATA) main.o: version.c @@ -152,3 +153,16 @@ po/$(PACKAGE).pot: $(POTFILES) Makefile --package-name="@PACKAGE@" --package-version="@VERSION@" \ --msgid-bugs-address=openconnect-devel at lists.infradead.org \ -o $@ $(POTFILES) + +cscope: cscope-clean cscope.out + +cscope.out: cscope.files + @echo "Generating cscope index" ; \ + cscope -b -f cscope.out + +cscope.files: + @find -type f -iname '*.[ch]' -fprintf cscope.files "%p " + +cscope-clean: + @echo "Cleaning cscope" ; \ + rm -f cscope.* -- 1.8.4.474.g128a96c