From owner-freebsd-bugs Fri Jan 18 14: 0: 6 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 6600B37B41C for ; Fri, 18 Jan 2002 14:00:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0IM02f31746; Fri, 18 Jan 2002 14:00:02 -0800 (PST) (envelope-from gnats) Date: Fri, 18 Jan 2002 14:00:02 -0800 (PST) Message-Id: <200201182200.g0IM02f31746@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Crist J . Clark" Subject: Re: bin/34032: make fails to evaluate some reasonable conditional expressions Reply-To: "Crist J . Clark" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/34032; it has been noted by GNATS. From: "Crist J . Clark" To: Alan Eldridge 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