From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 2/4] cmake-utils.eclass: Use eninja from ninja-utils
Date: Sun, 30 Apr 2017 22:28:28 +0200 [thread overview]
Message-ID: <20170430202830.12974-2-mgorny@gentoo.org> (raw)
In-Reply-To: <20170430202830.12974-1-mgorny@gentoo.org>
---
eclass/cmake-utils.eclass | 52 +++--------------------------------------------
1 file changed, 3 insertions(+), 49 deletions(-)
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index 07f719a62a8c..2b3c8d933d1a 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -116,7 +116,8 @@ case ${EAPI} in
*) die "EAPI=${EAPI:-0} is not supported" ;;
esac
-inherit toolchain-funcs multilib flag-o-matic eutils multiprocessing versionator
+inherit toolchain-funcs multilib ninja-utils flag-o-matic eutils \
+ multiprocessing versionator
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install
@@ -680,44 +681,6 @@ enable_cmake-utils_src_compile() {
cmake-utils_src_make "$@"
}
-_ninjaopts_from_makeopts() {
- if [[ ${NINJAOPTS+set} == set ]]; then
- return 0
- fi
- local ninjaopts=()
- set -- ${MAKEOPTS}
- while (( $# )); do
- case $1 in
- -j|-l)
- if [[ $# -eq 1 || $2 == -* ]]; then
- if [[ $1 == -j ]]; then
- # absurdly high job limit
- ninjaopts+=( $1 9999 )
- else # -l
- # remove load limit (like make does for -l)
- ninjaopts+=( $1 0 )
- fi
- shift 1
- else
- ninjaopts+=( $1 $2 )
- shift 2
- fi
- ;;
- -j*|-l*)
- ninjaopts+=( $1 )
- shift 1
- ;;
- -k)
- # -k 0 = any number of tasks can fail
- ninjaopts+=( $1 0 )
- shift 1
- ;;
- *) shift ;;
- esac
- done
- export NINJAOPTS="${ninjaopts[*]}"
-}
-
# @FUNCTION: _cmake_ninja_src_make
# @INTERNAL
# @DESCRIPTION:
@@ -727,16 +690,7 @@ _cmake_ninja_src_make() {
[[ -e build.ninja ]] || die "build.ninja not found. Error during configure stage."
- _ninjaopts_from_makeopts
-
- if [[ "${CMAKE_VERBOSE}" != "OFF" ]]; then
- set -- ninja ${NINJAOPTS} -v "$@"
- else
- set -- ninja ${NINJAOPTS} "$@"
- fi
-
- echo "$@"
- "$@" || die
+ eninja "$@"
}
# @FUNCTION: _cmake_emake_src_make
--
2.13.0.rc1
next prev parent reply other threads:[~2017-04-30 20:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-30 20:28 [gentoo-dev] [PATCH 1/4] ninja-utils.eclass: Add a new eclass to handle calling ninja Michał Górny
2017-04-30 20:28 ` Michał Górny [this message]
2017-04-30 20:28 ` [gentoo-dev] [PATCH 3/4] www-client/chromium: Use eninja from ninja-utils Michał Górny
2017-05-01 11:17 ` Paweł Hajdan, Jr.
2017-04-30 20:28 ` [gentoo-dev] [PATCH 4/4] sys-apps/systemd: " Michał Górny
2017-05-16 17:12 ` [gentoo-dev] [PATCH 1/4] ninja-utils.eclass: Add a new eclass to handle calling ninja Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170430202830.12974-2-mgorny@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox