aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-01-17 23:06:02 +0100
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-01-17 23:06:02 +0100
commite497ddd14a044f328c2fad8c962534aa7a10dff6 (patch)
tree836f41063a7552df3ef3bdd2df2d3e41016dcfe7
parent2a5d4242886f124b08fe022e2fe416c35ac2ec95 (diff)
downloadcrosstool-ng-e497ddd14a044f328c2fad8c962534aa7a10dff6.tar.gz
crosstool-ng-e497ddd14a044f328c2fad8c962534aa7a10dff6.tar.bz2
crosstool-ng-e497ddd14a044f328c2fad8c962534aa7a10dff6.zip
configure: do not require hg when configuring in an hg clone
When configuring in an hg clone, we need hg to compute the version string. It can happen that users do not have Mercurial (eg. if they got a snapshot rather that they did a full clone). In this case, we can still run, of course, so simply fill the version string with a sufficiently explicit value, that does not require hg. The date is a good candidate.
-rwxr-xr-xconfigure7
1 files changed, 3 insertions, 4 deletions
diff --git a/configure b/configure
index c7768c4c..e02b6520 100755
--- a/configure
+++ b/configure
@@ -383,11 +383,10 @@ has_or_abort lib="${ncurses_libs}" \
# If this version is n hg clone, try to get the revision number
# If we can't get the revision number, use date
+printf "Computing version string... "
case "${VERSION}" in
*+hg|hg)
- has_or_abort prog=hg
- printf "Computing version string... "
- REVISION="$( hg id -n 2>/dev/null )"
+ REVISION="$( hg id -n 2>/dev/null || true )"
case "${REVISION}" in
"")
VERSION="${VERSION}_unknown@$( date +%Y%m%d.%H%M%S )";;
@@ -400,7 +399,7 @@ case "${VERSION}" in
VERSION="$( printf "${VERSION}\n" |"${sed}" -r -e 's|/+|_|g;' )"
;;
esac
-echo "${VERSION}"
+printf "${VERSION}\n"
#---------------------------------------------------------------------
# Compute and check install paths