Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 50 lines (39 sloc) 0.992 kb
f4154557 » kthakore
2010-08-22 Adding build system
1 PERL = perl
2
3 ifeq "$(PAPER)" ""
4 PAPER = $(shell paperconf)
5 endif
6
7 ifneq "$(TEST)" ""
8 BOOK = build/test.$(PAPER)
9 CHAPTERS = $(wildcard test/*.pod)
10 else
11 BOOK = build/SDL_Manual.$(PAPER)
12 CHAPTERS = \
13 src/preface.pod \
14 src/first.pod \
15 src/drawing.pod \
16 src/events.pod \
17 src/game.pod \
18 src/pong.pod \
19 src/tetris.pod \
20 src/music.pod \
21 src/CPAN.pod \
22 src/profiling.pod \
23 src/XS_effects.pod \
24 src/PDL_OpenGL.pod
25 endif
26
27 default: prepare pdf clean
28
29 prepare: clean
30 mkdir build
31
32 html: prepare $(CHAPTERS) bin/book-to-html
33 $(PERL) bin/book-to-html $(CHAPTERS) > $(BOOK).html
34
35 pdf: tex lib/Makefile
36 #cp src/mmd-table.svg build/mmd-table.svg
37 cd build && make -I ../lib -f ../lib/Makefile
38
39 tex: prepare $(CHAPTERS) lib/SDLManualLatex.pm lib/book.sty bin/book-to-latex
40 $(PERL) -Ilib bin/book-to-latex --paper $(PAPER) $(CHAPTERS) > $(BOOK).tex
41
42 release: pdf
43 cp $(BOOK).pdf build/book-$$(date +"%Y-%m").$(PAPER).pdf
44
45 clean:
46 rm -rf build/
47
48 .PHONY: clean
49
50 # vim: set noexpandtab
Something went wrong with that request. Please try again.