(
"THANKS", "TODO", "README", "NEWS", "COPYING", "COPYING.LIB",
"INSTALL", "ABOUT-NLS", "ChangeLog", "configure", "configure.in",
- "config.guess", "config.sub", "mkinstalldirs", "install-sh",
- "texinfo.tex"
+ "config.guess", "config.sub", "mkinstalldirs", "install-sh"
+ );
+
+# Commonly used files we auto-include, but only sometimes.
+@common_sometimes =
+ (
+ "version.texi", "aclocal.m4", "acconfig.h", "config.h.top",
+ "config.h.bot", "stamp-h.in", "mdate-sh"
);
$USAGE = " --amdir=DIR directory storing config files
local ($tfile);
($tfile = &file_contents ('texi-version')) =~ s/@TEXI@/$texis[0]/g;
$output_rules = $output_rules . $tfile;
+
+ &require_file ('mdate-sh');
}
# If user specified file_TEXINFOS, then use that as explicit
. "DVIS = " . $infobase . ".dvi\n\n");
# Do some error checking.
- if (! -f ($relative_dir . "/texinfo.tex"))
- {
- print STDERR ("automake: \`TEXINFOS' defined in ", $relative_dir,
- ", but texinfo.tex does not exist there\n");
- }
+ &require_file ('texinfo.tex');
}
# Handle any man pages.
if (defined $contents{'install-local'})
{
- print STDERR "automake: use \`install-data' or \`install-exec', not install\n";
+ print STDERR "automake: use \`install-data' or \`install-exec', not \`install'\n";
}
# Step two: if we are doing recursive makes, write out the
return $results;
}
+################################################################
+
+# Verify that the file must exist in the current directory.
+sub require_file
+{
+ local ($file) = @_;
+ local ($fullfile) = $relative_dir . "/" . $file;
+
+ if (! -f $fullfile)
+ {
+ print STDERR "automake: required file \"$fullfile\" not found\n";
+ $exit_status = 1;
+ }
+ else
+ {
+ push (@dist_common, $file);
+ }
+}
+
+
################################################################
# Return directory name of file.
print $USAGE;
print "\nFiles which are automatically distributed, if found:\n";
$~ = "USAGE_FORMAT";
- local (@lcomm) = sort (@common_files);
+ local (@lcomm) = sort ((@common_files, @common_sometimes));
local ($one, $two);
while ($#lcomm >= 0)
{