-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
46 lines (35 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
MAKE_OPTIONS ?= --no-print-directory
CHECK_URL ?= http://localhost:12355/api/oh_interpreter
SLEEP_SEC_BETWEEN_RESTART ?= 30
TCP_PORT ?= 12355
default:
@echo "See Makefile"
CHECK_TARGET_FILES = test.opening_hours.error.json \
test.opening_hours.errorOnly.json \
test.opening_hours.warnOnly.json \
test.collection_times.error.json \
test.collection_times.errorOnly.json \
test.collection_times.warnOnly.json
test.opening_hours.error.json:
test.opening_hours.errorOnly.json:
test.opening_hours.warnOnly.json:
test.collection_times.error.json:
test.collection_times.errorOnly.json:
test.collection_times.warnOnly.json:
.PHONY: default check check-clean dev
check: $(CHECK_TARGET_FILES)
@for check in $(CHECK_TARGET_FILES); do \
$(MAKE) --always-make $(MAKE_OPTIONS) "$$check"; \
done
check-clean:
rm --force $(CHECK_TARGET_FILES)
dev:
./ohs.js --debug --tcp-port $(TCP_PORT)
serve:
@while true; do \
./ohs.js --tcp-port $(TCP_PORT); \
echo "Process terminated. Restarting in $(SLEEP_SEC_BETWEEN_RESTART) seconds …"; \
sleep $(SLEEP_SEC_BETWEEN_RESTART); \
done
test.%.json:
wget "$(CHECK_URL)?tag=$(shell echo "$@" | cut -d . -f 2)&filter=$(shell echo "$@" | cut -d . -f 3)&s=50.6553939&w=6.9842517&n=50.8111732&e=7.2673653" --output-document "$@" --quiet