Subversion Repositories DevTools

Rev

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

Rev 391 Rev 2085
Line 46... Line 46...
46
our $Cache                  = 0;
46
our $Cache                  = 0;
47
our $NoPackageError         = 0;
47
our $NoPackageError         = 0;
48
our $ForceBuildPkg          = 0;
48
our $ForceBuildPkg          = 0;
49
our $Srcdir                 = "";               # default source root
49
our $Srcdir                 = "";               # default source root
50
our $ForceBuild             = 1;
50
our $ForceBuild             = 1;
-
 
51
our $IgnorePkgs             = 0;
51
 
52
 
52
#.. Public symbols, referenced by many build.pl implementations
53
#.. Public symbols, referenced by many build.pl implementations
53
#
54
#
54
our $BUILDPREVIOUSVERSION   = "0.0.0";          # BuildPreviousVersion()
55
our $BUILDPREVIOUSVERSION   = "0.0.0";          # BuildPreviousVersion()
55
our @BUILDPLATFORMS         = ();               # BuildPlatforms()
56
our @BUILDPLATFORMS         = ();               # BuildPlatforms()
Line 150... Line 151...
150
                             "expert:1"      => \$Expert,
151
                             "expert:1"      => \$Expert,
151
                             "all"           => \$All,
152
                             "all"           => \$All,
152
                             "nolog"         => \$Nolog,
153
                             "nolog"         => \$Nolog,
153
                             "cache:+"       => \$Cache,
154
                             "cache:+"       => \$Cache,
154
                             "package"       => \$NoPackageError,
155
                             "package"       => \$NoPackageError,
-
 
156
                             "nopackages"    => \$IgnorePkgs,
155
                             "forcebuildpkg" => \$ForceBuildPkg,
157
                             "forcebuildpkg" => \$ForceBuildPkg,
156
                             "force!"        => \$ForceBuild,
158
                             "force!"        => \$ForceBuild,
157
                             );
159
                             );
158
    Usage() if ( $opt_help || !$result );
160
    Usage() if ( $opt_help || !$result );
159
 
161
 
Line 168... Line 170...
168
    Debug( "Nolog:         ", $Nolog );
170
    Debug( "Nolog:         ", $Nolog );
169
    Debug( "Cache:         ", $Cache );
171
    Debug( "Cache:         ", $Cache );
170
    Debug( "package:       ", $NoPackageError );
172
    Debug( "package:       ", $NoPackageError );
171
    Debug( "ForcePkg  :    ", $ForceBuildPkg );
173
    Debug( "ForcePkg  :    ", $ForceBuildPkg );
172
    Debug( "ForceBuild :   ", $ForceBuild );
174
    Debug( "ForceBuild :   ", $ForceBuild );
-
 
175
    Debug( "$IgnorePkgs :  ", $IgnorePkgs );
173
 
176
 
174
#.. Command
177
#.. Command
175
#
178
#
176
    $CmdSwitch = shift @ARGV;
179
    $CmdSwitch = lc shift @ARGV;
177
    Debug( "CmdSwitch:     ", $CmdSwitch );
180
    Debug( "CmdSwitch:     ", $CmdSwitch );
178
 
181
 
179
    if ( $CmdSwitch )
182
    if ( $CmdSwitch )
