File: Makefile

package info (click to toggle)
pymacs 0.25-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 772 kB
  • sloc: python: 3,542; lisp: 740; makefile: 79; sh: 34
file content (72 lines) | stat: -rw-r--r-- 1,980 bytes parent folder | download | duplicates (3)
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
# Interface between Emacs Lisp and Python - Makefile.
# Copyright © 2001, 2002, 2003, 2012 Progiciels Bourbeau-Pinard inc.
# François Pinard <pinard@iro.umontreal.ca>, 2001.

EMACS = emacs
PYTHON = python3
RST2LATEX = rst2latex

PYSETUP = $(PYTHON) setup.py
PPPP = $(PYTHON) pppp -C ppppconfig.py

all:
	$(PPPP) *.in contrib tests
	$(PYSETUP) 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:
	$(PPPP) *.in Pymacs.py.in contrib tests
	$(PYSETUP) install

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

# The following goals for the maintainer of the Pymacs Web site.

ARCHIVES = web/src/archives
VERSION = `grep '^version' setup.py | sed -e "s/'$$//" -e "s/.*'//"`

publish: pppp.pdf pymacs.pdf pymacs.rst
	find -name '*~' | xargs rm -fv
	version=$(VERSION) && \
	  git archive --format=tar --prefix=Pymacs-$$version/ HEAD . \
	    | gzip > $(ARCHIVES)/Pymacs-$$version.tar.gz
	rm -f $(ARCHIVES)/Pymacs.tar.gz
	version=$(VERSION) && \
	  ln -s Pymacs-$$version.tar.gz $(ARCHIVES)/Pymacs.tar.gz
	make-web -C web
	synchro push alcyon -d entretien/pymacs
	ssh alcyon 'make-web -C entretien/pymacs/web'