Steve Allen
2003-05-30 22:38:55 UTC
Hello all,
I saw this problem in cons 2.3 and it seems to have migrated to Scons.
It's a nit but it's pretty critical to me, since I'm hoping to extend
SCons to hand verilog and HW development environments (new file types,
lots of "strange" and unique rules, etc)....
Here's the dependency problem, using Scons 0.14 and Python 2.3b1 or
Python 1.5.2:
SConstruct is simply:
env = Environment();
env.Command( 'file2', 'file1', 'cp file1 file2' );
And this extremely simple test fails:
% echo "passed" > file1
% scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
cp file1 file2
scons: done building targets. <== okay so far
% echo "failed" > file2
% scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
*scons: "." is up to date.* <= ????
corrupted file not rebuilt!
scons: done building targets.
% cat file2
failed
<= this should say "passed"
% scons file2
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
*scons: "file2" is up to date.* <= ???? corrupted
file not rebuilt!
scons: done building targets.
cons/bug1> ll
For what it's worth, the same thing happens with
env.Program( "hello", "hello.cpp" );
If you corrupt hello.o or hello
This make scons unusable for me...
I'll take a stab at debugging it, but I think the basic problem is that
the signature of the object files are no longer considered for all
targets/objects. I.E. this is a design feature, not a, er, bug. My
basic understand was that a target was rebuilt at least if the signature
of the source, it's build command changed, but at one point it also got
rebuilt if the signature of the target changed also. I.E. The
signature was assumed to include the targets being built.
It seems pretty broken if scons can't even detect a file change on a
object. What if a object is generated by an external program?
In any case, you get the idea. I'm pretty excited about scons, so I
hope I can get this figured out....
baited-breath-ly yr's Steve
-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
I saw this problem in cons 2.3 and it seems to have migrated to Scons.
It's a nit but it's pretty critical to me, since I'm hoping to extend
SCons to hand verilog and HW development environments (new file types,
lots of "strange" and unique rules, etc)....
Here's the dependency problem, using Scons 0.14 and Python 2.3b1 or
Python 1.5.2:
SConstruct is simply:
env = Environment();
env.Command( 'file2', 'file1', 'cp file1 file2' );
And this extremely simple test fails:
% echo "passed" > file1
% scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
cp file1 file2
scons: done building targets. <== okay so far
% echo "failed" > file2
% scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
*scons: "." is up to date.* <= ????
corrupted file not rebuilt!
scons: done building targets.
% cat file2
failed
<= this should say "passed"
% scons file2
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
*scons: "file2" is up to date.* <= ???? corrupted
file not rebuilt!
scons: done building targets.
cons/bug1> ll
For what it's worth, the same thing happens with
env.Program( "hello", "hello.cpp" );
If you corrupt hello.o or hello
This make scons unusable for me...
I'll take a stab at debugging it, but I think the basic problem is that
the signature of the object files are no longer considered for all
targets/objects. I.E. this is a design feature, not a, er, bug. My
basic understand was that a target was rebuilt at least if the signature
of the source, it's build command changed, but at one point it also got
rebuilt if the signature of the target changed also. I.E. The
signature was assumed to include the targets being built.
It seems pretty broken if scons can't even detect a file change on a
object. What if a object is generated by an external program?
In any case, you get the idea. I'm pretty excited about scons, so I
hope I can get this figured out....
baited-breath-ly yr's Steve
-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5