New function LibVEX_Version, returning version string automagically

generated by 'svnversion -n .'.  Only updated when you do 'make
version'.



git-svn-id: svn://svn.valgrind.org/vex/trunk@674
This commit is contained in:
Julian Seward
2004-12-20 04:37:50 +00:00
parent b9a7b8a138
commit 0d26e5ca99
3 changed files with 22 additions and 1 deletions

View File

@@ -76,9 +76,15 @@ libvex.a: $(LIB_OBJS)
ar clq libvex.a $(LIB_OBJS)
clean:
rm -f $(LIB_OBJS) libvex.a vex test_main.o
rm -f $(LIB_OBJS) libvex.a vex test_main.o priv/main/vex_svnversion.h
(cd head20041019 && make --quiet clean)
version:
rm -f priv/main/vex_svnversion.h
echo -n "\"" > priv/main/vex_svnversion.h
svnversion -n . >> priv/main/vex_svnversion.h
echo "\"" >> priv/main/vex_svnversion.h
ALL_HEADERS = $(PUB_HEADERS) $(PRIV_HEADERS)
ALL_INCLUDES = $(PUB_INCLUDES) $(PRIV_INCLUDES)

View File

@@ -53,6 +53,16 @@
/* --------- Initialise the library. --------- */
/* Exported to library client. */
HChar* LibVEX_Version ( void )
{
return
#include "main/vex_svnversion.h"
;
}
/* Exported to library client. */
void LibVEX_default_VexControl ( /*OUT*/ VexControl* vcon )

View File

@@ -81,6 +81,11 @@ typedef
extern void LibVEX_default_VexControl ( /*OUT*/ VexControl* vcon );
/* Returns the Vex SVN version. */
extern HChar* LibVEX_Version ( void );
/* Initialise the translator. */
extern void LibVEX_Init (