Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 May 1998 02:10:42 +0800
From:      Peter Wemm <peter@netplex.com.au>
To:        Mike Smith <mike@smith.net.au>
Cc:        current@FreeBSD.ORG, committers@FreeBSD.ORG
Subject:   Re: elf vs. bsd.*.mk 
Message-ID:  <199805301810.CAA24860@spinner.netplex.com.au>
In-Reply-To: Your message of "Sat, 30 May 1998 09:42:46 MST." <199805301642.JAA06203@antipodes.cdrom.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Mike Smith wrote:
> First, a big cheer for the work you've been doing on all this!
> 
> > 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 
> > as well.  I'm sure this can't be good for posix compliance etc.  Since 
> > I've finished 95% of the work so far, should I press on and clean up the 
> > loose ends, or should I put it in the 'too hard' basket for the time being 
> > and try the simple way out :-).
> 
> That depends on whether the simple way out will work.  8)  If it's the 
> "right" way, then of course it's worth doing.  How about some more 
> details on it?

Specifically, bsd.own.mk does this:

.if ${BINFORMAT} == aout
LIBDIR?=        /usr/lib/aout
.else
LIBDIR?=        /usr/lib
.endif

Which means...  The condition is processed before the Makefile is read, so 
the makefile cannot "change" BINFORMAT and get a coherent set of changes.  
ie: everything except LIBDIR changes.

So, the cheap hack way out is this:

LIBDIR?=	/usr/lib${LIBSUBDIR}

and then define LIBSUBDIR later on in the bsd.*.mk files.  ie: set it to 
"" for elf, or "/aout" for a.out, or even "/compat" if needed.  This might 
make a few things easier in some other places too where we have gone to a 
lot of trouble with this particular variable.

Yes, I was peeved when I realized this. :-)  I started trying to get my
dual-mode elf system to build world around 13 hours ago (and working on NFS
stuff while waiting for the next compile to fail :-)

The other way:
peter@beast[2:04am]~src/share/mk-266> cvs diff -c | wc -l
cvs diff: Diffing .
     860
peter@beast[2:04am]~src/share/mk-267> cvs diff -u | wc -l
cvs diff: Diffing .
     700

Plus 20 other Makefile tweaks around the tree.  Luckily, a number of the 
changes are applicable either way, so it's not a total loss.

On one hand, the one-line change is simpler, but I think the reshuffle is 
more "right", although it has very little effect on how the bmakefiles see 
the world.  It's more of a cleanliness win on non-BSD makefiles.

Cheers,
-Peter



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



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