From 4b414999985846faff8399c69806da8ccc1f8124 Mon Sep 17 00:00:00 2001 From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz> Date: Fri, 7 Nov 2014 23:03:50 +0100 Subject: [PATCH] test for sharedlibrary existence --- makefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile index 901c4a0edf..a86e548084 100644 --- a/makefile +++ b/makefile @@ -31,10 +31,16 @@ ifneq (0, $(TCLAP_EXISTS)) $(error You need tclap installed) endif -TCLAP_EXISTS = $(shell g++ -c -o /dev/null -xc++ - <<< \\\#include\ \<cppunit/Test.h\> 2>/dev/null; echo $$?) -ifneq (0, $(TCLAP_EXISTS)) -$(error You need tclap installed) +CPPUNIT_EXISTS = $(shell g++ -c -o /dev/null -xc++ - <<< \\\#include\ \<cppunit/Test.h\> 2>/dev/null; echo $$?) +ifneq (0, $(CPPUNIT_EXISTS)) +$(error You need cppunit installed) endif +CPPUNIT_SO_TMP = $(shell ld --verbose | grep SEARCH | tr \ \\\n | sed \s/SEARCH_DIR\(\"\\\(.*\\\)\"\)\;/\\\1/g\ | sort -u | sed \s/$$/\\/libcppunit.so/g\) +CPPUNIT_SO_EXISTS = $(shell ls $(CPPUNIT_SO_TMP) 2>/dev/null | wc -l) +ifeq (0, $(CPPUNIT_SO_EXISTS)) +$(error You need cppunit installed) +endif + SUBDIRS_WITH_MAKE = $(dir $(wildcard */makefile)) -- GitLab