File: make_docs.PLS

package info (click to toggle)
libace-perl 1.92-12
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,012 kB
  • sloc: perl: 7,763; ansic: 7,420; makefile: 81
file content (47 lines) | stat: -rw-r--r-- 928 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/local/bin/perl

use Pod::Html;
$marker = shift;

print STDERR "Creating HTML documentation in docs...\n";

mkdir "docs",0755;
mkdir "docs/Ace",0755;
mkdir "docs/Ace/Sequence",0755;
mkdir "docs/Ace/Browser",0755;
mkdir "docs/Ace/Graphics",0755;
foreach $pod ('Ace.pm',<Ace/*.pm>,<Ace/*/*.pm>) {
  (my $out = $pod) =~ s/\.pm$/.html/;

  if (open(POD,"-|")) {
    open (OUT,">docs/$out");
    while (<POD>) {
      if (/<BODY>/) {
	print OUT <<END;
<BODY BGCOLOR="white">
<!--NAVBAR-->
<hr>
<a href="http://stein.cshl.org/AcePerl">AcePerl Main Page</a>
END
;
      } else {
	print OUT;
      }
    }
  } else {  # child process
    open STDERR,">/dev/null";
    pod2html(
	     $pod,
	     '--podroot=.',
	     '--podpath=.',
	     '--noindex',
	     '--htmlroot=/AcePerl/docs',
	     "--infile=$pod",
	     "--outfile=-"
	    );
    exit 0;
  }
}

system "touch $marker" if $marker;
print STDERR "            ....done!\n";