Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Apr 2017 15:51:53 +0000
From:      Brooks Davis <brooks@freebsd.org>
To:        Eric McCorkle <eric@metricspace.net>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@FreeBSD.org>
Subject:   Re: Generating sources during buildworld
Message-ID:  <20170426155153.GA24831@spindle.one-eyed-alien.net>
In-Reply-To: <3f63e99c-9241-380d-2e3a-12ef6a5a2758@metricspace.net>
References:  <3f63e99c-9241-380d-2e3a-12ef6a5a2758@metricspace.net>

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

--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--



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