From c1277fac39f31aa5b6a622ff2417dbedc7ca9a1b Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Mon, 5 Jan 2004 09:02:04 +0000 Subject: [PATCH] * 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%. --- ChangeLog | 10 ++++++++++ automake.in | 36 ++++++++++++++++++------------------ doc/stamp-vti | 2 +- doc/version.texi | 2 +- lib/am/remake-hdr.am | 6 +++--- 5 files changed, 33 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 23b80384..b9f9ded1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-01-05 Alexandre Duret-Lutz + + * 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 * lib/texinfo.tex: New upstream version. diff --git a/automake.in b/automake.in index 711353b5..ccb6098a 100755 --- a/automake.in +++ b/automake.in @@ -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. diff --git a/doc/stamp-vti b/doc/stamp-vti index e89285ae..5fd50fa6 100644 --- a/doc/stamp-vti +++ b/doc/stamp-vti @@ -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 diff --git a/doc/version.texi b/doc/version.texi index e89285ae..5fd50fa6 100644 --- a/doc/version.texi +++ b/doc/version.texi @@ -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 diff --git a/lib/am/remake-hdr.am b/lib/am/remake-hdr.am index 56e9f3ed..f0ebae6c 100644 --- a/lib/am/remake-hdr.am +++ b/lib/am/remake-hdr.am @@ -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% -- 2.43.5