Set the version to 'hg-tip' if everything fails
authorAkos Ladanyi <ladanyi@tmit.bme.hu>
Fri, 29 May 2009 17:46:48 +0100
changeset 680257e91516e09
parent 679 9c7639f3a741
child 681 532697c9fa53
child 684 7b1a6e963018
child 688 1f08e846df29
child 716 f47b6c94577e
child 727 cab85bd7859b
Set the version to 'hg-tip' if everything fails
CMakeLists.txt
configure.ac
     1.1 --- a/CMakeLists.txt	Fri May 29 12:44:37 2009 +0100
     1.2 +++ b/CMakeLists.txt	Fri May 29 17:46:48 2009 +0100
     1.3 @@ -15,6 +15,9 @@
     1.4      ERROR_QUIET
     1.5      OUTPUT_STRIP_TRAILING_WHITESPACE
     1.6    )
     1.7 +  IF(HG_REVISION STREQUAL "")
     1.8 +    SET(HG_REVISION "hg-tip")
     1.9 +  ENDIF()
    1.10    SET(LEMON_VERSION ${HG_REVISION} CACHE STRING "LEMON version string.")
    1.11  ENDIF()
    1.12  
     2.1 --- a/configure.ac	Fri May 29 12:44:37 2009 +0100
     2.2 +++ b/configure.ac	Fri May 29 17:46:48 2009 +0100
     2.3 @@ -2,14 +2,17 @@
     2.4  
     2.5  dnl Version information.
     2.6  m4_define([lemon_version_number],
     2.7 -	[m4_normalize(esyscmd([echo ${LEMON_VERSION}]))])
     2.8 +          [m4_normalize(esyscmd([echo ${LEMON_VERSION}]))])
     2.9  dnl m4_define([lemon_version_number], [])
    2.10  m4_define([lemon_hg_path], [m4_normalize(esyscmd([./scripts/chg-len.py]))])
    2.11 -m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i]))])
    2.12 +m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i 2> /dev/null]))])
    2.13  m4_define([lemon_version], [ifelse(lemon_version_number(),
    2.14 -			   [],
    2.15 -			   [lemon_hg_path().lemon_hg_revision()],
    2.16 -			   [lemon_version_number()])])
    2.17 +                           [],
    2.18 +                           [ifelse(lemon_hg_revision(),
    2.19 +                           [],
    2.20 +                           [hg-tip],
    2.21 +                           [lemon_hg_path().lemon_hg_revision()])],
    2.22 +                           [lemon_version_number()])])
    2.23  
    2.24  AC_PREREQ([2.59])
    2.25  AC_INIT([LEMON], [lemon_version()], [lemon-user@lemon.cs.elte.hu], [lemon])