-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile
57 lines (43 loc) · 1.12 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
PERL = perl
ifeq "$(PAPER)" ""
PAPER = $(shell paperconf)
endif
ifneq "$(TEST)" ""
BOOK = build/test.$(PAPER)
CHAPTERS = $(wildcard test/*.pod)
else
BOOK = build/SDL_Manual.$(PAPER)
CHAPTERS = \
src/00-preface.pod \
src/01-first.pod \
src/02-drawing.pod \
src/03-events.pod \
src/04-game.pod \
src/05-pong.pod \
src/06-tetris.pod \
src/07-puzz.pod \
src/08-music_and_sound.pod \
src/09-CPAN.pod \
src/11-XS_effects.pod \
src/12-PDL_OpenGL.pod \
src/13-free_resources.pod
endif
default: prepare pdf clean
prepare: clean
mkdir build
html: prepare $(CHAPTERS) bin/book-to-html
$(PERL) bin/book-to-html $(CHAPTERS) > $(BOOK).html
pdf: tex lib/Makefile
#cp src/mmd-table.svg build/mmd-table.svg
cd build && make -I ../lib -f ../lib/Makefile
tex: prepare $(CHAPTERS) lib/SDLManualLatex.pm lib/book.sty bin/book-to-latex
$(PERL) -Ilib bin/book-to-latex --paper $(PAPER) $(CHAPTERS) > $(BOOK).tex
rel_pdf: pdf
cp $(BOOK).pdf dist/SDL_Manual.pdf
rel_html: html
cp $(BOOK).html dist/SDL_Manual.html
bump: rel_pdf rel_html
clean:
rm -rf build/
.PHONY: clean
# vim: set noexpandtab