Subversion Repositories DevTools

Rev

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

Rev 305 Rev 311
Line 664... Line 664...
664
#
664
#
665
#   First: Extend the Perl Search Space to include the toolset extensions
665
#   First: Extend the Perl Search Space to include the toolset extensions
666
#          Although the directives are in gbe/DIRECTIVES/*.pm, they may need
666
#          Although the directives are in gbe/DIRECTIVES/*.pm, they may need
667
#          to reference other packages that are not.
667
#          to reference other packages that are not.
668
#
668
#
-
 
669
#           Look in the 'interface' and 'link' packages
-
 
670
#           The 'build' packages are duplicated into the 'interface'
-
 
671
#
669
    for my $path ( ToolExtensionPaths() )
672
    for my $path ( ToolExtensionPaths() )
670
    {
673
    {
671
        UniquePush (\@INC, $path)
674
        UniquePush (\@INC, $path)
672
            if (glob( "$path/*.pm") || glob( "$path/*/*.pm"));
675
            if (glob( "$path/*.pm") || glob( "$path/*/*.pm"));
673
    }
676
    }
674
 
677
 
675
    for my $entry (@{$::ScmBuildPkgRules{$ScmPlatform} })
678
    for my $entry (@{$::ScmBuildPkgRules{$ScmPlatform} })
676
    {
679
    {
-
 
680
        next if ( $entry->{'TYPE'} eq 'build' );
677
        my $cfgdir = $entry->{'CFGDIR'};
681
        my $cfgdir = $entry->{'CFGDIR'};
678
        next unless ( $cfgdir );
682
        next unless ( $cfgdir );
679
        my $base_dir = $entry->{'ROOT'} . $cfgdir . '/DIRECTIVES';
683
        my $base_dir = $entry->{'ROOT'} . $cfgdir . '/DIRECTIVES';
680
        next unless ( -d $base_dir );
684
        next unless ( -d $base_dir );
681
        foreach my $file  ( glob ("$base_dir/*.pm") )
685
        foreach my $file  ( glob ("$base_dir/*.pm") )
Line 5962... Line 5966...
5962
        $PACKAGE_SETS{ $_ }{'TAG'} = 1
5966
        $PACKAGE_SETS{ $_ }{'TAG'} = 1
5963
            if ( ! exists $PACKAGE_SETS{ $_ }{'TAG'} );
5967
            if ( ! exists $PACKAGE_SETS{ $_ }{'TAG'} );
5964
    }
5968
    }
5965
}
5969
}
5966
 
5970
 
-
 
5971
#-------------------------------------------------------------------------------
-
 
5972
# Function        : PackageFile
-
 
5973
#
-
 
5974
# Description     : Directive to package files
-
 
5975
#                   Not to be used to package libraries, executables, headers
-
 
5976
#                   as this should be done by specialised directives
-
 
5977
#
-
 
5978
#                   Use to package other files
-
 
5979
#                   Can package an entire tree (ugly)
-
 
5980
#
-
 
5981
# Inputs          : 
-
 
5982
#
-
 
5983
#
5967
sub PackageFile
5984
sub PackageFile
5968
{
5985
{
5969
    my( $platforms, @elements ) = @_;
5986
    my( $platforms, @elements ) = @_;
5970
    my( $base, $dir, $full, $abs, $path, $dist, $strip, $exefile, $type );
5987
    my( $base, $dir, $full, $abs, $path, $dist, $strip, $exefile, $type );
5971
    my( $name, $basename, $len, $srcfile );
5988
    my( $name, $basename, $len, $srcfile );
Line 7661... Line 7678...
7661
    #
7678
    #
7662
    #   Not so simple Case
7679
    #   Not so simple Case
7663
    #   Resolve the source from the imported packages
7680
    #   Resolve the source from the imported packages
7664
    #
7681
    #
7665
    #   Create a list of directores to search, but only the first time
7682
    #   Create a list of directores to search, but only the first time
7666
    #       - LnkPkgArchive directories
-
 
7667
    #       - Interface directories - from BuildPkgArchive
7683
    #       - Interface directories - from BuildPkgArchive
-
 
7684
    #       - LnkPkgArchive directories
7668
    #         Using target,product,platform include directories
7685
    #         Using target,product,platform include directories
7669
    #
7686
    #
7670
    unless ( @PkgSrcDirList )
7687
    unless ( @PkgSrcDirList )
7671
    {
7688
    {
7672
 
-
 
7673
        for my $entry (@{$::ScmBuildPkgRules{$ScmPlatform} })
7689
        for my $entry (@{$::ScmBuildPkgRules{$ScmPlatform} })
7674
        {
7690
        {
7675
            next if ( $entry->{'TYPE'} eq 'build' );                    # Ignore BuildPkgArchives
7691
            next if ( $entry->{'TYPE'} eq 'build' ); # Ignore BuildPkgArchives
-
 
7692
            
7676
            for (@{$entry->{'PINCDIRS'}}, @{$entry->{'THXDIRS'}}, '' )
7693
            for (@{$entry->{'PINCDIRS'}}, @{$entry->{'THXDIRS'}}, '' )
7677
            {
7694
            {
7678
                my $dir = $entry->{'ROOT'} . "/" . $_ ;
7695
                my $dir = $entry->{'ROOT'} . "/" . $_ ;
7679
                $dir =~ s~//~/~g;
7696
                $dir =~ s~//~/~g;
7680
                $dir =~ s~/$~~;
7697
                $dir =~ s~/$~~;
7681
                push ( @PkgSrcDirList, $dir);
7698
                push ( @PkgSrcDirList, $dir );
7682
            }
7699
            }
7683
        }
7700
        }
7684
        foreach ( @{$::BUILDINFO{$ScmPlatform}{PARTS}} )
-
 
7685
        {
-
 
7686
            my $dir = "$ScmRoot/$ScmInterface/include/$_";
-
 
7687
            push ( @PkgSrcDirList,  $dir )
-
 
7688
                if ( -d  $dir );
-
 
7689
        }
-
 
7690
 
-
 
7691
        foreach ( "/include" , "" )
-
 
7692
        {
-
 
7693
            my $dir = "$ScmRoot/$ScmInterface$_";
-
 
7694
            push ( @PkgSrcDirList,  $dir )
-
 
7695
                if ( -d  $dir );
-
 
7696
        }
-
 
7697
    }
7701
    }
-
 
7702
 
7698
    return MakeResolve( \@PkgSrcDirList, $file );
7703
    return MakeResolve( \@PkgSrcDirList, $file );
7699
}
7704
}
7700
 
7705
 
7701
#-------------------------------------------------------------------------------
7706
#-------------------------------------------------------------------------------
7702
# Function        : GetPackageRoot
7707
# Function        : GetPackageRoot