aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common.mk4
-rw-r--r--yomichan-user/assets/copy-bitmap.svg (renamed from yomichan-user/copy-bitmap.svg)0
-rw-r--r--yomichan-user/assets/copy.svg (renamed from yomichan-user/copy.svg)0
-rw-r--r--yomichan-user/makefile17
4 files changed, 14 insertions, 7 deletions
diff --git a/common.mk b/common.mk
index 0b18c7c..efbe3c4 100644
--- a/common.mk
+++ b/common.mk
@@ -1,3 +1,5 @@
+M4FLAGS += -I..
+
TO_SINGLE_LINE:=tr '\n' ' '
REMOVE_DOUBLE_SLASH_COMMENTS:=sed 's/\/\/.*$$//g'
REMOVE_SLASH_STAR_COMMENTS:=sed 's/\/\*[^\*]*\*\///g'
@@ -12,7 +14,7 @@ TRIM_WHITESPACE:=sed -E 's/^\s*(.*)\s+$$/\1/g'
cat $< | $(TO_SINGLE_LINE) | $(REMOVE_SLASH_STAR_COMMENTS) | $(REMOVE_TABS) | $(REMOVE_WHITESPACE) | $(TRIM_WHITESPACE) > $@
%: %.m4
- m4 -I.. $< > $@
+ m4 $(M4FLAGS) $< > $@
%.b64: %
base64 -w0 $< > $@
diff --git a/yomichan-user/copy-bitmap.svg b/yomichan-user/assets/copy-bitmap.svg
index f2b157b..f2b157b 100644
--- a/yomichan-user/copy-bitmap.svg
+++ b/yomichan-user/assets/copy-bitmap.svg
diff --git a/yomichan-user/copy.svg b/yomichan-user/assets/copy.svg
index ff2f5a9..ff2f5a9 100644
--- a/yomichan-user/copy.svg
+++ b/yomichan-user/assets/copy.svg
diff --git a/yomichan-user/makefile b/yomichan-user/makefile
index 21b41d5..e0e543d 100644
--- a/yomichan-user/makefile
+++ b/yomichan-user/makefile
@@ -1,4 +1,6 @@
-.PHONY: clean
+.PHONY: clean all
+
+M4FLAGS += -I./assets/
all: yomichan-user.js yomichan-user.css
@@ -12,13 +14,15 @@ user.js: conf.d/shortcuts.js
include ../common.mk
-copy.svg.b64: copy.svg
-copy-bitmap.svg.b64: copy-bitmap.svg
+assets/copy.svg.b64: assets/copy.svg
+assets/copy-bitmap.svg.b64: assets/copy-bitmap.svg
+GARBAGE += assets/copy.svg.b64
+GARBAGE += assets/copy-bitmap.svg.b64
-conf.d/sentence-export.css: copy.svg.b64
+# extra dependencies
+conf.d/sentence-export.css: assets/copy.svg.b64
conf.d/sentence-export.css: conf.d/sentence-export.css.m4
-
-conf.d/word-export.css: copy-bitmap.svg.b64
+conf.d/word-export.css: assets/copy-bitmap.svg.b64
user.js:
cat $^ > $@
@@ -36,4 +40,5 @@ yomichan-user.css: header.txt user.min.css
clean:
$(RM) user.js user.css user.min.js user.min.css header.txt yomichan-user.css yomichan-user.js
+ $(RM) $(GARBAGE)