|
From: | Malcolm Blaney |
Subject: | Re: not rebuilding out-of-date derived^2 objects |
Date: | Mon, 19 Apr 2004 11:19:39 +0930 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031030 |
Alan Grow wrote:
Hi,Cons 2.3.0 isn't rebuilding "derived derived objects" correctly for me. I've attached a tarball you can use to reproduce the behavior, but here's what's going on...I am building libfoo.a from foo.o, which is built from foo.h and foo.cpp in turn. The first time I cons, everything is rebuilt. Then if I add a new function (say) to foo.h and cons again. This time foo.o is rebuilt but libfoo.a is not, even though foo.o's contents have changed.I have left SourceSignature and SIGNATURE alone so they should be defaulting to 'build', but it doesn't seem to matter. Also I am using two Conscript files, one for the object file and one for the lib, because this mimics the situation I first encountered the problem in. Anyway untar and have a look for yourself.
Please don't attatch a tar, just include the Construct & Conscript in your email, it's not that much code...
Am I using cons in a way that wasn't intended?
Yes, the Program and Library methods are designed to do what you're trying to do with Command. You're missing the dependency between foo.o and libfoo.a, which you should see when running cons -d.
Have a look at the examples in the docco, and use/put the compiler commands in the env object in the Construct file.
Malcolm.
[Prev in Thread] | Current Thread | [Next in Thread] |