-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
64 lines (54 loc) · 1.47 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# This Makefile is intended to create the website
# https://fricas.github.io/fricas-notebooks (which is the github-pages
# branch of the fricas-notebook repository at
# https://github.com/fricas.
MKDIR_P = mkdir -p
DEMOS = \
FriCAS-FirstSteps \
FriCAS-DataStructures \
FriCAS-Infinite \
FriCAS-Numbers \
FriCAS-Types \
FriCAS-LinearAlgebra \
FriCAS-Solve \
FriCAS-SkewPolynomial \
FriCAS-TaylorSeries \
FriCAS-LaurentPolynomial \
system-command-set
.PRECIOUS: tmp/%.nbconvert.ipynb tmp/%.ipynb
tmp/%.input: %.input
${MKDIR_P} tmp
cp $< $@
tmp/%.ipynb: tmp/%.input
cd tmp; jupytext --to ipynb --from input $*.input
# cd tmp; jupytext --to ipynb --from input --execute $*.input
# Note that jfricasx is a jfricas kernel with an additional sleep(1).
# jfricasx is a copied jfricas kernel were we use
#
# pid = Popen(['gnome-terminal', '--title=jfricas', '--'] +
# ['fricas','-nosman','-eval',prereq,'-eval',start])
# import time
# time.sleep(1)
#
# instead of
#
# pid = Popen(['fricas','-eval',prereq,'-eval',start])
#
# in fricaskernel.py.
tmp/%.nbconvert.ipynb: tmp/%.ipynb
tmp/%.html: tmp/%.ipynb
cd tmp; \
jupyter nbconvert \
--to ipynb \
--ExecutePreprocessor.kernel_name=jfricasx \
--execute \
--allow-errors \
--stdout \
$*.ipynb \
| jupyter nbconvert --stdin --to html --stdout \
> $*.html
tmp/index.html: index.html
cp $< $@
html: ${patsubst %, tmp/%.html, ${DEMOS}} tmp/index.html
clean:
-rm -rf tmp