make-w32
[Top][All Lists]
Advanced

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

RE: ifeq in define section


From: Jay Chang
Subject: RE: ifeq in define section
Date: Mon, 10 May 2004 05:56:51 +0800

filelist = a.asm

ifeq ($(filelist),)
$(error filelist is empty)
endif

define test
endef

.PHONY : all
all:
        $(test) 

It will show error when filelist is really empty

But,

filelist = a.asm

define test
ifeq ($(1),)
$(error $(1) is empty)
endif
endef

.PHONY : all
all:
        $(call test,$(filelist))

It will still show error even if filelist is not empty.

I also tried following,
filelist = a.asm

define test
ifeq ($(1),)
# $(error $(1) is empty)  <- have been commented out
endif
endef

.PHONY : all
all:
        $(call test,$(filelist))

It will still show error even if I comment-out the $(error)

Jay

-----Original Message-----
From: Paul Smith [mailto:address@hidden On Behalf Of Paul D.
Smith
Sent: Monday, May 10, 2004 4:58 AM
To: Jay Chang
Cc: address@hidden
Subject: Re: (no subject)

%% "Jay Chang" <address@hidden> writes:

  jc> ifeq won't work in define section.
  jc> comment $(error) and $(fatal) won't work in define section.
 
  jc> define test
  jc> ifeq (ABC,1)
  jc> # $(error error test)
  jc> endif
  jc> Endef

  jc> Is that make's bugs?

Since you haven't said what "won't work" means, we can't say.

It seems to be working fine as far as I can tell.

--
----------------------------------------------------------------------------
---
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad
Scientist





reply via email to

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