# HG changeset patch # User Akos Ladanyi # Date 2009-05-29 18:46:48 # Node ID 257e91516e09d8d6be58236c587e3e0199770412 # Parent 9c7639f3a741b1f8872e3add2624ada7aa0f3dd5 Set the version to 'hg-tip' if everything fails diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,9 @@ ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE ) + IF(HG_REVISION STREQUAL "") + SET(HG_REVISION "hg-tip") + ENDIF() SET(LEMON_VERSION ${HG_REVISION} CACHE STRING "LEMON version string.") ENDIF() diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -2,14 +2,17 @@ dnl Version information. m4_define([lemon_version_number], - [m4_normalize(esyscmd([echo ${LEMON_VERSION}]))]) + [m4_normalize(esyscmd([echo ${LEMON_VERSION}]))]) dnl m4_define([lemon_version_number], []) m4_define([lemon_hg_path], [m4_normalize(esyscmd([./scripts/chg-len.py]))]) -m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i]))]) +m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i 2> /dev/null]))]) m4_define([lemon_version], [ifelse(lemon_version_number(), - [], - [lemon_hg_path().lemon_hg_revision()], - [lemon_version_number()])]) + [], + [ifelse(lemon_hg_revision(), + [], + [hg-tip], + [lemon_hg_path().lemon_hg_revision()])], + [lemon_version_number()])]) AC_PREREQ([2.59]) AC_INIT([LEMON], [lemon_version()], [lemon-user@lemon.cs.elte.hu], [lemon])