Fwd: [CFT/RFC]: refactor bsd.prog.mk to understand multiple
programs instead of a singular program
John Baldwin
jhb at freebsd.org
Tue Oct 2 12:40:53 UTC 2012
On Monday, October 01, 2012 6:31:00 pm Simon J. Gerraty wrote:
> Hi Garrett,
>
> >> From: Garrett Cooper <yanegomi at gmail.com>
> >> Subject: [CFT/RFC]: refactor bsd.prog.mk to understand multiple =
> >programs instead of a singular program
> >> Date: September 2, 2012 11:01:09 PM PDT
> >> To: freebsd-hackers at freebsd.org
> >> Cc: "freebsd-arch at FreeBSD.org Arch" <freebsd-arch at freebsd.org>
> >>=20
> >> Hello,
> >> I've been a bit busy working on porting over ATF from NetBSD, and
>
> Thanks, we've been using ATF in Junos for a while and glad to see it
> being imported to FreeBSD.
>
> >> one of the pieces that's currently not available in FreeBSD that's
> >> available in NetBSD is the ability to understand and compile multiple
> >> programs. In order to do this I had to refactor bsd.prog.mk (a lot).
>
> A change like this to bsd.prog.mk can have considerable fallout.
> Eg. any makefile that tweaks OBJS is suddenly out of luck.
>
> Not to mention the fact that bsd.prog.mk goes from being relatively
> simple, to unspeakably hard to read, and all for rather limited return.
>
> Apart from ATF, is there any huge demand for building multiple progs in
> the same directory?
>
> FWIW we use progs.mk (as bsd.progs.mk) from
> ftp://ftp.netbsd.org/pub/NetBSD/misc/sjg/mk-*.tar.gz
> It isn't ideal, but it certainly avoids a lot of churn and complexity
> for what is essentially a corner case.
This sounds like a superior approach. It doesn't break any current use
cases while giving the ability to build multiple programs in the few
places that need it. It sounds like there are a few places under gnu/
from Garrett's reply that might be able to make use of this as well.
BTW, one general comment. There seem to be two completely independent
groups of folks working on ATF (e.g. there have been two different
imports of ATF into the tree in two different locations IIRC, and now
we have two different sets of patches to our system makefiles).
Are these two groups talking to each other at all? I know in May that
many folks (certainly multiple vendors) are interested in ATF, and it
seems that both Juniper and Isilon have ported ATF internally. It seems
that it might be good for the two groups to work together to avoid
stomping on each other's toes. It seems there are some differences in
the two approaches that merit working out to avoid a lot of wasted
effort on both sides.
Do we already have a freebsd-atf@ mailing list? If not, perhaps we
should create one and start these discussions there?
--
John Baldwin
More information about the freebsd-hackers
mailing list