chore(stack): introduce uniworxdev binary for always retaining binaries in bin/
This commit is contained in:
parent
5183ec1707
commit
13d8bfefc7
14
Makefile
14
Makefile
@ -33,20 +33,22 @@ backend-%-prod: # .stack-work.lock # --stack-work-$*
|
||||
# TODO: this creates more binaries than just bin/uniworx as side effect! Document or change behaviour?
|
||||
bin/uniworx:
|
||||
$(MAKE) -- --backend-build-prod
|
||||
bin/uniworxdev:
|
||||
$(MAKE) -- --backend-build-dev
|
||||
|
||||
# TODO replace with bin/uniworxdev
|
||||
.PHONY: --backend-%-dev
|
||||
--backend-%-dev: .develop.env
|
||||
$(MAKE) -- --backend-$* stackopts=--flag\ uniworx:dev
|
||||
--backend-%-dev: # .develop.env
|
||||
$(MAKE) -- --backend-$* stackopts="--flag uniworx:dev"
|
||||
|
||||
# TODO deprecated in favor of binary targets
|
||||
.PHONY: --backend-%-prod
|
||||
--backend-%-prod:
|
||||
$(MAKE) -- --backend-$* stackopts=--copy-bins\ --local-bin-path\ $$(pwd)/bin\ --flag\ uniworx:-dev
|
||||
$(MAKE) -- --backend-$* stackopts="--flag uniworx:-dev"
|
||||
|
||||
.PHONY: --backend-build
|
||||
--backend-build: well-known
|
||||
stack build --fast --profile --library-profiling --executable-profiling --flag uniworx:-library-only $(stackopts)
|
||||
stack build --fast --profile --library-profiling --executable-profiling --flag uniworx:-library-only --copy-bins --local-bin-path $$(pwd)/bin $(stackopts)
|
||||
|
||||
.PHONY: --backend-lint
|
||||
--backend-lint:
|
||||
@ -85,12 +87,12 @@ database: .stack-work.lock # --stack-work-build
|
||||
export AVSPASS=$${AVSPASS:-nopasswordset}
|
||||
stack exec uniworxdb -- $(db)
|
||||
|
||||
# TODO: same behaviour as b9in/uniworx! Merge or tweak targets!
|
||||
# TODO: same behaviour as bin/uniworx! Merge or tweak targets!
|
||||
bin/uniworxdb: .stack-work.lock
|
||||
stack build --fast --flag uniworx:-library-only --copy-bins\ --local-bin-path\ $$(pwd)/bin\ --flag\ uniworx:-dev
|
||||
|
||||
.PHONY: frontend-%
|
||||
frontend-%: well-known
|
||||
frontend-%: node_modules well-known
|
||||
$(MAKE) -- --frontend-$*
|
||||
|
||||
.PHONY: --frontend-build
|
||||
|
||||
11
package.yaml
11
package.yaml
@ -287,7 +287,7 @@ data-files:
|
||||
library:
|
||||
source-dirs: src
|
||||
executables:
|
||||
uniworx:
|
||||
uniworx: &uniworxexe
|
||||
main: main.hs
|
||||
source-dirs: app
|
||||
dependencies:
|
||||
@ -295,8 +295,17 @@ executables:
|
||||
when:
|
||||
- condition: flag(library-only)
|
||||
buildable: false
|
||||
- condition: flag(dev)
|
||||
buildable: false
|
||||
ghc-options:
|
||||
- -threaded -rtsopts "-with-rtsopts=-N -T"
|
||||
uniworxdev:
|
||||
<<: *uniworxexe
|
||||
when:
|
||||
- condition: flag(library-only)
|
||||
buildable: false
|
||||
- condition: "!flag(dev)"
|
||||
buildable: false
|
||||
uniworxdb:
|
||||
main: Database.hs
|
||||
ghc-options:
|
||||
|
||||
Reference in New Issue
Block a user