aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2017-05-03 10:07:39 -0700
committerJason Evans <jasone@canonware.com>2017-05-03 10:45:43 -0700
commit31baedbbb9d1701b13312415b59d2b6240bb18e4 (patch)
treef17d6ab3f75e15964bd16b419bc254519af08c20
parent0798fe6e7056a2eb571dde06927e87635dd2e74c (diff)
downloadplatform_external_jemalloc_new-31baedbbb9d1701b13312415b59d2b6240bb18e4.tar.gz
platform_external_jemalloc_new-31baedbbb9d1701b13312415b59d2b6240bb18e4.tar.bz2
platform_external_jemalloc_new-31baedbbb9d1701b13312415b59d2b6240bb18e4.zip
Add --with-version=VERSION .
This simplifies configuration when embedding a jemalloc release into another project's git repository. This resolves #811.
-rw-r--r--INSTALL17
-rw-r--r--configure.ac10
2 files changed, 21 insertions, 6 deletions
diff --git a/INSTALL b/INSTALL
index abf3290b..125cad2b 100644
--- a/INSTALL
+++ b/INSTALL
@@ -35,9 +35,20 @@ any of the following arguments (not a definitive list) to 'configure':
will cause files to be installed into /usr/local/include, /usr/local/lib,
and /usr/local/man.
---with-version=<major>.<minor>.<bugfix>-<nrev>-g<gid>
- Use the specified version string rather than trying to generate one (if in
- a git repository) or use existing the VERSION file (if present).
+--with-version=(<major>.<minor>.<bugfix>-<nrev>-g<gid>|VERSION)
+ The VERSION file is mandatory for successful configuration, and the
+ following steps are taken to assure its presence:
+ 1) If --with-version=<major>.<minor>.<bugfix>-<nrev>-g<gid> is specified,
+ generate VERSION using the specified value.
+ 2) If --with-version is not specified in either form and the source
+ directory is inside a git repository, try to generate VERSION via 'git
+ describe' invocations that pattern-match release tags.
+ 3) If VERSION is missing, generate it with a bogus version:
+ 0.0.0-0-g0000000000000000000000000000000000000000
+
+ Note that --with-version=VERSION bypasses (1) and (2), which simplifies
+ VERSION configuration when embedding a jemalloc release into another
+ project's git repository.
--with-rpath=<colon-separated-rpath>
Embed one or more library paths, so that libjemalloc can find the libraries
diff --git a/configure.ac b/configure.ac
index 462f509f..7ffdbea8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1349,10 +1349,14 @@ AC_ARG_WITH([version],
[Version string])],
[
echo "${with_version}" | grep ['^[0-9]\+\.[0-9]\+\.[0-9]\+-[0-9]\+-g[0-9a-f]\+$'] 2>&1 1>/dev/null
- if test $? -ne 0 ; then
- AC_MSG_ERROR([${with_version} does not match <major>.<minor>.<bugfix>-<nrev>-g<gid>])
+ if test $? -eq 0 ; then
+ echo "$with_version" > "${objroot}VERSION"
+ else
+ echo "${with_version}" | grep ['^VERSION$'] 2>&1 1>/dev/null
+ if test $? -ne 0 ; then
+ AC_MSG_ERROR([${with_version} does not match <major>.<minor>.<bugfix>-<nrev>-g<gid> or VERSION])
+ fi
fi
- echo "$with_version" > "${objroot}VERSION"
], [
dnl Set VERSION if source directory is inside a git repository.
if test "x`test ! \"${srcroot}\" && cd \"${srcroot}\"; git rev-parse --is-inside-work-tree 2>/dev/null`" = "xtrue" ; then