Prototype buildsystem "Drake"

Nick Sabalausky a at a.a
Tue Jul 19 16:39:01 PDT 2011


"Nick Sabalausky" <a at a.a> wrote in message 
news:ivviur$2ks8$1 at digitalmars.com...
> "Jacob Carlborg" <doob at me.com> wrote in message 
> news:ivp1gd$500$2 at digitalmars.com...
>>
>> Ok, have you thought about how this will look (in code) and behave?
>>
>
> Not extensively, but here's what I have in mind so far. In an early 
> initial version of Drake, it would be like this:
>
>    task("configure", "drake.conf");
>
>    file("drake.conf",
>        (Target t)
>        {
>            // Do all configuring here and save to drake.conf
>        }
>    );
>

Actually, I think that might have to be more like:

    // This part added:
    if(DrakeArgs.target == "configure")
        remove("drake.conf");

    task("configure", "drake.conf");

    file("drake.conf",
        (Target t)
        {
            // Do all configuring here and save to drake.conf
        }
    );

Otherwise "drake configure" wouldn't re-generate the configuration unless 
drake.conf was manually deleted first. Or, maybe there should just be a 
"--force" option (also accesible from code? on a per-task basis?) to skip 
the dependency checks and forcefully rebuild.

Oh, and maybe the configuration fle should just be named "configure":

    // Use --force to re-configure
    file("configure",
        (Target t)
        {
            // Do all configuring here and save to 'configure'
        }
    );

Pardon the public brainstorming...




More information about the Digitalmars-d mailing list