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
|
|
|
#
|
2009-08-12 00:21:51 +02:00
|
|
|
# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.125 2009/08/11 22:21:51 petere Exp $
|
1998-03-01 21:44:37 +01:00
|
|
|
#
|
|
|
|
#----------------------------------------------------------------------------
|
1998-03-01 09:18:09 +01:00
|
|
|
|
2009-08-10 00:47:59 +02:00
|
|
|
# This makefile is for building and installing the documentation.
|
|
|
|
# When a release tarball is created, the documentation files are
|
|
|
|
# prepared using the distprep target. In CVS-based trees these files
|
|
|
|
# don't exist, unless explicitly built, so we skip the installation in
|
|
|
|
# that case.
|
|
|
|
|
|
|
|
|
|
|
|
# Make "html" the default target, since that is what most people tend
|
|
|
|
# to want to use.
|
|
|
|
html:
|
|
|
|
|
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
|
|
|
|
2009-08-10 00:47:59 +02:00
|
|
|
|
|
|
|
distprep: html man
|
|
|
|
|
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
|
|
|
|
|
|
|
ifndef NSGMLS
|
|
|
|
NSGMLS = nsgmls
|
|
|
|
endif
|
|
|
|
|
2009-08-05 00:04:37 +02:00
|
|
|
ifndef OSX
|
|
|
|
OSX = osx
|
2000-11-05 22:04:07 +01:00
|
|
|
endif
|
1998-07-29 08:29:04 +02:00
|
|
|
|
2009-08-05 00:04:37 +02:00
|
|
|
ifndef XSLTPROC
|
|
|
|
XSLTPROC = xsltproc
|
2008-11-26 12:26:54 +01:00
|
|
|
endif
|
|
|
|
|
2009-08-05 00:04:37 +02:00
|
|
|
override XSLTPROCFLAGS += --stringparam pg.version '$(VERSION)'
|
1999-08-06 15:46:17 +02:00
|
|
|
|
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
|
|
|
|
Rearrangement of the HTML docs build rules
Set up proper makefile dependencies in the documentation build rules,
especially around the HTML/index build. The problem we've had with all
previous solutions is that we have used the same file name, such as HTML.index
or bookindex.sgml, to mean different things at different stages of the build,
and make can't distinguish that. The solution here is that the first jade run
produces HTML.index, but does not require bookindex.sgml at all, and produces
no other html output (the latter an idea from Alvaro). The second jade run
includes bookindex.sgml, but does not recreate HTML.index. That way, when you
change an sgml file, jade is run twice and at the end all dependencies are
satisfied. Omitting the html output in the first stage also makes the full
build a lot faster.
When you run one of the print format targets, only the first jade run is run,
then the print target-specific commands. If an HTML build has completed
previously, the first jade run is skipped because the dependencies have
already been satisfied.
The draft and check targets for quick builds and syntax verification are still
there.
2009-07-15 00:16:38 +02:00
|
|
|
# Sometimes we don't want this one.
|
|
|
|
ALMOSTALLSGML := $(filter-out %bookindex.sgml,$(ALLSGML))
|
|
|
|
|
2002-04-14 19:23:20 +02:00
|
|
|
ifdef DOCBOOKSTYLE
|
|
|
|
CATALOG = -c $(DOCBOOKSTYLE)/catalog
|
|
|
|
endif
|
2001-02-13 22:27:05 +01:00
|
|
|
|
2004-03-01 17:08:58 +01:00
|
|
|
# Enable some extra warnings
|
2007-08-31 18:41:52 +02:00
|
|
|
# -wfully-tagged needed to throw a warning on missing tags
|
|
|
|
# for older tool chains, 2007-08-31
|
2008-10-04 04:19:08 +02:00
|
|
|
# Note: try "make SPFLAGS=-wxml" to catch a lot of other dubious constructs,
|
|
|
|
# in particular < and & that haven't been made into entities. It's far too
|
|
|
|
# noisy to turn on by default, unfortunately.
|
2007-08-31 04:03:02 +02:00
|
|
|
override SPFLAGS += -wall -wno-unused-param -wno-empty -wfully-tagged
|
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
|
|
|
|
2009-08-05 00:04:37 +02:00
|
|
|
man: man-stamp
|
1998-03-01 21:44:37 +01:00
|
|
|
|
2009-08-10 00:47:59 +02:00
|
|
|
ifeq ($(vpath_build),yes)
|
|
|
|
XSLTPROC_MAN_FLAGS = --stringparam man.output.base.dir '$(srcdir)/'
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(srcdir)/man-stamp: stylesheet-man.xsl postgres.xml
|
|
|
|
$(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTPROC_MAN_FLAGS) $^
|
|
|
|
rm $(srcdir)/man1/dblink*
|
2009-08-05 00:04:37 +02:00
|
|
|
touch $@
|
1998-03-01 21:44:37 +01:00
|
|
|
|
2000-11-05 22:04:07 +01:00
|
|
|
|
|
|
|
##
|
|
|
|
## HTML
|
|
|
|
##
|
|
|
|
|
2009-08-10 00:47:59 +02:00
|
|
|
.PHONY: draft
|
2009-08-05 00:04:37 +02:00
|
|
|
|
Rearrangement of the HTML docs build rules
Set up proper makefile dependencies in the documentation build rules,
especially around the HTML/index build. The problem we've had with all
previous solutions is that we have used the same file name, such as HTML.index
or bookindex.sgml, to mean different things at different stages of the build,
and make can't distinguish that. The solution here is that the first jade run
produces HTML.index, but does not require bookindex.sgml at all, and produces
no other html output (the latter an idea from Alvaro). The second jade run
includes bookindex.sgml, but does not recreate HTML.index. That way, when you
change an sgml file, jade is run twice and at the end all dependencies are
satisfied. Omitting the html output in the first stage also makes the full
build a lot faster.
When you run one of the print format targets, only the first jade run is run,
then the print target-specific commands. If an HTML build has completed
previously, the first jade run is skipped because the dependencies have
already been satisfied.
The draft and check targets for quick builds and syntax verification are still
there.
2009-07-15 00:16:38 +02:00
|
|
|
JADE.html.call = $(JADE) $(JADEFLAGS) $(SPFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -t sgml -i output-html
|
2009-08-10 00:47:59 +02:00
|
|
|
ifeq ($(vpath_build),yes)
|
|
|
|
# This only works with openjade, not with the older jade.
|
|
|
|
JADE.html.call += -V '(define %output-dir% "$(srcdir)/html")'
|
|
|
|
endif
|
Rearrangement of the HTML docs build rules
Set up proper makefile dependencies in the documentation build rules,
especially around the HTML/index build. The problem we've had with all
previous solutions is that we have used the same file name, such as HTML.index
or bookindex.sgml, to mean different things at different stages of the build,
and make can't distinguish that. The solution here is that the first jade run
produces HTML.index, but does not require bookindex.sgml at all, and produces
no other html output (the latter an idea from Alvaro). The second jade run
includes bookindex.sgml, but does not recreate HTML.index. That way, when you
change an sgml file, jade is run twice and at the end all dependencies are
satisfied. Omitting the html output in the first stage also makes the full
build a lot faster.
When you run one of the print format targets, only the first jade run is run,
then the print target-specific commands. If an HTML build has completed
previously, the first jade run is skipped because the dependencies have
already been satisfied.
The draft and check targets for quick builds and syntax verification are still
there.
2009-07-15 00:16:38 +02:00
|
|
|
|
|
|
|
# The draft target creates HTML output in draft mode, without index (for faster build).
|
|
|
|
draft: postgres.sgml $(ALMOSTALLSGML) stylesheet.dsl
|
2009-08-10 00:47:59 +02:00
|
|
|
$(mkinstalldirs) $(srcdir)/html
|
Rearrangement of the HTML docs build rules
Set up proper makefile dependencies in the documentation build rules,
especially around the HTML/index build. The problem we've had with all
previous solutions is that we have used the same file name, such as HTML.index
or bookindex.sgml, to mean different things at different stages of the build,
and make can't distinguish that. The solution here is that the first jade run
produces HTML.index, but does not require bookindex.sgml at all, and produces
no other html output (the latter an idea from Alvaro). The second jade run
includes bookindex.sgml, but does not recreate HTML.index. That way, when you
change an sgml file, jade is run twice and at the end all dependencies are
satisfied. Omitting the html output in the first stage also makes the full
build a lot faster.
When you run one of the print format targets, only the first jade run is run,
then the print target-specific commands. If an HTML build has completed
previously, the first jade run is skipped because the dependencies have
already been satisfied.
The draft and check targets for quick builds and syntax verification are still
there.
2009-07-15 00:16:38 +02:00
|
|
|
$(JADE.html.call) -V draft-mode $<
|
2009-08-10 00:47:59 +02:00
|
|
|
cp $(srcdir)/stylesheet.css $(srcdir)/html/
|
2007-10-07 02:32:11 +02:00
|
|
|
|
Rearrangement of the HTML docs build rules
Set up proper makefile dependencies in the documentation build rules,
especially around the HTML/index build. The problem we've had with all
previous solutions is that we have used the same file name, such as HTML.index
or bookindex.sgml, to mean different things at different stages of the build,
and make can't distinguish that. The solution here is that the first jade run
produces HTML.index, but does not require bookindex.sgml at all, and produces
no other html output (the latter an idea from Alvaro). The second jade run
includes bookindex.sgml, but does not recreate HTML.index. That way, when you
change an sgml file, jade is run twice and at the end all dependencies are
satisfied. Omitting the html output in the first stage also makes the full
build a lot faster.
When you run one of the print format targets, only the first jade run is run,
then the print target-specific commands. If an HTML build has completed
previously, the first jade run is skipped because the dependencies have
already been satisfied.
The draft and check targets for quick builds and syntax verification are still
there.
2009-07-15 00:16:38 +02:00
|
|
|
html: html-stamp
|
2007-10-07 02:32:11 +02:00
|
|
|
|
2009-08-10 00:47:59 +02:00
|
|
|
$(srcdir)/html-stamp: postgres.sgml $(ALLSGML) stylesheet.dsl
|
|
|
|
$(mkinstalldirs) $(srcdir)/html
|
Rearrangement of the HTML docs build rules
Set up proper makefile dependencies in the documentation build rules,
especially around the HTML/index build. The problem we've had with all
previous solutions is that we have used the same file name, such as HTML.index
or bookindex.sgml, to mean different things at different stages of the build,
and make can't distinguish that. The solution here is that the first jade run
produces HTML.index, but does not require bookindex.sgml at all, and produces
no other html output (the latter an idea from Alvaro). The second jade run
includes bookindex.sgml, but does not recreate HTML.index. That way, when you
change an sgml file, jade is run twice and at the end all dependencies are
satisfied. Omitting the html output in the first stage also makes the full
build a lot faster.
When you run one of the print format targets, only the first jade run is run,
then the print target-specific commands. If an HTML build has completed
previously, the first jade run is skipped because the dependencies have
already been satisfied.
The draft and check targets for quick builds and syntax verification are still
there.
2009-07-15 00:16:38 +02:00
|
|
|
$(JADE.html.call) -i include-index $<
|
2009-08-10 00:47:59 +02:00
|
|
|
cp $(srcdir)/stylesheet.css $(srcdir)/html/
|
Rearrangement of the HTML docs build rules
Set up proper makefile dependencies in the documentation build rules,
especially around the HTML/index build. The problem we've had with all
previous solutions is that we have used the same file name, such as HTML.index
or bookindex.sgml, to mean different things at different stages of the build,
and make can't distinguish that. The solution here is that the first jade run
produces HTML.index, but does not require bookindex.sgml at all, and produces
no other html output (the latter an idea from Alvaro). The second jade run
includes bookindex.sgml, but does not recreate HTML.index. That way, when you
change an sgml file, jade is run twice and at the end all dependencies are
satisfied. Omitting the html output in the first stage also makes the full
build a lot faster.
When you run one of the print format targets, only the first jade run is run,
then the print target-specific commands. If an HTML build has completed
previously, the first jade run is skipped because the dependencies have
already been satisfied.
The draft and check targets for quick builds and syntax verification are still
there.
2009-07-15 00:16:38 +02:00
|
|
|
touch $@
|
2007-01-27 23:44:32 +01:00
|
|
|
|
2009-08-10 00:47:59 +02:00
|
|
|
$(srcdir)/HTML.index: postgres.sgml $(ALMOSTALLSGML) stylesheet.dsl
|
|
|
|
@$(mkinstalldirs) $(srcdir)/html
|
Rearrangement of the HTML docs build rules
Set up proper makefile dependencies in the documentation build rules,
especially around the HTML/index build. The problem we've had with all
previous solutions is that we have used the same file name, such as HTML.index
or bookindex.sgml, to mean different things at different stages of the build,
and make can't distinguish that. The solution here is that the first jade run
produces HTML.index, but does not require bookindex.sgml at all, and produces
no other html output (the latter an idea from Alvaro). The second jade run
includes bookindex.sgml, but does not recreate HTML.index. That way, when you
change an sgml file, jade is run twice and at the end all dependencies are
satisfied. Omitting the html output in the first stage also makes the full
build a lot faster.
When you run one of the print format targets, only the first jade run is run,
then the print target-specific commands. If an HTML build has completed
previously, the first jade run is skipped because the dependencies have
already been satisfied.
The draft and check targets for quick builds and syntax verification are still
there.
2009-07-15 00:16:38 +02:00
|
|
|
$(JADE.html.call) -V html-index $<
|
2001-05-13 00:51:36 +02:00
|
|
|
|
2009-08-10 00:47:59 +02:00
|
|
|
$(srcdir)/bookindex.sgml: HTML.index
|
Rearrangement of the HTML docs build rules
Set up proper makefile dependencies in the documentation build rules,
especially around the HTML/index build. The problem we've had with all
previous solutions is that we have used the same file name, such as HTML.index
or bookindex.sgml, to mean different things at different stages of the build,
and make can't distinguish that. The solution here is that the first jade run
produces HTML.index, but does not require bookindex.sgml at all, and produces
no other html output (the latter an idea from Alvaro). The second jade run
includes bookindex.sgml, but does not recreate HTML.index. That way, when you
change an sgml file, jade is run twice and at the end all dependencies are
satisfied. Omitting the html output in the first stage also makes the full
build a lot faster.
When you run one of the print format targets, only the first jade run is run,
then the print target-specific commands. If an HTML build has completed
previously, the first jade run is skipped because the dependencies have
already been satisfied.
The draft and check targets for quick builds and syntax verification are still
there.
2009-07-15 00:16:38 +02:00
|
|
|
LC_ALL=C $(PERL) $(COLLATEINDEX) -f -g -i 'bookindex' -o $@ $<
|
2007-01-09 23:19:36 +01:00
|
|
|
|
2009-08-10 00:47:59 +02:00
|
|
|
$(srcdir)/version.sgml: $(top_builddir)/src/Makefile.global
|
2002-10-12 18:34:28 +02:00
|
|
|
{ \
|
|
|
|
echo "<!entity version \"$(VERSION)\">"; \
|
2008-12-11 08:34:09 +01:00
|
|
|
echo "<!entity majorversion \"$(MAJORVERSION)\">"; \
|
2002-10-12 18:34:28 +02:00
|
|
|
} >$@
|
|
|
|
|
2009-08-10 00:47:59 +02:00
|
|
|
$(srcdir)/features-supported.sgml: $(top_srcdir)/src/backend/catalog/sql_feature_packages.txt $(top_srcdir)/src/backend/catalog/sql_features.txt
|
2003-01-15 00:19:34 +01:00
|
|
|
$(PERL) $(srcdir)/mk_feature_tables.pl YES $^ > $@
|
|
|
|
|
2009-08-10 00:47:59 +02:00
|
|
|
$(srcdir)/features-unsupported.sgml: $(top_srcdir)/src/backend/catalog/sql_feature_packages.txt $(top_srcdir)/src/backend/catalog/sql_features.txt
|
2003-01-15 00:19:34 +01:00
|
|
|
$(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
|
|
|
|
2006-12-10 21:46:03 +01:00
|
|
|
|
2000-11-05 22:04:07 +01:00
|
|
|
# RTF to allow minor editing for hardcopy
|
2007-01-11 01:02:39 +01:00
|
|
|
%.rtf: %.sgml $(ALLSGML) html
|
Rearrangement of the HTML docs build rules
Set up proper makefile dependencies in the documentation build rules,
especially around the HTML/index build. The problem we've had with all
previous solutions is that we have used the same file name, such as HTML.index
or bookindex.sgml, to mean different things at different stages of the build,
and make can't distinguish that. The solution here is that the first jade run
produces HTML.index, but does not require bookindex.sgml at all, and produces
no other html output (the latter an idea from Alvaro). The second jade run
includes bookindex.sgml, but does not recreate HTML.index. That way, when you
change an sgml file, jade is run twice and at the end all dependencies are
satisfied. Omitting the html output in the first stage also makes the full
build a lot faster.
When you run one of the print format targets, only the first jade run is run,
then the print target-specific commands. If an HTML build has completed
previously, the first jade run is skipped because the dependencies have
already been satisfied.
The draft and check targets for quick builds and syntax verification are still
there.
2009-07-15 00:16:38 +02:00
|
|
|
$(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -t rtf -V rtf-backend -i output-print -i include-index postgres.sgml
|
2003-03-25 17:15:44 +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.
|
|
|
|
|
Rearrangement of the HTML docs build rules
Set up proper makefile dependencies in the documentation build rules,
especially around the HTML/index build. The problem we've had with all
previous solutions is that we have used the same file name, such as HTML.index
or bookindex.sgml, to mean different things at different stages of the build,
and make can't distinguish that. The solution here is that the first jade run
produces HTML.index, but does not require bookindex.sgml at all, and produces
no other html output (the latter an idea from Alvaro). The second jade run
includes bookindex.sgml, but does not recreate HTML.index. That way, when you
change an sgml file, jade is run twice and at the end all dependencies are
satisfied. Omitting the html output in the first stage also makes the full
build a lot faster.
When you run one of the print format targets, only the first jade run is run,
then the print target-specific commands. If an HTML build has completed
previously, the first jade run is skipped because the dependencies have
already been satisfied.
The draft and check targets for quick builds and syntax verification are still
there.
2009-07-15 00:16:38 +02:00
|
|
|
JADE.tex.call = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d $(srcdir)/stylesheet.dsl -t tex -V tex-backend -i output-print -i include-index
|
2006-12-10 21:46:03 +01:00
|
|
|
|
2009-08-11 22:16:03 +02:00
|
|
|
%-A4.tex-ps %-US.tex-ps : JADE_OUTPUT=texdvi-output
|
|
|
|
%-A4.tex-pdf %-US.tex-pdf : JADE_OUTPUT=texpdf-output
|
|
|
|
%-A4.tex-ps %-A4.tex-pdf : JADE_PAPER=A4
|
|
|
|
%-US.tex-ps %-US.tex-pdf : JADE_PAPER=USletter
|
2006-12-10 21:46:03 +01:00
|
|
|
|
2009-08-11 22:16:03 +02:00
|
|
|
%-A4.tex-ps %-US.tex-ps %-A4.tex-pdf %-US.tex-pdf: %.sgml $(ALLSGML) html
|
|
|
|
$(JADE.tex.call) -V $(JADE_OUTPUT) -V '%paper-type%'=$(JADE_PAPER) -o $@ $<
|
2001-11-09 00:46:29 +01:00
|
|
|
|
|
|
|
%.dvi: %.tex-ps
|
2001-11-16 17:29:56 +01:00
|
|
|
@rm -f $*.aux $*.log
|
2007-01-07 09:49:31 +01:00
|
|
|
# multiple runs are necessary to create proper intra-document links
|
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
|
|
|
|
2006-12-10 21:46:03 +01:00
|
|
|
# PostScript from TeX
|
2007-12-14 14:20:30 +01:00
|
|
|
postgres.ps:
|
2007-12-15 11:28:21 +01:00
|
|
|
$(error Invalid target; use postgres-A4.ps or postgres-US.ps as targets)
|
2009-05-02 22:17:19 +02:00
|
|
|
|
1998-03-01 21:44:37 +01:00
|
|
|
%.ps: %.dvi
|
|
|
|
dvips -o $@ $<
|
|
|
|
|
2007-12-14 14:20:30 +01:00
|
|
|
postgres.pdf:
|
2007-12-15 11:28:21 +01:00
|
|
|
$(error Invalid target; use postgres-A4.pdf or postgres-US.pdf as targets)
|
2009-05-02 22:17:19 +02:00
|
|
|
|
2001-11-09 00:46:29 +01:00
|
|
|
%.pdf: %.tex-pdf
|
2001-11-16 17:29:56 +01:00
|
|
|
@rm -f $*.aux $*.log $*.out
|
2007-01-07 09:49:31 +01:00
|
|
|
# multiple runs are necessary to create proper intra-document links
|
2001-02-04 13:23:11 +01:00
|
|
|
pdfjadetex $<
|
|
|
|
pdfjadetex $<
|
|
|
|
pdfjadetex $<
|
|
|
|
|
2009-08-10 00:47:59 +02:00
|
|
|
.PRECIOUS: %-A4.tex-ps %-US.tex-ps %-A4.tex-pdf %-US.tex-pdf
|
|
|
|
|
|
|
|
# Cancel built-in suffix rules, interfering with PS building
|
|
|
|
.SUFFIXES:
|
|
|
|
|
2001-02-04 13:23:11 +01:00
|
|
|
|
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.
|
2007-01-11 01:02:39 +01:00
|
|
|
%.fot: %.sgml $(ALLSGML) html
|
Rearrangement of the HTML docs build rules
Set up proper makefile dependencies in the documentation build rules,
especially around the HTML/index build. The problem we've had with all
previous solutions is that we have used the same file name, such as HTML.index
or bookindex.sgml, to mean different things at different stages of the build,
and make can't distinguish that. The solution here is that the first jade run
produces HTML.index, but does not require bookindex.sgml at all, and produces
no other html output (the latter an idea from Alvaro). The second jade run
includes bookindex.sgml, but does not recreate HTML.index. That way, when you
change an sgml file, jade is run twice and at the end all dependencies are
satisfied. Omitting the html output in the first stage also makes the full
build a lot faster.
When you run one of the print format targets, only the first jade run is run,
then the print target-specific commands. If an HTML build has completed
previously, the first jade run is skipped because the dependencies have
already been satisfied.
The draft and check targets for quick builds and syntax verification are still
there.
2009-07-15 00:16:38 +02:00
|
|
|
$(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d stylesheet.dsl -t fot -i output-print -i include-index -o $@ $<
|
2001-11-09 00:46:29 +01: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
|
|
|
|
2009-05-02 22:17:19 +02:00
|
|
|
HISTORY.html: generate_history.pl $(wildcard $(srcdir)/release*.sgml)
|
|
|
|
$(PERL) $< "$(srcdir)" release.sgml >tempfile_HISTORY.sgml
|
2001-03-10 17:05:35 +01:00
|
|
|
$(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" ['; \
|
2006-04-06 20:54:37 +02:00
|
|
|
echo '<!entity % standalone-ignore "IGNORE">'; \
|
|
|
|
echo '<!entity % standalone-include "INCLUDE"> ]>'; \
|
2001-09-21 20:37:05 +02:00
|
|
|
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
|
|
|
##
|
2006-12-10 17:01:06 +01:00
|
|
|
## XSLT processing
|
2004-01-13 19:45:19 +01:00
|
|
|
##
|
|
|
|
|
2009-07-20 20:34:58 +02:00
|
|
|
postgres.xml: postgres.sgml $(ALMOSTALLSGML)
|
2008-06-10 02:19:32 +02:00
|
|
|
$(OSX) -D. -x lower $< | \
|
2008-10-31 15:35:30 +01:00
|
|
|
$(PERL) -p -e 's/\[(amp|copy|egrave|gt|lt|mdash|nbsp|ouml|pi|quot|uuml) *\]/\&\1;/g;' \
|
|
|
|
-e '$$_ .= qq{<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">\n} if $$. == 1;' \
|
2004-01-16 00:51:32 +01:00
|
|
|
>$@
|
2006-12-10 21:46:03 +01:00
|
|
|
# ' hello Emacs
|
2004-01-13 19:45:19 +01:00
|
|
|
|
2009-08-10 00:47:59 +02:00
|
|
|
ifeq ($(vpath_build),yes)
|
|
|
|
XSLTPROC_HTML_FLAGS = --stringparam base.dir '$(srcdir)/html'
|
|
|
|
endif
|
|
|
|
|
2006-12-10 17:01:06 +01:00
|
|
|
xslthtml: stylesheet.xsl postgres.xml
|
2009-08-10 00:47:59 +02:00
|
|
|
$(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTPROC_HTML_FLAGS) $^
|
2004-01-13 19:45:19 +01:00
|
|
|
|
2004-11-23 17:27:59 +01:00
|
|
|
htmlhelp: stylesheet-hh.xsl postgres.xml
|
2006-12-10 17:01:06 +01:00
|
|
|
$(XSLTPROC) $(XSLTPROCFLAGS) $^
|
|
|
|
|
2006-12-10 21:46:03 +01:00
|
|
|
%-A4.fo: stylesheet-fo.xsl %.xml
|
|
|
|
$(XSLTPROC) $(XSLTPROCFLAGS) --stringparam paper.type A4 -o $@ $^
|
|
|
|
|
|
|
|
%-US.fo: stylesheet-fo.xsl %.xml
|
|
|
|
$(XSLTPROC) $(XSLTPROCFLAGS) --stringparam paper.type USletter -o $@ $^
|
2004-11-23 17:27:59 +01:00
|
|
|
|
2006-12-10 02:53:15 +01:00
|
|
|
|
2006-10-03 23:13:17 +02:00
|
|
|
##
|
|
|
|
## Experimental Texinfo targets
|
|
|
|
##
|
|
|
|
|
|
|
|
DB2X_TEXIXML = db2x_texixml
|
|
|
|
DB2X_XSLTPROC = db2x_xsltproc
|
|
|
|
MAKEINFO = makeinfo
|
|
|
|
|
2006-12-10 02:53:15 +01:00
|
|
|
%.texixml: %.xml
|
2006-10-05 04:04:32 +02:00
|
|
|
$(DB2X_XSLTPROC) -s texi -g output-file=$(basename $@) $< -o $@
|
2006-10-03 23:13:17 +02:00
|
|
|
|
2006-12-10 02:53:15 +01:00
|
|
|
%.texi: %.texixml
|
|
|
|
$(DB2X_TEXIXML) --encoding=iso-8859-1//TRANSLIT $< --to-stdout >$@
|
|
|
|
|
|
|
|
%.info: %.texi
|
|
|
|
$(MAKEINFO) --enable-encoding --no-split --no-validate $< -o $@
|
|
|
|
|
2004-01-13 19:45:19 +01:00
|
|
|
|
2000-11-05 22:04:07 +01:00
|
|
|
##
|
|
|
|
## Check
|
|
|
|
##
|
|
|
|
|
|
|
|
# Quick syntax check without style processing
|
Rearrangement of the HTML docs build rules
Set up proper makefile dependencies in the documentation build rules,
especially around the HTML/index build. The problem we've had with all
previous solutions is that we have used the same file name, such as HTML.index
or bookindex.sgml, to mean different things at different stages of the build,
and make can't distinguish that. The solution here is that the first jade run
produces HTML.index, but does not require bookindex.sgml at all, and produces
no other html output (the latter an idea from Alvaro). The second jade run
includes bookindex.sgml, but does not recreate HTML.index. That way, when you
change an sgml file, jade is run twice and at the end all dependencies are
satisfied. Omitting the html output in the first stage also makes the full
build a lot faster.
When you run one of the print format targets, only the first jade run is run,
then the print target-specific commands. If an HTML build has completed
previously, the first jade run is skipped because the dependencies have
already been satisfied.
The draft and check targets for quick builds and syntax verification are still
there.
2009-07-15 00:16:38 +02:00
|
|
|
check: postgres.sgml $(ALMOSTALLSGML)
|
2004-03-01 17:08:58 +01:00
|
|
|
$(NSGMLS) $(SPFLAGS) $(SGMLINCLUDE) -s $<
|
2000-11-05 22:04:07 +01:00
|
|
|
|
|
|
|
|
2009-08-10 00:47:59 +02:00
|
|
|
##
|
|
|
|
## Install
|
|
|
|
##
|
|
|
|
|
|
|
|
found_html = $(wildcard $(srcdir)/html-stamp)
|
|
|
|
|
|
|
|
ifneq ($(wildcard $(srcdir)/man-stamp),)
|
|
|
|
# SCO OpenServer's man system is sufficiently different to not bother.
|
|
|
|
ifneq ($(PORTNAME), sco)
|
|
|
|
found_man = yes
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
install: $(if $(found_html),install-html) $(if $(found_man),install-man)
|
|
|
|
|
|
|
|
installdirs:
|
|
|
|
$(mkinstalldirs) '$(DESTDIR)$(htmldir)'/html $(addprefix '$(DESTDIR)$(mandir)'/man, 1 3 $(sqlmansectnum))
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
rm -f '$(DESTDIR)$(htmldir)/html/'* $(addprefix '$(DESTDIR)$(mandir)'/man, 1/* 3/* $(sqlmansectnum)/*)
|
|
|
|
|
|
|
|
|
|
|
|
## Install html
|
|
|
|
|
|
|
|
install-html: html installdirs
|
|
|
|
cp -R $(srcdir)/html '$(DESTDIR)$(htmldir)'
|
|
|
|
|
|
|
|
|
|
|
|
## Install man
|
|
|
|
|
2009-08-11 23:53:06 +02:00
|
|
|
install-man: man installdirs
|
|
|
|
|
2009-08-10 00:47:59 +02:00
|
|
|
sqlmansect ?= 7
|
|
|
|
sqlmansectnum = $(shell expr X'$(sqlmansect)' : X'\([0-9]\)')
|
|
|
|
|
|
|
|
# Before we install the man pages, we massage the section numbers to
|
|
|
|
# follow the local conventions.
|
|
|
|
#
|
|
|
|
ifeq ($(sqlmansectnum),7)
|
|
|
|
install-man:
|
2009-08-11 23:53:06 +02:00
|
|
|
cp -R $(addprefix $(srcdir)/,man1 man3 man7) '$(DESTDIR)$(mandir)'
|
2009-08-10 00:47:59 +02:00
|
|
|
|
|
|
|
else # sqlmansectnum != 7
|
|
|
|
fix_sqlmansectnum = sed -e '/^\.TH/s/"7"/"$(sqlmansect)"/' \
|
|
|
|
-e 's/\\fR(7)/\\fR($(sqlmansectnum))/g' \
|
|
|
|
-e '1s/^\.so man7/.so man$(sqlmansectnum)/g;1s/^\(\.so.*\)\.7$$/\1.$(sqlmansect)/g'
|
|
|
|
|
|
|
|
nonsql_manpage_files := $(wildcard $(srcdir)/man1/*.1 $(srcdir)/man3/*.3)
|
|
|
|
sql_manpage_files := $(wildcard $(srcdir)/man7/*.7)
|
|
|
|
|
|
|
|
fixed_nonsql_manpage_files = $(patsubst $(srcdir)/%,fixedman/%,$(nonsql_manpage_files))
|
|
|
|
fixed_sql_manpage_files = $(patsubst $(srcdir)/man7/%.7,fixedman/man$(sqlmansectnum)/%.$(sqlmansect),$(sql_manpage_files))
|
|
|
|
|
|
|
|
fixed_manpage_files = $(fixed_nonsql_manpage_files) $(fixed_sql_manpage_files)
|
|
|
|
|
|
|
|
all: all-man
|
|
|
|
all-man: $(fixed_manpage_files)
|
|
|
|
|
|
|
|
$(fixed_nonsql_manpage_files): fixedman/%: %
|
|
|
|
@$(mkinstalldirs) $(dir $@)
|
|
|
|
$(fix_sqlmansectnum) $< >$@
|
|
|
|
|
|
|
|
$(fixed_sql_manpage_files): fixedman/man$(sqlmansectnum)/%.$(sqlmansect): man7/%.7
|
|
|
|
@$(mkinstalldirs) $(dir $@)
|
|
|
|
$(fix_sqlmansectnum) $< >$@
|
|
|
|
|
|
|
|
install-man: all-man
|
2009-08-11 23:53:06 +02:00
|
|
|
cp -R $(sort $(dir $(fixed_manpage_files))) '$(DESTDIR)$(mandir)'
|
2009-08-10 00:47:59 +02:00
|
|
|
|
|
|
|
clean: clean-man
|
|
|
|
.PHONY: clean-man
|
|
|
|
clean-man:
|
|
|
|
rm -rf fixedman/
|
|
|
|
|
|
|
|
endif # sqlmansectnum != 7
|
|
|
|
|
|
|
|
|
2000-11-05 22:04:07 +01:00
|
|
|
##
|
|
|
|
## Clean
|
|
|
|
##
|
|
|
|
|
2009-08-12 00:21:51 +02:00
|
|
|
# This allows removing some files from the distribution tarballs while
|
|
|
|
# keeping the dependencies satisfied.
|
|
|
|
.SECONDARY: postgres.xml $(GENERATED_SGML) HTML.index
|
|
|
|
|
2009-08-10 00:47:59 +02:00
|
|
|
distclean:
|
2009-08-12 00:21:51 +02:00
|
|
|
rm -f postgres.xml $(GENERATED_SGML) HTML.index
|
2009-08-10 00:47:59 +02:00
|
|
|
|
|
|
|
maintainer-clean: distclean
|
2000-11-05 22:04:07 +01:00
|
|
|
# HTML
|
2009-08-10 00:47:59 +02:00
|
|
|
rm -rf $(addprefix $(srcdir)/,html/ html-stamp)
|
2000-11-05 22:04:07 +01:00
|
|
|
# man
|
2009-08-10 00:47:59 +02:00
|
|
|
rm -rf $(addprefix $(srcdir)/,man1/ man3/ man7/ man-stamp)
|
2000-11-05 22:04:07 +01:00
|
|
|
# print
|
2009-08-10 00:47:59 +02:00
|
|
|
rm -f $(addprefix $(srcdir)/,*.rtf *.tex-ps *.tex-pdf *.dvi *.aux *.log *.ps *.pdf *.out *.fot)
|
2001-05-13 00:51:36 +02:00
|
|
|
# index
|
2009-08-10 00:47:59 +02:00
|
|
|
rm -f $(addprefix $(srcdir)/,HTML.index $(GENERATED_SGML))
|
2004-03-09 00:59:23 +01:00
|
|
|
# text
|
2009-08-10 00:47:59 +02:00
|
|
|
rm -f $(addprefix $(srcdir)/,INSTALL HISTORY regress_README)
|
2006-12-10 17:01:06 +01:00
|
|
|
# XSLT
|
2009-08-10 00:47:59 +02:00
|
|
|
rm -f $(addprefix $(srcdir)/,htmlhelp.hhp toc.hhc index.hhk *.fo)
|
2006-10-03 23:13:17 +02:00
|
|
|
# Texinfo
|
2009-08-10 00:47:59 +02:00
|
|
|
rm -f $(addprefix $(srcdir)/,*.texixml *.texi *.info db2texi.refs)
|