forked from osmlab/editor-layer-index
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (39 loc) · 1.44 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
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)
TXVERSION := $(shell tx --version | cut -c1-1)
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 ifeq (0, $(TXVERSION))
@echo "Installed Transifex CLI client too old: Upgrade to https://github.com/transifex/cli"
else
$(TX) push -s
endif
txpull:
ifeq (, $(TX))
@echo "Transifex not installed"
else ifeq (0, $(TXVERSION))
@echo "Installed Transifex CLI client too old: Upgrade to https://github.com/transifex/cli"
else
$(TX) pull -a --use-git-timestamps
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.