~ubuntu-branches/ubuntu/saucy/cloud-init/saucy

223.2.4 by Scott Moser
* New upstream snapshot.
1
CWD=$(shell pwd)
245.3.2 by Scott Moser
* New upstream release.
2
PY_FILES=$(shell find cloudinit bin tests tools -name "*.py" -type f )
223.2.4 by Scott Moser
* New upstream snapshot.
3
PY_FILES+="bin/cloud-init"
174.2.5 by Scott Moser
* New upstream snapshot.
4
245.3.2 by Scott Moser
* New upstream release.
5
YAML_FILES=$(shell find cloudinit bin tests tools -name "*.yaml" -type f )
6
YAML_FILES+=$(shell find doc/examples -name "cloud-config*.txt" -type f )
7
1.1.41 by Scott Moser
Import upstream version 0.7.2~bzr795
8
CHANGELOG_VERSION=$(shell $(CWD)/tools/read-version)
9
CODE_VERSION=$(shell python -c "from cloudinit import version; print version.version_string()")
245.3.2 by Scott Moser
* New upstream release.
10
282.1.5 by Scott Moser
* Reads the currently set value in /etc/cloud/cloud.cfg.d/90_dpkg.cfg to
11
ifeq ($(distro),)
12
  distro = redhat
13
endif
14
1.1.41 by Scott Moser
Import upstream version 0.7.2~bzr795
15
all: test check_version
174.2.5 by Scott Moser
* New upstream snapshot.
16
223.2.4 by Scott Moser
* New upstream snapshot.
17
pep8:
245.3.2 by Scott Moser
* New upstream release.
18
	@$(CWD)/tools/run-pep8 $(PY_FILES)
223.2.4 by Scott Moser
* New upstream snapshot.
19
174.2.5 by Scott Moser
* New upstream snapshot.
20
pylint:
245.3.2 by Scott Moser
* New upstream release.
21
	@$(CWD)/tools/run-pylint $(PY_FILES)
174.2.5 by Scott Moser
* New upstream snapshot.
22
23
pyflakes:
223.2.4 by Scott Moser
* New upstream snapshot.
24
	pyflakes $(PY_FILES)
174.2.5 by Scott Moser
* New upstream snapshot.
25
26
test:
245.3.2 by Scott Moser
* New upstream release.
27
	@nosetests $(noseopts) tests/
223.2.4 by Scott Moser
* New upstream snapshot.
28
1.1.41 by Scott Moser
Import upstream version 0.7.2~bzr795
29
check_version:
30
	@if [ "$(CHANGELOG_VERSION)" != "$(CODE_VERSION)" ]; then \
282.1.5 by Scott Moser
* Reads the currently set value in /etc/cloud/cloud.cfg.d/90_dpkg.cfg to
31
	    echo "Error: ChangeLog version $(CHANGELOG_VERSION)" \
32
	    "not equal to code version $(CODE_VERSION)"; exit 2; \
33
	    else true; fi
1.1.41 by Scott Moser
Import upstream version 0.7.2~bzr795
34
223.2.4 by Scott Moser
* New upstream snapshot.
35
2to3:
36
	2to3 $(PY_FILES)
37
38
clean:
39
	rm -rf /var/log/cloud-init.log \
40
		   /var/lib/cloud/
41
245.3.2 by Scott Moser
* New upstream release.
42
yaml:
43
	@$(CWD)/tools/validate-yaml.py $(YAML_FILES)
282.1.5 by Scott Moser
* Reads the currently set value in /etc/cloud/cloud.cfg.d/90_dpkg.cfg to
44
223.2.4 by Scott Moser
* New upstream snapshot.
45
rpm:
282.1.5 by Scott Moser
* Reads the currently set value in /etc/cloud/cloud.cfg.d/90_dpkg.cfg to
46
	./packages/brpm --distro $(distro)
223.2.4 by Scott Moser
* New upstream snapshot.
47
48
deb:
223.2.6 by Scott Moser
* New upstream snapshot.
49
	./packages/bddeb
223.2.4 by Scott Moser
* New upstream snapshot.
50
1.1.41 by Scott Moser
Import upstream version 0.7.2~bzr795
51
.PHONY: test pylint pyflakes 2to3 clean pep8 rpm deb yaml check_version
174.2.5 by Scott Moser
* New upstream snapshot.
52