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

Diff of /eclass/autotools.eclass

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

Revision 1.46 Revision 1.47
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 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.eclass,v 1.46 2006/09/23 19:43:07 flameeyes Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.47 2006/10/02 22:52:08 flameeyes Exp $
4# 4#
5# Author: Diego Pettenò <flameeyes@gentoo.org> 5# Author: Diego Pettenò <flameeyes@gentoo.org>
6# Enhancements: Martin Schlemmer <azarah@gentoo.org> 6# Enhancements: Martin Schlemmer <azarah@gentoo.org>
7# 7#
8# This eclass is for handling autotooled software packages that 8# This eclass is for handling autotooled software packages that
110 ;; 110 ;;
111 esac 111 esac
112 done 112 done
113 fi 113 fi
114 114
115 autotools_set_versions
115 [[ ! -f aclocal.m4 || -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && \ 116 [[ ! -f aclocal.m4 || -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && \
116 autotools_run_tool aclocal "$@" ${aclocal_opts} 117 autotools_run_tool aclocal "$@" ${aclocal_opts}
117} 118}
118 119
119_elibtoolize() { 120_elibtoolize() {
135} 136}
136 137
137eautoheader() { 138eautoheader() {
138 # Check if we should run autoheader 139 # Check if we should run autoheader
139 [[ -n $(autotools_check_macro "AC_CONFIG_HEADERS") ]] || return 0 140 [[ -n $(autotools_check_macro "AC_CONFIG_HEADERS") ]] || return 0
141 autotools_set_versions
140 autotools_run_tool autoheader "$@" 142 autotools_run_tool autoheader "$@"
141} 143}
142 144
143eautoconf() { 145eautoconf() {
144 if [[ ! -f configure.ac && ! -f configure.in ]] ; then 146 if [[ ! -f configure.ac && ! -f configure.in ]] ; then
146 eerror "No configure.{ac,in} present in '$(pwd | sed -e 's:.*/::')'!" 148 eerror "No configure.{ac,in} present in '$(pwd | sed -e 's:.*/::')'!"
147 echo 149 echo
148 die "No configure.{ac,in} present!" 150 die "No configure.{ac,in} present!"
149 fi 151 fi
150 152
153 autotools_set_versions
151 autotools_run_tool autoconf "$@" 154 autotools_run_tool autoconf "$@"
152} 155}
153 156
154eautomake() { 157eautomake() {
155 local extra_opts 158 local extra_opts
156 159
157 [[ -f Makefile.am ]] || return 0 160 [[ -f Makefile.am ]] || return 0
158 161
159 if [[ -n ${WANT_AUTOMAKE} ]]; then 162 autotools_set_versions
160 export WANT_AUTOMAKE # let the automake wrapper pick it up
161 einfo "Required automake ${WANT_AUTOMAKE}. Using $(automake --version | head -n 1)."
162 fi
163
164 if [[ -z ${FROM_EAUTORECONF} && -f Makefile.in ]]; then 163 if [[ -z ${FROM_EAUTORECONF} && -f Makefile.in ]]; then
165 local used_automake 164 local used_automake
166 local installed_automake 165 local installed_automake
167 166
168 installed_automake=$(automake --version | head -n 1 | \ 167 installed_automake=$(automake --version | head -n 1 | \
183 182
184 # --force-missing seems not to be recognized by some flavours of automake 183 # --force-missing seems not to be recognized by some flavours of automake
185 autotools_run_tool automake --add-missing --copy ${extra_opts} "$@" 184 autotools_run_tool automake --add-missing --copy ${extra_opts} "$@"
186} 185}
187 186
187autotools_set_versions() {
188 [[ -n ${autotools_version_sets} ]] && return 0
188 189
190 if [[ -n ${WANT_AUTOCONF} ]]; then
191 export WANT_AUTOCONF
192 einfo "Requested autoconf ${WANT_AUTOCONF}"
193 einfo "Using $(autoconf --version 2>/dev/null | head -n 1)"
194 einfo "Using $(autoheader --version 2>/dev/null | head -n 1)"
195 fi
196
197 if [[ -n ${WANT_AUTOMAKE} ]]; then
198 export WANT_AUTOMAKE
199 einfo "Requested automake ${WANT_AUTOMAKE}"
200 einfo "Using $(automake --version 2>/dev/null | head -n 1)"
201 einfo "Using $(aclocal --version 2>/dev/null | head -n 1)"
202 fi
203
204 autotools_version_sets="yes"
205}
189 206
190# Internal function to run an autotools' tool 207# Internal function to run an autotools' tool
191autotools_run_tool() { 208autotools_run_tool() {
192 local STDERR_TARGET="${T}/$$.out" 209 local STDERR_TARGET="${T}/$$.out"
193 local PATCH_TARGET="${T}/$$.patch" 210 local PATCH_TARGET="${T}/$$.patch"

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.47

  ViewVC Help
Powered by ViewVC 1.1.20