Skip to content

Commit

Permalink
Update README.md and Makefile
Browse files Browse the repository at this point in the history
- Update README for the list of install/requirements
- Update Makefile to build beam-book.pdf using new build tools
  • Loading branch information
hirotnk authored and happi committed Apr 22, 2020
1 parent 9f02857 commit 8d9893a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 30 deletions.
15 changes: 2 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
ABFLAGS = --backend=docbook --doctype=book

DBLATEX_OPTS = -P latex.output.revhistory=0 -P doc.collab.show=0

all: chapters/contributors.txt beam-book.pdf index.html

chapters/contributors.txt: .git
./bin/gitlog.sh $@

xml/beam-book-from-ab.xml: chapters/opcodes_doc.asciidoc
asciidoc $(ABFLAGS) -o $@ book.asciidoc

beam-book.pdf: xml/beam-book-from-ab.xml
dblatex $(DBLATEX_OPTS) xml/beam-book-from-ab.xml -o $@

### Experimental pdf command
beam-book2.pdf: chapters/opcodes_doc.asciidoc book.asciidoc chapters/*.asciidoc chapters/contributors.txt
asciidoctor-pdf -r ./style/custom-pdf-converter.rb -r asciidoctor-diagram -r ./style/custom-admonition-block.rb -a config=./style/ditaa.cfg --doctype book -a media=prepress -a pdf-style=./style/pdf-theme.yml book.asciidoc -o $@
beam-book.pdf: chapters/opcodes_doc.asciidoc book.asciidoc chapters/contributors.txt
asciidoctor-pdf -r ./style/custom-pdf-converter.rb -r asciidoctor-diagram -r ./style/custom-admonition-block.rb -a config=./style/ditaa.cfg --doctype=book -a media=prepress -a pdf-style=./style/pdf-theme.yml book.asciidoc -o $@

index.html:
cp -r images site
Expand Down
21 changes: 4 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,44 +141,31 @@ that you have all the needed tools installed.

### Docker

A Docker image containing everything
which is needed to build the book from source is provided. To use it:

```shell
docker pull robertoaloi/docker-thebeambook:latest
docker run -v $PWD:/book -t robertoaloi/docker-thebeambook make
```
Docker images with asciidoctor is available here: [dcoker-asciidoctor](https://github.com/asciidoctor/docker-asciidoctor)

### Linux

WIP, to be updated
```shell
make
```

### Mac OSX

1. Install [MacTex](http://www.tug.org/mactex/). Note that you would
need to _full_ MacTex rather than just BasicTex.
1. Add `/Library/TeX/texbin` to your `PATH`.
1. `easy_install dblatex`
1. Install [asciidoc](https://github.com/asciidoctor/asciidoctor)
1. Install [asciidoctor-pdf](https://github.com/asciidoctor/asciidoctor-pdf)
1. Install [asciidoctor-diagram](http://asciidoctor.org/docs/asciidoctor-diagram/)
1. Install [ditaa](https://github.com/stathissideris/ditaa)
1. Install [source-highlight](https://www.gnu.org/software/src-highlite/)
1. Install [rouge](https://asciidoctor.org/docs/user-manual/#rouge)
1. Install [wget](https://www.gnu.org/software/wget/)
1. `make`

### Mac OSX (using brew etc)

1. `brew install Caskroom/cask/mactex`
1. Add `/Library/TeX/texbin` to your `PATH`.
1. `sudo easy_install dblatex`
1. `brew install asciidoctor`
1. `gem install asciidoctor-pdf`
1. `gem install asciidoctor-diagram`
1. `brew install ditaa`
1. `brew install source-highlight`
1. `gem install rouge`
1. `brew install wget`
1. `make`

Expand Down

0 comments on commit 8d9893a

Please sign in to comment.