-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
39 lines (29 loc) · 846 Bytes
/
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
ROUTES = routes
ROUTE_DB = $(ROUTES)/db.csv
ROUTES_JSON = $(ROUTES)/db.json
ROUTES_GEOJSON = $(ROUTES)/geojson
DATA = _data
ROUTES_YML = $(DATA)/routes.yml
SCHEDULE = $(DATA)/schedule.yml
.PHONY: all check gis build serve publish clean
all: check gis build
check:
python3 _bin/check-schedules.py
# also generates $(ROUTES_JSON)
$(ROUTES_YML): _bin/route-db.py $(ROUTE_DB)
python3 $<
# populates $(ROUTES_GEOJSON)
gis: $(ROUTES_YML)
python3 _bin/route-gis.py
# also generates rcc_weekends.ics
rcc.ics: _bin/mkical.py $(SCHEDULE) $(ROUTES_YML)
python3 $<
build: rcc.ics
bundle exec jekyll build
serve: rcc.ics
watchy -w _config.yml -- bundle exec jekyll serve --watch --drafts --host=0.0.0.0
clean:
rm -f $(ROUTES_YML) $(ROUTES_JSON)
rm -f $(ROUTES_GEOJSON)/*.geojson
rm -f rcc.ics rcc_weekends.ics
rm -rf _site/ .jekyll-cache/