diff --git a/Makefile b/Makefile index 147f04a1a..f2df08fb3 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,6 @@ export UNIWORXDB_OPTS ?= -cf export CONTAINER_ID export FRADRIVE_SERVICE -# TODO: to be deprecated export DEV_PORT_HTTP export DEV_PORT_HTTPS export HOOGLE_PORT @@ -377,7 +376,6 @@ start-frontend: WATCH = false # HELP(start-backend): serve yesod development site # HELP(start-frontend): start frontend watcher. Watches frontend source files for changes and recompiles on change. (TODO: watcher functionality currently broken!) # HELP(start-hoogle): serve local hoogle instance -# TODO: abort with error if a singleton service is already running start-%: FRADRIVE_SERVICE = % start-%: PORTS = $(foreach PORT,$(BASE_PORTS),$(shell utils/next_free_port.pl $(PORT))) start-%: --develop @@ -386,6 +384,10 @@ start-%: --develop echo "DEV $(DEVELOP)" if [[ "$(SINGLETON)" = "true" ]]; then \ CONTAINER_FILE=$(DEVELOP)/$* ; \ + if ! [[ -e $${CONTAINER_FILE} ]]; then \ + >&2 echo "Another $* service is already running! Use \"make new-develop\" or \"make start\" to start a new develop instance despite currently running services." ; \ + exit 1 ; \ + fi \ else \ DEVDIR=$(DEVELOP)/$*; \ I=`ls $${DEVDIR} | sort -n | tail -n1`; \