X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Fhelp%2FC%2FMakefile;h=817d6964ae2bb125cc21d8e472707e3ed4be88ec;hb=693c001c917a04344e81fee6e032efc3a9aa1cb9;hp=5fea4a91d0b34d5d01e7fbe7118b1ffeb7b394d3;hpb=4690d75a51104328c812b692e9fe98df2a22c565;p=helm.git diff --git a/helm/software/matita/help/C/Makefile b/helm/software/matita/help/C/Makefile index 5fea4a91d..817d6964a 100644 --- a/helm/software/matita/help/C/Makefile +++ b/helm/software/matita/help/C/Makefile @@ -1,60 +1,51 @@ + +include ../../../Makefile.defs + XSLTPROC=xsltproc -XHTML_XSL=matita-xhtml.xsl -FO_XSL=matita-fo.xsl -TEX_XSL=matita-tex.xsl +XHTML_XSL=xsl/matita-xhtml.xsl MAIN=matita.xml +DEPS := $(wildcard *.xml) -# one of "fop", "pdflatex" -PDF_METHOD=pdflatex +DESTDIR = /usr/local/share/doc/matita/ -all: html txt +all: quickref-stamp html-stamp pdf-stamp -clean: - rm -f *.html *.fo *.pdf - rm -rf $(filter-out version.txt,$(wildcard *.txt)) - rm -f *-stamp - rm -f matita.out matita.log matita.glo matita.dvi matita.idx - rm -f matita.aux matita.tex - -# test (dumb implementation) -test: - SP_ENCODING=UTF-8 docbook2txt matita.xml - -# XHTMLs generation - -.PHONY: html -html: html-stamp -html-stamp: $(MAIN) - xsltproc $(XHTML_XSL) $< +quickref-stamp: tactics_quickref.xml declarative_tactics_quickref.xml touch $@ -# TXTs generation +tactics_quickref.xml: xsl/tactic_quickref.xsl sec_tactics.xml + $(XSLTPROC) --param declarative "''" $< matita.xml > $@ +declarative_tactics_quickref.xml: xsl/tactic_quickref.xsl sec_declarative_tactics.xml + $(XSLTPROC) --param declarative "'declarative_'" $< matita.xml > $@ -TXTS = $(patsubst %.html,%.txt,$(wildcard *.html)) -.PHONY: txt -txt: txt-stamp -txt-stamp: html-stamp - $(MAKE) $(TXTS) +html: quickref-stamp html-stamp +html-stamp: $(MAIN) $(DEPS) $(XHTML_XSL) + $(XSLTPROC) $(XHTML_XSL) $< touch $@ -%.txt: %.html - w3m -dump $< > $@ - -# PDF generation -pdf: pdf-stamp +pdf: quickref-stamp pdf-stamp pdf-stamp: $(patsubst %.xml,%.pdf,$(MAIN)) touch $@ -%.fo: %.xml - xsltproc $(FO_XSL) $< | xmllint --format - > $@ -%.tex: %.xml - xsltproc $(TEX_XSL) $< > $@ - -ifeq ($(PDF_METHOD),fop) -%.pdf: %.fo - fop $< $@ -else ifeq ($(PDF_METHOD),pdflatex) -%.pdf: %.tex - pdflatex $< -endif +%.pdf: %.xml + dblatex -rscripts/fix-symbols.sh -tpdf $< +%.dvi: %.xml + dblatex -rscripts/fix-symbols.sh -tdvi $< +%.ps: %.xml + dblatex -rscripts/fix-symbols.sh -tps $< + +install: install-html install-pdf +install-pdf: pdf-stamp + mkdir -p $(DESTDIR)/pdf + cp matita.pdf $(DESTDIR)/pdf + +install-html: html-stamp + mkdir -p $(DESTDIR)/html + cp *.html *.css $(DESTDIR)/html + test -d $(DESTDIR)/html/figures || mkdir $(DESTDIR)/html/figures + cp figures/* $(DESTDIR)/html/figures/ + +clean: + rm -f *.html *.pdf *.ps *.dvi *.tex + rm -f *-stamp