-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (30 loc) · 927 Bytes
/
Copy pathMakefile
File metadata and controls
43 lines (30 loc) · 927 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
37
38
39
40
41
42
43
LESS := npm exec -- lessc
ESBUILD := npm exec -- esbuild
APP := app
CSS := $(APP)/cyp.css
JS := $(APP)/cyp.js
ICONS := $(APP)/js/icons.ts
SYSD_USER := ~/.config/systemd/user
SERVICE := cyp.service
all: $(CSS) $(JS)
icons: $(ICONS)
$(ICONS): $(APP)/icons/*
$(APP)/svg2js.sh $(APP)/icons > $@
$(JS): $(APP)/js/* $(APP)/js/elements/*
$(ESBUILD) --bundle --target=es2017 $(APP)/js/cyp.ts --outfile=$@
$(CSS): $(APP)/css/* $(APP)/css/elements/*
$(LESS) -x $(APP)/css/cyp.less > $@
service: $(SERVICE)
systemctl --user enable $(PWD)/$(SERVICE)
$(SERVICE): misc/cyp.service.template
cat $^ | envsubst > $@
watch: all
while inotifywait -e MODIFY -r --exclude '~$$' $(APP)/css $(APP)/js ; do make $^ ; done
clean:
rm -f $(SERVICE) $(CSS) $(JS)
docker-image:
docker build -t cyp .
docker-run:
docker run --network=host -v "$$(pwd)"/_youtube:/cyp/_youtube cyp
.PHONY: all watch icons service clean
.DELETE_ON_ERROR: