help-make
[Top][All Lists]
Advanced

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

conditional parts


From: Massimiliano Cialdi
Subject: conditional parts
Date: Mon, 11 Mar 2002 18:44:14 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20020203

I have this sample makefile:

FILES = a.n b.n c.n
RES   = $(FILES:.n=.m)
F     = a.n b.n

all: $(RES)

%m: %n
        @echo "*$<* ... *$(FILES)* ... *$(findstring $<,$(F))*"
ifeq ($<,$(findstring $<,$(F)))
        @echo "++$<==$(findstring $<,$(F))++"
else
        @echo "++$<!=$(findstring $<,$(F))++"
endif


I ran make and this is the output:
*a.n* ... *a.n b.n c.n* ... *a.n*
++a.n==a.n++
*b.n* ... *a.n b.n c.n* ... *b.n*
++b.n==b.n++
*c.n* ... *a.n b.n c.n* ... **
++c.n==++

What is wrong with this ifeq statement?

I'm not in list so please CC me directly.

thanks
--
Massimiliano Cialdi
address@hidden
address@hidden




reply via email to

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