+TARGETS = con ind var body types proof_tree
+
+STATS_TARGETS = \
+ $(TARGETS:%=stats_%.xml) \
+ stats_theories.xml
+
+all: $(STATS_TARGETS)
+
stats: stats.cc
g++ -o $@ `pkg-config gdome2-cpp-smart --cflags --libs` $<
-stats.xml:
- echo "<statistics>" >stats.xml
- find /local/helm/library/coq_contribs/$(CONTRIB) -type f -exec ./stats.sh {} \; >>stats.xml
- echo "</statistics>" >>stats.xml
+stats_%.xml:
+ @echo "<statistics>" >$@
+ @find /local/helm/library/coq_contribs/$(CONTRIB) -name "*."$(@:stats_%.xml=%)".xml.gz" -type f -exec ./stats.sh {} \; >>$@
+ @echo "</statistics>" >>$@
-stats.html: stats.xml
+stats_theories.xml:
+ @echo "<statistics>" >$@
+ @find /local/helm/library/theories -name "*.xml" -type f -exec ./stats.sh {} \; >>$@
+ @echo "</statistics>" >>$@
+
+stats_%.html: stats_%.xml
xsltproc mkhtml.xsl $< >$@
-stats.txt: stats.html
- w3m -dump a.html > a.txt
+stats_%.txt: stats_%.html
+ w3m -cols 132 -dump $< >$@
+
+clean:
+ rm -f stats.{xml,html,txt}