# 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.
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;
}
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));
}
# 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";
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')
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')
elsif ($macro =~ /A(C|M)_PROG_LIBTOOL/)
{
$seen_libtool = $here;
- $libtool_location = $line;
+ $libtool_location = $here;
}
elsif ($macro =~ /AC_PROG_LEX/)
{
}
# 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)
{
&& 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;
}
}