Various articles (fork of ertes's articles)

root / Makefile

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
.PHONY: all

articles = \
	$(patsubst %.lhs,%.html,$(wildcard *.lhs)) \
	$(patsubst %.txt,%.html,$(wildcard *.txt))

PANDOC = pandoc \
	-f markdown+lhs -t html5 \
	-NSs \
	--css=screen.css \
	--indented-code-classes=haskell \
	--toc \
	--toc-depth=2


all: $(articles)

%.html: %.lhs screen.css Makefile
	ghc -Wall -x lhs -e 'return ()' $<
	$(PANDOC) -o $@ $<

%.html: %.txt screen.css Makefile
	$(PANDOC) -o $@ $<