forked from WICG/attribution-reporting-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (31 loc) · 1.15 KB
/
Makefile
File metadata and controls
45 lines (31 loc) · 1.15 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
SHELL = /bin/bash
OUT_DIR ?= out
.PHONY: all clean validator
all: $(OUT_DIR)/index.html validator
venv-marker := venv/.make
bikeshed := venv/bin/bikeshed
venv: $(venv-marker)
$(venv-marker): Makefile
python3 -m venv venv
@touch $@
$(bikeshed): $(venv-marker) Makefile
venv/bin/pip install $(notdir $@)
@touch $@
$(OUT_DIR)/index.html: index.bs $(OUT_DIR) $(bikeshed)
$(bikeshed) --die-on=lint spec $< $@
validator: $(OUT_DIR)/validate-headers.html $(OUT_DIR)/validate-headers.js $(OUT_DIR)/filters.html $(OUT_DIR)/filters-main.js
$(OUT_DIR)/validate-headers.html: ts/src/header-validator/index.html $(OUT_DIR)
@ cp $< $@
$(OUT_DIR)/validate-headers.js: ts/dist/header-validator/index.js $(OUT_DIR)
@ cp $< $@
$(OUT_DIR):
@ mkdir -p $@
ts/dist/header-validator/index.js ts/dist/header-validator/filters-main.js: ts/package.json ts/tsconfig.json ts/webpack.config.js ts/src/*.ts ts/src/*/*.ts
@ npm ci --prefix ./ts
@ npm run pack --prefix ./ts
clean:
@ rm -rf $(OUT_DIR) venv
$(OUT_DIR)/filters.html: ts/src/header-validator/filters.html $(OUT_DIR)
@ cp $< $@
$(OUT_DIR)/filters-main.js: ts/dist/header-validator/filters-main.js $(OUT_DIR)
@ cp $< $@