Subversion Repositories DevTools

Rev

Rev 6276 | Rev 6511 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6276 Rev 6504
Line 2208... Line 2208...
2208
 
2208
 
2209
 
2209
 
2210
#-------------------------------------------------------------------------------
2210
#-------------------------------------------------------------------------------
2211
# Function        : LinkEntry
2211
# Function        : LinkEntry
2212
#
2212
#
2213
# Description     : Scan a package an locate platform specific directories
2213
# Description     : Scan a package and locate platform specific directories
2214
#                   Create data structures to capture the information
2214
#                   Create data structures to capture the information
2215
#                   This function is used by LinkPkgArchive
2215
#                   This function is used by LinkPkgArchive
2216
#                   to perfom the bulk of package inclusion work.
2216
#                   to perfom the bulk of package inclusion work.
2217
#
2217
#
2218
# Inputs          : $platform   - Platform being processed
2218
# Inputs          : $platform   - Platform being processed
Line 4288... Line 4288...
4288
sub BuildSharedLibFiles_WIN
4288
sub BuildSharedLibFiles_WIN
4289
{
4289
{
4290
 
4290
 
4291
    foreach my $platform ( @BUILD_ACTIVEPLATFORMS )
4291
    foreach my $platform ( @BUILD_ACTIVEPLATFORMS )
4292
    {
4292
    {
-
 
4293
        my @pathList;
4293
        next unless ( exists $BUILDINFO{$platform}{EXT_SHARED} );
4294
        if (exists $BUILDINFO{$platform}{EXT_SHARED} ) {
4294
        my @dos_paths = BuildSharedLibFiles_list( $platform, $BUILDINFO{$platform}{EXT_SHARED} );
4295
            push @pathList, reverse BuildSharedLibFiles_list( $platform, $BUILDINFO{$platform}{EXT_SHARED} );
-
 
4296
        }
-
 
4297
        push @pathList, @BUILDTOOLS; 
4295
 
4298
 
4296
        #
4299
        #
4297
        #   Create a .bat file for WIN32
4300
        #   Create a .bat file for WIN32
4298
        #   This may be consumed by user wrapper programs
4301
        #   This may be consumed by user wrapper programs
4299
        #
4302
        #
Line 4302... Line 4305...
4302
        #
4305
        #
4303
        my $fh = ::ConfigurationFile::New( "$BUILDINTERFACE/set_$platform.bat", '--NoEof', '--Type=bat' );
4306
        my $fh = ::ConfigurationFile::New( "$BUILDINTERFACE/set_$platform.bat", '--NoEof', '--Type=bat' );
4304
        $fh->Write ( "\@echo off\n");
4307
        $fh->Write ( "\@echo off\n");
4305
        $fh->Header( "Buildlib ($BuildVersion)","Shared Library Paths" );
4308
        $fh->Header( "Buildlib ($BuildVersion)","Shared Library Paths" );
4306
        $fh->Write ( "\nSETLOCAL\n");
4309
        $fh->Write ( "\nSETLOCAL\n");
4307
        foreach ( reverse @dos_paths )
4310
        foreach ( @pathList )
4308
        {
4311
        {
4309
            $_ =~ s~/~\\~g;
4312
            $_ =~ s~/~\\~g;
4310
            $fh->Write ( "PATH=$_;\%PATH\%\n" );
4313
            $fh->Write ( "PATH=$_;\%PATH\%\n" );
4311
        }
4314
        }
4312
        $fh->Write ( "\n%*\n" );
4315
        $fh->Write ( "\n%*\n" );
Line 4318... Line 4321...
4318
        #   Create a .sh file for WIN32
4321
        #   Create a .sh file for WIN32
4319
        #   This may be consumed by a shell - as used within JATS
4322
        #   This may be consumed by a shell - as used within JATS
4320
        #
4323
        #
4321
        $fh = ::ConfigurationFile::New( "$BUILDINTERFACE/set_$platform.sh", '--NoEof', '--Type=sh' );
4324
        $fh = ::ConfigurationFile::New( "$BUILDINTERFACE/set_$platform.sh", '--NoEof', '--Type=sh' );
4322
        $fh->Header( "Buildlib ($BuildVersion)","Shared Library Paths" );
4325
        $fh->Header( "Buildlib ($BuildVersion)","Shared Library Paths" );
4323
        foreach ( reverse @dos_paths )
4326
        foreach ( @pathList )
4324
        {
4327
        {
4325
            tr~\\/~/~s;
4328
            tr~\\/~/~s;
4326
            $fh->Write ( "PATH=$_\\;\$PATH\n" );
4329
            $fh->Write ( "PATH=$_\\;\$PATH\n" );
4327
        }
4330
        }
4328
        $fh->Write ( "\n" . '[ -n "$*" ] && "$@"'  ."\n" );
4331
        $fh->Write ( "\n" . '[ -n "$*" ] && "$@"'  ."\n" );
Line 4342... Line 4345...
4342
#
4345
#
4343
sub BuildSharedLibFiles_Unix
4346
sub BuildSharedLibFiles_Unix
4344
{
4347
{
4345
    foreach my $platform ( @BUILD_ACTIVEPLATFORMS )
4348
    foreach my $platform ( @BUILD_ACTIVEPLATFORMS )
4346
    {
4349
    {
-
 
4350
        my @unix_paths;
4347
        next unless ( exists $BUILDINFO{$platform}{EXT_SHARED} );
4351
        if ( exists $BUILDINFO{$platform}{EXT_SHARED} ) {
4348
        my @unix_paths = BuildSharedLibFiles_list( $platform, $BUILDINFO{$platform}{EXT_SHARED} );
4352
            @unix_paths = BuildSharedLibFiles_list( $platform, $BUILDINFO{$platform}{EXT_SHARED} );
4349
 
4353
 
4350
        #
4354
            #
4351
        #   Create sonames for all shared libraries
4355
            #   Create sonames for all shared libraries
4352
        #   Append to the begging of the search list - so that it will rendered last
4356
            #   Append to the begging of the search list - so that it will rendered last
4353
        #   
4357
            #   
4354
        my $sodir = BuildSoNameLinks_Unix($platform, @unix_paths);
4358
            my $sodir = BuildSoNameLinks_Unix($platform, @unix_paths);
4355
        unshift( @unix_paths, $sodir ) if defined $sodir;
4359
            unshift( @unix_paths, $sodir ) if defined $sodir;
-
 
4360
        }
4356
 
4361
 
4357
        #
4362
        #
4358
        #   Create a .sh file for Unix
4363
        #   Create a .sh file for Unix
4359
        #
4364
        #
4360
        my $file = "$BUILDINTERFACE/set_$platform.sh";
4365
        my $file = "$BUILDINTERFACE/set_$platform.sh";
4361
        my $fh = ::ConfigurationFile::New( $file , '--NoEof', '--Type=sh' );
4366
        my $fh = ::ConfigurationFile::New( $file , '--NoEof', '--Type=sh' );
4362
        $fh->Header( "Buildlib ($BuildVersion)","Shared Library Paths" );
4367
        $fh->Header( "Buildlib ($BuildVersion)","Shared Library Paths" );
4363
        foreach ( reverse @unix_paths )
4368
        foreach ( reverse @unix_paths, @BUILDTOOLS )
4364
        {
4369
        {
4365
            $fh->Write ( "export LD_LIBRARY_PATH=$_:\$LD_LIBRARY_PATH\n" );
4370
            $fh->Write ( "export LD_LIBRARY_PATH=$_:\$LD_LIBRARY_PATH\n" );
4366
        }
4371
        }
-
 
4372
 
-
 
4373
        #
-
 
4374
        #   Extend the search path to allow tools to be located
-
 
4375
        #   Have already extended LD_LIBRARY_PATH to allwo for tools shared libaraies 
-
 
4376
        #   
-
 
4377
        $fh->Write ( "\n# Extend Tool Search Path\n" );
-
 
4378
        foreach ( @BUILDTOOLS ) {
-
 
4379
            tr~\\/~/~s;
-
 
4380
            $fh->Write ( "PATH=$_\\;\$PATH\n" );
-
 
4381
        }
-
 
4382
 
4367
        $fh->Write ( "\n\"\$\@\"\n" );
4383
        $fh->Write ( "\n\"\$\@\"\n" );
4368
        $fh->Close();
4384
        $fh->Close();
4369
 
4385
 
4370
        #
4386
        #
4371
        #   Make the file executable under unix
4387
        #   Make the file executable under unix