-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (52 loc) · 985 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#
# This makefile is used as a sort of portable
# macro language and just dispatches to cargo
# for building. You are free to use cargo directly
# instead.
#
PREFIX=${HOME}/.local
BIN=${PREFIX}/bin
TEST_FILES="$(shell pwd)/test/files"
all: db
.PHONY: db
db:
diesel migration run
$(MAKE) schema
.PHONY: db-redo
db-redo:
diesel migration redo
$(MAKE) schema
.PHONY: schema
schema:
sed -i 's/Integer/BigInt/g' src/db/schema.rs
.PHONY: bleed
bleed:
cargo update
rustup update
.PHONY: debug
debug:
cargo build --debug
.PHONY: release
release:
cargo build --release
.PHONY: test-clean
test-clean:
rm -rf ${TEST_FILES}/*
.PHONY: test-files
test-files:
$(shell) ./test/create-files.sh ${TEST_FILES}
.PHONY: test
test: test-files
cargo test --verbose
.PHONY: bench
bench:
cargo bench
.PHONY: clean
clean:
cargo clean
.PHONY: link
link:
ln -s target/debug/tag tag
ln -s target/debug/tdb tdb
ln -s target/release/tag ${BIN}/tag
ln -s target/release/tdb ${BIN}/tdb