# Handle TAGS.
sub handle_tags
{
+ my @config;
+ foreach my $spec (@config_headers)
+ {
+ my ($out, @ins) = split_config_file_spec ($spec);
+ foreach my $in (@ins)
+ {
+ # If the config header source is in this directory,
+ # require it.
+ push @config, basename ($in)
+ if $relative_dir eq dirname ($in);
+ }
+ }
+
+ define_variable ('am__tagged_files',
+ '$(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)'
+ . "@config", INTERNAL);
+
my @tag_deps = ();
my @ctag_deps = ();
my @cscope_deps = ();
|| var ('ETAGS_ARGS')
|| @tag_deps)
{
- my @config;
- foreach my $spec (@config_headers)
- {
- my ($out, @ins) = split_config_file_spec ($spec);
- foreach my $in (@ins)
- {
- # If the config header source is in this directory,
- # require it.
- push @config, basename ($in)
- if $relative_dir eq dirname ($in);
- }
- }
$output_rules .= &file_contents ('tags',
new Automake::Location,
- CONFIG => "@config",
TAGSDIRS => "@tag_deps",
CTAGSDIRS => "@ctag_deps",
CSCOPEDIRS => "@cscope_deps");
## ID. ##
## ---- ##
-ID: $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_FILES) $(LISP)
+ID: $(am__tagged_files)
## Make sure the list of sources is unique.
- list='$(SOURCES) %CONFIG% $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
## Handle VPATH correctly.
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
endif %?SUBDIRS%
tags: TAGS
-TAGS: %TAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+TAGS: %TAGSDIRS% $(TAGS_DEPENDENCIES) $(am__tagged_files)
## We use the positional parameters to build the subdir list with
## absolute names, without the need to worry about white space in `pwd`.
set x; \
?SUBDIRS? fi; \
?SUBDIRS? done; \
## Make sure the list of sources is unique.
- list='$(SOURCES) $(HEADERS) %CONFIG% $(LISP) $(TAGS_FILES)'; \
+ list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
## Handle VPATH correctly.
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
## We have a dummy name here because 'tags' has already been in use
## for a long time to mean Emacs-style tags. Oops. This means the
## dependencies here are useless.
-CTAGS: %CTAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+CTAGS: %CTAGSDIRS% $(TAGS_DEPENDENCIES) $(am__tagged_files)
## Make sure the list of sources is unique.
- list='$(SOURCES) $(HEADERS) %CONFIG% $(LISP) $(TAGS_FILES)'; \
+ list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
## Handle VPATH correctly.
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
endif %?TOPDIR_P%
.PHONY: cscopelist
-cscopelist: %CSCOPEDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(LISP) $(TAGS_FILES)
- list='$(HEADERS) $(SOURCES) %CONFIG% $(LISP) $(TAGS_FILES)'; \
+cscopelist: %CSCOPEDIRS% $(am__tagged_files)
+ list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \