build(Makefile): fix shell and ghci targets for entrypoint

This commit is contained in:
Sarah Vaupel 2025-03-27 11:30:54 +01:00
parent 5ab47c6c4f
commit 123e9eb057

View File

@ -3,6 +3,9 @@ export SHELL=bash
export CLEAN_DEPENDENCIES ?= false
export CLEAN_IMAGES ?= false
export ENTRYPOINT ?= bash
export SRC
.PHONY: help
# HELP: print out this help message
help:
@ -79,11 +82,11 @@ start-%:
.PHONY: shell-%
# HELP(shell-$SERVICE): launch a (bash) shell inside a given service
shell-%:
docker compose run --build --no-deps $* bash
docker compose run --build --no-deps --entrypoint="$(ENTRYPOINT)" $*
.PHONY: ghci
# HELP: launch ghci
ghci:
docker compose run --build --no-deps backend stack ghci $(SRC)
# HELP: launch ghci instance. Use in combination with SRC to specify the modules to be loaded by ghci: make ghci SRC=src/SomeModule.hs
ghci: ENTRYPOINT=stack ghci $(SRC)
ghci: shell-backend ;
.PHONY: stop
# HELP: stop all services