From owner-cvs-all@FreeBSD.ORG Fri Jun 17 03:57:37 2011 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 360DB106566B; Fri, 17 Jun 2011 03:57:37 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id DD40A8FC08; Fri, 17 Jun 2011 03:57:36 +0000 (UTC) Received: by pvg11 with SMTP id 11so2089794pvg.13 for ; Thu, 16 Jun 2011 20:57:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=8TNpK3Y/dpLH883TJ5T7PgcuoBU+quFlEomHvbZ2mOU=; b=p2VxR0KL5hbGbQYsGmlaZx/RMy2Q/H+jBJoxsQlCEzUpo4BZD5b/Pdrbrm1K5xo7cC 3r5X66lC+lA3rnxdAADagtLhhJMdcotRAKf1YANj63j00YhPPyMzvDIQNLIyzmRfdk0V MICMpzVHS4cDQvsgVP9oVeDJ4IPbTqXjpokw0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=VnNiUZg2pcNWqRyC3moAXDzQdq7o7vAGm8qTzn6xkBsUix58njFRbVMZ6JgxhvD7FJ i+rdECt/EoUA51bREIFIqSmai2nGSEfHnqM/nryBjXN48xMczTxG06gvJ54yVIBgqLsp DNUr1mLNDSD2zbAY+7OLgTMIkdgzrjFAq8pNM= MIME-Version: 1.0 Received: by 10.68.68.74 with SMTP id u10mr489594pbt.101.1308283056139; Thu, 16 Jun 2011 20:57:36 -0700 (PDT) Received: by 10.68.40.7 with HTTP; Thu, 16 Jun 2011 20:57:36 -0700 (PDT) In-Reply-To: <20110617004742.GD19139@magic.hamla.org> References: <201106160842.p5G8gS6T054738@repoman.freebsd.org> <20110616164733.GA40181@FreeBSD.org> <20110617004742.GD19139@magic.hamla.org> Date: Fri, 17 Jun 2011 03:57:36 +0000 Message-ID: From: "b. f." To: Sahil Tandon Content-Type: text/plain; charset=ISO-8859-1 Cc: Wen Heping , cvs-ports@freebsd.org, Alexey Dokuchaev , cvs-all@freebsd.org, ports-committers@freebsd.org Subject: Re: cvs commit: ports/sysutils/tmux Makefile X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bf1783@gmail.com List-Id: **OBSOLETE** CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2011 03:57:37 -0000 On 6/17/11, Sahil Tandon wrote: > On Thu, 2011-06-16 at 16:47:33 +0000, Alexey Dokuchaev wrote: > >> On Thu, Jun 16, 2011 at 08:42:28AM +0000, Wen Heping wrote: >> > wen 2011-06-16 08:42:28 UTC >> > >> > Modified files: >> > sysutils/tmux Makefile >> > Log: >> > - Fix build when CFLAGS is set in /etc/make.conf >> >> Hmm, default CPPFLAGS is empty. Judging just from the diff, instead of >> introducing EXTRA_CPPFLAGS, setting CPPFLAGS instead of CFLAGS (which is >> bogus in the first place: -I is preprocessor flag) should be enough (no >> MAKE_ENV adjustment and extra REINPLACE_CMD hack would be required in this >> case as well). I am missing something obvious here? > > Because of the way upstream Makefile handles CPPFLAGS, it is not so > straightforward. This was discussed on freebsd-ports: > > http://lists.freebsd.org/pipermail/freebsd-ports/2011-June/068218.html > http://lists.freebsd.org/pipermail/freebsd-ports/2011-May/067930.html But this does not seem so different from the many other ports that set or alter variables in the port Makefile. If a user overrides these changes in an automatically and recursively-included Makefile like __MAKE_CONF, or on the command-line, it it the user's problem. Users should not pollute their port builds by unconditionally defining variables in __MAKE_CONF, and I don't think that we should add elaborations to ports to avoid such mistakes. If the submitter of ports/157918 wanted non-default CFLAGS for sysutils/tmux, and he wanted to define them in __MAKE_CONF, rather than in the other automatically-included Makefiles (${.CURDIR}/../Makefile.inc, ${MASTERDIR}/../Makefile.inc, ${MASTERDIR}/Makefile.${ARCH}-${OPSYS}, ${MASTERDIR}/Makefile.${OPSYS}, ${MASTERDIR}/Makefile.${ARCH}, or ${MASTERDIR}/Makefile.local), then he could have defined them conditionally. If he doesn't, he will break many other ports besides systutils/tmux. So it seems to me that just fixing CPPFLAGS here is better. b.