X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=doc%2FMakefile;h=d3196612abfba67c266546ad4391ef78dd01cebd;hb=c2fa79dbb731508e341554799eb12f0ee0b3183f;hp=697a7e8e23f48a1cde810e88e8b612d56ce02753;hpb=7ecb962a06af8c29471aefcc65be1e2ef2dbc85e;p=mp-xquery-moved-to-github.git diff --git a/doc/Makefile b/doc/Makefile index 697a7e8..d319661 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -2,32 +2,49 @@ .PHONY: check all .SUFFIXES: .3mp .xml .1 +prefix = /usr + +VERSION=$(shell . ../IDMETA; echo $$VERSION) + XSLTPROC_COMPILE = xsltproc --xinclude -path "." -HTML_COMPILE = $(XSLTPROC_COMPILE) id.htmlhelp.xsl -MAN_COMPILE = $(XSLTPROC_COMPILE) id.man.xsl +PDF_COMPILE = dblatex -P latex.class.options=a4paper,12pt,twoside,openright +HTML_COMPILE = $(XSLTPROC_COMPILE) common/id.htmlhelp.xsl +MAN_COMPILE = $(XSLTPROC_COMPILE) common/id.man.xsl REFFILES = xquery.xml MANFILES=xquery.3mp XMLFILES=book.xml manref.xml -all: $(MANFILES) +all: index.html $(MANFILES) -index.html: $(XMLFILES) +index.html: $(XMLFILES) local.ent $(HTML_COMPILE) book.xml -manref.xml: $(REFFILES) +manref.xml: $(REFFILES) local.ent rm -f manref.xml for i in $(REFFILES); do \ xsltproc stripref.xsl $$i | sed 1d >>manref.xml; \ done +mp-xquery.pdf: $(XMLFILES) local.ent + rm -f mp-xquery.pdf + $(PDF_COMPILE) book.xml + mv book.pdf mp-xquery.pdf + .xml.3mp: $(MAN_COMPILE) $< clean: - rm -f *.html *.pdf manref.xml *.hhp *.hhc $(MANFILES) + rm -f local.ent *.html *.pdf manref.xml *.hhp *.hhc $(MANFILES) distclean: clean +local.ent: local.ent.in + sed "s/@VERSION@/$(VERSION)/" local.ent + check: all +install: + mkdir -p $(DESTDIR)$(prefix)/share/man/man3 + cp *.3mp $(DESTDIR)$(prefix)/share/man/man3/ +