From de38b29ed4d8902c1a7d732da6af43fc7004f279 Mon Sep 17 00:00:00 2001 From: Dave Murphy Date: Mon, 15 Dec 2014 15:39:16 +0000 Subject: [PATCH] check for ImageMagick and fail gracefully --- examples/graphics/bitmap/24bit-color/Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/examples/graphics/bitmap/24bit-color/Makefile b/examples/graphics/bitmap/24bit-color/Makefile index 2f1f54a..ffdb5a8 100755 --- a/examples/graphics/bitmap/24bit-color/Makefile +++ b/examples/graphics/bitmap/24bit-color/Makefile @@ -117,11 +117,26 @@ else export APP_ICON := $(TOPDIR)/$(ICON) endif +IMAGEMAGICK := $(shell which convert) + + .PHONY: $(BUILD) clean all #--------------------------------------------------------------------------------- +ifeq ($(strip $(IMAGEMAGICK)),) + +all: + @echo "Image Magick not found!" + @echo + @echo "Please install Image Magick from http://www.imagemagick.org/ to build this example" + +else + all: $(BUILD) +endif + +#--------------------------------------------------------------------------------- $(BUILD): @[ -d $@ ] || mkdir -p $@ @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile