-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
89 lines (68 loc) · 1.82 KB
/
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
LOCAL_DEPS = $(wildcard local-deps/*)
compile: app component-deps
@if [ ! -f .first-build ]; then \
scripts/post-build-msg; \
touch .first-build; \
fi
app:
./rebar3 compile
component-deps: priv/components/.deps-resolved
priv/components/.deps-resolved:
bower install
scripts/patch-components
touch priv/components/.deps-resolved
sync-tf-components:
scripts/sync-tf-components
scripts/patch-components
lint-components: polylint
polylint --root priv/components --input `(cd priv/components && find -name guild-*.html)`
polylint:
@if ! which polylint >/dev/null; then \
echo "polylint is not installed - use 'npm install -g polylint' to install"; \
exit 1; \
fi
vulcanize-view-index:
cd priv && vulcanize \
--inline-scripts \
--inline-css \
--strip-comments \
view-index.html | gzip > view-index-all.html.gz
clean: clean-local-deps clean-components clean-vulcanized
rm -rf build; rm -f rebar.lock
rm -f compile_commands.json
rm -f .first-build
clean-vulcanized:
cd priv && rm -f *.html.gz
clean-local-deps: $(LOCAL_DEPS:=.clean)
local-deps/%.clean:
make -C local-deps/$* clean
clean-components:
rm -f priv/components/.deps-resolved
cd priv/components && ls \
| grep -v '^guild-' \
| grep -v '^tf-' \
| grep -v '^vz-' \
| xargs rm -rf
upgrade:
./rebar3 upgrade
./rebar3 compile
test: app
test/internal $(TESTS)
priv/bin/tensorflow-port test
test-operations: compile
test/operations
test-app: test test-operations
shell:
ERL_LIBS=local-deps:build/default/lib erl -s guild
shell-reload:
ERL_LIBS=local-deps:build/default/lib erl -s e2_reloader -s guild
version:
@if [ -z "$(VERSION)" ]; then \
echo "VERSION must be defined"; \
exit 1; \
fi
# Ordering dependencies so invoking targets explicitly
release: version
make vulcanize-view-index
make compile
scripts/mkrel $(VERSION)