[CONFIGURATION]
* NEW: The TRUNK_VERSION macro is now defined to the overall SVN repository revision if Gambas is compiled from inside a repository. The value is detected by the Makefiles and passed as a command line definition to gcc. [INTERPRETER] * NEW: --version also prints the SVN revision number when gbx3 was compiled from a SVN repository. git-svn-id: svn://localhost/gambas/trunk@5662 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
c76d8e4140
commit
2bf1efd58b
@ -86,6 +86,14 @@ AC_DEFUN([GB_INIT_AUTOMAKE],
|
||||
AC_DEFINE(GAMBAS_PCODE_VERSION, 0x03050000, [Gambas bytecode version])
|
||||
AC_DEFINE(GAMBAS_PCODE_VERSION_MIN, 0x03000000, [Minimum Gambas bytecode version])
|
||||
|
||||
IN_REPO=$(svn info >/dev/null 2>&1 && echo yes)
|
||||
if test -n "$IN_REPO"; then
|
||||
## These will go into the Makefiles. Quoting is a mess.
|
||||
TRUNK_VERSION='$(shell svn info 2>/dev/null | grep Revision | egrep -wo "[[0-9]]+$$")'
|
||||
AC_SUBST(TRUNK_VERSION)
|
||||
export CPPFLAGS=$CPPFLAGS\ '-DTRUNK_VERSION=$(TRUNK_VERSION)'
|
||||
fi
|
||||
|
||||
GB_CLEAR_MESSAGES
|
||||
])
|
||||
|
||||
|
@ -242,7 +242,13 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else if (is_long_option(argv[1], 'V', "version"))
|
||||
{
|
||||
#define xstr(m) #m
|
||||
#define stringify(m) xstr(m)
|
||||
#ifdef TRUNK_VERSION
|
||||
printf(VERSION " #" stringify(TRUNK_VERSION) "\n");
|
||||
#else
|
||||
printf(VERSION "\n");
|
||||
#endif
|
||||
my_exit(0);
|
||||
}
|
||||
else if (is_long_option(argv[1], 'L', "license"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user