diff options
author | Michał Górny <mgorny@gentoo.org> | 2013-09-14 19:00:10 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2013-09-14 19:00:10 +0000 |
commit | 0e1be2c010f48350197b0b79146295722646dc75 (patch) | |
tree | 2752cbd4415dff61939f2a7a11dcbfd4b086c33a /eclass/eutils.eclass | |
parent | Replace --without-python with --disable-python-devel for non-native abis, bug... (diff) | |
download | historical-0e1be2c010f48350197b0b79146295722646dc75.tar.gz historical-0e1be2c010f48350197b0b79146295722646dc75.tar.bz2 historical-0e1be2c010f48350197b0b79146295722646dc75.zip |
Support EAPIs < 4 in einstalldocs properly.
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r-- | eclass/eutils.eclass | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index 7798f54691e7..d1acc732168e 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.426 2013/09/13 11:22:52 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.427 2013/09/14 19:00:10 mgorny Exp $ # @ECLASS: eutils.eclass # @MAINTAINER: @@ -1648,22 +1648,35 @@ prune_libtool_files() { einstalldocs() { debug-print-function ${FUNCNAME} "${@}" + local dodoc_opts=-r + has ${EAPI} 0 1 2 3 && dodoc_opts= + if ! declare -p DOCS &>/dev/null ; then local d for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \ THANKS BUGS FAQ CREDITS CHANGELOG ; do - [[ -s ${d} ]] && dodoc "${d}" + if [[ -s ${d} ]] ; then + dodoc "${d}" || die + fi done elif [[ $(declare -p DOCS) == "declare -a"* ]] ; then - [[ ${DOCS[@]} ]] && dodoc -r "${DOCS[@]}" + if [[ ${DOCS[@]} ]] ; then + dodoc ${dodoc_opts} "${DOCS[@]}" || die + fi else - [[ ${DOCS} ]] && dodoc -r ${DOCS} + if [[ ${DOCS} ]] ; then + dodoc ${dodoc_opts} ${DOCS} || die + fi fi if [[ $(declare -p HTML_DOCS 2>/dev/null) == "declare -a"* ]] ; then - [[ ${HTML_DOCS[@]} ]] && dohtml -r "${HTML_DOCS[@]}" + if [[ ${HTML_DOCS[@]} ]] ; then + dohtml -r "${HTML_DOCS[@]}" || die + fi else - [[ ${HTML_DOCS} ]] && dohtml -r ${HTML_DOCS} + if [[ ${HTML_DOCS} ]] ; then + dohtml -r ${HTML_DOCS} || die + fi fi return 0 |