From owner-freebsd-arch@FreeBSD.ORG Mon Oct 1 22:31:51 2012 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 755E4106566C; Mon, 1 Oct 2012 22:31:51 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from exprod7og121.obsmtp.com (exprod7og121.obsmtp.com [64.18.2.20]) by mx1.freebsd.org (Postfix) with ESMTP id 416EE8FC14; Mon, 1 Oct 2012 22:31:49 +0000 (UTC) Received: from P-EMHUB03-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob121.postini.com ([64.18.6.12]) with SMTP ID DSNKUGoZ1ekWA20MmS+tkbQfzOTwPUxM0ev4@postini.com; Mon, 01 Oct 2012 15:31:51 PDT Received: from magenta.juniper.net (172.17.27.123) by P-EMHUB03-HQ.jnpr.net (172.24.192.33) with Microsoft SMTP Server (TLS) id 8.3.213.0; Mon, 1 Oct 2012 15:31:02 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id q91MV1h39000; Mon, 1 Oct 2012 15:31:01 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id E7D0D58093; Mon, 1 Oct 2012 15:31:00 -0700 (PDT) To: Garrett Cooper In-Reply-To: References: Comments: In-reply-to: Marcel Moolenaar message dated "Mon, 01 Oct 2012 12:17:52 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Mon, 1 Oct 2012 15:31:00 -0700 Message-ID: <20121001223100.E7D0D58093@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain 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 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 22:31:51 -0000 Hi Garrett, >> From: Garrett Cooper >> 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" >>=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