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