1 #----------------------------------------------------------------------------
4 # Postgres documentation makefile
7 # Copyright (c) 1994, Regents of the University of California
11 # $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.38 2001/08/29 19:14:39 petere Exp $
13 #----------------------------------------------------------------------------
16 top_builddir = ../../..
17 include $(top_builddir)/src/Makefile.global
23 DOCBOOKSTYLE = /home/projects/pgsql/developers/thomas/db162.d/docbook
29 SGMLINCLUDE = -D $(srcdir) -D $(srcdir)/ref -D $(srcdir)/../graphics
40 # docbook2man generates man pages from docbook refentry source code.
43 # This is where the (patched) docbook2man perl scripts reside on hub.org.
44 D2MDIR= /home/users/t/thomas/d2x/docbook2man
46 D2MSCRIPT= $(D2MDIR)/docbook2man-spec.pl
50 ALLBOOKS = admin developer programmer reference tutorial user
52 ALLSGML := $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) bookindex.sgml setindex.sgml
54 CATALOG = $(DOCBOOKSTYLE)/catalog
63 DEFAULTSECTION := $(sqlmansect_dummy)
66 $(NSGMLS) $(NSGMLS_FLAGS) $(srcdir)/book-decl.sgml $(srcdir)/reference.sgml \
67 | $(SGMLSPL) $(D2MSCRIPT) --lowercase --section $(DEFAULTSECTION)
68 # One more time, to resolve cross-references
69 $(NSGMLS) $(NSGMLS_FLAGS) $(srcdir)/book-decl.sgml $(srcdir)/reference.sgml \
70 | $(SGMLSPL) $(D2MSCRIPT) --lowercase --section $(DEFAULTSECTION)
71 $(mkinstalldirs) man1 man$(DEFAULTSECTION)
73 mv *.$(DEFAULTSECTION) man$(DEFAULTSECTION)/
80 JADE.html = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -c $(CATALOG) -d stylesheet.dsl -i output-html -t sgml
82 postgres.html: postgres.sgml $(ALLSGML) stylesheet.dsl
87 $(addsuffix .html, $(ALLBOOKS)): %.html: %.sgml $(ALLSGML) stylesheet.dsl
89 $(JADE.html) book-decl.sgml $<
92 COLLATEINDEX = $(PERL) $(DOCBOOKSTYLE)/bin/collateindex.pl -f -g -t 'Index'
94 ifeq (,$(wildcard HTML.index))
96 $(COLLATEINDEX) -o $@ -N
98 $(COLLATEINDEX) -x -o $@ -N
100 bookindex.sgml: HTML.index
101 $(COLLATEINDEX) -i 'bookindex' -o $@ $<
102 setindex.sgml: HTML.index
103 $(COLLATEINDEX) -i 'setindex' -x -o $@ $<
111 # RTF to allow minor editing for hardcopy
112 $(addsuffix .rtf, $(ALLBOOKS)): %.rtf: %.sgml $(ALLSGML) stylesheet.dsl
113 $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -c $(CATALOG) -d stylesheet.dsl -t rtf -V rtf-backend -i output-print book-decl.sgml $<
116 $(addsuffix .tex, $(ALLBOOKS)): %.tex: %.sgml $(ALLSGML) stylesheet.dsl
117 $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -c $(CATALOG) -d stylesheet.dsl -t tex -V tex-backend -i output-print book-decl.sgml $<
124 # Postscript from TeX
137 cp -p ../graphics/$@ .
141 ## Semi-automatic generation of some text files.
144 JADE.text = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -c $(CATALOG) -d stylesheet.dsl -i output-text -t sgml
146 INSTALL HISTORY: % : %.html
148 echo "| You should now take \`$<', save it as a text file in Netscape,";\
149 echo "| and put it in place of the existing \`$@' file.";\
152 INSTALL.html: standalone-install.sgml installation.sgml
153 $(JADE.text) -V nochunks $+ >$@
155 HISTORY.html: release.sgml
156 ( echo '<!doctype appendix PUBLIC "-//OASIS//DTD DocBook V3.1//EN">'; \
157 cat $< ) >tempfile_HISTORY.sgml
158 $(JADE.text) -V nochunks tempfile_HISTORY.sgml >$@
159 rm tempfile_HISTORY.sgml
166 check: $(addprefix check-, $(ALLBOOKS)) check-postgres
168 # Quick syntax check without style processing
169 $(addprefix check-, $(ALLBOOKS)): check-%: %.sgml
170 $(NSGMLS) $(SGMLINCLUDE) -s book-decl.sgml $<
172 check-postgres: postgres.sgml
173 $(NSGMLS) $(SGMLINCLUDE) -s $<
180 clean distclean maintainer-clean:
182 rm -f HTML.manifest *.html
184 rm -rf *.1 *.$(DEFAULTSECTION) man1 man$(DEFAULTSECTION) manpage.refs manpage.links manpage.log
186 rm -f *.rtf *.tex *.dvi *.aux *.log *.ps *.pdf
188 rm -f HTML.index bookindex.sgml setindex.sgml