1998-03-01 21:44:37 +01:00
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Makefile
|
|
|
|
# Postgres documentation makefile
|
|
|
|
# Thomas Lockhart
|
|
|
|
#
|
|
|
|
# Copyright (c) 1994, Regents of the University of California
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# IDENTIFICATION
|
2001-11-18 21:35:02 +01:00
|
|
|
# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.45 2001/11/18 20:35:02 petere Exp $
|
1998-03-01 21:44:37 +01:00
|
|
|
#
|
|
|
|
#----------------------------------------------------------------------------
|
1998-03-01 09:18:09 +01:00
|
|
|
|
2000-08-31 18:12:35 +02:00
|
|
|
subdir = doc/src/sgml
|
|
|
|
top_builddir = ../../..
|
2000-11-05 22:04:07 +01:00
|
|
|
include $(top_builddir)/src/Makefile.global
|
2000-08-31 18:12:35 +02:00
|
|
|
|
2000-12-14 23:30:56 +01:00
|
|
|
.SECONDARY:
|
2001-01-06 17:54:16 +01:00
|
|
|
.NOTPARALLEL:
|
1998-03-01 21:44:37 +01:00
|
|
|
|
2000-11-05 22:04:07 +01:00
|
|
|
ifndef DOCBOOKSTYLE
|
2001-04-20 17:52:33 +02:00
|
|
|
DOCBOOKSTYLE = /home/projects/pgsql/developers/thomas/db162.d/docbook
|
2000-11-05 22:04:07 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef JADE
|
|
|
|
JADE = jade
|
|
|
|
endif
|
2001-11-09 00:46:29 +01:00
|
|
|
SGMLINCLUDE = -D $(srcdir) -D $(srcdir)/ref
|
2000-11-05 22:04:07 +01:00
|
|
|
|
|
|
|
ifndef NSGMLS
|
|
|
|
NSGMLS = nsgmls
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef SGMLSPL
|
|
|
|
SGMLSPL = sgmlspl
|
|
|
|
endif
|
1998-07-29 08:29:04 +02:00
|
|
|
|
2001-11-09 00:46:29 +01:00
|
|
|
CONVERT = convert
|
|
|
|
EPSTOPDF = epstopdf
|
|
|
|
|
1998-03-01 21:44:37 +01:00
|
|
|
|
1999-08-06 15:46:17 +02:00
|
|
|
# docbook2man generates man pages from docbook refentry source code.
|
|
|
|
|
2000-11-05 22:04:07 +01:00
|
|
|
ifndef D2MDIR
|
|
|
|
# This is where the (patched) docbook2man perl scripts reside on hub.org.
|
1999-08-06 15:46:17 +02:00
|
|
|
D2MDIR= /home/users/t/thomas/d2x/docbook2man
|
2000-11-05 22:04:07 +01:00
|
|
|
endif
|
1999-08-06 15:46:17 +02:00
|
|
|
D2MSCRIPT= $(D2MDIR)/docbook2man-spec.pl
|
|
|
|
|
2000-11-05 22:04:07 +01:00
|
|
|
vpath %.sgml ./ref
|
1998-03-01 21:44:37 +01:00
|
|
|
|
2000-11-24 18:44:22 +01:00
|
|
|
ALLBOOKS = admin developer programmer reference tutorial user
|
1998-03-01 21:44:37 +01:00
|
|
|
|
2001-05-13 00:51:36 +02:00
|
|
|
ALLSGML := $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) bookindex.sgml setindex.sgml
|
1999-08-06 15:46:17 +02:00
|
|
|
|
2001-05-13 00:51:36 +02:00
|
|
|
CATALOG = $(DOCBOOKSTYLE)/catalog
|
2001-02-13 22:27:05 +01:00
|
|
|
|
|
|
|
|
2000-11-05 22:04:07 +01:00
|
|
|
##
|
|
|
|
## Man pages
|
|
|
|
##
|
1998-03-01 21:44:37 +01:00
|
|
|
|
2001-01-06 17:54:16 +01:00
|
|
|
.PHONY: man
|
1999-08-06 15:46:17 +02:00
|
|
|
|
2001-08-29 21:14:40 +02:00
|
|
|
DEFAULTSECTION := $(sqlmansect_dummy)
|
1998-03-01 21:44:37 +01:00
|
|
|
|
2001-01-06 17:54:16 +01:00
|
|
|
man: $(ALLSGML)
|
|
|
|
$(NSGMLS) $(NSGMLS_FLAGS) $(srcdir)/book-decl.sgml $(srcdir)/reference.sgml \
|
2001-11-18 21:35:02 +01:00
|
|
|
| $(SGMLSPL) $(D2MSCRIPT) --lowercase --section $(DEFAULTSECTION) --date "`date '+%Y-%m-%d'`"
|
2001-01-06 17:54:16 +01:00
|
|
|
# One more time, to resolve cross-references
|
|
|
|
$(NSGMLS) $(NSGMLS_FLAGS) $(srcdir)/book-decl.sgml $(srcdir)/reference.sgml \
|
2001-11-18 21:35:02 +01:00
|
|
|
| $(SGMLSPL) $(D2MSCRIPT) --lowercase --section $(DEFAULTSECTION) --date "`date '+%Y-%m-%d'`"
|
2001-01-06 17:54:16 +01:00
|
|
|
$(mkinstalldirs) man1 man$(DEFAULTSECTION)
|
|
|
|
mv *.1 man1/
|
|
|
|
mv *.$(DEFAULTSECTION) man$(DEFAULTSECTION)/
|
1998-03-01 21:44:37 +01:00
|
|
|
|
2000-11-05 22:04:07 +01:00
|
|
|
|
|
|
|
##
|
|
|
|
## HTML
|
|
|
|
##
|
|
|
|
|
2001-05-13 00:51:36 +02:00
|
|
|
JADE.html = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -c $(CATALOG) -d stylesheet.dsl -i output-html -t sgml
|
2000-11-24 18:44:22 +01:00
|
|
|
|
2001-05-13 00:51:36 +02:00
|
|
|
postgres.html: postgres.sgml $(ALLSGML) stylesheet.dsl
|
2001-02-13 22:27:05 +01:00
|
|
|
@rm -f *.html
|
2000-11-24 18:44:22 +01:00
|
|
|
$(JADE.html) $<
|
2001-09-18 14:08:27 +02:00
|
|
|
ln -sf index.html $@
|
2000-11-24 18:44:22 +01:00
|
|
|
|
2001-05-13 00:51:36 +02:00
|
|
|
$(addsuffix .html, $(ALLBOOKS)): %.html: %.sgml $(ALLSGML) stylesheet.dsl
|
2001-02-13 22:27:05 +01:00
|
|
|
@rm -f *.html
|
2000-11-24 18:44:22 +01:00
|
|
|
$(JADE.html) book-decl.sgml $<
|
2001-09-18 14:08:27 +02:00
|
|
|
ln -sf index.html $@
|
|
|
|
|
|
|
|
programmer.html: catalogs.gif connections.gif
|
2001-11-09 00:46:29 +01:00
|
|
|
postgres.html: catalogs.gif connections.gif
|
2001-09-18 14:08:27 +02:00
|
|
|
|
1998-03-01 21:44:37 +01:00
|
|
|
|
2001-05-13 00:51:36 +02:00
|
|
|
COLLATEINDEX = $(PERL) $(DOCBOOKSTYLE)/bin/collateindex.pl -f -g -t 'Index'
|
|
|
|
|
|
|
|
ifeq (,$(wildcard HTML.index))
|
|
|
|
bookindex.sgml:
|
|
|
|
$(COLLATEINDEX) -o $@ -N
|
|
|
|
setindex.sgml:
|
|
|
|
$(COLLATEINDEX) -x -o $@ -N
|
|
|
|
else
|
|
|
|
bookindex.sgml: HTML.index
|
|
|
|
$(COLLATEINDEX) -i 'bookindex' -o $@ $<
|
|
|
|
setindex.sgml: HTML.index
|
|
|
|
$(COLLATEINDEX) -i 'setindex' -x -o $@ $<
|
|
|
|
endif
|
|
|
|
|
1998-03-01 21:44:37 +01:00
|
|
|
|
2000-11-05 22:04:07 +01:00
|
|
|
##
|
|
|
|
## Print
|
|
|
|
##
|
1998-03-01 21:44:37 +01:00
|
|
|
|
2000-11-05 22:04:07 +01:00
|
|
|
# RTF to allow minor editing for hardcopy
|
2001-05-13 00:51:36 +02:00
|
|
|
$(addsuffix .rtf, $(ALLBOOKS)): %.rtf: %.sgml $(ALLSGML) stylesheet.dsl
|
|
|
|
$(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -c $(CATALOG) -d stylesheet.dsl -t rtf -V rtf-backend -i output-print book-decl.sgml $<
|
1998-03-01 21:44:37 +01:00
|
|
|
|
2001-11-09 00:46:29 +01:00
|
|
|
# TeX
|
|
|
|
# Regular TeX and pdfTeX have slightly differing requirements, so we
|
|
|
|
# need to distinguish the path we're taking.
|
|
|
|
|
|
|
|
$(addsuffix .tex-ps, $(ALLBOOKS)): %.tex-ps: %.sgml $(ALLSGML) stylesheet.dsl
|
|
|
|
$(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -c $(CATALOG) -d stylesheet.dsl -t tex -V tex-backend -i output-print -V texdvi-output -o $@ book-decl.sgml $<
|
2001-10-05 00:25:48 +02:00
|
|
|
# TeX transforms '--' into en-dashes. This hack should go away when
|
|
|
|
# OpenJade is fixed (ver. 1.4?)
|
|
|
|
$(PERL) -pi -e 's/\-\-/\\mbox{}-\\mbox{}-\\mbox{}/g' $@
|
2001-10-09 20:46:00 +02:00
|
|
|
$(PERL) -pi -e 's/\<\</\\mbox{}<\\mbox{}<\\mbox{}/g' $@
|
|
|
|
$(PERL) -pi -e 's/\>\>/\\mbox{}>\\mbox{}>\\mbox{}/g' $@
|
|
|
|
$(PERL) -pi -e "s/\'\'/\\\\mbox{}'\\\\mbox{}'\\\\mbox{}/g" $@
|
1998-03-01 21:44:37 +01:00
|
|
|
|
2001-11-09 00:46:29 +01:00
|
|
|
programmer.tex-ps: catalogs.eps connections.eps
|
|
|
|
|
|
|
|
$(addsuffix .tex-pdf, $(ALLBOOKS)): %.tex-pdf: %.sgml $(ALLSGML) stylesheet.dsl
|
|
|
|
$(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -c $(CATALOG) -d stylesheet.dsl -t tex -V tex-backend -i output-print -V texpdf-output -o $@ book-decl.sgml $<
|
|
|
|
$(PERL) -pi -e 's/\-\-/\\mbox{}-\\mbox{}-\\mbox{}/g' $@
|
|
|
|
$(PERL) -pi -e 's/\<\</\\mbox{}<\\mbox{}<\\mbox{}/g' $@
|
|
|
|
$(PERL) -pi -e 's/\>\>/\\mbox{}>\\mbox{}>\\mbox{}/g' $@
|
|
|
|
$(PERL) -pi -e "s/\'\'/\\\\mbox{}'\\\\mbox{}'\\\\mbox{}/g" $@
|
|
|
|
|
|
|
|
programmer.tex-pdf: catalogs.pdf connections.pdf
|
|
|
|
|
|
|
|
%.dvi: %.tex-ps
|
2001-11-16 17:29:56 +01:00
|
|
|
@rm -f $*.aux $*.log
|
1998-03-01 21:44:37 +01:00
|
|
|
jadetex $<
|
|
|
|
jadetex $<
|
2001-02-04 13:23:11 +01:00
|
|
|
jadetex $<
|
1998-03-01 21:44:37 +01:00
|
|
|
|
|
|
|
# Postscript from TeX
|
|
|
|
%.ps: %.dvi
|
|
|
|
dvips -o $@ $<
|
|
|
|
|
2001-11-09 00:46:29 +01:00
|
|
|
%.pdf: %.tex-pdf
|
2001-11-16 17:29:56 +01:00
|
|
|
@rm -f $*.aux $*.log $*.out
|
2001-02-04 13:23:11 +01:00
|
|
|
pdfjadetex $<
|
|
|
|
pdfjadetex $<
|
|
|
|
pdfjadetex $<
|
|
|
|
|
|
|
|
|
2001-11-09 00:46:29 +01:00
|
|
|
# This generates an XML version of the flow-object tree. It's useful
|
|
|
|
# for debugging DSSSL code, and possibly to interface to some other
|
|
|
|
# tools that can make use of this.
|
|
|
|
$(addsuffix .fot, $(ALLBOOKS)): %.fot: %.sgml $(ALLSGML) stylesheet.dsl
|
|
|
|
$(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -c $(CATALOG) -d stylesheet.dsl -t fot -i output-print -o $@ book-decl.sgml $<
|
|
|
|
|
|
|
|
|
1998-03-01 21:44:37 +01:00
|
|
|
# Graphics
|
|
|
|
|
|
|
|
%.gif:
|
2001-09-18 14:08:27 +02:00
|
|
|
cp $(srcdir)/../graphics/$@ .
|
1998-03-01 09:18:09 +01:00
|
|
|
|
2001-11-09 00:46:29 +01:00
|
|
|
%.eps: %.gif
|
|
|
|
$(CONVERT) $< eps:$@
|
|
|
|
|
|
|
|
%.pdf: %.eps
|
|
|
|
$(EPSTOPDF) $<
|
|
|
|
|
2000-07-21 02:44:13 +02:00
|
|
|
|
2000-11-05 22:04:07 +01:00
|
|
|
##
|
|
|
|
## Semi-automatic generation of some text files.
|
|
|
|
##
|
2000-10-17 17:26:40 +02:00
|
|
|
|
2001-05-13 00:51:36 +02:00
|
|
|
JADE.text = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -c $(CATALOG) -d stylesheet.dsl -i output-text -t sgml
|
2001-03-10 17:05:35 +01:00
|
|
|
|
2001-09-21 20:37:05 +02:00
|
|
|
INSTALL HISTORY regress_README: % : %.html
|
2000-07-21 02:44:13 +02:00
|
|
|
@echo "|";\
|
2001-09-21 20:37:05 +02:00
|
|
|
echo "| You should now take '$<', save it as a text file in Netscape,";\
|
|
|
|
echo "| and put it in place of the existing '$@' file.";\
|
2000-07-21 02:44:13 +02:00
|
|
|
echo "|"
|
|
|
|
|
2001-03-10 17:05:35 +01:00
|
|
|
INSTALL.html: standalone-install.sgml installation.sgml
|
|
|
|
$(JADE.text) -V nochunks $+ >$@
|
2000-07-21 02:44:13 +02:00
|
|
|
|
2001-03-10 17:05:35 +01:00
|
|
|
HISTORY.html: release.sgml
|
|
|
|
( echo '<!doctype appendix PUBLIC "-//OASIS//DTD DocBook V3.1//EN">'; \
|
|
|
|
cat $< ) >tempfile_HISTORY.sgml
|
|
|
|
$(JADE.text) -V nochunks tempfile_HISTORY.sgml >$@
|
|
|
|
rm tempfile_HISTORY.sgml
|
2000-11-05 22:04:07 +01:00
|
|
|
|
2001-09-21 20:37:05 +02:00
|
|
|
regress_README.html: regress.sgml
|
|
|
|
( echo '<!doctype chapter PUBLIC "-//OASIS//DTD DocBook V3.1//EN" ['; \
|
|
|
|
echo '<!entity % standalone-ignore "IGNORE"> ]>'; \
|
|
|
|
cat $< ) >tempfile_regress_README.sgml
|
|
|
|
$(JADE.text) -V nochunks tempfile_regress_README.sgml >$@
|
|
|
|
rm tempfile_regress_README.sgml
|
|
|
|
|
2000-11-05 22:04:07 +01:00
|
|
|
|
|
|
|
##
|
|
|
|
## Check
|
|
|
|
##
|
|
|
|
|
2000-11-24 18:44:22 +01:00
|
|
|
check: $(addprefix check-, $(ALLBOOKS)) check-postgres
|
2000-11-05 22:04:07 +01:00
|
|
|
|
|
|
|
# Quick syntax check without style processing
|
2000-11-24 18:44:22 +01:00
|
|
|
$(addprefix check-, $(ALLBOOKS)): check-%: %.sgml
|
|
|
|
$(NSGMLS) $(SGMLINCLUDE) -s book-decl.sgml $<
|
|
|
|
|
|
|
|
check-postgres: postgres.sgml
|
2000-11-05 22:04:07 +01:00
|
|
|
$(NSGMLS) $(SGMLINCLUDE) -s $<
|
|
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
## Clean
|
|
|
|
##
|
|
|
|
|
|
|
|
clean distclean maintainer-clean:
|
|
|
|
# HTML
|
2001-09-18 14:08:27 +02:00
|
|
|
rm -f HTML.manifest *.html *.gif
|
2000-11-05 22:04:07 +01:00
|
|
|
# man
|
2001-02-13 22:27:05 +01:00
|
|
|
rm -rf *.1 *.$(DEFAULTSECTION) man1 man$(DEFAULTSECTION) manpage.refs manpage.links manpage.log
|
2000-11-05 22:04:07 +01:00
|
|
|
# print
|
2001-11-09 00:46:29 +01:00
|
|
|
rm -f *.rtf *.tex-ps *.tex-pdf *.dvi *.aux *.log *.ps *.pdf *.out *.eps *.fot
|
2001-05-13 00:51:36 +02:00
|
|
|
# index
|
|
|
|
rm -f HTML.index bookindex.sgml setindex.sgml
|