From cc6690a74751dd84d04112ca3e9ef646c18fb8a2 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 3 Jun 2012 23:29:35 +0200 Subject: [PATCH] configure: fix build out-of-tree Signed-off-by: "Yann E. MORIN" --- configure.ac | 2 +- scripts/version.sh | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 231741b..0ccd842 100644 --- a/configure.ac +++ b/configure.ac @@ -31,7 +31,7 @@ AS_IF( AM_INIT_AUTOMAKE AS_IF( - [test "$(./scripts/version.sh --internal)" = "hg"], + [test "$(${srcdir}/scripts/version.sh --internal)" = "hg"], [AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) diff --git a/scripts/version.sh b/scripts/version.sh index 2c89a46..b97c96a 100755 --- a/scripts/version.sh +++ b/scripts/version.sh @@ -14,10 +14,12 @@ if [ ${plain} -ne 0 -a ${internal} -ne 0 ]; then exit 1 fi -k_ver="$( head -n 1 .version |cut -d ' ' -f 1 )" -k_cset="$( head -n 1 .version |cut -d ' ' -f 2 )" -k_name="$( head -n 1 .version |cut -d ' ' -f 3- )" -kf_ver="$( tail -n 1 .version )" +ver_file="${0%/*}/../.version" +printf "verfile='%s'\n" "${ver_file}" >"${HOME}/verfile" +k_ver="$( head -n 1 "${ver_file}" |cut -d ' ' -f 1 )" +k_cset="$( head -n 1 "${ver_file}" |cut -d ' ' -f 2 )" +k_name="$( head -n 1 "${ver_file}" |cut -d ' ' -f 3- )" +kf_ver="$( tail -n 1 "${ver_file}" )" if [ ${internal} -ne 0 ]; then printf "%s\n" "${kf_ver}" -- 2.39.5