"Nick Sabalausky" <[email protected]> wrote in message
news:[email protected]...
> "Jacob Carlborg" <[email protected]> wrote in message
> news:[email protected]...
>>
>> 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...