forked from okrieg/openos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.mk
32 lines (24 loc) · 822 Bytes
/
common.mk
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
OUTDIR=${PWD}/${NAME}
CNTDIR=content
.PHONEY: all jb build fixlinks images pub clean
all: build
jb:
# -v verbose
# -all re-build all pages not just changed pages
# -W make warning treated as errors
# -n nitpick generate warnings for all missing links
# --keep-going despite -W don't stop delay errors till the end
jupyter-book build -v --all -n --keep-going --path-output ${OUTDIR} --config ${PWD}/${CNTDIR}/${SN}_config.yml --toc ${PWD}/${CNTDIR}/${SN}_toc.yml ${CNTDIR}
images: jb
-mkdir -p ${OUTDIR}/_build/html/images
cp -r ${CNTDIR}/images/* ${OUTDIR}/_build/html/images
fixlinks: images
./fixlinks.sh ${OUTDIR}/_build/html
build: fixlinks
pub:
ghp-import -n -p --prefix=${NAME} -f ${OUTDIR}/_build/html
@./ghp-nojekyll.sh
@echo "Published to:"
@./ghp-url.sh ${NAME}
clean:
${RM} -r ${OUTDIR}