]> git.openstreetmap.org Git - dns.git/blobdiff - Makefile
Send CN + HK traffic to fastly
[dns.git] / Makefile
index 89b17a00fc9b565bc487dff93c2a82be859898ec..063dfb8f8318071731eec224132797ffd248dddd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,34 +1,45 @@
-all: data/openstreetmap.org data/openstreetmap.com data/openstreetmap.net \
-     data/openstreetmaps.org data/osm.org data/openmaps.org \
-     data/osmfoundation.org data/stateofthemap.org data/stateofthemap.com \
-     data/opengeodata.org \
-     data/switch2osm.org data/switch2osm.com \
-     data/tile.openstreetmap.org
+preview: preview_cloudflare
 
-clean:
-       rm lib/countries.xml data/*
+preview_cloudflare: sshfp gdns
+       dnscontrol preview
+
+update: update_cloudflare update_geodns
+
+update_primary: update_cloudflare_primary update_geodns
+
+update_cloudflare: sshfp gdns
+       dnscontrol push --providers cloudflare
+
+update_cloudflare_primary: sshfp gdns
+       dnscontrol push --providers cloudflare --domains openstreetmap.org
+
+update_geodns: gdns
+       parallel --will-cite rsync --quiet --recursive --checksum gdns/ {}::geodns ::: ${GEODNS_SERVERS}
+
+sshfp:
+       bin/mksshfp
 
-update: all
-       bin/update
+gdns: gdns_tile gdns_render gdns_nominatim
+
+gdns_tile: lib/countries.xml origins/tile.openstreetmap.yml
+       bin/mkgeo origins/tile.openstreetmap.yml src/tile.openstreetmap.yml tile origins/render.openstreetmap.yml tile
+
+gdns_render: lib/countries.xml origins/render.openstreetmap.yml
+       bin/mkgeo origins/render.openstreetmap.yml src/render.openstreetmap.yml render origins/tile-total.openstreetmap.yml
+
+gdns_nominatim: lib/countries.xml origins/nominatim.openstreetmap.yml
+       bin/mkgeo origins/nominatim.openstreetmap.yml src/nominatim.openstreetmap.yml nominatim origins/nominatim-total.openstreetmap.yml nominatim
+
+clean:
+       rm -f includes/* json/* origins/* gdns/*
 
 lib/countries.xml:
        curl -s -o $@ http://api.geonames.org/countryInfo?username=demo
 
-data/openstreetmap.org: src/openstreetmap
-data/openstreetmap.com: src/openstreetmap
-data/openstreetmap.net: src/openstreetmap
-data/openstreetmaps.org: src/openstreetmap
-data/osm.org: src/openstreetmap
-data/openmaps.org: src/openstreetmap
-data/osmfoundation.org: src/osmfoundation
-data/stateofthemap.org: src/stateofthemap
-data/stateofthemap.com: src/stateofthemap
-data/opengeodata.org: src/opengeodata
-data/switch2osm.org: src/switch2osm
-data/switch2osm.com: src/switch2osm
-
-data/tile.openstreetmap.org kml/tile.openstreetmap.org.kml: src/tile.openstreetmap bin/mkgeo lib/countries.xml
-       bin/mkgeo tile.openstreetmap tile.openstreetmap.org
-
-data/%:
-       sed -e 's/$(notdir $<):/$(notdir $@):/g' < $< > $@
+origins/tile.openstreetmap.yml: bin/mkcountries lib/countries.xml bandwidth/tile.openstreetmap.yml
+       bin/mkcountries bandwidth/tile.openstreetmap.yml origins/tile.openstreetmap.yml
+
+origins/render.openstreetmap.yml: gdns_tile
+
+origins/nominatim.openstreetmap.yml: bin/mkcountries lib/countries.xml bandwidth/nominatim.openstreetmap.yml
+       bin/mkcountries bandwidth/nominatim.openstreetmap.yml origins/nominatim.openstreetmap.yml