Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jan 2001 15:35:16 -0800
From:      "Crist J. Clark" <cjclark@reflexnet.net>
To:        Gustavo Vieira Goncalves Coelho Rios <gustavo@ifour.com.br>
Cc:        jim@geekhouse.net, Matthew Emmerton <matt@gsicomp.on.ca>, questions@FreeBSD.ORG
Subject:   Re: Why make complains ?
Message-ID:  <20010121153516.Y10761@rfx-216-196-73-168.users.reflex>
In-Reply-To: <3A6B2698.50E20D72@ifour.com.br>; from gustavo@ifour.com.br on Sun, Jan 21, 2001 at 04:12:40PM -0200
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010121153516.Y10761>