diff options
author | 2023-05-08 23:51:48 +0500 | |
---|---|---|
committer | 2023-05-09 20:42:47 +0500 | |
commit | a908862549f4504fd88bfbe5305dd3c34101ea77 (patch) | |
tree | 260563418cfa138601d7cb39be62437f9e6c3578 /eclass | |
parent | shards.eclass: do not use 'shards build' (diff) | |
download | guru-a908862549f4504fd88bfbe5305dd3c34101ea77.tar.gz guru-a908862549f4504fd88bfbe5305dd3c34101ea77.tar.bz2 guru-a908862549f4504fd88bfbe5305dd3c34101ea77.zip |
crystal-utils.eclass: add crystal_build function
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/crystal-utils.eclass | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/eclass/crystal-utils.eclass b/eclass/crystal-utils.eclass index 09a4049a46..3c0b7d48aa 100644 --- a/eclass/crystal-utils.eclass +++ b/eclass/crystal-utils.eclass @@ -24,7 +24,7 @@ esac if [[ ! ${_CRYSTAL_UTILS_ECLASS} ]]; then _CRYSTAL_UTILS_ECLASS=1 -inherit edo flag-o-matic +inherit edo flag-o-matic multiprocessing # @ECLASS_VARIABLE: CRYSTAL_DEPS # @OUTPUT_VARIABLE @@ -151,4 +151,17 @@ eshards() { edo shards "${args[@]}" "${@}" } +# @FUNCTION: crystal_build +# @USAGE: <args>... +# @DESCRIPTION: +# Function for building a target. All arguments are passed to crystal. +crystal_build() { + local build_args=( + --threads=$(makeopts_jobs) + --verbose + ) + + ecrystal build "${build_args[@]}" "${@}" +} + fi |