/[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.64 Revision 1.68
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 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.64 2013/04/01 09:16:07 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.68 2013/05/05 20:22:25 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>
183# @CODE 183# @CODE
184# PATCHES=( "${FILESDIR}"/${P}-mypatch.patch ) 184# PATCHES=( "${FILESDIR}"/${P}-mypatch.patch )
185# @CODE 185# @CODE
186 186
187# @ECLASS-VARIABLE: AUTOTOOLS_PRUNE_LIBTOOL_FILES 187# @ECLASS-VARIABLE: AUTOTOOLS_PRUNE_LIBTOOL_FILES
188# @DEFAULT-UNSET 188# @DEFAULT_UNSET
189# @DESCRIPTION: 189# @DESCRIPTION:
190# Sets the mode of pruning libtool files. The values correspond to 190# Sets the mode of pruning libtool files. The values correspond to
191# prune_libtool_files parameters, with leading dashes stripped. 191# prune_libtool_files parameters, with leading dashes stripped.
192# 192#
193# Defaults to pruning the libtool files when static libraries are not 193# Defaults to pruning the libtool files when static libraries are not
198# as well. This is often the preferred option. 198# as well. This is often the preferred option.
199# 199#
200# If set to 'all', all .la files will be removed unconditionally. This 200# If set to 'all', all .la files will be removed unconditionally. This
201# option is discouraged and shall be used only if 'modules' does not 201# option is discouraged and shall be used only if 'modules' does not
202# remove the files. 202# remove the files.
203#
204# If set to 'none', no .la files will be pruned ever. Use in corner
205# cases only.
203 206
204# Determine using IN or OUT source build 207# Determine using IN or OUT source build
205_check_build_dir() { 208_check_build_dir() {
206 : ${ECONF_SOURCE:=${S}} 209 : ${ECONF_SOURCE:=${S}}
207 if [[ -n ${AUTOTOOLS_IN_SOURCE_BUILD} ]]; then 210 if [[ -n ${AUTOTOOLS_IN_SOURCE_BUILD} ]]; then
527 dohtml -r "${HTML_DOCS[@]}" || die "dohtml failed" 530 dohtml -r "${HTML_DOCS[@]}" || die "dohtml failed"
528 fi 531 fi
529 532
530 # Remove libtool files and unnecessary static libs 533 # Remove libtool files and unnecessary static libs
531 local prune_ltfiles=${AUTOTOOLS_PRUNE_LIBTOOL_FILES} 534 local prune_ltfiles=${AUTOTOOLS_PRUNE_LIBTOOL_FILES}
535 if [[ ${prune_ltfiles} != none ]]; then
532 prune_libtool_files ${prune_ltfiles:+--${prune_ltfiles}} 536 prune_libtool_files ${prune_ltfiles:+--${prune_ltfiles}}
537 fi
533} 538}
534 539
535# @FUNCTION: autotools-utils_src_test 540# @FUNCTION: autotools-utils_src_test
536# @DESCRIPTION: 541# @DESCRIPTION:
537# The autotools src_test function. Runs emake check in build directory. 542# The autotools src_test function. Runs emake check in build directory.
538autotools-utils_src_test() { 543autotools-utils_src_test() {
539 debug-print-function ${FUNCNAME} "$@" 544 debug-print-function ${FUNCNAME} "$@"
540 545
541 _check_build_dir 546 _check_build_dir
542 pushd "${BUILD_DIR}" > /dev/null || die 547 pushd "${BUILD_DIR}" > /dev/null || die
543 # Run default src_test as defined in ebuild.sh 548
544 default_src_test 549 if make -n check &>/dev/null; then
550 emake check "${@}" || die 'emake check failed.'
551 elif make -n test &>/dev/null; then
552 emake test "${@}" || die 'emake test failed.'
553 fi
554
545 popd > /dev/null || die 555 popd > /dev/null || die
546} 556}

Legend:
Removed from v.1.64  
changed lines
  Added in v.1.68

  ViewVC Help
Powered by ViewVC 1.1.20