category-theory-for-program.../makefile

33 lines
867 B
Makefile
Raw Normal View History

2017-09-05 16:02:17 +02:00
title = 'category-theory-for-programmers'
root = $(shell pwd)
src = $(root)/src
init = $(src)/init/cover.html $(src)/init/table.html $(src)/init/preface.html
chapters = $(shell find $(src)/part-* -name '*.html' | sort -V)
all: pdf epub
pdf:
cd $(src)/init; \
pandoc \
$(init) \
$(chapters) \
$(root)/opt/metadata.yaml \
--standalone \
--smart \
--number-sections \
-H $(root)/opt/tex \
--latex-engine=xelatex \
-o $(root)/$(title).pdf
epub:
cd $(src)/init; \
pandoc \
$(init) \
$(chapters) \
$(root)/opt/metadata.yaml \
--standalone \
--smart \
--number-sections \
-o $(root)/$(title).epub