2004-04-24 Alexandre Duret-Lutz <adl@gnu.org>
+ * lib/am/tags.am (TAGS): Pass `.' to Exuberant Ctags if
+ --etags-include is used but no other files are supplied, so it
+ creates the TAGS file anyway.
+ Report from Akim Demaille.
+
* lib/depcomp (tru64) [libtool]: Nicolas Joly reported on
2002-06-12 that dependencies were output in $dir.libs/$base.lo.d.
Teun Burgers reported on 2004-03-30 they were in
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003
+## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
## Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## 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 \
+## Furthermore Exuberant Ctags 5.5.4 fails to create TAGS files
+## when no files are supplied, despite any --etags-include option.
+## A workaround is to pass `.' as a file. This is what $empty_fix is for.
+?SUBDIRS? if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
?SUBDIRS? include_option=--etags-include; \
+?SUBDIRS? empty_fix=.; \
?SUBDIRS? else \
?SUBDIRS? include_option=--include; \
+?SUBDIRS? empty_fix=; \
?SUBDIRS? fi; \
?SUBDIRS? list='$(SUBDIRS)'; for subdir in $$list; do \
## Do nothing if we're trying to look in `.'.
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
## Make sure we have something to run etags on.
- test -z "$(ETAGS_ARGS)$$tags$$unique" \
- || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -z "$$unique" && unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
## ------------- ##