From owner-cvs-all Sat May 30 13:42:13 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA29795 for cvs-all-outgoing; Sat, 30 May 1998 13:42:13 -0700 (PDT) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.15.68.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA29772; Sat, 30 May 1998 13:42:09 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id GAA13569; Sun, 31 May 1998 06:42:06 +1000 Date: Sun, 31 May 1998 06:42:06 +1000 From: Bruce Evans Message-Id: <199805302042.GAA13569@godzilla.zeta.org.au> To: current@FreeBSD.ORG, peter@netplex.com.au Subject: Re: elf vs. bsd.*.mk Cc: committers@FreeBSD.ORG Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk >For starters, sys.mk is automatically pulled in at make(1) startup time to >setup the base, posix and generally widely accepted default rules and >variables. > >However, at the end, it's now pulling in bsd.own.mk and /etc/make.conf (!). It's done that for years, and I've been compaining about it for years. rgrimes added the bsd.own.mk hack and phk added the /etc/make.conf hack. >This is polluting the default make environment up with all sorts of crap. >Sure, it means more when the .include stuff is activated at the >end, but there's no reason for it to be there when using non-bmake >Makefiles. However, there seems to be no better place than /etc/make.conf to set some variables. Some have to be set early, and it's too hard to set them on the command line or in a few thousand Makefiles. >The other *BSD's don't have this problem. They pull in make.conf in >bsd.own.mk, and all the public bsd.{prog,lib,doc,..etc..}.mk files are >responsible for pulling in bsd.own.mk (instead of sys.mk). This means >that STRIP, BINOWN etc are not defined until the bsd.prog.mk (or whatever) >pulls it in. Another interesting point is that despite moving repetitive code to bsd.own.mk etc., we have 5 times as much code in *.mk as Lite2 (not counting ports). Just the comments in bsd.own.mk are larger than most Lite2 mk files. bsd.own.mk can probably be moved to the end easily enough. I was planning to merge it with bsd.obj.mk and rename the result to something like bsd.misc.mk. This file would contain everything that applies to all types of bsd.*mk files and can be specified last. >However, I've just realized another way of doing it that doesn't cause >such a dramatic disturbance to the *.mk files, and hence is less likely to >badly break things.... and is much simpler (damn!!!!!). > >So, I thought I'd see what general feelings were on the subject. Do we >really want things like ${LIBDIR} defined for *all* makefiles, including >non bsd.prog.mk etc Makefiles. Also, make.conf is also globally visible We want them defined for all bsd.*.mk files if they are "constant". BINDIR can not be defaulted because it varies within a single world, and LIBDIR is variable if you want it to put {aout,elf} in it. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message