By default this includes the version, including the git hash. The idea is
that this version information would be available in all the core dumps.
The DOVECOT_BUILD_INFO can be overridden by compiling with:
DOVECOT_BUILD_INFO='"build info"' make
/* Copyright (c) 2001-2017 Dovecot authors, see the included COPYING file */
#include "lib.h"
+#include "dovecot-version.h"
#include "array.h"
#include "env-util.h"
#include "hostpid.h"
#include <unistd.h>
#include <sys/time.h>
+/* Mainly for including the full version information in core dumps.
+ NOTE: Don't set this const - otherwise it won't end up in core dumps. */
+char dovecot_build_info[] = DOVECOT_BUILD_INFO;
+
static bool lib_initialized = FALSE;
int dev_null_fd = -1;
BUILDDIR="${2:-`pwd`}"
VERSION_H="dovecot-version.h"
VERSION_HT="dovecot-version.h.tmp"
+DOVECOT_BUILD_INFO=${DOVECOT_BUILD_INFO:-DOVECOT_VERSION_FULL}
abspath()
{ #$1 the path
#define DOVECOT_VERSION_H
#define DOVECOT_VERSION_FULL VERSION" (${GITID})"
+#define DOVECOT_BUILD_INFO ${DOVECOT_BUILD_INFO}
#endif /* DOVECOT_VERSION_H */
EOF
#define DOVECOT_VERSION_H
#define DOVECOT_VERSION_FULL VERSION
+#define DOVECOT_BUILD_INFO ${DOVECOT_BUILD_INFO}
#endif /* DOVECOT_VERSION_H */
EOF