On Mon, Aug 15, 2011 at 9:35 AM, Spencer Oliver <s...@spen-soft.co.uk> wrote: > On 15 August 2011 14:22, Eric Wetzel <thewet...@gmail.com> wrote: >> if test $cross_compiling = no; then >> # guess-rev.sh only exists in the repository, not in the released archives >> AC_CHECK_FILE("$srcdir/guess-rev.sh", has_guess_rev=yes, has_guess_rev=no) >> >> We automatically assume that if we are cross-compiling that we are >> building a release. This section was last modified in July 2009, back >> in the SVN days, but the commit is here: >> http://repo.or.cz/w/openocd.git/commitdiff/00fad24996d6642c6a820cc951c197dddef5734a >> Actually it was introduced earlier
http://repo.or.cz/w/openocd.git/commit/64e53c4fd8a5da944de57716b137a7dff5e67b63 This patch should fix it. Please review and merge if it's OK. Thank you! Jie
From 281bc87c50fd108d43283b07ac1d3900767aba00 Mon Sep 17 00:00:00 2001 From: Jie Zhang <jie.zh...@analog.com> Date: Mon, 15 Aug 2011 10:52:11 -0400 Subject: [PATCH] show git commit number even when cross-compiling AC_CHECK_FILE will die when cross-compiling. So don't use it to test the existence of guess-rev.sh. --- configure.in | 16 +++++----------- 1 files changed, 5 insertions(+), 11 deletions(-) diff --git a/configure.in b/configure.in index dfa1e8f..3c0056c 100644 --- a/configure.in +++ b/configure.in @@ -143,20 +143,14 @@ is_mingw=no is_win32=no is_darwin=no -if test $cross_compiling = no; then - # guess-rev.sh only exists in the repository, not in the released archives - AC_CHECK_FILE("$srcdir/guess-rev.sh", has_guess_rev=yes, has_guess_rev=no) - - AC_MSG_CHECKING([whether to build a release]) - if test $has_guess_rev = no; then - build_release=yes - else - build_release=no - fi - AC_MSG_RESULT($build_release) +# guess-rev.sh only exists in the repository, not in the released archives +AC_MSG_CHECKING([whether to build a release]) +if test -f $srcdir/guess-rev.sh ; then + build_release=no else build_release=yes fi +AC_MSG_RESULT($build_release) # We are not *ALWAYS* being installed in the standard place. # We may be installed in a "tool-build" specific location. -- 1.7.5.4
_______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development