forked from osmlab/editor-layer-index
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (34 loc) · 1.14 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
ALL = imagery.geojson imagery.json imagery.xml i18n/en.yaml
SOURCES := $(shell find sources -type f -name '*.geojson')
SOURCES_QUOTED := $(shell find sources -type f -name '*.geojson' -exec echo "\"{}"\" \; | LC_ALL="C" sort)
PYTHON = python
TX := $(shell which tx)
all: $(ALL)
check: scripts/check.py $(SOURCES)
@$(PYTHON) $< $(SOURCES_QUOTED)
clean:
rm -f $(ALL)
imagery.xml: scripts/convert_xml.py $(SOURCES)
@$(PYTHON) $< $(SOURCES_QUOTED)
imagery.json: scripts/convert_geojson_to_legacyjson.py $(SOURCES)
@$(PYTHON) $< $(SOURCES_QUOTED) > $@
imagery.geojson: scripts/concat_geojson.py $(SOURCES)
@$(PYTHON) $< $(SOURCES_QUOTED) > $@
i18n/en.yaml: scripts/extract_i18n.py $(SOURCES)
@$(PYTHON) $< $(SOURCES_QUOTED) > $@
txpush: i18n/en.yaml
ifeq (, $(TX))
@echo "Transifex not installed"
else
$(TX) push -s
endif
txpull:
ifeq (, $(TX))
@echo "Transifex not installed"
else
$(TX) pull -a
endif
# $@ The file name of the target of the rule.
# $< The name of the first prerequisite.
# $? The names of all the prerequisites that are newer than the target, with spaces between them.
# $^ The names of all the prerequisites, with spaces between them.