From 76f99509cd611f0bf1981e9fb3ae56d09d1d9f91 Mon Sep 17 00:00:00 2001 From: hal9 Date: Thu, 28 Mar 2002 01:04:14 +0000 Subject: [PATCH] More man2html stuff for docs. --- GNUmakefile.in | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/GNUmakefile.in b/GNUmakefile.in index 70e5f594..64bb9ff5 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -1,6 +1,6 @@ # Note: Makefile is built automatically from Makefile.in # -# $Id: GNUmakefile.in,v 1.37 2002/03/27 15:30:26 swa Exp $ +# $Id: GNUmakefile.in,v 1.38 2002/03/27 16:02:30 swa Exp $ # # Written by and Copyright (C) 2001 the SourceForge # Privoxy team. http://www.privoxy.org/ @@ -76,6 +76,7 @@ DB = $(JADEBIN) -t sgml -ihtml -D.. -d ldpOK.dsl\#html DB2HTML = @DB2HTML@ DKPREFIX = @DKPREFIX@ MAN2HTML = @MAN2HTML@ +G2H_CMD = groff -mandoc -Thtml TARGET_OS = @host@ # Program to do LF->CRLF @@ -472,14 +473,18 @@ dok: doc/source/ldpOK.dsl man2html-swa rm -rf doc/webserver/faq cd doc/source && $(DB2HTML) -s ldpOK.dsl faq.sgml && mv faq ../webserver cd doc/source && $(DB2HTML) -s ldpOK.dsl --nochunks faq.sgml > tmp.html && lynx -dump tmp.html > ../text/faq.txt && rm -rf tmp.html faq + # kludge to force recreation on next run. Rodgrigo? + rm -f doc/source/ldpOK.dsl man2html-swa: + mkdir -p doc/webserver/man-page if [ "$(MAN2HTML)" != "false" ]; then \ - mkdir -p doc/webserver/man-page; \ $(ECHO) "Privoxy|Doc/Man page

NAME

" > doc/webserver/man-page/privoxy-man-page.html; \ man ./privoxy.1 | $(MAN2HTML) -bare \ >> doc/webserver/man-page/privoxy-man-page.html; \ $(ECHO) "" >> doc/webserver/man-page/privoxy-man-page.html; \ + else \ + $(MAKE) groff2html; \ fi redhat-dok: doc/source/ldpOK.dsl man2html @@ -504,6 +509,9 @@ redhat-dok: doc/source/ldpOK.dsl man2html cd doc/source/faq && $(DB) ../faq.sgml && cd .. && mv faq ../webserver cd doc/source && $(DB) -V nochunks faq.sgml > tmp.html && $(WDUMP) \ tmp.html > ../text/faq.txt && rm -rf tmp.html faq + # kludge to force recreation on next run. Rodgrigo? + rm -f doc/source/ldpOK.dsl + doc/source/ldpOK.dsl: if [ "$(DKPREFIX)" != "none" ]; then \ @@ -512,11 +520,21 @@ doc/source/ldpOK.dsl: cp doc/source/ldp.dsl doc/source/ldpOK.dsl; \ fi +# for those with good man2html output. RH7.x seems to work well. man2html: + mkdir -p doc/webserver/man-page if [ "$(MAN2HTML)" != "false" ]; then \ $(MAN2HTML) privoxy.1 |grep -v "^Content-type" > doc/webserver/man-page/privoxy-man-page.html; \ + perl -pi -e 's///; s//man2html/' doc/webserver/man-page/privoxy-man-page.html; \ + else \ + $(MAKE) groff2html; \ fi +# Default, except for Redhat. Create html man page. +groff2html: + $(G2H_CMD) ./privoxy.1 > doc/webserver/man-page/privoxy-man-page.html + + ############################################################################# # # Webserver @@ -632,6 +650,9 @@ install: all ## end: # $Log: GNUmakefile.in,v $ +# Revision 1.38 2002/03/27 16:02:30 swa +# have a generic target +# # Revision 1.37 2002/03/27 15:30:26 swa # have a consistent appearance # -- 2.39.2