when supported by etags (Exuberant Ctags).
* tests/tagsub.test: Rewrite to _run_ the `tags' rule.
+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:
## 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
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.
#! /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