From owner-freebsd-hackers Thu Aug 3 4:31:11 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from axl.ops.uunet.co.za (axl.ops.uunet.co.za [196.31.2.163]) by hub.freebsd.org (Postfix) with ESMTP id 2F3BB37B5EC for ; Thu, 3 Aug 2000 04:31:07 -0700 (PDT) (envelope-from sheldonh@axl.ops.uunet.co.za) Received: from sheldonh (helo=axl.ops.uunet.co.za) by axl.ops.uunet.co.za with local-esmtp (Exim 3.16 #1) id 13KJDL-000Jyj-00 for hackers@FreeBSD.org; Thu, 03 Aug 2000 13:31:03 +0200 From: Sheldon Hearn To: hackers@FreeBSD.org Subject: Berkeley make: evaluations inside for loops Date: Thu, 03 Aug 2000 13:31:03 +0200 Message-ID: <76800.965302263@axl.ops.uunet.co.za> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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