Changeset 8549


Ignore:
Timestamp:
May 28, 2009, 2:15:53 AM (12 years ago)
Author:
charles
Message:

(trunk) #2125: Get svn revision number with autoconf rather than make

Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r8433 r8549  
    66m4_define([user_agent_prefix],[1.61+])
    77m4_define([peer_id_prefix],[-TR161Z-])
     8m4_define([svn_revision], esyscmd([sh -c "svnversion | sed -r 's/([0-9]+).*/\1/'"]))
    89
    910AC_INIT([transmission],
     
    1213AC_SUBST(USERAGENT_PREFIX,[user_agent_prefix])
    1314AC_SUBST(PEERID_PREFIX,[peer_id_prefix])
     15AC_SUBST(SVN_REVISION,[svn_revision])
    1416
    1517AC_CONFIG_MACRO_DIR([m4])
     
    353355                 doc/Makefile
    354356                 libtransmission/Makefile
     357                 libtransmission/version.h
    355358                 third-party/Makefile
    356359                 third-party/miniupnp/Makefile
  • trunk/libtransmission/Makefile.am

    r8508 r8549  
    103103    utils.h \
    104104    verify.h \
     105    version.h \
    105106    web.h \
    106107    webseed.h
     
    170171utils_test_LDADD = ${apps_ldadd}
    171172utils_test_LDFLAGS = ${apps_ldflags}
    172 
    173 
    174 
    175 clean-local:
    176         if test -d .svn; then if test -e version.h; then rm version.h; fi; fi;
    177 
    178 EXTRA_libtransmission_a_SOURCES = \
    179     version.h
    180 
    181 BUILT_SOURCES = \
    182     version.h
    183 
    184 version.h:
    185         echo '#define PEERID_PREFIX         "'@PEERID_PREFIX@'"' > version.h
    186         echo '#define USERAGENT_PREFIX      "'@USERAGENT_PREFIX@'"' >> version.h
    187         echo '#define SVN_REVISION          "'`svnversion | sed -r 's/([0-9]+).*/\1/'`'"' >> version.h
    188         echo '#define SVN_REVISION_NUM      '`svnversion | sed -r 's/([0-9]+).*/\1/'`'' >> version.h
    189         echo '#define SHORT_VERSION_STRING  "'@USERAGENT_PREFIX@'"' >> version.h
    190         echo '#define LONG_VERSION_STRING   "'@USERAGENT_PREFIX@' ('`svnversion | sed -r 's/([0-9]+).*/\1/'`')"' >> version.h
Note: See TracChangeset for help on using the changeset viewer.