summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile38
1 files changed, 24 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index 80eb5ef..c3b21ff 100644
--- a/Makefile
+++ b/Makefile
@@ -1,20 +1,30 @@
1all: build 1FILES_SRC := $(shell find src/icons -type f -name "*.svg")
2FILES := $(patsubst src/icons/%.svg,output/%.svg,$(FILES_SRC))
2 3
3clean_output: 4all: files showcase/index.html
4 @mkdir -p output
5 @rm -rf output/*
6 5
7clean_showcase: 6files: $(FILES)
8 @mkdir -p showcase
9 @rm -rf showcase/*
10 7
11icons: clean_output 8###
12 @scripts/build.sh
13 9
14showcase: clean_showcase 10output/%.svg: src/icons/%.svg | output
15 @scripts/build_showcase.sh 11 scour -i "$<" \
12 --enable-viewboxing \
13 --enable-id-stripping \
14 --enable-comment-stripping \
15 --remove-descriptive-elements \
16 --strip-xml-prolog \
17 --shorten-ids | sed -z 's/\(fill\|stroke\)="#.\{3,6\}"/\1="currentColor"/g;s/stroke-width="[0-9.]*"//g;s/stroke-linecap="[a-z]*"//g;s/stroke-linejoin="[a-z]*"//g;s/style="[ a-z0-9:-]*"//g' > "$@"
16 18
17build: icons 19showcase/index.html: src/showcase/index.html $(FILES) | showcase
18 $(MAKE) showcase 20 scripts/build_showcase.sh
19 21
20.PHONY: all clean_output clean_showcase icons showcase build 22showcase:
23 mkdir -p showcase
24
25output:
26 mkdir -p output
27
28###
29
30.PHONY: all