Add localbuild target.

This commit is contained in:
Bastian Kleineidam 2012-10-10 21:13:31 +02:00
parent c1dc5892c8
commit 4ba973abf5

View file

@ -21,13 +21,10 @@ TESTOPTS=
all: all:
.PHONY: chmod
chmod: chmod:
-chmod -R a+rX,u+w,go-w $(CHMODMINUSMINUS) * -chmod -R a+rX,u+w,go-w $(CHMODMINUSMINUS) *
find . -type d -exec chmod 755 {} \; find . -type d -exec chmod 755 {} \;
.PHONY: dist
dist: dist:
git archive --format=tar --prefix=dosage-$(VERSION)/ HEAD | gzip -9 > ../$(ARCHIVE) git archive --format=tar --prefix=dosage-$(VERSION)/ HEAD | gzip -9 > ../$(ARCHIVE)
[ -f ../$(ARCHIVE).sha1 ] || sha1sum ../$(ARCHIVE) > ../$(ARCHIVE).sha1 [ -f ../$(ARCHIVE).sha1 ] || sha1sum ../$(ARCHIVE) > ../$(ARCHIVE).sha1
@ -36,7 +33,6 @@ dist:
doc/dosage.1.html: doc/dosage.1 doc/dosage.1.html: doc/dosage.1
man2html -r $< | tail -n +2 | sed 's/Time:.*//g' | sed 's@/:@/@g' > $@ man2html -r $< | tail -n +2 | sed 's/Time:.*//g' | sed 's@/:@/@g' > $@
.PHONY: release
release: distclean releasecheck dist release: distclean releasecheck dist
git tag v$(VERSION) git tag v$(VERSION)
# @echo "Register at Python Package Index..." # @echo "Register at Python Package Index..."
@ -44,7 +40,6 @@ release: distclean releasecheck dist
# freecode-submit < dosage.freecode # freecode-submit < dosage.freecode
.PHONY: releasecheck
releasecheck: check test releasecheck: check test
@if egrep -i "xx\.|xxxx|\.xx" doc/changelog.txt > /dev/null; then \ @if egrep -i "xx\.|xxxx|\.xx" doc/changelog.txt > /dev/null; then \
echo "Could not release: edit doc/changelog.txt release date"; false; \ echo "Could not release: edit doc/changelog.txt release date"; false; \
@ -55,7 +50,6 @@ releasecheck: check test
# 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
check: check:
[ ! -d .svn ] || check-nosvneolstyle -v [ ! -d .svn ] || check-nosvneolstyle -v
check-copyright check-copyright
@ -71,37 +65,35 @@ doccheck:
dosage \ dosage \
*.py *.py
.PHONY: pyflakes
pyflakes: pyflakes:
pyflakes $(PY_FILES_DIRS) pyflakes $(PY_FILES_DIRS)
.PHONY: count
count: count:
@sloccount dosage dosagelib | grep "Total Physical Source Lines of Code" @sloccount dosage dosagelib | grep "Total Physical Source Lines of Code"
.PHONY: clean
clean: clean:
find . -name \*.pyc -delete find . -name \*.pyc -delete
find . -name \*.pyo -delete find . -name \*.pyo -delete
rm -rf build dist rm -rf build dist
PHONY: distclean
distclean: clean distclean: clean
rm -rf build dist Dosage.egg-info rm -rf build dist Dosage.egg-info
rm -f _Dosage_configdata.py MANIFEST rm -f _Dosage_configdata.py MANIFEST
.PHONY: test localbuild:
test: $(PYTHON) setup.py build
test: localbuild
$(PYTHON) -m pytest $(PYTESTOPTS) $(TESTOPTS) $(TESTS) $(PYTHON) -m pytest $(PYTESTOPTS) $(TESTOPTS) $(TESTS)
.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
.PHONY: comics
comics: comics:
./dosage -v @@ > comics.log 2>&1 ./dosage -v @@ > comics.log 2>&1
.PHONY: update-copyright
update-copyright: update-copyright:
update-copyright --holder="Bastian Kleineidam" update-copyright --holder="Bastian Kleineidam"
.PHONY: update-copyright comics deb test clean distclean count pyflakes
.PHONY: doccheck check releasecheck release dist chmod localbuild