build(Makefile): fix stack dependencies

This commit is contained in:
Sarah Vaupel 2024-10-18 20:10:31 +02:00
parent db2a5cb45e
commit 7227ee60e8
2 changed files with 8 additions and 4 deletions

View File

@ -216,10 +216,14 @@ db: --image-build --containerized---db;
AVSPASS=${AVSPASS:-nopasswordset} ; \
stack exec uniworxdb -- $(UNIWORXDB_OPTS)
.stack: stack.yaml stack.yaml.lock package.yaml
.PHONY: .stack
.stack:
$(MAKE) -- --image-run---.stack
--.stack: stack.yaml stack.yaml.lock
if [ "$(IN_CONTAINER)" == "true" ] ; then \
$(MAKE) -- --.stack ; \
else \
$(MAKE) -- --image-run---.stack ; \
fi
--.stack: stack.yaml stack.yaml.lock package.yaml
stack build --fast --only-dependencies $(stackopts)
##### BACKEND TARGETS #####

View File

@ -20,7 +20,7 @@ ENV HOME="${PROJECT_DIR}"
RUN mkdir -p "${PROJECT_DIR}/.stack"
ENV STACK_ROOT="${PROJECT_DIR}/.stack"
RUN make .stack STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true
RUN make -- --.stack STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true
# RUN stack build yesod-bin
ENV FRADRIVE_MAKE_TARGET=serve-backend