From owner-freebsd-questions Sun Jan 21 15:35:41 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mailhost01.reflexnet.net (mailhost01.reflexnet.net [64.6.192.82]) by hub.freebsd.org (Postfix) with ESMTP id 04DAE37B400 for ; Sun, 21 Jan 2001 15:35:22 -0800 (PST) Received: from rfx-216-196-73-168.users.reflexcom.com ([216.196.73.168]) by mailhost01.reflexnet.net with Microsoft SMTPSVC(5.5.1877.197.19); Sun, 21 Jan 2001 15:33:26 -0800 Received: (from cjc@localhost) by rfx-216-196-73-168.users.reflexcom.com (8.11.1/8.11.0) id f0LNZGL31705; Sun, 21 Jan 2001 15:35:16 -0800 (PST) (envelope-from cjc) Date: Sun, 21 Jan 2001 15:35:16 -0800 From: "Crist J. Clark" To: Gustavo Vieira Goncalves Coelho Rios Cc: jim@geekhouse.net, Matthew Emmerton , questions@FreeBSD.ORG Subject: Re: Why make complains ? Message-ID: <20010121153516.Y10761@rfx-216-196-73-168.users.reflex> Reply-To: cjclark@alum.mit.edu References: <3A6A6704.F817CEE4@ifour.com.br> <005201c08366$21f34db0$1200a8c0@gsicomp.on.ca> <3A6A6BB9.AE55918@ifour.com.br> <20010121004620.C2687@envy.geekhouse.net> <3A6B2698.50E20D72@ifour.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <3A6B2698.50E20D72@ifour.com.br>; from gustavo@ifour.com.br on Sun, Jan 21, 2001 at 04:12:40PM -0200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Jan 21, 2001 at 04:12:40PM -0200, Gustavo Vieira Goncalves Coelho Rios wrote: > Jim Mock wrote: > > > > Thanks for your help, but i think that it does not solve the problem. > > > > > > DEP_EXT = FCGI_IO > > > > > > FCGI_IO ?= /usr/local/include > > > > > > main : > > > .for _DEP_EXT in ${DEP_EXT} > > > .if (${_DEP_EXT} == FCGI_IO) > > > echo ${_DEP_EXT} > > > .endif > > > .endfor > > > > > > And now: > > > > > > grios@etosha$ make > > > "Makefile", line 1: Malformed conditional ((FCGI_IO == FCGI_IO)) > > > "Makefile", line 1: Missing dependency operator > > > > Erm, read this and then look at your first line. Do you see the > > difference? > > > > - jim > > Sorry gentleman, > > But this is my first time using make, so i have no ideia about the > problem, > May you give the solution. What I think GVGCR is saying is why does the above fail when, DEP_EXT = FCGI_IO FCGI_IO ?= /usr/local/include main : #.for _DEP_EXT in ${DEP_EXT} #.if (${_DEP_EXT} == FCGI_IO) .if ${DEP_EXT} == FCGI_IO echo ${_DEP_EXT} .endif #.endfor Would work more like he would expect. I think understand what is happening. The ${_DEP_EXT} is getting evaluated "too soon." I am not enough of a BSD-make guru to know exactly how to handle this. I think, DEP_EXT = FCGI_IO FCGI_IO ?= /usr/local/include .for _DEP_EXT in ${DEP_EXT} HOLD=${_DEP_EXT} .if ${HOLD} == FCGI_IO main : echo ${_DEP_EXT} .endif .endfor Might be a klugy way to get around this. That is not well tested. Note the move of the 'main :' target. That was not just for kicks. -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message