-
Notifications
You must be signed in to change notification settings - Fork 344
/
Makefile
71 lines (56 loc) · 2.42 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
all:
@echo
@echo "Development related targets:"
@echo "check: Runs tree static check, unittests and fast functional tests"
@echo "smokecheck: Runs the simplest possible avocado test execution"
@echo "develop: Runs 'python setup.py --develop' on this tree alone"
@echo "develop-external: Install Avocado's external plugins in develop mode."
@echo " You need to set AVOCADO_EXTERNAL_PLUGINS_PATH"
@echo "clean: Get rid of build scratch from this project and subprojects"
@echo "variables: Show the value of variables as defined in this Makefile or"
@echo " given as input to make"
@echo
@echo "Package requirements related targets"
@echo "requirements-dev: Install development requirements"
@echo
@echo "Platform independent distribution/installation related targets:"
@echo "install: Install on local system"
@echo "uninstall: Uninstall Avocado and also subprojects"
@echo "man: Generate the avocado man page"
@echo "pip: Auxiliary target to install pip. (It's not recommended to run this directly)"
@echo
include Makefile.include
DESTDIR=/
AVOCADO_DIRNAME=$(shell basename ${PWD})
AVOCADO_OPTIONAL_PLUGINS=$(shell find ./optional_plugins -maxdepth 1 -mindepth 1 -type d)
clean:
$(PYTHON) setup.py clean --all
install:
$(PYTHON) setup.py install --root $(DESTDIR) $(COMPILE)
uninstall:
$(PYTHON) setup.py develop --uninstall $(PYTHON_DEVELOP_ARGS)
requirements-dev: pip
$(PYTHON) -m pip install -r requirements-dev.txt $(PYTHON_DEVELOP_ARGS)
smokecheck: clean uninstall develop
$(PYTHON) -m avocado run examples/tests/passtest.py
check: clean uninstall develop
# Unless manually set, this is equivalent to AVOCADO_CHECK_LEVEL=0
$(PYTHON) selftests/check.py
develop:
$(PYTHON) setup.py develop $(PYTHON_DEVELOP_ARGS)
develop-external:
ifndef AVOCADO_EXTERNAL_PLUGINS_PATH
$(error AVOCADO_EXTERNAL_PLUGINS_PATH is not defined)
endif
$(PYTHON) setup.py develop $(PYTHON_DEVELOP_ARGS) --external
man: man/avocado.1
%.1: %.rst
$(PYTHON) setup.py man
variables:
@echo "PYTHON: $(PYTHON)"
@echo "VERSION: $(VERSION)"
@echo "PYTHON_DEVELOP_ARGS: $(PYTHON_DEVELOP_ARGS)"
@echo "DESTDIR: $(DESTDIR)"
@echo "AVOCADO_DIRNAME: $(AVOCADO_DIRNAME)"
@echo "AVOCADO_OPTIONAL_PLUGINS: $(AVOCADO_OPTIONAL_PLUGINS)"
.PHONY: pip install clean uninstall requirements-dev smokecheck check develop develop-external variables man