-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (27 loc) · 886 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
SQLDB=/tmp/businfo/htdb.sql
DBOPTS=--gps --gps-cache=gps.csv --pre-filter=filter.map
MAKERES=./tools/makeres.py
SQLITEDB=~/ht.sqlite
SQLITE=sqlite3
CHKSUM=/tmp/businfo/.checksum
LINECOMPILER=bsc
LINECOMPILERSRCPATH=bin/${LINECOMPILER}
LINECOMPILERSRC=${LINECOMPILERSRCPATH}/${LINECOMPILER}.go
.PHONY: makedb clean test sqlite mysql mysqldb
all: sqlite
makedb: bsc
@echo "Generating raw SQLite content..."
@${MAKERES} ${DBOPTS} sqlite raw/
mysqldb: bsc
@echo "Generating raw MySQL content..."
@${MAKERES} ${DBOPTS} mysql raw/
bsc:
@go build -o ${LINECOMPILERSRCPATH}/${LINECOMPILER} ${LINECOMPILERSRC}
sqlite: makedb
@echo "Making SQLite database..."
@rm -f ${SQLITEDB} && ${SQLITE} ${SQLITEDB} < ${SQLDB}
@echo "Wrote in ${SQLITEDB}"
deploy-local: mysqldb
@./tools/mysql_update.sh local .bpw
clean:
rm -rf /tmp/businfo && rm -f ${LINECOMPILERSRCPATH}/${LINECOMPILER}