From f7a70855d0e4ac435b01d96becdfd9a61b5bd854 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Sat, 22 Nov 2008 14:01:14 +0000 Subject: [PATCH] better manual generation --- helm/software/matita/help/C/Makefile | 102 ++++-------------- .../software/matita/help/C/xsl/matita-tex.xsl | 31 ------ 2 files changed, 23 insertions(+), 110 deletions(-) delete mode 100644 helm/software/matita/help/C/xsl/matita-tex.xsl diff --git a/helm/software/matita/help/C/Makefile b/helm/software/matita/help/C/Makefile index 491bae61b..684d6fabf 100644 --- a/helm/software/matita/help/C/Makefile +++ b/helm/software/matita/help/C/Makefile @@ -3,103 +3,47 @@ include ../../../Makefile.defs XSLTPROC=xsltproc 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 DEPS := $(wildcard *.xml) DESTDIR = /usr/local/share/doc/matita/ -all: quickref +all: quickref-stamp html-stamp pdf-stamp -quickref: tactics_quickref.xml declarative_tactics_quickref.xml +quickref-stamp: tactics_quickref.xml declarative_tactics_quickref.xml + touch $@ tactics_quickref.xml: xsl/tactic_quickref.xsl sec_tactics.xml - $(XSLTPROC) --param declarative "''" $< matita.xml > tactics_quickref.xml + $(XSLTPROC) --param declarative "''" $< matita.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 - -# one of: "docbook2tex", "xsl" -TEX_METHOD=xsl - -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 + $(XSLTPROC) --param declarative "'declarative_'" $< matita.xml > $@ -# test (dumb implementation) -test: - SP_ENCODING=UTF-8 docbook2txt matita.xml - -# XHTMLs generation - -.PHONY: html -html: html-stamp +html: quickref-stamp html-stamp html-stamp: $(MAIN) $(DEPS) $(XHTML_XSL) $(XSLTPROC) $(XHTML_XSL) $< touch $@ -# TXTs generation - -TXTS = $(patsubst %.html,%.txt,$(wildcard *.html)) -.PHONY: txt -txt: txt-stamp -txt-stamp: html-stamp - $(MAKE) txt-stamp-rec - touch $@ -txt-stamp-rec: $(TXTS) -%.txt: %.html - w3m -dump -no-graph $< > $@ - -# PDF generation - -pdf: pdf-stamp +pdf: quickref-stamp pdf-stamp pdf-stamp: $(patsubst %.xml,%.pdf,$(MAIN)) touch $@ -%.fo: %.xml - $(XSLTPROC) $(FO_XSL) $< | xmllint --format - > $@ -ifeq ($(TEX_METHOD),docbook2tex) -%.tex: %.xml $(DEPS) - docbook2tex $< -else ifeq ($(TEX_METHOD),xsl) -%.tex: %.xml $(TEX_XSL) $(DEPS) - $(XSLTPROC) $(TEX_XSL) $< > $@ -endif - -ifeq ($(PDF_METHOD),fop) -%.pdf: %.fo - fop $< $@ -else ifeq ($(PDF_METHOD),pdflatex) -%.pdf: %.tex - $(TEX_ENV) pdflatex $< -endif - -%.dvi: %.tex - $(TEX_ENV) latex $< -%.ps: %.dvi - dvips $< - -# installation +%.pdf: %.xml + dblatex -tpdf $< +%.dvi: %.xml + dblatex -tdvi $< +%.ps: %.xml + dblatex -tps $< install: install-html -install-html: html-stamp - cp *.html *.css $(DESTDIR) - test -d $(DESTDIR)/figures || mkdir $(DESTDIR)/figures - cp figures/* $(DESTDIR)/figures/ - -# shotcuts +install-html: html-stamp pdf-stamp + mkdir -p $(DESTDIR)/html + cp *.html *.css $(DESTDIR)/html + test -d $(DESTDIR)/html/figures || mkdir $(DESTDIR)/html/figures + cp figures/* $(DESTDIR)/html/figures/ + mkdir -p $(DESTDIR)/pdf + cp matita.pdf $(DESTDIR)/pdf -tex: $(patsubst %.xml,%.tex,$(MAIN)) -dvi: $(patsubst %.xml,%.dvi,$(MAIN)) -ps: $(patsubst %.xml,%.ps,$(MAIN)) - -.PRECIOUS: matita.tex matita.dvi +clean: + rm -f *.html *.pdf *.ps *.dvi *.tex + rm -f *-stamp diff --git a/helm/software/matita/help/C/xsl/matita-tex.xsl b/helm/software/matita/help/C/xsl/matita-tex.xsl deleted file mode 100644 index 5f51e7cbc..000000000 --- a/helm/software/matita/help/C/xsl/matita-tex.xsl +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - /usr/share/xml/docbook/stylesheet/db2latex/latex/figures - - utf8x - \usepackage{txfonts} -\SetUnicodeOption{mathletters} % prefer math-mode letters - - 0 - - - - - \begin{tabular}{rcll} - - - \end{tabular} - - - - - \paragraph*{ - - } - - - -- 2.39.2