| 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.116 2011/12/14 20:46:36 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.117 2012/01/04 22:00:27 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 |
| … | |
… | |
| 254 | local extra_opts |
254 | local extra_opts |
| 255 | local makefile_name |
255 | local makefile_name |
| 256 | |
256 | |
| 257 | # Run automake if: |
257 | # Run automake if: |
| 258 | # - a Makefile.am type file exists |
258 | # - a Makefile.am type file exists |
| 259 | # - a Makefile.in type file exists and the configure |
|
|
| 260 | # script is using the AM_INIT_AUTOMAKE directive |
259 | # - the configure script is using the AM_INIT_AUTOMAKE directive |
| 261 | for makefile_name in {GNUmakefile,{M,m}akefile}.{am,in} "" ; do |
260 | for makefile_name in {GNUmakefile,{M,m}akefile}.am "" ; do |
| 262 | [[ -f ${makefile_name} ]] && break |
261 | [[ -f ${makefile_name} ]] && break |
| 263 | done |
262 | done |
| 264 | [[ -z ${makefile_name} ]] && return 0 |
|
|
| 265 | |
263 | |
| 266 | if [[ ${makefile_name} == *.in ]] ; then |
264 | if [[ -z ${makefile_name} ]] ; then |
| 267 | if ! grep -qs AM_INIT_AUTOMAKE configure.?? ; then |
265 | if ! grep -qs AM_INIT_AUTOMAKE configure.?? ; then |
| 268 | return 0 |
266 | return 0 |
| 269 | fi |
267 | fi |
| 270 | |
268 | |
| 271 | elif [[ -z ${FROM_EAUTORECONF} && -f ${makefile_name%.am}.in ]]; then |
269 | elif [[ -z ${FROM_EAUTORECONF} && -f ${makefile_name%.am}.in ]]; then |