88#
99#
1010# IDENTIFICATION
11- # $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.30 2001/02/04 12:23:11 petere Exp $
11+ # $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.31 2001/02/13 21:27:05 petere Exp $
1212#
1313# ----------------------------------------------------------------------------
1414
@@ -23,16 +23,6 @@ ifndef DOCBOOKSTYLE
2323DOCBOOKSTYLE = /home/projects/pgsql/developers/thomas/db143.d/docbook
2424endif
2525
26- ifndef HSTYLE
27- HSTYLE =$(DOCBOOKSTYLE ) /html
28- endif
29- ifndef PSTYLE
30- PSTYLE =$(DOCBOOKSTYLE ) /print
31- endif
32-
33- HDSL =$(HSTYLE ) /docbook.dsl
34- PDSL =$(PSTYLE ) /docbook.dsl
35-
3626ifndef JADE
3727JADE = jade
3828endif
@@ -62,6 +52,15 @@ ALLBOOKS = admin developer programmer reference tutorial user
6252ALLSGML :=$(wildcard $(srcdir ) /* .sgml$(srcdir ) /ref/* .sgml)
6353
6454
55+ catalog : Makefile$(top_builddir ) /src/Makefile.global$(top_builddir ) /src/Makefile.custom
56+ (echo" PUBLIC\" -//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN\" \" $( DOCBOOKSTYLE) /html/docbook.dsl\" " ; \
57+ echo " PUBLIC\" -//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN\" \" $( DOCBOOKSTYLE) /print/docbook.dsl\" " )> $@
58+
59+ ifeq "$(originDOCBOOKSTYLE ) " "command line"
60+ .PHONY : catalog
61+ endif
62+
63+
6564# #
6665# # Man pages
6766# #
@@ -85,33 +84,30 @@ man: $(ALLSGML)
8584# # HTML
8685# #
8786
88- JADE.html =$(JADE ) $(JADEFLAGS ) $(SGMLINCLUDE ) -d$( HDSL ) -V %use-id-as-filename% -V %generate-legalnotice-link% -t sgml
87+ JADE.html =$(JADE ) $(JADEFLAGS ) $(SGMLINCLUDE ) -dstylesheet.dsl -i output-html -t sgml
8988
90- postgres.html : postgres.sgml$(ALLSGML )
91- @rm -f* .htm
89+ postgres.html : postgres.sgml$(ALLSGML ) stylesheet.dsl catalog
90+ @rm -f* .html
9291$(JADE.html ) $<
93- # Include some softlinks to the generic default file names
94- ln -sf postgres.htm index.html
95- ln -sf postgres.htm postgres.html
92+ ln -sf$@ index.html
9693
97- $(addsuffix .html,$(ALLBOOKS ) ) :% .html:% .sgml$(ALLSGML )
98- @rm -f* .htm
94+ $(addsuffix .html,$(ALLBOOKS ) ) :% .html:% .sgml$(ALLSGML ) stylesheet.dsl catalog
95+ @rm -f* .html
9996$(JADE.html ) book-decl.sgml$<
100- ln -sf$* .htm index.html
101- ln -sf$* .htm$* .html
97+ ln -sf$@ index.html
10298
10399
104100# #
105101# # Print
106102# #
107103
108104# RTF to allow minor editing for hardcopy
109- $(addsuffix .rtf,$(ALLBOOKS ) ) :% .rtf:% .sgml$(ALLSGML )
110- $(JADE ) $(JADEFLAGS ) $(SGMLINCLUDE ) -d$( PDSL ) -t rtf -V rtf-backend book-decl.sgml$<
105+ $(addsuffix .rtf,$(ALLBOOKS ) ) :% .rtf:% .sgml$(ALLSGML ) stylesheet.dsl catalog
106+ $(JADE ) $(JADEFLAGS ) $(SGMLINCLUDE ) -dstylesheet.dsl -t rtf -V rtf-backend -i output-print book-decl.sgml$<
111107
112108# TeX and DVI
113- $(addsuffix .tex,$(ALLBOOKS ) ) :% .tex:% .sgml$(ALLSGML )
114- $(JADE ) $(JADEFLAGS ) $(SGMLINCLUDE ) -d$( PDSL ) -t tex -V tex-backend book-decl.sgml$<
109+ $(addsuffix .tex,$(ALLBOOKS ) ) :% .tex:% .sgml$(ALLSGML ) stylesheet.dsl catalog
110+ $(JADE ) $(JADEFLAGS ) $(SGMLINCLUDE ) -dstylesheet.dsl -t tex -V tex-backend -i output-print book-decl.sgml$<
115111
116112% .dvi :% .tex
117113jadetex$<
@@ -182,9 +178,10 @@ check-postgres: postgres.sgml
182178# #
183179
184180clean distclean maintainer-clean :
181+ rm -f catalog
185182# HTML
186- rm -f HTML.manifest *.html *.htm
183+ rm -f HTML.manifest *.html
187184# man
188- rm -rf *.1 *.l man1manl manpage.refs manpage.links manpage.log
185+ rm -rf *.1 *.$(DEFAULTSECTION) man1man$(DEFAULTSECTION) manpage.refs manpage.links manpage.log
189186# print
190187rm -f *.rtf *.tex *.dvi *.aux *.log *.ps *.pdf