mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Add new variables lyx_build_date/time
These are now in version.cpp. The build machinery should therefore make sure that version.cpp is recompiled at every compilation. These variables are now referred to by the other places that made use of __DATE__ and __TIME__.
This commit is contained in:
parent
4066fcac16
commit
8d6d21c6d9
@ -1150,7 +1150,7 @@ int parse_version(string const &, string const &, string &)
|
||||
cout << to_utf8(_(" Git commit hash "))
|
||||
<< string(lyx_git_commit_hash).substr(0,8) << endl;
|
||||
cout << to_utf8(bformat(_("Built on %1$s[[date]], %2$s[[time]]"),
|
||||
from_ascii(__DATE__), from_ascii(__TIME__))) << endl;
|
||||
from_ascii(lyx_build_date), from_ascii(lyx_build_time))) << endl;
|
||||
cout << lyx_version_info << endl;
|
||||
exit(0);
|
||||
return 0;
|
||||
|
@ -147,7 +147,7 @@ static QString buildinfo()
|
||||
out << qt_(" Git commit hash ")
|
||||
<< QString(lyx_git_commit_hash).left(8) << endl;
|
||||
out << toqstr(bformat(_("Built on %1$s[[date]], %2$s[[time]]"),
|
||||
from_ascii(__DATE__), from_ascii(__TIME__))) << endl;
|
||||
from_ascii(lyx_build_date), from_ascii(lyx_build_time))) << endl;
|
||||
|
||||
out << lyx_version_info << endl;
|
||||
return res;
|
||||
|
@ -18,7 +18,8 @@ bin_PROGRAMS = tex2lyx
|
||||
DEFAULT_INCLUDES =
|
||||
|
||||
AM_CPPFLAGS += $(PCH_FLAGS) -I$(top_srcdir)/src/tex2lyx \
|
||||
-I$(top_srcdir)/src -I$(top_builddir) $(BOOST_INCLUDES)
|
||||
-I$(top_srcdir)/src -I$(top_builddir) -I$(top_builddir)/src \
|
||||
$(BOOST_INCLUDES)
|
||||
|
||||
TEST_FILES = \
|
||||
test/runtests.cmake \
|
||||
|
@ -532,7 +532,7 @@ typedef int (*cmd_helper)(string const &, string const &);
|
||||
|
||||
int parse_help(string const &, string const &)
|
||||
{
|
||||
cerr << "Usage: tex2lyx [options] infile.tex [outfile.lyx]\n"
|
||||
cout << "Usage: tex2lyx [options] infile.tex [outfile.lyx]\n"
|
||||
"Options:\n"
|
||||
"\t-c textclass Declare the textclass.\n"
|
||||
"\t-m mod1[,mod2...] Load the given modules.\n"
|
||||
@ -563,11 +563,12 @@ int parse_help(string const &, string const &)
|
||||
|
||||
int parse_version(string const &, string const &)
|
||||
{
|
||||
lyxerr << "tex2lyx " << lyx_version
|
||||
<< " (" << lyx_release_date << ")" << endl;
|
||||
lyxerr << "Built on " << __DATE__ << ", " << __TIME__ << endl;
|
||||
cout << "tex2lyx " << lyx_version
|
||||
<< " (" << lyx_release_date << ")" << endl;
|
||||
cout << "Built on " << lyx_build_date << ", " << lyx_build_time
|
||||
<< endl;
|
||||
|
||||
lyxerr << lyx_version_info << endl;
|
||||
cout << lyx_version_info << endl;
|
||||
exit(error_code);
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,11 @@ extern char const * const lyx_git_commit_hash = LYX_GIT_COMMIT_HASH;
|
||||
///
|
||||
extern char const * const lyx_release_date = LYX_DATE;
|
||||
|
||||
///
|
||||
extern char const * const lyx_build_date = __DATE__;
|
||||
///
|
||||
extern char const * const lyx_build_time = __TIME__;
|
||||
|
||||
/// Package identifier (lyx[-<version-suffix>])
|
||||
extern char const * const lyx_package = PACKAGE;
|
||||
|
||||
|
@ -23,6 +23,10 @@ extern const int lyx_version_minor;
|
||||
extern char const * const lyx_git_commit_hash;
|
||||
///
|
||||
extern char const * const lyx_release_date;
|
||||
///
|
||||
extern char const * const lyx_build_date;
|
||||
///
|
||||
extern char const * const lyx_build_time;
|
||||
|
||||
/// Package identifier (lyx[-<version-suffix>])
|
||||
extern char const * const lyx_package;
|
||||
|
Loading…
Reference in New Issue
Block a user