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
|
# 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
PHONY=build check clean dist distclean test
GIT2CL ?= git2cl
PYTHON ?= python
#: Default target. Same as "build"
all: build
#: Run all tests
check: build
./setup.py nosetests
#: Remove OS- and platform-specific derived files.
clean:
$(PYTHON) ./setup.py clean --all && rm -f *.so || /bin/true
#: Create source and binary distribution
dist:
$(PYTHON) ./setup.py sdist bdist
#: Do what it takes to build software locally
build:
$(PYTHON) ./setup.py build
# 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 *.egg-info *.pyc *.so *.dll py*.py \
swig/cdtext.swg pycdio.py pyiso9660.py \
example/*.pyc example/copying swig/py*_wrap.c test/*.pyc
#: Remove all derived files. Like "clean" on steroids.
distclean: clean
-rm -fr $(DISTCLEAN_FILES) || true
#: Install package
install:
$(PYTHON) ./setup.py install
#: Same as check
test: check
#: create ChangeLog fom git log via git2cl
ChangeLog:
git log --pretty --numstat --summary | $(GIT2CL) >$@
.PHONY: $(PHONY)
|