#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.30 2001/02/04 12:23:11 petere Exp $
+# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.31 2001/02/13 21:27:05 petere Exp $
#
#----------------------------------------------------------------------------
DOCBOOKSTYLE = /home/projects/pgsql/developers/thomas/db143.d/docbook
endif
-ifndef HSTYLE
-HSTYLE = $(DOCBOOKSTYLE)/html
-endif
-ifndef PSTYLE
-PSTYLE = $(DOCBOOKSTYLE)/print
-endif
-
-HDSL=$(HSTYLE)/docbook.dsl
-PDSL=$(PSTYLE)/docbook.dsl
-
ifndef JADE
JADE = jade
endif
ALLSGML := $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml)
+catalog: Makefile $(top_builddir)/src/Makefile.global $(top_builddir)/src/Makefile.custom
+ (echo "PUBLIC \"-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN\" \"$(DOCBOOKSTYLE)/html/docbook.dsl\""; \
+ echo "PUBLIC \"-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN\" \"$(DOCBOOKSTYLE)/print/docbook.dsl\"") > $@
+
+ifeq "$(origin DOCBOOKSTYLE)" "command line"
+.PHONY: catalog
+endif
+
+
##
## Man pages
##
## HTML
##
-JADE.html = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d $(HDSL) -V %use-id-as-filename% -V %generate-legalnotice-link% -t sgml
+JADE.html = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d stylesheet.dsl -i output-html -t sgml
-postgres.html: postgres.sgml $(ALLSGML)
- @rm -f *.htm
+postgres.html: postgres.sgml $(ALLSGML) stylesheet.dsl catalog
+ @rm -f *.html
$(JADE.html) $<
-# Include some softlinks to the generic default file names
- ln -sf postgres.htm index.html
- ln -sf postgres.htm postgres.html
+ ln -sf $@ index.html
-$(addsuffix .html, $(ALLBOOKS)): %.html: %.sgml $(ALLSGML)
- @rm -f *.htm
+$(addsuffix .html, $(ALLBOOKS)): %.html: %.sgml $(ALLSGML) stylesheet.dsl catalog
+ @rm -f *.html
$(JADE.html) book-decl.sgml $<
- ln -sf $*.htm index.html
- ln -sf $*.htm $*.html
+ ln -sf $@ index.html
##
##
# RTF to allow minor editing for hardcopy
-$(addsuffix .rtf, $(ALLBOOKS)): %.rtf: %.sgml $(ALLSGML)
- $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d $(PDSL) -t rtf -V rtf-backend book-decl.sgml $<
+$(addsuffix .rtf, $(ALLBOOKS)): %.rtf: %.sgml $(ALLSGML) stylesheet.dsl catalog
+ $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d stylesheet.dsl -t rtf -V rtf-backend -i output-print book-decl.sgml $<
# TeX and DVI
-$(addsuffix .tex, $(ALLBOOKS)): %.tex: %.sgml $(ALLSGML)
- $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d $(PDSL) -t tex -V tex-backend book-decl.sgml $<
+$(addsuffix .tex, $(ALLBOOKS)): %.tex: %.sgml $(ALLSGML) stylesheet.dsl catalog
+ $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d stylesheet.dsl -t tex -V tex-backend -i output-print book-decl.sgml $<
%.dvi: %.tex
jadetex $<
##
clean distclean maintainer-clean:
+ rm -f catalog
# HTML
- rm -f HTML.manifest *.html *.htm
+ rm -f HTML.manifest *.html
# man
- rm -rf *.1 *.l man1 manl manpage.refs manpage.links manpage.log
+ rm -rf *.1 *.$(DEFAULTSECTION) man1 man$(DEFAULTSECTION) manpage.refs manpage.links manpage.log
# print
rm -f *.rtf *.tex *.dvi *.aux *.log *.ps *.pdf
--- /dev/null
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/stylesheet.dsl,v 1.1 2001/02/13 21:27:05 petere Exp $ -->
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+
+<!-- must turn on one of these with -i on the jade command line -->
+<!ENTITY % output-html "IGNORE">
+<!ENTITY % output-print "IGNORE">
+
+<![ %output-html; [
+<!ENTITY dbstyle PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA DSSSL>
+]]>
+
+<![ %output-print; [
+<!ENTITY dbstyle PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA DSSSL>
+]]>
+
+]>
+
+<style-sheet>
+ <style-specification use="docbook">
+ <style-specification-body>
+
+(define pgsql-docs-list "pgsql-docs@postgresql.org")
+
+(define %refentry-xref-manvolnum% #f)
+
+<![ %output-html; [
+;; customize the html stylesheet
+
+(define %generate-legalnotice-link% #t)
+(define %html-ext% ".html")
+(define %link-mailto-url% (string-append "mailto:" pgsql-docs-list))
+(define %use-id-as-filename% #t)
+(define %stylesheet% "stylesheet.css")
+
+;; Returns the depth of auto TOC that should be made at the nd-level
+(define (toc-depth nd)
+ (cond ((string=? (gi nd) (normalize "book")) 3)
+ ((string=? (gi nd) (normalize "set")) 2)
+ (else 1)))
+
+;; Put date of creation into header
+(define %html-header-tags%
+ (list (list "META" '("NAME" "creation") (list "CONTENT" (time->string (time) #t)))))
+
+]]> <!-- %output-html -->
+
+<![ %output-print; [
+;; customize the print stylesheet
+
+(define %default-quadding% 'justify)
+(define bop-footnotes #t)
+(if tex-backend
+ (define %hyphenation% #t))
+
+]]> <!-- %output-print -->
+
+ </style-specification-body>
+ </style-specification>
+
+ <external-specification id="docbook" document="dbstyle">
+</style-sheet>