forked from w3c/attribution
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (25 loc) · 638 Bytes
/
Makefile
File metadata and controls
34 lines (25 loc) · 638 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
.PHONY: all venv clean images
.SUFFIXES: .bs .html
IMAGES := $(wildcard images/*.svg)
all: build/index.html
clean:
-rm -rf build venv
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 $@
build:
mkdir -p $@
build/index.html: api.bs $(IMAGES) build $(bikeshed)
$(bikeshed) --die-on=warning spec $< $@
images:
@echo "Regenerating images"
for i in $(IMAGES); do \
tmp="$$(mktemp)"; \
npx aasvg --extract --embed <"$$i" >"$$tmp" && mv "$$tmp" "$$i"; \
done