-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (32 loc) · 863 Bytes
/
Makefile
File metadata and controls
47 lines (32 loc) · 863 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
44
45
46
SVG := devmorning.svg \
devmorning_github.svg \
devmorning_podcast.svg \
devmorning_large.svg
BACKGROUND := \#ffffff
OPACITY := 1.0
INKSCAPE := inkscape
PNG := $(SVG:.svg=.png)
DEST := build
BUILT_PNG := $(addprefix $(DEST)/, $(PNG))
DEFAULT := fg bg all
CITY := bangkok
EMPTY :=
SPACE := $(EMPTY) $(EMPTY)
%.png : %.svg
@echo -e "------\nExporting $<\n------"
$(INKSCAPE) \
--export-id="$(subst $(SPACE),;,$(DEFAULT));$(CITY)"\
--export-id-only \
--export-area-page \
--export-type="png" \
--export-background=$(BACKGROUND) \
--export-background-opacity=$(OPACITY) \
-o $@ $<
$(BUILT_PNG): pngs
mkdir -p $(DEST)
mv -t $(DEST) $(PNG)
@echo -e "------\nMoved to build folder\n------"
pngs: $(PNG)
@echo -e "------\nBuilt all pngs\n------"
clean:
rm -rf $(DEST)