# Note: Makefile is built automatically from Makefile.in
#
-# $Id: GNUmakefile.in,v 1.104.2.1 2002/05/26 17:19:34 hal9 Exp $
+# $Id: GNUmakefile.in,v 1.104.2.6 2002/06/02 03:26:25 hal9 Exp $
#
# Written by and Copyright (C) 2001 the SourceForge
# Privoxy team. http://www.privoxy.org/
PERL = perl
DOC_DIR = doc/source
DOC_TMP = $(DOC_DIR)/tmp
-
+DOC_STATUS = @DOC_STATUS@
#User Group paras
USER = @USER@
# and escape every '#' in the find. doh.
CONFIG_FILES = config trust \
default.action \
- basic.action intermediate.action advanced.action \
+ standard.action user.action \
default.filter \
`find templates/ -type f | grep -v "CVS" | grep -v "\.\#" | grep -v ".*~" | grep -v ".cvsignore" | grep -v "TAGS"`
DOC_FILES = AUTHORS LICENSE README ChangeLog \
`find doc/text/ -type f | grep -v "CVS" | grep -v "\.\#" | grep -v ".*~" | grep -v ".cvsignore" | grep -v "TAGS"` \
- `find doc/webserver/ -name "*.html"` \
+ `find doc/webserver/ -name "*.html" | grep -v "\(webserver\|team\)\/index\.html"` \
`find doc/webserver/ -name "*.css"` \
privoxy.1
$(RM) doc/webserver/user-manual/*.html
$(RM) -r doc/source/user-manual/
mkdir -p doc/text doc/source/user-manual
- cd doc/source/user-manual && $(DB) ../user-manual.sgml && cd .. && cp user-manual/*.html ../webserver/user-manual/
- cd doc/source && $(DB) -V nochunks user-manual.sgml > tmp.html && $(WDUMP) tmp.html > ../text/user-manual.txt && $(RM) -r tmp.html user-manual
+ cd doc/source/user-manual && $(DB) -iuser-man ../user-manual.sgml && cd .. && cp user-manual/*.html ../webserver/user-manual/
+ cd doc/source && $(DB) -iuser-man -V nochunks user-manual.sgml > tmp.html && $(WDUMP) tmp.html > ../text/user-manual.txt && $(RM) -r tmp.html user-manual
# faq
dok-faq:
redhat-dok: dok-release dok-devel dok-user dok-faq redhat-readme dok-webserver dok-authors
@$(ECHO) Documentation created.
-# For those with man2html ala RH7's.
+# For those with man2html ala RH7s.
man2html:
mkdir -p doc/webserver/man-page
ifneq ($(MAN2HTML),false)
$(MAN2HTML) privoxy.1 |grep -v "^Content-type" > tmp.html
$(PERL) -pi.bak -e 's/<A .*Contents<\/A>//; s/<A .*man2html<\/A>/man2html/' tmp.html
$(PERL) -pi.bak -e 's/(<\/HEAD>)/<LINK REL=\"STYLESHEET\" TYPE=\"text\/css\" HREF=\"..\/p_doc.css\"><\/HEAD>/' tmp.html
+# Twice because my version of man2html is pulling in commas and periods in URLs.
+ $(PERL) -pi.bak -e 's/(<A.*),(">)/$$1$$2/g' tmp.html
+ $(PERL) -pi.bak -e 's,\.">,">,g' tmp.html
# Get rid of spurious \a from conversion. (How to do this with perl?)
$(SED) -e 's/\a//g' tmp.html > doc/webserver/man-page/privoxy-man-page.html && $(RM) tmp.*
else
$(MAKE) groff2html
endif
+
# Otherwise we get plain groff conversion.
groff2html:
$(G2H_CMD) ./privoxy.1 | $(SED) -e 's@</head>@<link REL="STYLESHEET" TYPE="text/css" HREF="../p_doc.css"></head>@' > doc/webserver/man-page/privoxy-man-page.html
mv -f *html *txt ../../..
rm -fr $(DOC_TMP)
+# The main Privoxy config file, generated from sgml sources.
+# NOTE: This will require some hand editing. The new file is outputted
+# as config.new so that problem sections can be compared to previous
+# version. This is hardcored to w3m for html/text conversion. Also,
+# requires the shell util 'fmt'.
+config-file: dok-release
+ cd doc/source && $(DB)-notoc -iconfig-file -V nochunks config.sgml > __tmp.html &&\
+ w3m -dump __tmp.html |fmt -w 70 > ../../config.new && $(RM) -r __tmp.*
+ $(PERL) -pi.bak -e 's/^1\. \@\@TITLE\@\@/ /i;\
+ /^\d\.\d\.\s+/ && tr/[a-z]/[A-Z]/;\
+ $$header_len=0 unless $$hit_header;\
+ if ($$hit_header) {\
+ print "# ";\
+ for ($$i=1; $$i < $$header_len; $$i++) {print "=";}\
+ print "\n";\
+ };\
+ $$hit_header=0;\
+ $$hit_header=1 if m/^(\d\.)(\d\.)(\d\.)?\s/ && s/^(\d\.)//;\
+ $$header_len = length($$_);\
+ s/^/# /; /^# #{12,}/ && s/^# #/####/;\
+ s/^.*$$// if $$hit_option;\
+ $$hit_option=0;\
+ s/^\n//; s/^#\s*-{20,}//;\
+ $$hit_option=1 if s/^#\s+@@//;' config.new
+ $(RM) *.bak
+ @$(ECHO) "****************************************************"
+ @$(ECHO) "The output file is config.new."
+ @$(ECHO) "Now -- you need to hand edit the results!!!"
+ @$(ECHO) "In particular, check the Debug levels, and the"
+ @$(ECHO) "permit-access, forward & socks examples. They"
+ @$(ECHO) "probably got hammered."
+ @$(ECHO) "****************************************************"
+
+# config file, alternate verison using lynx (perl stuff unfinished). Lynx
+# does not do so good a job.
+config-file-alt:
+ cd doc/source && $(ECHO) -e ".h2 JUSTIFY\\nJUSTIFY:FALSE" > __tmp.lynx_cfg &&\
+ $(DB)-notoc -iconfig-file -V nochunks config.sgml > __tmp.html &&\
+ lynx -cfg=__tmp.lynx_cfg -width=78 -dump __tmp.html > ../../config.new && $(RM) -r __tmp.*
+ $(PERL) -pi -e 's/^( )//;\
+ s/:$\/:\n/' config.new
+
#############################################################################
#
# Webserver
## end:
# $Log: GNUmakefile.in,v $
+# Revision 1.104.2.6 2002/06/02 03:26:25 hal9
+# Update CONFIG_FILES (ie update basic.action, etc), and also DOC_FILES (exclude
+# index.html and team/index.html)
+#
+# Revision 1.104.2.5 2002/05/30 15:35:01 hal9
+# This is more cleanup on the make config-file target. Most issues for
+# automatic generation are taken care of. There are still some problems
+# that require hand editing. Namely, some of the examples that are > 80 chars.
+#
+# Revision 1.104.2.4 2002/05/29 02:12:17 hal9
+# Ooops...forgot about perl -pi cygwin problem. Add -pi.bak. Also, the
+# new target is 'make config-file', _not_ make config.
+#
+# Revision 1.104.2.3 2002/05/29 02:05:48 hal9
+# 'make config' target added (WIP) for future generation of config file from
+# text in u-m so the two are in sync. New generated config, which requires
+# some hand editing for the time being.
+#
+# Revision 1.104.2.2 2002/05/28 02:32:55 hal9
+# New target 'make dok-index' for privoxy-index.html. Also, fixed *.bak files
+# not being cleaned up in doc/webserver.
+#
# Revision 1.104.2.1 2002/05/26 17:19:34 hal9
# Remove Table of Contents from readme with oes's dsl trick.
#