write-you-a-haskell/Makefile

28 lines
859 B
Makefile
Raw Normal View History

2015-01-06 18:09:41 +03:00
PANDOC = pandoc
IFORMAT = markdown
2015-01-09 04:16:54 +03:00
MATHJAX = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
FLAGS = --standalone --toc --toc-depth=2 --mathjax=$(MATHJAX) --highlight-style pygments
2015-01-06 18:09:41 +03:00
TEMPLATE = page.tmpl
STYLE = css/style.css
FILTER = includes.hs
2015-01-06 18:09:41 +03:00
SRC = $(wildcard *.md)
OBJ = $(SRC:.md=.html)
all: $(OBJ) top
%.html: %.md $(FILTER)
$(PANDOC) -c $(STYLE) --filter ${FILTER} --template $(TEMPLATE) -s -f $(IFORMAT) -t html $(FLAGS) -o $@ $<
2015-01-06 18:09:41 +03:00
%.pdf: %.md $(FILTER)
$(PANDOC) --filter ${FILTER} -f $(IFORMAT) --latex-engine=xelatex $(FLAGS) -o $@ $<
2015-01-06 18:09:41 +03:00
pdf: $(FILTER)
$(PANDOC) --filter ${FILTER} -f $(IFORMAT) --latex-engine=xelatex $(FLAGS) -o WYAH.pdf 0*.md
2015-01-06 18:09:41 +03:00
top: $(FILTER)
$(PANDOC) -c $(STYLE) --filter ${FILTER} --template $(TEMPLATE) -s -f $(IFORMAT) -t html $(FLAGS) -o tutorial.html index.md
2015-01-06 18:09:41 +03:00
clean:
-rm *.html *.pdf