From owner-freebsd-bugs@FreeBSD.ORG Sun Jan 22 15:28:14 2012 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36C14106566B for ; Sun, 22 Jan 2012 15:28:14 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id B12558FC0A for ; Sun, 22 Jan 2012 15:28:13 +0000 (UTC) Received: by lagv3 with SMTP id v3so375756lag.13 for ; Sun, 22 Jan 2012 07:28:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:x-gm-message-state :content-type; bh=j4Jd/kUzME9N2jkrXHD2ERVyZvkBtTTtwTn5rtfD6ho=; b=Uw8k0MTPoSxMkU8qEUSFQViUdiNFGMm4XHOogjoO8nVYAnWDZSPjtDgyIem6P8zldA dJytYYISLyq9jkn+xtHqQeQsGGPCtdn596BvzYe0xE0gijIQBuTEa7AtyDjmezBNejmO f/JPuso9EYKYTqN8DuJ/ZOTRpDjduan23F+5g= Received: by 10.152.113.2 with SMTP id iu2mr2568495lab.26.1327246092153; Sun, 22 Jan 2012 07:28:12 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.112.25.196 with HTTP; Sun, 22 Jan 2012 07:27:41 -0800 (PST) In-Reply-To: <201201220349.q0M3ntNQ047618@freefall.freebsd.org> References: <201201220349.q0M3ntNQ047618@freefall.freebsd.org> From: Eitan Adler Date: Sun, 22 Jan 2012 10:27:41 -0500 X-Google-Sender-Auth: UjFtng6nhku0YlS_0NHBEIi695o Message-ID: To: freebsd-bugs@freebsd.org X-Gm-Message-State: ALoCoQnmY5DrsE4k2ZGSUUu29GLhLmcaqEyhikrb5SsQ9TCLZizHRQyGgyHdkpWT1RNfVPalmSL5 Content-Type: text/plain; charset=UTF-8 Subject: Re: bin/164361: make handles "+=" incorrectly when the variable has zero length 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: Sun, 22 Jan 2012 15:28:14 -0000 ---------- Forwarded message ---------- From: Jilles Tjoelker Date: Sun, Jan 22, 2012 at 8:24 AM Subject: Re: bin/164361 quick question about make To: Eitan Adler On Sun, Jan 22, 2012 at 12:48:49AM -0500, Eitan Adler wrote: > Is the behavior reported in bin/164361 actually a bug? > http://pubs.opengroup.org/onlinepubs/009695399/utilities/make.html > appears to have comment on += > The patch provided seems to fix the issue for me, but is it correct? I cannot find mention of += in the POSIX specification for make, but there is a proposal to add it at http://austingroupbugs.net/view.php?id=330 . This proposal appears to describe exactly what we do: if the variable already exists, a space is inserted between the old and the new value, even if the old value is null. The same happens in gmake and bmake (with the example). Because an extraneous space is unlikely to cause problems (sh treats two unquoted spaces the same as a single unquoted space), it seems unwise to change this. -- Eitan Adler Source & Ports committer X11, Bugbusting teams