Changeset 1362


Ignore:
Timestamp:
Jul 21, 2009 1:52:15 PM (10 years ago)
Author:
tkr
Message:

Merging changes related to setting version info

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/coin.m4

    r1324 r1362  
    309309# that we are in a project main directory
    310310coin_projectdir=yes
     311
     312# Check if a library version is set for libtool
     313m4_ifvaln([$1],[coin_libversion=$1],[])
    311314]) # AC_COIN_PROJECTDIR_INIT
    312315
     
    18351838# to comile DLLs under Windows.
    18361839LT_LDFLAGS=
     1840
     1841# Check if we want to set the library version
     1842AC_MSG_CHECKING([if library version is set])
     1843if test x"$coin_libversion" != x; then
     1844  LT_LDFLAGS="$LT_LDFLAGS -version-info $coin_libversion"
     1845  AC_MSG_RESULT([$coin_libversion])
     1846else
     1847  AC_MSG_RESULT([no])
     1848fi
     1849
    18371850AC_SUBST(LT_LDFLAGS)
    18381851
  • trunk/prepare_new_release

    r1303 r1362  
    1212#       Accommodate simultaneous creation of releases with circular
    1313#       dependencies.
     14# Modified: Ted Ralphs         Lehigh University 2009-07-10
     15#       Set libtool version info automatically
    1416
    1517#set -x -v
     
    3032# nomenclature.
    3133
    32 determine_release ()
     34#Determine revision number (patch release number--third digit in release
     35# version number
     36
     37determine_revision ()
    3338{
    3439  if test $isData = no ; then
     
    3641    drtmp_stableBranch=`echo $1 | sed -e 's|.*/stable/||'`
    3742    drtmp_baseURL=`echo $1 | sed -e 's|/stable/[0-9.]*||'`
    38     drtmp_returnVal=
    3943
    4044    # List the existing releases and screen for releases matching stableBranch.
     
    5660    if test -z "$drtmp_release_vers" ; then
    5761      if test $2 = 1 ; then
    58         drtmp_returnVal="$drtmp_stableBranch.0"
     62        drtmp_revision=0
    5963      else
    60         drtmp_returnVal="Error"
     64        drtmp_revision="Error"
    6165      fi
    6266    else
     
    6468    # There are releases. If we don't have one after the loop, we're confused.
    6569
    66       drtmp_new_rel=-10000
     70      drtmp_revision=-10000
    6771      for drtmp_i in $drtmp_release_vers; do
    68         drtmp_rel=`echo $drtmp_i | sed -e "s|^$drtmp_stableBranch.||"`
    69         if test $drtmp_rel -gt $drtmp_new_rel; then
    70           drtmp_new_rel=$drtmp_rel
     72        drtmp_old_revision=`echo $drtmp_i | sed -e "s|^$drtmp_stableBranch.||"`
     73        if test $drtmp_old_revision -gt $drtmp_revision; then
     74          drtmp_revision=$drtmp_old_revision
    7175        fi
    7276      done
    7377
    74       if test $drtmp_new_rel = -10000; then
    75         drtmp_new_rel="Error"
     78      if test $drtmp_revision = -10000; then
     79        drtmp_revision="Error"
    7680      elif test $2 = 1 ; then
    77         drtmp_new_rel=`expr $drtmp_new_rel + 1`
     81        drtmp_revision=`expr $drtmp_revision + 1`
    7882      fi
    79       drtmp_returnVal="$drtmp_stableBranch.$drtmp_new_rel"
    8083    fi
     84   
     85    # determine current and age for the purposes of libtool versioning
    8186
    8287  else  # end normal and ThirdParty, begin Data
     
    107112    if test -z "$drtmp_release_vers" ; then
    108113      if test $2 = 1 ; then
    109         drtmp_returnVal="$drtmp_stableBranch.0"
     114        drtmp_revision=0
    110115      else
    111         drtmp_returnVal="Error"
     116        drtmp_revision="Error"
    112117      fi
    113118    else
     
    140145      if test -z "$drtmp_release_vers" ; then
    141146        if test $2 = 0 ; then
    142           drtmp_returnVal="$drtmp_stableBranch.Error"
     147          drtmp_revision="Error"
    143148        else
    144           drtmp_returnVal="$drtmp_stableBranch.0"
     149          drtmp_revision=0
    145150        fi
    146151      else
    147         drtmp_new_rel=-10000
     152        drtmp_revision=-10000
    148153        for drtmp_i in $drtmp_release_vers; do
    149           drtmp_rel=`echo $drtmp_i | sed -e "s|^$drtmp_stableBranch.||"`
    150           if test $drtmp_rel -gt $drtmp_new_rel; then
    151             drtmp_new_rel=$drtmp_rel
     154          drtmp_old_revision=`echo $drtmp_i | sed -e "s|^$drtmp_stableBranch.||"`
     155          if test $drtmp_old_revision -gt $drtmp_revision; then
     156            drtmp_revision=$drtmp_old_revision
    152157          fi
    153158        done
    154         drtmp_new_rel=`expr $drtmp_new_rel + 1`
    155         drtmp_returnVal="$drtmp_stableBranch.$drtmp_new_rel"
     159        drtmp_revision=`expr $drtmp_revision + 1`
    156160      fi
    157161
     
    160164  fi    # for normal/Data
    161165
    162   echo $drtmp_returnVal
     166  echo $drtmp_revision
    163167}
    164168
     169# Determine current (the total number of stable releases over all time)
     170
     171determine_current ()
     172{
     173  if test $isData = no ; then
     174
     175    dctmp_stableBranch=`echo $1 | sed -e 's|.*/stable/||'`
     176    dctmp_baseURL=`echo $1 | sed -e 's|/stable/[0-9.]*||'`
     177
     178    dctmp_current=`svn list $dctmp_baseURL/stable | wc -w`
     179
     180  else
     181
     182    dctmp_current=0
     183
     184  fi
     185
     186  echo $dctmp_current
     187}
     188
     189# Determine age (the number of backwards compatible stable releases (second
     190# number in stable version)
     191
     192determine_age ()
     193{
     194  if test $isData = no ; then
     195
     196    datmp_stableBranch=`echo $1 | sed -e 's|.*/stable/||'`
     197    datmp_baseURL=`echo $1 | sed -e 's|/stable/[0-9.]*||'`
     198
     199    datmp_age=`echo $datmp_stableBranch | sed -e 's|[0-9].||'`
     200
     201  else
     202
     203    datmp_age=0
     204
     205  fi
     206
     207  echo $datmp_age
     208}
    165209
    166210# Specify the COIN URL base for convenience.
     
    392436echo "===> Checking releases for stable branch $stableBranch ..."
    393437
    394 new_ver=`determine_release "$stableURL" 1`
    395 
    396 echo ''
     438echo $stableURL
     439new_current=`determine_current "$stableURL" 1`
     440new_revision=`determine_revision "$stableURL" 1`
     441new_age=`determine_age "$stableURL" 1`
     442new_ver="$stableBranch.$new_revision"
     443
     444echo ''
     445echo "New current.......: $new_current"
     446echo "New revision......: $new_revision"
     447echo "New age...........: $new_age"
    397448echo "New release.......: $new_ver"
    398449buildBase="${stableProj}-$new_ver"
     
    454505
    455506echo ''
    456 echo "===> Updating version number ($new_ver) in configure.ac files"
     507echo "===> Updating version numbers in configure.ac files"
    457508for i in $conf_ac_files; do
    458509  sed -e "s|AC_INIT\(.*\)\[[0-9A-Za-z\.]*\],\(.*\)|AC_INIT\1[$new_ver],\2|" $i > bla
     510  mv bla $i
     511  sed -e "s|AC_COIN_PROJECTDIR_INIT\(.*\)|AC_COIN_PROJECTDIR_INIT\($new_current:$new_revision:$new_age\)|" $i > bla
    459512  mv bla $i
    460513  svn di $i
Note: See TracChangeset for help on using the changeset viewer.