2016-01-25 14:54:02 +01:00
|
|
|
SOURCES = $(wildcard *.md)
|
|
|
|
OUT = $(SOURCES:.md=.pdf)
|
|
|
|
|
2016-03-23 18:56:19 +01:00
|
|
|
HS_FILTERS_NAMES = nice-frac
|
|
|
|
PY_FILTERS_NAMES = pandoc-svg.py
|
|
|
|
EXT_FILTERS = pandoc-crossref
|
|
|
|
|
|
|
|
HS_FILTERS = $(addprefix filters/, $(HS_FILTERS_NAMES))
|
|
|
|
PY_FILTERS = $(addprefix filters/, $(PY_FILTERS_NAMES))
|
|
|
|
FILTERS = $(PY_FILTERS) $(HS_FILTERS) $(EXT_FILTERS)
|
|
|
|
|
|
|
|
.SUFFIXES: .hs
|
|
|
|
|
|
|
|
all: $(HS_FILTERS) $(OUT)
|
2016-01-25 14:54:02 +01:00
|
|
|
|
|
|
|
$(OUT): $(SOURCES)
|
2016-03-23 18:56:19 +01:00
|
|
|
pandoc --smart -t latex $< $(addprefix --filter=, $(FILTERS)) -o $@
|
|
|
|
|
|
|
|
$(HS_FILTERS): $(addsuffix .hs, $(HS_FILTERS))
|
|
|
|
ghc --make -O2 $< -o $@
|
2016-01-25 14:54:02 +01:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(OUT)
|
2016-03-23 18:56:19 +01:00
|
|
|
rm -f $(addprefix filters/, $(HS_FILTERS))
|
2016-01-25 14:54:02 +01:00
|
|
|
find . -name "*.pandoc.pdf" -delete
|
2016-03-23 18:56:19 +01:00
|
|
|
|
|
|
|
deepclean: clean
|
|
|
|
rm -f $(HS_FILTERS)
|
|
|
|
rm -f filters/*.hi filters/*.o
|