summaryrefslogtreecommitdiff
path: root/pod/buildtoc
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-04-19 12:08:25 +0100
committerNicholas Clark <nick@ccl4.org>2009-04-19 16:04:37 +0100
commitdb34a22aed169a6db5effc5e9f0373a3061e53f4 (patch)
tree59244a4c9e15444fd31e8e8d383d83a7352f474a /pod/buildtoc
parent6fea91d48c4e490e2fa422b26e5ff3883c86f34c (diff)
downloadperl-db34a22aed169a6db5effc5e9f0373a3061e53f4.tar.gz
For VMS, generate the delete rules for generated and copied files in buildtoc.
Diffstat (limited to 'pod/buildtoc')
-rw-r--r--pod/buildtoc15
1 files changed, 15 insertions, 0 deletions
diff --git a/pod/buildtoc b/pod/buildtoc
index e12bb293ef..e97c58199f 100644
--- a/pod/buildtoc
+++ b/pod/buildtoc
@@ -562,6 +562,11 @@ SNIP
sort keys %Pods, keys %Readmepods;
}
+sub generate_descrip_mms_3 {
+ map qq{\t- If F\$Search("[.pod]$_").nes."" Then Delete/NoConfirm/Log [.pod]$_;*},
+ sort keys %Generated, keys %Copies;
+}
+
sub generate_nmake_1 {
# XXX Fix this with File::Spec
(map {sprintf "\tcopy ..\\README.%-8s ..\\pod\\perl$_.pod\n", $_}
@@ -678,6 +683,16 @@ sub do_vms {
die "$0: $name contains $sections discontigous copy rules"
if $sections > 1;
$makefile =~ s/\0+/join "\n", '', &generate_descrip_mms_2/se;
+
+# Looking for rules like this:
+# - If F$Search("[.pod]perldelta.pod").nes."" Then Delete/NoConfirm/Log [.pod]perldelta.pod;*
+ $makefile =~ s!(?:\t- If F\$Search\("\[\.pod\]perl[a-z]+\Q.pod").nes."" Then Delete/NoConfirm/Log [.pod]perl\E[a-z]+\.pod;\*\n)+!\0!sg;
+ $sections = () = $makefile =~ m/\0+/g;
+ die "$0: $name contains no delete rules" if $sections < 1;
+ die "$0: $name contains $sections discontigous delete rules"
+ if $sections > 1;
+ $makefile =~ s/\0+/join "\n", &generate_descrip_mms_3, ''/se;
+
$makefile;
}