summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomek Mrugalski <tomasz@isc.org>2018-09-21 16:57:43 +0200
committerTomek Mrugalski <tomasz@isc.org>2018-09-21 18:00:38 +0200
commit87479e979ca3d3025cb4129ace991a59e32e0f62 (patch)
treee7870aca5b4ab7dae782f995c1f3f94535920c48
parent[master] Updated git hash (diff)
downloadkea-87479e979ca3d3025cb4129ace991a59e32e0f62.tar.xz
kea-87479e979ca3d3025cb4129ace991a59e32e0f62.zip
[#137,!42] Kea version moved to separate header.
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac6
-rw-r--r--src/bin/dhcp4/dhcp4_srv.cc2
-rw-r--r--src/bin/dhcp4/main.cc1
-rw-r--r--src/bin/dhcp6/dhcp6_srv.cc1
-rw-r--r--src/bin/dhcp6/main.cc1
-rw-r--r--src/bin/lfc/lfc_controller.cc1
-rw-r--r--src/bin/netconf/main.cc1
-rw-r--r--src/lib/cfgrpt/tests/config_report_unittests.cc1
-rw-r--r--src/lib/process/d_controller.cc1
-rw-r--r--src/lib/process/tests/d_controller_unittests.cc1
11 files changed, 16 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 2c0733c29c..cbd7f95918 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -150,4 +150,4 @@ CLEANFILES = $(abs_top_builddir)/logger_lockfile
# config.h may be included by headers supplied for building user-written
# hooks libraries, so we need to include it in the distribution.
-pkginclude_HEADERS = config.h
+pkginclude_HEADERS = config.h kea_version.h
diff --git a/configure.ac b/configure.ac
index b784dfc19a..ad6886ec03 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,7 +43,11 @@ else
fi
# Export EXTENDED_VERSION to config.h
# This will be either "tarball" or "git abcd".
-AC_DEFINE_UNQUOTED([EXTENDED_VERSION], ["${KEA_SRCID}"], [Extended Kea version])
+# We do not want to put this in a config.h, because it messes up ccache
+# horribly. When building different branches, the commit-id is different
+# and since the config.h is included in most files *and* has a different
+# content, ccache can't use cached content and thus has to do full compilation.
+echo "#define EXTENDED_VERSION \"${KEA_SRCID}\"" > kea_version.h
# Find a separator for path_replacer
for sep in "+" "," ";" "&" "__NONE__"; do
diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc
index 2905c031f0..f8fca028f8 100644
--- a/src/bin/dhcp4/dhcp4_srv.cc
+++ b/src/bin/dhcp4/dhcp4_srv.cc
@@ -5,6 +5,8 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <config.h>
+#include <kea_version.h>
+
#include <dhcp/dhcp4.h>
#include <dhcp/duid.h>
#include <dhcp/hwaddr.h>
diff --git a/src/bin/dhcp4/main.cc b/src/bin/dhcp4/main.cc
index 4f07e49ca7..357360bca4 100644
--- a/src/bin/dhcp4/main.cc
+++ b/src/bin/dhcp4/main.cc
@@ -5,6 +5,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <config.h>
+#include <kea_version.h>
#include <dhcp4/ctrl_dhcp4_srv.h>
#include <dhcp4/dhcp4_log.h>
diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc
index 684ab39805..c0adebbba3 100644
--- a/src/bin/dhcp6/dhcp6_srv.cc
+++ b/src/bin/dhcp6/dhcp6_srv.cc
@@ -5,6 +5,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <config.h>
+#include <kea_version.h>
#include <asiolink/io_address.h>
#include <dhcp_ddns/ncr_msg.h>
diff --git a/src/bin/dhcp6/main.cc b/src/bin/dhcp6/main.cc
index 2d12fe897c..f16e770723 100644
--- a/src/bin/dhcp6/main.cc
+++ b/src/bin/dhcp6/main.cc
@@ -5,6 +5,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <config.h>
+#include <kea_version.h>
#include <dhcp6/ctrl_dhcp6_srv.h>
#include <dhcp6/dhcp6_log.h>
diff --git a/src/bin/lfc/lfc_controller.cc b/src/bin/lfc/lfc_controller.cc
index 0a4b12ce74..1bf3b9932c 100644
--- a/src/bin/lfc/lfc_controller.cc
+++ b/src/bin/lfc/lfc_controller.cc
@@ -5,6 +5,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <config.h>
+#include <kea_version.h>
#include <lfc/lfc_controller.h>
#include <lfc/lfc_log.h>
diff --git a/src/bin/netconf/main.cc b/src/bin/netconf/main.cc
index 345ef25b53..14015e75b6 100644
--- a/src/bin/netconf/main.cc
+++ b/src/bin/netconf/main.cc
@@ -5,6 +5,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <config.h>
+#include <kea_version.h>
#include <netconf/netconf_log.h>
#include <exceptions/exceptions.h>
diff --git a/src/lib/cfgrpt/tests/config_report_unittests.cc b/src/lib/cfgrpt/tests/config_report_unittests.cc
index cbf1540327..378a946819 100644
--- a/src/lib/cfgrpt/tests/config_report_unittests.cc
+++ b/src/lib/cfgrpt/tests/config_report_unittests.cc
@@ -5,6 +5,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <config.h>
+#include <kea_version.h>
#include <cfgrpt/config_report.h>
#include <gtest/gtest.h>
diff --git a/src/lib/process/d_controller.cc b/src/lib/process/d_controller.cc
index d835fd80e6..6af2106db5 100644
--- a/src/lib/process/d_controller.cc
+++ b/src/lib/process/d_controller.cc
@@ -14,6 +14,7 @@
#include <process/d_log.h>
#include <process/d_controller.h>
#include <process/config_base.h>
+#include <kea_version.h>
#ifdef HAVE_MYSQL
#include <dhcpsrv/mysql_lease_mgr.h>
diff --git a/src/lib/process/tests/d_controller_unittests.cc b/src/lib/process/tests/d_controller_unittests.cc
index 72f24ee116..2559b5ba87 100644
--- a/src/lib/process/tests/d_controller_unittests.cc
+++ b/src/lib/process/tests/d_controller_unittests.cc
@@ -5,6 +5,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <config.h>
+#include <kea_version.h>
#include <cc/command_interpreter.h>
#include <process/testutils/d_test_stubs.h>