configure: fix build out-of-tree

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
This commit is contained in:
Yann E. MORIN" 2012-06-03 23:29:35 +02:00
parent 94e9de8944
commit cc6690a747
2 changed files with 7 additions and 5 deletions

View File

@ -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])])

View File

@ -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}"