forked from changkun/modern-cpp-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (26 loc) · 762 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
DOCKER_ENV=changkun/modern-cpp-tutorial:build-env
LANGS = zh-cn en-us
ALL_BUILDS = website pdf
# dep
all: $(ALL_BUILDS)
pdf: $(LANGS)
$(LANGS):
cd pdf/$@ && make && make clean
mkdir -p website/public/modern-cpp/pdf
mv pdf/$@/modern-cpp-tutorial.pdf website/public/modern-cpp/pdf/[email protected]
website:
cd website && make
build:
docker run --rm -v `pwd`:/modern-cpp-tutorial -it $(DOCKER_ENV) make
# dev
build-env:
docker build -t $(DOCKER_ENV) -f ./docker/Dockerfile .
serve:
cd website && make s
clean:
cd pdf/zh-cn && make clean
cd pdf/en-us && make clean
cd website && make clean
docker images -f "dangling=true" -q | xargs docker rmi -f
docker image prune -f
.PHONY : $(LANGS) $(ALL_BUILDS) serve build-env build-all clean