2025-09-19 02:05:26 +00:00
|
|
|
.PHONY: all clean dist
|
2025-03-24 04:06:46 +00:00
|
|
|
|
2025-04-15 23:26:01 +00:00
|
|
|
HTMLS = $(patsubst notebooks/%.ipynb,html/%.html,$(wildcard notebooks/*.ipynb))
|
2025-03-24 04:06:46 +00:00
|
|
|
|
2025-04-12 04:59:08 +00:00
|
|
|
badmathjax = "file:\/\/\/usr\/share\/javascript\/mathjax\/MathJax.js?config=TeX-AMS_CHTML-full,Safe"
|
|
|
|
goodmathjax = "https:\/\/cdn.jsdelivr.net\/npm\/mathjax@2\/MathJax.js?config=TeX-AMS_CHTML"
|
|
|
|
|
2025-03-24 04:06:46 +00:00
|
|
|
all: $(HTMLS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -r html
|
|
|
|
|
2025-04-15 23:26:01 +00:00
|
|
|
html/%.html: notebooks/%.ipynb | html
|
2025-09-19 01:49:18 +00:00
|
|
|
jupyter nbconvert --to html $< --output $@ --output-dir=.
|
2025-04-12 04:59:08 +00:00
|
|
|
sed -i 's/$(badmathjax)/$(goodmathjax)/' $@
|
2025-03-24 04:06:46 +00:00
|
|
|
|
|
|
|
html:
|
|
|
|
mkdir -p html
|
2025-09-19 02:05:26 +00:00
|
|
|
|
|
|
|
dist: eulerbooks.tar.gz
|
|
|
|
|
|
|
|
eulerbooks.tar.gz: $(HTMLS) Makefile README.md LICENSE
|
|
|
|
rm -f $@
|
|
|
|
mkdir eulerbooks
|
|
|
|
cp -r html eulerbooks
|
|
|
|
mkdir eulerbooks/notebooks
|
|
|
|
cp notebooks/*.ipynb eulerbooks/notebooks
|
|
|
|
cp -r notebooks/txt eulerbooks/notebooks
|
|
|
|
cp LICENSE Makefile README.md eulerbooks
|
|
|
|
tar -czf $@ eulerbooks
|
|
|
|
rm -r eulerbooks
|