diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -27,13 +27,16 @@ ifeq ($(distro),) distro = redhat endif -READ_VERSION=$(shell $(PYVER) $(CWD)/tools/read-version) +READ_VERSION=$(shell $(PYVER) $(CWD)/tools/read-version || \ + echo read-version-failed) CODE_VERSION=$(shell $(PYVER) -c "from cloudinit import version; print(version.version_string())") all: check -check: check_version pep8 $(pyflakes) test $(yaml) +check: check_version test $(yaml) + +style-check: pep8 $(pyflakes) pep8: @$(CWD)/tools/run-pep8 @@ -62,8 +65,8 @@ test: $(unittests) check_version: @if [ "$(READ_VERSION)" != "$(CODE_VERSION)" ]; then \ - echo "Error: read-version version $(READ_VERSION)" \ - "not equal to code version $(CODE_VERSION)"; exit 2; \ + echo "Error: read-version version '$(READ_VERSION)'" \ + "not equal to code version '$(CODE_VERSION)'"; exit 2; \ else true; fi clean_pyc: @@ -73,7 +76,7 @@ clean: clean_pyc rm -rf /var/log/cloud-init.log /var/lib/cloud/ yaml: - @$(CWD)/tools/validate-yaml.py $(YAML_FILES) + @$(PYVER) $(CWD)/tools/validate-yaml.py $(YAML_FILES) rpm: ./packages/brpm --distro $(distro) @@ -83,3 +86,4 @@ deb: .PHONY: test pyflakes pyflakes3 clean pep8 rpm deb yaml check_version .PHONY: pip-test-requirements pip-requirements clean_pyc unittest unittest3 +.PHONY: style-check |