Regenerate build date and time every time tinc is built.
This prevents the date and time shown in version information from getting stale because of partial builds. With these changes, date and time information is written to a dedicated object file that gets rebuilt every time make is run, even if there are no changes.
This commit is contained in:
parent
116f2ed27a
commit
aec82bb1c9
6 changed files with 61 additions and 3 deletions
|
|
@ -34,6 +34,7 @@
|
|||
#include "subnet.h"
|
||||
#include "utils.h"
|
||||
#include "xalloc.h"
|
||||
#include "version.h"
|
||||
|
||||
/* If zero, don't detach from the terminal. */
|
||||
bool do_detach = true;
|
||||
|
|
@ -223,7 +224,7 @@ bool detach(void) {
|
|||
openlogger(identname, use_logfile?LOGMODE_FILE:(do_detach?LOGMODE_SYSLOG:LOGMODE_STDERR));
|
||||
|
||||
logger(DEBUG_ALWAYS, LOG_NOTICE, "tincd %s (%s %s) starting, debug level %d",
|
||||
VERSION, __DATE__, __TIME__, debug_level);
|
||||
VERSION, BUILD_DATE, BUILD_TIME, debug_level);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue