diff options
author | Pekka Enberg <penberg@kernel.org> | 2013-01-09 15:12:09 +0200 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2013-01-09 15:34:11 +0200 |
commit | 9b404ed9431b43926f95f1858c66887657d106f1 (patch) | |
tree | 0bdc78e927d4cb279ada89390f006a27fb550702 | |
parent | 4fe6a413a9470ca557a1d14b724d98d27b089487 (diff) | |
download | jato-9b404ed9431b43926f95f1858c66887657d106f1.tar.gz |
Makefile: Improve dependency check error messages
Print out a human-readable error message if a dependency check fails.
For example, if the libbfd library is missing, we print out the
following error message:
$ make
Makefile:200: *** No libbfd found, please install binutils-devel or binutils-dev package.. Stop.
Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r-- | Makefile | 15 | ||||
-rw-r--r-- | tools/monoburg/Makefile | 12 |
2 files changed, 27 insertions, 0 deletions
@@ -195,6 +195,21 @@ ifeq ($(HAS_TCMALLOC),y) TCMALLOC_CFLAGS += -ltcmalloc -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free endif +HAS_LIBBFD:=$(shell scripts/gcc-has-lib.sh gcc bfd) +ifneq ($(HAS_LIBBFD),y) + $(error No libbfd found, please install binutils-devel or binutils-dev package.) +endif + +HAS_LIBFFI:=$(shell scripts/gcc-has-lib.sh gcc ffi) +ifneq ($(HAS_LIBFFI),y) + $(error No libffi found, please install libffi-devel or libffi-dev package.) +endif + +HAS_LIBZIP:=$(shell scripts/gcc-has-lib.sh gcc zip) +ifneq ($(HAS_LIBZIP),y) + $(error No libzip found, please install libzip-devel or libzip-dev package.) +endif + DEFAULT_CFLAGS += $(TCMALLOC_CFLAGS) # boehmgc integration (see boehmgc/doc/README.linux) DEFAULT_CFLAGS += -D_REENTRANT -DGC_LINUX_THREADS -DGC_USE_LD_WRAP diff --git a/tools/monoburg/Makefile b/tools/monoburg/Makefile index c0913ac6..576a7838 100644 --- a/tools/monoburg/Makefile +++ b/tools/monoburg/Makefile @@ -23,6 +23,18 @@ DEFAULT_CFLAGS += $(DEFINES) INCLUDES = -I. -I.. DEFAULT_CFLAGS += $(INCLUDES) +HAVE_BISON:=$(shell bison --version >/dev/null 2>&1 && echo 'yes') + +ifneq ($(HAVE_BISON),yes) +$(error No bison found, please install bison package.) +endif + +HAVE_GLIB2:=$(shell pkg-config --exists glib-2.0 2>/dev/null && echo 'yes') + +ifneq ($(HAVE_GLIB2),yes) +$(error No glib found, please install glib2-devel or glib2-dev package.) +endif + DEFAULT_CFLAGS += $(shell pkg-config --cflags glib-2.0) DEFAULT_LIBS += $(shell pkg-config --libs glib-2.0) |