-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
73 lines (55 loc) · 1.63 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
# A GNU Makefile to run various tasks - compatibility for us old-timers.
# Note: This makefile include remake-style target comments.
# These comments before the targets start with #:
# remake --tasks to shows the targets and the comments
GIT2CL ?= admin-tools/git2cl
PYTHON ?= python3
PIP ?= pip3
RM ?= rm
LANG = en
.PHONY: all build \
check clean \
develop dist doc doc-data \
pypi-setup \
pytest \
rmChangeLog \
test
#: Default target - same as "develop"
all: develop
#: build everything needed to install
build:
$(PYTHON) ./setup.py build
#: Check Python version, and install PyPI dependencies
pypi-setup:
$(PIP) install -e .
#: Set up to run from the source tree
develop: pypi-setup
$(PIP) install -e .
#: Install mathics
install:
$(PYTHON) setup.py install
# Run tests
check: pytest doctest
#: Remove derived files
clean: clean-pyc
#: Remove old PYC files
clean-pyc:
@find . -name "*.pyc" -type f -delete
#: Run py.test tests. Use environment variable "o" for pytest options
pytest:
py.test test $o
# #: Create data that is used to in Django docs and to build TeX PDF
# doc-data mathics/doc/tex/data: mathics/builtin/*.py mathics/doc/documentation/*.mdoc mathics/doc/documentation/images/*
# $(PYTHON) mathics/test.py -ot -k
#: Run tests that appear in docstring in the code.
doctest:
$(PYTHON) mathics/test.py $o
# #: Make Mathics PDF manual
# doc mathics.pdf: mathics/doc/tex/data
# (cd mathics/doc/tex && $(MAKE) mathics.pdf)
#: Remove ChangeLog
rmChangeLog:
$(RM) ChangeLog || true
#: Create a ChangeLog from git via git log and git2cl
ChangeLog: rmChangeLog
git log --pretty --numstat --summary | $(GIT2CL) >$@