zine/Makefile

40 lines
815 B
Makefile
Raw Normal View History

2019-09-23 14:21:43 +00:00
ISSUES != find issues -type d
DEST_PDF_FILES := $(ISSUES:issues/%=issue-%.pdf)
2019-09-23 14:44:02 +00:00
DEST_HTML_FILES := $(ISSUES:issues/%=issue-%.html)
2019-09-23 14:21:43 +00:00
PANDOC != command -v pandoc 2> /dev/null
2019-09-23 14:44:02 +00:00
all: $(DEST_PDF_FILES) $(DEST_HTML_FILES)
2019-09-23 14:21:43 +00:00
issue-%.pdf: issues/%
$(PANDOC) \
--file-scope \
--from markdown \
--to latex \
--pdf-engine xelatex \
--table-of-contents \
--variable title:"tildeverse zine $@" \
--standalone \
--output $@ \
$</*.md
2019-09-23 14:44:02 +00:00
issue-%.html: issues/%
$(PANDOC) \
--file-scope \
--from markdown \
--to html \
--standalone \
--table-of-contents \
--metadata title:"tildeverse zine $@" \
--metadata include-before:"<div class=\"container\">" \
--metadata include-after:"</div>" \
--css https://tilde.team/css/hacker.css \
--output $@ \
$</*.md
clean:
rm *.html *.pdf
.PHONY: clean