Subject: Re: Dynamically created kernel .c files
To: None <tech-toolchain@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: tech-toolchain
Date: 06/02/2007 17:42:58
In article <31FDFD34-5E05-40BE-A3FE-7703CDDABEFA@3am-software.com>,
Matt Thomas  <matt@3am-software.com> wrote:
>
>On Jun 2, 2007, at 4:31 AM, David Laight wrote:
>
>> I've been wondering if there is an easy way to dynamically create
>> .c files for the kernel build?
>>
>> In particular compat/svr4/svr4_stream.c can be created from
>> compat/svr4_32/svr4_32_stream.c with a 'simple' sed command, and it
>> seems rather a shame to have to keep two 2000 line files in sync.
>>
>> The makefile rule would be easy, but where would it be added ?
>
>Do the same trick that exec_elf{32,64} does and make the cpp do the  
>work.

That is even better. The only disadvantage is that the files are less
readable.

christos