[Cook] cook not noticing changes.
Jerry Pendergraft
jerry at endocardial.com
Tue Jan 7 05:44:11 EST 2003
On Mon, 6 Jan 2003, Robin Lee Powell wrote:
> I'm having a problem using cook under aegis where, when doing the
> integration, some of the targets that need to get updated are not being
> updated, thus causing tests to file. Instead of the target actually
> getting evaluated, the target file's time is simply updated.
[snip]
> cook: rm bin/moz_base/Player.class
> cook: echo Player.class
> Player.class
> cook: rm -f bin/moz_base/Player.class
> cook: cp -p src/moz_base/Player.class bin/moz_base/Player.class
> cook: chmod -f u+w bin/moz_base/Player.class
I believe your problem may be in the recipe body.
Note from the messages above the the class file is rm'd twice.
The first time by cook's default action to remove targets before building,
the second by your recipe body.
The other thing is that when you put "file system" modifying commands in a
recipe body, such as rm,cp etc, you should either include set clearstat;
or make the commands execute as a single shell command such as below:
>
> bin/moz_base/%.class: [resolve src/moz_base/%.class]
> {
> echo %.class;
> rm -f bin/moz_base/%.class;
> cp -p [resolve src/moz_base/%.class] bin/moz_base/%.class;
> chmod -f u+w bin/moz_base/%.class;
> }
bin/moz_base/%.class: [resolve src/moz_base/%.class]
{
function print "copying:" %.class;
cp -p [resolve src/moz_base/%.class] [target] && chmod -f u+w [target];
}
--
Jerry Pendergraft jerry.pendergraft at endocardial.com
Endocardial Solutions voice: 651-523-6935
1350 Energy Lane, Suite 110 fax: 651-644-7897
St Paul, MN 55108-5254
More information about the Cook-users
mailing list