write-you-a-haskell/Makefile

26 lines
647 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
SRC = $(wildcard *.md)
OBJ = $(SRC:.md=.html)
all: $(OBJ) top
includes: includes.hs
ghc --make $<
%.html: %.md includes
./includes < $< | $(PANDOC) -c $(STYLE) --template $(TEMPLATE) -s -f $(IFORMAT) -t html $(FLAGS) -o $@
%.pdf: %.md includes
./includes < $< | $(PANDOC) -c -s -f $(IFORMAT) --latex-engine=xelatex $(FLAGS) -o $@
top:
2015-01-06 19:18:14 +03:00
./includes < index.md | $(PANDOC) -c $(STYLE) --template $(TEMPLATE) -s -f $(IFORMAT) -t html $(FLAGS) -o tutorial.html
2015-01-06 18:09:41 +03:00
clean:
-rm pages/*.html