]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/help/C/Makefile
RELATIONAL: new undecomposable definition of NLE
[helm.git] / helm / software / matita / help / C / Makefile
index fd0e3844f43d8302affa6c65cdd6baf6a0cd1900..2ca1a16b1034f5dc5a9de11281a1f2d956ec62b0 100644 (file)
@@ -2,22 +2,24 @@
 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
+FO_XSL=xsl/matita-fo.xsl
+TEX_XSL=xsl/matita-tex.xsl
 TEX_UNICODE_PATH=$(SRCROOT)/share/texmf/unicode
 TEX_ENV=TEXINPUTS=.:$(TEX_UNICODE_PATH):$(TEX_UNICODE_PATH)/data:
 MAIN=matita.xml
-DEPENDENCES = \
-       legal.xml \
-       sec_install.xml \
-       sec_gettingstarted.xml \
-       sec_intro.xml \
-       sec_terms.xml \
-       sec_tactics.xml \
-       sec_tacticals.xml \
-       sec_commands.xml \
-       sec_usernotation.xml
+DEPS := $(wildcard *.xml)
+
+DESTDIR = /usr/local/share/doc/matita/
+
+all: quickref
+
+quickref: tactics_quickref.xml declarative_tactics_quickref.xml
+
+tactics_quickref.xml: xsl/tactic_quickref.xsl sec_tactics.xml
+       $(XSLTPROC) --param declarative "''" $< matita.xml > tactics_quickref.xml
+declarative_tactics_quickref.xml: xsl/tactic_quickref.xsl sec_declarative_tactics.xml
+       $(XSLTPROC) --param declarative "'declarative_'" $< matita.xml > declarative_tactics_quickref.xml
 
 # one of: "fop", "pdflatex"
 PDF_METHOD=pdflatex
@@ -25,8 +27,6 @@ PDF_METHOD=pdflatex
 # one of: "docbook2tex", "xsl"
 TEX_METHOD=xsl
 
-all: html txt
-
 clean:
        rm -f *.html *.fo *.pdf
        rm -rf $(filter-out version.txt,$(wildcard *.txt))
@@ -42,8 +42,8 @@ test:
 
 .PHONY: html
 html: html-stamp
-html-stamp: $(MAIN) $(DEPENDENCES)
-       xsltproc $(XHTML_XSL) $<
+html-stamp: $(MAIN) $(DEPS) $(XHTML_XSL)
+       $(XSLTPROC) $(XHTML_XSL) $<
        touch $@
 
 # TXTs generation
@@ -55,7 +55,7 @@ txt-stamp: html-stamp
        $(MAKE) $(TXTS)
        touch $@
 %.txt: %.html
-       w3m -dump $< > $@
+       w3m -dump -no-graph $< > $@
 
 # PDF generation
 
@@ -64,13 +64,13 @@ pdf-stamp: $(patsubst %.xml,%.pdf,$(MAIN))
        touch $@
 
 %.fo: %.xml
-       xsltproc $(FO_XSL) $< | xmllint --format - > $@
+       $(XSLTPROC) $(FO_XSL) $< | xmllint --format - > $@
 ifeq ($(TEX_METHOD),docbook2tex)
-%.tex: %.xml
+%.tex: %.xml $(DEPS)
        docbook2tex $<
 else ifeq ($(TEX_METHOD),xsl)
-%.tex: %.xml $(TEX_XSL)
-       xsltproc $(TEX_XSL) $< > $@
+%.tex: %.xml $(TEX_XSL) $(DEPS)
+       $(XSLTPROC) $(TEX_XSL) $< > $@
 endif
 
 ifeq ($(PDF_METHOD),fop)
@@ -86,5 +86,19 @@ endif
 %.ps: %.dvi
        dvips $<
 
-.PRECIOUS: matita.tex
+# installation
+
+install: install-html
+install-html: html-stamp
+       cp *.html *.css $(DESTDIR)
+       test -d $(DESTDIR)/figures || mkdir $(DESTDIR)/figures
+       cp figures/* $(DESTDIR)/figures/
+
+# shotcuts
+
+tex: $(patsubst %.xml,%.tex,$(MAIN))
+dvi: $(patsubst %.xml,%.dvi,$(MAIN))
+ps: $(patsubst %.xml,%.ps,$(MAIN))
+
+.PRECIOUS: matita.tex matita.dvi