-
Notifications
You must be signed in to change notification settings - Fork 179
/
Copy pathMakefile
100 lines (72 loc) · 1.7 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
90
91
92
93
94
95
96
97
98
99
# shared-data makefile
# using bash instead of /bin/bash in SHELL prevents macOS optimizing away our PATH update
SHELL := bash
# TODO(mc, 2018-10-25): use dist to match other projects
BUILD_DIR := build
# These variables can be overriden when make is invoked to customize the
# behavior of jest
tests ?=
cov_opts ?= --coverage=true --ci=true --collectCoverageFrom='shared-data/js/**/*.(js|ts|tsx)'
test_opts ?=
# Top level targets
.PHONY: all
all: clean dist
.PHONY: setup
setup: setup-py setup-js
.PHONY: dist
dist: dist-js dist-py
.PHONY: clean
clean: clean-js clean-py
# JavaScript targets
.PHONY: setup-js
setup-js: dist-js
.PHONY: dist-js
dist-js:
@yarn shx mkdir -p $(BUILD_DIR)
node js/scripts/build.js $(BUILD_DIR)
.PHONY: clean-js
clean-js:
yarn shx rm -rf $(BUILD_DIR)
# Python targets
.PHONY: setup-py
setup-py:
$(MAKE) -C python setup-py
.PHONY: dist-py
dist-py:
$(MAKE) -C python sdist wheel
.PHONY: clean-py
clean-py:
$(MAKE) -C python clean
.PHONY: teardown-py
teardown-py:
$(MAKE) -C python teardown
.PHONY: lint-py
lint-py:
$(MAKE) -C python lint
.PHONY: format-py
format-py:
$(MAKE) -C python format
.PHONY: push-no-restart
push-no-restart:
$(MAKE) -C python push-no-restart
.PHONY: push
push:
$(MAKE) -C python push
.PHONY: push-no-restart-ot3
push-no-restart-ot3:
$(MAKE) -C python push-no-restart-ot3
.PHONY: push-ot3
push-ot3:
$(MAKE) -C python push-ot3
.PHONY: deploy-py
deploy-py:
$(MAKE) -C python deploy
.PHONY: test-py
test-py:
$(MAKE) -C python test
.PHONY: test
test:
$(MAKE) -C .. test-js-shared-data tests="$(tests)" test_opts="$(test_opts)"
.PHONY: test-cov
test-cov:
make -C .. test-js-shared-data tests=$(tests) test_opts="$(test_opts)" cov_opts="$(cov_opts)"