Using bsd.prog.mk in a project with multiple binaries

Alan Somers asomers at freebsd.org
Thu Nov 7 03:13:24 UTC 2013


On Wed, Nov 6, 2013 at 4:42 PM, Joerg Sonnenberger
<joerg at britannica.bec.de> wrote:
> On Thu, Nov 07, 2013 at 12:32:29AM +0100, Luigi Rizzo wrote:
>> I was hoping that someday we could have support in bsd.prog.mk
>> to handle multiple program names in ${PROG}, perhaps expanding
>> the dependencies using OBJS.prog1 OBJS.prog2 ... etc
>
> NetBSD supports PROGS for this purpose.

In fact, Simon and Garrett recently ported NetBSD's mechanism.  It's
called bsd.progs.mk and it's in FreeBSD/head and stable/10.  It works
much like bsd.prog.mk.  Basic usage is like this:

PROGS= foo bar baz
SRCS.foo= foo.c common.c
SRCS.bar= bar.c common.c
SRCS.baz= baz.c common.c

It's still something of a work in progress.  The exact usage is likely
to change for awhile.

-Alan


More information about the freebsd-hackers mailing list