Subversion Repositories DevTools

Rev

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

Rev 343 Rev 359
Line 73... Line 73...
73
our $BUILDNAME              = "";               # BuildName()
73
our $BUILDNAME              = "";               # BuildName()
74
our $BUILDVERSION           = "";               # BuildName()
74
our $BUILDVERSION           = "";               # BuildName()
75
our $BUILDNAME_PACKAGE;                         # Name
75
our $BUILDNAME_PACKAGE;                         # Name
76
our $BUILDNAME_VERSION;                         # Version
76
our $BUILDNAME_VERSION;                         # Version
77
our $BUILDNAME_PROJECT;                         # Project(optional)
77
our $BUILDNAME_PROJECT;                         # Project(optional)
-
 
78
our $BUILDNAME_SUFFIX;                          # Project (available)
78
our $DEPLOY_PATCH           = 0;                # Deplyment patch number
79
our $DEPLOY_PATCH           = 0;                # Deplyment patch number
79
 
80
 
80
our %BUILDALIAS_DELAY       = ();               # Delayed aliases
81
our %BUILDALIAS_DELAY       = ();               # Delayed aliases
81
our %BUILDALIAS_TARGETS     = ();               # BuildAlias from --Targets
82
our %BUILDALIAS_TARGETS     = ();               # BuildAlias from --Targets
82
our %BUILDALIAS             = ();               # BuildAlias
83
our %BUILDALIAS             = ();               # BuildAlias
Line 97... Line 98...
97
 
98
 
98
 
99
 
99
my  $DeleteDPACKAGE         = 0;                # Must clobber DPACKAGE
100
my  $DeleteDPACKAGE         = 0;                # Must clobber DPACKAGE
100
my  $build_source_pkg       = 0;                # Flag to build source package
101
my  $build_source_pkg       = 0;                # Flag to build source package
101
my  $opt_help               = 0;
102
my  $opt_help               = 0;
-
 
103
my  $sandbox_exact          = 0;                # Exact or in-exact sandbox
102
 
104
 
103
BuildLibInit();
105
BuildLibInit();
104
 
106
 
