From f8d5584593a0a7e73e4b38e96c2c7f5bf56d3471 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Thu, 11 Nov 2021 18:08:43 +0100 Subject: Added music, updated graph, better makefile --- Makefile | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 80eb5ef..c3b21ff 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,30 @@ -all: build +FILES_SRC := $(shell find src/icons -type f -name "*.svg") +FILES := $(patsubst src/icons/%.svg,output/%.svg,$(FILES_SRC)) -clean_output: - @mkdir -p output - @rm -rf output/* +all: files showcase/index.html -clean_showcase: - @mkdir -p showcase - @rm -rf showcase/* +files: $(FILES) -icons: clean_output - @scripts/build.sh +### -showcase: clean_showcase - @scripts/build_showcase.sh +output/%.svg: src/icons/%.svg | output + scour -i "$<" \ + --enable-viewboxing \ + --enable-id-stripping \ + --enable-comment-stripping \ + --remove-descriptive-elements \ + --strip-xml-prolog \ + --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' > "$@" -build: icons - $(MAKE) showcase +showcase/index.html: src/showcase/index.html $(FILES) | showcase + scripts/build_showcase.sh -.PHONY: all clean_output clean_showcase icons showcase build +showcase: + mkdir -p showcase + +output: + mkdir -p output + +### + +.PHONY: all -- cgit v1.2.3-70-g09d2