From: Stefano Zacchiroli <zack@upsilon.cc>
Date: Wed, 8 Feb 2006 12:38:11 +0000 (+0000)
Subject: added generation of .html and .txt version of manual parts
X-Git-Tag: 0.4.95@7852~1694
X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=9c4f15d74f5de01494a587322edc66b85f6d2f4e;p=helm.git

added generation of .html and .txt version of manual parts
---

diff --git a/matita/help/C/Makefile b/matita/help/C/Makefile
index ad3ad6433..f9ebfd09f 100644
--- a/matita/help/C/Makefile
+++ b/matita/help/C/Makefile
@@ -1,7 +1,24 @@
 XSLTPROC=xsltproc
 XHTML_XSL=http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl
 FO_XSL=http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl
-all:
+
+all: html txt
+
+.PHONY: html
+html: html-stamp
+html-stamp: matita.html
+	./split.ml $<
+	touch $@
+
+TXTS = $(patsubst %.html,%.txt,$(wildcard *.html))
+.PHONY: txt
+txt: txt-stamp
+txt-stamp: html-stamp
+	$(MAKE) $(TXTS)
+	touch $@
+
+%.txt: %.html
+	w3m -dump $< > $@
 %.html: %.xml
 	xsltproc $(XHTML_XSL) $< > $@
 %.fo: %.xml
@@ -10,3 +27,6 @@ all:
 	fop $< $@
 clean:
 	rm -f *.html *.fo *.pdf
+	rm -rf $(filter-out version.txt,$(wildcard *.txt))
+	rm -f *-stamp
+