1998-03-01 21:44:37 +01:00
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
#
|
2003-03-25 17:15:44 +01:00
|
|
|
# PostgreSQL documentation makefile
|
1998-03-01 21:44:37 +01:00
|
|
|
#
|
2005-01-04 22:03:30 +01:00
|
|
|
# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.75 2005/01/04 21:03:30 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
|
|
|
|
2002-04-14 19:23:20 +02:00
|
|
|
ifndef COLLATEINDEX
|
|
|
|
COLLATEINDEX = $(DOCBOOKSTYLE)/bin/collateindex.pl
|
2001-12-21 04:53:04 +01:00
|
|
|
endif
|
|
|
|
|
2000-11-05 22:04:07 +01:00
|
|
|
ifndef JADE
|
|
|
|
JADE = jade
|
|
|
|
endif
|
2003-03-25 17:15:44 +01:00
|
|
|
SGMLINCLUDE = -D $(srcdir)
|
2000-11-05 22:04:07 +01:00
|
|
|
|
2003-12-11 23:10:51 +01:00
|
|
|
# If this is a vpath build, some generated SGML will be in the build
|
|
|
|
# tree, so we need to make sure we look there as well as in the
|
|
|
|
# source tree
|
|
|
|
ifeq ($(vpath_build), yes)
|
|
|
|
SGMLINCLUDE += -D .
|
|
|
|
endif
|
|
|
|
|
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
|
|
|
|
|
1999-08-06 15:46:17 +02:00
|
|
|
# docbook2man generates man pages from docbook refentry source code.
|
|
|
|
D2MSCRIPT= $(D2MDIR)/docbook2man-spec.pl
|
|
|
|
|
1998-03-01 21:44:37 +01:00
|
|
|
|
2003-03-25 17:15:44 +01:00
|
|
|
GENERATED_SGML = bookindex.sgml version.sgml \
|
2003-01-15 00:19:34 +01:00
|
|
|
features-supported.sgml features-unsupported.sgml
|
|
|
|
|
|
|
|
ALLSGML := $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) $(GENERATED_SGML)
|
1999-08-06 15:46:17 +02:00
|
|
|
|
2002-04-14 19:23:20 +02:00
|
|
|
ifdef DOCBOOKSTYLE
|
|
|
|
CATALOG = -c $(DOCBOOKSTYLE)/catalog
|
|
|
|
endif
|
2001-02-13 22:27:05 +01:00
|
|
|
|
2002-08-05 21:43:31 +02:00
|
|
|
# Enable draft mode during development
|
|
|
|
ifneq (,$(findstring devel, $(VERSION)))
|
2003-08-28 00:58:54 +02:00
|
|
|
override JADEFLAGS += -V draft-mode
|
2002-08-05 21:43:31 +02:00
|
|
|
endif
|
|
|
|
|
2004-03-01 17:08:58 +01:00
|
|
|
# Enable some extra warnings
|
|
|
|
override SPFLAGS += -wall -wno-unused-param -wno-empty
|
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
|
|
|
|
2005-01-04 22:03:30 +01:00
|
|
|
fix_man_xrefs = $(PERL) -npi -e 's{\[XRef to GUC-([A-Z0-9-]*)\]}{($$l = $$1) =~ tr/A-Z-/a-z_/, $$l}ge || s{\[XRef to [A-Z0-9-]*\]}{the documentation}g'
|
|
|
|
|
2003-03-25 17:15:44 +01:00
|
|
|
man: postgres.sgml $(ALLSGML)
|
|
|
|
$(NSGMLS) $(NSGMLS_FLAGS) $< | $(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
|
2003-03-25 17:15:44 +01:00
|
|
|
$(NSGMLS) $(NSGMLS_FLAGS) $< | $(SGMLSPL) $(D2MSCRIPT) --lowercase --section $(DEFAULTSECTION) --date "`date '+%Y-%m-%d'`"
|
2005-01-04 22:03:30 +01:00
|
|
|
$(fix_man_xrefs) *.1 *.$(DEFAULTSECTION)
|
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
|
|
|
|
##
|
|
|
|
|
2003-03-25 17:15:44 +01:00
|
|
|
all: html
|
2000-11-24 18:44:22 +01:00
|
|
|
|
2003-03-25 17:15:44 +01:00
|
|
|
.PHONY: html
|
2000-11-24 18:44:22 +01:00
|
|
|
|
2003-04-10 03:22:45 +02:00
|
|
|
html: postgres.sgml $(ALLSGML) stylesheet.dsl
|
2001-02-13 22:27:05 +01:00
|
|
|
@rm -f *.html
|
2004-03-01 17:08:58 +01:00
|
|
|
$(JADE) $(JADEFLAGS) $(SPFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -i output-html -t sgml $<
|
2003-12-11 23:10:51 +01:00
|
|
|
ifeq ($(vpath_build), yes)
|
|
|
|
@cp $(srcdir)/stylesheet.css .
|
|
|
|
endif
|
2001-09-18 14:08:27 +02:00
|
|
|
|
|
|
|
|
2003-08-31 19:28:39 +02:00
|
|
|
COLLATEINDEX := LC_ALL=C $(PERL) $(COLLATEINDEX) -f -g
|
2001-05-13 00:51:36 +02:00
|
|
|
|
|
|
|
ifeq (,$(wildcard HTML.index))
|
|
|
|
bookindex.sgml:
|
|
|
|
$(COLLATEINDEX) -o $@ -N
|
|
|
|
else
|
|
|
|
bookindex.sgml: HTML.index
|
|
|
|
$(COLLATEINDEX) -i 'bookindex' -o $@ $<
|
|
|
|
endif
|
|
|
|
|
2002-10-12 18:34:28 +02:00
|
|
|
version.sgml: $(top_builddir)/src/Makefile.global
|
|
|
|
{ \
|
|
|
|
echo "<!entity version \"$(VERSION)\">"; \
|
|
|
|
echo "<!entity majorversion \"`expr $(VERSION) : '\([0-9][0-9]*\.[0-9][0-9]*\)'`\">"; \
|
|
|
|
} >$@
|
|
|
|
|
2003-01-15 00:19:34 +01:00
|
|
|
features-supported.sgml: $(top_srcdir)/src/backend/catalog/sql_feature_packages.txt $(top_srcdir)/src/backend/catalog/sql_features.txt
|
|
|
|
$(PERL) $(srcdir)/mk_feature_tables.pl YES $^ > $@
|
|
|
|
|
|
|
|
features-unsupported.sgml: $(top_srcdir)/src/backend/catalog/sql_feature_packages.txt $(top_srcdir)/src/backend/catalog/sql_features.txt
|
|
|
|
$(PERL) $(srcdir)/mk_feature_tables.pl NO $^ > $@
|
|
|
|
|
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
|
2003-03-25 17:15:44 +01:00
|
|
|
|
|
|
|
%.rtf: %.sgml $(ALLSGML) stylesheet.dsl
|
|
|
|
$(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -t rtf -V rtf-backend -i output-print $<
|
|
|
|
|
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.
|
|
|
|
|
2003-03-25 17:15:44 +01:00
|
|
|
%.tex-ps: %.sgml $(ALLSGML) stylesheet.dsl
|
|
|
|
$(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -t tex -V tex-backend -i output-print -V texdvi-output -o $@ $<
|
1998-03-01 21:44:37 +01:00
|
|
|
|
2003-03-25 17:15:44 +01:00
|
|
|
%.tex-pdf: %.sgml $(ALLSGML) stylesheet.dsl
|
|
|
|
$(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -t tex -V tex-backend -i output-print -V texpdf-output -o $@ $<
|
2001-11-09 00:46:29 +01:00
|
|
|
|
|
|
|
%.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.
|
2003-03-25 17:15:44 +01:00
|
|
|
%.fot: %.sgml $(ALLSGML) stylesheet.dsl
|
|
|
|
$(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -t fot -i output-print -o $@ $<
|
2001-11-09 00:46:29 +01:00
|
|
|
|
|
|
|
|
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
|
|
|
|
2002-04-14 19:23:20 +02:00
|
|
|
JADE.text = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -i output-text -t sgml
|
2002-11-11 21:06:00 +01:00
|
|
|
LYNX = lynx
|
2001-03-10 17:05:35 +01:00
|
|
|
|
2001-09-21 20:37:05 +02:00
|
|
|
INSTALL HISTORY regress_README: % : %.html
|
2004-03-06 03:52:46 +01:00
|
|
|
$(PERL) -p -e 's/<H(1|2)$$/<H\1 align=center/g' $< | $(LYNX) -force_html -dump -nolist -stdin >$@
|
2000-07-21 02:44:13 +02:00
|
|
|
|
2002-10-12 18:34:28 +02:00
|
|
|
INSTALL.html: standalone-install.sgml installation.sgml version.sgml
|
|
|
|
$(JADE.text) -V nochunks standalone-install.sgml installation.sgml >$@
|
2000-07-21 02:44:13 +02:00
|
|
|
|
2001-03-10 17:05:35 +01:00
|
|
|
HISTORY.html: release.sgml
|
2003-12-15 23:24:59 +01:00
|
|
|
( echo '<!doctype appendix PUBLIC "-//OASIS//DTD DocBook V4.2//EN">'; \
|
2001-03-10 17:05:35 +01:00
|
|
|
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
|
2003-12-15 23:24:59 +01:00
|
|
|
( echo '<!doctype chapter PUBLIC "-//OASIS//DTD DocBook V4.2//EN" ['; \
|
2001-09-21 20:37:05 +02:00
|
|
|
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
|
|
|
|
2004-01-13 19:45:19 +01:00
|
|
|
##
|
|
|
|
## Experimental XML stuff
|
|
|
|
##
|
|
|
|
|
|
|
|
OSX = osx # (may be called sx or sgml2xml on some systems)
|
|
|
|
XSLTPROC = xsltproc
|
|
|
|
|
|
|
|
postgres.xml: postgres.sgml $(GENERATED_SGML)
|
2004-01-16 00:51:32 +01:00
|
|
|
$(OSX) -x lower $< | \
|
|
|
|
sed -e 's/\[\(lt\|gt\|amp\|nbsp\|copy\|quot\|ouml\|uuml\|egrave\) *\]/\&\1;/g' \
|
|
|
|
-e '1a\' -e '<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">' \
|
|
|
|
>$@
|
2004-01-13 19:45:19 +01:00
|
|
|
|
|
|
|
testxml: stylesheet.xsl postgres.xml
|
2004-01-16 00:51:32 +01:00
|
|
|
$(XSLTPROC) $(XSLTPROCFLAGS) --stringparam pg.version '$(VERSION)' $^
|
2004-01-13 19:45:19 +01:00
|
|
|
|
2004-11-23 17:27:59 +01:00
|
|
|
htmlhelp: stylesheet-hh.xsl postgres.xml
|
|
|
|
$(XSLTPROC) $(XSLTPROCFLAGS) --stringparam pg.version '$(VERSION)' $^
|
|
|
|
|
2004-01-13 19:45:19 +01:00
|
|
|
|
2000-11-05 22:04:07 +01:00
|
|
|
##
|
|
|
|
## Check
|
|
|
|
##
|
|
|
|
|
|
|
|
# Quick syntax check without style processing
|
2003-03-25 17:15:44 +01:00
|
|
|
check: postgres.sgml $(ALLSGML)
|
2004-03-01 17:08:58 +01:00
|
|
|
$(NSGMLS) $(SPFLAGS) $(SGMLINCLUDE) -s $<
|
2000-11-05 22:04:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
## 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
|
2003-01-15 00:19:34 +01:00
|
|
|
rm -f HTML.index $(GENERATED_SGML)
|
2004-03-09 00:59:23 +01:00
|
|
|
# text
|
|
|
|
rm -f INSTALL HISTORY regress_README
|
2004-11-23 22:41:24 +01:00
|
|
|
# XML
|
|
|
|
rm -f postgres.xml htmlhelp.hhp toc.hhc index.hhk
|