summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2014-01-07 14:16:34 +1300
committerGary V. Vaughan <gary@gnu.org>2014-01-07 14:23:06 +1300
commit5e5cf7a7d67a1af4752bf442a42a5a77dccacd3e (patch)
treecb2c02edc2f0415f9c14ee40233c033047439467
parent1f14273e954361bde44143458098acd9723e54a2 (diff)
downloadlibtool-5e5cf7a7d67a1af4752bf442a42a5a77dccacd3e.tar.gz
bootstrap: specify particular version in buildreq with =x.y.
* gl/build-aux/bootstrap.in (func_check_versions): If the version number begins with '=' then it must match the installed version of the named tool exactly. * gl/doc/bootstrap.texi (buildreq): Document the '=vernum' feature. * bootstrap: Regenerate. Signed-off-by: Gary V. Vaughan <gary@gnu.org>
-rwxr-xr-xbootstrap26
-rwxr-xr-xgl/build-aux/bootstrap.in26
-rwxr-xr-xgl/doc/bootstrap.texi5
3 files changed, 45 insertions, 12 deletions
diff --git a/bootstrap b/bootstrap
index b5b6730c..4ca10e45 100755
--- a/bootstrap
+++ b/bootstrap
@@ -4805,9 +4805,6 @@ delimited list of triples; 'program min-version url'."
else
_G_instver=`func_get_version $_G_app`
- test -z "$_G_instver" \
- || func_verbose "found '$_G_app' version $_G_instver."
-
# Fail if --version didn't work.
if test -z "$_G_instver"; then
func_error "Prerequisite '$_G_app' not found. Please install it, or
@@ -4816,12 +4813,29 @@ delimited list of triples; 'program min-version url'."
# Fail if a newer version than what we have is required.
else
- func_lt_ver "$_G_reqver" "$_G_instver" || {
- func_error "\
+ func_verbose "found '$_G_app' version $_G_instver."
+
+ case $_G_reqver in
+ =*)
+ # If $buildreq version starts with '=', version must
+ # match the installed program exactly.
+ test "x$_G_reqver" = "x=$_G_instver" || {
+ func_error "\
+ '$_G_app' version == $_G_instver is too old
+ 'exactly $_G_app-$_G_reqver is required"
+ func_check_versions_result=false
+ }
+ ;;
+ *)
+ # Otherwise, anything that is not older is a match.
+ func_lt_ver "$_G_reqver" "$_G_instver" || {
+ func_error "\
'$_G_app' version == $_G_instver is too old
'$_G_app' version >= $_G_reqver is required"
func_check_versions_result=false
- }
+ }
+ ;;
+ esac
fi
fi
done
diff --git a/gl/build-aux/bootstrap.in b/gl/build-aux/bootstrap.in
index 7fc0c129..71ff3aef 100755
--- a/gl/build-aux/bootstrap.in
+++ b/gl/build-aux/bootstrap.in
@@ -2474,9 +2474,6 @@ delimited list of triples; 'program min-version url'."
else
_G_instver=`func_get_version $_G_app`
- test -z "$_G_instver" \
- || func_verbose "found '$_G_app' version $_G_instver."
-
# Fail if --version didn't work.
if test -z "$_G_instver"; then
func_error "Prerequisite '$_G_app' not found. Please install it, or
@@ -2485,12 +2482,29 @@ delimited list of triples; 'program min-version url'."
# Fail if a newer version than what we have is required.
else
- func_lt_ver "$_G_reqver" "$_G_instver" || {
- func_error "\
+ func_verbose "found '$_G_app' version $_G_instver."
+
+ case $_G_reqver in
+ =*)
+ # If $buildreq version starts with '=', version must
+ # match the installed program exactly.
+ test "x$_G_reqver" = "x=$_G_instver" || {
+ func_error "\
+ '$_G_app' version == $_G_instver is too old
+ 'exactly $_G_app-$_G_reqver is required"
+ func_check_versions_result=false
+ }
+ ;;
+ *)
+ # Otherwise, anything that is not older is a match.
+ func_lt_ver "$_G_reqver" "$_G_instver" || {
+ func_error "\
'$_G_app' version == $_G_instver is too old
'$_G_app' version >= $_G_reqver is required"
func_check_versions_result=false
- }
+ }
+ ;;
+ esac
fi
fi
done
diff --git a/gl/doc/bootstrap.texi b/gl/doc/bootstrap.texi
index a4579313..2f7b3822 100755
--- a/gl/doc/bootstrap.texi
+++ b/gl/doc/bootstrap.texi
@@ -82,6 +82,11 @@ requirement for Autobuild is added automatically, and finally if there
are any diff files under @code{local_gl_dir}, then a versionless
requirement for patch is also added.
+When there are backwards incompatibilities in a newer build-tool
+release, you can pin the version requirement for your program by
+prefixing the version number field in buildreq with a single '='
+character (no spaces).
+
When @command{bootstrap} is invoked, it will check that all the listed
and automatically added tools are available at the given minimum version,
or else bail out with a diagnostic.