From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 6 22:25:33 2013 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BD3FCFEA for ; Wed, 6 Nov 2013 22:25:33 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 731DA23BF for ; Wed, 6 Nov 2013 22:25:32 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.7/8.14.7) with ESMTP id rA6MPVYF024074 for ; Wed, 6 Nov 2013 16:25:31 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.7/8.14.7/Submit) id rA6MPVlM024073 for hackers@FreeBSD.org; Wed, 6 Nov 2013 16:25:31 -0600 (CST) (envelope-from brooks) Date: Wed, 6 Nov 2013 16:25:31 -0600 From: Brooks Davis To: hackers@FreeBSD.org Subject: Re: Using bsd.prog.mk in a project with multiple binaries Message-ID: <20131106222531.GF91063@lor.one-eyed-alien.net> References: <20131106164526.GV11443@kiwi.coupleofllamas.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oFbHfjnMgUMsrGjO" Content-Disposition: inline In-Reply-To: <20131106164526.GV11443@kiwi.coupleofllamas.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 22:25:33 -0000 --oFbHfjnMgUMsrGjO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 06, 2013 at 08:45:26AM -0800, R. Tyler Croy wrote: > Howdy, I'm trying to find some documentation or examples of using bsd.pro= g.mk > inside of a project with multiple binaries that need to get created. I'm = able > to shuffle the manpages and source code into directories to where each bi= nary > can have a Makefile, but I cannot find anything in the Developer's Handbo= ok > discussing such a project layout. E.g.: >=20 > -daemon.git/ > -daemon/ > daemon.man.1 > daemon.c > -daemontool/ > daemontool.man.1 > daemontool.c >=20 >=20 > Does one simply use a parent Makefile which calls into each directory? Or= is > there some other .mk file with helpers for this? You can use bsd.subdir.mk. See usr.bin/clang for a somewhat complicated example. > A related question would be, does this even make snese as far as a > project layout is concerned? This project I intend on creating a port > for once it's further along, and I'd like to avoid painting myself > into any cornners with the makefiles now if I can avoid it. This seems plusable as a layout. Note that while you need one Makefile per program, you don't necessicairly need to spread the code out if you don't want to. If you'd rather keep the source files in one place you can use .PATH: directives to access them from a central location. -- Brooks --oFbHfjnMgUMsrGjO Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFSesHaXY6L6fI4GtQRAh8iAKDJ04pNf+UQC+CM83KVRgJGfSoZnwCeKDqR NEa0W0QkHicSWPZFe/aFuyg= =9bxp -----END PGP SIGNATURE----- --oFbHfjnMgUMsrGjO--