]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] automake: remove useless code duplication
authorStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 30 Jul 2012 12:22:56 +0000 (14:22 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 30 Jul 2012 15:06:00 +0000 (17:06 +0200)
This is a pure refactoring with no semantic changes intended.

* automake.in (handle_all_and_check, handle_tags): Do not re-calculate
the list of "local" input or output header files (specified by
AC_CONFIG_HEADERS in configure.ac); that is already saved in the internal
make variables '$(am.config-hdr.local)' and '$(am.config-hdr.local.in)'.
Simply use these variables instead.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
automake.in

index 234324a3feebcc8b405771c8c26f4649d9ae375f..ceee1c89b75fbbfab5c4f69ed83184b255742eb6 100644 (file)
@@ -3180,22 +3180,9 @@ sub handle_data
 # 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', INTERNAL,
-                     qw/$(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)/,
-                     @config);
+                     qw/$(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+                        $(am.config-hdr.local.in)/);
 
     if (rvar('am__tagged_files')->value_as_list_recursive
           || var ('ETAGS_ARGS') || var ('SUBDIRS'))
@@ -3900,18 +3887,9 @@ sub handle_footer
 # Generate "make all" and "make check" rules.
 sub handle_all_and_check ()
 {
-  my @local_headers = ();
-  foreach my $spec (@config_headers)
-    {
-      my ($out, @ins) = split_config_file_spec ($spec);
-      push (@local_headers, basename ($out))
-        if dirname ($out) eq $relative_dir;
-    }
-
   almost_verbatim ('all-target',
                    'ALL-DEPS' => "@all",
-                   'LOCAL-HEADERS' => "@local_headers");
-
+                   'LOCAL-HEADERS' => '$(am.config-hdr.local)');
   almost_verbatim ('check-target');
 }