write-you-a-haskell/Makefile

27 lines
758 B
Makefile
Raw Normal View History

2015-01-06 18:09:41 +03:00
PANDOC = pandoc
IFORMAT = markdown
FLAGS = --standalone --toc --toc-depth=2 --mathjax --highlight-style pygments
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