From owner-cvs-all Sat May 30 11:11:31 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA10430 for cvs-all-outgoing; Sat, 30 May 1998 11:11:31 -0700 (PDT) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from spinner.netplex.com.au (spinner.netplex.com.au [202.12.86.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA10423; Sat, 30 May 1998 11:11:27 -0700 (PDT) (envelope-from peter@netplex.com.au) Received: from spinner.netplex.com.au (localhost [127.0.0.1]) by spinner.netplex.com.au (8.8.8/8.8.8/Spinner) with ESMTP id CAA24860; Sun, 31 May 1998 02:10:43 +0800 (WST) (envelope-from peter@spinner.netplex.com.au) Message-Id: <199805301810.CAA24860@spinner.netplex.com.au> X-Mailer: exmh version 2.0.2 2/24/98 To: Mike Smith cc: current@FreeBSD.ORG, committers@FreeBSD.ORG Subject: Re: elf vs. bsd.*.mk In-reply-to: Your message of "Sat, 30 May 1998 09:42:46 MST." <199805301642.JAA06203@antipodes.cdrom.com> Date: Sun, 31 May 1998 02:10:42 +0800 From: Peter Wemm Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk 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 cvs-all" in the body of the message