From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: kde@gentoo.org, tommy@gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 1/2] cmake-utils.eclass: _ninjaopts_from_makeopts, fix handling of -k
Date: Sun, 28 Feb 2016 20:01:57 +0100 [thread overview]
Message-ID: <1456686118-28043-2-git-send-email-mgorny@gentoo.org> (raw)
In-Reply-To: <1456686118-28043-1-git-send-email-mgorny@gentoo.org>
Fix _ninjaopts_from_makeopts to handle -k correctly. Make does not
support parameters to -k, while ninja requires one. Therefore, handle
only a single '-k' and convert it into '-k 0' (no limit of failing
tasks).
---
eclass/cmake-utils.eclass | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index b607132..f5ed1eb 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -659,14 +659,19 @@ _ninjaopts_from_makeopts() {
set -- ${MAKEOPTS}
while (( $# )); do
case $1 in
- -j|-l|-k)
+ -j|-l)
ninjaopts+=( $1 $2 )
shift 2
;;
- -j*|-l*|-k*)
+ -j*|-l*)
ninjaopts+=( $1 )
shift 1
;;
+ -k)
+ # -k 0 = any number of tasks can fail
+ ninjaopts+=( $1 0 )
+ shift 1
+ ;;
*) shift ;;
esac
done
--
2.7.2
next prev parent reply other threads:[~2016-02-28 19:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-28 19:01 [gentoo-dev] cmake-utils.eclass: fixes to ninja MAKEOPTS conversion Michał Górny
2016-02-28 19:01 ` Michał Górny [this message]
2016-02-28 19:01 ` [gentoo-dev] [PATCH 2/2] cmake-utils.eclass: _ninjaopts_from_makeopts, fix plain '-j' and '-l' Michał Górny
2016-05-26 8:10 ` [gentoo-dev] cmake-utils.eclass: fixes to ninja MAKEOPTS conversion Michał Górny
2016-05-26 13:24 ` rindeal
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=1456686118-28043-2-git-send-email-mgorny@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
--cc=kde@gentoo.org \
--cc=tommy@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