# r - top level READMEs to be copied/symlinked
# a - for auxiliary documentation
# number - indent by
+# D - this version's perldelta
+# d - copied to this name
h Overview
use strict;
use vars qw($masterpodfile %Build %Targets $Verbose $Up %Ignore
- @Master %Readmes %Pods %Aux %Readmepods %Pragmata %Modules);
+ @Master %Readmes %Pods %Aux %Readmepods %Pragmata %Modules
+ %Copies);
use File::Spec;
use File::Find;
use FindBin;
open MASTER, $masterpodfile or die "$0: Can't open $masterpodfile: $!";
+my ($delta_source, $delta_target);
+
foreach (<MASTER>) {
next if /^\#/;
my %flags = (indent => 0);
$flags{indent} = $1 if $flags =~ s/(\d+)//;
- $flags{toc_omit} = 1 if $flags =~ tr/o//d;
+ $flags{toc_omit} = 1 if $flags =~ tr/o//d;
$flags{aux} = 1 if $flags =~ tr/a//d;
+
+ if ($flags =~ tr/D//d) {
+ $flags{perlpod_omit} = 1;
+ $delta_source = "$filename.pod";
+ }
+ if ($flags =~ tr/d//d) {
+ $flags{manifest_omit} = 1;
+ $delta_target = "$filename.pod";
+ }
+
if ($flags =~ tr/r//d) {
my $readme = $filename;
$readme =~ s/^perl//;
die "$0: Malformed line: $_" if $1 =~ tr/A-Z//;
}
}
+if (defined $delta_source) {
+ if (defined $delta_target) {
+ # This way round so that keys can act as a MANIFEST skip list
+ # Targets will aways be in the pod directory. Currently we can only cope
+ # with sources being in the same directory. Fix this and do perlvms.pod
+ # with this?
+ $Copies{$delta_target} = $delta_source;
+ } else {
+ die "$0: delta source defined but not target";
+ }
+} elsif (defined $delta_target) {
+ die "$0: delta target defined but not target";
+}
close MASTER;
my (@manireadmes, %manireadmes);
my (@perlpods, %perlpods);
my (%our_pods);
+ my (%sources);
# Convert these to a list of filenames.
foreach (keys %Pods, keys %Readmepods) {
@disk_pods = glob("*.pod");
@disk_pods{@disk_pods} = @disk_pods;
+ # Things we copy from won't be in perl.pod
+ # Things we copy to won't be in MANIFEST
+ @sources{values %Copies} = ();
+
open(MANI, "../MANIFEST") || die "$0: opening ../MANIFEST failed: $!";
while (<MANI>) {
if (m!^pod/([^.]+\.pod)\s+!i) {
warn "$0: $i exists but is unknown by buildtoc\n"
unless $our_pods{$i};
warn "$0: $i exists but is unknown by ../MANIFEST\n"
- if !$manipods{$i} && !$manireadmes{$i};
+ if !$manipods{$i} && !$manireadmes{$i} && !$Copies{$i};
warn "$0: $i exists but is unknown by perl.pod\n"
- unless $perlpods{$i};
+ if !$perlpods{$i} && !exists $sources{$i};
}
foreach my $i (sort keys %our_pods) {
warn "$0: $i is known by buildtoc but does not exist\n"
foreach (@Master) {
my $flags = $_->[0];
next if $flags->{aux};
+ next if $flags->{perlpod_omit};
if (@$_ == 2) {
# Heading
map {s/ \t/\t\t/g; $_} @temp;
}
sub generate_manifest_pod {
- generate_manifest map {["pod/$_.pod", $Pods{$_}]} sort keys %Pods;
+ generate_manifest map {["pod/$_.pod", $Pods{$_}]}
+ grep {!$Copies{"$_.pod"}} sort keys %Pods;
}
sub generate_manifest_readme {
generate_manifest map {["README.$_", $Readmes{$_}]} sort keys %Readmes;
}
sub generate_nmake_1 {
- map {sprintf "\tcopy ..\\README.%-8s .\\perl$_.pod\n", $_}
- sort keys %Readmes;
+ # XXX Fix this with File::Spec
+ (map {sprintf "\tcopy ..\\README.%-8s ..\\pod\\perl$_.pod\n", $_}
+ sort keys %Readmes),
+ (map {"\tcopy ..\\pod\\$Copies{$_} ..\\pod\\$_\n"} sort keys %Copies);
}
# This doesn't have a trailing newline
# Spot the special case
local $Text::Wrap::columns = 76;
my $line = wrap ("\t ", "\t ",
- join " ", sort map {"perl$_.pod"} "vms", keys %Readmes);
+ join " ", sort keys %Copies,
+ map {"perl$_.pod"} "vms", keys %Readmes);
$line =~ s/$/ \\/mg;
$line;
}
my $sections = () = $makefile =~ m/\0+/g;
die "$0: $name contains no README copies" if $sections < 1;
die "$0: $name contains discontiguous README copies" if $sections > 1;
- $makefile =~ s/\0+/join "", &generate_nmake_1/se;
+ # Now remove the other copies that follow
+ 1 while $makefile =~ s/\0\tcopy .*\n/\0/gm;
+ $makefile =~ s/\0+/join ("", &generate_nmake_1)/se;
- $makefile =~ s{(cd \$\(PODDIR\) && del /f [^\n]+).*?(pod2html)}
+ $makefile =~ s{(del /f [^\n]+checkpods[^\n]+).*?(pod2html)}
{"$1\n" . &generate_nmake_2."\n\t $2"}se;
$makefile;
}
--podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \
--libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
+# Note that this next section is parsed (and regenerated) by pod/buildtoc
+# so please check that script before making structural changes here
+
utils: $(PERLEXE) $(X2P)
cd ..\utils
$(MAKE) PERL=$(MINIPERL)
cd ..\pod
- copy ..\README.aix .\perlaix.pod
- copy ..\README.amiga .\perlamiga.pod
- copy ..\README.apollo .\perlapollo.pod
- copy ..\README.beos .\perlbeos.pod
- copy ..\README.bs2000 .\perlbs2000.pod
- copy ..\README.ce .\perlce.pod
- copy ..\README.cn .\perlcn.pod
- copy ..\README.cygwin .\perlcygwin.pod
- copy ..\README.dgux .\perldgux.pod
- copy ..\README.dos .\perldos.pod
- copy ..\README.epoc .\perlepoc.pod
- copy ..\README.freebsd .\perlfreebsd.pod
- copy ..\README.hpux .\perlhpux.pod
- copy ..\README.hurd .\perlhurd.pod
- copy ..\README.irix .\perlirix.pod
- copy ..\README.jp .\perljp.pod
- copy ..\README.ko .\perlko.pod
- copy ..\README.machten .\perlmachten.pod
- copy ..\README.macos .\perlmacos.pod
- copy ..\README.macosx .\perlmacosx.pod
- copy ..\README.mint .\perlmint.pod
- copy ..\README.mpeix .\perlmpeix.pod
- copy ..\README.netware .\perlnetware.pod
- copy ..\README.os2 .\perlos2.pod
- copy ..\README.os390 .\perlos390.pod
- copy ..\README.os400 .\perlos400.pod
- copy ..\README.plan9 .\perlplan9.pod
- copy ..\README.qnx .\perlqnx.pod
- copy ..\README.solaris .\perlsolaris.pod
- copy ..\README.tru64 .\perltru64.pod
- copy ..\README.tw .\perltw.pod
- copy ..\README.uts .\perluts.pod
- copy ..\README.vmesa .\perlvmesa.pod
- copy ..\README.vms .\perlvms.pod
- copy ..\README.vos .\perlvos.pod
- copy ..\README.win32 .\perlwin32.pod
copy ..\vms\perlvms.pod .\perlvms.pod
+ copy ..\README.aix ..\pod\perlaix.pod
+ copy ..\README.amiga ..\pod\perlamiga.pod
+ copy ..\README.apollo ..\pod\perlapollo.pod
+ copy ..\README.beos ..\pod\perlbeos.pod
+ copy ..\README.bs2000 ..\pod\perlbs2000.pod
+ copy ..\README.ce ..\pod\perlce.pod
+ copy ..\README.cn ..\pod\perlcn.pod
+ copy ..\README.cygwin ..\pod\perlcygwin.pod
+ copy ..\README.dgux ..\pod\perldgux.pod
+ copy ..\README.dos ..\pod\perldos.pod
+ copy ..\README.epoc ..\pod\perlepoc.pod
+ copy ..\README.freebsd ..\pod\perlfreebsd.pod
+ copy ..\README.hpux ..\pod\perlhpux.pod
+ copy ..\README.hurd ..\pod\perlhurd.pod
+ copy ..\README.irix ..\pod\perlirix.pod
+ copy ..\README.jp ..\pod\perljp.pod
+ copy ..\README.ko ..\pod\perlko.pod
+ copy ..\README.machten ..\pod\perlmachten.pod
+ copy ..\README.macos ..\pod\perlmacos.pod
+ copy ..\README.macosx ..\pod\perlmacosx.pod
+ copy ..\README.mint ..\pod\perlmint.pod
+ copy ..\README.mpeix ..\pod\perlmpeix.pod
+ copy ..\README.netware ..\pod\perlnetware.pod
+ copy ..\README.os2 ..\pod\perlos2.pod
+ copy ..\README.os390 ..\pod\perlos390.pod
+ copy ..\README.os400 ..\pod\perlos400.pod
+ copy ..\README.plan9 ..\pod\perlplan9.pod
+ copy ..\README.qnx ..\pod\perlqnx.pod
+ copy ..\README.solaris ..\pod\perlsolaris.pod
+ copy ..\README.tru64 ..\pod\perltru64.pod
+ copy ..\README.tw ..\pod\perltw.pod
+ copy ..\README.uts ..\pod\perluts.pod
+ copy ..\README.vmesa ..\pod\perlvmesa.pod
+ copy ..\README.vms ..\pod\perlvms.pod
+ copy ..\README.vos ..\pod\perlvos.pod
+ copy ..\README.win32 ..\pod\perlwin32.pod
$(MAKE) -f ..\win32\pod.mak converters
cd ..\lib
$(PERLEXE) lib_pm.PL
cd ..\win32
$(PERLEXE) $(PL2BAT) $(UTILS)
+# Note that the pod cleanup in this next section is parsed (and regenerated
+# by pod/buildtoc so please check that script before making changes here
+
# the doubled rmdir calls are needed because older cmd shells
# don't understand /q
distclean: clean
cd $(PODDIR)
-del /f *.html *.bat checkpods \
perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \
- perlbs2000.pod perlce.pod perlcygwin.pod perldgux.pod \
- perldos.pod perlepoc.pod perlfreebsd.pod perlhurd.pod \
- perlhpux.pod perlirix.pod perlmachten.pod \
- perlmacos.pod perlmint.pod perlmpeix.pod perlnetware.pod \
- perlos2.pod perlos390.pod perlos400.pod perlplan9.pod \
- perlqnx.pod perlsolaris.pod perltru64.pod perluts.pod \
- perlvmesa.pod perlvms.pod perlvos.pod \
- perlwin32.pod pod2html pod2latex pod2man pod2text pod2usage \
+ perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
+ perldgux.pod perldos.pod perlepoc.pod perlfreebsd.pod \
+ perlhpux.pod perlhurd.pod perlirix.pod perljp.pod perlko.pod \
+ perlmachten.pod perlmacos.pod perlmacosx.pod perlmint.pod \
+ perlmpeix.pod perlnetware.pod perlos2.pod perlos390.pod \
+ perlos400.pod perlplan9.pod perlqnx.pod perlsolaris.pod \
+ perltru64.pod perltw.pod perluts.pod perlvmesa.pod perlvms.pod \
+ perlvms.pod perlvos.pod perlwin32.pod \
+ pod2html pod2latex pod2man pod2text pod2usage \
podchecker podselect
cd ..\utils
-del /f h2ph splain perlbug pl2pm c2ph pstruct h2xs perldoc perlivp \
--podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
--libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
+# Note that this next section is parsed (and regenerated) by pod/buildtoc
+# so please check that script before making structural changes here
utils: $(PERLEXE) $(X2P)
cd ..\utils && $(MAKE) PERL=$(MINIPERL)
- cd ..\pod
- copy ..\README.aix .\perlaix.pod
- copy ..\README.amiga .\perlamiga.pod
- copy ..\README.apollo .\perlapollo.pod
- copy ..\README.beos .\perlbeos.pod
- copy ..\README.bs2000 .\perlbs2000.pod
- copy ..\README.ce .\perlce.pod
- copy ..\README.cn .\perlcn.pod
- copy ..\README.cygwin .\perlcygwin.pod
- copy ..\README.dgux .\perldgux.pod
- copy ..\README.dos .\perldos.pod
- copy ..\README.epoc .\perlepoc.pod
- copy ..\README.freebsd .\perlfreebsd.pod
- copy ..\README.hpux .\perlhpux.pod
- copy ..\README.hurd .\perlhurd.pod
- copy ..\README.irix .\perlirix.pod
- copy ..\README.jp .\perljp.pod
- copy ..\README.ko .\perlko.pod
- copy ..\README.machten .\perlmachten.pod
- copy ..\README.macos .\perlmacos.pod
- copy ..\README.macosx .\perlmacosx.pod
- copy ..\README.mint .\perlmint.pod
- copy ..\README.mpeix .\perlmpeix.pod
- copy ..\README.netware .\perlnetware.pod
- copy ..\README.os2 .\perlos2.pod
- copy ..\README.os390 .\perlos390.pod
- copy ..\README.os400 .\perlos400.pod
- copy ..\README.plan9 .\perlplan9.pod
- copy ..\README.qnx .\perlqnx.pod
- copy ..\README.solaris .\perlsolaris.pod
- copy ..\README.tru64 .\perltru64.pod
- copy ..\README.tw .\perltw.pod
- copy ..\README.uts .\perluts.pod
- copy ..\README.vmesa .\perlvmesa.pod
- copy ..\README.vms .\perlvms.pod
- copy ..\README.vos .\perlvos.pod
- copy ..\README.win32 .\perlwin32.pod
copy ..\vms\perlvms.pod ..\pod\perlvms.pod
- $(MAKE) -f ..\win32\pod.mak converters
+ copy ..\README.aix ..\pod\perlaix.pod
+ copy ..\README.amiga ..\pod\perlamiga.pod
+ copy ..\README.apollo ..\pod\perlapollo.pod
+ copy ..\README.beos ..\pod\perlbeos.pod
+ copy ..\README.bs2000 ..\pod\perlbs2000.pod
+ copy ..\README.ce ..\pod\perlce.pod
+ copy ..\README.cn ..\pod\perlcn.pod
+ copy ..\README.cygwin ..\pod\perlcygwin.pod
+ copy ..\README.dgux ..\pod\perldgux.pod
+ copy ..\README.dos ..\pod\perldos.pod
+ copy ..\README.epoc ..\pod\perlepoc.pod
+ copy ..\README.freebsd ..\pod\perlfreebsd.pod
+ copy ..\README.hpux ..\pod\perlhpux.pod
+ copy ..\README.hurd ..\pod\perlhurd.pod
+ copy ..\README.irix ..\pod\perlirix.pod
+ copy ..\README.jp ..\pod\perljp.pod
+ copy ..\README.ko ..\pod\perlko.pod
+ copy ..\README.machten ..\pod\perlmachten.pod
+ copy ..\README.macos ..\pod\perlmacos.pod
+ copy ..\README.macosx ..\pod\perlmacosx.pod
+ copy ..\README.mint ..\pod\perlmint.pod
+ copy ..\README.mpeix ..\pod\perlmpeix.pod
+ copy ..\README.netware ..\pod\perlnetware.pod
+ copy ..\README.os2 ..\pod\perlos2.pod
+ copy ..\README.os390 ..\pod\perlos390.pod
+ copy ..\README.os400 ..\pod\perlos400.pod
+ copy ..\README.plan9 ..\pod\perlplan9.pod
+ copy ..\README.qnx ..\pod\perlqnx.pod
+ copy ..\README.solaris ..\pod\perlsolaris.pod
+ copy ..\README.tru64 ..\pod\perltru64.pod
+ copy ..\README.tw ..\pod\perltw.pod
+ copy ..\README.uts ..\pod\perluts.pod
+ copy ..\README.vmesa ..\pod\perlvmesa.pod
+ copy ..\README.vms ..\pod\perlvms.pod
+ copy ..\README.vos ..\pod\perlvos.pod
+ copy ..\README.win32 ..\pod\perlwin32.pod
+ cd ..\pod && $(MAKE) -f ..\win32\pod.mak converters
cd ..\lib && $(PERLEXE) lib_pm.PL
$(PERLEXE) $(PL2BAT) $(UTILS)
+# Note that the pod cleanup in this next section is parsed (and regenerated
+# by pod/buildtoc so please check that script before making changes here
+
distclean: clean
-del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
$(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD)