Module: check_mk
Branch: master
Commit: 6e5a6af821175a7cfd86baf94d6a510369929236
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6e5a6af821175a…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Thu Feb 2 16:22:02 2017 +0100
Fixed mk-livestatus target.
Change-Id: Ibaf6eb097eb4a5a6333e8aaefa5b994f6a535344
---
Makefile | 10 +++++++---
configure.ac | 13 +++++--------
livestatus/config_files.m4 | 2 ++
livestatus/standalone/config_files.m4 | 2 ++
4 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/Makefile b/Makefile
index 33496c8..44f372f 100644
--- a/Makefile
+++ b/Makefile
@@ -60,6 +60,9 @@ LIVESTATUS_SOURCES := $(LIVESTATUS_AUTO) configure.ac \
Makefile.am nagios/README nagios/*.h \
nagios4/README m4/* nagios4/*.h src/*.{h,cc} \
src/Makefile.am api/python/{*.py,README} api/perl/*
+LIVESTATUS_SRCS := Makefile.am api/c++/{Makefile,*.{h,cc}} api/perl/* \
+ api/python/{README,*.py} {nagios,nagios4}/{README,*.h} \
+ src/{Makefile.am,*.{cc,h}} standalone/config_files.m4
CORE_SOURCES := $(wildcard $(addprefix enterprise/core/src/,*.cc *.h))
CHECKHELPER_SOURCES := $(wildcard $(addprefix enterprise/core/src/checkhelper/,*.cc
*.h))
@@ -178,14 +181,15 @@ packages:
# NOTE: Old tar versions (e.g. on CentOS 5) don't have the --transform option,
# so we do things in a slightly complicated way.
-mk-livestatus: $(addprefix livestatus/,$(LIVESTATUS_AUTO))
+mk-livestatus:
rm -rf mk-livestatus-$(VERSION)
mkdir -p mk-livestatus-$(VERSION)
- tar cf - $(TAROPTS) -C livestatus $$(cd livestatus ; echo $(LIVESTATUS_SOURCES) ) | tar
xf - -C mk-livestatus-$(VERSION)
+ tar cf - $(TAROPTS) -C livestatus $$(cd livestatus ; echo $(LIVESTATUS_SRCS) ) | tar xf
- -C mk-livestatus-$(VERSION)
+ cp -a configure.ac m4 mk-livestatus-$(VERSION)
+ cd mk-livestatus-$(VERSION) && autoreconf --install --include=m4 && rm
-rf autom4te.cache
tar czf mk-livestatus-$(VERSION).tar.gz $(TAROPTS) mk-livestatus-$(VERSION)
rm -rf mk-livestatus-$(VERSION)
-
check-version:
@sed -n 1p ChangeLog | fgrep -qx '$(VERSION):' || { \
echo "Version $(VERSION) not listed at top of ChangeLog!" ; \
diff --git a/configure.ac b/configure.ac
index 93c932d..13487a1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,7 +35,6 @@ AC_DEFINE_UNQUOTED([BUILD_HOSTNAME], ["`uname -n`"], [name of
the build host])
AC_REQUIRE_AUX_FILE([compile])
AC_REQUIRE_AUX_FILE([config.guess])
AC_REQUIRE_AUX_FILE([config.sub])
-AM_CONDITIONAL([ENTERPRISE_OPT], [test -d enterprise])
# Checks for programs.
AC_PROG_CC([gcc-6 gcc-5 clang-3.9 clang-3.8 clang-3.7 clang-3.6 clang-3.5 gcc-4.9 gcc
clang])
@@ -135,12 +134,10 @@ AC_SUBST(nagios_headers)
AC_DEFINE([_GLIBCXX_REGEX_STATE_LIMIT], [2500],
[the maximum number of states the regex NFA can have])
-AC_CONFIG_FILES([livestatus/Makefile
- livestatus/src/Makefile])
-AM_COND_IF([ENTERPRISE_OPT],
- [AC_CONFIG_FILES([enterprise/core/Makefile
- enterprise/core/src/Makefile
- enterprise/core/src/livestatus/Makefile
- enterprise/core/src/checkhelper/Makefile])])
+# HACKING ALERT: automake can't really handle optional subdirectories, so we
+# have to do this in a slightly hacky way by using M4's silent includes.
+m4_sinclude([livestatus/config_files.m4])
+m4_sinclude([enterprise/config_files.m4])
+m4_sinclude([standalone/config_files.m4])
AC_OUTPUT
diff --git a/livestatus/config_files.m4 b/livestatus/config_files.m4
new file mode 100644
index 0000000..dd8cb8d
--- /dev/null
+++ b/livestatus/config_files.m4
@@ -0,0 +1,2 @@
+AC_CONFIG_FILES([livestatus/Makefile
+ livestatus/src/Makefile])
diff --git a/livestatus/standalone/config_files.m4
b/livestatus/standalone/config_files.m4
new file mode 100644
index 0000000..443ac17
--- /dev/null
+++ b/livestatus/standalone/config_files.m4
@@ -0,0 +1,2 @@
+AC_CONFIG_FILES([Makefile
+ src/Makefile])