From 68ec5c7ac8c936b8a9ecaf92fba8f732692647fb Mon Sep 17 00:00:00 2001 From: zstadler Date: Fri, 30 Apr 2021 08:57:12 +0300 Subject: [PATCH] Update makefile to catch WSL folder error (#1108) - Resolve #1103 - Remove dead code --- Makefile | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index 0c46c83f..5b9c0c7b 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ # Ensure that errors don't hide inside pipes SHELL = /bin/bash -.SHELLFLAGS = -o pipefail -c +.SHELLFLAGS = -o pipefail -c # Make all .env variables available for make targets include .env @@ -161,25 +161,6 @@ ifneq (,$(wildcard $(AREA_BBOX_FILE))) export BBOX endif -ifeq ($(strip $(area)),) - define assert_area_is_given - @echo "" - @echo "ERROR: $(AREA_ERROR)" - @echo "" - @echo " make $@ area=" - @echo "" - @echo "To download an area, use make download " - @echo "To list downloadable areas, use make list-geofabrik and/or make list-bbbike" - @exit 1 - endef -else - ifneq ($(strip $(AREA_INFO)),) - define assert_area_is_given - @echo "$(AREA_INFO)" - endef - endif -endif - # # TARGETS # @@ -230,12 +211,25 @@ help: @echo " make help # help about available commands" @echo "==============================================================================" +define win_fs_error + ( \ + echo "" ;\ + echo "ERROR: Windows native filesystem" ;\ + echo "" ;\ + echo "Please avoid running OpenMapTiles in a Windows filesystem." ;\ + echo "See https://github.com/openmaptiles/openmaptiles/issues/1095#issuecomment-817095465" ;\ + echo "" ;\ + exit 1 ;\ + ) +endef + .PHONY: init-dirs init-dirs: @mkdir -p build/sql/parallel @mkdir -p build/openmaptiles.tm2source @mkdir -p data/borders @mkdir -p cache + @ ! ($(DOCKER_COMPOSE) 2>/dev/null run $(DC_OPTS) openmaptiles-tools df --output=fstype /tileset| grep -q 9p) || ($(win_fs_error)) build/openmaptiles.tm2source/data.yml: init-dirs ifeq (,$(wildcard build/openmaptiles.tm2source/data.yml))