summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-03-17 08:33:20 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2020-03-17 18:00:13 +0000
commit86cd2bcb764d253372a22abafcf4b54ddbe7a72b (patch)
tree976d650ad146f3c258ea8c7d5a4293eaacc23f61 /eclass/flag-o-matic.eclass
parentdev-libs/xxhash: arm64 stable (bug #690582) (diff)
downloadgentoo-86cd2bcb764d253372a22abafcf4b54ddbe7a72b.tar.gz
gentoo-86cd2bcb764d253372a22abafcf4b54ddbe7a72b.tar.bz2
gentoo-86cd2bcb764d253372a22abafcf4b54ddbe7a72b.zip
flag-o-matic.eclass: add more verbose conditionals
To ease debugging by pluggins debug statements convert foo || return 1 into if ! foo; then return 1 fi Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'eclass/flag-o-matic.eclass')
-rw-r--r--eclass/flag-o-matic.eclass11
1 files changed, 9 insertions, 2 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index 39dae290af02..9ef9ac3685e0 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -434,13 +434,20 @@ test-flag-PROG() {
local lang=$2
shift 2
- [[ -z ${comp} || -z $1 ]] && return 1
+ if [[ -z ${comp} ]]; then
+ return 1
+ fi
+ if [[ -z $1 ]]; then
+ return 1
+ fi
# verify selected compiler exists before using it
comp=($(tc-get${comp}))
# 'comp' can already contain compiler options.
# 'type' needs a binary name
- type -p ${comp[0]} >/dev/null || return 1
+ if ! type -p ${comp[0]} >/dev/null; then
+ return 1
+ fi
# Set up test file.
local in_src in_ext cmdline_extra=()