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

Diff of /eclass/autotools.eclass

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

Revision 1.69 Revision 1.70
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 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.69 2008/01/07 02:54:49 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.70 2008/01/13 18:41:28 flameeyes Exp $
4# 4#
5# Maintainer: base-system@gentoo.org 5# Maintainer: base-system@gentoo.org
6# 6#
7# This eclass is for handling autotooled software packages that 7# This eclass is for handling autotooled software packages that
8# needs to regenerate their build scripts. 8# needs to regenerate their build scripts.
138 # Check if we should run libtoolize (AM_PROG_LIBTOOL is an older macro, 138 # Check if we should run libtoolize (AM_PROG_LIBTOOL is an older macro,
139 # check for both it and the current AC_PROG_LIBTOOL) 139 # check for both it and the current AC_PROG_LIBTOOL)
140 lttest="$(autotools_check_macro "AC_PROG_LIBTOOL")$(autotools_check_macro "AM_PROG_LIBTOOL")" 140 lttest="$(autotools_check_macro "AC_PROG_LIBTOOL")$(autotools_check_macro "AM_PROG_LIBTOOL")"
141 [[ -n $lttest ]] || return 0 141 [[ -n $lttest ]] || return 0
142 142
143 [[ -f Makefile.am ]] && opts="--automake" 143 [[ -f GNUmakefile.am || -f Makefile.am ]] && opts="--automake"
144 144
145 [[ "${USERLAND}" == "Darwin" ]] && LIBTOOLIZE="glibtoolize" 145 [[ "${USERLAND}" == "Darwin" ]] && LIBTOOLIZE="glibtoolize"
146 autotools_run_tool ${LIBTOOLIZE:-libtoolize} "$@" ${opts} 146 autotools_run_tool ${LIBTOOLIZE:-libtoolize} "$@" ${opts}
147 147
148 # Need to rerun aclocal 148 # Need to rerun aclocal
166 autotools_run_tool autoconf "$@" 166 autotools_run_tool autoconf "$@"
167} 167}
168 168
169eautomake() { 169eautomake() {
170 local extra_opts 170 local extra_opts
171 local makefile_name
171 172
172 [[ -f Makefile.am ]] || return 0 173 if [[ -f GNUmakefile.am ]]; then
174 makefile_name="GNUmakefile"
175 elif [[ -f Makefile.am ]]; then
176 makefile_name="Makefile"
177 else
178 return 0
179 fi
173 180
174 if [[ -z ${FROM_EAUTORECONF} && -f Makefile.in ]]; then 181 if [[ -z ${FROM_EAUTORECONF} && -f ${makefile_name}.in ]]; then
175 local used_automake 182 local used_automake
176 local installed_automake 183 local installed_automake
177 184
178 installed_automake=$(automake --version | head -n 1 | \ 185 installed_automake=$(automake --version | head -n 1 | \
179 sed -e 's:.*(GNU automake) ::') 186 sed -e 's:.*(GNU automake) ::')
180 used_automake=$(head -n 1 < Makefile.in | \ 187 used_automake=$(head -n 1 < ${makefile_name}.in | \
181 sed -e 's:.*by automake \(.*\) from .*:\1:') 188 sed -e 's:.*by automake \(.*\) from .*:\1:')
182 189
183 if [[ ${installed_automake} != ${used_automake} ]]; then 190 if [[ ${installed_automake} != ${used_automake} ]]; then
184 einfo "Automake used for the package (${used_automake}) differs from" 191 einfo "Automake used for the package (${used_automake}) differs from"
185 einfo "the installed version (${installed_automake})." 192 einfo "the installed version (${installed_automake})."

Legend:
Removed from v.1.69  
changed lines
  Added in v.1.70

  ViewVC Help
Powered by ViewVC 1.1.20