cons-discuss
[Top][All Lists]
Advanced

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

RE: [Cons-discuss] IDL support anyone ?


From: Kolarik, Tony
Subject: RE: [Cons-discuss] IDL support anyone ?
Date: Thu, 28 Sep 2000 08:31:53 -0400

I compile microsoft idl files with the following.  Maybe you can use it as
the basis for Corba too.  
 -- Tony K.

invocation:
$env->IDLGen('foo.idl', '/x /y /z');

sub cons::IDLGen
{
        # This function depends on the caller munging the CPPPATH 
        # It might be better to pass in a search path which we then
        # prepend to CPPPATH, or not, if we require the whole path.
        
        my ($env, $idlFileName, $flags) = @_;
        my $idlBaseName;
        my @idlGen;
        
        #strip off the .idl portion
        ($idlBaseName = $idlFileName) =~ s/\.idl$//;

        # produce a list of IDL products
        @idlGen = map { "$idlBaseName" . $_ } qw(.h _i.c .tlb);

        $env->QuickScan(
                sub { my(@includes); 
                        do {
                                push (@includes, $3 ) 
                                        if
/^(#include|import)\s+(\")(.+)(\")/ && $3 
                        } 
                        while <SCAN> ;                
                        @includes 
                } ,
                "$idlFileName",
                "$env->{CPPPATH}" 
        );
        
        # make a /Ifoo /Ibar type include path for midl
        $the_path = "$env->{CPPPATH}";
        $the_path =~ s/\#//g;
        @midl_inc_path = split(/$main::PATH_SEPARATOR/o, $the_path);
        @midl_incs = map { "/I$_" } @midl_inc_path;

        # The targets stay bare, cons will prepend the correct build path;

        @dir = DirPath '.'; # resolves to build dir of the caller
        
        $env->Command( [ @idlGen ], $idlFileName, 
                qq(midl.exe %( @midl_incs %) $flags /h "$idlGen[0]" /iid
"$idlGen[1]" /tlb "$idlGen[2]" /out "@dir" /Oicf %1));
}


> -----Original Message-----
> From: Markus Kohler [mailto:address@hidden
> Sent: Thursday, September 28, 2000 8:07 AM
> To: address@hidden
> Subject: [Cons-discuss] IDL support anyone ?
> 
> 
> Hi,
> 
> Does anybody already use cons to compile Corba IDL files ?
> 
> If so, how does it work ?
> 
> Regards,
> Markus 
> 
>  
> 
> 
> _______________________________________________
> 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]