diff --git a/NEWS b/NEWS index 8740c008e..e338af9be 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,9 @@ New in spot 1.99.2a (not yet released) * The CGI script for LTL translation offers a HOA download link for each generated automaton. + * The html documentation now includes a HTML copies of the man + pages. + * Bugs fixed - Some acceptance conditions like Fin(0)|Fin(1)|Fin(2)&Inf(3) were not detected as generalized-Rabin. diff --git a/doc/Makefile.am b/doc/Makefile.am index f0b0adc16..01152e924 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -49,12 +49,17 @@ $(srcdir)/spot.html $(srcdir)/spot.tag: $(srcdir)/stamp # Spot documentation. dist_pkgdata_DATA = $(srcdir)/spot.tag -.PHONY: org +.PHONY: org org-man org: cd $(top_builddir) && $(MAKE) doc/org/init.el rm -rf $(srcdir)/userdoc + $(MAKE) org-man $(EMACS) --batch -Q -l org/init.el +org-man: + mkdir -p $(srcdir)/userdoc/man + $(top_srcdir)/tools/man2html.pl $(top_srcdir)/src/bin/man $(srcdir)/userdoc/man + ORG_FILES = \ org/.dir-locals.el.in \ org/g++wrap.in \ diff --git a/tools/man2html.pl b/tools/man2html.pl index ffea7dc5c..176690d50 100755 --- a/tools/man2html.pl +++ b/tools/man2html.pl @@ -29,17 +29,20 @@ sub error($) exit 1; } -error "Specify a directory with man pages\n" if @ARGV != 1; +error "Specify a directory with man pages and a directory for html pages\n" + if @ARGV != 2; my $dir = @ARGV[0]; +my $out = @ARGV[1]; opendir(DIR, $dir) or die $!; while (my $file = readdir(DIR)) { next unless $file =~ m/\.\d$/; + my $ofile = "$out/$file.html"; $file = "$dir/$file"; - print "converting $file to $file.html with groff\n"; - my $html = `(echo '.HEAD ' + print "converting $file to $ofile with groff\n"; + my $html = `(echo '.HEAD ' echo '.HEAD ' cat $file) | groff -Kutf8 -mandoc -Thtml - -P -r`; $html =~ s|GNU GPL version 3 or later.*http://gnu.org/licenses/gpl.html>|GNU GPL version 3 or later|s; @@ -52,11 +55,11 @@ while (my $file = readdir(DIR)) $html =~ s|

([^<>]*?:)\s*
|

$1

|smg; $html =~ s|

([^<>]*?:)\s*\s*
|

$1

|smg; $html =~ s|

([^<>]*?:)\s*

|

$1

|smg; - $html =~ s@@@; + $html =~ s@@@; $html =~ s{([\w-]+)\((\d+)\)}{ (-f "$1.$2") ? "$1($2)" : $&; }xge; - open(FILE, ">$file.html"); + open(FILE, ">$ofile") or die $!; print FILE $html; close(FILE); }