+2002-11-07 Alexandre Duret-Lutz <adl@gnu.org>
+
+ * bin/autoscan.in (scan_file): Scan Makefile.am too. Ignore
+ Makefile.in if Makefile.am exists.
+ (output): Strip `.am' from Makefiles. Don't
+ output AC_CONFIG_FILES if no Makefiles were found.
+
2002-11-07 Akim Demaille <akim@epita.fr>
* Makefile.am (cvs_files): Add elisp-comp, mdate-sh.
if -f "$_.in";
# Save $_ as Find::File requires it to be preserved.
- my $underscore = $_;
+ local $_ = $_;
# Strip a useless leading `./'.
$File::Find::name =~ s,^\./,,;
used 'program', 'c++', $File::Find::name;
scan_c_file ($_);
}
- elsif (/^[Mm]akefile(\.in)?$/ || /^GNUmakefile(\.in)?$/)
+ elsif ((/^((?:GNUm|M|m)akefile)(\.in)?$/ && ! -f "$1.am")
+ || /^(?:GNUm|M|m)akefile(\.am)?$/)
{
scan_makefile ($_);
}
{
scan_sh_file ($_);
}
-
- $_ = $underscore;
}
output_kind ($file, 'identifier');
output_kind ($file, 'function');
- # Change DIR/Makefile.in to DIR/Makefile.
- foreach my $m (@makefiles)
+ if (@makefiles)
{
- $m =~ s/\.in$//;
- $unique_makefiles{$m}++;
+ # Change DIR/Makefile.in to DIR/Makefile.
+ foreach my $m (@makefiles)
+ {
+ $m =~ s/\.(?:in|am)$//;
+ $unique_makefiles{$m}++;
+ }
+ print $file ("\nAC_CONFIG_FILES([",
+ join ("\n ",
+ sort keys %unique_makefiles), "])\n");
}
- print $file "\nAC_CONFIG_FILES([",
- join ("\n ", sort keys %unique_makefiles), "])\n";
print $file "AC_OUTPUT\n";
$file->close;