[PATCH v1 27/30] configure: Add conditional platform builds

Geoff Levand geoff at infradead.org
Tue Jul 31 05:36:10 AEST 2018


Hi Brett,

On 07/29/2018 08:30 PM, Brett Grandbois wrote:
> I like the direction this is going.  One suggestion I might make is that as platforms are effectively independent modules anyway with their own registration interface, maybe also have an explicit 'use these platform files' configure option?  Then it would be easy for developers to add in their custom platforms at build time without having to modify configure/makefiles.
> 
> So on the command line something like:
> 
> configure --enable-explicit-platforms=foo,/some/abs/path/bar.c --enable-explicit-platform-libs=baz
> 
> eventually turns into something like this:
> 
> discover_platform_ro_SOURCES += discover/platform-foo.c /some/abs/path/bar.c
> 
> discover_platform_ro_LDFLAGS += -lbaz
> 
> After a bit more configure/Makefile magic that I know I'm glossing over, but this is just to illustrate the idea for comment.
> 
> The libs is of course if your platform module requires something outside the main lib list, depending on how far to take this.

What you suggest does not lend itself to autoconf/automake.
I don't think there would be enough use of it to warrant
creating a custom config system.  See:

 https://www.gnu.org/software/autoconf/manual/autoconf.html#Site-Configuration

-Geoff


More information about the Petitboot mailing list