add a target to build HTML documentation from all pod
authorTony Cook <tony@develop-help.com>
Thu, 2 Aug 2012 06:49:04 +0000 (16:49 +1000)
committerTony Cook <tony@develop-help.com>
Thu, 2 Aug 2012 06:49:04 +0000 (16:49 +1000)
This needs a better index, and better CSS, but one step at a time

MANIFEST
Makefile
makehtmldocs.pl [new file with mode: 0644]

index be08a0e..e424975 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -6,6 +6,7 @@ INSTALL.pod
 INSTALL.txt
 localinst.perl                 # simple test installer
 Makefile
+makehtmldocs.pl
 MANIFEST
 MANIFEST.SKIP
 README
index bb82d39..2f13cd3 100755 (executable)
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,8 @@ BSEMODULES=site/cgi-bin/modules/BSE/Modules.pm
 
 NOOP=echo Nothing
 
+HTMLDEPS=$(shell $(PERL) -lane 'print $$F[0] if $$F[0] =~ /\.(pm|pl|pod)$$/' MANIFEST)
+
 MODULES=$(shell grep cgi-bin/.*\.pm MANIFEST | sed -e '/^\#/d' -e 's/[ \t].*//' -e '/^site\/cgi-bin\/modules\/BSE\/\(Modules\|Version\)\.pm/d' )
 VERSIONDEPS=$(shell $(PERL) site/util/bse_versiondeps.pl MANIFEST)
 
@@ -122,3 +124,10 @@ filecheck:
 
 manifest:
        $(PERL) -MExtUtils::Manifest=mkmanifest -e mkmanifest
+
+htmldocs: $(HTMLDEPS)
+       if [ -z "$(HTMLDOCDIR)" ] ; then \
+         echo Supply HTMLDOCDIR ; exit 1 ; \
+       fi
+       [ -d "$(HTMLDOCDIR)" ] || mkdir -p "$(HTMLDOCDIR)"
+       $(PERL) makehtmldocs.pl "$(HTMLDOCDIR)" 
diff --git a/makehtmldocs.pl b/makehtmldocs.pl
new file mode 100644 (file)
index 0000000..d186903
--- /dev/null
@@ -0,0 +1,7 @@
+#!perl -w
+use strict;
+use Pod::Simple::HTMLBatch;
+
+my @src = qw(site/docs site/cgi-bin/modules site/util .);
+my $b = Pod::Simple::HTMLBatch->new; 
+$b->batch_convert(\@src, shift);