-
Notifications
You must be signed in to change notification settings - Fork 86
/
Makefile
84 lines (64 loc) · 1.88 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Interface between Emacs Lisp and Python - Makefile.
# Copyright © 2001, 2002, 2003, 2012 Progiciels Bourbeau-Pinard inc.
# François Pinard <[email protected]>, 2001.
EMACS = emacs
PYTHON = python
RST2LATEX = rst2latex
PYSETUP = $(PYTHON) setup.py
PPPP = $(PYTHON) pppp -C ppppconfig.py
all pregithub: prepare
$(PYSETUP) --quiet build
check: clean-debug
$(PPPP) pymacs.el.in Pymacs.py.in tests
cd tests && \
EMACS="$(EMACS)" PYTHON="$(PYTHON)" \
PYMACS_OPTIONS="-d debug-protocol -s debug-signals" \
$(PYTHON) pytest -f t $(TEST)
install: prepare
$(PYSETUP) install
prepare:
$(PPPP) Pymacs.py.in pppp.rst.in pymacs.el.in pymacs.rst.in contrib tests
clean: clean-debug
rm -rf build* contrib/rebox/build
rm -f */*py.class *.pyc */*.pyc pppp.pdf pymacs.pdf
$(PPPP) -c *.in contrib tests
clean-debug:
rm -f tests/debug-protocol tests/debug-signals
pppp.pdf: pppp.rst.in
$(PPPP) pppp.rst.in
rm -rf tmp-pdf
mkdir tmp-pdf
$(RST2LATEX) --use-latex-toc --input-encoding=UTF-8 \
pppp.rst tmp-pdf/pppp.tex
cd tmp-pdf && pdflatex pppp.tex
cd tmp-pdf && pdflatex pppp.tex
mv -f tmp-pdf/pppp.pdf $@
rm -rf tmp-pdf
pymacs.pdf: pymacs.rst.in
$(PPPP) pymacs.rst.in
rm -rf tmp-pdf
mkdir tmp-pdf
$(RST2LATEX) --use-latex-toc --input-encoding=UTF-8 \
pymacs.rst tmp-pdf/pymacs.tex
cd tmp-pdf && pdflatex pymacs.tex
cd tmp-pdf && pdflatex pymacs.tex
mv -f tmp-pdf/pymacs.pdf $@
rm -rf tmp-pdf
ifneq "$(wildcard ~/etc/mes-sites/site.mk)" ""
site: site-all
package_name = Pymacs
margin_color = "\#d1b7ff"
caption_color = "\#f1e4eb"
GOALS = README.html contrib index.html pppp.pdf pymacs.pdf
include ~/etc/mes-sites/site.mk
$(htmldir)/README.html $(htmldir)/index.html:
@_2 "$$(basename $@ .html) \c"
@rm -f $@
@ln -s ~/html/notes/Pymacs.html $@
$(htmldir)/contrib: contrib
$(symlink)
$(htmldir)/pppp.pdf: pppp.pdf
$(symlink)
$(htmldir)/pymacs.pdf: pymacs.pdf
$(symlink)
endif