mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-21 05:43:09 +00:00
[configure] Use hg to compute the version string
Now that we have migrated to hg from svn, it does not make sense to keep using svn tools to compute the version string, so switch to using mercurial tools (that are much more flexible, BTW).
This commit is contained in:
parent
a393a72f5f
commit
221701baf7
18
configure
vendored
18
configure
vendored
@ -364,23 +364,15 @@ has_or_abort lib="${ncurses_libs}" \
|
|||||||
# If this version is a svn snapshot, try to get the revision number
|
# If this version is a svn snapshot, try to get the revision number
|
||||||
# If we can't get the revision number, use date
|
# If we can't get the revision number, use date
|
||||||
case "${VERSION}" in
|
case "${VERSION}" in
|
||||||
*+svn|svn)
|
*+hg|hg)
|
||||||
has_or_abort prog=svnversion
|
has_or_abort prog=hg
|
||||||
printf "Computing version string... "
|
printf "Computing version string... "
|
||||||
REVISION="$( LC_ALL=C svnversion )"
|
REVISION="$( hg id -n 2>/dev/null )"
|
||||||
case "${REVISION}" in
|
case "${REVISION}" in
|
||||||
exported)
|
"")
|
||||||
VERSION="${VERSION}_unknown@$( date +%Y%m%d.%H%M%S )";;
|
VERSION="${VERSION}_unknown@$( date +%Y%m%d.%H%M%S )";;
|
||||||
*)
|
*)
|
||||||
URL="$( LC_ALL=C svn info 2>/dev/null \
|
VERSION="${VERSION}:$( hg id -b )@${REVISION%%+}:$( hg id -i )"
|
||||||
|egrep 'URL: ' \
|
|
||||||
|cut -d ' ' -f 2- \
|
|
||||||
)"
|
|
||||||
ROOT="$( LC_ALL=C svn info 2>/dev/null \
|
|
||||||
|"${grep}" '^Repository Root: ' \
|
|
||||||
|cut -d ' ' -f 3- \
|
|
||||||
)"
|
|
||||||
VERSION="${VERSION}${URL#${ROOT}}@${REVISION}"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
# Arrange to have no / in the directory name, no need to create an
|
# Arrange to have no / in the directory name, no need to create an
|
||||||
|
Loading…
Reference in New Issue
Block a user