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

Contents of /eclass/autotools.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (hide annotations) (download)
Sun Aug 28 17:23:48 2005 UTC (9 years, 1 month ago) by azarah
Branch: MAIN
Changes since 1.10: +70 -195 lines
Initial commit; eclass done by Diego Flameeyes Pettenò <flameeyes@gentoo.org>.

1 azarah 1.11 # Copyright 1999-2005 Gentoo Foundation
2 vapier 1.6 # Distributed under the terms of the GNU General Public License v2
3 azarah 1.11 # $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.194 2005/08/09 22:40:39 vapier Exp $
4 vapier 1.7 #
5 azarah 1.11 # Author: Diego Pettenò <flameeyes@gentoo.org>
6 vapier 1.7 #
7 azarah 1.11 # This eclass is for handling autotooled software packages that
8     # needs to regenerate their build scripts.
9 azarah 1.1 #
10 azarah 1.11 # NB: If you add anything, please comment it!
11 azarah 1.1
12 azarah 1.11 inherit eutils gnuconfig
13    
14     DELEND="sys-devel/automake
15     sys-devel/autoconf
16     sys-devel/libtool"
17    
18     # Internal function to run an autotools' tool
19     autotools_run_tool() {
20     local STDERR_TARGET="${T}/$$.out"
21     local PATCH_TARGET="${T}/$$.patch"
22     local ris
23    
24     echo "***** $1 *****" > ${STDERR_TARGET%/*}/$1-${STDERR_TARGET##*/}
25     echo >> ${STDERR_TARGET%/*}/$1-${STDERR_TARGET##*/}
26    
27     ebegin "Running $1"
28     $@ >> ${STDERR_TARGET%/*}/$1-${STDERR_TARGET##*/} 2>&1
29     ris=$?
30     eend $ris
31    
32     if [[ $ris != 0 ]]; then
33     echo
34     eerror "Failed Running $1 !"
35     eerror
36     eerror "Include in your bugreport the contents of:"
37     eerror
38     eerror " ${STDERR_TARGET%/*}/$1-${STDERR_TARGET##*/}"
39     echo
40     die "Failed Running $1 !"
41     fi
42     }
43 azarah 1.1
44 azarah 1.11 # These functions runs the autotools using autotools_run_tool with the
45     # specified parametes. The name of the tool run is the same of the function
46     # without e prefix.
47     # They also force installing the support files for safety.
48     eaclocal() {
49     autotools_run_tool aclocal "$@"
50     }
51 azarah 1.1
52 azarah 1.11 eautoheader() {
53     autotools_run_tool autoheader "$@"
54     }
55 azarah 1.1
56 azarah 1.11 eautoconf() {
57     autotools_run_tool autoconf "$@"
58     }
59 azarah 1.1
60 azarah 1.11 eautomake() {
61     autotools_run_tool automake --add-missing --force-missing --copy "$@"
62 azarah 1.1 }
63    
64 azarah 1.11 # This function mimes the behavior of autoreconf, but uses the different
65     # eauto* functions to run the tools. It doesn't accept parameters, but
66     # the directory with include files can be specified with M4DIR variable.
67     #
68     # Note: doesn't run autopoint right now, but runs gnuconfig_update.
69     eautoreconf() {
70     local aclocal_opts
71    
72     [[ -n ${M4DIR} ]] && aclocal_opts="-I ${M4DIR}"
73    
74     eaclocal $aclocal_opts
75     eautoconf
76     eautoheader
77     eautomake
78     gnuconfig_update
79    
80     autotools_run_tool libtoolize --copy --force
81     }

  ViewVC Help
Powered by ViewVC 1.1.20