180
    {
183
    {
181
        if ( $CmdSwitch eq "interface" ) {
184
        if ( $CmdSwitch eq "interface" ) {
Line 1473... Line 1476...
1473
 
1476
 
1474
sub LinkSandbox
1477
sub LinkSandbox
1475
{
1478
{
1476
    my( $name, $path, $platform ) = @_;
1479
    my( $name, $path, $platform ) = @_;
1477
    return if ( $Clobber );                     # clobber mode ?
1480
    return if ( $Clobber );                     # clobber mode ?
-
 
1481
 
1478
    Warning ("LinkSandbox() This directive is being deprecated.");       #Dec-2011
1482
    Warning ("LinkSandbox() This directive is being deprecated.");       #Dec-2011
1479
 
1483
 
1480
    Error ("LinkSandbox() expects three arguments:  @_")
1484
    Error ("LinkSandbox() expects three arguments:  @_")
1481
        unless ( $#_ == 2 );
1485
        unless ( $#_ == 2 );
1482
 
1486
 
Line 1487... Line 1491...
1487
    Debug( "Package:   $name" );
1491
    Debug( "Package:   $name" );
1488
    Debug( "Version:   $path" );
1492
    Debug( "Version:   $path" );
1489
 
1493
 
1490
    DataDirective("LinkSandbox");               # This directive allowed here
1494
    DataDirective("LinkSandbox");               # This directive allowed here
1491
 
1495
 
-
 
1496
    if ( $IgnorePkgs )
-
 
1497
    {
-
 
1498
        Log( "LinkSandbox. $name ($path) - Ignored" );
-
 
1499
        return;
-
 
1500
    }
-
 
1501
 
1492
#
1502
#
1493
#   If GBE_BUILDFILTER exists, Import 'user' platform
1503
#   If GBE_BUILDFILTER exists, Import 'user' platform
1494
#   specification and filter against the BUILD_ACTIVEPLATFORMS.
1504
#   specification and filter against the BUILD_ACTIVEPLATFORMS.
1495
#
1505
#
1496
    Log( "LinkSandbox. $name ($path)" );
1506
    Log( "LinkSandbox. $name ($path)" );
Line 1540... Line 1550...
1540
    Debug( "Name:      $name" );
1550
    Debug( "Name:      $name" );
1541
    Debug( "Version:   $version" );
1551
    Debug( "Version:   $version" );
1542
 
1552
 
1543
    DataDirective("LinkPkgArchive");            # This directive allowed here
1553
    DataDirective("LinkPkgArchive");            # This directive allowed here
1544
 
1554
 
-
 
1555
    if ( $IgnorePkgs )
-
 
1556
    {
-
 
1557
        Log( "LinkPkgArchive .. $name ($version) - Ignored" );
-
 
1558
        return;
-
 
1559
    }
-
 
1560
 
1545
    #
1561
    #
1546
    #   Ensure that we have do not have multiple definitions
1562
    #   Ensure that we have do not have multiple definitions
1547
    #
1563
    #
1548
    if ( PackageEntry::Exists( $name, $version ) )
1564
    if ( PackageEntry::Exists( $name, $version ) )
1549
    {
1565
    {
Line 1723... Line 1739...
1723
            close( LNKFILE );
1739
            close( LNKFILE );
1724
            $pkg = '' unless ( $pkg );
1740
            $pkg = '' unless ( $pkg );
1725
            $pkg =~ s~\s+$~~;;
1741
            $pkg =~ s~\s+$~~;;
1726
            $pkg =~ s~^GBE_SANDBOX/~$::GBE_SANDBOX/~;
1742
            $pkg =~ s~^GBE_SANDBOX/~$::GBE_SANDBOX/~;
1727
 
1743
 
-
 
1744
            unless ( -d $pkg )
-
 
1745
            {
1728
            Error ("Broken link: $pkg",
1746
                Error ("Broken link: $pkg",
1729
                   "Source link: $link_src",
1747
                       "Source link: $link_src",
1730
                   "Try deleting the .lnk file" ) unless ( -d $pkg );
1748
                       "Try deleting the .lnk file" ) unless ( $NoPackageError );
-
 
1749
 
-
 
1750
                Warning ("Package not available. Broken link: $pkg");
-
 
1751
            }
1731
        }
1752
        }
1732
 
1753
 
1733
        Debug( "           searching $pkg" );
1754
        Debug( "           searching $pkg" );
1734
 
1755
 
1735
        #   Does the package directory exist?
1756
        #   Does the package directory exist?
Line 1896... Line 1917...
1896
    Debug( "Name:      $name" );
1917
    Debug( "Name:      $name" );
1897
    Debug( "Version:   $version" );
1918
    Debug( "Version:   $version" );
1898
 
1919
 
1899
    DataDirective("BuildPkgArchive");           # This directive allowed here
1920
    DataDirective("BuildPkgArchive");           # This directive allowed here
1900
 
1921
 
-
 
1922
    if ( $IgnorePkgs )
-
 
1923
    {
-
 
1924
        Log( "BuildPkgArchive . $name ($version) - Ignored" );
-
 
1925
        return;
-
 
1926
    }
-
 
1927
    
1901
    #
1928
    #
1902
    #   Ensure that we have do not have multiple definitions
1929
    #   Ensure that we have do not have multiple definitions
1903
    #
1930
    #
1904
    if ( PackageEntry::Exists( $name, $version ) )
1931
    if ( PackageEntry::Exists( $name, $version ) )
1905
    {
1932
    {
Line 3913... Line 3940...
3913
    -debug[=n]     - Set the debug level
3940
    -debug[=n]     - Set the debug level
3914
    -nolog         - Do not generate/update Changelog
3941
    -nolog         - Do not generate/update Changelog
3915
    -cache         - Cache packages in the local dpkg_package cache
3942
    -cache         - Cache packages in the local dpkg_package cache
3916
    -cache -cache  - Forced refresh dependent packages in the local cache
3943
    -cache -cache  - Forced refresh dependent packages in the local cache
3917
    -package       - Ignore packages that are not available and continue
3944
    -package       - Ignore packages that are not available and continue
-
 
3945
    -nopackages    - Ignore package processing directives
3918
    -forcebuildpkg - Treat LinkPkgArchive directives as BuildPkgArchive
3946
    -forcebuildpkg - Treat LinkPkgArchive directives as BuildPkgArchive
3919
                     Also suppress the use of symlinks so that the physical
3947
                     Also suppress the use of symlinks so that the physical
3920
                     file will be copied locally.
3948
                     file will be copied locally.
3921
    -[no]force     - Force build even if build.pl is not newer
3949
    -[no]force     - Force build even if build.pl is not newer
3922
                     Default: -force
3950
                     Default: -force
Line 3925... Line 3953...
3925
    -all           - Build for all platforms ignoring GBE_BUILDFILTER
3953
    -all           - Build for all platforms ignoring GBE_BUILDFILTER
3926
    -expert[=n]    - Relaxing dependency checks on the user makefiles
3954
    -expert[=n]    - Relaxing dependency checks on the user makefiles
3927
 
3955
 
3928
 Commands:
3956
 Commands:
3929
    changelog      - Only update ChangeLog.
3957
    changelog      - Only update ChangeLog.
-
 
3958
    clobber        - Remove generated build system (eg Makefiles).
3930
    interface      - Only (re)build the interface tree, including ChangeLog.
3959
    interface      - Only (re)build the interface tree, including ChangeLog.
3931
    rootonly       - Only (re)build the root directory.
3960
    rootonly       - Only (re)build the root directory.
3932
    clobber        - Remove generated build system (eg Makefiles).
-
 
3933
 
3961
 
3934
=head1 OPTIONS
3962
=head1 OPTIONS
3935
 
3963
 
3936
=over 8
3964
=over 8
3937
 
3965
 
Line 3980... Line 4008...
3980
located. The package build may fail at a later stage.
4008
located. The package build may fail at a later stage.
3981
 
4009
 
3982
This option is used by the Auto Build Tool to handle packages that may not be
4010
This option is used by the Auto Build Tool to handle packages that may not be
3983
needed in all builds.
4011
needed in all builds.
3984
 
4012
 
-
 
4013
=item B<-nopackage>
-
 
4014
 
-
 
4015
This options will cause all the directives that process external packages to be
-
 
4016
ignored.
-
 
4017
 
-
 
4018
This directive has limited use. It can be used in conjunction with the
-
 
4019
'interface' build command in order to create Version Information files in a
-
 
4020
sandbox where the required packages do not yet exist.
-
 
4021
 
3985
=item B<-forcebuildpkg>
4022
=item B<-forcebuildpkg>
3986
 
4023
 
3987
This option will force LinkPkgArchive directives to be treated as
4024
This option will force LinkPkgArchive directives to be treated as
3988
BuildPkgArchive directives. The result is that the 'interface' directory will be
4025
BuildPkgArchive directives. The result is that the 'interface' directory will be
3989
populated with the contents of all dependent packages. Moreover, on a Unix
4026
populated with the contents of all dependent packages. Moreover, on a Unix