help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implement Check on Input Values


From: Stephan Beal
Subject: Re: Implement Check on Input Values
Date: Mon, 8 Aug 2011 19:16:39 +0200

On Mon, Aug 8, 2011 at 6:13 PM, Ajay Jain <address@hidden> wrote:

> 1) Check to make sure that WORK_DIR is not NULL
>

One way:

ifneq (,$(WORK_DIR))
...
endif

2) Check to make sure that WORK_DIR exists
>

(inside the above ifneq block...)

ifeq (1,$(words $(wildcard $(WORK_DIR)))
...
endif

3) Check to make sure that WORK_DIR is NOT a part of TOP_DIR/Parent
> Directory
>

You could implement that using $(filter) or $(filter-out) to strip the
TOP_DIR part of WORK_DIR (i never remember which filter func does what), and
then check for $(TOP_DIR)/whateverIsLeftOver. Perhaps $(dir) and/or
$(notdir) would be appropriate.

But there are probably simpler ways to do those things. Let's wait and see
what the Gurus can tell us...

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]