[ccan] [PATCH v2 12/13] Makefile: Define CFLAGS_FORCE_C_SOURCE macro
Rusty Russell
rusty at rustcorp.com.au
Wed Oct 26 13:49:03 AEDT 2016
David Gibson <david at gibson.dropbear.id.au> writes:
> On Tue, Sep 27, 2016 at 03:48:33PM +0930, Paul 'Rusty' Russell wrote:
>> David Gibson <david at gibson.dropbear.id.au> writes:
>> > On Thu, Sep 22, 2016 at 09:33:15PM -0600, Kevin Locke wrote:
>> >> This macro holds the C compiler flag(s) to force input files to be
>> >> recognized as C sources regardless of extension. It is defined to allow
>> >> overriding on the make command line.
>> >>
>> >> Signed-off-by: Kevin Locke <kevin at kevinlocke.name>
>> >
>> > So.. this approach works.
>> >
>> > But I've been wondering for a while if the weird thing we do of having
>> > the _info files not have a .c extension is a good idea.
>> >
>> > I think the underscore enough is probably enough to mark those
>> > special, so things might be less messy if we just called them _info.c.
>> >
>> > Rusty, thoughts?
>>
>> _info.c breaks the "compile *.c to get the module" rule, though.
>
> Which is already broken by modules which have a non-trivial Makefile
> fragment (like ntdb).
Not at all! ntdb's Makefile is a relic from when it was out-of-tree.
It builds other things, but the module builds fine.
Cheers,
Rusty.
More information about the ccan
mailing list