This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Makefile.SH needs to delete the perldelta symlink before creating it.
authorNicholas Clark <nick@ccl4.org>
Mon, 30 Jul 2012 15:31:12 +0000 (17:31 +0200)
committerNicholas Clark <nick@ccl4.org>
Wed, 1 Aug 2012 13:07:07 +0000 (15:07 +0200)
This seemingly redundant action seems to be necessary for maximum
portability on repeat makes - certainly HP-UX make will happily assume that
the target (the symlink) is out of date, attempt to re-run the rule, and
then fail because the `ln -s` command fails due to the target already
existing.

Makefile.SH
Porting/pod_rules.pl

index 3b6e149..8b432b6 100755 (executable)
@@ -1059,6 +1059,7 @@ pod/perlmodlib.pod: $(MINIPERL_EXE) pod/perlmodlib.PL MANIFEST
        $(MINIPERL) $(Icwd) pod/perlmodlib.PL -q
 
 pod/perl5173delta.pod: pod/perldelta.pod
+       $(RMS) pod/perl5173delta.pod
        $(LNS) perldelta.pod pod/perl5173delta.pod
 
 extra.pods: $(MINIPERL_EXE)
index 8386015..f0b72ed 100644 (file)
@@ -204,8 +204,12 @@ sub do_unix {
     # pod/perl511delta.pod: pod/perldelta.pod
     #         cd pod && $(LNS) perldelta.pod perl511delta.pod
 
+    # although it seems that HP-UX make gets confused, always tried to
+    # regenerate the symlink, and then the ln -s fails, as the target exists.
+
     $makefile_SH =~ s!(
 pod/perl[a-z0-9_]+\.pod: pod/perl[a-z0-9_]+\.pod
+       \$\(RMS\) pod/perl[a-z0-9_]+\.pod
        \$\(LNS\) perl[a-z0-9_]+\.pod pod/perl[a-z0-9_]+\.pod
 )+!\0!gm;
 
@@ -213,6 +217,7 @@ pod/perl[a-z0-9_]+\.pod: pod/perl[a-z0-9_]+\.pod
 
     my @copy_rules = map "
 pod/$_: pod/$state->{copies}{$_}
+       \$(RMS) pod/$_
        \$(LNS) $state->{copies}{$_} pod/$_
 ", keys %{$state->{copies}};