From 9ed822b24297ff4fbca5bf4c03a96761d097a709 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sun, 21 Oct 2001 21:54:01 +0000 Subject: [PATCH] * automake.in ($ac_output_location): Replace with... ($ac_config_files_location): this. (&scan_autoconf_traces): We don't need $file and $line, $here is enough. (&scan_one_autoconf_file): Use `$in_ac_output' to store the macro name (AC_OUTPUT or AC_CONFIG_FILES) for error messages. --- ChangeLog | 10 ++++++++++ automake.in | 29 +++++++++++++++-------------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 124924bd..378d4a6f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2001-10-21 Akim Demaille + + * automake.in ($ac_output_location): Replace with... + ($ac_config_files_location): this. + (&scan_autoconf_traces): We don't need $file and $line, $here is + enough. + (&scan_one_autoconf_file): Use `$in_ac_output' to store the macro + name (AC_OUTPUT or AC_CONFIG_FILES) for error messages. + + 2001-10-21 Akim Demaille * automake.in (&require_file_with_macro): Use &require_file. diff --git a/automake.in b/automake.in index 5452f844..bfaebfaf 100755 --- a/automake.in +++ b/automake.in @@ -375,10 +375,11 @@ my %output_files = (); # Complete list of Makefile.am's that exist. my @configure_input_files = (); -# List of files in AC_OUTPUT without Makefile.am, and their outputs. +# List of files in AC_CONFIG_FILES/AC_OUTPUT without Makefile.am's, +# and their outputs. my @other_input_files = (); -# Where AC_OUTPUT appears. -my $ac_output_location; +# Where the last AC_CONFIG_FILES/AC_OUTPUT appears. +my $ac_config_files_location; # List of directories to search for configure-required files. This # can be set by AC_CONFIG_AUX_DIR. @@ -3918,7 +3919,7 @@ sub handle_configure if ($local eq 'stamp-h') { # FIXME: allow real filename. - am_file_error ($ac_output_location, + am_file_error ($ac_config_files_location, 'stamp-h should not appear in AC_OUTPUT'); next; } @@ -3937,7 +3938,7 @@ sub handle_configure push (@actual_other_files, $local); # Require all input files. - require_file ($ac_output_location, $FOREIGN, + require_file ($ac_config_files_location, $FOREIGN, &rewrite_inputs_into_dependencies (0, @inputs)); } @@ -4466,7 +4467,7 @@ sub scan_autoconf_traces ($) # Use a separator unlikely to be used, not `:', the default, which # has a precise meaning for AC_CONFIG_FILES and so on. $traces .= join (' ', - map { "--trace=$_" . ':\$f::\$l::\$n::\${::}%' } @traced); + map { "--trace=$_" . ':\$f:\$l::\$n::\${::}%' } @traced); my $tracefh = new Automake::XFile ("$traces |"); verbose "reading $traces"; @@ -4474,9 +4475,8 @@ sub scan_autoconf_traces ($) while ($_ = $tracefh->getline) { chomp; - my ($file, $line, @args) = split /::/; + my ($here, @args) = split /::/; my $macro = $args[0]; - my $here = "$file:$line"; # Alphabetical ordering please. if ($macro eq 'AC_CANONICAL_HOST') @@ -4496,6 +4496,7 @@ sub scan_autoconf_traces ($) elsif ($macro eq 'AC_CONFIG_FILES') { # Look at potential Makefile.am's. + $ac_config_files_location = $here; &scan_autoconf_config_files ($args[1]); } elsif ($macro eq 'AC_LIBSOURCE') @@ -4509,7 +4510,7 @@ sub scan_autoconf_traces ($) elsif ($macro =~ /A(C|M)_PROG_LIBTOOL/) { $seen_libtool = $here; - $libtool_location = $line; + $libtool_location = $here; } elsif ($macro =~ /AC_PROG_LEX/) { @@ -4700,10 +4701,10 @@ sub scan_one_autoconf_file } # Process the AC_OUTPUT and AC_CONFIG_FILES macros. - if (! $in_ac_output && s/AC_(OUTPUT|CONFIG_FILES)\s*\(\[?//) + if (! $in_ac_output && s/(AC_(OUTPUT|CONFIG_FILES))\s*\(\[?//) { - $in_ac_output = 1; - $ac_output_location = $here; + $in_ac_output = $1; + $ac_config_files_location = $here; } if ($in_ac_output) { @@ -4721,8 +4722,8 @@ sub scan_one_autoconf_file && scalar keys %make_list == 0 && @other_input_files == 0) { - am_file_error ($ac_output_location, - "No files mentioned in `AC_OUTPUT'"); + am_file_error ($ac_config_files_location, + "no files mentioned in `$in_ac_output'"); exit 1; } } -- 2.43.5