From owner-freebsd-hackers@freebsd.org Wed Apr 26 15:51:55 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2A38D515DC for ; Wed, 26 Apr 2017 15:51:55 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C224E646 for ; Wed, 26 Apr 2017 15:51:55 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 847A55A9F15; Wed, 26 Apr 2017 15:51:53 +0000 (UTC) Date: Wed, 26 Apr 2017 15:51:53 +0000 From: Brooks Davis To: Eric McCorkle Cc: "freebsd-hackers@freebsd.org" Subject: Re: Generating sources during buildworld Message-ID: <20170426155153.GA24831@spindle.one-eyed-alien.net> References: <3f63e99c-9241-380d-2e3a-12ef6a5a2758@metricspace.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nFreZHaLTZJo0R7j" Content-Disposition: inline In-Reply-To: <3f63e99c-9241-380d-2e3a-12ef6a5a2758@metricspace.net> User-Agent: Mutt/1.8.0 (2017-02-23) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2017 15:51:56 -0000 --nFreZHaLTZJo0R7j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 26, 2017 at 11:40:10AM -0400, Eric McCorkle wrote: > I'm looking for some help with the build system, specifically how to > generate sources for a library that will then be used to build the librar= y. >=20 > Basically, I want to have a tool which collects public key certificates, > then converts them into .c files which are used to build both loader and > the kernel. >=20 > Knowing how LLVM works, it seems that this is possible; however, I've > been unable to find documentation on how to write a makefile that > accomplishes this. Can someone point me to documentation or examples on > how to do this? It the tool is a script then take a look at usr.bin/getaddrinfo/Makefile (make sure it's from the tip of head, the initial version had rather poor style.) If the tool is a compiled program, then things get more complicated. An example of this is usr.bin/fortune/strfile/ and usr.bin/fortune/datfiles/. For a new program, you'd need to make your tool a bootstrap tool in Makefile.inc1. -- Brooks --nFreZHaLTZJo0R7j Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJZAMIYAAoJEKzQXbSebgfAnjAIAI2cjIB3RbDVvBkFJB7/o+Th OQ8RyX1wk3vRMbCouQppbByGqGbAZ1NEBPsh732rAjji81VhbhrQSECSxpwj2W82 SgK4u6LhasIQeM0zSl/2ItQku9zcWZJJ+Jt/p9JznHMgQznR/Bz/QQWXYRCCJcxU PrdyL8Zrsq7rr079ZdU9qpfQAeK17oawmcODCFgLnCtkt+K2bAvlXxsbrf369BZ1 f14G4TI7LFfkQU6HCEihAi9IMEsgc9FDPx0zhZeViFc/5PwXrWbQ4yhaMQnpju42 Mq+KK6U6XYbLqo6eg1uln/7prjIhvI2OEp+aZI2GJmu8AsxLScX9lEZ5IBI9Hy0= =KFgx -----END PGP SIGNATURE----- --nFreZHaLTZJo0R7j--