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

Contents of /eclass/gnuconfig.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Fri Oct 25 17:16:07 2002 UTC (12 years, 1 month ago) by wwoods
Branch: MAIN
New eclass to update old config.guess and config.sub

1 #!/bin/bash
2 # Copyright 1999-2002 Gentoo Technologies, Inc.
3 # Distributed under the terms of the GNU General Public License, v2 or later
4 # Author: Will Woods <wwoods@gentoo.org>
5 # $Header$
6 # This eclass updates config.guess and config.sub. This is useful if
7 # configure dies from misguessing your canonical system name (CHOST).
8
9 ECLASS=gnuconfig
10 INHERITED="$INHERITED $ECLASS"
11
12 newdepend sys-devel/automake
13
14 DESCRIPTION="Based on the ${ECLASS} eclass"
15
16 # Copy the newest available config.{guess|sub} on the system over any old
17 # ones in the source dir
18 gnuconfig_update() {
19 local configsubs_dir="$(gnuconfig_findnewest)"
20 local sub
21 local f
22 einfo "Using GNU config files from ${configsubs_dir}"
23 for sub in config.sub config.guess ; do
24 for f in `find ${S} -name "${sub}"`; do
25 einfo "Updating ${f/$S\//}"
26 cp -f ${configsubs_dir}/${sub} ${f}
27 done
28 done
29 }
30
31 # this searches the standard locations for the newest config.{sub|guess}, and
32 # returns the directory where they can be found.
33 gnuconfig_findnewest() {
34 local locations="/usr/share/automake-1.6/config.sub \
35 /usr/share/automake-1.5/config.sub \
36 /usr/share/automake-1.4/config.sub \
37 /usr/share/libtool/config.sub"
38 grep -s '^timestamp' ${locations} | sort -n -t\' -k2 | tail -1 | sed 's,/config.sub:.*$,,'
39 }

  ViewVC Help
Powered by ViewVC 1.1.20