Date: Fri, 18 Jan 2002 14:00:02 -0800 (PST) From: "Crist J . Clark" <cjc@FreeBSD.ORG> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/34032: make fails to evaluate some reasonable conditional expressions Message-ID: <200201182200.g0IM02f31746@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/34032; it has been noted by GNATS.
From: "Crist J . Clark" <cjc@FreeBSD.ORG>
To: Alan Eldridge <ports@geeksrus.net>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG, sobomax@FreeBSD.ORG
Subject: Re: bin/34032: make fails to evaluate some reasonable conditional expressions
Date: Fri, 18 Jan 2002 13:53:02 -0800
On Fri, Jan 18, 2002 at 09:56:43AM -0500, Alan Eldridge wrote:
[snip]
> First, we have to decide what is broken.
>
> 1. The evaluation should be short-circuited once the value is known.
>
> OR
>
> 2. The :L and :U (and generally, all the :X suffix) operators should
> apply to an undefined variable as if it was defined to "".
>
> Which one is right? I think (1) is right; (2) introduces "silent
> failure" cases where error diagnostics should be produced.
According to make(1), (1) is right,
As in C, make will only evaluate a conditional as far as is necessary to
determine its value.
In this case, make(1) should never be evauating the "broken"
code. Since the Makefile syntax of the conditional as a whole is OK,
provided you don't actually try to evaluate it, I would expect this to
work.
--
Crist J. Clark | cjclark@alum.mit.edu
| cjclark@jhu.edu
http://people.freebsd.org/~cjc/ | cjc@freebsd.org
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201182200.g0IM02f31746>
