Date: Fri, 30 Nov 2012 12:36:55 +1100 (EST) From: Bruce Evans <brde@optusnet.com.au> To: Bruce Evans <brde@optusnet.com.au> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Eitan Adler <eadler@FreeBSD.org> Subject: Re: svn commit: r243670 - head/share/man/man5 Message-ID: <20121130121426.X1735@besplex.bde.org> In-Reply-To: <20121130121105.W1707@besplex.bde.org> References: <201211291251.qATCpA7w078277@svn.freebsd.org> <20121130110154.E1441@besplex.bde.org> <CAF6rxgkUVrWbOU2i2=16St1iyWJskeULpWjDT5hEZi0aX%2BsHCQ@mail.gmail.com> <20121130121105.W1707@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121130121426.X1735>