1998-03-01 21:44:37 +01:00
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Makefile
|
|
|
|
# Postgres documentation makefile
|
|
|
|
# Thomas Lockhart
|
|
|
|
#
|
|
|
|
# Copyright (c) 1994, Regents of the University of California
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# IDENTIFICATION
|
2001-04-20 17:52:33 +02:00
|
|
|
# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.36 2001/04/20 15:52:33 thomas 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
|
|
|
|
2000-11-05 22:04:07 +01:00
|
|
|
ifndef DOCBOOKSTYLE
|
2001-04-20 17:52:33 +02:00
|
|
|
DOCBOOKSTYLE = /home/projects/pgsql/developers/thomas/db162.d/docbook
|
2000-11-05 22:04:07 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef JADE
|
|
|
|
JADE = jade
|
|
|
|
endif
|
2001-03-25 10:32:24 +02:00
|
|
|
SGMLINCLUDE = -D $(srcdir) -D $(srcdir)/ref -D $(srcdir)/../graphics
|
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
|
|
|
|
1998-03-01 21:44:37 +01:00
|
|
|
|
1999-08-06 15:46:17 +02:00
|
|
|
# docbook2man generates man pages from docbook refentry source code.
|
|
|
|
|
2000-11-05 22:04:07 +01:00
|
|
|
ifndef D2MDIR
|
|
|
|
# This is where the (patched) docbook2man perl scripts reside on hub.org.
|
1999-08-06 15:46:17 +02:00
|
|
|
D2MDIR= /home/users/t/thomas/d2x/docbook2man
|
2000-11-05 22:04:07 +01:00
|
|
|
endif
|
1999-08-06 15:46:17 +02:00
|
|
|
D2MSCRIPT= $(D2MDIR)/docbook2man-spec.pl
|
|
|
|
|
2000-11-05 22:04:07 +01:00
|
|
|
vpath %.sgml ./ref
|
1998-03-01 21:44:37 +01:00
|
|
|
|
2000-11-24 18:44:22 +01:00
|
|
|
ALLBOOKS = admin developer programmer reference tutorial user
|
1998-03-01 21:44:37 +01:00
|
|
|
|
2000-11-05 22:04:07 +01:00
|
|
|
ALLSGML := $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml)
|
1999-08-06 15:46:17 +02:00
|
|
|
|
1998-03-01 21:44:37 +01:00
|
|
|
|
2001-02-13 22:51:17 +01:00
|
|
|
catalog: Makefile $(top_builddir)/src/Makefile.global
|
2001-02-13 22:27:05 +01:00
|
|
|
(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
|
|
|
|
|
|
|
|
|
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-01-06 17:54:16 +01:00
|
|
|
DEFAULTSECTION := l
|
1998-03-01 21:44:37 +01:00
|
|
|
|
2001-01-06 17:54:16 +01:00
|
|
|
man: $(ALLSGML)
|
|
|
|
$(NSGMLS) $(NSGMLS_FLAGS) $(srcdir)/book-decl.sgml $(srcdir)/reference.sgml \
|
|
|
|
| $(SGMLSPL) $(D2MSCRIPT) --lowercase --section $(DEFAULTSECTION)
|
|
|
|
# One more time, to resolve cross-references
|
|
|
|
$(NSGMLS) $(NSGMLS_FLAGS) $(srcdir)/book-decl.sgml $(srcdir)/reference.sgml \
|
|
|
|
| $(SGMLSPL) $(D2MSCRIPT) --lowercase --section $(DEFAULTSECTION)
|
|
|
|
$(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
|
|
|
|
##
|
|
|
|
|
2001-02-13 22:27:05 +01:00
|
|
|
JADE.html = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d stylesheet.dsl -i output-html -t sgml
|
2000-11-24 18:44:22 +01:00
|
|
|
|
2001-02-13 22:27:05 +01:00
|
|
|
postgres.html: postgres.sgml $(ALLSGML) stylesheet.dsl catalog
|
|
|
|
@rm -f *.html
|
2000-11-24 18:44:22 +01:00
|
|
|
$(JADE.html) $<
|
2001-02-13 22:27:05 +01:00
|
|
|
ln -sf $@ index.html
|
2000-11-24 18:44:22 +01:00
|
|
|
|
2001-02-13 22:27:05 +01:00
|
|
|
$(addsuffix .html, $(ALLBOOKS)): %.html: %.sgml $(ALLSGML) stylesheet.dsl catalog
|
|
|
|
@rm -f *.html
|
2000-11-24 18:44:22 +01:00
|
|
|
$(JADE.html) book-decl.sgml $<
|
2001-02-13 22:27:05 +01:00
|
|
|
ln -sf $@ index.html
|
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
|
2001-02-13 22:27:05 +01:00
|
|
|
$(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 $<
|
1998-03-01 21:44:37 +01:00
|
|
|
|
|
|
|
# TeX and DVI
|
2001-02-13 22:27:05 +01:00
|
|
|
$(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 $<
|
1998-03-01 21:44:37 +01:00
|
|
|
|
|
|
|
%.dvi: %.tex
|
|
|
|
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-02-04 13:23:11 +01:00
|
|
|
%.pdf: %.tex
|
|
|
|
pdfjadetex $<
|
|
|
|
pdfjadetex $<
|
|
|
|
pdfjadetex $<
|
|
|
|
|
|
|
|
|
1998-03-01 21:44:37 +01:00
|
|
|
# Graphics
|
|
|
|
|
|
|
|
%.gif:
|
1998-10-30 20:37:19 +01:00
|
|
|
cp -p ../graphics/$@ .
|
1998-03-01 09:18:09 +01:00
|
|
|
|
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
|
|
|
|
2001-03-10 17:05:35 +01:00
|
|
|
JADE.text = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) -d stylesheet.dsl -i output-text -t sgml
|
|
|
|
|
2000-10-17 17:26:40 +02:00
|
|
|
INSTALL HISTORY: % : %.html
|
2000-07-21 02:44:13 +02:00
|
|
|
@echo "|";\
|
|
|
|
echo "| You should now take \`$<', save it as a text file in Netscape,";\
|
2000-10-17 17:26:40 +02:00
|
|
|
echo "| and put it in place of the existing \`$@' file.";\
|
2000-07-21 02:44:13 +02:00
|
|
|
echo "|"
|
|
|
|
|
2001-03-10 17:05:35 +01:00
|
|
|
INSTALL.html: standalone-install.sgml installation.sgml
|
|
|
|
$(JADE.text) -V nochunks $+ >$@
|
2000-07-21 02:44:13 +02:00
|
|
|
|
2001-03-10 17:05:35 +01:00
|
|
|
HISTORY.html: release.sgml
|
|
|
|
( echo '<!doctype appendix PUBLIC "-//OASIS//DTD DocBook V3.1//EN">'; \
|
|
|
|
cat $< ) >tempfile_HISTORY.sgml
|
|
|
|
$(JADE.text) -V nochunks tempfile_HISTORY.sgml >$@
|
|
|
|
rm tempfile_HISTORY.sgml
|
2000-11-05 22:04:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
## Check
|
|
|
|
##
|
|
|
|
|
2000-11-24 18:44:22 +01:00
|
|
|
check: $(addprefix check-, $(ALLBOOKS)) check-postgres
|
2000-11-05 22:04:07 +01:00
|
|
|
|
|
|
|
# Quick syntax check without style processing
|
2000-11-24 18:44:22 +01:00
|
|
|
$(addprefix check-, $(ALLBOOKS)): check-%: %.sgml
|
|
|
|
$(NSGMLS) $(SGMLINCLUDE) -s book-decl.sgml $<
|
|
|
|
|
|
|
|
check-postgres: postgres.sgml
|
2000-11-05 22:04:07 +01:00
|
|
|
$(NSGMLS) $(SGMLINCLUDE) -s $<
|
|
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
## Clean
|
|
|
|
##
|
|
|
|
|
|
|
|
clean distclean maintainer-clean:
|
2001-02-13 22:27:05 +01:00
|
|
|
rm -f catalog
|
2000-11-05 22:04:07 +01:00
|
|
|
# HTML
|
2001-02-13 22:27:05 +01:00
|
|
|
rm -f HTML.manifest *.html
|
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
|
|
|
|
rm -f *.rtf *.tex *.dvi *.aux *.log *.ps *.pdf
|