aboutsummaryrefslogtreecommitdiff
path: root/anki-card-temlate/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'anki-card-temlate/makefile')
-rw-r--r--anki-card-temlate/makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/anki-card-temlate/makefile b/anki-card-temlate/makefile
new file mode 100644
index 0000000..8b715d3
--- /dev/null
+++ b/anki-card-temlate/makefile
@@ -0,0 +1,18 @@
+all: back-template.html front-template.html
+
+.PRECIOUS: card.min.js
+
+card.min.js: card.js
+ sed 's/\/\/.*$$//g' $< | tr '\n' ' ' | sed 's/\t//g' | sed 's/ */ /g' > $@
+
+card.min.css: card.css
+ cat $< | tr '\n' ' ' | sed 's/\t//g' | sed 's/ */ /g' > $@
+
+%.html: %.m4
+ m4 $< > $@
+
+back-template.html: card.min.js card.min.css
+front-template.html: card.min.js card.min.css
+
+clean:
+ $(RM) back-template.html front-template.html card.min.js