From d73cc8acc528dd5fc89a263f69f9bf4d83108054 Mon Sep 17 00:00:00 2001 From: jongfoster Date: Sat, 6 Apr 2002 20:28:21 +0000 Subject: [PATCH] Prettifying groff2html. Using GNU Make's conditional makefile feature rather than shell "if"s. (The shell "if"s were hiding errors) "perl" -> "$(PERL)" Spaces->tabs in a couple of places. --- GNUmakefile.in | 52 +++++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/GNUmakefile.in b/GNUmakefile.in index db83dea2..a234de61 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -1,6 +1,6 @@ # Note: Makefile is built automatically from Makefile.in # -# $Id: GNUmakefile.in,v 1.64 2002/04/04 22:14:51 oes Exp $ +# $Id: GNUmakefile.in,v 1.65 2002/04/06 05:16:39 hal9 Exp $ # # Written by and Copyright (C) 2001 the SourceForge # Privoxy team. http://www.privoxy.org/ @@ -88,6 +88,7 @@ DKPREFIX = @DKPREFIX@ MAN2HTML = @MAN2HTML@ G2H_CMD = groff -mandoc -Thtml TARGET_OS = @host@ +PERL = perl #User Group paras USER = @USER@ @@ -100,7 +101,7 @@ GROUP = @GROUP@ # - Jon #DOSFILTER = $(SED) -e $$'s,$$,\r,' #DOSFILTER = gawk -v ORS='\r\n' '{print $0;}' -DOSFILTER = perl -p -e 's/\n/\r\n/' +DOSFILTER = $(PERL) -p -e 's/\n/\r\n/' ############################################################################# # Setup for make distribution rh and suse for now @@ -498,7 +499,7 @@ doc/source/ldpOK.dsl: # Otherwise we get plain groff conversion. groff2html: - $(G2H_CMD) ./privoxy.1 > doc/webserver/man-page/privoxy-man-page.html + $(G2H_CMD) ./privoxy.1 | $(SED) -e 's@@@' > doc/webserver/man-page/privoxy-man-page.html # developer manual dok-devel: doc/source/ldpOK.dsl @@ -525,14 +526,13 @@ dok-faq: doc/source/ldpOK.dsl dok-man: doc/source/ldpOK.dsl rm -rf doc/man doc/webserver/man-page mkdir -p doc/man -p doc/webserver/man-page - if [ "$(MAN2HTML)" != "false" ]; then \ - $(ECHO) "Privoxy 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 +ifneq ($(MAN2HTML),false) + $(ECHO) "Privoxy 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 +endif # readme page dok-readme: doc/source/ldpOK.dsl @@ -577,36 +577,36 @@ redhat-dok: doc/source/ldpOK.dsl man2html # For those with man2html ala RH7's. 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 +ifneq ($(MAN2HTML),false) + $(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 +endif ## Make README redhat-readme: doc/source/ldpOK.dsl cd doc/source && $(DB) -V nochunks readme.sgml > tmp.html && $(WDUMP) \ - tmp.html > ../../README && rm -rf tmp.html - # kludge to force recreation on next run. Rodgrigo? + tmp.html > ../../README && rm -rf tmp.html + # kludge to force recreation on next run. Rodgrigo? @rm -f doc/source/ldpOK.dsl #### WIP targets HB ################## ## Make AUTHORS file authors: doc/source/ldpOK.dsl cd doc/source && $(DB) -V nochunks authors.sgml > tmp.html && $(WDUMP) \ - tmp.html > ../../AUTHORS && rm -f tmp.html - # kludge to force recreation on next run. Rodgrigo? + tmp.html > ../../AUTHORS && rm -f tmp.html + # kludge to force recreation on next run. Rodgrigo? @rm -f doc/source/ldpOK.dsl # make a man page, and then (lousy) HTML version. man: doc/source/ldpOK.dsl mkdir -p doc/source/man cd doc/source/man && docbook2man ../privoxy-man-page.sgml &&\ - perl -pi -e 's/ //; s/\[ /\[/g' privoxy.1 + $(PERL) -pi -e 's/ //; s/\[ /\[/g' privoxy.1 cd doc/source/man && $(DB) ../privoxy-man-page.sgml &&\ - mv -f index.html privoxy-man-page.html - # kludge to force recreation on next run. Rodgrigo? + mv -f index.html privoxy-man-page.html + # kludge to force recreation on next run. Rodgrigo? @rm -f doc/source/ldpOK.dsl ############################################################################# @@ -750,6 +750,10 @@ install: all ## end: # $Log: GNUmakefile.in,v $ +# Revision 1.65 2002/04/06 05:16:39 hal9 +# -Add 'authors' and 'man' targets for AUTHORS and man-page (WIP). +# -Both of these will soon be generated files. +# # Revision 1.64 2002/04/04 22:14:51 oes # No longer rely on find honoring -iname # -- 2.39.2