diff -Naurp -X /home/jbarnes/dontdiff automake-1.8.5.orig/doc/automake.texi automake-1.8.5/doc/automake.texi --- automake-1.8.5.orig/doc/automake.texi 2004-05-13 16:41:35.000000000 -0400 +++ automake-1.8.5/doc/automake.texi 2004-07-14 17:53:22.289314464 -0400 @@ -228,7 +228,7 @@ Building documentation Miscellaneous Rules -* Tags:: Interfacing to etags and mkid +* Tags:: Interfacing to etags, mkid and cscope * Suffixes:: Handling new file extensions * Multilibs:: Support for multilibs. @@ -5903,7 +5903,7 @@ the @code{AM_INIT_AUTOMAKE} macro in @fi There are a few rules and variables that didn't fit anywhere else. @menu -* Tags:: Interfacing to etags and mkid +* Tags:: Interfacing to etags, mkid, and cscope * Suffixes:: Handling new file extensions * Multilibs:: Support for multilibs. @end menu @@ -5964,6 +5964,11 @@ GNU Global Tags program}. The @code{GTA automatically and puts the result in the top build directory. The variable @code{GTAGS_ARGS} holds arguments which are passed to @code{gtags}. + +Automake also supports @uref{http://cscope.sourceforge.net/,cscope}. +The @code{cscope} rule runs cscope on the list of available source +files. Use @code{CSCOPE_ARGS} to pass additional flags to the address@hidden program. @vindex GTAGS_ARGS diff -Naurp -X /home/jbarnes/dontdiff automake-1.8.5.orig/lib/am/tags.am automake-1.8.5/lib/am/tags.am --- automake-1.8.5.orig/lib/am/tags.am 2004-05-13 16:41:23.000000000 -0400 +++ automake-1.8.5/lib/am/tags.am 2004-07-14 17:50:41.768717304 -0400 @@ -123,6 +123,27 @@ GTAGS: && gtags -i $(GTAGS_ARGS) $$here +## ------- ## +## cscope ## +## ------- ## +.PHONY: cscopedir +cscopedir: + list='$(SOURCES)'; for source in $$list; do \ + echo $(reldir)/$$source >> $(top_builddir)/cscope.files ; \ + done +if %?SUBDIRS% + list='$(SUBDIRS)'; for subdir in $$list; do \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) reldir=$$subdir cscopedir) \ + || exit 1; \ + done +endif %?SUBDIRS% + +.PHONY: cscope +cscope: cscopedir + cd $(top_builddir) && cscope -b -R -q -i cscope.files $(CSCOPE_ARGS) + + ## ---------- ## ## Cleaning. ## ## ---------- ## @@ -130,4 +151,5 @@ GTAGS: .PHONY distclean-am: distclean-tags distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags cscope.out cscope.in.out \ + cscope.po.out cscope.files