forked from happi/theBeamBook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·70 lines (60 loc) · 2.28 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
58
59
60
61
62
63
64
65
66
67
68
69
70
ABFLAGS = --backend=docbook --doctype=book
adocs = book.asciidoc \
chapters/beam.asciidoc \
chapters/beam_instructions.asciidoc \
chapters/beam_internal_instructions.asciidoc \
chapters/beam_modules.asciidoc \
chapters/building.asciidoc \
chapters/c.asciidoc \
chapters/calls.asciidoc \
chapters/compiler.asciidoc \
chapters/contributors.txt \
chapters/data_structures.asciidoc \
chapters/debugging.asciidoc \
chapters/hipe.asciidoc \
chapters/introduction.asciidoc \
chapters/memory.asciidoc \
chapters/opcodes_doc.asciidoc \
chapters/ops.asciidoc \
chapters/preface.asciidoc \
chapters/processes.asciidoc \
chapters/scheduling.asciidoc \
chapters/tracing.asciidoc \
chapters/tweak.asciidoc \
chapters/type_system.asciidoc \
chapters/ap-beam_instructions.asciidoc \
chapters/ap-code_listings.asciidoc \
code/beam_modules_chapter/src/beamfile.erl \
code/compiler_chapter/json_tokens.png \
code/compiler_chapter/src/json_parser.erl \
code/compiler_chapter/src/json_test.erl \
code/compiler_chapter/src/json_tokens.xrl \
code/compiler_chapter/src/test.json \
code/compiler_chapter/src/world.erl \
code/memory_chapter/src/lb.erl \
code/memory_chapter/src/send.erl \
code/memory_chapter/src/share.erl \
images/observer_applications.png \
images/observer_code_server.png \
images/observer_load.jpg \
images/observer_processes.png \
images/observer_system.png
DBLATEX_OPTS = -P latex.output.revhistory=0 -P doc.collab.show=0
all: beam-book.pdf index.html
chapters/contributors.txt: .git
./bin/gitlog.sh $@
xml/beam-book-from-ab.xml: $(adocs)
asciidoc $(ABFLAGS) -o $@ book.asciidoc
beam-book.pdf: xml/beam-book-from-ab.xml
dblatex $(DBLATEX_OPTS) xml/beam-book-from-ab.xml -o $@
index.html:
asciidoc --backend=html5 --doctype=book -a icons -a toc2 -o site/index.html book.asciidoc
code/book/ebin/generate_op_doc.beam: code/book/src/generate_op_doc.erl
erlc -o $(dir $@) $<
chapters/opcodes_doc.asciidoc: genop.tab code/book/ebin/generate_op_doc.beam
erl -pa code/book/ebin/ -noshell -s generate_op_doc from_shell genop.tab chapters/opcodes_doc.asciidoc
genop.tab:
wget -O genop.tab https://raw.githubusercontent.com/erlang/otp/master/lib/compiler/src/genop.tab
touch $@
clean:
rm -f beam-book.pdf site/index.html