help-make
[Top][All Lists]
Advanced

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

Re: ifneq inside a function


From: Noel Yap
Subject: Re: ifneq inside a function
Date: Thu, 26 Aug 2004 15:21:25 -0400
User-agent: Mozilla Thunderbird 0.5 (Windows/20040212)

I think you need to do:

$(eval $(call something))

Typically, I have two functions when I want to do something like this:

define implementation
  ifneq (,)
    $(warning weird)
  endif
endef

interface = $(eval $(call implementation))

$(call interface)

HTH,
Noel

Ken Smith wrote:

I can't justify to myself why this makefile

define something
  ifneq (,)
    $(warning weird)
  endif
endef

$(call something)

generates the following output

testcase.mk:6: weird
testcase.mk:6: *** missing separator.  Stop.

What I'm trying to do is rudimentary checking of the parameters passed
to a function.  I know that the function I am writing should take two
parameters so I'm checking to see if $(3) is empty or nonempty.  If it
is nonempty, I want to end processing with $(error).  What is the idiomatic
way of doing this?




reply via email to

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