| 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.87 2012/12/03 09:29:09 mgorny Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/cmake-utils.eclass,v 1.88 2012/12/03 10:33:50 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: |
| … | |
… | |
| 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 | # Respect both the old variable and the new one, depending |
171 | # Respect both the old variable and the new one, depending |
| 172 | # on which one was set by the ebuild. |
172 | # on which one was set by the ebuild. |
| 173 | if [[ ! ${BUILD_DIR} && ${AUTOTOOLS_BUILD_DIR} ]]; then |
173 | if [[ ! ${BUILD_DIR} && ${CMAKE_BUILD_DIR} ]]; then |
| 174 | eqawarn "The AUTOTOOLS_BUILD_DIR variable has been renamed to BUILD_DIR." |
174 | eqawarn "The CMAKE_BUILD_DIR variable has been renamed to BUILD_DIR." |
| 175 | eqawarn "Please migrate the ebuild to use the new one." |
175 | eqawarn "Please migrate the ebuild to use the new one." |
| 176 | |
176 | |
| 177 | # In the next call, both variables will be set already |
177 | # In the next call, both variables will be set already |
| 178 | # and we'd have to know which one takes precedence. |
178 | # and we'd have to know which one takes precedence. |
| 179 | _RESPECT_AUTOTOOLS_BUILD_DIR=1 |
179 | _RESPECT_CMAKE_BUILD_DIR=1 |
| 180 | fi |
180 | fi |
| 181 | if [[ ${_RESPECT_AUTOTOOLS_BUILD_DIR} ]]; then |
181 | if [[ ${_RESPECT_CMAKE_BUILD_DIR} ]]; then |
| 182 | BUILD_DIR=${AUTOTOOLS_BUILD_DIR} |
182 | BUILD_DIR=${CMAKE_BUILD_DIR} |
| 183 | fi |
183 | fi |
| 184 | |
184 | |
| 185 | : ${BUILD_DIR:=${WORKDIR}/${P}_build} |
185 | : ${BUILD_DIR:=${WORKDIR}/${P}_build} |
| 186 | fi |
186 | fi |
| 187 | |
187 | |