Skip to content

Commit

Permalink
Initial Makefile and book structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
happi committed Mar 23, 2017
1 parent c430b39 commit 3dfe907
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 0 deletions.
39 changes: 39 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

ABFLAGS = --backend=docbook --doctype=book --attribute=revisionhistory
adocs = book.asciidoc
# introduction.asciidoc \
# preface.asciidoc \
# compiler.asciidoc \
# beam.asciidoc \
# beam_modules.asciidoc \
# processes.asciidoc \
# type_system.asciidoc \
# memory.asciidoc \
# erts-book.asciidoc \
# ap-beam_instructions.asciidoc \
# opcodes_doc.asciidoc

all: beam-book.pdf

book-revhistory.xml: .git
./gitlog.sh git-log.xml $@

beam-book-from-ab.xml: $(adocs)\
book-revhistory.xml
asciidoc $(ABFLAGS) -o $@ book.asciidoc

beam-book.pdf: beam-book-from-ab.xml book-revhistory.xml
dblatex beam-book-from-ab.xml -o $@


# $(subst .asciidoc,.html, $(adocs)): %.html: %.asciidoc
# asciidoc -a icons -a toc2 $<

# index.html: *.asciidoc
# asciidoc -o index.html -a icons -a toc2 book.asciidoc

# generate_op_doc.beam: generate_op_doc.erl
# erlc generate_op_doc.erl

# opcodes_doc.asciidoc: ../otp/lib/compiler/src/genop.tab generate_op_doc.beam
# erl -noshell -s generate_op_doc from_shell ../otp/lib/compiler/src/genop.tab opcodes_doc.asciidoc
67 changes: 67 additions & 0 deletions book.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
= The Erlang Runtime System

// include::preface.asciidoc[]

// Part I

// include::introduction.asciidoc[]

// include::compiler.asciidoc[]

// include::processes.asciidoc[]

// include::type_system.asciidoc[]

// include::beam.asciidoc[]

// include::beam_modules.asciidoc[]

// include::beam_instructions.asciidoc[]

// include::calls.asciidoc[]

// include::beam_loader.asciidoc[]

// include::beam_internal_instructions.asciidoc[]

// include::scheduling.asciidoc[]

// include::memory.asciidoc[]

// include::data_structures.asciidoc[]

// include::io.asciidoc[]

// include::distribution.asciidoc[]

// include::c.asciidoc[]

// include::hipe.asciidoc[]

// Part II
[[P-Running]]
= Running ERTS

// include::building.asciidoc[] - moved to ops
// include::shell.asciidoc[] - moved to ops

// include::ops.asciidoc[]

// include::crash_dumps.asciidoc[] - moved to ops
// include::debugger.asciidoc[] - moved to ops
// include::tracing.asciidoc[] - mode to ops

// include::tweak.asciidoc[]

// Appendix

// include::index.asciidoc[]


// include::ap-beam_instructions.asciidoc[]

// include::ap-code_listings.asciidoc[]




4 changes: 4 additions & 0 deletions gitlog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
rm -f $1
git log --date=short --pretty=format:"<logentry revision='%h'>%n <author email='%ae'>%an</author>%n <date>%ad</date>%n <msg xml:space='preserve'>%s</msg>%n</logentry>" | sed -e '1i<logs>' -e '$a</logs>' > $1 && rm -f $2
xsltproc hg2revhistory.xsl $1 > $2
echo git-log done

0 comments on commit 3dfe907

Please sign in to comment.