summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2012-12-03 12:05:51 +0000
committerMichał Górny <mgorny@gentoo.org>2012-12-03 12:05:51 +0000
commit62109cd0ad33185e6687e4c85ded447d17de309e (patch)
tree1b01fbc87b7e3f0fdd8a1496009dc3cf4784fbf3 /eclass/cmake-utils.eclass
parentMigrate to BUILD_DIR. This subshelling thing is so hacky the compatibility co... (diff)
downloadhistorical-62109cd0ad33185e6687e4c85ded447d17de309e.tar.gz
historical-62109cd0ad33185e6687e4c85ded447d17de309e.tar.bz2
historical-62109cd0ad33185e6687e4c85ded447d17de309e.zip
Improve the compatibility code thanks to Arfrever.
Diffstat (limited to 'eclass/cmake-utils.eclass')
-rw-r--r--eclass/cmake-utils.eclass9
1 files changed, 5 insertions, 4 deletions
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index 453d4acd4c24..c4baa23035cf 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.88 2012/12/03 10:33:50 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.89 2012/12/03 12:05:51 mgorny Exp $
# @ECLASS: cmake-utils.eclass
# @MAINTAINER:
@@ -178,11 +178,12 @@ _check_build_dir() {
# and we'd have to know which one takes precedence.
_RESPECT_CMAKE_BUILD_DIR=1
fi
+
if [[ ${_RESPECT_CMAKE_BUILD_DIR} ]]; then
- BUILD_DIR=${CMAKE_BUILD_DIR}
+ BUILD_DIR=${CMAKE_BUILD_DIR:-${WORKDIR}/${P}_build}
+ else
+ : ${BUILD_DIR:=${WORKDIR}/${P}_build}
fi
-
- : ${BUILD_DIR:=${WORKDIR}/${P}_build}
fi
# Backwards compatibility for getting the value.