2015-12-11 18:44:23 +00:00
|
|
|
# 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 ?= git2cl
|
|
|
|
PYTHON ?= python
|
|
|
|
PYTHON3 ?= python3
|
|
|
|
RM ?= rm
|
|
|
|
LINT = flake8
|
|
|
|
|
|
|
|
#EXTRA_DIST=ipython/ipy_trepan.py trepan
|
2015-12-15 22:55:57 +00:00
|
|
|
PHONY=check clean pytest dist distclean lint flake8 test test-unit test-functional rmChangeLog clean_pyc nosetests
|
2015-12-11 18:44:23 +00:00
|
|
|
|
|
|
|
#: Default target - same as "check"
|
|
|
|
all: check
|
|
|
|
|
|
|
|
#: Same as "check"
|
2015-12-17 23:49:16 +00:00
|
|
|
test check: pytest check-long
|
|
|
|
|
|
|
|
#: Run tests
|
|
|
|
check-long: pytest
|
|
|
|
$(MAKE) -C test check-2.7
|
2015-12-11 18:44:23 +00:00
|
|
|
|
2015-12-13 05:25:34 +00:00
|
|
|
#: Run tests
|
2015-12-16 06:52:11 +00:00
|
|
|
check-short: pytest
|
2015-12-17 23:49:16 +00:00
|
|
|
$(MAKE) -C test check-short-2.7
|
|
|
|
|
2015-12-11 18:44:23 +00:00
|
|
|
|
2015-12-16 06:52:11 +00:00
|
|
|
#: check that disassembly exactly matches Python lib's dis
|
|
|
|
check-disasm:
|
|
|
|
$(MAKE) -C test check-disasm
|
|
|
|
|
2015-12-15 22:55:57 +00:00
|
|
|
#: Run tests
|
|
|
|
pytest:
|
|
|
|
$(MAKE) -C pytest check
|
|
|
|
|
2015-12-11 18:44:23 +00:00
|
|
|
#: Clean up temporary files and .pyc files
|
|
|
|
clean: clean_pyc
|
|
|
|
$(PYTHON) ./setup.py $@
|
2015-12-13 05:25:34 +00:00
|
|
|
(cd test && $(MAKE) clean)
|
2015-12-11 18:44:23 +00:00
|
|
|
|
|
|
|
#: Create source (tarball) and binary (egg) distribution
|
|
|
|
dist:
|
|
|
|
$(PYTHON) ./setup.py sdist bdist_egg
|
|
|
|
|
|
|
|
#: Remove .pyc files
|
|
|
|
clean_pyc:
|
2015-12-13 05:25:34 +00:00
|
|
|
( cd uncompyle6 && $(RM) -f *.pyc */*.pyc )
|
2015-12-11 18:44:23 +00:00
|
|
|
|
|
|
|
#: Create source tarball
|
|
|
|
sdist:
|
|
|
|
$(PYTHON) ./setup.py sdist
|
|
|
|
|
|
|
|
|
|
|
|
#: Style check. Set env var LINT to pyflakes, flake, or flake8
|
2015-12-14 13:48:59 +00:00
|
|
|
lint: flake8
|
|
|
|
|
|
|
|
flake8:
|
2015-12-11 23:49:12 +00:00
|
|
|
$(LINT) uncompyle6
|
2015-12-11 18:44:23 +00:00
|
|
|
|
|
|
|
#: Create binary egg distribution
|
|
|
|
bdist_egg:
|
|
|
|
$(PYTHON) ./setup.py bdist_egg
|
|
|
|
|
|
|
|
|
|
|
|
# It is too much work to figure out how to add a new command to distutils
|
|
|
|
# to do the following. I'm sure distutils will someday get there.
|
|
|
|
DISTCLEAN_FILES = build dist *.pyc
|
|
|
|
|
|
|
|
#: Remove ALL derived files
|
|
|
|
distclean: clean
|
2015-12-15 03:01:58 +00:00
|
|
|
-rm -fvr $(DISTCLEAN_FILES) || true
|
2015-12-11 18:44:23 +00:00
|
|
|
-find . -name \*.pyc -exec rm -v {} \;
|
|
|
|
-find . -name \*.egg-info -exec rm -vr {} \;
|
|
|
|
|
|
|
|
#: Install package locally
|
|
|
|
verbose-install:
|
|
|
|
$(PYTHON) ./setup.py install
|
|
|
|
|
|
|
|
#: Install package locally without the verbiage
|
|
|
|
install:
|
|
|
|
$(PYTHON) ./setup.py install >/dev/null
|
|
|
|
|
|
|
|
rmChangeLog:
|
|
|
|
rm ChangeLog || true
|
|
|
|
|
|
|
|
#: Create a ChangeLog from git via git log and git2cl
|
|
|
|
ChangeLog: rmChangeLog
|
|
|
|
git log --pretty --numstat --summary | $(GIT2CL) >$@
|
|
|
|
|
|
|
|
.PHONY: $(PHONY)
|