diff --git a/makefile b/makefile index 8edbdbcedb81dd8a7b563a0b2f376aa914d210a4..5eae279e8699ce350cfcbab32516708cd73e2c70 100644 --- a/makefile +++ b/makefile @@ -47,12 +47,24 @@ ifneq (0, $(CPPUNIT_EXISTS)) $(error You need cppunit installed) endif -CPPUNIT_SO_TMP = $(shell ld --verbose | grep SEARCH | tr \ \\\n | sed s/SEARCH_DIR//g | sed s/\(\\\"//g | sed s/\\\"\)\\\;//g | sed s/^=//g | sort -u | sed \s/$$/\\/libcppunit.so/g\) +CPPUNIT_SO_TMP = $(shell ld --verbose | grep SEARCH | tr \ \\\n | sed s/SEARCH_DIR//g | sed s/\(\\\"//g | sed s/\\\"\)\\\;//g | sed s/^=//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 +LIBXML2_EXISTS = $(shell $(CXX) -c -o /dev/null -xc++ - <<< \\\#include\ \<libxml/xmlreader.h\> 2>/dev/null; echo $$?) +ifneq (0, $(LIBXML2_EXISTS)) +$(error You need libxml2 installed) +endif + +LIBXML2_SO_TMP = $(shell ld --verbose | grep SEARCH | tr \ \\\n | sed s/SEARCH_DIR//g | sed s/\(\\\"//g | sed s/\\\"\)\\\;//g | sed s/^=//g | sort -u | sed \s/$$/\\/libxml2.so*/g\) +$(info $(LIBXML2_SO_TMP)) +LIBXML2_SO_EXISTS = $(shell ls $(LIBXML2_SO_TMP) 2>/dev/null | wc -l) +ifeq (0, $(LIBXML2_SO_EXISTS)) +$(error You need libxml2 installed) +endif + SUBDIRS_WITH_MAKE = $(dir $(wildcard */makefile))