-
Notifications
You must be signed in to change notification settings - Fork 3
/
makefile
57 lines (40 loc) · 1.23 KB
/
makefile
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
47
48
49
50
51
52
53
54
55
56
57
UML=$(wildcard uml/*.uml)
PNG=$(patsubst %.uml, %.png, $(UML))
SVG=$(patsubst %.uml, %.svg, $(UML))
PRE=$(patsubst %.uml, %.pre.html, $(UML))
CSS=$(patsubst %.uml, %.syntax.css, $(UML))
.PHONY: all build dev install clean par-png par-svg
info:
@echo "Warning: The screen will blink a lot!"
@echo "Press Enter to continue, CTRL-c to stop"
@mkdir -p build
@read USER_INPUT
$(MAKE) -C . all
all: build
par-png: $(UML)
$(MAKE) $(PNG)
par-svg: $(UML)
$(MAKE) $(SVG)
build: style.css par-svg index.html
style.css: $(CSS) $(UML)
cat $(CSS) | sort | uniq > $@
index.orig.html: index.sh $(PRE) $(UML)
bash ./index.sh $(PRE) > $@
index.html: index.orig.html
pnpx html-minifier-terser --collapse-whitespace --remove-comments --remove-optional-tags --remove-redundant-attributes --remove-script-type-attributes --remove-tag-whitespace --use-short-doctype \
--minify-urls --minify-js true --minify-css true $< > $@
%.pre.html %.syntax.css: %.uml
bash ./tohtml.sh $< uml/$$(basename $< .uml)
dev:
npm run dev
install:
git submodule update --init --recursive
npm install
clean:
rm -f $(PRE) $(CSS)
distclean:
rm -fv $(PNG) $(SVG) index.html style.css
%.png: %.uml
plantuml -tpng $<
%.svg: %.uml
plantuml -tsvg $<