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

Diff of /eclass/autotools.eclass

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

Revision 1.97 Revision 1.98
1# Copyright 1999-2010 Gentoo Foundation 1# Copyright 1999-2010 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.97 2010/04/01 21:42:37 robbat2 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.98 2010/05/23 22:52:41 vapier Exp $
4 4
5# @ECLASS: autotools.eclass 5# @ECLASS: autotools.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: Regenerates auto* build scripts 8# @BLURB: Regenerates auto* build scripts
229# Runs automake. 229# Runs automake.
230eautomake() { 230eautomake() {
231 local extra_opts 231 local extra_opts
232 local makefile_name 232 local makefile_name
233 233
234 if [[ -f GNUmakefile.am ]]; then 234 # Run automake if:
235 makefile_name="GNUmakefile" 235 # - a Makefile.am type file exists
236 elif [[ -f Makefile.am ]]; then 236 # - a Makefile.in type file exists and the configure
237 makefile_name="Makefile" 237 # script is using the AM_INIT_AUTOMAKE directive
238 else 238 for makefile_name in {GNUmakefile,{M,m}akefile}.{am,in} "" ; do
239 [[ -f ${makefile_name} ]] && break
240 done
241 [[ -z ${makefile_name} ]] && return 0
242
243 if [[ ${makefile_name} == *.in ]] ; then
244 if ! grep -qs AM_INIT_AUTOMAKE configure.?? ; then
239 return 0 245 return 0
240 fi 246 fi
241 247
242 if [[ -z ${FROM_EAUTORECONF} && -f ${makefile_name}.in ]]; then 248 elif [[ -z ${FROM_EAUTORECONF} && -f ${makefile_name%.am}.in ]]; then
243 local used_automake 249 local used_automake
244 local installed_automake 250 local installed_automake
245 251
246 installed_automake=$(WANT_AUTOMAKE= automake --version | head -n 1 | \ 252 installed_automake=$(WANT_AUTOMAKE= automake --version | head -n 1 | \
247 sed -e 's:.*(GNU automake) ::') 253 sed -e 's:.*(GNU automake) ::')
248 used_automake=$(head -n 1 < ${makefile_name}.in | \ 254 used_automake=$(head -n 1 < ${makefile_name%.am}.in | \
249 sed -e 's:.*by automake \(.*\) from .*:\1:') 255 sed -e 's:.*by automake \(.*\) from .*:\1:')
250 256
251 if [[ ${installed_automake} != ${used_automake} ]]; then 257 if [[ ${installed_automake} != ${used_automake} ]]; then
252 einfo "Automake used for the package (${used_automake}) differs from" 258 einfo "Automake used for the package (${used_automake}) differs from"
253 einfo "the installed version (${installed_automake})." 259 einfo "the installed version (${installed_automake})."

Legend:
Removed from v.1.97  
changed lines
  Added in v.1.98

  ViewVC Help
Powered by ViewVC 1.1.20