]> matita.cs.unibo.it Git - helm.git/blob - metadata/Makefile
Bug fixed: an unification exception used to escape when coercions were disabled.
[helm.git] / metadata / Makefile
1 FILLDB=fill_db.sql
2 INDUCTIVETYPES=inductive_types.txt
3 CONSTANTSANDVARIABLES=constants_and_variables.txt
4 ALLOBJECTS=all_objects.txt
5 GETTERURL=http://mowgli.cs.unibo.it:58081
6 DBCOMM=mysql -pbjIcRpru -u helmadmin mowgli
7 #DBCOMM=psql -q -U helm mowgli2
8
9 all:
10         @echo "try one of:"
11         @echo "  make indexes"
12         @echo "  make drop_tables"
13         @echo "  make create_tables"
14         @echo "  make $(FILLDB)"
15         @echo "  make fill_db"
16
17 $(FILLDB):
18         rm -f $(FILLDB)
19         time for i in `cat $(INDUCTIVETYPES)` ; do (cd tmp ; wget -t 1 -O downloaded.xml.gz "$(GETTERURL)/getxml?format=gz&uri=$$i") ; zcat tmp/downloaded.xml.gz > tmp/inductive_type.xml ; extractor/meta_ind $$i "tmp/inductive_type.xml" >> $(FILLDB) ; rm -f tmp/downloaded.xml.gz tmp/inductive_type.xml; done > log 2>&1
20         time for i in `cat $(CONSTANTSANDVARIABLES)` ; do (cd tmp ; wget -t 1 -O downloaded.xml.gz "$(GETTERURL)/getxml?format=gz&uri=$$i" ; wget -t 1 -O downloaded_body.xml.gz "$(GETTERURL)/getxml?format=gz&uri=$$i.body"); zcat tmp/downloaded.xml.gz > tmp/type.xml ; zcat tmp/downloaded_body.xml.gz > tmp/body.xml ; extractor/meta $$i "tmp/body.xml" "tmp/type.xml" >> $(FILLDB) ; rm -f tmp/downloaded.xml.gz tmp/downloaded_body.xml.gz tmp/type.xml tmp/body.xml ; done > log 2>&1
21         cat sql/fill_inconcl_aux.sql >> $@
22         cat sql/fill_no_concl_hyp.sql >> $@
23
24 indexes:
25         wget "$(GETTERURL)/getalluris?format=txt" -O - | grep -v "\\.body$$" | grep -v "\\.types$$" | grep -v "\\.proof_tree$$" | sort > $(ALLOBJECTS)
26         cat $(ALLOBJECTS) | grep "\\.ind$$" > $(INDUCTIVETYPES)
27         cat $(ALLOBJECTS) | grep -v "\\.ind$$" > $(CONSTANTSANDVARIABLES)
28
29 drop_tables:
30         #cat sql/drop_mowgli_tables.sql | $(DBCOMM)
31         cat sql/drop_mowgli_tables.mysql.sql | $(DBCOMM)
32
33 create_tables:
34         #cat sql/create_mowgli_tables.sql | $(DBCOMM)
35         cat sql/create_mowgli_tables.mysql.sql | $(DBCOMM)
36
37 fill_db:
38         cat $(FILLDB) | $(DBCOMM)
39
40 .PHONY: all create_tables drop_tables fill_db indexes $(FILLDB)