[PATCH] Makefile.am: Add cscope target

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux