2000-03-19 Tom Tromey <tromey@cygnus.com>
+ Fix for PR automake/38:
+ * automake.in (require_file_internal): Check for and handle
+ dangling symlinks. Fixes symlink2.test.
+
Fix for PR automake/45:
* automake.texi (configure): Mention requirement to run
AM_INIT_AUTOMAKE.
{
local ($is_configure, $line, $mystrict, @files) = @_;
local ($file, $fullfile);
- local ($found_it, $errfile, $errdir);
+ local ($found_it, $dangling_sym, $errfile, $errdir);
local ($save_dir);
foreach $file (@files)
$require_file_found{$file} = 1;
$found_it = 0;
+ $dangling_sym = 0;
foreach $dir (@require_file_paths)
{
if ($dir eq '.')
# config_aux_path.
$errfile = $errdir . '/' . $file;
- if (-f $fullfile)
+ if (-l $fullfile && ! -f _)
+ {
+ $dangling_sym = 1;
+ last;
+ }
+ elsif (-f $fullfile)
{
$found_it = 1;
&maybe_push_required_file ($dir, $file, $fullfile);
{
if ($strictness >= $mystrict)
{
+ if ($dangling_sym)
+ {
+ unlink ($fullfile);
+ }
+
local ($trailer) = '';
local ($suppress) = 0;
if (! symlink ($am_dir . '/' . $file, $errfile))
{
$suppress = 0;
- $trailer = "; error while making link: $!\n";
+ $trailer = "; error while making link: $!";
}
}
elsif (system ('cp', $am_dir . '/' . $file, $errfile))
{
$suppress = 0;
- $trailer = "\n error while copying\n";
+ $trailer = "\n error while copying";
}
}