Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 03 Aug 2000 13:31:03 +0200
From:      Sheldon Hearn <sheldonh@uunet.co.za>
To:        hackers@FreeBSD.org
Subject:   Berkeley make: evaluations inside for loops
Message-ID:  <76800.965302263@axl.ops.uunet.co.za>

next in thread | raw e-mail | index | archive | help

Hi folks,

Can anyone explain to me why the first Makefile works and yet the second
Makefile doesn't?  The second Makefile produces the following error
messages on ``make test''

| "Makefile", line 1: Malformed conditional (widget == ${BAZ})
| "Makefile", line 1: Need an operator
| "Makefile", line 3: if-less endif
| "Makefile", line 3: Need an operator
| "Makefile", line 9: Need an operator
| make: fatal errors encountered -- cannot continue

#Makefile1:
FOO=	widget
BAZ=	widget
BAR=
.if ${FOO} == ${BAZ}
BAR=	equal
.endif

test:
	echo BAR=${BAR}

#Makefile2:
BAZ=	widget
.for FOO in ${BAZ}
.if ${FOO} == ${BAZ}
BAR=	equal
.endif
.endfor

test:
	echo BAR=${BAR}

Ciao,
Sheldon.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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