From owner-freebsd-bugs@FreeBSD.ORG Mon Feb 14 07:30:10 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B25F106566C for ; Mon, 14 Feb 2011 07:30:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D09808FC0A for ; Mon, 14 Feb 2011 07:30:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p1E7U9ZO031036 for ; Mon, 14 Feb 2011 07:30:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p1E7U9la031034; Mon, 14 Feb 2011 07:30:09 GMT (envelope-from gnats) Resent-Date: Mon, 14 Feb 2011 07:30:09 GMT Resent-Message-Id: <201102140730.p1E7U9la031034@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Garrett Cooper Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19FF3106566C for ; Mon, 14 Feb 2011 07:21:03 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 07E568FC17 for ; Mon, 14 Feb 2011 07:21:03 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p1E7L2pY044004 for ; Mon, 14 Feb 2011 07:21:02 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p1E7L2DA044003; Mon, 14 Feb 2011 07:21:02 GMT (envelope-from nobody) Message-Id: <201102140721.p1E7L2DA044003@red.freebsd.org> Date: Mon, 14 Feb 2011 07:21:02 GMT From: Garrett Cooper To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/154769: [make] :L modifier broken in quoted strings X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Feb 2011 07:30:10 -0000 >Number: 154769 >Category: bin >Synopsis: [make] :L modifier broken in quoted strings >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Feb 14 07:30:09 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Garrett Cooper >Release: CURRENT / 8.1-RELEASE >Organization: n/a >Environment: FreeBSD bayonetta.local 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r218082M: Sun Jan 30 00:20:08 PST 2011 gcooper@bayonetta.local:/usr/obj/usr/src/sys/BAYONETTA amd64 FreeBSD toaster.local 8.1-RELEASE FreeBSD 8.1-RELEASE #0 r216175: Mon Dec 6 01:40:05 PST 2010 gcooper@toaster.local:/usr/obj/usr/src/sys/BREADBOX i386 >Description: Quoted variables don't appear to expand properly with some operators like :L at least. Both CURRENT and 8.1-RELEASE show the same behavior with FreeBSD's make, which is the conditional appears "malformed"... > cat Makefile.1 FOO?= bar .if "${FOO:L}" == "bar" .warning "match!" .else .warning "no match!" .endif > make -f Makefile.1 FOO=bar "Makefile.1", line 2: Malformed conditional ("${FOO:L}" == "bar") "Makefile.1", line 3: "match!" .. unquoting the variable works though without the malformed conditional noise... > cat Makefile.2 FOO?= bar .if ${FOO:L} == "bar" .warning "match!" .else .warning "no match!" .endif > make -f Makefile.2 FOO=bar "Makefile", line 3: warning: "match!" make: no target to make. bmake (NetBSD's make) doesn't have this malformed conditional issue... $ bmake -f Makefile.1 FOO=bar bmake: "Makefile.1" line 6: warning: "no match!" .. but the problem is that bmake doesn't correctly evaluate the expansion to be true when quoted or not quoted; that's a separate bug for the NetBSD folks though. >How-To-Repeat: Repeat as shown above. >Fix: >Release-Note: >Audit-Trail: >Unformatted: