Show ./configure invocation in crash log.
This commit is contained in:
@@ -38,11 +38,13 @@ MAKEDEPEND = !!MAKEDEPEND!!
|
|||||||
CFLAGS_MAKEDEP = !!CFLAGS_MAKEDEP!!
|
CFLAGS_MAKEDEP = !!CFLAGS_MAKEDEP!!
|
||||||
SORT = !!SORT!!
|
SORT = !!SORT!!
|
||||||
AWK = !!AWK!!
|
AWK = !!AWK!!
|
||||||
|
CONFIGURE_INVOCATION = !!CONFIGURE_INVOCATION!!
|
||||||
CONFIG_CACHE_COMPILER = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_COMPILER!!
|
CONFIG_CACHE_COMPILER = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_COMPILER!!
|
||||||
CONFIG_CACHE_LINKER = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_LINKER!!
|
CONFIG_CACHE_LINKER = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_LINKER!!
|
||||||
CONFIG_CACHE_ENDIAN = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_ENDIAN!!
|
CONFIG_CACHE_ENDIAN = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_ENDIAN!!
|
||||||
CONFIG_CACHE_SOURCE = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_SOURCE!!
|
CONFIG_CACHE_SOURCE = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_SOURCE!!
|
||||||
CONFIG_CACHE_VERSION = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_VERSION!!
|
CONFIG_CACHE_VERSION = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_VERSION!!
|
||||||
|
CONFIG_CACHE_INVOCATION = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_INVOCATION!!
|
||||||
|
|
||||||
OBJS_C := !!OBJS_C!!
|
OBJS_C := !!OBJS_C!!
|
||||||
OBJS_CPP := !!OBJS_CPP!!
|
OBJS_CPP := !!OBJS_CPP!!
|
||||||
@@ -114,6 +116,8 @@ RES := $(shell if [ "`cat $(CONFIG_CACHE_ENDIAN) 2>/dev/null`" != "$(ENDIAN_FORC
|
|||||||
RES := $(shell if [ "`cat $(CONFIG_CACHE_SOURCE) 2>/dev/null`" != "$(SRCS)" ]; then echo "$(SRCS)" > $(CONFIG_CACHE_SOURCE); fi )
|
RES := $(shell if [ "`cat $(CONFIG_CACHE_SOURCE) 2>/dev/null`" != "$(SRCS)" ]; then echo "$(SRCS)" > $(CONFIG_CACHE_SOURCE); fi )
|
||||||
# If there is a change in the revision, make sure we recompile rev.cpp
|
# If there is a change in the revision, make sure we recompile rev.cpp
|
||||||
RES := $(shell if [ "`cat $(CONFIG_CACHE_VERSION) 2>/dev/null`" != "$(REV) $(MODIFIED)" ]; then echo "$(REV) $(MODIFIED)" > $(CONFIG_CACHE_VERSION); fi )
|
RES := $(shell if [ "`cat $(CONFIG_CACHE_VERSION) 2>/dev/null`" != "$(REV) $(MODIFIED)" ]; then echo "$(REV) $(MODIFIED)" > $(CONFIG_CACHE_VERSION); fi )
|
||||||
|
# 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 )
|
||||||
|
|
||||||
ifndef MAKEDEPEND
|
ifndef MAKEDEPEND
|
||||||
# The slow, but always correct, dep-check
|
# The slow, but always correct, dep-check
|
||||||
@@ -292,8 +296,8 @@ $(ENDIAN_CHECK): $(SRC_DIR)/endian_check.cpp
|
|||||||
|
|
||||||
# Revision files
|
# Revision files
|
||||||
|
|
||||||
$(SRC_DIR)/rev.cpp: $(CONFIG_CACHE_VERSION) $(SRC_DIR)/rev.cpp.in
|
$(SRC_DIR)/rev.cpp: $(CONFIG_CACHE_VERSION) $(CONFIG_CACHE_INVOCATION) $(SRC_DIR)/rev.cpp.in
|
||||||
$(Q)cat $(SRC_DIR)/rev.cpp.in | sed "s@\!\!REVISION\!\!@$(REV_NR)@g;s@!!VERSION!!@$(REV)@g;s@!!MODIFIED!!@$(MODIFIED)@g;s@!!DATE!!@`date +%d.%m.%y`@g" > $(SRC_DIR)/rev.cpp
|
$(Q)cat $(SRC_DIR)/rev.cpp.in | sed "s@\!\!REVISION\!\!@$(REV_NR)@g;s@!!VERSION!!@$(REV)@g;s@!!MODIFIED!!@$(MODIFIED)@g;s@!!DATE!!@`date +%d.%m.%y`@g;s@\!\!CONFIGURE_INVOCATION\!\!@$(CONFIGURE_INVOCATION)@g;" > $(SRC_DIR)/rev.cpp
|
||||||
|
|
||||||
$(SRC_DIR)/os/windows/ottdres.rc: $(CONFIG_CACHE_VERSION) $(SRC_DIR)/os/windows/ottdres.rc.in
|
$(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@\!\!REVISION\!\!@$(REV_NR)@g;s@!!VERSION!!@$(REV)@g;s@!!DATE!!@`date +%d.%m.%y`@g" > $(SRC_DIR)/os/windows/ottdres.rc
|
$(Q)cat $(SRC_DIR)/os/windows/ottdres.rc.in | sed "s@\!\!REVISION\!\!@$(REV_NR)@g;s@!!VERSION!!@$(REV)@g;s@!!DATE!!@`date +%d.%m.%y`@g" > $(SRC_DIR)/os/windows/ottdres.rc
|
||||||
|
@@ -513,6 +513,12 @@ detect_params() {
|
|||||||
# Clean the logfile
|
# Clean the logfile
|
||||||
echo "" > $config_log
|
echo "" > $config_log
|
||||||
log 2 "Invocation: $0 $*"
|
log 2 "Invocation: $0 $*"
|
||||||
|
if [ "$ignore_extra_parameters" = "0" -o ! -f config.invocation ]; then
|
||||||
|
echo "$0 $*" > config.invocation
|
||||||
|
CONFIGURE_INVOCATION="$0 $*"
|
||||||
|
else
|
||||||
|
CONFIGURE_INVOCATION="`cat config.invocation`"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
save_params() {
|
save_params() {
|
||||||
@@ -3440,6 +3446,7 @@ make_sed() {
|
|||||||
s@!!CONFIG_CACHE_VERSION!!@config.cache.version@g;
|
s@!!CONFIG_CACHE_VERSION!!@config.cache.version@g;
|
||||||
s@!!CONFIG_CACHE_SOURCE_LIST!!@config.cache.source.list@g;
|
s@!!CONFIG_CACHE_SOURCE_LIST!!@config.cache.source.list@g;
|
||||||
s@!!CONFIG_CACHE_PWD!!@config.cache.pwd@g;
|
s@!!CONFIG_CACHE_PWD!!@config.cache.pwd@g;
|
||||||
|
s@!!CONFIG_CACHE_INVOCATION!!@config.cache.invocation@g;
|
||||||
s@!!LANG_SUPPRESS!!@$lang_suppress@g;
|
s@!!LANG_SUPPRESS!!@$lang_suppress@g;
|
||||||
s@!!OBJS_C!!@$OBJS_C@g;
|
s@!!OBJS_C!!@$OBJS_C@g;
|
||||||
s@!!OBJS_CPP!!@$OBJS_CPP@g;
|
s@!!OBJS_CPP!!@$OBJS_CPP@g;
|
||||||
@@ -3452,6 +3459,7 @@ make_sed() {
|
|||||||
s@!!DISTCC!!@$distcc@g;
|
s@!!DISTCC!!@$distcc@g;
|
||||||
s@!!NFORENUM!!@$nforenum@g;
|
s@!!NFORENUM!!@$nforenum@g;
|
||||||
s@!!GRFCODEC!!@$grfcodec@g;
|
s@!!GRFCODEC!!@$grfcodec@g;
|
||||||
|
s@!!CONFIGURE_INVOCATION!!@$CONFIGURE_INVOCATION@g;
|
||||||
"
|
"
|
||||||
|
|
||||||
if [ "$icon_theme_dir" != "" ]; then
|
if [ "$icon_theme_dir" != "" ]; then
|
||||||
|
@@ -27,6 +27,7 @@ Sub UpdateFile(modified, revision, version, cur_date, filename)
|
|||||||
FindReplaceInFile filename, "!!REVISION!!", revision
|
FindReplaceInFile filename, "!!REVISION!!", revision
|
||||||
FindReplaceInFile filename, "!!VERSION!!", version
|
FindReplaceInFile filename, "!!VERSION!!", version
|
||||||
FindReplaceInFile filename, "!!DATE!!", cur_date
|
FindReplaceInFile filename, "!!DATE!!", cur_date
|
||||||
|
FindReplaceInFile filename, "!!CONFIGURE_INVOCATION!!", ""
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub UpdateFiles(version)
|
Sub UpdateFiles(version)
|
||||||
|
@@ -103,7 +103,8 @@ char *CrashLog::LogOpenTTDVersion(char *buffer, const char *last) const
|
|||||||
" Bits: %d\n"
|
" Bits: %d\n"
|
||||||
" Endian: %s\n"
|
" Endian: %s\n"
|
||||||
" Dedicated: %s\n"
|
" Dedicated: %s\n"
|
||||||
" Build date: %s\n\n",
|
" Build date: %s\n"
|
||||||
|
" Configure: %s\n\n",
|
||||||
_openttd_revision,
|
_openttd_revision,
|
||||||
_openttd_revision_modified,
|
_openttd_revision_modified,
|
||||||
_openttd_newgrf_version,
|
_openttd_newgrf_version,
|
||||||
@@ -122,7 +123,8 @@ char *CrashLog::LogOpenTTDVersion(char *buffer, const char *last) const
|
|||||||
#else
|
#else
|
||||||
"no",
|
"no",
|
||||||
#endif
|
#endif
|
||||||
_openttd_build_date
|
_openttd_build_date,
|
||||||
|
_openttd_build_configure
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -49,6 +49,12 @@ const char _openttd_revision[] = "!!VERSION!!";
|
|||||||
*/
|
*/
|
||||||
const char _openttd_build_date[] = __DATE__ " " __TIME__;
|
const char _openttd_build_date[] = __DATE__ " " __TIME__;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The configure invocation used to build OpenTTD
|
||||||
|
*/
|
||||||
|
const char _openttd_build_configure[] = "!!CONFIGURE_INVOCATION!!";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Let us know if current build was modified. This detection
|
* Let us know if current build was modified. This detection
|
||||||
* works even in the case when revision string is overridden by
|
* works even in the case when revision string is overridden by
|
||||||
|
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
extern const char _openttd_revision[];
|
extern const char _openttd_revision[];
|
||||||
extern const char _openttd_build_date[];
|
extern const char _openttd_build_date[];
|
||||||
|
extern const char _openttd_build_configure[];
|
||||||
extern const byte _openttd_revision_modified;
|
extern const byte _openttd_revision_modified;
|
||||||
extern const uint32 _openttd_newgrf_version;
|
extern const uint32 _openttd_newgrf_version;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user