[CONFIGURATION]
* BUG: Define the TRUNK_VERSION macro in gbx's Makefile.am which is less error-prone and other parts of the build process won't use it anyway. automake thinks that the $(shell ...) call shall a variable and warns but that can safely be ignored I think. git-svn-id: svn://localhost/gambas/trunk@5672 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
ee1e208d52
commit
2217b3d6f0
3 changed files with 3 additions and 12 deletions
10
acinclude.m4
10
acinclude.m4
|
@ -86,16 +86,6 @@ 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.
|
||||
## Additionally, make TRUNK_VERSION define itself statically on first
|
||||
## expansion. This executes "svn info" only once for performance.
|
||||
TRUNK_VERSION='$(strip $(eval TRUNK_VERSION :=$(shell svn info 2>/dev/null | grep Revision | egrep -wo "[[0-9]]+$$"))$(TRUNK_VERSION))'
|
||||
AC_SUBST(TRUNK_VERSION)
|
||||
export CPPFLAGS=$CPPFLAGS\ '-DTRUNK_VERSION=$(TRUNK_VERSION)'
|
||||
fi
|
||||
|
||||
GB_CLEAR_MESSAGES
|
||||
])
|
||||
|
||||
|
|
|
@ -9,7 +9,8 @@ libgbx_a_CFLAGS = -DGAMBAS_PATH="\"$(bindir)\"" $(AM_CFLAGS_OPT)
|
|||
|
||||
gbx3_LDADD = libgbx.a @MATH_LIB@ @INTL_LIB@ @CONV_LIB@ @GETTEXT_LIB@ @DL_LIB@ @GBX_THREAD_LIB@ @FFI_LIB@
|
||||
gbx3_LDFLAGS = @LD_FLAGS@ @INTL_LDFLAGS@ @CONV_LDFLAGS@ @GETTEXT_LDFLAGS@ @FFI_LDFLAGS@
|
||||
gbx3_CFLAGS = -DGAMBAS_PATH="\"$(bindir)\"" $(AM_CFLAGS)
|
||||
TRUNK_VERSION = $(shell svn info 2>/dev/null | grep Revision | egrep -wo "[0-9]+$$" || echo 0)
|
||||
gbx3_CFLAGS = -DGAMBAS_PATH="\"$(bindir)\"" $(AM_CFLAGS) -DTRUNK_VERSION=$(TRUNK_VERSION)
|
||||
|
||||
gb_la_LIBADD = @MATH_LIB@ @INTL_LIB@ @CONV_LIB@ @GETTEXT_LIB@ @DL_LIB@ @GBX_THREAD_LIB@ @FFI_LIB@
|
||||
gb_la_LDFLAGS = -module @LD_FLAGS@ @INTL_LDFLAGS@ @CONV_LDFLAGS@ @GETTEXT_LDFLAGS@ @FFI_LDFLAGS@
|
||||
|
|
|
@ -244,7 +244,7 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
#define xstr(m) #m
|
||||
#define stringify(m) xstr(m)
|
||||
#ifdef TRUNK_VERSION
|
||||
#if TRUNK_VERSION != 0
|
||||
printf(VERSION " #" stringify(TRUNK_VERSION) "\n");
|
||||
#else
|
||||
printf(VERSION "\n");
|
||||
|
|
Loading…
Reference in a new issue