-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (29 loc) · 773 Bytes
/
Copy pathMakefile
File metadata and controls
40 lines (29 loc) · 773 Bytes
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
.PHONY: all build merge collector clean render
SUBMISSIONS := $(wildcard submissions/*.sexp)
all: build
build:
dune build
merge: build
mkdir -p repo
./_build/default/bin/main.exe merge \
schemas/example.v1.sexp \
$(SUBMISSIONS) \
-o repo/merged.sexp -b batch-001
render: build
mkdir -p repo
./_build/default/bin/main.exe render \
repo/merged.sexp \
-s schemas/example.v1.sexp \
-t web/merged_template.html \
-o repo/merged.html
@echo "Open repo/merged.html in a browser"
collector: build
mkdir -p dist
sed -e '/__INJECT_JS__/{' \
-e ' r _build/default/web/main.bc.js' \
-e ' d' \
-e '}' web/template.html > dist/collector.html
@echo "Wrote dist/collector.html (self-contained)"
clean:
dune clean
rm -rf repo dist