Files
Thun/docs/Makefile
T
Simon Forman 989e48c155 Only (re)make changed notebooks.
I love make.  (Despite not working with spaces in filenames, since that's
a dumbass thing to do anyway.)  There's probably a better way to do what
I did but it works so I'm happy.
2018-06-06 13:27:51 -07:00

25 lines
496 B
Makefile

docs = $(wildcard *.ipynb)
docs_html = $(patsubst %.ipynb,%.html,$(docs))
docs_md = $(patsubst %.ipynb,%.md,$(docs))
docs_rst = $(patsubst %.ipynb,%.rst,$(docs))
.PHONY: clean sdist test docs
all: $(docs_html) $(docs_md) $(docs_rst)
clean:
$(RM) -v $(docs_html) $(docs_md) $(docs_rst)
$(docs_html): %.html : %.ipynb
python -m nbconvert --to html $<
$(docs_md): %.md : %.ipynb
python -m nbconvert --to markdown $<
$(docs_rst): %.rst : %.ipynb
python -m nbconvert --to rst $<