cons-discuss
[Top][All Lists]
Advanced

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

Re: nasm support?


From: Timothee Besset
Subject: Re: nasm support?
Date: Wed, 12 Sep 2001 15:23:55 +0200

Thanks for the info. I will look at it. Right now I've been trying to do it 
with Command statements, stuff like:
Command $env 'file.o', 'file.nasm', system('/usr/bin/nasm -f elf -o ' . 
$WORK_PATH . 'file.o ' . $WORK_PATH . 'file.nasm'
but it works like shit, cons keeps saying me there are errors or something
had to hack it to a shell script for now

Well .. ideally I would just put a 'file.nasm' anywhere in Program statement 
for instance, with some config for NASM command line in the cons object. Just 
like you can put .c or .cpp files in Program statement.

TTimo

On Wed, 12 Sep 2001 09:07:23 -0400
"Gary Oberbrunner" <address@hidden> wrote:

> What I would do (don't know if this is "right" or not...) is define a
> CompileNASM method (call it what you want), and then you can swap out the
> implementation of that however you like.  I.e. in your Conscripts you'll
> have
>   $env->CompileNASM(@nasm_files);
> (or however they work -- maybe you need to specify destinations, or maybe it
> returns objects, or whatever.)
> 
> Then you can write
> sub cons::CompileNASM
> {
>   my $env = shift;
>   my @nasmfiles = @_;
>   foreach my $f (@nasmfiles) {
>     $env->Command(....);
>   }
> }
> 
> So that later if there's a more automatic way to do it with Objects,
> Program, Library or whatever, you can just swap out this implementation.
> 
> I know you'd like to avoid this step, but AFAIK it can't be done yet.  The
> refactoring currently being discussed should be able to handle this easily
> though.
> 
> -- Gary Oberbrunner
> 
>  > -----Original Message-----
>  > From: address@hidden [mailto:address@hidden
>  > Behalf Of Timothee Besset
>  > Sent: Wednesday, September 12, 2001 5:56 AM
>  > To: address@hidden
>  > Subject: nasm support?
>  >
>  >
>  > I am starting to convert some more projects to use cons after
>  > the great experience I've had with it on GtkRadiant build
>  > system. I have a bunch of .nasm files in this new project. I
>  > think that my first approach will be to hardcode their
>  > compilation, but in the long run I would like to be able to just
>  > give the file.nasm to any 'Program' or 'Library' method.
>  >
>  > Does anyone have experience with .nasm files / integrated them
>  > with cons etc.? Or has info on how I should go about it? (I can
>  > write some perl, but I'm not that good at it .. kind of "hello
>  > world" stage right now)
>  >
>  > TTimo
>  >
>  > _______________________________________________
>  > 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]