[Toybox] [PATCH] Generate all build files with single program.

Georgi Chorbadzhiyski gf at unixsol.org
Sun Mar 18 14:17:13 PDT 2012


On 3/18/12 6:55 PM, Rob Landley wrote:
> On 03/18/2012 11:14 AM, Georgi Chorbadzhiyski wrote:
>> On 3/17/12 4:57 AM, Rob Landley wrote:
>>> On 03/16/2012 05:05 PM, Georgi Chorbadzhiyski wrote:
>>>> +void generate_headers(int argc, char **argv) {
>>>> +    // Parse toys
>>>> +    strbuf_add(&newtoys_h, "NEWTOY(toybox, NULL, 0)\n");
>>>> +    strbuf_add(&globals_union, "extern union global_union {\n");
>>>
>>> It matters that these be in alphabetical order (for the binary search),
>>> and we can't depend on the filesystem doing it for us.  Where are you
>>> sorting this?
>>
>> I didn't sort them. I depend on the shell doing the right thing. The
>> program
>> is called like this generated/genconf toys/*.c so it should be OK. Of
>> course
>> the parameters can be sorted but it seemed unnecessary since the shell is
>> doing that for us.
>
> Actually the shell isn't.  The filesystem is.  (I've hit this one
> before, it's not reliable.)
>
> Also, sorting the .c files isn't sufficient, you have to sort the
> _output_ array, because one .c file can produce more than one array
> entry (sh and toysh, netcat and nc...)

I'll send an updated patch tomorrow.

-- 
Georgi Chorbadzhiyski
http://georgi.unixsol.org/

 1332105433.0


More information about the Toybox mailing list