cons-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Object & changing target of CXXCOM


From: Steven Allen
Subject: RE: Object & changing target of CXXCOM
Date: Fri, 15 Jun 2001 16:51:03 -0400

I did see the Link command, but as I understand it, it doesn't allow one to
run a lower level Construct file by itself (it must be run from the top,
when "build" => "src" is defined.

Something like this would be ok, but doesn't work.

    Link '.', '../../obj';

Which means when I run cons in a sub directory, all output files go to
someother place (so I can more easily delete them and keep my source
directories cleaner.  The Link command seems to require that I always build
from the top level of a directory structure so that it can call/Build the
lower level files while passing the aliased directory name to it.  But this
breaks if I want to run cons on just a simple sub directory?

I guess I think of it as I should be able to say

Objects $env "file.cpp", 'foo.cpp';
   or
Objects $env "file.cpp" => "../../obj/file.o",
                 "foo.cpp" => "../../obj/foo.o";

The object is generated in cons, so it seems feasable that it could be
overridden.


Steve



-----Original Message-----
From: Brad Garcia [mailto:address@hidden
Sent: Friday, June 15, 2001 3:53 PM
To: cons mailing list
Subject: Re: Object & changing target of CXXCOM



If all your source code lives in "dir", and you want all of your compiled
code to go in "obj", then you should use the Link command.

See the documentation for more information.

If that's not what you're trying to do, then could you explain your
problem in more detail?

On Fri, 15 Jun 2001, Steven Allen wrote:

> My problem is I have a file dir/file.cpp that I want to compile and put
it's
> output in obj/file.o  
> 
> So
> 
>   Object $env "dir/file.cpp";
> 
> I can change CXXCOM as so 
> 
>   CXXCOM  => 'g++ %CFLAGS %_IFLAGS -c %< -o binary/%>:F.o',
> 
> This puts the .o file into the other directory just fine.  BUT cons
doesn't
> know that the target has changed from dir/file.o to binary/file.o and
> *always* rebuild binary/file.o.  I can understand why, but I don't know
how
> to fix it.

Brad Garcia


_______________________________________________
address@hidden
http://mail.gnu.org/mailman/listinfo/cons-discuss
Cons URL: http://www.dsmit.com/cons/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]