]> matita.cs.unibo.it Git - helm.git/blob - helm/metadata/dc/Makefile
ocaml 3.09 transition
[helm.git] / helm / metadata / dc / Makefile
1
2 SQL_DB = mowgli
3 SQL_DIR = sql
4 SQL_HOST = localhost
5 SQL_PASSWORD = bjIcRpru
6 SQL_USER = helmadmin
7 DC_DIR = /projects/helm/library/dc/
8
9 SQL_ENGINE = \
10         mysql -h $(SQL_HOST) -u $(SQL_USER) --password=$(SQL_PASSWORD) $(SQL_DB)
11
12 all:
13         @echo "try one of:"
14         @echo "  make connect"
15         @echo "  make create_tables"
16         @echo "  make fill_db"
17         @echo "  make drop_tables"
18
19 connect:
20         $(SQL_ENGINE)
21
22 create_tables:
23         $(SQL_ENGINE) < $(SQL_DIR)/create_dc_tables.sql
24
25 fill_db:
26         find $(DC_DIR) -name "*.xml" -exec ./fill_db.pl {} \; | $(SQL_ENGINE)
27
28 drop_tables:
29         $(SQL_ENGINE) < $(SQL_DIR)/drop_dc_tables.sql
30
31 .PHONY: all connect create_tables fill_db drop_tables
32