~jjo/charms/precise/apache2/support-apache24-config-setup

27.3.30 by Diogo Baeder de Paula Pinto
Removing Fabric and virtualenv stuff, back to Makefile
1
PWD := $(shell pwd)
27.2.31 by Sidnei da Silva
- Sync up base dependencies with haproxy.
2
SOURCEDEPS_DIR ?= $(shell dirname $(PWD))/.sourcecode
27.3.30 by Diogo Baeder de Paula Pinto
Removing Fabric and virtualenv stuff, back to Makefile
3
HOOKS_DIR := $(PWD)/hooks
4
TEST_PREFIX := PYTHONPATH=$(HOOKS_DIR)
27.2.26 by Sidnei da Silva
- Move tests dir to hooks/tests
5
TEST_DIR := $(PWD)/hooks/tests
27.3.30 by Diogo Baeder de Paula Pinto
Removing Fabric and virtualenv stuff, back to Makefile
6
CHARM_DIR := $(PWD)
27.3.32 by Diogo Baeder de Paula Pinto
Adding charmsupport with config-manager
7
PYTHON := /usr/bin/env python
8
9
27.2.54 by Sidnei da Silva
- Switch to charmhelpers
10
build: test lint proof
27.4.1 by Sidnei da Silva
- Fix makefile, remove symlink, add charm proof.
11
27.2.31 by Sidnei da Silva
- Sync up base dependencies with haproxy.
12
revision:
13
	@test -f revision || echo 0 > revision
14
15
proof: revision
27.4.1 by Sidnei da Silva
- Fix makefile, remove symlink, add charm proof.
16
	@echo Proofing charm...
27.2.51 by Sidnei da Silva
- Implement local-monitors interface, using nrpe from charmsupport
17
	@(charm proof $(PWD) || [ $$? -eq 100 ]) && echo OK
27.2.31 by Sidnei da Silva
- Sync up base dependencies with haproxy.
18
	@test `cat revision` = 0 && rm revision
27.3.30 by Diogo Baeder de Paula Pinto
Removing Fabric and virtualenv stuff, back to Makefile
19
20
test:
21
	@echo Starting tests...
22
	@CHARM_DIR=$(CHARM_DIR) $(TEST_PREFIX) nosetests $(TEST_DIR)
23
24
lint:
25
	@echo Checking for Python syntax...
27.2.54 by Sidnei da Silva
- Switch to charmhelpers
26
	@flake8 $(HOOKS_DIR) --ignore=E123 --exclude=$(HOOKS_DIR)/charmhelpers && echo OK
27.3.32 by Diogo Baeder de Paula Pinto
Adding charmsupport with config-manager
27
27.3.35 by Diogo Baeder de Paula Pinto
Changing make target to a better name
28
sourcedeps: $(PWD)/config-manager.txt
27.3.32 by Diogo Baeder de Paula Pinto
Adding charmsupport with config-manager
29
	@echo Updating source dependencies...
27.2.31 by Sidnei da Silva
- Sync up base dependencies with haproxy.
30
	@$(PYTHON) cm.py -c $(PWD)/config-manager.txt \
31
		-p $(SOURCEDEPS_DIR) \
32
		-t $(PWD)
27.2.54 by Sidnei da Silva
- Switch to charmhelpers
33
	@$(PYTHON) build/charm-helpers/tools/charm_helpers_sync/charm_helpers_sync.py \
34
		-c charm-helpers.yaml \
35
		-b build/charm-helpers \
36
		-d hooks/charmhelpers
37
	@echo Do not forget to commit the updated files if any.
27.2.31 by Sidnei da Silva
- Sync up base dependencies with haproxy.
38
39
.PHONY: revision proof test lint sourcedeps charm-payload