]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* lib/am/tags.am (TAGS): Use --etags-include instead of --include,
authorAlexandre Duret-Lutz <adl@gnu.org>
Sun, 23 Mar 2003 20:37:20 +0000 (20:37 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Sun, 23 Mar 2003 20:37:20 +0000 (20:37 +0000)
when supported by etags (Exuberant Ctags).
* tests/tagsub.test: Rewrite to _run_ the `tags' rule.

ChangeLog
lib/am/tags.am
tests/tagsub.test

index 451746b440189e1d67f9f5b19bd747b5e4c093f4..5526aec2963b62996f8ec26accb938c449659442 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-03-23  Akim Demaille  <akim@epita.fr>
+           Alexandre Duret-Lutz  <adl@gnu.org>
+
+       * lib/am/tags.am (TAGS): Use --etags-include instead of --include,
+       when supported by etags (Exuberant Ctags).
+       * tests/tagsub.test: Rewrite to _run_ the `tags' rule.
+
 2003-03-20  Alexandre Duret-Lutz  <adl@gnu.org>
 
        For Debian Bug #185388:
index b34641d09dcbb967014cdcda97d6a7620db628a7..10d06644e3612ad8e6d4e8e1d3e338a46ed171ab 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003
 ## Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -50,10 +50,19 @@ TAGS: %TAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
        here=`pwd`; \
 ## It is tempting to use if/endif here, but don't: the previous
 ## backslash will cause bad results (automake doesn't `see' the `if').
+## Exuberant Ctags wants --etags-include,
+## GNU Etags             --include
+?SUBDIRS?      if (etags --etags-include --version) >/dev/null 2>&1; then \
+?SUBDIRS?        include_option=--etags-include; \
+?SUBDIRS?      else \
+?SUBDIRS?        include_option=--include; \
+?SUBDIRS?      fi; \
 ?SUBDIRS?      list='$(SUBDIRS)'; for subdir in $$list; do \
 ## Do nothing if we're trying to look in `.'.
 ?SUBDIRS?        if test "$$subdir" = .; then :; else \
-?SUBDIRS?          test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+?SUBDIRS?          test -f $$subdir/TAGS && \
+## Note that the = is mandatory for --etags-include.
+?SUBDIRS?            tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
 ?SUBDIRS?        fi; \
 ?SUBDIRS?      done; \
 ## Make sure the list of sources is unique.
index d5da79687bf0fdf067d69bfef27cccac174f35ce..cfb9b9ee5828d01e6dcb17c623cdac90ecdb6377 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1997, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003
+#   Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
 # Boston, MA 02111-1307, USA.
 
 # Test to make sure tags and subdirs work correctly.  Bug report by
-# François Pinard.
+# François Pinard, and later by Akim Demaille.
 
+required=etags
 . ./defs || exit 1
 
-cat > Makefile.am << 'END'
-SUBDIRS = sub
-END
-
-mkdir sub
+set -e
 
-cat > sub/Makefile.am << 'END'
-noinst_HEADERS = iguana.h
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
 END
 
+echo 'SUBDIRS = sub' > Makefile.am
+mkdir sub
+echo 'noinst_HEADERS = iguana.h' > sub/Makefile.am
 : > sub/iguana.h
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile sub/Makefile)
-END
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
 
-$ACLOCAL || exit 1
-$AUTOMAKE || exit 1
+./configure
+$MAKE tags
+test -f sub/TAGS
+test -f TAGS
+$FGREP sub/TAGS TAGS
+$FGREP iguana.h sub/TAGS
 
-grep '^TAGS:.*tags-recursive' Makefile.in
+$MAKE distclean
+test ! -f sub/TAGS
+test ! -f TAGS