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

Diff of /eclass/autotools-utils.eclass

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

Revision 1.70 Revision 1.71
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 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-utils.eclass,v 1.70 2013/06/29 08:17:06 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.71 2013/10/08 10:34:45 mgorny Exp $
4 4
5# @ECLASS: autotools-utils.eclass 5# @ECLASS: autotools-utils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Maciej Mrozowski <reavertm@gentoo.org> 7# Maciej Mrozowski <reavertm@gentoo.org>
8# Michał Górny <mgorny@gentoo.org> 8# Michał Górny <mgorny@gentoo.org>
290 rm -f "${f}" || die 290 rm -f "${f}" || die
291 fi 291 fi
292 done 292 done
293} 293}
294 294
295# @FUNCTION: autotools-utils_autoreconf
296# @DESCRIPTION:
297# Reconfigure the sources (like gnome-autogen.sh or eautoreconf).
298autotools-utils_autoreconf() {
299 debug-print-function ${FUNCNAME} "$@"
300
301 eqawarn "The autotools-utils_autoreconf() function was deprecated."
302 eqawarn "Please call autotools-utils_src_prepare()"
303 eqawarn "with AUTOTOOLS_AUTORECONF set instead."
304
305 # Override this func to not require unnecessary eaclocal calls.
306 autotools_check_macro() {
307 local x
308
309 # Add a few additional variants as we don't get expansions.
310 [[ ${1} = AC_CONFIG_HEADERS ]] && set -- "${@}" \
311 AC_CONFIG_HEADER AM_CONFIG_HEADER
312
313 for x; do
314 grep -h "^${x}" configure.{ac,in} 2>/dev/null
315 done
316 }
317
318 einfo "Autoreconfiguring '${PWD}' ..."
319
320 local auxdir=$(sed -n -e 's/^AC_CONFIG_AUX_DIR(\(.*\))$/\1/p' \
321 configure.{ac,in} 2>/dev/null)
322 if [[ ${auxdir} ]]; then
323 auxdir=${auxdir%%]}
324 mkdir -p ${auxdir##[}
325 fi
326
327 # Support running additional tools like gnome-autogen.sh.
328 # Note: you need to add additional depends to the ebuild.
329
330 # gettext
331 if [[ $(autotools_check_macro AM_GLIB_GNU_GETTEXT) ]]; then
332 echo 'no' | autotools_run_tool glib-gettextize --copy --force
333 elif [[ $(autotools_check_macro AM_GNU_GETTEXT) ]]; then
334 eautopoint --force
335 fi
336
337 # intltool
338 if [[ $(autotools_check_macro AC_PROG_INTLTOOL IT_PROG_INTLTOOL) ]]
339 then
340 autotools_run_tool intltoolize --copy --automake --force
341 fi
342
343 # gtk-doc
344 if [[ $(autotools_check_macro GTK_DOC_CHECK) ]]; then
345 autotools_run_tool gtkdocize --copy
346 fi
347
348 # gnome-doc
349 if [[ $(autotools_check_macro GNOME_DOC_INIT) ]]; then
350 autotools_run_tool gnome-doc-prepare --copy --force
351 fi
352
353 if [[ $(autotools_check_macro AC_PROG_LIBTOOL AM_PROG_LIBTOOL LT_INIT) ]]
354 then
355 _elibtoolize --copy --force --install
356 fi
357
358 eaclocal
359 eautoconf
360 eautoheader
361 FROM_EAUTORECONF=sure eautomake
362
363 local x
364 for x in $(autotools_check_macro_val AC_CONFIG_SUBDIRS); do
365 if [[ -d ${x} ]] ; then
366 pushd "${x}" >/dev/null || die
367 autotools-utils_autoreconf
368 popd >/dev/null || die
369 fi
370 done
371}
372
373# @FUNCTION: autotools-utils_src_prepare 295# @FUNCTION: autotools-utils_src_prepare
374# @DESCRIPTION: 296# @DESCRIPTION:
375# The src_prepare function. 297# The src_prepare function.
376# 298#
377# Supporting PATCHES array and user patches. See base.eclass(5) for reference. 299# Supporting PATCHES array and user patches. See base.eclass(5) for reference.

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

  ViewVC Help
Powered by ViewVC 1.1.20