aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..74cedaf
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+DOCS_SRC=doc
+DOCS_TARGET=apps/dreki_web/priv/docs_html_fragments
+TARGETS=compile
+
+compile:
+ rebar3 compile
+
+.PHONY: compile
+
+# -- #
+
+DOCS_SRCS!=(find $(DOCS_SRC) -name "*.md")
+.for _t in ${DOCS_SRCS}
+${_t:S/^${DOCS_SRC}/${DOCS_TARGET}/:S/.md$/.html/}: ${_t}
+ @mkdir -p ${.TARGET:H}
+ kramdown ${.ALLSRC:[1]} > ${.TARGET}
+DOCS_TARGETS+=${_t:S/^${DOCS_SRC}/${DOCS_TARGET}/:S/.md$/.html/}
+.endfor
+
+docs: $(DOCS_TARGETS)
+all: $(TARGETS) $(DOCS_TARGETS)
+
+.MAIN: all
+.PHONY: docs all