Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 May 1998 06:42:06 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        current@FreeBSD.ORG, peter@netplex.com.au
Cc:        committers@FreeBSD.ORG
Subject:   Re: elf vs. bsd.*.mk
Message-ID:  <199805302042.GAA13569@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>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 <bsd.*.mk> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805302042.GAA13569>