Module: check_mk
Branch: master
Commit: 6f652ee7b639d84c32437d5336c6504ff0c04972
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6f652ee7b639d8…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Oct 28 09:43:10 2015 +0100
Fixed and cleaned up .f12 script. Build with -Wall and -Wextra now.
---
livestatus/.f12 | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/livestatus/.f12 b/livestatus/.f12
index b550ba2..54c9ce8 100755
--- a/livestatus/.f12
+++ b/livestatus/.f12
@@ -1,19 +1,26 @@
#!/bin/bash
SITE=${SITE:-$(cat ../.site 2>/dev/null || true)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
+C_CXX_FLAGS="-g -O3 -Wall -Wextra"
set -e
-if [ ! -f configure ]; then
- aclocal && autoheader && automake --add-missing && autoconf
-fi
-if [ ! -f Makefile ]; then
- ./configure
-fi
-
-make CFLAGS=-g -j 8
+for i in aclocal.m4 ar-lib compile config.h.in configure depcomp install-sh Makefile.in
missing; do
+ if test ! -f $i; then
+ autoreconf --install
+ break
+ fi
+done
+# See AC_CONFIG_HEADER and AC_CONFIG_FILES in configure.ac
+for i in config.h Makefile src/Makefile; do
+ if test ! -f $i; then
+ ./configure CFLAGS="$C_CXX_FLAGS" CXXFLAGS="$C_CXX_FLAGS"
+ break
+ fi
+done
+make -j8
sudo install src/livestatus.o /omd/sites/$SITE/lib/mk-livestatus/livestatus.o
echo "Restarting site $SITE"
sudo omd restart $SITE nagios