Module: check_mk
Branch: master
Commit: 1aceb6ebb5ae6847879b76b357136363daec4cf8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1aceb6ebb5ae68…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Jan 17 11:44:44 2018 +0100
Cleaned up Boost build.
Change-Id: I17ca54c40931f823c0fa54bffb1e2a1dbf79ffe6
---
omd/Makefile.omd | 32 +++++++++++++++++++++-----------
omd/packages/boost/Makefile | 14 +++++++-------
2 files changed, 28 insertions(+), 18 deletions(-)
diff --git a/omd/Makefile.omd b/omd/Makefile.omd
index b6d5fa1..dea9cdf 100644
--- a/omd/Makefile.omd
+++ b/omd/Makefile.omd
@@ -7,6 +7,8 @@ else
REPO_PATH := $(abspath ..)
endif
+PACKAGE_BASE := $(REPO_PATH)/omd/packages
+
EDITION := raw
EDITION_SHORT := cre
ifneq (,$(wildcard $(REPO_PATH)/enterprise))
@@ -35,18 +37,18 @@ DISTRO_INFO := $(shell $(REPO_PATH)/omd/distro)
DISTRO_NAME := $(word 1, $(DISTRO_INFO))
DISTRO_VERSION := $(word 2, $(DISTRO_INFO))
-# Depending on the distro we include a Makefile with distro-
-# specific variables
+# Depending on the distro we include a Makefile with distro-specific variables.
include $(REPO_PATH)/omd/distros/$(DISTRO_NAME)_$(DISTRO_VERSION).mk
-# Net result -> all Makefiles have now access to the linux distribution
-# specific settings
+# perl #########################################################################
+
+PERL := /usr/bin/perl
+PACKAGE_PERL_MODULES_DESTDIR := $(PACKAGE_BASE)/perl-modules/destdir
+PACKAGE_PERL_MODULES_PERL5LIB := $(PACKAGE_PERL_MODULES_DESTDIR)/dest/lib/perl5
-PERL := /usr/bin/perl
-PACKAGE_PERL_MODULES_DESTDIR := $(REPO_PATH)/omd/packages/perl-modules/destdir
-PACKAGE_PERL_MODULES_PERL5LIB := $(PACKAGE_PERL_MODULES_DESTDIR)/dest/lib/perl5
+# python #######################################################################
-PACKAGE_PYTHON_DESTDIR := $(REPO_PATH)/omd/packages/python/destdir
+PACKAGE_PYTHON_DESTDIR := $(PACKAGE_BASE)/python/destdir
PACKAGE_PYTHON_PYTHONPATH := $(PACKAGE_PYTHON_DESTDIR)/lib/python2.7
PACKAGE_PYTHON_LDFLAGS := -L$(PACKAGE_PYTHON_DESTDIR)/lib
-L$(PACKAGE_PYTHON_PYTHONPATH)/config
PACKAGE_PYTHON_LD_LIBRARY_PATH := $(PACKAGE_PYTHON_DESTDIR)/lib
@@ -59,8 +61,10 @@ check-python:
exit 1 ; \
fi
-PACKAGE_FREETDS_DESTDIR := $(REPO_PATH)/omd/packages/freetds/destdir
-PACKAGE_FREETDS_LDFLAGS := -L$(PACKAGE_FREETDS_DESTDIR)/lib
+# freetds #####################################################################
+
+PACKAGE_FREETDS_DESTDIR := $(PACKAGE_BASE)/freetds/destdir
+PACKAGE_FREETDS_LDFLAGS := -L$(PACKAGE_FREETDS_DESTDIR)/lib
check-freetds:
@if [ ! -d $(PACKAGE_FREETDS_DESTDIR) ]; then \
@@ -68,7 +72,9 @@ check-freetds:
exit 1 ; \
fi
-PACKAGE_PYTHON_MODULES_DESTDIR := $(REPO_PATH)/omd/packages/python-modules/destdir
+# python-module ################################################################
+
+PACKAGE_PYTHON_MODULES_DESTDIR := $(PACKAGE_BASE)/python-modules/destdir
PACKAGE_PYTHON_MODULES_PYTHONPATH := $(PACKAGE_PYTHON_MODULES_DESTDIR)/lib
check-python-modules:
@@ -76,3 +82,7 @@ check-python-modules:
echo "ERROR: You need to build the \"python-modules\" package
first" ; \
exit 1 ; \
fi
+
+# perl #########################################################################
+
+PACKAGE_BOOST_DESTDIR := $(PACKAGE_BASE)/boost/destdir
diff --git a/omd/packages/boost/Makefile b/omd/packages/boost/Makefile
index de84fd4..d5cc223 100644
--- a/omd/packages/boost/Makefile
+++ b/omd/packages/boost/Makefile
@@ -7,9 +7,9 @@ DIR := $(NAME)_$(VERSION)
# For some obscure reason (GCC's dual ABI) we have to link all Boost stuff
# statically, otherwise we get linker errors later, e.g.:
#
-# .../packages/boost/local/lib/libboost_system.so: undefined reference to
`std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >::_M_create(unsigned long&, unsigned
long)(a)GLIBCXX_3.4.21'
-# .../packages/boost/local/lib/libboost_system.so: undefined reference to
`std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >::~basic_string()@GLIBCXX_3.4.21'
-# .../packages/boost/local/lib/libboost_system.so: undefined reference to `operator
delete(void*, unsigned long)(a)CXXABI_1.3.9'
+# .../packages/boost/destdir/lib/libboost_system.so: undefined reference to
`std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >::_M_create(unsigned long&, unsigned
long)(a)GLIBCXX_3.4.21'
+# .../packages/boost/destdir/lib/libboost_system.so: undefined reference to
`std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >::~basic_string()@GLIBCXX_3.4.21'
+# .../packages/boost/destdir/lib/libboost_system.so: undefined reference to `operator
delete(void*, unsigned long)(a)CXXABI_1.3.9'
#
# For more details about the dual ABI see:
#
@@ -40,16 +40,16 @@ build: check-python
export LDFLAGS="$(PACKAGE_PYTHON_LDFLAGS)" ; \
export LD_LIBRARY_PATH="$(PACKAGE_PYTHON_LD_LIBRARY_PATH)" ; \
./bootstrap.sh \
- "--prefix=$(shell pwd)/local" \
-
--without-libraries=graph,locale,log,math,program_options,regex,serialization,wave \
+ "--prefix=$(PACKAGE_BOOST_DESTDIR)" \
+
"--without-libraries=graph,locale,log,math,program_options,regex,serialization,wave"
\
"--with-python=$(PACKAGE_PYTHON_EXECUTABLE)" && \
./b2 $(B2_LINK_OPTION) cxxflags=-fPIC cflags=-fPIC -j2 install )
install:
mkdir -p $(DESTDIR)$(OMD_ROOT)/lib
- find local/lib -name "*.so*" -exec cp -v {} $(DESTDIR)$(OMD_ROOT)/lib \;
+ find $(PACKAGE_BOOST_DESTDIR)/lib -name "*.so*" -exec cp -v {}
$(DESTDIR)$(OMD_ROOT)/lib \;
skel:
clean:
- rm -rf $(DIR) local
+ rm -rf $(DIR) $(PACKAGE_BOOST_DESTDIR)