-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (34 loc) · 1.89 KB
/
Copy pathMakefile
File metadata and controls
40 lines (34 loc) · 1.89 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
.PHONY: help check bench lights chapters demo
.DEFAULT_GOAL := help
help:
@echo "make check - is everything wired"
@echo "make bench - the scoreboard: maps vs truth"
@echo "make lights - open the club in a browser"
@echo "make chapters- the 20-line second reader. same file"
@echo "make demo - the whole chain, one song"
check:
@python3 -c "import json,sys; m=json.load(open('maps/example.map.json')); \
assert m['map']=='0.1'; assert len(m['beats'])==32; assert m['vectors'] is None; \
print('map file OK ', len(m['beats']),'beats,',len(m['moments']),'moments')"
@test -f MAP.md && echo "MAP.md OK"
@test -f readers/lights/FRAME.md && echo "FRAME.md OK (lighting reader)"
@test -f readers/lights/RECIPE.md && echo "RECIPE.md OK (lighting reader)"
@test -f listen/GPU.md && echo "GPU.md OK"
@echo "--- not built yet (this is expected on day one) ---"
@test -f bench/bench.py || echo " bench/bench.py -> Sebastian"
@test -f play/play.py || echo " play/play.py -> Dheeraj"
@test -f readers/lights/index.html || echo " readers/lights/index.html -> Nikhita"
@test -f listen/listen.py || echo " listen/listen.py -> Amal"
@echo "--- already works ---"
@printf " chapters reader: "; python3 readers/chapters/chapters.py maps/example.map.json | tr "\n" " "; echo
bench:
@test -f bench/bench.py && python3 bench/bench.py || \
echo "bench/bench.py does not exist yet. Sebastian owns it. See bench/README.md"
chapters:
@python3 readers/chapters/chapters.py maps/example.map.json
lights:
@test -f readers/lights/index.html && (xdg-open readers/lights/index.html 2>/dev/null || open readers/lights/index.html) || \
echo "readers/lights/index.html does not exist yet. Nikhita owns it. See readers/lights/README.md"
demo:
@echo "the whole chain. target: Friday 4 September."
@$(MAKE) --no-print-directory check