-
Notifications
You must be signed in to change notification settings - Fork 47
/
Makefile
45 lines (36 loc) · 940 Bytes
/
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
BOOK_NAME := awesome-servicemesh
BOOK_OUTPUT := _book
.PHONY: install build all
install:
npm install gitbook-cli -g
gitbook install
build:
gitbook build . $(BOOK_OUTPUT)
rm $(BOOK_OUTPUT)/gitbook/images/apple-touch-icon-precomposed-152.png
cp images/favicon.ico $(BOOK_OUTPUT)/gitbook/images
all: install build
.PHONY: serve
serve:
gitbook serve . $(BOOK_OUTPUT)
.PHONY: epub
epub:
gitbook epub . $(BOOK_NAME).epub
.PHONY: pdf
pdf:
gitbook pdf . $(BOOK_NAME).pdf
.PHONY: mobi
mobi:
gitbook mobi . $(BOOK_NAME).pdf
.PHONY: clean
clean:
rm -rf $(BOOK_OUTPUT)
.PHONY: help
help:
@echo "Help for make"
@echo "make - Build the book"
@echo "make build - Build the book"
@echo "make serve - Serving the book on localhost:4000"
@echo "make install - Install gitbook and plugins"
@echo "make epub - Build epub book"
@echo "make pdf - Build pdf book"
@echo "make clean - Remove generated files"