Skip to content

Commit

Permalink
Merge pull request #9 from DanielVoogsgerd/makefile
Browse files Browse the repository at this point in the history
Makefile
  • Loading branch information
Lut99 authored Jul 9, 2024
2 parents 5469769 + 62a56e4 commit b4acb9f
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@

# Ignore automatically generated higlight.js files
highlight.js.custom

build/
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.PHONY: all
all: build build/user-guide build/specification build/tutorials

.PHONY: build
build: clean
mdbook build main
cp -r main/book build

.PHONY: build/user-guide
build/user-guide:
mdbook build user-guide
cp -r user-guide/book build/user-guide

.PHONY: build/specification
build/specification:
mdbook build specification
cp -r specification/book build/specification


.PHONY: build/tutorials
build/tutorials:
mdbook build tutorials
cp -r tutorials/book build/tutorials

.PHONY: serve
serve:
python3 -m http.server -d build

.PHONY: clean
clean:
rm -r build
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,17 @@ $ cd <book_dir>
# Build using mdbook
$ mdbook build
```

Alternatively, you can use the provided Make file to compile the various books, or the documentation as a whole.
```bash
$ make all # To build the entire documentation

$ make build/user-guide # To build user-guide
$ make build/specification # To build specification
$ make build/tutorials # To build tutorials

```
Note that this does not compile the code documentation as it will have to
fetch the Brane source code and compile the documentation, which is almost
always excessive. It is recommeneded that one compiles the documentation instead
when developing the relevant parts of Brane.

0 comments on commit b4acb9f

Please sign in to comment.