[patch 1/8] [etags.diff] fixup tags dependencies
c.shoemaker at cox.net
c.shoemaker at cox.net
Sat Oct 15 00:18:28 EDT 2005
* Makefile.TAGS | 11 +++++------
* Makefile.am | 4 ++--
- exclude CVS and hidden directories and files from consideration
by [ec]tags
- allow 'make' to consider age of tags file when determining
whether or not to rerun [ec]tags.
- fix perpetual remake trigger by excluding toplevel directory
dependency from etags.files rule which touches said directory.
Makefile.TAGS | 24 ++++++++----------------
Makefile.am | 4 ++--
2 files changed, 10 insertions(+), 18 deletions(-)
Index: gnucash/Makefile.TAGS
===================================================================
--- gnucash.orig/Makefile.TAGS
+++ gnucash/Makefile.TAGS
@@ -7,25 +7,17 @@
# i.e. TAGS: etags.files $(shell cat etags.files) doesn't work right
# because etags.files contents are expanded before it's re-generated.
-# The $(shell find . -type d) dependency seems to be pointless -- it
-# always fires. It appears that someone's always touching something.
-etags.files: $(shell find . -type d)
- find . -path './debian' -prune -o -path './.pc' -prune -o \
- -path '*.#*' -prune -o -name '*.[ch]' -print -o \
- -name '*.scm' -print | sort > etags.files.tmp
- @if cmp --quiet etags.files etags.files.tmp; \
- then \
- echo "TAGS file list hasn't changed."; \
- rm -f etags.files.tmp; \
- else \
- echo "TAGS file list has changed."; \
- mv etags.files.tmp etags.files; \
- fi
+etags.files: $(shell find . -mindepth 1 -type d ! -name CVS ! -path "*/.*")
+ find . -path '*/.*' -prune -o \( -name '*.[ch]' -o -name '*.scm' \) \
+ -print | sort > etags.files.tmp
+ cmp -s etags.files etags.files.tmp || cp etags.files.tmp etags.files
+ rm -f etags.files.tmp
+ touch etags.files
# 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.
-etags: $(shell cat etags.files)
+TAGS: $(shell cat etags.files)
etags `cat etags.files`
-ctags: $(shell cat etags.files)
+tags: $(shell cat etags.files)
ctags `cat etags.files`
Index: gnucash/Makefile.am
===================================================================
--- gnucash.orig/Makefile.am
+++ gnucash/Makefile.am
@@ -97,7 +97,7 @@ 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
+ ${MAKE} -f Makefile.TAGS TAGS
else
@@ -112,7 +112,7 @@ 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 ctags
+ ${MAKE} -f Makefile.TAGS tags
else
--
More information about the gnucash-patches
mailing list