build(Makefile): tweak .stack dep caching logic

This commit is contained in:
Sarah Vaupel 2024-09-20 16:25:10 +02:00
parent d0f4704c15
commit 052c361f1d

View File

@ -178,7 +178,7 @@ serve-backend:
# TODO: maybe deprecated # TODO: maybe deprecated
.PHONY: database .PHONY: database
database: .stack .stack-work.lock compile-backend-prod database: .stack compile-backend-prod
export SERVER_SESSION_ACID_FALLBACK=$${SERVER_SESSION_ACID_FALLBACK:-true} export SERVER_SESSION_ACID_FALLBACK=$${SERVER_SESSION_ACID_FALLBACK:-true}
export AVSPASS=$${AVSPASS:-nopasswordset} export AVSPASS=$${AVSPASS:-nopasswordset}
stack exec uniworxdb -- $(db) stack exec uniworxdb -- $(db)
@ -192,15 +192,17 @@ database-%:
@echo "This target, intended to fill, clear, migrate, ... the database using uniworxdb from inside the backend container is yet to be implemented" @echo "This target, intended to fill, clear, migrate, ... the database using uniworxdb from inside the backend container is yet to be implemented"
exit 1 exit 1
.PHONY: .stack # .PHONY: .stack
.stack: stack.yaml stack.yaml.lock .stack: stack.yaml stack.yaml.lock
.stack: .stack:
$(MAKE) -- --image-run---.stack $(MAKE) -- --image-run---.stack
.PHONY: --.stack
--.stack: stack.yaml stack.yaml.lock --.stack: stack.yaml stack.yaml.lock
stack build --fast --only-dependencies $(stackopts) stack build --fast --only-dependencies $(stackopts)
.stack-work.lock: # TODO: deprecated, remove
[ "${FLOCKER}" != "$0" ] && exec env FLOCKER="$0" flock -en .stack-work.lock "$0" "$@" || : # .stack-work.lock:
# [ "${FLOCKER}" != "$0" ] && exec env FLOCKER="$0" flock -en .stack-work.lock "$0" "$@" || :
##### BACKEND TARGETS ##### ##### BACKEND TARGETS #####
########################### ###########################