|
Packit |
0f19cf |
TABLES = $(wildcard table-eg*)
|
|
Packit |
0f19cf |
CHANGES = $(wildcard changes/*.xml)
|
|
Packit |
0f19cf |
VERSION = devel
|
|
Packit |
0f19cf |
OPTS =
|
|
Packit |
0f19cf |
XSLTPROC = xsltproc
|
|
Packit |
0f19cf |
XSLDBK = /usr/share/xml/docbook/stylesheet/docbook-xsl
|
|
Packit |
0f19cf |
XSLPROF = $(XSLDBK)/profiling/profile.xsl
|
|
Packit |
0f19cf |
XSLMAN = $(XSLDBK)/manpages/docbook.xsl
|
|
Packit |
0f19cf |
XSLHTML = $(XSLDBK)/xhtml/chunk.xsl
|
|
Packit |
0f19cf |
XSLPROFH = $(XSLDBK)/xhtml/profile-chunk.xsl
|
|
Packit |
0f19cf |
XSLOLINK = $(XSLDBK)/xhtml/docbook.xsl
|
|
Packit |
0f19cf |
HTMLDIRUM = xhtml/manual/
|
|
Packit |
0f19cf |
HTMLDIRRN = xhtml/release-notes/
|
|
Packit |
0f19cf |
CP = cp
|
|
Packit |
0f19cf |
HERE = $(shell pwd)
|
|
Packit |
0f19cf |
|
|
Packit |
0f19cf |
HTML_PARAMS = --param ignore.image.scaling "'1'" \
|
|
Packit |
0f19cf |
--param graphic.default.extension "'png'" \
|
|
Packit |
0f19cf |
--param use.id.as.filename "1" \
|
|
Packit |
0f19cf |
--param refentry.generate.name "0" \
|
|
Packit |
0f19cf |
--param refentry.generate.title "1" \
|
|
Packit |
0f19cf |
--param profile.attribute "'output'" \
|
|
Packit |
0f19cf |
--param profile.value "'manual;html'" \
|
|
Packit |
0f19cf |
--param othercredit.like.author.enabled "1" \
|
|
Packit |
0f19cf |
--param generate.section.toc.level "3" \
|
|
Packit |
0f19cf |
--param html.stylesheet "'manual.css'"
|
|
Packit |
0f19cf |
|
|
Packit |
0f19cf |
# Where to find the manual and the release notes
|
|
Packit |
0f19cf |
vpath %.xml . changes
|
|
Packit |
0f19cf |
|
|
Packit |
0f19cf |
# Main targets
|
|
Packit |
0f19cf |
all: olink manpagegz allpdf allhtml
|
|
Packit |
0f19cf |
|
|
Packit |
0f19cf |
allpdf: manual.pdf release-notes.pdf
|
|
Packit |
0f19cf |
|
|
Packit |
0f19cf |
allhtml: $(HTMLDIRUM)/index.html $(HTMLDIRRN)/index.html
|
|
Packit |
0f19cf |
|
|
Packit |
0f19cf |
allstyle: all native db2latex simple
|
|
Packit |
0f19cf |
|
|
Packit |
0f19cf |
olink: manual.db release-notes.db
|
|
Packit |
0f19cf |
|
|
Packit |
0f19cf |
# Build and zip the Manpage
|
|
Packit |
0f19cf |
manpagegz: version.xml
|
|
Packit |
0f19cf |
@$(MAKE) -C manpage -f ../Makefile dblatex.1.gz
|
|
Packit |
0f19cf |
|
|
Packit |
0f19cf |
# Build the HTML version of the documentation
|
|
Packit |
0f19cf |
$(HTMLDIRUM)/index.html: manual.xml
|
|
Packit |
0f19cf |
@$(XSLTPROC) --xinclude --param base.dir "'$(HTMLDIRUM)'" \
|
|
Packit |
0f19cf |
$(HTML_PARAMS) \
|
|
Packit |
0f19cf |
$(XSLPROFH) $<
|
|
Packit |
0f19cf |
convert -trim -rotate 90 processus.fig $(HTMLDIRUM)/processus.png
|
|
Packit |
0f19cf |
convert -trim pagesetup2.fig $(HTMLDIRUM)/pagesetup2.png
|
|
Packit |
0f19cf |
$(CP) *.png tables/*.png $(HTMLDIRUM)/.
|
|
Packit |
0f19cf |
$(CP) -r math/figures $(HTMLDIRUM)/.
|
|
Packit |
0f19cf |
$(CP) -r $(XSLDBK)/images $(HTMLDIRUM)/.
|
|
Packit |
0f19cf |
$(CP) manual.css $(HTMLDIRUM)/.
|
|
Packit |
0f19cf |
|
|
Packit |
0f19cf |
$(HTMLDIRRN)/index.html: release-notes.xml
|
|
Packit |
0f19cf |
@$(XSLTPROC) --xinclude --param base.dir "'$(HTMLDIRRN)'" \
|
|
Packit |
0f19cf |
$(HTML_PARAMS) \
|
|
Packit |
0f19cf |
$(XSLPROFH) $<
|
|
Packit |
0f19cf |
$(CP) manual.css $(HTMLDIRRN)/.
|
|
Packit |
0f19cf |
|
|
Packit |
0f19cf |
clean:
|
|
Packit |
0f19cf |
$(RM) manual.pdf release-notes.pdf *.db
|
|
Packit |
0f19cf |
$(RM) $(FIGURES) manpage/dblatex.1.gz
|
|
Packit |
0f19cf |
$(RM) -r $(HTMLDIRUM)
|
|
Packit |
0f19cf |
$(RM) -r $(HTMLDIRRN)
|
|
Packit |
0f19cf |
|
|
Packit |
0f19cf |
native db2latex simple: version.xml
|
|
Packit |
0f19cf |
$(XSLTPROC) --xinclude \
|
|
Packit |
0f19cf |
--param profile.attribute "'output'" \
|
|
Packit |
0f19cf |
--param profile.value "'manual;pdf'" \
|
|
Packit |
0f19cf |
$(XSLPROF) manual.xml | \
|
|
Packit |
0f19cf |
../scripts/dblatex -P target.database.document=$(HERE)/olinkdb.xml \
|
|
Packit |
0f19cf |
-P current.docid=usermanual \
|
|
Packit |
0f19cf |
-T $@ -o manual-$@.pdf -
|
|
Packit |
0f19cf |
|
|
Packit |
0f19cf |
# Use the PDF image because the PNG from .fig is ugly
|
|
Packit |
0f19cf |
pagesetup2.pdf: pagesetup2.fig
|
|
Packit |
0f19cf |
fig2dev -L pdf $< $@
|
|
Packit |
0f19cf |
|
|
Packit |
0f19cf |
# Build the Olink database
|
|
Packit |
0f19cf |
%.db: %.xml
|
|
Packit |
0f19cf |
$(XSLTPROC) --xinclude --stringparam collect.xref.targets "only" \
|
|
Packit |
0f19cf |
$(XSLOLINK) $<
|
|
Packit |
0f19cf |
mv target.db $@
|
|
Packit |
0f19cf |
|
|
Packit |
0f19cf |
# Build the PDF
|
|
Packit |
0f19cf |
%.pdf: %.xml version.xml $(TABLES) $(CHANGES) pagesetup2.pdf
|
|
Packit |
0f19cf |
@$(XSLTPROC) --xinclude \
|
|
Packit |
0f19cf |
--param profile.attribute "'output'" \
|
|
Packit |
0f19cf |
--param profile.value "'manual;pdf'" $(XSLPROF) $< | \
|
|
Packit |
0f19cf |
../scripts/dblatex -P target.database.document=$(HERE)/olinkdb.xml \
|
|
Packit |
0f19cf |
-c manual.conf $(OPTS) -o $@ -
|
|
Packit |
0f19cf |
|
|
Packit |
0f19cf |
# Build the manpage
|
|
Packit |
0f19cf |
%.1.gz: %.1
|
|
Packit |
0f19cf |
gzip -f $<
|
|
Packit |
0f19cf |
|
|
Packit |
0f19cf |
%.1: %.1.xml
|
|
Packit |
0f19cf |
$(XSLTPROC) --param profile.attribute "'output'" \
|
|
Packit |
0f19cf |
--param profile.value "'manpage'" \
|
|
Packit |
0f19cf |
--xinclude $(XSLPROF) $< | \
|
|
Packit |
0f19cf |
$(XSLTPROC) $(XSLMAN) -
|
|
Packit |
0f19cf |
|
|
Packit |
0f19cf |
# Actual version of the release
|
|
Packit |
0f19cf |
version.xml: FORCE
|
|
Packit |
0f19cf |
echo "<emphasis>$(VERSION)</emphasis>" > $@
|
|
Packit |
0f19cf |
|
|
Packit |
0f19cf |
FORCE:
|