4 use File::Spec::Functions qw(:DEFAULT abs2rel rel2abs);
7 my $sourcedir = catdir($config{sourcedir}, 'doc');
9 foreach my $section ((1, 3, 5, 7)) {
14 map { $_ => 1 } glob catfile($sourcedir, "man$section", "img", "*.png");
16 map { $_ => 1 } glob catfile($sourcedir, "man$section", "*.pod");
18 map { $_ => 1 } glob catfile($sourcedir, "man$section", "*.pod.in");
20 foreach (keys %podinfiles) {
21 (my $p = $_) =~ s|\.in$||i;
25 foreach my $p (sort keys %podfiles) {
26 my $podfile = abs2rel($p, $sourcedir);
27 my $podname = basename($podfile, '.pod');
28 my $podinfile = $podinfiles{"$p.in"} ? "$podfile.in" : undef;
30 my $podname = basename($podfile, ".pod");
32 my $htmlfile = abs2rel(catfile($buildtop, "doc", "html", "man$section",
34 catdir($buildtop, "doc"));
35 my $manfile = abs2rel(catfile($buildtop, "doc", "man", "man$section",
37 catdir($buildtop, "doc"));
39 # The build.info format requires file specs to be in Unix format.
40 # Especially, since VMS file specs use [ and ], the build.info parser
41 # will otherwise get terribly confused.
43 $htmlfile = VMS::Filespec::unixify($htmlfile);
44 $manfile = VMS::Filespec::unixify($manfile);
45 $podfile = VMS::Filespec::unixify($podfile);
46 $podinfile = VMS::Filespec::unixify($podinfile)
47 if defined $podinfile;
48 } elsif ($^O eq 'MSWin32') {
49 $htmlfile =~ s|\\|/|g;
52 $podinfile =~ s|\\|/|g
53 if defined $podinfile;
55 push @htmlfiles, $htmlfile;
56 push @manfiles, $manfile;
58 DEPEND[$htmlfile]=$podfile
59 GENERATE[$htmlfile]=$podfile
60 DEPEND[$manfile]=$podfile
61 GENERATE[$manfile]=$podfile
63 $OUT .= << "_____" if $podinfile;
64 DEPEND[$podfile]{pod}=$podinfile
65 GENERATE[$podfile]=$podinfile
69 foreach my $p (sort keys %pngfiles) {
70 my $relpath = abs2rel($p, $sourcedir);
71 my $imagefile = abs2rel(catfile($buildtop, "doc", "$relpath"),
72 catdir($buildtop, "doc"));
73 push @imagefiles, $imagefile;
76 $OUT .= "IMAGEDOCS[man$section]=" . join(" \\\n", @imagefiles) . "\n";
77 $OUT .= "HTMLDOCS[man$section]=" . join(" \\\n", @htmlfiles) . "\n";
78 $OUT .= "MANDOCS[man$section]=" . join(" \\\n", @manfiles) . "\n";