diff options
author | P. J. McDermott <pjm@nac.net> | 2012-05-28 18:40:17 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-05-28 18:40:17 (EDT) |
commit | a5d1ce13172e8d91d24ede48f28cc269e3d1aa23 (patch) | |
tree | 49de0d7a8c60d649edde69df4b634635c8ca7a2a /Makefile |
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0707f0b --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +.SUFFIXES: +.SUFFIXES: .txt .html + +SRCS = +OBJS = $(SRCS:.txt=.html) + +.PHONY: all +all: $(OBJS) + +$(OBJS): + @printf ' RENDER %s\n' '$@' + @title=$$(sed -n 's/^ Title: \(.*\)$$/\1/p' $*.txt | \ + head -n 1); \ + sed "s#@TITLE@#$$title#" include/header.html > $@ + @markdown $*.txt >> $@ + @cat include/footer.html >> $@ + +.PHONY: clean +clean: + @for obj in $(OBJS); do \ + printf ' RM %s\n' "$${obj}"; \ + rm -f $${obj}; \ + done |