-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTuprules.tup
39 lines (26 loc) · 1.6 KB
/
Tuprules.tup
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
.gitignore
CPPFLAGS = -Wall -Wno-unused-result -O2
CPPDBG = -Wall -g
data_in = build/prg/data.in
data_out = build/prg/data.out
out_pandoc_html = build/pandoc/html/%B.md
out_pandoc_latex = build/pandoc/latex/%B.md
pc_doc = $(TUP_CWD)/utils/<pc_doc>
tpl_htm = $(TUP_CWD)/utils/templates/tpl.htm
tpl_tex = $(TUP_CWD)/utils/templates/tpl.tex
tpl_css = $(TUP_CWD)/utils/templates/styles.css
!coffeelib = |> ^ COFFEE %b^ coffee -c -o lib/ %f |> lib/%B.js
!editorial = |> ^ PANDOC %B^ pandoc -S -o %o %f |> build/html/%B.html
!gen_in = |> ^ GEN in^ ./build/prg/%b > %o |> $(data_in)
!gen_out = |> ^ GEN out^ ./build/prg/%b < $(data_in) > %o |> $(data_out)
!html = | $(tpl_css) |> ^ PANDOC html^ pandoc -S --ascii -A $(tpl_css) --mathjax=XXX --template $(tpl_htm) -o %o %f |> build/html/%B.html
!img_html = | $(src_img) $(pc_doc) |> ^ COFFEE img:html^ coffee $(src_img) -f html %b |>
!img_latex = | $(src_img) $(pc_doc) |> ^ COFFEE img:latex^ coffee $(src_img) -f latex %b |>
!latex = |> ^ PANDOC latex^ pandoc -S --template $(tpl_tex) -o %o %f |> build/latex/%B.tex
!latex_embed = |> ^ PANDOC latex:embed^ pandoc -S -o %o %f |> build/latex/%B.embed.tex
!pandoc_html = | $(pc_doc) |> ^ COFFEE pandoc:html^ coffee $(src_doc) -f html > %o |> $(out_pandoc_html)
!pandoc_latex = | $(pc_doc) |> ^ COFFEE pandoc:latex^ coffee $(src_doc) -f latex > %o |> $(out_pandoc_latex)
!pdf = |> ^ PANDOC pdf^ pandoc -S --template $(tpl_tex) -o %o %f |> build/pdf/%B.pdf
!prg_cp = |> ^ CP %b^ cp -f %f %o |> build/prg/%b
!prg = |> ^ CPP %b^ g++ $(CPPFLAGS) -o %o %f |> build/prg/%B
!prg_dbg = |> ^ CPP %b:dbg^ g++ $(CPPDBG) -o %o %f |> build/dbg/%B