[node-patches] Change in ovirt-node[master]: Makefile.check: Rework Makefile.check
fabiand at fedoraproject.org
fabiand at fedoraproject.org
Thu May 30 15:26:23 UTC 2013
Fabian Deutsch has uploaded a new change for review.
Change subject: Makefile.check: Rework Makefile.check
......................................................................
Makefile.check: Rework Makefile.check
To utilize -j
Change-Id: Ifb089a9b1e01debd384aaef44b976934b3e8c132
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/Makefile.check
1 file changed, 29 insertions(+), 38 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/13/15213/1
diff --git a/src/Makefile.check b/src/Makefile.check
index a5c53c2..4e906c1 100644
--- a/src/Makefile.check
+++ b/src/Makefile.check
@@ -1,48 +1,39 @@
-PYTHONSOURCES=$(shell find . -name \*.py -not -path */hacks.py)
-XMLSOURCES=$(shell find . -name \*.xml -or -name \*.xsl)
-CLEANFILES=$(shell find . -name \*.pyc -o -name \*.pyo -o -name \*~ -o -name MANIFEST)
+PYTHONSOURCES:=$(shell find . -name \*.py -not -path */hacks.py)
+XMLSOURCES:=$(shell find . -name \*.xml -or -name \*.xsl)
+CLEANFILES:=$(shell find . -name \*.pyc -o -name \*.pyo -o -name \*~ -o -name MANIFEST)
-check-local: check-static check-doctests
- @echo -e "---\n Passed all.\n---"
+check-local: check-static-doctests check-static-pep8 check-static-pyflakes check-static-pylint
+ @echo -e "---\n Passed $@\n---"
+check-static-xmllint: $(XMLSOURCES:%=%.xmllint)
+ @echo Passed $@
-check-static: check-static-pep8 check-static-pyflakes
- @echo -e "---\n Passed static checks.\n---"
+%.xmllint:
+ xmllint --noout "$*"
-check-doctests:
- @for M in $(PYTHONSOURCES); \
- do \
- echo Doctest on "$$M"; \
- PYTHONPATH=. python -m doctest $$M || exit 1; \
- done
+check-static-doctests: $(PYTHONSOURCES:%=%.doctest)
+ @echo Passed $@
-check-static-pep8:
- @for M in $(PYTHONSOURCES); \
- do \
- echo pep8 on "$$M"; \
- PYTHONPATH=. pep8 -r $$M || exit 1; \
- done
+%.doctest:
+ PYTHONPATH=. python -m doctest "$*"
-PYLINT=pylint --output-format=parseable --include-ids=yes --rcfile=.pylintrc
-check-static-pylint:
- @for M in $(PYTHONSOURCES); \
- do \
- echo pylint on "$$M"; \
- PYTHONPATH=. $(PYLINT) $$M || exit 1; \
- done
+check-static-pep8: $(PYTHONSOURCES:%=%.pep8)
+ @echo Passed $@
-check-static-pyflakes:
- @for M in $(PYTHONSOURCES); \
- do \
- echo pyflakes on "$$M"; \
- PYTHONPATH=. pyflakes $$M || exit 1; \
- done
+%.pep8:
+ PYTHONPATH=. pep8 -r "$*"
-check-static-python26-compat:
- @for M in $(PYTHONSOURCES); \
- do \
- echo Checking python26 syntax compatability on "$$M"; \
- PYTHONPATH=. python26 -m py_compile $$M | exit 0; \
- done
+PYLINT=pylint -f parseable --include-ids=yes --rcfile=.pylintrc
+check-static-pylint: $(PYTHONSOURCES:%=%.pylint)
+ @echo Passed $@
+
+%.pylint:
+ PYTHONPATH=. $(PYLINT) "$*"
+
+check-static-pyflakes: $(PYTHONSOURCES:%=%.pyflakes)
+ @echo Passed $@
+
+%.pyflakes:
+ PYTHONPATH=. pyflakes "$*"
--
To view, visit http://gerrit.ovirt.org/15213
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb089a9b1e01debd384aaef44b976934b3e8c132
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>
More information about the node-patches
mailing list