-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
34 lines (26 loc) · 1.09 KB
/
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
BOOKS = principles-of-programming computational-foundations-1
all: build deploy
build: build_preprocess build_jupyter_books build_pdflatex build_merge_html
build_preprocess:
./in2md.sh files/cppintro.md.in > files/cppintro.md
./in2md.sh files/libraries_happly.md.in > files/libraries_happly.md
./in2md.sh files/libraries_happly_boostgeometry.md.in > files/libraries_happly_boostgeometry.md
build_jupyter_books:
for book in $(BOOKS) ; do \
jb build --path-output _build/$${book} --config $${book}_config.yml --toc $${book}_toc.yml . ; \
done
build_pdflatex:
for book in $(BOOKS) ; do \
jb build --config $${book}_config.yml --toc $${book}_toc.yml --builder pdflatex . ; \
cp _build/latex/$${book}.pdf _build/$${book}/_build/html/$${book}.pdf ; \
done
build_merge_html:
mkdir -p _html
for book in $(BOOKS) ; do \
cp -a _build/$${book}/_build/html/. _html/$${book}/ ; \
done
cp index.html _html
deploy:
cp _html/* /var/www/html/programming -R
upload:
rsync --no-perms --no-owner --no-group -avz --delete-after _html/* [email protected]:~/webserver/htdocs/en/teaching/oer/programming