/[gentoo-x86]/eclass/cmake-utils.eclass
Gentoo

Diff of /eclass/cmake-utils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.86 Revision 1.87
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.86 2012/12/01 16:26:03 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.87 2012/12/03 09:29:09 mgorny Exp $
4 4
5# @ECLASS: cmake-utils.eclass 5# @ECLASS: cmake-utils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# kde@gentoo.org 7# kde@gentoo.org
8# @AUTHOR: 8# @AUTHOR:
166 : ${CMAKE_USE_DIR:=${S}} 166 : ${CMAKE_USE_DIR:=${S}}
167 if [[ -n ${CMAKE_IN_SOURCE_BUILD} ]]; then 167 if [[ -n ${CMAKE_IN_SOURCE_BUILD} ]]; then
168 # we build in source dir 168 # we build in source dir
169 BUILD_DIR="${CMAKE_USE_DIR}" 169 BUILD_DIR="${CMAKE_USE_DIR}"
170 else 170 else
171 : ${BUILD_DIR:=${CMAKE_BUILD_DIR:-${WORKDIR}/${P}_build}} 171 # Respect both the old variable and the new one, depending
172 # on which one was set by the ebuild.
173 if [[ ! ${BUILD_DIR} && ${AUTOTOOLS_BUILD_DIR} ]]; then
174 eqawarn "The AUTOTOOLS_BUILD_DIR variable has been renamed to BUILD_DIR."
175 eqawarn "Please migrate the ebuild to use the new one."
176
177 # In the next call, both variables will be set already
178 # and we'd have to know which one takes precedence.
179 _RESPECT_AUTOTOOLS_BUILD_DIR=1
172 fi 180 fi
181 if [[ ${_RESPECT_AUTOTOOLS_BUILD_DIR} ]]; then
182 BUILD_DIR=${AUTOTOOLS_BUILD_DIR}
183 fi
184
185 : ${BUILD_DIR:=${WORKDIR}/${P}_build}
186 fi
187
188 # Backwards compatibility for getting the value.
173 CMAKE_BUILD_DIR=${BUILD_DIR} 189 CMAKE_BUILD_DIR=${BUILD_DIR}
174 190
175 mkdir -p "${BUILD_DIR}" 191 mkdir -p "${BUILD_DIR}"
176 echo ">>> Working in BUILD_DIR: \"$BUILD_DIR\"" 192 echo ">>> Working in BUILD_DIR: \"$BUILD_DIR\""
177} 193}

Legend:
Removed from v.1.86  
changed lines
  Added in v.1.87

  ViewVC Help
Powered by ViewVC 1.1.20