Generate simple manpages not WML
authorRich Salz <rsalz@akamai.com>
Sat, 29 Nov 2014 22:12:51 +0000 (17:12 -0500)
committerRich Salz <rsalz@akamai.com>
Sat, 29 Nov 2014 22:12:51 +0000 (17:12 -0500)
Replace the wml-wrapper stuff with just the output
of simple pod2html.

Makefile
docs/index.wml
extract-section.pl [deleted file]
make-docs-makefile.pl [deleted file]
make-docs-makefile.template [deleted file]

index 4662bbd3b597f4f4b1900dd882b5792ffa61aede..52d4b4e26b68779d4650587f17c5c5a5f752b6cf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -15,27 +15,7 @@ FRC.lock-hack:
 PODSHOME=/v/openssl/checkouts/openssl/doc
 HTMLGOAL=docs
 
-all: simple docs-depend docs
-       @wmk -I $(PODSHOME)/.. -a
-       @# Because there's a conflict and wmk skips this one...
-       @wmk docs/apps/openssl.wml
-       @# Because we're dependent of other files
-       @wmk -f news/openssl-*notes.wml
-       @wmk -f news/index.wml
-       @echo "[" `date` "] Done"
-
-simple:
+all:
        cp $(PODSHOME)/HOWTO/*.txt docs/HOWTO/.
        wmk -I $(PODSHOME)/.. -a about news related source support docs/HOWTO *.wml
-
-FRC.docs :
-docs : FRC.docs
-       @echo "[" `date` "] Documentation WML Generation... (be patient)"
-       @$(MAKE) -f Makefile.docs PODSHOME=$(PODSHOME) HTMLGOAL=$(HTMLGOAL)
-
-FRC.docs-depend :
-docs-depend : FRC.docs-depend
-       @echo "[" `date` "] Documentation dependency Generation..."
-       @find $(PODSHOME) -name '*.pod' -print | \
-               PODSHOME=$(PODSHOME) HTMLGOAL=$(HTMLGOAL) ./make-docs-makefile.pl \
-               > Makefile.docs
+       sh ./run-pod2html.sh $(PODSHOME)
index 164a85bb3a8089984a5c4ddcbd0d49c5faffc6ba..909cd14db408dd4093ad5d5f2a1177f1503d6853 100644 (file)
@@ -5,26 +5,23 @@
 
 <h1>OpenSSL Documents</h1>
 
-Here you can find the three manual pages documenting the three essential parts
-of the OpenSSL toolkit: The SSL library, the Crypto library and the command
-line tool, as well as a other miscellaneous documents.
-<br><br>
-<b>Note:</b> the documents are from the current development version of OpenSSL and
-may mention features which are not present or behave differently in previous
-versions of OpenSSL. 
+<p>
+Here are copies of the manpages from the latest snapshot, and other
+useful documentation. Since they are from the snapshot, they may describe
+features which are not present in other releases.
 
 <p>
 <ul>
-<li><a href="apps/openssl.html"><font id=sfl>openssl(1)</font></a>: [STILL INCOMPLETE]<br>
+<li><a href="apps/openssl.html"><font id=sfl>openssl(1)</font></a><br>
     Manual page documenting the <b>openssl</b> command line tool.
 <p>
-<li><a href="ssl/ssl.html"><font id=sfl>ssl(3)</font></a>: [STILL INCOMPLETE]<br>
+<li><a href="ssl/ssl.html"><font id=sfl>ssl(3)</font></a><br>
     Manual page documenting the OpenSSL <b>SSL/TLS</b> library.
 <p>
-<li><a href="crypto/crypto.html"><font id=sfl>crypto(3)</font></a>: [STILL INCOMPLETE]<br>
+<li><a href="crypto/crypto.html"><font id=sfl>crypto(3)</font></a><br>
     Manual page documenting the OpenSSL <b>Crypto</b> library.
 <p>
-<li><a href="HOWTO/"><font id=sfl>HOWTO</font></a>: [STILL INCOMPLETE]<br>
+<li><a href="HOWTO/"><font id=sfl>HOWTO</font></a><br>
     HOWTO documents to introduce concepts or explain them in a way that is not possible in the manuals.
 <p>
 <li><a href="http://wiki.openssl.org/"><font id=sfl>WIKI</font></a><br>
diff --git a/extract-section.pl b/extract-section.pl
deleted file mode 100755 (executable)
index 64d6f9b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /usr/bin/env perl
-
-while(<STDIN>) {
-       if (/=for\s+comment\s+openssl_manual_section:(\S+)/)
-               {
-               print "$1\n";
-               exit 0;
-               }
-}
-
-print "$ARGV[0]\n";
-
diff --git a/make-docs-makefile.pl b/make-docs-makefile.pl
deleted file mode 100755 (executable)
index 11b9d9c..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-#! /usr/bin/env perl
-
-$PODSHOME=$ENV{"PODSHOME"}; #"/e/openssl/exp/openssl/doc";
-$HTMLGOAL=$ENV{"HTMLGOAL"}; #"docs";
-
-$DEBUG=$ENV{"DEBUG"};
-$AT=$DEBUG ? "" : "\@";
-
-%subs=();
-%wmls=();
-%goals=();
-%dirs=();
-
-$HTML_pm = $HTMLGOAL . "/Pod/Html.pm";
-
-#Get and massage info on what files will be processed
-#
-while(<STDIN>) {
-    chop;
-    my $file = $_;
-    s+$PODSHOME/++;
-    s+\.pod++;
-    $wmls{$file} = $HTMLGOAL . '/' . $_ . '.wml';
-    s+/[^/]*$++;
-    my $dir = $_;
-    $dirs{$dir} = 1;
-}
-
-$PODSDIRS=join(':',keys %dirs);
-$PODSDIRS_SPC=join(' ',keys %dirs);
-$PODSDIRS_COMMA=join(',',keys %dirs);
-
-#Since pod2html builds a cache of lesser value, let's build one of greater
-#value for it.  This includes section numbers, thus avoiding conflicts between
-#pages with the same name in different sections
-#
-foreach $f (keys %wmls) {
-    if ($DEBUG) { print STDERR "Processing file: $f\n"; }
-
-    $fs = $f; $fs =~ s,$PODSHOME/,,;
-    $d = $fs; $d =~ s,/[^/]*$,,;
-    $pag = $fs; $pag =~ s,.*/,,g; $pag =~ s,\.pod$,,;
-
-    $s = "(3)";
-    if ($d eq "apps") {
-       $s="(1)";
-    } else {
-       $s = "(3)";
-    }
-
-    open(PODFILE,"<$f") || die "Couldn't open $f: $!\n";
-    while(<PODFILE>) {
-       if (/=for\s+comment\s+openssl_manual_section:(\S+)/)
-               {
-               $s="($1)";
-               last;
-               }
-    }
-
-    seek(PODFILE, 0, 0);
-
-    $page{$pag . $s} = $fs;
-    $dependencies{$f} = $pag . $s;
-
-    $/ = "";
-    $name = 0;
-    while(<PODFILE>) {
-       chop;
-       s/\n/ /gm;
-       if (/^=head1 /) {
-           $name = 0;
-       } elsif ($name) {
-           if (/ - /) {
-               s/ - .*//;
-               s/[ \t,]+/ /g;
-               @words = split ' ';
-               foreach $w (@words) {
-                   $page{$w . $s} = $fs;
-                   if ($w !~ /_/) {
-                       $W = $w;
-                       $W =~ tr/A-Z/a-z/;
-                       if ($w ne $W && $page{$W . $s} eq "") {
-                           $page{$W . $s} = $fs;
-                       }
-                   }
-               }
-           }
-       } else {
-           $save = $_;
-           while((s,L<([^|/>]+\|)?([^/>]+)(/[^>]+)?>,,), $_ ne $save) {
-               if ($DEBUG) { print STDERR "Adding to dep for $f: ",$2,"\n"; }
-               $word = $2;
-               $rword = $word;
-               $rword =~ s/\(/\\(/g;
-               $rword =~ s/\)/\\)/g;
-               if ($DEBUG) { print STDERR "Looking for \"$rword\" in \"",$dependencies{$f},"\" -> ",($dependencies{$f} =~ m/$rword/),"\n"; }
-               if (! ($dependencies{$f} =~ m/$rword/)) {
-                   $dependencies{$f} .= ":" . $word;
-               }
-               $save = $_;
-           }
-       }
-       if (/^=head1 *NAME *$/) {
-           $name = 1;
-       }
-    }
-    close(PODFILE);
-}
-
-open(PODCACHE,">pod2html-dircache") || die "Couldn't open the dir cache: $!\n";
-print PODCACHE $PODSDIRS,"\n",$PODSHOME,"\n";
-foreach $l (keys %page) {
-    print PODCACHE $l," ",$page{$l},":\n";
-}
-
-#Build a Makefile and send it on stdout.
-#
-$DOCS="\t" . join(" \\\n\t",sort(values %wmls));
-
-print <<END_OF_SECTION1;
-PODSHOME=$PODSHOME
-HTMLGOAL=$HTMLGOAL
-
-PODSDIRS=$PODSDIRS
-PODSDIRS_SPC=$PODSDIRS_SPC
-PODSDIRS_COMMA=$PODSDIRS_COMMA
-DOCS=$DOCS
-
-docs : dirs \$(DOCS)
-
-END_OF_SECTION1
-
-#Theoretically, all this work wouldn't be needed, all we would really
-#use is the WML construct <import src="...foo.pod">.  The problem is
-#that there's currently no way to give the underlying pod2html the
-#--htmlroot, --podroot and --podpath parameters.  Those are crucial
-#to get links torking right.  Also, there seems to be no practical way
-#to just include a HTML file into a WML file with hitting something else.
-#So, instead we build the WML file from a template, and fill in with the
-#result of pod2html somewhere in the middle.  That's why the whole thing
-#looks so complicated.
-#
-print <<END_OF_SECTION2;
-\$(DOCS) : make-docs-makefile.template
-       ${AT}pod="`echo \$\@ | sed -e 's,^\$(HTMLGOAL)/\\(.*\\)\\.wml\$\$,\$(PODSHOME)/\\1.pod,'`"; \\
-       pag=\"`basename \$\@ .wml`\"; \\
-       d="`echo \$\@ | sed -e 's,/[^/]*\$\$,,' -e 's,^\$(HTMLGOAL)/,,'`"; \\
-       s='3'; \\
-       if [ "\$\$d" = "apps" ]; then s='1'; fi; s="(`./extract-section.pl \$\$s <\$\$pod`)"; \\
-       echo '  \$\@'; \\
-       sed -e '/^FILE\$\$/,\$\$d' < make-docs-makefile.template | sed -e 's,PAGE,'\$\$pag',' -e 's,SECTION,'\$\$s',' > \$\@; \\
-       cat < \$\$pod | \\
-       PERL5LIB=docs pod2html --htmlroot=.. --podroot=\$(PODSHOME) --podpath=\$(PODSDIRS) | sed -e '1,/<BODY>/d' -e '/<\\/BODY>/,\$\$d' -e 's/^\\(  *\\)#/\\1\\\\#/' -e 's/\\\\ *\$\$/\\\\\\\\/g' >> \$\@; \\
-       sed -e '1,/^FILE\$\$/d' < make-docs-makefile.template | sed -e 's,PAGE,'\$\$pag',' -e 's,SECTION,'\$\$s',' >> \$\@
-
-END_OF_SECTION2
-
-#We wanna make sure the directories are there...
-#
-print <<END_OF_SECTION3;
-dirs : 
-       -${AT}for d in \$(PODSDIRS_SPC); do \\
-               mkdir docs/\$\$d 2>/dev/null; \\
-       done
-
-END_OF_SECTION3
-
-#Finally, build the dependency table...
-#
-foreach $file (keys %wmls) {
-    if ($DEBUG) {
-        print STDERR "Dependencies for $file: ",$dependencies{$file},"\n";
-    }
-    print $wmls{$file},' : ',$HTML_pm," \\\n\tmake-docs-makefile.pl \\\n\t",join(" \\\n\t",map { ($_ ne "" && $page{$_} ne "") ? $PODSHOME . '/' . $page{$_} : () } split(':',$dependencies{$file})),"\n";
-}
diff --git a/make-docs-makefile.template b/make-docs-makefile.template
deleted file mode 100644 (file)
index a3af881..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-
-#use wml::openssl-macros area=docs page=PAGE
-
-<title>Documents, PAGESECTION</title>
-
-<h1>PAGESECTION</h1>
-
-#use wml::imp::generic
-
-{:
-## What's this? [[s|(<STRONG>[^<].+?)</A>(</STRONG><DD>)|$1$2|sg]]
-[[s|<P>\s+<P>|<P>|sg]]
-[[s|<P>\s+</|</|sg]]
-[[s|<DD>\s*<DT>|<DD>&nbsp;<DT>|sg]]
-[[s|<DD>\s*</DL>|<DD>&nbsp;</DL>|sg]]
-[[s|\[|&#91;|sg]]
-[[s|\]|&#93;|sg]]
-FILE
-:}
-