File: Makefile

package info (click to toggle)
oz 0.16.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,620 kB
  • sloc: python: 6,993; xml: 654; perl: 614; makefile: 45; sh: 21
file content (60 lines) | stat: -rw-r--r-- 1,897 bytes parent folder | download
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
VERSION = $(shell egrep "^VERSION" setup.py | awk '{print $$3}')
VENV_DIR = tests/.venv

sdist: oz.spec.in
	python setup.py sdist

oz.spec: sdist

signed-tarball: sdist
	gpg --detach-sign --armor -o dist/oz-$(VERSION).tar.gz.sign dist/oz-$(VERSION).tar.gz

signed-rpm: oz.spec
	rpmbuild -ba oz.spec --sign --define "_sourcedir `pwd`/dist"

rpm: oz.spec
	rpmbuild -ba oz.spec --define "_sourcedir `pwd`/dist"

srpm: oz.spec
	rpmbuild -bs oz.spec --define "_sourcedir `pwd`/dist"

deb:
	debuild -i -uc -us -b

release: signed-rpm signed-tarball deb

man2html:
	@for file in oz-install oz-customize oz-generate-icicle oz-cleanup-cache oz-examples; do \
		echo "Generating $$file HTML page from man" ; \
		groff -mandoc -mwww man/$$file.1 -T html > man/$$file.html ; \
	done

$(VENV_DIR):
	@virtualenv --system-site-packages $(VENV_DIR)
	@pip-python -E $(VENV_DIR) install pytest
	@[[ "$$PWD" =~ \ |\' ]] && ( \
	echo "Resolving potential problems where '$$PWD' contains spaces" ; \
	for MATCH in $$(grep '^#!"/' $(VENV_DIR)/bin/* -l) ; do \
		sed -i '1s|^#!".*/\([^/]*\)"|#!/usr/bin/env \1|' "$$MATCH" ; \
	done ) || true

virtualenv: $(VENV_DIR)

unittests:
	@[ -f $(VENV_DIR)/bin/activate ] && source $(VENV_DIR)/bin/activate ; python setup.py test
	@(type deactivate 2>/dev/null | grep -q 'function') && deactivate || true

tests: unittests

test-coverage:
	python-coverage run --source oz /usr/bin/py.test --verbose tests
	python-coverage html
	xdg-open htmlcov/index.html

pylint:
	pylint --rcfile=pylint.conf oz oz-install oz-customize oz-cleanup-cache oz-generate-icicle

clean:
	rm -rf MANIFEST build dist usr *~ oz.spec *.pyc oz/*~ oz/*.pyc examples/*~ oz/auto/*~ man/*~ docs/*~ man/*.html $(VENV_DIR) tests/tdl/*~ tests/factory/*~ tests/results.xml htmlcov

.PHONY: sdist oz.spec signed-tarball signed-rpm rpm srpm deb release man2html virtualenv unittests tests test-coverage pylint clean