From cd7cb6c9089e9029fd86a8a5b260fe2fa66ce995 Mon Sep 17 00:00:00 2001 From: 53hornet <53hornet@gmail.com> Date: Mon, 9 Jul 2018 23:03:12 -0400 Subject: Makefile generates standalone html for all markdown in all subdirs. --- makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'makefile') 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/ -- cgit v1.2.3