-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
35 lines (24 loc) · 785 Bytes
/
Makefile
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
DOCKER = $(patsubst %/Makefile,%,$(shell find docker -mindepth 2 -name Makefile))
DOCKER_PULL = $(patsubst %,%-pull,$(DOCKER))
DOCKER_OPTS ?=
VIRTUALENV ?= virtualenv
PYTHON_ENV = $(shell test -d "venv" && echo "venv/bin/" || true)
PYTHON ?= python
.PHONY: clean install all docker docker-pull $(DOCKER) $(DOCKER_PULL)
all: dist
clean:
rm -Rf venv ansibleroletest/*.pyc build ansible_role_test.egg-info
install:
$(PYTHON_ENV)$(PYTHON) setup.py install
# same as build but use symbolic links
dev: venv
venv/bin/pip install --upgrade -e .
venv:
$(VIRTUALENV) --python=$(PYTHON) venv
# build the necessary docker images
docker: $(DOCKER)
docker-pull: $(DOCKER_PULL)
$(DOCKER):
make -C $@
$(DOCKER_PULL):
DOCKER_OPTS="$(DOCKER_OPTS)" make -C $(patsubst %-pull,%,$@) pull