forked from opening-hours/opening_hours.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (26 loc) · 1.03 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
NODE?= node
SEARCH?= opening_hours
default: check
all: test real_test
check: test
test: opening_hours.js test.js
${NODE} test.js
.SILENT: diff-test
diff-test: opening_hours.js test.js
git checkout -- test.log
${NODE} test.js 1> test.log 2>&1 || true
git diff --color-words test.log
benchmark: opening_hours.js benchmark.js
${NODE} benchmark.js
real_test: opening_hours.js real_test.js all-osm-tags
${NODE} real_test.js
.PHONY : regex_search
regex_search: export.$(SEARCH).json interactive_testing.js
./regex_search.py $<
interactive_testing: interactive_testing.js
${NODE} interactive_testing.js
clean:
rm export.*.json
all-osm-tags: export.opening_hours.json export.lit.json export.opening_hours\:kitchen.json export.opening_hours\:warm_kitchen.json export.smoking_hours.json export.collection_times.json export.service_times.json export.fee.json
export.%.json:
wget -O "$(shell echo "$@" | sed 's/\\//g' )" "http://taginfo.openstreetmap.org/api/4/key/values?key=$(shell echo "$@" | sed 's/^export\.\(.*\)\.json/\1/;s/\\//g' )"