2 include ../../../Makefile.defs
5 XHTML_XSL=xsl/matita-xhtml.xsl
6 FO_XSL=xsl/matita-fo.xsl
7 TEX_XSL=xsl/matita-tex.xsl
8 TEX_UNICODE_PATH=$(SRCROOT)/share/texmf/unicode
9 TEX_ENV=TEXINPUTS=.:$(TEX_UNICODE_PATH):$(TEX_UNICODE_PATH)/data:
11 DEPS := $(wildcard *.xml)
13 DESTDIR = /usr/local/share/doc/matita/
17 quickref: tactic_quickref.xml
18 tactic_quickref.xml: xsl/tactic_quickref.xsl sec_tactics.xml
19 $(XSLTPROC) $< matita.xml > tactic_quickref.xml
21 # one of: "fop", "pdflatex"
24 # one of: "docbook2tex", "xsl"
28 rm -f *.html *.fo *.pdf
29 rm -rf $(filter-out version.txt,$(wildcard *.txt))
31 rm -f matita.out matita.log matita.glo matita.dvi matita.idx
32 rm -f matita.aux matita.tex
34 # test (dumb implementation)
36 SP_ENCODING=UTF-8 docbook2txt matita.xml
42 html-stamp: $(MAIN) $(DEPS) $(XHTML_XSL)
43 xsltproc $(XHTML_XSL) $<
48 TXTS = $(patsubst %.html,%.txt,$(wildcard *.html))
55 w3m -dump -no-graph $< > $@
60 pdf-stamp: $(patsubst %.xml,%.pdf,$(MAIN))
64 xsltproc $(FO_XSL) $< | xmllint --format - > $@
65 ifeq ($(TEX_METHOD),docbook2tex)
68 else ifeq ($(TEX_METHOD),xsl)
69 %.tex: %.xml $(TEX_XSL) $(DEPS)
70 xsltproc $(TEX_XSL) $< > $@
73 ifeq ($(PDF_METHOD),fop)
76 else ifeq ($(PDF_METHOD),pdflatex)
78 $(TEX_ENV) pdflatex $<
89 install-html: html-stamp
90 cp *.html *.css $(DESTDIR)
91 test -d $(DESTDIR)/figures || mkdir $(DESTDIR)/figures
92 cp figures/* $(DESTDIR)/figures/
96 tex: $(patsubst %.xml,%.tex,$(MAIN))
97 dvi: $(patsubst %.xml,%.dvi,$(MAIN))
98 ps: $(patsubst %.xml,%.ps,$(MAIN))
100 .PRECIOUS: matita.tex matita.dvi