* automake.in (%transformed_files): New variable.
authorAlexandre Duret-Lutz <adl@gnu.org>
Mon, 5 Jan 2004 09:02:06 +0000 (09:02 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Mon, 5 Jan 2004 09:02:06 +0000 (09:02 +0000)
(initialize_per_input): Reset it.
(make_paragraphs): Fill %transformed_files, and define %FIRST%
each time a file is transformed for the first time.
(handle_configure): Do not define %FIRST_CONFIG_HIN%.
(am_install_var): Do not define %FIRST%.
* lib/am/remake-hdr.am: Use %?FIRST% instead of %?FIRST_CONFIG_HIN%.

ChangeLog
automake.in
doc/stamp-vti
doc/version.texi
lib/am/remake-hdr.am

index 23b8038..b9f9ded 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2004-01-05  Alexandre Duret-Lutz  <adl@gnu.org>
+
+       * automake.in (%transformed_files): New variable.
+       (initialize_per_input): Reset it.
+       (make_paragraphs): Fill %transformed_files, and define %FIRST%
+       each time a file is transformed for the first time.
+       (handle_configure): Do not define %FIRST_CONFIG_HIN%.
+       (am_install_var): Do not define %FIRST%.
+       * lib/am/remake-hdr.am: Use %?FIRST% instead of %?FIRST_CONFIG_HIN%.
+
 2004-01-04  Alexandre Duret-Lutz  <adl@gnu.org>
 
        * lib/texinfo.tex: New upstream version.
index 711353b..ccb6098 100755 (executable)
@@ -546,6 +546,9 @@ my $need_link;
 # FIXME: This is a hack. a better switch should be found.
 my $get_object_extension_was_run;
 
+# Record each file processed by make_paragraphs.
+my %transformed_files;
+
 ################################################################
 
 # var_SUFFIXES_trigger ($TYPE, $VALUE)
@@ -642,6 +645,8 @@ sub initialize_per_input ()
 
     # We always include `.'.  This isn't strictly correct.
     %libtool_clean_directories = ('.' => 1);
+
+    %transformed_files = ();
 }
 
 
@@ -3692,7 +3697,6 @@ sub handle_configure ($$$@)
                           CONFIG_HIN       => $ins[0],
                           CONFIG_H_DEPS    => "@ins",
                           CONFIG_H_PATH    => $config_h_path,
-                          FIRST_CONFIG_HIN => ($hdr_index == 1),
                           STAMP            => "$stamp");
 
          push @distclean_config, $cn_sans_dir, $stamp;
@@ -5847,10 +5851,13 @@ sub make_paragraphs ($%)
 
                 'LIBTOOL'      => !! var ('LIBTOOL'),
                 'NONLIBTOOL'   => 1,
+                'FIRST'        => ! $transformed_files{$file},
                 %transform)
     # We don't need more than two consecutive new-lines.
     . 's/\n{3,}/\n\n/g';
 
+  $transformed_files{$file} = 1;
+
   # Swallow the file and apply the COMMAND.
   my $fc_file = new Automake::XFile "< $file";
   # Looks stupid?
@@ -6306,9 +6313,6 @@ sub am_install_var
   my @used = ();
   my @result = ();
 
-  # True if the iteration is the first one.  Used for instance to
-  # output parts of the associated file only once.
-  my $first = 1;
   foreach my $X (@prefix)
     {
       my $nodir_name = $X;
@@ -6400,20 +6404,16 @@ sub am_install_var
       # Singular form of $PRIMARY.
       (my $one_primary = $primary) =~ s/S$//;
       $output_rules .= &file_contents ($file, $where,
-                                        FIRST => $first,
-
-                                        PRIMARY     => $primary,
-                                        ONE_PRIMARY => $one_primary,
-                                        DIR         => $X,
-                                        NDIR        => $nodir_name,
-                                        BASE        => $strip_subdir,
-
-                                        EXEC      => $exec_p,
-                                        INSTALL   => $install_p,
-                                        DIST      => $dist_p,
-                                        'CK-OPTS' => $check_options_p);
-
-      $first = 0;
+                                      PRIMARY     => $primary,
+                                      ONE_PRIMARY => $one_primary,
+                                      DIR         => $X,
+                                      NDIR        => $nodir_name,
+                                      BASE        => $strip_subdir,
+
+                                      EXEC      => $exec_p,
+                                      INSTALL   => $install_p,
+                                      DIST      => $dist_p,
+                                      'CK-OPTS' => $check_options_p);
     }
 
   # The JAVA variable is used as the name of the Java interpreter.
index e89285a..5fd50fa 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 1 January 2004
+@set UPDATED 5 January 2004
 @set UPDATED-MONTH January 2004
 @set EDITION 1.8a
 @set VERSION 1.8a
index e89285a..5fd50fa 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 1 January 2004
+@set UPDATED 5 January 2004
 @set UPDATED-MONTH January 2004
 @set EDITION 1.8a
 @set VERSION 1.8a
index 56e9f3e..f0ebae6 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003
+## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004
 ## Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -35,7 +35,7 @@
 
 ## Only the first file of AC_CONFIG_HEADERS is assumed to be generated
 ## by autoheader.
-if %?FIRST_CONFIG_HIN%
+if %?FIRST%
 %CONFIG_HIN%: %MAINTAINER-MODE% $(am__configure_deps) %FILES%
        cd $(top_srcdir) && $(AUTOHEADER)
 ## Whenever $(AUTOHEADER) has run, we must make sure that
@@ -75,4 +75,4 @@ if %?FIRST_CONFIG_HIN%
 ## by config.status, there is no reason to make things complex for
 ## config.hin.
        touch $@
-endif %?FIRST_CONFIG_HIN%
+endif %?FIRST%