From owner-svn-src-head@FreeBSD.ORG Fri Nov 30 01:37:07 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 95BB3312; Fri, 30 Nov 2012 01:37:07 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail13.syd.optusnet.com.au (mail13.syd.optusnet.com.au [211.29.132.194]) by mx1.freebsd.org (Postfix) with ESMTP id 27A4C8FC14; Fri, 30 Nov 2012 01:37:06 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail13.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id qAU1atk9018159 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Nov 2012 12:36:57 +1100 Date: Fri, 30 Nov 2012 12:36:55 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans Subject: Re: svn commit: r243670 - head/share/man/man5 In-Reply-To: <20121130121105.W1707@besplex.bde.org> Message-ID: <20121130121426.X1735@besplex.bde.org> References: <201211291251.qATCpA7w078277@svn.freebsd.org> <20121130110154.E1441@besplex.bde.org> <20121130121105.W1707@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=e5de0tV/ c=1 sm=1 a=bvcLnixDC-gA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=TdF0Wd7UlPIA:10 a=hT-wbfSIKCv8klB7IyYA:9 a=CjuIK1q_8ugA:10 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Eitan Adler X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Nov 2012 01:37:07 -0000 On Fri, 30 Nov 2012, Bruce Evans wrote: > On Thu, 29 Nov 2012, Eitan Adler wrote: >> ... >> The reference to BDECFLAGS actually isn't true - there is no such >> variable. There is a *commented out* version which I had planned to >> email you about at some point. > > The whole file src/share/examples/etc consists of commented-out examples > and comments about the examples, with most of its value in the latter. PS: ... with many bad examples and no comments about the difficulty of changing or extending the defaultes in sys.mk using /etc/make.conf or the bugs if the bad examples are uncommented. Redefining CFLAGS is especially problematic. sys.mk uses "?=" on CFLAGS so that the command line has precedence. That doesn't work in /etc/make.conf, since CFLAGS is always defined when it is included. The correct fix is to include /etc/make.conf near the start of sys.mk and use "?=" in it. I'm not sure why that wasn't always done, but seem to remember some technical problems with this order too. I just use ifdefs like the following in /etc/make.conf: % .if ${CFLAGS} == "-O -pipe" % CFLAGS+= -mcpu=athlon-xp % .endif This adds to CFLAGS if and only if CFLAGS is identical to the default in sys.mk (with older sys.mk that hasn't been broken to default to -O2). % # CPUTYPE= athlon-xp I don't believe in using CPUTYPE or bsd.cpu.mk. If you use them, then the it becomes even more difficult to change or extend the defaults in all the nested include files. You have to look up the undocumented implementation details for the defaults and figure out where to put the changes. bsd.cpu.mk happens to be included after /etc/make.conf, so extending it in /etc/make.conf is impossible. It probably cannot be controlled by earlier settings, short of turning it all off. Bruce