From Jens Petersen.
+2001-07-04 Akim Demaille <akim@epita.fr>
+
+ * autoscan.in (&scan_file): Skip FILE if there is FILE.in.
+ From Jens Petersen.
+
2001-07-03 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Specify CONFIG_FILES
etc. in the log.
-
+
2001-07-03 Akim Demaille <akim@epita.fr>
* acheaders.m4 (AC_CHECK_HEADER): When INCLUDES are set, use the
# the current directory of the walk through.
sub scan_file ()
{
+ # Wanted only if there is no corresponding FILE.in.
+ return
+ if -f "$_.in";
+
# Save $_ as Find::File requires it to be preserved.
my $underscore = $_;
# Strip a useless leading `./'.
$File::Find::name =~ s,^\./,,;
- if (/^.*\.[chlymC]$/ || /^.*\.cc$/)
+ if (/\.[chlymC](\.in)?$/ || /\.cc(\.in)?$/)
{
scan_c_file ($_);
}
- elsif (/^[Mm]akefile$/ || /^GNUmakefile$/)
- {
- # Wanted only if there is no corresponding Makefile.in.
- scan_makefile ($_)
- if ! -f "$_.in";
- }
- elsif (/^[Mm]akefile\.in$/)
+ elsif (/^[Mm]akefile(\.in)?$/ || /^GNUmakefile(\.in)?$/)
{
scan_makefile ($_);
}
- elsif (/^.*\.sh$/)
+ elsif (/\.sh(\.in)?$/)
{
scan_sh_file ($_);
}
# the current directory of the walk through.
sub scan_file ()
{
+ # Wanted only if there is no corresponding FILE.in.
+ return
+ if -f "$_.in";
+
# Save $_ as Find::File requires it to be preserved.
my $underscore = $_;
# Strip a useless leading `./'.
$File::Find::name =~ s,^\./,,;
- if (/^.*\.[chlymC]$/ || /^.*\.cc$/)
+ if (/\.[chlymC](\.in)?$/ || /\.cc(\.in)?$/)
{
scan_c_file ($_);
}
- elsif (/^[Mm]akefile$/ || /^GNUmakefile$/)
- {
- # Wanted only if there is no corresponding Makefile.in.
- scan_makefile ($_)
- if ! -f "$_.in";
- }
- elsif (/^[Mm]akefile\.in$/)
+ elsif (/^[Mm]akefile(\.in)?$/ || /^GNUmakefile(\.in)?$/)
{
scan_makefile ($_);
}
- elsif (/^.*\.sh$/)
+ elsif (/\.sh(\.in)?$/)
{
scan_sh_file ($_);
}