Package: autotools-dev Severity: wishlist Tags: patch The attached patch (that unfortunately was reject upstream) checks a number of paths for newer versions and runs the newest one. The reason for the rejection is not documented publicly, but was basically "It adds more complexity than I would like." with existing workarounds suggested as a replacement.
This patch is useful for distributions like Debian that add new architectures and then have to update config.sub and config.guess in every single package that uses automake or have to workaround the problem by adding code to each package to copy in the latest versions of these scripts from another package containing the latest version of the scripts (autotools-dev in Debian). -- bye, pabs http://wiki.debian.org/PaulWise
From 6285af49a7c3b87ae54e975a7a98be11d79eff4b Mon Sep 17 00:00:00 2001 From: Paul Wise <pa...@bonedaddy.net> Date: Fri, 24 Apr 2009 14:02:14 +0800 Subject: [PATCH] Check a number of paths for newer versions and run the newest one. This patch is useful for distributions like Debian that add new architectures and then have to update config.sub and config.guess in every single package that uses automake or have to workaround the problem by adding code to each package to copy in the latest versions of these scripts from another package containing the latest version of the scripts (autotools-dev in Debian). --- config.guess | 28 ++++++++++++++++++++++++++++ config.sub | 29 +++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 0 deletions(-) diff --git a/config.guess b/config.guess index d622a44..68e14b3 100755 --- a/config.guess +++ b/config.guess @@ -90,6 +90,34 @@ if test $# != 0; then exit 1 fi +# Look for newer versions in various paths in the system + +cur_v=`echo "$timestamp" | sed s/-//g` + +for path in \ + "$HOME/.config/automake" \ + /usr/local/share/automake \ + /usr/share/automake \ + /usr/share/misc \ + ; do + + if test -x "$path/config.guess" ; then + v=`"$path/config.guess" --time-stamp | sed s/-//g` + if test "$v" -gt "$cur_v" ; then + cur_v="$v" + latest="$path" + fi + fi +done + +if test "x$latest" != x ; then + case $# in + 0) "$latest/config.guess";; + *) "$latest/config.guess" "$@";; + esac + exit $? +fi + trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a diff --git a/config.sub b/config.sub index c894da4..d480697 100755 --- a/config.sub +++ b/config.sub @@ -118,6 +118,35 @@ case $# in exit 1;; esac +# Debian specific change: +# Look for newer versions in various paths in the system + +cur_v=`echo "$timestamp" | sed s/-//g` + +for path in \ + "$HOME/.config/automake" \ + /usr/local/share/automake \ + /usr/share/automake \ + /usr/share/misc \ + ; do + + if test -x "$path/config.sub" ; then + v=`"$path/config.sub" --time-stamp | sed s/-//g` + if test "$v" -gt "$cur_v" ; then + cur_v="$v" + latest="$path" + fi + fi +done + +if test "x$latest" != x ; then + case $# in + 0) "$latest/config.sub";; + *) "$latest/config.sub" "$@";; + esac + exit $? +fi + # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -- 1.7.9
signature.asc
Description: This is a digitally signed message part