Skip to content

Generate CFG_FILENAME_EXTRA from the version #25208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 14, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ probe() {
T=$(command -v $P 2>&1)
if [ $? -eq 0 ]
then
VER0=$($P --version 2>/dev/null | head -1 \
| sed -e 's/[^0-9]*\([vV]\?[0-9.]\+[^ ]*\).*/\1/' )
VER0=$($P --version 2>/dev/null \
| grep -o '[vV]\?[0-9][0-9.][a-z0-9.-]*' | head -1 )
if [ $? -eq 0 -a "x${VER0}" != "x" ]
then
VER="($VER0)"
Expand Down Expand Up @@ -709,6 +709,20 @@ else
probe_need CFG_GIT git
fi

# Use `md5sum` on GNU platforms, or `md5 -q` on BSD
probe CFG_MD5 md5
probe CFG_MD5SUM md5sum
if [ -n "$CFG_MD5" ]
then
CFG_HASH_COMMAND="$CFG_MD5 -q | head -c 8"
elif [ -n "$CFG_MD5SUM" ]
then
CFG_HASH_COMMAND="$CFG_MD5SUM | head -c 8"
else
err 'could not find one of: md5 md5sum'
fi
putvar CFG_HASH_COMMAND

probe CFG_CLANG clang++
probe CFG_CCACHE ccache
probe CFG_GCC gcc
Expand Down
4 changes: 3 additions & 1 deletion mk/main.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ CFG_RELEASE_NUM=1.1.0
# versions (section 9)
CFG_PRERELEASE_VERSION=.1

CFG_FILENAME_EXTRA=4e7c5e5c
# Append a version-dependent hash to each library, so we can install different
# versions in the same place
CFG_FILENAME_EXTRA=$(shell printf '%s' $(CFG_RELEASE) | $(CFG_HASH_COMMAND))

ifeq ($(CFG_RELEASE_CHANNEL),stable)
# This is the normal semver version string, e.g. "0.12.0", "0.12.0-nightly"
Expand Down