summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
author53hornet <53hornet@gmail.com>2018-07-09 23:03:12 -0400
committer53hornet <53hornet@gmail.com>2018-07-09 23:03:12 -0400
commitcd7cb6c9089e9029fd86a8a5b260fe2fa66ce995 (patch)
tree703126308a5c6371cc190a93ad8bc65026ed58b7 /makefile
parentd2199166c4bd244eb8727014db80b62ad1d1b70d (diff)
downloadmd-site-cd7cb6c9089e9029fd86a8a5b260fe2fa66ce995.tar.xz
md-site-cd7cb6c9089e9029fd86a8a5b260fe2fa66ce995.zip
Makefile generates standalone html for all markdown in all subdirs.
Diffstat (limited to 'makefile')
-rw-r--r--makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/makefile b/makefile
index e69de29..fdadaee 100644
--- a/makefile
+++ b/makefile
@@ -0,0 +1,14 @@
+MD = $(shell find md/ -type f -name '*.md')
+INC = $(shell find md/ -type f -name '*.inc')
+HTML_PAGE = $(patsubst md/%.md, html/%.html, $(MD))
+HTML_INCL = $(patsubst md/%.inc, html/%.html, $(INC))
+
+.PHONY: all
+all: $(HTML_PAGE)
+
+html/%.html: md/%.md
+ @mkdir -p "$(@D)"
+ @pandoc "$<" -s -o "$@"
+
+clean:
+ @rm -rf html/