[Cook] Calling cook from cook

Felix Klose felix at cs-student.de
Mon Sep 3 23:46:00 EST 2007


Hello,

I've got the following problem that seems to be immune to solving attempts.

The situation is as follows:

To build the binary, it is necessary to run its the test suites first.
The test suites need some other compile options so they are compiled 
into another directory.
So every source file needs to be compiled twice, once with the test 
options and once with the deploy options.
So far the cook file looks like this:

demo: binary;

binary: testsuites .deploy/demo.o
{ ... }

testsuites: .test/demo.o
{ ... }

.test/%.o: %.c
{ ... }

.deploy/%.o: %.c
{ ... }

Now I'd like to build all .test/*.o files first and only if the test 
suites were all successful start compiling the deploy files.

So I'd like to do something like:

demo:
{
    [cook testsuites];
    [cook binary];
}


binary: .deploy/demo.o
{ ... }

testsuites: .test/demo.o
{ ... }

.test/%.o: %.c
{ ... }

.deploy/%.o: %.c
{ ... }

My problem now is that the [cook] command seems to try to execute its 
arguments. Which is not what the User Guide says it does.
Is [cook thing] meant to first cook and the execute "thing"?


Best regards,
Felix



More information about the Cook-users mailing list