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

Diff of /eclass/autotools.eclass

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

Revision 1.106 Revision 1.107
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 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.106 2011/08/22 19:39:52 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.107 2011/09/23 04:14:02 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
151 S=${PWD} elibtoolize 151 S=${PWD} elibtoolize
152 152
153 return 0 153 return 0
154} 154}
155 155
156# @FUNCTION: eaclocal_amflags
157# @DESCRIPTION:
158# Extract the ACLOCAL_AMFLAGS value from the Makefile.am and try to handle
159# (most) of the crazy crap that people throw at us.
160eaclocal_amflags() {
161 local aclocal_opts amflags_file
162
163 for amflags_file in GNUmakefile.am Makefile.am GNUmakefile.in Makefile.in ; do
164 [[ -e ${amflags_file} ]] || continue
165 # setup the env in case the pkg does something crazy
166 # in their ACLOCAL_AMFLAGS. like run a shell script
167 # which turns around and runs autotools. #365401
168 # or split across multiple lines. #383525
169 autotools_env_setup
170 aclocal_opts=$(sed -n \
171 "/^ACLOCAL_AMFLAGS[[:space:]]*=/{ \
172 # match the first line
173 s:[^=]*=::p; \
174 # then gobble up all escaped lines
175 : nextline /\\\\$/{ n; p; b nextline; } \
176 }" ${amflags_file})
177 eval aclocal_opts=\""${aclocal_opts}"\"
178 break
179 done
180
181 echo ${aclocal_opts}
182}
183
156# @FUNCTION: eaclocal 184# @FUNCTION: eaclocal
157# @DESCRIPTION: 185# @DESCRIPTION:
158# These functions runs the autotools using autotools_run_tool with the 186# These functions runs the autotools using autotools_run_tool with the
159# specified parametes. The name of the tool run is the same of the function 187# specified parametes. The name of the tool run is the same of the function
160# without e prefix. 188# without e prefix.
161# They also force installing the support files for safety. 189# They also force installing the support files for safety.
162# Respects AT_M4DIR for additional directories to search for macro's. 190# Respects AT_M4DIR for additional directories to search for macro's.
163eaclocal() { 191eaclocal() {
164 local aclocal_opts
165
166 local amflags_file
167 for amflags_file in GNUmakefile.am Makefile.am GNUmakefile.in Makefile.in ; do
168 [[ -e ${amflags_file} ]] || continue
169 # setup the env in case the pkg does something crazy
170 # in their ACLOCAL_AMFLAGS. like run a shell script
171 # which turns around and runs autotools #365401
172 autotools_env_setup
173 aclocal_opts=$(sed -n '/^ACLOCAL_AMFLAGS[[:space:]]*=/s:[^=]*=::p' ${amflags_file})
174 eval aclocal_opts=\"${aclocal_opts}\"
175 break
176 done
177
178 [[ ! -f aclocal.m4 || -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && \ 192 [[ ! -f aclocal.m4 || -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && \
179 autotools_run_tool aclocal $(autotools_m4dir_include) "$@" ${aclocal_opts} 193 autotools_run_tool aclocal $(autotools_m4dir_include) "$@" $(eaclocal_amflags)
180} 194}
181 195
182# @FUNCTION: _elibtoolize 196# @FUNCTION: _elibtoolize
183# @DESCRIPTION: 197# @DESCRIPTION:
184# Runs libtoolize. Note the '_' prefix .. to not collide with elibtoolize() from 198# Runs libtoolize. Note the '_' prefix .. to not collide with elibtoolize() from

Legend:
Removed from v.1.106  
changed lines
  Added in v.1.107

  ViewVC Help
Powered by ViewVC 1.1.20