Module: check_mk
Branch: master
Commit: 70ba4b2fd2efad0e50b25a5a4364086f8e415bc6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=70ba4b2fd2efad…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Jan 17 12:25:24 2018 +0100
Do a two-step build for re2 to get a local version-independent DESTDIR.
Change-Id: I7f57fa0a64f066dbd8fb5731b13d114434dc315b
---
omd/Makefile.omd | 11 +++++++++++
omd/packages/re2/.gitignore | 2 +-
omd/packages/re2/Makefile | 5 +++--
3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/omd/Makefile.omd b/omd/Makefile.omd
index dea9cdf..37d5782 100644
--- a/omd/Makefile.omd
+++ b/omd/Makefile.omd
@@ -72,6 +72,17 @@ check-freetds:
exit 1 ; \
fi
+# re2 #########################################################################
+
+PACKAGE_RE2_DESTDIR := $(PACKAGE_BASE)/re2/destdir
+
+check-re2:
+ @if [ ! -d $(PACKAGE_RE2_DESTDIR) ]; then \
+ echo "ERROR: You need to build the \"re2\" package first" ; \
+ exit 1 ; \
+ fi
+
+
# python-module ################################################################
PACKAGE_PYTHON_MODULES_DESTDIR := $(PACKAGE_BASE)/python-modules/destdir
diff --git a/omd/packages/re2/.gitignore b/omd/packages/re2/.gitignore
index 78d22c2..f615a1a 100644
--- a/omd/packages/re2/.gitignore
+++ b/omd/packages/re2/.gitignore
@@ -1,2 +1,2 @@
-dest/
+destdir/
re2-20??-??-01/
diff --git a/omd/packages/re2/Makefile b/omd/packages/re2/Makefile
index 0dd8293..7bf32f1 100644
--- a/omd/packages/re2/Makefile
+++ b/omd/packages/re2/Makefile
@@ -24,11 +24,12 @@ build:
echo "no"; IFS=$$SAVED_IFS ; \
done ; \
test -z "$$CXX" && { echo "error: no C++ compiler found"
>&2 ; exit 1; } ; \
- $(MAKE) -C $(DIR) CXX="$$CXX" DESTDIR=$(abspath dest) prefix=$(OMD_ROOT)
install
+ $(MAKE) -C $(DIR) CXX="$$CXX" prefix=$(OMD_ROOT) && \
+ $(MAKE) -C $(DIR) CXX="$$CXX" DESTDIR=$(PACKAGE_RE2_DESTDIR)
prefix="" install
install:
skel:
clean:
- rm -rf $(DIR) dest
+ rm -rf $(DIR) $(PACKAGE_RE2_DESTDIR)