From b45016b75a274291ff8d100e46c6feb279240e24 Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Thu, 11 Jan 2007 11:02:46 +0000 Subject: [PATCH] Makefile error reporting when CUDD dir not found. git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@212 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/Makefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/prism/Makefile b/prism/Makefile index 36669f6a..eab63a72 100644 --- a/prism/Makefile +++ b/prism/Makefile @@ -1,4 +1,4 @@ -############################################## + ############################################## # NB: This is the main Makefile for PRISM. # # It calls all the other Makefiles in # # subdirectories, passing in all the # @@ -186,11 +186,15 @@ endif # Directories # ############### -# Note that these are all relative to the CUDD directory +# Note that these are all relative to the PRISM directory # to make the distribution more 'portable'. # If this is a problem, the best solution is to create symlinks. -CUDD_DIR = cudd +# For CUDD, we default either to ./cudd or, if that does not exist, ../cudd +# To override, comment out the first line and use the second (or specify from the command-line) +CUDD_DIR = $(shell if [ -d cudd ]; then echo cudd; else echo ../cudd; fi ) +#CUDD_DIR = cudd + SRC_DIR = src CLASSES_DIR = classes OBJ_DIR = obj @@ -247,6 +251,8 @@ default: all all: cuddpackage prism cuddpackage: checks + @if [ "$(CUDD_DIR)" = "" ]; then echo "Error: Cannot find CUDD"; exit 1; fi + @if [ ! -d "$(CUDD_DIR)" ]; then echo "Error: Cannot find CUDD"; exit 1; fi @(if [ ! -h $(CUDD_DIR) ]; then \ echo Making cudd ...; \ cd $(CUDD_DIR) && \