]> matita.cs.unibo.it Git - helm.git/blob - matita/help/C/Makefile
New documentation.
[helm.git] / matita / help / C / Makefile
1 XSLTPROC=xsltproc
2 XHTML_XSL=matita-xhtml.xsl
3 FO_XSL=matita-fo.xsl
4 MAIN=matita.xml
5
6 all: html txt
7
8 # XHTMLs generation
9
10 .PHONY: html
11 html: html-stamp
12 html-stamp: $(MAIN)
13         xsltproc $(XHTML_XSL) $<
14         touch $@
15
16 # TXTs generation
17
18 TXTS = $(patsubst %.html,%.txt,$(wildcard *.html))
19 .PHONY: txt
20 txt: txt-stamp
21 txt-stamp: html-stamp
22         $(MAKE) $(TXTS)
23         touch $@
24 %.txt: %.html
25         w3m -dump $< > $@
26
27 # PDF generation
28
29 pdf: pdf-stamp
30 pdf-stamp: $(patsubst %.xml,%.pdf,$(MAIN))
31         touch $@
32 %.fo: %.xml
33         xsltproc $(FO_XSL) $< | xmllint --format - > $@
34 %.pdf: %.fo
35         fop $< $@
36 clean:
37         rm -f *.html *.fo *.pdf
38         rm -rf $(filter-out version.txt,$(wildcard *.txt))
39         rm -f *-stamp
40