summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2015-01-20 23:37:37 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2015-01-20 23:37:37 -0500
commit55fa3de142774621a4e9060c9a80c324225795a3 (patch)
tree48832bef9fec6491216287c888826e49f2f68f02
parent90de5bf7ced38bf253ee5f13a55042b84652df97 (diff)
downloadmakefile_templates-55fa3de142774621a4e9060c9a80c324225795a3.tar.gz
makefile_templates-55fa3de142774621a4e9060c9a80c324225795a3.zip
added mk file to conver reminder format to html
-rw-r--r--rem.mk32
1 files changed, 32 insertions, 0 deletions
diff --git a/rem.mk b/rem.mk
new file mode 100644
index 0000000..b070616
--- /dev/null
+++ b/rem.mk
@@ -0,0 +1,32 @@
+# -*- make -*-
+# (C) 2013 by Eugeniy Mikhailov, <evgmik@gmail.com>
+
+CLEAN_TARGETS += clean_rem
+REAL_CLEAN_TARGETS += real_clean_rem
+
+rem_files = $(wildcard *.rem)
+html_from_rem = $(rem_files:%.rem=%.html)
+
+html_rem: $(html_from_rem)
+
+$(html_from_rem): %.html : %.rem
+ remind -p5 $< $(CLASS_STARTING_DAY) | ./bin/rem2html -title "Calendar" | \
+ sed 's/<head>/<head>\n<meta name="viewport" content="width=device-width, initial-scale=1.0">/' | \
+ cat > $@
+
+clean_rem:
+
+real_clean_rem:
+ifneq ($(strip $(html_from_rem)),)
+ rm -f $(html_from_rem)
+endif
+
+dest_dir_rem:
+ $(INSTALL) -d -m 0755 $(dest_dir)
+
+install_html_from_rem: dest_dir_rem $(html_from_rem)
+ifneq ($(strip $(html_from_rem)),)
+ $(INSTALL) -m 0644 $(html_from_rem) $(dest_dir)/
+endif
+
+