build(Makefile): set DEVELOPMENT ghc option based on PROD make var

This commit is contained in:
Sarah Vaupel 2024-10-29 15:13:42 +01:00
parent 06f48fe408
commit 90b8af8cc1

View File

@ -32,8 +32,12 @@ export DEVELOP
export CONTAINER_FILE
export CONTAINER_FILE_CONTENT
export PROD ?= false
export LOGSIZE ?= 1024
export PROD ?= false
ifneq ($(PROD),true)
export --DEVELOPMENT=--flag uniworx:dev
endif
# HELP HEADER START
# To see the definition of all available targets, take a look into the Makefile.
@ -181,7 +185,7 @@ well-known: static;
# HELP(compile-backend): compile backend
--compile-backend:
stack build --fast --profile --library-profiling --executable-profiling --flag uniworx:-library-only --local-bin-path $$(pwd)/bin
stack build --fast --profile --library-profiling --executable-profiling --flag uniworx:-library-only $(--DEVELOPMENT) --local-bin-path $$(pwd)/bin
# HELP(lint-backend): lint backend
--lint-backend:
@ -189,7 +193,7 @@ well-known: static;
# HELP(test-backend): test backend
--test-backend:
stack build --test --coverage --fast --work-dir=.stack-work-test --flag uniworx:library-only
stack build --test --coverage --fast --work-dir=.stack-work-test --flag uniworx:library-only $(--DEVELOPMENT)
# TODO: better name
.PHONY: db