Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Oct 2012 15:31:00 -0700
From:      "Simon J. Gerraty" <sjg@juniper.net>
To:        Garrett Cooper <yanegomi@gmail.com>
Cc:        freebsd-hackers@FreeBSD.org, freebsd-arch@FreeBSD.org, sjg@juniper.net
Subject:   Re: Fwd: [CFT/RFC]: refactor bsd.prog.mk to understand multiple programs instead of a singular program
Message-ID:  <20121001223100.E7D0D58093@chaos.jnpr.net>
In-Reply-To: <CDA41F27-73C1-47CF-B84D-2627B1F7E7D8@xcllnt.net>
References:  <CAGH67wRkOmy7rWLkxXnT2155PuSQpwOMyu7dTAKeO1WW2dju7g@mail.gmail.com> <CDA41F27-73C1-47CF-B84D-2627B1F7E7D8@xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Garrett,

>> From: Garrett Cooper <yanegomi@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@freebsd.org
>> Cc: "freebsd-arch@FreeBSD.org Arch" <freebsd-arch@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.

We have an atf.test.mk which leverages that.
It also handles automatically running the tests if building for the
host. This allows us to fail the build if any unit-tests do not pass.

Note, atf.test.mk is loosely derrived from NetBSD's bsd.tests.mk, but
named for what it is (ATF specific tests) since we wanted the
flexibility to have more than one test framework.

--sjg



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