help-make
[Top][All Lists]
Advanced

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

ifneq inside a function


From: Ken Smith
Subject: ifneq inside a function
Date: Thu, 26 Aug 2004 15:17:22 -0400
User-agent: Mutt/1.5.6i

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?
-- 
Ken Smith




reply via email to

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