-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (39 loc) · 1.09 KB
/
Makefile
File metadata and controls
46 lines (39 loc) · 1.09 KB
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
define PRINT_HELP_PYSCRIPT
import re, sys
print("{ln}{sp}HELP{sp}{ln}".format(ln=24*"=", sp=5*" "))
for line in sys.stdin:
category_match = re.match(r'^#%% (.*)$$', line)
target_match = re.match(r'^([a-zA-Z0-9_-]+):.*?#% (.*)$$', line)
if category_match:
category, = category_match.groups()
print("\n{}:".format(category))
if target_match:
target, help = target_match.groups()
print(" {:26} {}".format(target, help))
endef
export PRINT_HELP_PYSCRIPT
.PHONY: help
.DEFAULT_GOAL := help
help:
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
#%% Run
.PHONY: run-frontend
run-frontend: #% Run frontend
cd packages/frontend && npm run start
#%% Utils commands
.PHONY: bootstrap
bootstrap: #% Project bootstrap
npm install --include=dev
npx lerna bootstrap
@$(MAKE) -s build_deps
.PHONY: clean
clean: #% Clean project
@if [ -d "node_modules" ]; then \
npm run clean; \
fi
.PHONY: rebootstrap
rebootstrap: clean bootstrap #% Clean project and bootstrap
.PHONY: build_deps
build_deps: #% Build project dependencies
cd packages/types && npm run build
cd packages/analyzer && npm run build