105
sub BuildLibInit
107
sub BuildLibInit
106
{
108
{
Line 1189... Line 1191...
1189
    my $build_info = parseBuildName( @arguments );
1191
    my $build_info = parseBuildName( @arguments );
1190
 
1192
 
1191
    $BUILDNAME_PACKAGE = $build_info->{BUILDNAME_PACKAGE};
1193
    $BUILDNAME_PACKAGE = $build_info->{BUILDNAME_PACKAGE};
1192
    $BUILDNAME_VERSION = $build_info->{BUILDNAME_VERSION};
1194
    $BUILDNAME_VERSION = $build_info->{BUILDNAME_VERSION};
1193
    $BUILDNAME_PROJECT = $build_info->{BUILDNAME_PROJECT};
1195
    $BUILDNAME_PROJECT = $build_info->{BUILDNAME_PROJECT};
-
 
1196
    $BUILDNAME_SUFFIX  = $BUILDNAME_PROJECT ? '.' . $BUILDNAME_PROJECT : '';
1194
 
1197
 
1195
    $BUILDNAME         = $build_info->{BUILDNAME};
1198
    $BUILDNAME         = $build_info->{BUILDNAME};
1196
    $BUILDVERSION      = $build_info->{BUILDVERSION};
1199
    $BUILDVERSION      = $build_info->{BUILDVERSION};
1197
 
1200
 
1198
    $DEPLOY_PATCH      = $build_info->{DEPLOY_PATCH} || 0;
1201
    $DEPLOY_PATCH      = $build_info->{DEPLOY_PATCH} || 0;
Line 1203... Line 1206...
1203
    #
1206
    #
1204
    push @CLOBBERFILES, 'build.log';
1207
    push @CLOBBERFILES, 'build.log';
1205
    push @CLOBBERFILES, 'ChangeLog', 'ChangeLog.bak' if ( $ScmHost eq "Unix" );
1208
    push @CLOBBERFILES, 'ChangeLog', 'ChangeLog.bak' if ( $ScmHost eq "Unix" );
1206
    return if ( $Clobber );
1209
    return if ( $Clobber );
1207
 
1210
 
-
 
1211
    #
-
 
1212
    #   Determine type of sandbox
-
 
1213
    #
-
 
1214
    $sandbox_exact = ( -f $::GBE_DPKG_SBOX . '/.exact' )
-
 
1215
        if ( $::GBE_DPKG_SBOX );
-
 
1216
    
1208
#.. Create the ChangeLog
1217
#.. Create the ChangeLog
1209
#
1218
#
1210
    if ( -d "CVS" )                             # CVS support subdir
1219
    if ( -d "CVS" )                             # CVS support subdir
1211
    {
1220
    {
1212
        System( "$::GBE_PERL $::GBE_TOOLS/cvs2cl.pl --tags --branches --revisions --day-of-week" )
1221
        System( "$::GBE_PERL $::GBE_TOOLS/cvs2cl.pl --tags --branches --revisions --day-of-week" )
Line 1224... Line 1233...
1224
    Log( "DeployPatch. $DEPLOY_PATCH" ) if ($DEPLOY_PATCH);
1233
    Log( "DeployPatch. $DEPLOY_PATCH" ) if ($DEPLOY_PATCH);
1225
    Log( "Project .... $BUILDNAME_PROJECT" )if ($BUILDNAME_PROJECT);
1234
    Log( "Project .... $BUILDNAME_PROJECT" )if ($BUILDNAME_PROJECT);
1226
    Log( "Project .... ****** Specifically supressed ******" )unless ($BUILDNAME_PROJECT);
1235
    Log( "Project .... ****** Specifically supressed ******" )unless ($BUILDNAME_PROJECT);
1227
    Log( "DateTime ... $::CurrentTime" );
1236
    Log( "DateTime ... $::CurrentTime" );
1228
    Log( "AutoBuild... Enabled:$::GBE_ABT" ) if defined($::GBE_ABT) ;
1237
    Log( "AutoBuild... Enabled:$::GBE_ABT" ) if defined($::GBE_ABT) ;
1229
    Log( "Build dir... $Cwd" ) if defined($::GBE_ABT) ;
1238
    Log( "Build dir... $Cwd" ) if defined($::GBE_ABT) || $::GBE_DPKG_SBOX;
1230
 
1239
 
1231
    Log( "BIN  ....... $::GBE_BIN" );
-
 
1232
    Log( "PERL ....... $::GBE_PERL" );
1240
    Log( "PERL ....... $::GBE_PERL" );
-
 
1241
    Log( "BIN  ....... $::GBE_BIN" );
1233
    Log( "TOOLS ...... $::GBE_TOOLS" );
1242
    Log( "TOOLS ...... $::GBE_TOOLS" );
1234
    Log( "CONFIG ..... $::GBE_CONFIG" );
1243
    Log( "CONFIG ..... $::GBE_CONFIG" );
1235
    Log( "MACHTYPE ... $::GBE_MACHTYPE" );
1244
    Log( "MACHTYPE ... $::GBE_MACHTYPE" );
1236
 
1245
 
1237
    Log( "PLATFORM ... " . PrintList([split(' ', $::GBE_PLATFORM)], $sep) )    if defined ($::GBE_PLATFORM);
1246
    Log( "PLATFORM ... " . PrintList([split(' ', $::GBE_PLATFORM)], $sep) )    if defined ($::GBE_PLATFORM);
Line 1240... Line 1249...
1240
    Log( "DPKG_STORE.. $::GBE_DPKG_STORE" );
1249
    Log( "DPKG_STORE.. $::GBE_DPKG_STORE" );
1241
    Log( "DPKG ....... $::GBE_DPKG" );
1250
    Log( "DPKG ....... $::GBE_DPKG" );
1242
    Log( "DPKG_CACHE . $::GBE_DPKG_CACHE" );
1251
    Log( "DPKG_CACHE . $::GBE_DPKG_CACHE" );
1243
    Log( "DPKG_LOCAL . $::GBE_DPKG_LOCAL" );
1252
    Log( "DPKG_LOCAL . $::GBE_DPKG_LOCAL" );
1244
    Log( "DPKG_SBOX .. $::GBE_DPKG_SBOX" );
1253
    Log( "DPKG_SBOX .. $::GBE_DPKG_SBOX" );
-
 
1254
    Log( "Sandbox .... " . ($sandbox_exact ? "Exact" : "Development") );
-
 
1255
 
1245
 
1256
 
1246
    Log( "Platforms .. " . PrintPlatforms(\@BUILDPLATFORMS, $sep) );
1257
    Log( "Platforms .. " . PrintPlatforms(\@BUILDPLATFORMS, $sep) );
1247
 
1258
 
1248
    #
1259
    #
1249
    #   Generate a list of platforms that are completely unknown to JATS
1260
    #   Generate a list of platforms that are completely unknown to JATS
Line 1584... Line 1595...
1584
sub PackageLocate
1595
sub PackageLocate
1585
{
1596
{
1586
    my ($name, $uversion ) = @_;
1597
    my ($name, $uversion ) = @_;
1587
    my $pkg;
1598
    my $pkg;
1588
    my $local = 1;
1599
    my $local = 1;
1589
    my $sandbox = 1;
1600
    my $sandbox = ! $sandbox_exact;
1590
    my $isa_cache = 0;
1601
    my $isa_cache = 0;
1591
    my $version;
1602
    my $version;
1592
    my ($pn, $pv, $ps ) = SplitPackage ($name, $uversion );
-
 
1593
 
1603
 
1594
    Debug( "PackageLocate: ($name/$uversion)" );
1604
    Debug( "PackageLocate: ($name/$uversion)" );
1595
 
1605
 
1596
    #
1606
    #
1597
    #   Look in each package archive directory
1607
    #   Look in each package archive directory
Line 1635... Line 1645...
1635
        #   not used. The Package suffix is still used so that we can
1645
        #   not used. The Package suffix is still used so that we can
1636
        #   differentiate sysbasetypes.xxxxx.mas and sysbasetypes.xxxxx.syd
1646
        #   differentiate sysbasetypes.xxxxx.mas and sysbasetypes.xxxxx.syd
1637
        #
1647
        #
1638
        if ( $sandbox )
1648
        if ( $sandbox )
1639
        {
1649
        {
-
 
1650
            my ($pn, $pv, $ps ) = SplitPackage ($name, $uversion );
1640
            $version = 'sandbox';
1651
            $version = 'sandbox';
1641
            $version .= '.' . $ps if ( $ps );
1652
            $version .= '.' . $ps if ( $ps );
1642
        }
1653
        }
1643
        else
1654
        else
1644
        {
1655
        {
Line 2815... Line 2826...
2815
    #
2826
    #
2816
    if ( $target_archive = $::GBE_DPKG_SBOX )
2827
    if ( $target_archive = $::GBE_DPKG_SBOX )
2817
    {
2828
    {
2818
        $target_archive_name = "sandbox_dpkg_archive";
2829
        $target_archive_name = "sandbox_dpkg_archive";
2819
        $tag = "Sandbox";
2830
        $tag = "Sandbox";
-
 
2831
        if ( $sandbox_exact )
2820
 
2832
        {
2821
        $link_file  = 'sandbox';
2833
            $link_file = "$BUILDVERSION.lnk";
-
 
2834
        }
-
 
2835
        else
-
 
2836
        {
2822
        $link_file .= '.' . $BUILDNAME_PROJECT if ( $BUILDNAME_PROJECT );
2837
            $link_file  = 'sandbox' . ${BUILDNAME_SUFFIX} . '.lnk';
2823
        $link_file .= '.lnk';
2838
        }
2824
    }
2839
    }
2825
    elsif ( $target_archive = $::GBE_DPKG_LOCAL )
2840
    elsif ( $target_archive = $::GBE_DPKG_LOCAL )
2826
    {
2841
    {
2827
        $target_archive_name = "local_dpkg_archive";
2842
        $target_archive_name = "local_dpkg_archive";
2828
        $link_file = "$BUILDVERSION.lnk";
2843
        $link_file = "$BUILDVERSION.lnk";
Line 2897... Line 2912...
2897
    #   information as this will not be correct
2912
    #   information as this will not be correct
2898
    #
2913
    #
2899
    #   PACKAGE/sandbox.PRJ.cfg
2914
    #   PACKAGE/sandbox.PRJ.cfg
2900
    #
2915
    #
2901
    my $link_dir = "$sandbox_dpkg_archive/$BUILDNAME_PACKAGE";
2916
    my $link_dir = "$sandbox_dpkg_archive/$BUILDNAME_PACKAGE";
2902
    my $link_file = 'sandbox';
2917
    my $link_file;
-
 
2918
 
-
 
2919
    if ( $sandbox_exact )
-
 
2920
    {
2903
       $link_file .= '.' . $BUILDNAME_PROJECT if ( $BUILDNAME_PROJECT );
2921
        $link_file = "$BUILDVERSION.cfg";
-
 
2922
    }
-
 
2923
    else
-
 
2924
    {
2904
       $link_file .= '.cfg';
2925
        $link_file  = 'sandbox' . ${BUILDNAME_SUFFIX} . '.cfg';
-
 
2926
    }
2905
    my $link_path = "$link_dir/$link_file";
2927
    my $link_path = "$link_dir/$link_file";
2906
 
2928
 
2907
    if ( $Clobber )
2929
    if ( $Clobber )
2908
    {
2930
    {
2909
        unlink $link_path;          # Delete the link
2931
        unlink $link_path;          # Delete the link