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

Diff of /eclass/autotools.eclass

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

Revision 1.111 Revision 1.112
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.111 2011/12/13 21:27:38 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.112 2011/12/13 21:44:22 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
350 WANT_AUTOCONF="2.5" autoconf $(autotools_m4dir_include) --trace="${macro}" 2>/dev/null 350 WANT_AUTOCONF="2.5" autoconf $(autotools_m4dir_include) --trace="${macro}" 2>/dev/null
351 done 351 done
352 return 0 352 return 0
353} 353}
354 354
355# Internal function to look for a macro and extract its value
356autotools_check_macro_val() {
357 local macro=$1 scan_out
358
359 autotools_check_macro "${macro}" | \
360 gawk -v macro="${macro}" \
361 '($0 !~ /^[[:space:]]*(#|dnl)/) {
362 if (match($0, macro ":(.*)$", res))
363 print res[1]
364 }' | uniq
365
366 return 0
367}
368
355# Internal function to get additional subdirs to configure 369# Internal function to get additional subdirs to configure
356autotools_get_subdirs() { 370autotools_get_subdirs() { autotools_check_macro_val AC_CONFIG_SUBDIRS ; }
357 local subdirs_scan_out 371autotools_get_auxdir() { autotools_check_macro_val AC_CONFIG_AUX_DIR ; }
358
359 subdirs_scan_out=$(autotools_check_macro "AC_CONFIG_SUBDIRS")
360 [[ -n ${subdirs_scan_out} ]] || return 0
361
362 echo "${subdirs_scan_out}" | gawk \
363 '($0 !~ /^[[:space:]]*(#|dnl)/) {
364 if (match($0, /AC_CONFIG_SUBDIRS:(.*)$/, res))
365 print res[1]
366 }' | uniq
367
368 return 0
369}
370
371autotools_get_auxdir() {
372 local auxdir_scan_out
373
374 auxdir_scan_out=$(autotools_check_macro "AC_CONFIG_AUX_DIR")
375 [[ -n ${auxdir_scan_out} ]] || return 0
376
377 echo ${auxdir_scan_out} | gawk \
378 '($0 !~ /^[[:space:]]*(#|dnl)/) {
379 if (match($0, /AC_CONFIG_AUX_DIR:(.*)$/, res))
380 print res[1]
381 }' | uniq
382
383 return 0
384}
385 372
386autotools_m4dir_include() { 373autotools_m4dir_include() {
387 [[ -n ${AT_M4DIR} ]] || return 374 [[ -n ${AT_M4DIR} ]] || return
388 375
389 local include_opts= 376 local include_opts=

Legend:
Removed from v.1.111  
changed lines
  Added in v.1.112

  ViewVC Help
Powered by ViewVC 1.1.20