Build: Add configure defines to detailed version output
This commit is contained in:
@@ -115,6 +115,8 @@ RES := $(shell if [ "`cat $(CONFIG_CACHE_VERSION) 2>/dev/null`" != "$(VERSION) $
|
||||
# If there is a change in the configure invocation, make sure we recompile rev.cpp
|
||||
RES := $(shell if [ "`cat $(CONFIG_CACHE_INVOCATION) 2>/dev/null`" != "$(CONFIGURE_INVOCATION)" ]; then echo "$(CONFIGURE_INVOCATION)" > $(CONFIG_CACHE_INVOCATION); fi )
|
||||
|
||||
CONFIGURE_DEFINES := $(filter-out PERSONAL_DIR=% GLOBAL_DATA_DIR=%,$(patsubst -D%,%,$(filter -D%,$(CFLAGS))))
|
||||
|
||||
ifndef MAKEDEPEND
|
||||
# The slow, but always correct, dep-check
|
||||
DEP_MASK := %.d
|
||||
@@ -278,7 +280,7 @@ endif
|
||||
# Revision files
|
||||
|
||||
$(SRC_DIR)/rev.cpp: $(CONFIG_CACHE_VERSION) $(CONFIG_CACHE_INVOCATION) $(SRC_DIR)/rev.cpp.in
|
||||
$(Q)cat $(SRC_DIR)/rev.cpp.in | sed "s@\!\!ISODATE\!\!@$(ISODATE)@g;s@!!VERSION!!@$(VERSION)@g;s@!!MODIFIED!!@$(MODIFIED)@g;s@!!DATE!!@`date +%d.%m.%y`@g;s@!!GITHASH!!@$(GITHASH)@g;s@!!ISTAG!!@$(ISTAG)@g;s@!!ISSTABLETAG!!@$(ISSTABLETAG)@g;s@\!\!CONFIGURE_INVOCATION\!\!@$(CONFIGURE_INVOCATION)@g;" > $(SRC_DIR)/rev.cpp
|
||||
$(Q)cat $(SRC_DIR)/rev.cpp.in | sed "s@\!\!ISODATE\!\!@$(ISODATE)@g;s@!!VERSION!!@$(VERSION)@g;s@!!MODIFIED!!@$(MODIFIED)@g;s@!!DATE!!@`date +%d.%m.%y`@g;s@!!GITHASH!!@$(GITHASH)@g;s@!!ISTAG!!@$(ISTAG)@g;s@!!ISSTABLETAG!!@$(ISSTABLETAG)@g;s@\!\!CONFIGURE_INVOCATION\!\!@$(CONFIGURE_INVOCATION)@g;s@\!\!CONFIGURE_DEFINES\!\!@$(CONFIGURE_DEFINES)@g;" > $(SRC_DIR)/rev.cpp
|
||||
|
||||
$(SRC_DIR)/os/windows/ottdres.rc: $(CONFIG_CACHE_VERSION) $(SRC_DIR)/os/windows/ottdres.rc.in
|
||||
$(Q)cat $(SRC_DIR)/os/windows/ottdres.rc.in | sed "s@\!\!ISODATE\!\!@$(ISODATE)@g;s@!!VERSION!!@$(VERSION)@g;s@!!DATE!!@`date +%d.%m.%y`@g;s@!!GITHASH!!@$(GITHASH)@g;s@!!ISTAG!!@$(ISTAG)@g;s@!!ISSTABLETAG!!@$(ISSTABLETAG)@g" > $(SRC_DIR)/os/windows/ottdres.rc
|
||||
|
@@ -31,6 +31,7 @@ Sub UpdateFile(modified, isodate, version, cur_date, githash, istag, isstabletag
|
||||
FindReplaceInFile filename, "!!ISTAG!!", istag
|
||||
FindReplaceInFile filename, "!!ISSTABLETAG!!", isstabletag
|
||||
FindReplaceInFile filename, "!!CONFIGURE_INVOCATION!!", ""
|
||||
FindReplaceInFile filename, "!!CONFIGURE_DEFINES!!", ""
|
||||
End Sub
|
||||
|
||||
Sub UpdateFiles(version)
|
||||
|
@@ -146,7 +146,8 @@ char *CrashLog::LogOpenTTDVersion(char *buffer, const char *last) const
|
||||
" Endian: %s\n"
|
||||
" Dedicated: %s\n"
|
||||
" Build date: %s\n"
|
||||
" Configure: %s\n\n",
|
||||
" Configure: %s\n"
|
||||
" Defines: %s\n\n",
|
||||
_openttd_revision,
|
||||
_openttd_revision_modified,
|
||||
_openttd_newgrf_version,
|
||||
@@ -166,7 +167,8 @@ char *CrashLog::LogOpenTTDVersion(char *buffer, const char *last) const
|
||||
"no",
|
||||
#endif
|
||||
_openttd_build_date,
|
||||
_openttd_build_configure
|
||||
_openttd_build_configure,
|
||||
_openttd_build_configure_defines
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -53,6 +53,11 @@ const char _openttd_build_date[] = __DATE__ " " __TIME__;
|
||||
*/
|
||||
const char _openttd_build_configure[] = "!!CONFIGURE_INVOCATION!!";
|
||||
|
||||
/**
|
||||
* The configure defines used to build OpenTTD
|
||||
*/
|
||||
const char _openttd_build_configure_defines[] = "!!CONFIGURE_DEFINES!!";
|
||||
|
||||
/**
|
||||
* The git revision hash of this version.
|
||||
*/
|
||||
|
@@ -16,6 +16,7 @@ extern const char _openttd_revision[];
|
||||
extern const char _openttd_build_date[];
|
||||
extern const char _openttd_revision_hash[];
|
||||
extern const char _openttd_build_configure[];
|
||||
extern const char _openttd_build_configure_defines[];
|
||||
extern const byte _openttd_revision_modified;
|
||||
extern const byte _openttd_revision_tagged;
|
||||
extern const uint32 _openttd_newgrf_version;
|
||||
|
Reference in New Issue
Block a user