3 # Script to generate svn_revision.c
9 SCRIPT_DIR=`dirname $0`
10 SRC_DIR=`dirname $SCRIPT_DIR`
12 C_FILE="$CUR_DIR/svn_revision.c"
13 H_FILE="$CUR_DIR/svn_revision.h"
16 # determine if this code base came from subversion.
17 if test -d $SRC_DIR/.svn ; then
18 echo "have subversion repository"
19 SVNVERSION=`which svnversion`
20 if test -x $SVNVERSION ; then
21 echo "have svnversion at $SVNVERSION"
22 BUILD=`svnversion -n .`
23 echo "This code base revision $BUILD"
24 CAN_BUILD_SVN_REVISION="yes"
28 if [ "$CAN_BUILD_SVN_REVISION" = "yes" ] ; then
32 * Subversion revision functions
34 * Autogenerated at make/release time
36 * Do not modify this file
40 const char *svn_revision (void)
42 const char *SVN_Version = "$BUILD";
47 elif test ! -f $C_FILE ; then
51 * Subversion revision functions
53 * Autogenerated at make time
55 * There should have been one with your source distribution
57 * Do not modify this file
61 const char *svn_revision (void)
63 const char *SVN_Version = "**UNKNOWN** Built from source without svn and no $C_FILE accompanying";