41 lines
706 B
Makefile
41 lines
706 B
Makefile
|
input_files := \
|
||
|
0-frontmatter.md \
|
||
|
1.1-licence.md \
|
||
|
2-definitions.md \
|
||
|
3-syntaxe.md \
|
||
|
4-editeurs.md \
|
||
|
5-advanced.md \
|
||
|
6-bibliographie.md \
|
||
|
100-references.md \
|
||
|
|
||
|
pandoc := \
|
||
|
pandoc -s --citeproc \
|
||
|
--css=style.css --template=template.html \
|
||
|
--toc --toc-depth=2 \
|
||
|
|
||
|
pandoc_html := \
|
||
|
$(pandoc) \
|
||
|
--to=html --output=document.html \
|
||
|
$(input_files)
|
||
|
|
||
|
pandoc_pdf := \
|
||
|
$(pandoc) \
|
||
|
-V noscript=true \
|
||
|
--embed-resource --to=pdf \
|
||
|
--pdf-engine=pagedjs-cli \
|
||
|
--output=document.pdf \
|
||
|
$(input_files)
|
||
|
|
||
|
html: $(input_files)
|
||
|
$(pandoc_html)
|
||
|
|
||
|
watch_html: $(input_files)
|
||
|
watchexec -r -w . -i document.html \
|
||
|
" $(pandoc_html)"
|
||
|
|
||
|
pdf: $(input_files)
|
||
|
$(pandoc_pdf)
|
||
|
|
||
|
serve:
|
||
|
watchexec -r -w . "python -m http.server"
|