On Thu, 4 Mar 2010 15:21:34 +0100 Marc Espie <es...@nerim.net> wrote:
> On Thu, Mar 04, 2010 at 06:14:52AM -0800, J.C. Roberts wrote: > > On Thu, 4 Mar 2010 09:38:12 +0100 Marc Espie <es...@nerim.net> > > wrote: > > > > > On Wed, Mar 03, 2010 at 04:46:18PM -0800, J.C. Roberts wrote: > > > > Boolean variables should be set to Yes instead of simply > > > > being defined, for uniformity and future compatibility. > > > > > > This takes time to finish changing. > > > > > > > 1.) The majority of the scripts in ports/infrastructure do not > > > > bother to check /etc/mk.conf at all, so saying "or" and "also" > > > > seems unwise without context. The best answer seems to be to > > > > preface the statement with, "When running make ..." > > > > > > This ought to change. It's just a bit more expensive to do it in > > > scripts, as it requires running make. > > > > > > > The first hurdle for me is checking to make sure all the scripts use > > the environment variables. Once those patches are in, we can revisit > > the /etc/mk.conf, make, and performance issues. > > A lot of those scripts are old stuff, which is probably going to > vanish soon, since the newer infrastructure handles things in a > consistent way. > I noticed some of it was old, but I didn't know if it was sill being used. Please let me know what, if anything, under the /infrastructure/ that you'd like me to fix, or better, what stuff you plan to toss out. > > > mk.conf is *NOT* a config file, it is a piece of Makefile ! > > > > > > > Yep, it's a Makefile typically used to store local configuration. ;) > > And the only way to parse it correctly is... to run make. Which can be > a bit expensive. But this point has been noted, and I intend to see > whether I can make things a bit more consistent after 4.7 is out the > door. > > > I had a funny feeling about the capitalization. It seemed someone > > had obviously used "Yes" by intent in spite of the precedence for > > using "YES" --I left the capitalization as you prefer, but made sure > > everything is quoted identically with straight double quotes. > > I actually don't see the points of double quotes. Why double quotes ? > In makefiles, or shell script, you often do not need any quotes at > all. The .Sq macro was chosen on purpose, because it does not match > actual syntax, and forces people to think about what they're about to > do. With a hanging balance scale, if you put the number of bugs caused by using quotes where they should not be used on one side, and the number of bugs caused by failing to use quotes where they were needed on the other side, the scale would undoubtedly tip towards the latter. Though you may have wanted to use the .Sq macro by intent on the "Yes" value, it didn't quite work out that way: .Dv Used 7 Times (Incorrect) .Sq Used 5 Times .Dq Used 1 Time Marc, I mean no offense, but do you want people to learn *from* the examples you give them, or learn *that* the examples you give are usually wrong? Imagine it this way; you've come to a "T" in the road and see a white road sign containing a big red circle around a black arrow turning right, and the text reads "No Left Turn" --Though some people will notice and understand the meaning of missing red slash through the circle, most people will just be confused and probably get it wrong. I gave up on trying to force people to think a long time ago; the best I can do is give them a clear example and hope they learn from it. None the less, if you really want .Sq used, I'll do it again. jcr