[jamming] Jam always rebuilds

Abbate, Joseph M Joseph.Abbate at ca.com
Fri Nov 19 09:13:45 PST 2004


Hi Mihai,

Sorry, my "simple" example indeed has a fatal flaw. The problem is that
Jam still thinks it has to build a library in the source directory, but
eventually it builds it in the lib directory. You can see this if you
run jam -nd3, e.g.,

make    --         libx.a(func1.o)
bind    --         libx.a(func1.o): /<path to top>/src/libx.a(func1.o)
                                                   ^^^
time    --         libx.a(func1.o): missing 

The simple solution is to specify a full path to the library in the
Library invocation. The problem with that, and that I still haven't
solved, is that the library directory *has* to exist.

Joe Abbate
Senior Software Engineer
Computer Associates
joseph.abbate at ca.com
 

> -----Original Message-----
> From: jamming-admin at perforce.com 
> [mailto:jamming-admin at perforce.com] On Behalf Of Mihai Christodorescu
> Sent: Friday, November 19, 2004 11:45 AM
> To: jamming at perforce.com
> Subject: [jamming] Jam always rebuilds
> 
> 
> I restructured my Jamfile to change the location where 
> certain targets are 
> stored and it rebuilds everything everytime!
> 
> My Jamfile:
> ----------
> SubDir TOP ;
> 
> C++ = g++ ;
> 
> SEARCH_SOURCE = src ;
> LOCATE_TARGET = obj ;
> 
> C++Main test : test.cpp ;
> LinkLibraries test : libtest ;
> MakeLocate test$(SUFEXE) : bin ;
> 
> C++Library libtest : libtest.cpp ;
> MakeLocate libtest$(SUFLIB) : lib ;
> 
> My Jamrules:
> -----------
> rule C++Main
> {
>     Main $(<) : $(>) ;
>     LINK on $(<) = $(C++) ;
> }
> 
> rule C++Library
> {
>     Library $(<) : $(>) ;
>     LINK on $(<) = $(C++) ;
> }
> 
> Output from Jam:
> ----------------
> $ jam
> ...found 18 target(s)...
> ...updating 3 target(s)...
> C++ obj/libtest.o
> Archive lib/libtest.a
> Ranlib lib/libtest.a
> Link bin/test
> Chmod1 bin/test
> ...updated 3 target(s)...
> 
> The updating occurs every time I run Jam, with no changes to 
> the source 
> files. Any help is appreciated.
> 
> Mihai
> 
> -- 
>   - mihai at cs.wisc.edu - http://www.cs.wisc.edu/~mihai -
> -------------------------------------------------------
>    The man of knowledge must be able not only to love
>   his enemies but also to hate his friends.
>                                   - Friedrich Nietzsche
> -------------------------------------------------------
>      -- Feed the machine that burns in your head. --
> _______________________________________________
> jamming mailing list  -  jamming at perforce.com
> http://maillist.perforce.com/mailman/listinfo/jamming
> 
> 




More information about the jamming mailing list