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
72
73
74
75
76
77
78
79
80
81
82
83
84
|
PYTHON = python
HERE:=$(shell pwd)
PYTHONPATH:=$(HERE):$(HERE)/lib:${PYTHONPATH}
export PYTHONPATH
export ROOTDIR ?= $(PWD)
TESTFLAGS=
SST_NAME ?=
SST_BROWSER ?=
SST_BROWSER_VERSION ?=
SST_PLATFORM ?=
SST_REMOTE ?=
SST_CMD = sst-run
SST_FLAGS=
ifneq ($(strip $(SST_NAME)),)
SST_FLAGS += -n $(SST_NAME)
endif
ifneq ($(strip $(SST_BROWSER)),)
SST_FLAGS += -b $(SST_BROWSER)
endif
ifneq ($(strip $(SST_BROWSER_VERSION)),)
SST_FLAGS += -v $(SST_BROWSER_VERSION)
endif
ifneq ($(strip $(SST_PLATFORM)),)
SST_FLAGS += -p $(SST_PLATFORM)
endif
ifneq ($(strip $(SST_REMOTE)),)
SST_FLAGS += -u $(SST_REMOTE)
SST_CMD = sst-remote
else
SST_FLAGS += -x
endif
SOURCEDEPS_TAG=sourcecode/sourcedeps-tag
SOURCEDEPS_DIR=../sourcedeps
SOURCEDEPS_SOURCECODE_DIR=$(SOURCEDEPS_DIR)/sourcecode
sourcedeps: $(SOURCEDEPS_TAG)
clean-sourcedeps:
rm -rf sourcecode/*
$(SOURCEDEPS_TAG): $(SOURCEDEPS_SOURCECODE_DIR)
$(MAKE) link-sourcedeps
$(MAKE) build-sourcedeps
touch $(SOURCEDEPS_TAG)
link-sourcedeps: $(SOURCEDEPS_SOURCECODE_DIR)
@echo "Checking out external source dependencies..."
utilities/link-external-sourcecode -p $(SOURCEDEPS_DIR)
$(SOURCEDEPS_SOURCECODE_DIR):
mkdir -p $(SOURCEDEPS_DIR)
mkdir -p sourcecode
build-sourcedeps:
@echo "Building Python extensions"
@for d in sourcecode/* ; do \
test -e "$$d/setup.py" && \
( cd "$$d" && $(PYTHON) \
setup.py build build_ext --inplace > /dev/null) ; \
done
update-sourcedeps: link-sourcedeps build-sourcedeps
test: sourcedeps raw-test
raw-test:
$(ROOTDIR)/bin/$(SST_CMD) $(SST_FLAGS) \
-d ubuntuone/web/tests/sst $(TESTFLAGS)
.PHONY: sourcedeps clean-sourcedeps link-sourcedeps build-sourcedeps update-sourcedeps test raw-test
# We don't want things in this makefile run in parallel, even if people have their environment
# set up to default to 'make --jobs 4' or similar. Recursively invoked make commands will still
# be run in parallel unless their makefiles also contain the .NOTPARALLEL target.
.NOTPARALLEL:
|