# Note: Makefile is built automatically from Makefile.in
#
# $Id: GNUmakefile.in,v 1.1 2002/06/05 00:28:28 hal9 Exp $
#
# Location: doc/source/Makefile.in
# Purpose: Build documentation
#
# Written by and Copyright (C) 2002 the Privoxy
# team. http://www.privoxy.org/
#
# This program is free software; you can redistribute it
# and/or modify it under the terms of the GNU General
# Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# The GNU General Public License should be included with
# this file. If not, you can view it at
# http://www.gnu.org/copyleft/gpl.html
# or write to the Free Software Foundation, Inc., 59
# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#############################################################################
# Set make command correctly
#############################################################################
@SET_MAKE@
#############################################################################
# Version number (for RPM)
#############################################################################
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
VERSION_POINT = @VERSION_POINT@
CODE_STATUS = @CODE_STATUS@
VERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_POINT)
#############################################################################
# Build tools
#############################################################################
PROGRAM = privoxy@EXEEXT@
ECHO = echo
INSTALL = @INSTALL@
RM = rm -fr
SED = sed
CAT = cat
MV = mv -f
WDUMP = @WDUMP@ -dump
JADECAT = @JADECAT@
JADEBIN = @JADEBIN@
DOC_STATUS = @DOC_STATUS@
MAN2HTML = @MAN2HTML@
# Note: Please make sure that -d ldp.dsl\#html stays the last option to
# $(JADEBIN), because for some targets "-notoc" will be appended
# to it (--> "ldp.dsl\#html-notoc").
DB = $(JADEBIN) $(JADECAT) $(DOC_STATUS) -ihtml -t sgml -D.. -d ldp.dsl\#html
G2H_CMD = groff -mandoc -Thtml
TARGET_OS = @host@
PERL = perl
DOC_DIR = .
DOC_TMP = $(DOC_DIR)/tmp
ROOT = ../..
DOK_WEB_USEM=$(ROOT)/webserver/user-manual
DOC_FILES = AUTHORS LICENSE README ChangeLog \
`find ../text/ -type f | grep -v "CVS" | grep -v "\.\#" | grep -v ".*~" | grep -v ".cvsignore" | grep -v "TAGS"` \
`find ../webserver/ -name "*.html" | grep -v "\(webserver\|team\)\/index\.html"` \
`find ../webserver/ -name "*.css"` \
$(ROOT)/privoxy.1
#############################################################################
# Phony targets
#############################################################################
.PHONY: all dok webserver dok-webserver clean dok-clean clobber ensure-wdump \
ensure-jadebin ensure-dkprefix user dok-user devel dok-devel faq dok-faq \
readme dok-readme authors dok-authors index dok-index webserver dok-webserver \
man dok-man man2html manuals dok-release dok-pdf dok-pdf2 announce config-file
#############################################################################
#
# Documentation
#
# converts *.sgml into html, text and man pages
#
#############################################################################
#
# Build the Manuals, etc #########################################
# This does not build _all_ targets #########################################
all: dok-release dok-user dok-devel dok-faq dok-index dok-readme dok-authors dok-clean
@$(ECHO) Documentation created.
# Shortcuts. Use these targets.
clean: dok-clean
index: dok-release dok-webserver dok-index dok-clean
user: dok-release dok-user dok-clean
devel: dok-release dok-devel dok-clean
faq: dok-release dok-faq dok-clean
manuals: dok-release dok-user dok-devel dok-faq dok-clean
readme: dok-release dok-readme dok-clean
webserver: dok-release dok-webserver dok-clean
man: dok-release dok-man dok-clean
authors: dok-release dok-authors dok-clean
# 3 checks to make sure docs will be generated
ensure-wdump:
ifeq (@WDUMP@,false)
@$(ECHO)
@$(ECHO) "Cannot build docs; one of w3m, links, or lynx must be installed."
@$(ECHO) "You should install the appropriate package and rerun ./configure"
@exit 1
endif
ensure-jadebin:
ifeq (@JADEBIN@,false)
@$(ECHO)
@$(ECHO) "Cannot build docs; one of openjade or jade must be installed"
@$(ECHO) "You should install the appropriate package and rerun ./configure"
@exit 1
endif
ensure-dkprefix:
ifeq (@DKPREFIX@,false)
@$(ECHO)
@$(ECHO) "Cannot build docs; cannot find docbook-dsssl stylesheets"
@$(ECHO) "You should install the appropriate package and rerun ./configure"
@exit 1
endif
# user manual
dok-user: ensure-dkprefix ensure-jadebin ensure-wdump
cd $(DOC_TMP) && $(RM) * && $(DB) -iuser-man ../user-manual.sgml && cd .. && \
$(RM) ../webserver/user-manual/*.html && cp $(DOC_TMP)/*.html ../webserver/user-manual/
$(DB) -iuser-man -V nochunks user-manual.sgml > tmp.html && $(WDUMP) tmp.html > ../text/user-manual.txt
# developer manual
dok-devel: ensure-dkprefix ensure-jadebin ensure-wdump
cd $(DOC_TMP) && $(RM) * && $(DB) ../developer-manual.sgml && cd .. && \
$(RM) ../webserver/developer-manual/*.html && cp -f $(DOC_TMP)/*.html ../webserver/developer-manual/
$(DB) -V nochunks developer-manual.sgml > tmp.html && $(WDUMP) tmp.html > ../text/developer-manual.txt
# faq
dok-faq: ensure-dkprefix ensure-jadebin ensure-wdump
cd $(DOC_TMP) && $(RM) * && $(DB) ../faq.sgml && cd .. && \
$(RM) ../webserver/faq/*.html && cp $(DOC_TMP)/*.html ../webserver/faq/
$(DB) -V nochunks faq.sgml > tmp.html && $(WDUMP) tmp.html > ../text/faq.txt
# man page, using one variant of man2html that reads page from stdin.
dok-man-suse: ensure-dkprefix ensure-jadebin ensure-wdump dok-release
$(RM) ../webserver/man-page/*.html
ifneq ($(MAN2HTML),false)
$(ECHO) "