Subversion Repositories DevTools

Rev

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

Rev 335 Rev 339
Line 104... Line 104...
104
use JatsLocateFiles;
104
use JatsLocateFiles;
105
use JatsDPackage;
105
use JatsDPackage;
106
use MakeIf;
106
use MakeIf;
107
use ToolsetPrinter;
107
use ToolsetPrinter;
108
use MakeObject;
108
use MakeObject;
-
 
109
use JatsVersionUtils;
109
 
110
 
110
 
111
 
111
our $ScmVersion             = "2.34";
112
our $ScmVersion             = "2.34";
112
our $ScmGlobal              = 0;
113
our $ScmGlobal              = 0;
113
our $ScmExpert              = 0;
114
our $ScmExpert              = 0;
Line 120... Line 121...
120
our $ScmToolsetGenerate     = 1;                # generate active by default.
121
our $ScmToolsetGenerate     = 1;                # generate active by default.
121
our $ScmToolsetProgDependancies = 1;            # 1: Write program dependancies
122
our $ScmToolsetProgDependancies = 1;            # 1: Write program dependancies
122
                                                # 0: Don't write progdeps. Prog is Phony
123
                                                # 0: Don't write progdeps. Prog is Phony
123
our $ScmToolsetSingleType   = 0;                # Toolset does not support Debug and Production
124
our $ScmToolsetSingleType   = 0;                # Toolset does not support Debug and Production
124
our $ScmToolsetProgSource   = ();               # Toolset Program Source
125
our $ScmToolsetProgSource   = ();               # Toolset Program Source
-
 
126
our $ScmToolsetSoName       = 0;                # 1: Shared library supports SoName
125
our $ScmRoot                = "";
127
our $ScmRoot                = "";
126
our $ScmMakelib             = "";
128
our $ScmMakelib             = "";
127
our $ScmPlatform            = "";
129
our $ScmPlatform            = "";
128
our $ScmMachType            = "";
130
our $ScmMachType            = "";
129
our $ScmSrcDir              = "";
131
our $ScmSrcDir              = "";
Line 4210... Line 4212...
4210
    Error("Library name not defined: $lib")
4212
    Error("Library name not defined: $lib")
4211
        unless ( $libp );
4213
        unless ( $libp );
4212
 
4214
 
4213
    #
4215
    #
4214
    #.. Collect --Shared arguments
4216
    #.. Collect --Shared arguments
-
 
4217
    #   Need to process this one first so that we have a version number
4215
    #
4218
    #
4216
    foreach (@elements)
4219
    foreach (@elements)
