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

Diff of /eclass/autotools-utils.eclass

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

Revision 1.28 Revision 1.29
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 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/autotools-utils.eclass,v 1.28 2011/11/27 09:17:35 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.29 2011/11/27 09:57:20 mgorny Exp $
4 4
5# @ECLASS: autotools-utils.eclass 5# @ECLASS: autotools-utils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Maciej Mrozowski <reavertm@gentoo.org> 7# Maciej Mrozowski <reavertm@gentoo.org>
8# Michał Górny <mgorny@gentoo.org> 8# Michał Górny <mgorny@gentoo.org>
203 if [[ ${removing} ]]; then 203 if [[ ${removing} ]]; then
204 einfo "Removing unnecessary ${f#${D%/}} (${removing})" 204 einfo "Removing unnecessary ${f#${D%/}} (${removing})"
205 rm -f "${f}" || die 205 rm -f "${f}" || die
206 fi 206 fi
207 done 207 done
208
209 # check for invalid eclass use
210 # this is the most commonly used function, so do it here
211 _check_build_dir
212 if [[ ! -d "${AUTOTOOLS_BUILD_DIR}" ]]; then
213 eqawarn "autotools-utils used but autotools-utils_src_configure was never called."
214 eqawarn "This is not supported and never was. Please report a bug against"
215 eqawarn "the offending ebuild. This will become a fatal error in a near future."
216 fi
208} 217}
209 218
210# @FUNCTION: autotools-utils_src_prepare 219# @FUNCTION: autotools-utils_src_prepare
211# @DESCRIPTION: 220# @DESCRIPTION:
212# The src_prepare function. 221# The src_prepare function.
248 # Append user args 257 # Append user args
249 econfargs+=("${myeconfargs[@]}") 258 econfargs+=("${myeconfargs[@]}")
250 259
251 _check_build_dir 260 _check_build_dir
252 mkdir -p "${AUTOTOOLS_BUILD_DIR}" || die "mkdir '${AUTOTOOLS_BUILD_DIR}' failed" 261 mkdir -p "${AUTOTOOLS_BUILD_DIR}" || die "mkdir '${AUTOTOOLS_BUILD_DIR}' failed"
253 pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null || die 262 pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
254 base_src_configure "${econfargs[@]}" "$@" 263 base_src_configure "${econfargs[@]}" "$@"
255 popd > /dev/null || die 264 popd > /dev/null
256} 265}
257 266
258# @FUNCTION: autotools-utils_src_compile 267# @FUNCTION: autotools-utils_src_compile
259# @DESCRIPTION: 268# @DESCRIPTION:
260# The autotools src_compile function, invokes emake in specified AUTOTOOLS_BUILD_DIR. 269# The autotools src_compile function, invokes emake in specified AUTOTOOLS_BUILD_DIR.
261autotools-utils_src_compile() { 270autotools-utils_src_compile() {
262 debug-print-function ${FUNCNAME} "$@" 271 debug-print-function ${FUNCNAME} "$@"
263 272
264 _check_build_dir 273 _check_build_dir
265 pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null || die 274 pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
266 base_src_compile "$@" 275 base_src_compile "$@"
267 popd > /dev/null || die 276 popd > /dev/null
268} 277}
269 278
270# @FUNCTION: autotools-utils_src_install 279# @FUNCTION: autotools-utils_src_install
271# @DESCRIPTION: 280# @DESCRIPTION:
272# The autotools src_install function. Runs emake install, unconditionally 281# The autotools src_install function. Runs emake install, unconditionally
277# DOCS and HTML_DOCS arrays are supported. See base.eclass(5) for reference. 286# DOCS and HTML_DOCS arrays are supported. See base.eclass(5) for reference.
278autotools-utils_src_install() { 287autotools-utils_src_install() {
279 debug-print-function ${FUNCNAME} "$@" 288 debug-print-function ${FUNCNAME} "$@"
280 289
281 _check_build_dir 290 _check_build_dir
282 pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null || die 291 pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
283 base_src_install "$@" 292 base_src_install "$@"
284 popd > /dev/null || die 293 popd > /dev/null
285 294
286 # Remove libtool files and unnecessary static libs 295 # Remove libtool files and unnecessary static libs
287 remove_libtool_files 296 remove_libtool_files
288} 297}
289 298
292# The autotools src_test function. Runs emake check in build directory. 301# The autotools src_test function. Runs emake check in build directory.
293autotools-utils_src_test() { 302autotools-utils_src_test() {
294 debug-print-function ${FUNCNAME} "$@" 303 debug-print-function ${FUNCNAME} "$@"
295 304
296 _check_build_dir 305 _check_build_dir
297 pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null || die 306 pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
298 # Run default src_test as defined in ebuild.sh 307 # Run default src_test as defined in ebuild.sh
299 default_src_test 308 default_src_test
300 popd > /dev/null || die 309 popd > /dev/null
301} 310}

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29

  ViewVC Help
Powered by ViewVC 1.1.20