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

Diff of /eclass/autotools.eclass

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

Revision 1.15 Revision 1.16
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 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.15 2005/08/30 11:29:17 flameeyes Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.16 2005/08/31 01:44:02 azarah Exp $
4# 4#
5# Author: Diego Pettenò <flameeyes@gentoo.org> 5# Author: Diego Pettenò <flameeyes@gentoo.org>
6# Enhancements: Martin Schlemmer <azarah@gentoo.org> 6# Enhancements: Martin Schlemmer <azarah@gentoo.org>
7# 7#
8# This eclass is for handling autotooled software packages that 8# This eclass is for handling autotooled software packages that
15#DEPEND="sys-devel/automake 15#DEPEND="sys-devel/automake
16# sys-devel/autoconf 16# sys-devel/autoconf
17# sys-devel/libtool" 17# sys-devel/libtool"
18# 18#
19# Ebuilds should rather depend on the proper version of the tool. 19# Ebuilds should rather depend on the proper version of the tool.
20
21# Variables:
22#
23# AT_M4DIR - Additional director(y|ies) aclocal should include
24# AT_GNUCONF_UPDATE - Should gnuconfig_update() be run (normally handled by
25# econf()) [yes|no]
26
27# XXX: M4DIR should be depreciated
28AT_M4DIR=${AT_M4DIR:-${M4DIR}}
29AT_GNUCONF_UPDATE="no"
20 30
21# Internal function to run an autotools' tool 31# Internal function to run an autotools' tool
22autotools_run_tool() { 32autotools_run_tool() {
23 local STDERR_TARGET="${T}/$$.out" 33 local STDERR_TARGET="${T}/$$.out"
24 local PATCH_TARGET="${T}/$$.patch" 34 local PATCH_TARGET="${T}/$$.patch"
76# without e prefix. 86# without e prefix.
77# They also force installing the support files for safety. 87# They also force installing the support files for safety.
78eaclocal() { 88eaclocal() {
79 local aclocal_opts 89 local aclocal_opts
80 90
81 [[ -n ${M4DIR} ]] && aclocal_opts="-I ${M4DIR}" 91 # XXX: M4DIR should be depreciated
92 AT_M4DIR=${AT_M4DIR:-${M4DIR}}
93
94 if [[ -n ${AT_M4DIR} ]] ; then
95 for x in ${AT_M4DIR} ; do
96 case "${x}" in
97 "-I")
98 # We handle it below
99 ;;
100 "-I"*)
101 # Invalid syntax, but maybe we should help out ...
102 ewarn "eaclocal: Proper syntax is (note the space after '-I'): aclocal -I <dir>"
103 aclocal_opts="${aclocal_opts} -I ${x}"
104 ;;
105 *)
106 [[ ! -d ${x} ]] && ewarn "eaclocal: '${x}' does not exist"
107 aclocal_opts="${aclocal_opts} -I ${x}"
108 ;;
109 esac
110 done
111 fi
82 112
83 [[ -f aclocal.m4 && -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && \ 113 [[ -f aclocal.m4 && -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && \
84 autotools_run_tool aclocal "$@" ${aclocal_opts} 114 autotools_run_tool aclocal "$@" ${aclocal_opts}
85} 115}
86 116
117 autotools_run_tool automake --add-missing --copy "$@" 147 autotools_run_tool automake --add-missing --copy "$@"
118} 148}
119 149
120# This function mimes the behavior of autoreconf, but uses the different 150# This function mimes the behavior of autoreconf, but uses the different
121# eauto* functions to run the tools. It doesn't accept parameters, but 151# eauto* functions to run the tools. It doesn't accept parameters, but
122# the directory with include files can be specified with M4DIR variable. 152# the directory with include files can be specified with AT_M4DIR variable.
123# 153#
124# Note: doesn't run autopoint right now, but runs gnuconfig_update. 154# Note: doesn't run autopoint right now, but runs gnuconfig_update.
125eautoreconf() { 155eautoreconf() {
126 local pwd=$(pwd) x 156 local pwd=$(pwd) x
127 157
137 eaclocal 167 eaclocal
138 _elibtoolize --copy --force 168 _elibtoolize --copy --force
139 eautoconf 169 eautoconf
140 eautoheader 170 eautoheader
141 eautomake 171 eautomake
142 gnuconfig_update 172
173 # Normally run by econf()
174 [[ ${AT_GNUCONF_UPDATE} == "yes" ]] && gnuconfig_update
143} 175}

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.20