forked from iot-lab/iot-lab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (38 loc) · 1.26 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
REPOS = contiki wsn430 openlab cli-tools
help:
@printf "\nWelcome to the IoT-LAB development environment setup.\n\n"
@echo "targets:"
@egrep '^setup-[^%:]+:' Makefile | sed 's/:.*//; s/^/\t/' && echo
@echo " pull"
@echo ""
setup-wsn430 : parts/wsn430
less parts/wsn430/README.md
setup-openlab: parts/openlab
less parts/openlab/README-IoT-LAB.md
setup-contiki: parts/openlab parts/contiki
less parts/contiki/README-IoT-LAB.md
setup-cli-tools: parts/cli-tools
parts/%:
git clone https://github.com/iot-lab/$*.git parts/$*
all: $(addprefix setup-, $(REPOS))
# Pull in new changes
pull: $(subst parts/,pull-,$(wildcard parts/*))
git pull
pull-%: parts/%
cd $^; git pull; cd -
@# Following does not work on the server because of a git bug 1.7.2.5
@# git --work-tree=$(shell readlink -e $^) --git-dir=$(shell readlink -e $^/.git) pull
setup-%: parts/%;
#
# Run tests
#
tests: openlab-tests contiki-tests wsn430-tests tools_and_scripts__tests
tools_and_scripts__tests:
bash tools_and_scripts/tests/run_tests.sh
%-tests: parts/%
make -C $^ -f iotlab.makefile tests
tests-clean: openlab-tests-clean contiki-tests-clean wsn430-tests
%-tests-clean: parts/%
make -C $^ -f iotlab.makefile clean
.PHONY: help setup-% pull pull-% tests tests-%
.PRECIOUS: parts/%