diff --git a/.cvsignore b/.cvsignore index 1f052ced6bd..1a02c17f9ad 100644 --- a/.cvsignore +++ b/.cvsignore @@ -39,6 +39,7 @@ intltool-merge intltool-merge.in intltool-update intltool-update.in +tags *.tar.gz *.log *.patch diff --git a/ChangeLog b/ChangeLog index a51a8942083..2dd8c0a69ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,20 @@ -2002-11-29 David Hampton +2002-11-30 Matthew Vanecek + + * Makefile.am: Added the GNC_CTAGS_FILE token, and added the + ctags target. Changed the TAGS target to etags, and + GNC_TAGS_FILE to GNC_ETAGS_FILE. Removed GNC_TAGS_FILE from the + noinst_DATA variable. This makes tag building a manual target. + Run "make ctags" for Vi tags, or "make etags" for Emacs TAGS. + + * Makefile.TAGS: Changed the TAGS target to etags, and added + the ctags target. + + * configure.in: Added the --enable-ctags option. + + * .cvsignore: Added tags to .cvsignore. tags is the file created + by ctags. + +02-11-29 David Hampton * src/report/standard-reports/transaction.scm: Fix the grand totals in the transaction report when there is more than one type diff --git a/Makefile.TAGS b/Makefile.TAGS index 89257b5bd2e..26b15aab7b1 100644 --- a/Makefile.TAGS +++ b/Makefile.TAGS @@ -22,5 +22,8 @@ etags.files: $(shell find . -type d) # we don't need an etags.files dep here b/c you always call this after # re-generating etags.files if needed from the top-level Makefile.am. -TAGS: $(shell cat etags.files) +etags: $(shell cat etags.files) etags `cat etags.files` + +ctags: $(shell cat etags.files) + ctags `cat etags.files` diff --git a/Makefile.am b/Makefile.am index e15e6087143..d1b9053babc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,7 +3,10 @@ SUBDIRS = intl m4 macros debian doc-tools doc lib src intl-scm po rpm accounts docdir = ${GNC_DOC_INSTALL_DIR} -noinst_DATA = make-gnucash-patch make-gnucash-potfiles @GNC_TAGS_FILE@ +GNC_CTAGS_FILE = @GNC_CTAGS_FILE@ +GNC_ETAGS_FILE = @GNC_ETAGS_FILE@ + +noinst_DATA = make-gnucash-patch make-gnucash-potfiles doc_DATA = \ AUTHORS \ @@ -84,22 +87,37 @@ cscope.files: cscope.out: cscope.files cscope -b -if GNC_TAGS_FILE +if GNC_ETAGS_FILE + +etags: + # make sure etags.files is up to date. + ${MAKE} -f Makefile.TAGS etags.files + # now use the contents of etags.files to re-make TAGS if needed. + ${MAKE} -f Makefile.TAGS etags + +else + +etags: + @echo "You must ./configure with --enable-etags to use ctags." + +endif + +if GNC_CTAGS_FILE -TAGS: +ctags: # make sure etags.files is up to date. ${MAKE} -f Makefile.TAGS etags.files # now use the contents of etags.files to re-make TAGS if needed. - ${MAKE} -f Makefile.TAGS TAGS + ${MAKE} -f Makefile.TAGS ctags else -TAGS: - @echo "You must ./configure with --enable-etags to use TAGS." +ctags: + @echo "You must ./configure with --enable-ctags to use ctags." endif -.PHONY: TAGS +.PHONY: etags ctags ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.in b/configure.in index a85c044fe56..52ed82489f4 100644 --- a/configure.in +++ b/configure.in @@ -544,10 +544,26 @@ AC_ARG_ENABLE( etags, USE_ETAGS=0) if test ${USE_ETAGS} = 1; then - AC_CHECK_PROG(GNC_TAGS_FILE, etags, TAGS) + AC_CHECK_PROG(GNC_ETAGS_FILE, etags, TAGS) fi -AM_CONDITIONAL(GNC_TAGS_FILE, test x${GNC_TAGS_FILE} = xTAGS) +AM_CONDITIONAL(GNC_ETAGS_FILE, test x${GNC_ETAGS_FILE} = xTAGS) + +### -------------------------------------------------------------------------- +### Check for ctags + +AC_ARG_ENABLE( ctags, + [ --enable-ctags enable automatic create of tags file], + if test $enableval = yes; then + USE_CTAGS=1 + fi, + USE_CTAGS=0) + +if test ${USE_CTAGS} = 1; then + AC_CHECK_PROG(GNC_CTAGS_FILE, ctags, tags) +fi + +AM_CONDITIONAL(GNC_CTAGS_FILE, test x${GNC_CTAGS_FILE} = xtags) ### -------------------------------------------------------------------------- ### Check for perl @@ -1138,4 +1154,4 @@ AC_OUTPUT( m4/Makefile intl/Makefile gnucash-config , dnl # commands go here, but we don't have any right now - ) \ No newline at end of file + )