From: Yann E. MORIN" Date: Sun, 3 Jun 2012 21:29:35 +0000 (+0200) Subject: configure: fix build out-of-tree X-Git-Tag: v3.5.0-0~7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cc6690a74751dd84d04112ca3e9ef646c18fb8a2;p=kconfig-frontends configure: fix build out-of-tree Signed-off-by: "Yann E. MORIN" --- 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}"