4217
    {
4220
    {
4218
        next unless ( /^--Shared/ );
4221
        next unless ( /^--Shared/ );
4219
 
4222
 
Line 4243... Line 4246...
4243
        #   Update the shared Names
4246
        #   Update the shared Names
4244
        #
4247
        #
4245
        if ( defined $shared )
4248
        if ( defined $shared )
4246
        {
4249
        {
4247
            Warning( "multiple --Shared arguments" )
4250
            Warning( "multiple --Shared arguments" )
4248
                if ($libp->{ VERSION });
4251
                if (exists $libp->{ VERSION });
4249
            Debug( "ShLibArgs: shared $_ ($shared)" );
4252
            Debug( "ShLibArgs: shared $_ ($shared)" );
4250
            $libp->{ VERSION } = $shared;
4253
            $libp->{ VERSION } = $shared;
4251
        }
4254
        }
4252
        else
4255
        else
4253
        {
4256
        {
Line 4263... Line 4266...
4263
        next if ( /^--Shared(.*)/ );
4266
        next if ( /^--Shared(.*)/ );
4264
 
4267
 
4265
        if ( /^[-]{1,2}([lL])(.*)/ )
4268
        if ( /^[-]{1,2}([lL])(.*)/ )
4266
        {
4269
        {
4267
        #.. Target library specified - add to library list.
4270
        #.. Target library specified - add to library list.
-
 
4271
        #   Support --L and -L and --l and -l
4268
        #
4272
        #
4269
            Debug( "ShLibArgs: lib  -$1$2" );
4273
            Debug( "ShLibArgs: lib  -$1$2" );
4270
            $libp->addItem('LIBS', "-$1$2" );
4274
            $libp->addItem('LIBS', "-$1$2" );
4271
            next;
4275
            next;
4272
        }
4276
        }
Line 4278... Line 4282...
4278
            Debug( "ShLibArgs: cond $_" );
4282
            Debug( "ShLibArgs: cond $_" );
4279
            $libp->addItem('LIBS', $_);
4283
            $libp->addItem('LIBS', $_);
4280
            next;
4284
            next;
4281
        }
4285
        }
4282
 
4286
 
-
 
4287
        if ( /^--SoName=(.*)/i )
-
 
4288
        {
-
 
4289
        #.. Specify the SoName of the library
-
 
4290
        #   Not supported by all toolsets
-
 
4291
        #
-
 
4292
            my $soMode = $1;
-
 
4293
            if ( !$ScmToolsetSoName )
-
 
4294
            {
-
 
4295
                Warning ("Toolset does not support --SoName. Option ignored");
-
 
4296
                next;
-
 
4297
            }
-
 
4298
 
-
 
4299
            Error ("SharedLib: $lib. Multiple --SoName arguments not allowed")
-
 
4300
                if ( $libp->{ SONAME } );
-
 
4301
 
-
 
4302
            my ($major, $minor, $patch, $build, $raw_patch) = SplitVersion($::ScmBuildVersionFull);
-
 
4303
            my $soname = '.';
-
 
4304
            if ( $soMode =~ m/Major/i ) {
-
 
4305
                $soname .= $major;
-
 
4306
            } elsif ( $soMode =~ m/^Minor/i ) {
-
 
4307
                $soname .= "$major.$minor";
-
 
4308
            } elsif ( $soMode =~ m/^Patch/i ) {
-
 
4309
                $soname .= "$major.$minor.$patch";
-
 
4310
            } elsif ( $soMode =~ m/^Build/i ) {
-
 
4311
                $soname .= "$major.$minor.$patch.$build";
-
 
4312
            } elsif ( $soMode =~ m/^Full/i ) {
-
 
4313
                $soname .= $libp->{ VERSION };
-
 
4314
            } elsif ( $soMode =~ m/^None/i ) {
-
 
4315
                $soname = '';
-
 
4316
            } elsif ( $soMode =~ m/^[0-9.]+$/ ) {
-
 
4317
                $soname .= $soMode;
-
 
4318
            } else {
-
 
4319
                Error ("Unknown --SoName mode: $soMode");
-
 
4320
            }
-
 
4321
            $libp->addItem('ARGS', '--SoNameSuffix=' . $soname);
-
 
4322
            $libp->{ SONAME } = 1;
-
 
4323
            next;
-
 
4324
        }
-
 
4325
        
4283
        if ( /^-(.*)/ )
4326
        if ( /^-(.*)/ )
4284
        {                           
4327
        {                           
4285
        #.. Argument specified - add to argument list
4328
        #.. Argument specified - add to argument list
4286
        #
4329
        #
4287
            Debug( "ShLibArgs: arg  $_" );
4330
            Debug( "ShLibArgs: arg  $_" );
Line 8718... Line 8761...
8718
 
8761
 
8719
#-------------------------------------------------------------------------------
8762
#-------------------------------------------------------------------------------
8720
#   
8763
#   
8721
#
8764
#
8722
    MakeHeader ("Construct Shared Libraries");
8765
    MakeHeader ("Construct Shared Libraries");
-
 
8766
 
8723
    foreach my $i ( @SHLIBS )
8767
    foreach my $i ( @SHLIBS )
8724
    {
8768
    {
8725
        my $pShlib  = $SHLIBS->Get($i);
8769
        my $pShlib  = $SHLIBS->Get($i);
8726
        my $pArgs = $pShlib->getItems('ARGS');
8770
        my $pArgs = $pShlib->getItems('ARGS');
8727
        my $pObjs = $pShlib->getItems('OBJS');
8771
        my $pObjs = $pShlib->getItems('OBJS');