summaryrefslogtreecommitdiff
path: root/Makefile
blob: 09f06cc87b54bd6e54470e916dccff332ff9fb91 (plain)
  1. DATAFILES = src/data/bydele.json
  2. all: data-transform build-compact
  3. init: fetch-vendor-kk
  4. # TODO: Call node (not nodejs) when Nodejs 6 (Debian buster) is stable
  5. build-compact: $(DATAFILES) \
  6. $(wildcard src/js/*.js src/js/*/*.js src/js/*/*/*.js)
  7. nodejs /usr/lib/nodejs/requirejs/r.js -o etc/build.js
  8. touch $@
  9. # load httpd service
  10. serve-quick:
  11. bin/src.psgi
  12. serve-compact: build-compact
  13. bin/build.psgi
  14. newfiles-vendor-kk = vendor/kk/*.json
  15. fetch-vendor-kk:
  16. bin/get-kk.sh
  17. touch $@
  18. data-transform: $(DATAFILES)
  19. src/data/%.json: vendor/kk/%.geojson
  20. mkdir $(dir $@)
  21. jq --tab --sort-keys . $< > $@
  22. clean:
  23. rm -rf build
  24. rm -f build-compact
  25. distclean: clean
  26. rm -f $(newfiles-vendor-kk)
  27. rm -f fetch-vendor-kk
  28. .PHONY: all init build-compact data-transform clean distclean