forked from pvorb/learn-you-a-haskell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (23 loc) · 1.03 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
DOCGEN=pandoc
DOCGEN_FLAGS=--toc
FILES=01-introduction.md 02-starting-out.md 03-types-and-typeclasses.md 04-syntax-in-functions.md 05-recursion.md 06-higher-order-functions.md 07-modules.md 08-making-our-own-types-and-typeclasses.md 09-input-and-output.md 10-functionally-solving-problems.md 11-functors-applicative-functors-and-monoids.md 12-a-fistful-of-monads.md 13-for-a-few-monads-more.md 14-zippers.md
EPUB_STYLESHEET=epub-stylesheet.css
EPUB_CODE_FONT=UbuntuMono-Regular.otf
all: epubs pdfs
epubs: epub-en
-rm -rf en/img/
epub-en: copyimg out pandoc metadata.xml
$(DOCGEN) $(DOCGEN_FLAGS) --epub-metadata=metadata.xml --css=$(EPUB_STYLESHEET) --epub-embed-font=$(EPUB_CODE_FONT) -o out/lyah-en.epub --epub-cover-image=img/lyah.jpg title.txt $(addprefix en/, $(FILES))
pdfs: pdf-en
pdf-en: out en pandoc pdflatex
$(DOCGEN) $(DOCGEN_FLAGS) -o out/lyah-en.pdf title.txt $(addprefix en/, $(FILES))
copyimg:
-cp -rf img/ en/
out:
mkdir out
pandoc:
@which pandoc > /dev/null
pdflatex:
@which pdflatex > /dev/null
clean:
rm -rf out