Subversion Repositories DevTools

Rev

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

Rev 4382 Rev 4424
Line 4446... Line 4446...
4446
    my ($shared, $fname) = @_;
4446
    my ($shared, $fname) = @_;
4447
    my ($file, $ext, $obj, $srcfile, $delete_obj);
4447
    my ($file, $ext, $obj, $srcfile, $delete_obj);
4448
 
4448
 
4449
    #.. Object specified - add to object list.
4449
    #.. Object specified - add to object list.
4450
    #
4450
    #
-
 
4451
    #   Want to handle several cases
-
 
4452
    #       Normal - User has provided the name of an object file (without the obj suffix)
-
 
4453
    #       Other  - User has provided the name of a source file
-
 
4454
    #                Need to perform implicit source file processing
-
 
4455
    #
-
 
4456
    #   The hard part is detecting the difference
-
 
4457
    #   Just can't use the existence of a '.' 
-
 
4458
    #
-
 
4459
    if ($OBJSOURCE{$fname}) {
-
 
4460
        $file = $fname;                             # Already know about this file
-
 
4461
        $ext = '';                                  # Don't need to split it
-
 
4462
    } else {
4451
    $file = StripDirExt($fname);                # file name, without extension or Dir
4463
        $file = StripDirExt($fname);                # file name, without extension or Dir
4452
    $ext  = StripFile($fname);                  # extension
4464
        $ext  = StripFile($fname);                  # extension
-
 
4465
    }
4453
 
4466
 
4454
    if ($shared) {
4467
    if ($shared) {
4455
        $obj = "$shared/$file";                 # library specific subdir
4468
        $obj = "$shared/$file";                 # library specific subdir
4456
    } else {
4469
    } else {
4457
        $obj = "$file";
4470
        $obj = "$file";
Line 4459... Line 4472...
4459
 
4472
 
4460
    Debug( "LibObjs: obj [$shared]$fname ($file$ext)" );
4473
    Debug( "LibObjs: obj [$shared]$fname ($file$ext)" );
4461
 
4474
 
4462
    #.. Unqualified object name
4475
    #.. Unqualified object name
4463
    #
4476
    #
4464
    if ( $ext eq "" )
4477
    if ( $ext eq '' ) {
4465
    {
-
 
4466
        #
4478
        #
4467
        #   Object file not covered by a "Src" statement
4479
        #   Object file not covered by a "Src" statement
4468
        #   Assume that it will be created
4480
        #   Assume that it will be created
4469
        #
4481
        #
4470
        unless ( $srcfile = $OBJSOURCE{ "$file" } )
4482
        unless ( $srcfile = $OBJSOURCE{$file} )
4471
        {
4483
        {
4472
            #
4484
            #
4473
            #   If the object is "generated" then it will be is the
4485
            #   If the object is "generated" then it will be in the
4474
            #   SRCS list
4486
            #   SRCS list
4475
            #
4487
            #
4476
            unless ( $srcfile = $SRCS{"$file.$::o"} )
4488
            unless ( $srcfile = $SRCS{"$file.$::o"} )
4477
            {
4489
            {
4478
                Warning( "No source for object '$fname' ($file)" );
4490
                Warning( "No source for object '$fname' ($file)" );