Updated the Makefile.
This commit is contained in:
parent
7485bf8044
commit
9adf64fc90
36
Makefile
36
Makefile
|
@ -1,25 +1,31 @@
|
||||||
# This Makefile is only used by developers.
|
# This Makefile is only used by developers.
|
||||||
VERSION:=$(shell python setup.py --version)
|
PYVER:=2.7
|
||||||
|
PYTHON:=python$(PYVER)
|
||||||
|
VERSION:=$(shell $(PYTHON) setup.py --version)
|
||||||
ARCHIVE:=patool-$(VERSION).tar.gz
|
ARCHIVE:=patool-$(VERSION).tar.gz
|
||||||
ARCHIVE_WIN32:=patool-$(VERSION).win32.exe
|
ARCHIVE_WIN32:=patool-$(VERSION).win32.exe
|
||||||
PY_FILES_DIRS := patool setup.py patoolib tests
|
PY_FILES_DIRS := patool setup.py patoolib tests
|
||||||
NUMCPUS := $(shell grep -c '^process' /proc/cpuinfo)
|
PY2APPOPTS ?=
|
||||||
|
ifeq ($(shell uname),Darwin)
|
||||||
|
NOSETESTS:=/usr/local/share/python/nosetests
|
||||||
|
NUMPROCESSORS:=$(shell sysctl -a | grep machdep.cpu.core_count | cut -d " " -f 2)
|
||||||
|
CHMODMINUSMINUS:=
|
||||||
|
else
|
||||||
|
NOSETESTS:=$(shell which nosetests)
|
||||||
|
NUMPROCESSORS:=$(shell grep -c processor /proc/cpuinfo)
|
||||||
|
CHMODMINUSMINUS:=--
|
||||||
|
endif
|
||||||
# which test modules to run
|
# which test modules to run
|
||||||
TESTS ?= tests/
|
TESTS ?= tests/
|
||||||
# set test options, eg. to "--nologcapture"
|
# set test options, eg. to "--nologcapture"
|
||||||
TESTOPTS=
|
TESTOPTS=
|
||||||
# test for nose achievements plugin and use it if available
|
|
||||||
NOSE_ACHIEVEMENTS:=$(shell nosetests --plugins | grep achievements)
|
|
||||||
ifeq ($(strip $(NOSE_ACHIEVEMENTS)),Plugin achievements)
|
|
||||||
TESTOPTS += --with-achievements
|
|
||||||
endif
|
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
|
||||||
|
|
||||||
.PHONY: chmod
|
.PHONY: chmod
|
||||||
chmod:
|
chmod:
|
||||||
-chmod -R a+rX,u+w,go-w -- *
|
-chmod -R a+rX,u+w,go-w $(CHMODMINUSMINUS) *
|
||||||
find . -type d -exec chmod 755 {} \;
|
find . -type d -exec chmod 755 {} \;
|
||||||
|
|
||||||
.PHONY: dist
|
.PHONY: dist
|
||||||
|
@ -39,8 +45,8 @@ upload:
|
||||||
.PHONY: release
|
.PHONY: release
|
||||||
release: clean releasecheck dist upload
|
release: clean releasecheck dist upload
|
||||||
@echo "Register at Python Package Index..."
|
@echo "Register at Python Package Index..."
|
||||||
python setup.py register
|
$(PYTHON) setup.py register
|
||||||
freshmeat-submit < patool.freshmeat
|
freecode-submit < patool.freecode
|
||||||
|
|
||||||
|
|
||||||
.PHONY: releasecheck
|
.PHONY: releasecheck
|
||||||
|
@ -56,6 +62,11 @@ releasecheck: check test
|
||||||
echo "Could not release: edit patool.freshmeat version"; false; \
|
echo "Could not release: edit patool.freshmeat version"; false; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Build OSX installer
|
||||||
|
.PHONY: app
|
||||||
|
app: clean chmod
|
||||||
|
$(PYTHON) setup.py py2app $(PY2APPOPTS)
|
||||||
|
|
||||||
# The check programs used here are mostly local scripts on my private system.
|
# The check programs used here are mostly local scripts on my private system.
|
||||||
# So for other developers there is no need to execute this target.
|
# So for other developers there is no need to execute this target.
|
||||||
.PHONY: check
|
.PHONY: check
|
||||||
|
@ -82,7 +93,7 @@ clean:
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
nosetests -v --processes=$(NUMCPUS) -m "^test_.*" $(TESTOPTS) $(TESTS)
|
$(PYTHON) $(NOSETESTS) -v --processes=$(NUMPROCESSORS) -m "^test_.*" $(TESTOPTS) $(TESTS)
|
||||||
|
|
||||||
doc/patool.txt: doc/patool.1
|
doc/patool.txt: doc/patool.1
|
||||||
cols=`stty size | cut -d" " -f2`; stty cols 72; man -l doc/patool.1 | perl -pe 's/.\cH//g' > doc/patool.txt; stty cols $$cols
|
cols=`stty size | cut -d" " -f2`; stty cols 72; man -l doc/patool.1 | perl -pe 's/.\cH//g' > doc/patool.txt; stty cols $$cols
|
||||||
|
@ -90,3 +101,6 @@ doc/patool.txt: doc/patool.1
|
||||||
.PHONY: deb
|
.PHONY: deb
|
||||||
deb:
|
deb:
|
||||||
git-buildpackage --git-export-dir=../build-area/ --git-upstream-branch=master --git-debian-branch=debian --git-ignore-new
|
git-buildpackage --git-export-dir=../build-area/ --git-upstream-branch=master --git-debian-branch=debian --git-ignore-new
|
||||||
|
|
||||||
|
update-copyright:
|
||||||
|
update-copyright --holder="Bastian Kleineidam"
|
||||||
|
|
Loading…
Reference in New Issue