Minor fixes for SVN-revision display.
This commit is contained in:
parent
87abbfbd23
commit
2a508e1542
4 changed files with 9 additions and 6 deletions
|
@ -238,7 +238,7 @@ AC_ARG_ENABLE([internal-data],
|
|||
[internaldata=no])
|
||||
|
||||
AC_ARG_ENABLE([display-revision],
|
||||
AS_HELP_STRING([--display-revisiion], [enable svn revision display]),
|
||||
AS_HELP_STRING([--enable-display-revision], [enable svn revision display]),
|
||||
[svnrev=$enableval],
|
||||
[svnrev=no])
|
||||
|
||||
|
@ -247,6 +247,7 @@ AM_CONDITIONAL([GAME], [test x$game = xyes])
|
|||
AM_CONDITIONAL([SERVER], [test x$server = xyes])
|
||||
AM_CONDITIONAL([CAMPAIGNSERVER], [test x$campaignserver = xyes])
|
||||
AM_CONDITIONAL([EDITOR], [test x$editor = xyes])
|
||||
AM_CONDITIONAL([USESVN], [test x$svnrev = xyes])
|
||||
AM_CONDITIONAL([TOOLS], [test x$tools = xyes])
|
||||
AM_CONDITIONAL([GCC], [test x$GXX = xyes])
|
||||
AM_CONDITIONAL([INCLUDEDINTL], [test x$nls_cv_use_gnu_gettext = xyes])
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
SVNREV = $(shell svnversion -n $(topdir))
|
||||
SVNREV = $(shell svnversion -n $(topdir) 2>/dev/null)
|
||||
CFLAGS += "-DSVNREV=\"$(SVNREV)\""
|
||||
CXXFLAGS += "-DSVNREV=\"$(SVNREV)\""
|
||||
|
||||
|
@ -472,6 +472,7 @@ libwesnoth_core_a_SOURCES = \
|
|||
serialization/tokenizer.cpp \
|
||||
zipios++/xcoll.cpp
|
||||
|
||||
if USESVN
|
||||
# Until game_config.cpp is removed, this will be needed to ensure that the
|
||||
# SVNVER constant gets updated correctly. If and when that definition is
|
||||
# moved elsewhere, this dependency must follow it.
|
||||
|
@ -482,6 +483,7 @@ revision-stamp: FORCE
|
|||
if [ x"$(SVNREV)" != x`cat revision-stamp 2>/dev/null` ]; then echo -n $(SVNREV) >revision-stamp; fi
|
||||
|
||||
FORCE:
|
||||
endif
|
||||
|
||||
AM_CXXFLAGS = -I $(srcdir)/sdl_ttf -I../intl -I$(top_srcdir)/intl @SDL_CFLAGS@ @PYTHON_CFLAGS@ -DWESNOTH_PATH=\"$(pkgdatadir)\" \
|
||||
-DLOCALEDIR=\"$(LOCALEDIR)\" -DHAS_RELATIVE_LOCALEDIR=$(HAS_RELATIVE_LOCALEDIR) -DFIFODIR=\"$(fifodir)\"
|
||||
|
|
|
@ -1931,9 +1931,9 @@ int main(int argc, char** argv)
|
|||
|
||||
try {
|
||||
std::cerr << "Battle for Wesnoth v" << VERSION
|
||||
#if defined(SVNREV) and defined(DO_DISPLAY_REVISION)
|
||||
#if defined(SVNREV) && defined(DO_DISPLAY_REVISION)
|
||||
<< " (" << game_config::svnrev << ")"
|
||||
#endif /* defined(SVNREV) and defined(DO_DISPLAY_REVISION) */
|
||||
#endif /* defined(SVNREV) && defined(DO_DISPLAY_REVISION) */
|
||||
<< '\n';
|
||||
time_t t = time(NULL);
|
||||
std::cerr << "Started on " << ctime(&t) << "\n";
|
||||
|
|
|
@ -232,9 +232,9 @@ TITLE_RESULT show_title(display& screen, config& tips_of_day, int* ntip)
|
|||
|
||||
const std::string& version_str = _("Version") + std::string(" ") +
|
||||
game_config::version
|
||||
#if defined(SVNREV) and defined(DO_DISPLAY_REVISION)
|
||||
#if defined(SVNREV) && defined(DO_DISPLAY_REVISION)
|
||||
+ " (" + game_config::svnrev + ")"
|
||||
#endif /* defined(SVNREV) and defined(DO_DISPLAY_REVISION) */
|
||||
#endif /* defined(SVNREV) && defined(DO_DISPLAY_REVISION) */
|
||||
;
|
||||
|
||||
const SDL_Rect version_area = font::draw_text(NULL,screen_area(),
|
||||
|
|
Loading…
Add table
Reference in a new issue