Subversion Repositories DevTools

Rev

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

Rev 263 Rev 267
Line 176... Line 176...
176
our @CXXFLAGS_PROD          = ();
176
our @CXXFLAGS_PROD          = ();
177
our @CXXLINTFLAGS           = ();
177
our @CXXLINTFLAGS           = ();
178
our @CXXLINTFLAGS_DEBUG     = ();
178
our @CXXLINTFLAGS_DEBUG     = ();
179
our @CXXLINTFLAGS_PROD      = ();
179
our @CXXLINTFLAGS_PROD      = ();
180
our @ASFLAGS                = ();
180
our @ASFLAGS                = ();
-
 
181
our @ASFLAGS_DEBUG          = ();
-
 
182
our @ASFLAGS_PROD           = ();
181
our @LDFLAGS                = ();
183
our @LDFLAGS                = ();
-
 
184
our @LDFLAGS_DEBUG          = ();
-
 
185
our @LDFLAGS_PROD           = ();
182
 
186
 
183
our @INCDIRS                = ();
187
our @INCDIRS                = ();
184
our @NODEPDIRS              = ();
188
our @NODEPDIRS              = ();
185
our @S_INCDIRS              = ();
189
our @S_INCDIRS              = ();
186
our @G_INCDIRS              = ();
190
our @G_INCDIRS              = ();
Line 288... Line 292...
288
#our $CurrentDate           = "";
292
#our $CurrentDate           = "";
289
#our $Cwd                   = "";
293
#our $Cwd                   = "";
290
 
294
 
291
our @GENERATE_FILES         = ();
295
our @GENERATE_FILES         = ();
292
our %DEPLOYPACKAGE          = ();
296
our %DEPLOYPACKAGE          = ();
-
 
297
our $DEPLOYPACKAGE          = 0;
293
our %MakeTags;
298
our %MakeTags;
294
 
299
 
295
#
300
#
296
#   Some toolset options that affect the generation of the makefile
301
#   Some toolset options that affect the generation of the makefile
297
#
302
#
Line 1160... Line 1165...
1160
 
1165
 
1161
        'compile_as_cpp'        => { 'FORCE_CC_COMPILE'    => '1',
1166
        'compile_as_cpp'        => { 'FORCE_CC_COMPILE'    => '1',
1162
                                     'FORCE_C_COMPILE'     => undef },
1167
                                     'FORCE_C_COMPILE'     => undef },
1163
        'compile_as_c'          => { 'FORCE_C_COMPILE'     => '1',
1168
        'compile_as_c'          => { 'FORCE_C_COMPILE'     => '1',
1164
                                     'FORCE_CC_COMPILE'    => undef },
1169
                                     'FORCE_CC_COMPILE'    => undef },
-
 
1170
 
-
 
1171
        'no_define_source_file' => { 'DISABLE__SOURCE__' => '1' },
-
 
1172
        'define_source_file'    => { 'DISABLE__SOURCE__' => undef },    # Default
-
 
1173
 
1165
    );
1174
    );
1166
 
1175
 
1167
#
1176
#
1168
#   The toolset can extend the options by setting the following hash
1177
#   The toolset can extend the options by setting the following hash
1169
#
1178
#
Line 1317... Line 1326...
1317
 
1326
 
1318
    Debug2( "AddASFlags($platforms, @elements)" );
1327
    Debug2( "AddASFlags($platforms, @elements)" );
1319
 
1328
 
1320
    return if ( ! ActivePlatform($platforms) );
1329
    return if ( ! ActivePlatform($platforms) );
1321
 
1330
 
1322
    __AddFlags( "ASFLAGS", \@elements, \@ASFLAGS );
1331
    __AddFlags( "ASFLAGS", \@elements,
-
 
1332
                \@ASFLAGS, undef,
-
 
1333
                \@ASFLAGS_DEBUG, undef,
-
 
1334
                \@ASFLAGS_PROD, undef );
1323
}
1335
}
1324
 
1336
 
1325
sub AddLDFlags
1337
sub AddLDFlags
1326
{
1338
{
1327
    my( $platforms, @elements ) = @_;
1339
    my( $platforms, @elements ) = @_;
Line 1330... Line 1342...
1330
 
1342
 
1331
    return if ( ! ActivePlatform($platforms) );
1343
    return if ( ! ActivePlatform($platforms) );
1332
 
1344
 
1333
    foreach  ( @elements )
1345
    foreach  ( @elements )
1334
    {
1346
    {
-
 
1347
        next if ( m~^--(Debug|Prod)~ );
1335
        Warning("Use of linker flag discouraged (will be used): $_");
1348
        Warning("Use of linker flag discouraged (will be used): $_");
1336
    }
1349
    }
1337
    __AddFlags( "LDFLAGS", \@elements, \@LDFLAGS );
1350
    __AddFlags( "LDFLAGS", \@elements,
-
 
1351
                \@LDFLAGS, undef,
-
 
1352
                \@LDFLAGS_DEBUG, undef,
-
 
1353
                \@LDFLAGS_PROD, undef );
1338
    
1354
    
1339
}
1355
}
1340
 
1356
 
1341
sub AddLintFlags
1357
sub AddLintFlags
1342
{
1358
{
Line 4746... Line 4762...
4746
#
4762
#
4747
#                   There are many constraints:
4763
#                   There are many constraints:
4748
#                       Cannot be mixed with multi-platform builds
4764
#                       Cannot be mixed with multi-platform builds
4749
#                       Some parameters are tool specific
4765
#                       Some parameters are tool specific
4750
#
4766
#
-
 
4767
#                   Allow programs to be Installed as well as Packaged
-
 
4768
#                   The 'Progect' is treated' as a program and it doesn't work
-
 
4769
#                   to well if we Install libraries.
-
 
4770
#
-
 
4771
#                   Only Reason to Install Programs is to allow the Cab Maker
-
 
4772
#                   to locate them.
4751
#
4773
#
4752
# Inputs          : Platform        - Active platform
4774
# Inputs          : Platform        - Active platform
4753
#                   Project         - Project Name with extension
4775
#                   Project         - Project Name with extension
4754
#                   Options         - Many options
4776
#                   Options         - Many options
4755
#
4777
#
Line 4790... Line 4812...
4790
            $PROJECTS{$proj}{'Debug'} = 1;
4812
            $PROJECTS{$proj}{'Debug'} = 1;
4791
 
4813
 
4792
        } elsif ( m/^--Prod/ ) {
4814
        } elsif ( m/^--Prod/ ) {
4793
            $PROJECTS{$proj}{'Prod'} = 1;
4815
            $PROJECTS{$proj}{'Prod'} = 1;
4794
 
4816
 
4795
        } elsif ( m/^--PackageProgDebug=(.*)/ ) {
4817
        } elsif ( m/^--(Package|Install)ProgDebug=(.*)/ ) {
4796
            _PackageFromProject( $proj, $basedir,'Prog', 'D', $1 );
4818
            _PackageFromProject( $1, $proj, $basedir,'Prog', 'D', $2 );
4797
 
4819
 
4798
        } elsif ( m/^--PackageProg(Prod)*=(.*)/ ) {
4820
        } elsif ( m/^--(Package|Install)Prog(Prod)*=(.*)/ ) {
4799
            _PackageFromProject( $proj, $basedir, 'Prog', 'P', $2 );
4821
            _PackageFromProject( $1, $proj, $basedir, 'Prog', 'P', $3 );
4800
 
4822
 
4801
        } elsif ( m/^--PackageLibDebug=(.*)/ ) {
4823
        } elsif ( m/^--(Package)LibDebug=(.*)/ ) {
4802
            _PackageFromProject( $proj, $basedir, 'Lib', 'D', $1 );
4824
            _PackageFromProject( $1, $proj, $basedir, 'Lib', 'D', $2 );
4803
 
4825
 
4804
        } elsif ( m/^--PackageLib(Prod)*=(.*)/ ) {
4826
        } elsif ( m/^--(Package)Lib(Prod)*=(.*)/ ) {
4805
            _PackageFromProject( $proj, $basedir, 'Lib', 'P', $2 );
4827
            _PackageFromProject( $1, $proj, $basedir, 'Lib', 'P', $3 );
4806
 
4828
 
4807
        } elsif ( m/^--PackageSharedLibDebug=(.*)/ ) {
4829
        } elsif ( m/^--(Package)SharedLibDebug=(.*)/ ) {
4808
            _PackageFromProject( $proj, $basedir, 'Lib', 'D', $1 );
4830
            _PackageFromProject( $1, $proj, $basedir, 'Lib', 'D', $2 );
4809
 
4831
 
4810
        } elsif ( m/^--PackageSharedLib(Prod)*=(.*)/ ) {
4832
        } elsif ( m/^--(Package)SharedLib(Prod)*=(.*)/ ) {
4811
            _PackageFromProject( $proj, $basedir, 'Lib', 'P', $2 );
4833
            _PackageFromProject( $1, $proj, $basedir, 'Lib', 'P', $3 );
4812
 
4834
 
4813
        } elsif ( m/^--PackageHdr=(.*)/ ) {
4835
        } elsif ( m/^--(Package)Hdr=(.*)/ ) {
4814
            _PackageFromProject( $proj, $basedir, 'Hdr', undef, $1 );
4836
            _PackageFromProject( $1, $proj, $basedir, 'Hdr', undef, $2 );
4815
 
4837
 
4816
        } elsif ( m/^--PackageFile=(.*)/ ) {
4838
        } elsif ( m/^--(Package)File=(.*)/ ) {
4817
            _PackageFromProject( $proj, $basedir, 'File', undef, $1 );
4839
            _PackageFromProject( $1, $proj, $basedir, 'File', undef, $2 );
4818
 
4840
 
4819
        } elsif ( m/^--PackageTool(Prod)*=(.*)/ ) {
4841
        } elsif ( m/^--(Package)Tool(Prod)*=(.*)/ ) {
4820
            _PackageFromProject( $proj, $basedir, 'Tool', 'P', $2 );
4842
            _PackageFromProject( $1, $proj, $basedir, 'Tool', 'P', $3 );
4821
 
4843
 
4822
        } elsif ( m/^--PackageToolDebug=(.*)/ ) {
4844
        } elsif ( m/^--(Package)ToolDebug=(.*)/ ) {
4823
            _PackageFromProject( $proj, $basedir, 'Tool', 'D', $1 );
4845
            _PackageFromProject( $1, $proj, $basedir, 'Tool', 'D', $2 );
4824
 
4846
 
4825
        } elsif ( m/^--Package/ ) {
4847
        } elsif ( m/^--(Package|Install)/ ) {
4826
            Error("MakeProject. Unknown Package option: $_");
4848
            Error("MakeProject. Unknown $1 option: $_");
4827
 
4849
 
4828
        } else {
4850
        } else {
4829
            push @tool_options, $_;
4851
            push @tool_options, $_;
4830
        }
4852
        }
4831
    }
4853
    }
Line 4849... Line 4871...
4849
#-------------------------------------------------------------------------------
4871
#-------------------------------------------------------------------------------
4850
# Function        : _PackageFromProject
4872
# Function        : _PackageFromProject
4851
#
4873
#
4852
# Description     : Save Packaged data from the project
4874
# Description     : Save Packaged data from the project
4853
#
4875
#
-
 
4876
# Inputs          : $tgt        - Install or Package
4854
# Inputs          : $proj       - Name of the project
4877
#                   $proj       - Name of the project
4855
#                   $base       - Base directory of files
4878
#                   $base       - Base directory of files
4856
#                   $etype      - Type of Package (Progs, Libs, ... )
4879
#                   $etype      - Type of Package (Progs, Libs, ... )
4857
#                   $type       - Debug or Production or both
4880
#                   $type       - Debug or Production or both
4858
#                   $items      - Item to add. It may be comma seperated
4881
#                   $items      - Item to add. It may be comma seperated
4859
#
4882
#
-
 
4883
my %PackageToData = ( 'Package' =>
4860
my %PackageToData = ( 'Hdr'   => \%PACKAGE_HDRS,
4884
                        { 'Hdr'   => \%PACKAGE_HDRS,
4861
                      'Lib'   => \%PACKAGE_LIBS,
4885
                          'Lib'   => \%PACKAGE_LIBS,
4862
                      'Prog'  => \%PACKAGE_PROGS,
4886
                          'Prog'  => \%PACKAGE_PROGS,
4863
                      'File'  => \%PACKAGE_FILES,
4887
                          'File'  => \%PACKAGE_FILES,
4864
                      'Tool'  => \%PACKAGE_FILES,
4888
                          'Tool'  => \%PACKAGE_FILES,
-
 
4889
                          '_BASE' => 'PBase',
-
 
4890
                        },
-
 
4891
                      'Install' =>
-
 
4892
                        { 'Hdr'   => \%INSTALL_HDRS,
-
 
4893
                          'Lib'   => \%INSTALL_LIBS,
-
 
4894
                          'Prog'  => \%INSTALL_PROGS,
-
 
4895
                          'File'  => undef,
-
 
4896
                          'Tool'  => undef,
-
 
4897
                          '_BASE' => 'IBase',
-
 
4898
                        },
4865
                    );
4899
                    );
4866
 
4900
 
4867
sub _PackageFromProject
4901
sub _PackageFromProject
4868
{
4902
{
4869
    my( $proj, $base, $etype, $type, $items ) = @_;
4903
    my( $tgt, $proj, $base, $etype, $type, $items ) = @_;
4870
    my $subdir = '';
4904
    my $subdir = '';
4871
 
4905
 
4872
    #
4906
    #
-
 
4907
    #   Sanity test
-
 
4908
    #
-
 
4909
    $type = '' unless ( $type );
-
 
4910
    Error ("INTERNAL. Bad packaging option: $tgt")   unless ( exists $PackageToData{$tgt} );
-
 
4911
    Error ("INTERNAL. Bad packaging option: $etype") unless ( exists $PackageToData{$tgt}{$etype} );
-
 
4912
    Error ("Unsupported packaging combination: $tgt$etype$type=$items") unless ( defined $PackageToData{$tgt}{$etype} );
-
 
4913
 
-
 
4914
    #
-
 
4915
    #   Determine the index into the 'PackageInfo' structure
-
 
4916
    #   This provides the symbolic name for the target package path
-
 
4917
    #   for Package or Install
-
 
4918
    #
-
 
4919
    #   The key '_BASE' is internal. Used only to provide this information
-
 
4920
    #
-
 
4921
    my $tbase = $PackageToData{$tgt}{'_BASE'};
-
 
4922
 
-
 
4923
    #
4873
    #   Process options
4924
    #   Process options
4874
    #
4925
    #
4875
    foreach my $item ( split (/,/, $items ) )
4926
    foreach my $item ( split (/,/, $items ) )
4876
    {
4927
    {
4877
        next unless ( $item =~ m/^--/ );
4928
        next unless ( $item =~ m/^--/ );
Line 4892... Line 4943...
4892
    #
4943
    #
4893
    foreach my $item ( split (/,/, $items ) )
4944
    foreach my $item ( split (/,/, $items ) )
4894
    {
4945
    {
4895
        next if ( $item =~ m/^--/ );
4946
        next if ( $item =~ m/^--/ );
4896
 
4947
 
4897
        my $tdir = $PackageInfo{$etype}{'PBase'} . $PackageInfo{$etype}{'Dir'} . $subdir ;
4948
        my $tdir = $PackageInfo{$etype}{$tbase} . $PackageInfo{$etype}{'Dir'} . $subdir ;
4898
        my $fname = StripDir( $item );
4949
        my $fname = StripDir( $item );
4899
        my $target = $tdir . '/' . $fname;
4950
        my $target = $tdir . '/' . $fname;
4900
 
4951
 
4901
        $item = "$base/$item" if ( $base );
4952
        $item = "$base/$item" if ( $base );
4902
 
4953
 
Line 4909... Line 4960...
4909
        $target =~ s~\$\(GBE_TYPE\)~$type~ if ($type);
4960
        $target =~ s~\$\(GBE_TYPE\)~$type~ if ($type);
4910
 
4961
 
4911
        #
4962
        #
4912
        #   Create a PACKAGE entry suitable for processing by the normal packaging
4963
        #   Create a PACKAGE entry suitable for processing by the normal packaging
4913
        #   routines. This is complicated because the Projects do not adhere to
4964
        #   routines. This is complicated because the Projects do not adhere to
4914
        #   the JATS file name convenstions
4965
        #   the JATS file name conventions
4915
        #
4966
        #
4916
        my %package_entry;
4967
        my %package_entry;
4917
        $package_entry{'src'}   = $item;
4968
        $package_entry{'src'}   = $item;
4918
        $package_entry{'dir'}   = $tdir;
4969
        $package_entry{'dir'}   = $tdir;
4919
        $package_entry{'set'}   = 'ALL';
4970
        $package_entry{'set'}   = 'ALL' if ($tgt eq 'Package');
4920
        $package_entry{'type'}  = $type if ($type);
4971
        $package_entry{'type'}  = $type if ($type);
4921
 
4972
 
4922
        $PackageToData{$etype}->{$target} = {%package_entry};
4973
        $PackageToData{$tgt}{$etype}->{$target} = {%package_entry};
4923
    }
4974
    }
4924
}
4975
}
4925
 
4976
 
4926
#-------------------------------------------------------------------------------
4977
#-------------------------------------------------------------------------------
4927
# Function        : MakeAnt
4978
# Function        : MakeAnt
Line 5698... Line 5749...
5698
    #
5749
    #
5699
        HashJoin( \%PACKAGE_DIST, $;, $name, "$_" );
5750
        HashJoin( \%PACKAGE_DIST, $;, $name, "$_" );
5700
 
5751
 
5701
    #.. Summary of distribution sets
5752
    #.. Summary of distribution sets
5702
    #
5753
    #
5703
        $PACKAGE_SETS{ $_ } = 1
5754
        $PACKAGE_SETS{ $_ }{'TAG'} = 1
5704
            if ( ! exists $PACKAGE_SETS{ $_ } );
5755
            if ( ! exists $PACKAGE_SETS{ $_ }{'TAG'} );
5705
    }
5756
    }
5706
}
5757
}
5707
 
5758
 
5708
sub PackageFile
5759
sub PackageFile
5709
{
5760
{
Line 6751... Line 6802...
6751
{
6802
{
6752
    my( $platforms, @elements ) = @_;
6803
    my( $platforms, @elements ) = @_;
6753
    my $dir;
6804
    my $dir;
6754
    my $name;
6805
    my $name;
6755
 
6806
 
-
 
6807
    #
-
 
6808
    #   Flag that this build creates a deployable package, even if its not
-
 
6809
    #   active on this platform.
-
 
6810
    #
-
 
6811
    $DEPLOYPACKAGE = 1;
-
 
6812
 
-
 
6813
 
6756
    Debug2( "DeployPackage($platforms, @elements)" );
6814
    Debug2( "DeployPackage($platforms, @elements)" );
6757
    return if ( ! ActivePlatform($platforms) );
6815
    return if ( ! ActivePlatform($platforms) );
6758
 
6816
 
6759
    #
6817
    #
6760
    #   Only allow one use of this directive
6818
    #   Only allow one use of this directive
6761
    #
6819
    #
6762
    Error("DeployPackage can only be used once" ) if ( %DEPLOYPACKAGE );
6820
    Error("DeployPackage can only be used once" ) if ( %DEPLOYPACKAGE );
-
 
6821
    $DEPLOYPACKAGE = 2;
6763
 
6822
 
6764
    #
6823
    #
6765
    #   Ensure that the deployment file is available
6824
    #   Ensure that the deployment file is available
6766
    #
6825
    #
6767
    my $command_file = $ScmDeploymentPatch ? "deploypatch.pl" : "deployfile.pl";
6826
    my $command_file = $ScmDeploymentPatch ? "deploypatch.pl" : "deployfile.pl";
Line 7080... Line 7139...
7080
    #
7139
    #
7081
    if ( defined $prod && defined $prod->[0] )
7140
    if ( defined $prod && defined $prod->[0] )
7082
    {
7141
    {
7083
        print MAKEFILE 'ifeq "$(DEBUG)" "0"' . "\n";
7142
        print MAKEFILE 'ifeq "$(DEBUG)" "0"' . "\n";
7084
        MakeEntry3( $tag, "+=", $prod );
7143
        MakeEntry3( $tag, "+=", $prod );
7085
        print MAKEFILE 'endif' . "\n\n";
7144
        print MAKEFILE 'endif' . "\n";
7086
    }
7145
    }
7087
 
7146
 
7088
    if ( defined $debug && defined $debug->[0] )
7147
    if ( defined $debug && defined $debug->[0] )
7089
    {
7148
    {
7090
        print MAKEFILE 'ifeq "$(DEBUG)" "1"' . "\n";
7149
        print MAKEFILE 'ifeq "$(DEBUG)" "1"' . "\n";
7091
        MakeEntry3( $tag, "+=", $debug );
7150
        MakeEntry3( $tag, "+=", $debug );
7092
        print MAKEFILE 'endif' . "\n\n";
7151
        print MAKEFILE 'endif' . "\n";
7093
    }
7152
    }
7094
 
7153
 
7095
}
7154
}
7096
 
7155
 
7097
sub MakeIfDefEntry
7156
sub MakeIfDefEntry
Line 7848... Line 7907...
7848
else
7907
else
7849
SCM_MAKEFILE	:= $Makefile
7908
SCM_MAKEFILE	:= $Makefile
7850
endif
7909
endif
7851
EOF
7910
EOF
7852
 
7911
 
-
 
7912
#
-
 
7913
#   Setup the base directory for the packaging process
-
 
7914
#   When building a deployable package the base directory is changed to match
-
 
7915
#   that used by the deployment world. This is done so that the descpkg file
-
 
7916
#   can be created in the correct location
-
 
7917
#
-
 
7918
my  $PKGDIR = "pkg/$::Pbase";
-
 
7919
    $PKGDIR = "build/deploy" if ( $DEPLOYPACKAGE );
-
 
7920
Verbose("Setting PKGDIR: $PKGDIR");
-
 
7921
 
7853
print MAKEFILE <<EOF;
7922
print MAKEFILE <<EOF;
7854
 
7923
 
7855
#--------- Targets -------------------------------------------------------------
7924
#--------- Targets -------------------------------------------------------------
7856
 
7925
 
7857
.PHONY: 	default all build install package unpackage uninstall \\
7926
.PHONY: 	default all build install package unpackage uninstall \\
Line 7879... Line 7948...
7879
OBJDIR		= \$(GBE_PLATFORM)\$(GBE_TYPE).OBJ
7948
OBJDIR		= \$(GBE_PLATFORM)\$(GBE_TYPE).OBJ
7880
LIBDIR		= \$(GBE_PLATFORM).LIB
7949
LIBDIR		= \$(GBE_PLATFORM).LIB
7881
BINDIR		= \$(GBE_PLATFORM)\$(GBE_TYPE).BIN
7950
BINDIR		= \$(GBE_PLATFORM)\$(GBE_TYPE).BIN
7882
CLSDIR		= classes\$(GBE_TYPE)
7951
CLSDIR		= classes\$(GBE_TYPE)
7883
 
7952
 
7884
PKGDIR		= \$(GBE_ROOT)/pkg/$::Pbase
7953
PKGDIR		= \$(GBE_ROOT)/$PKGDIR
7885
INCDIR_PKG	= \$(PKGDIR)/include
7954
INCDIR_PKG	= \$(PKGDIR)/include
7886
LIBDIR_PKG	= \$(PKGDIR)/lib
7955
LIBDIR_PKG	= \$(PKGDIR)/lib
7887
BINDIR_PKG	= \$(PKGDIR)/bin
7956
BINDIR_PKG	= \$(PKGDIR)/bin
7888
CLSDIR_PKG	= \$(PKGDIR)/classes
7957
CLSDIR_PKG	= \$(PKGDIR)/classes
7889
 
7958
 
Line 7922... Line 7991...
7922
    MakeDefEntry( "CLINTFLAGS",     "=", \@CLINTFLAGS, \@CLINTFLAGS_PROD, \@CLINTFLAGS_DEBUG );
7991
    MakeDefEntry( "CLINTFLAGS",     "=", \@CLINTFLAGS, \@CLINTFLAGS_PROD, \@CLINTFLAGS_DEBUG );
7923
    MakeDefEntry( "CDEPENDFLAGS",   "=", \@CFLAGS, \@CFLAGS_PROD, \@CFLAGS_DEBUG );
7992
    MakeDefEntry( "CDEPENDFLAGS",   "=", \@CFLAGS, \@CFLAGS_PROD, \@CFLAGS_DEBUG );
7924
    MakeDefEntry( "CXXFLAGS",       "=", \@CXXFLAGS, \@CXXFLAGS_PROD, \@CXXFLAGS_DEBUG );
7993
    MakeDefEntry( "CXXFLAGS",       "=", \@CXXFLAGS, \@CXXFLAGS_PROD, \@CXXFLAGS_DEBUG );
7925
    MakeDefEntry( "CXXLINTFLAGS",   "=", \@CXXLINTFLAGS, \@CXXLINTFLAGS_PROD, \@CXXLINTFLAGS_DEBUG );
7994
    MakeDefEntry( "CXXLINTFLAGS",   "=", \@CXXLINTFLAGS, \@CXXLINTFLAGS_PROD, \@CXXLINTFLAGS_DEBUG );
7926
    MakeDefEntry( "CXXDEPENDFLAG",  "=", \@CXXFLAGS, \@CXXFLAGS_PROD, \@CXXFLAGS_DEBUG );
7995
    MakeDefEntry( "CXXDEPENDFLAG",  "=", \@CXXFLAGS, \@CXXFLAGS_PROD, \@CXXFLAGS_DEBUG );
7927
    MakeDefEntry( "ASFLAGS",        "=", \@ASFLAGS );
7996
    MakeDefEntry( "ASFLAGS",        "=", \@ASFLAGS, \@ASFLAGS_PROD, \@ASFLAGS_DEBUG );
7928
    MakeDefEntry( "LDFLAGS",        "=", \@LDFLAGS );
7997
    MakeDefEntry( "LDFLAGS",        "=", \@LDFLAGS, \@LDFLAGS_PROD, \@LDFLAGS_DEBUG );
7929
 
7998
 
7930
 
7999
 
7931
#-------------------------------------------------------------------------------
8000
#-------------------------------------------------------------------------------
7932
#   
8001
#   
7933
#
8002
#
Line 8882... Line 8951...
8882
        MakeEntry( "package-${i}:\tmake_init package_setALL",
8951
        MakeEntry( "package-${i}:\tmake_init package_setALL",
8883
                "\n", " package_set", "", @sets );
8952
                "\n", " package_set", "", @sets );
8884
    }
8953
    }
8885
    MakeNewLine();
8954
    MakeNewLine();
8886
 
8955
 
8887
    MakePrint("#   PACKAGE SETS\n");
-
 
8888
    MakePrint ".PHONY:\t\tpackage_setALL\n" .
-
 
8889
                "package_setALL:\n";
-
 
8890
                
-
 
8891
    foreach my $i ( sort keys %PACKAGE_SETS ) {
-
 
8892
        MakePrint ".PHONY:\t\tpackage_set${i}\n" .
-
 
8893
                "package_set${i}:\n";
-
 
8894
    }
-
 
8895
    MakeNewLine();
-
 
8896
 
-
 
8897
#-------------------------------------------------------------------------------
8956
#-------------------------------------------------------------------------------
8898
#   Standard rules
8957
#   Standard rules
8899
#
8958
#
8900
MakeHeader ("Standard rules");
8959
MakeHeader ("Standard rules");
8901
 
8960
 
Line 9284... Line 9343...
9284
UnpackageRule( "unpackage_shlib",       \&UnpackageCmd, \%PACKAGE_SHLIBS );
9343
UnpackageRule( "unpackage_shlib",       \&UnpackageCmd, \%PACKAGE_SHLIBS );
9285
UnpackageRule( "unpackage_prog",        \&UnpackageCmd, \%PACKAGE_PROGS );
9344
UnpackageRule( "unpackage_prog",        \&UnpackageCmd, \%PACKAGE_PROGS );
9286
UnpackageRule( "unpackage_class",       \&UnpackageCmd, \%PACKAGE_CLSS );
9345
UnpackageRule( "unpackage_class",       \&UnpackageCmd, \%PACKAGE_CLSS );
9287
 
9346
 
9288
#-------------------------------------------------------------------------------
9347
#-------------------------------------------------------------------------------
-
 
9348
#   Distribution Sets
-
 
9349
#
-
 
9350
MakeHeader ("Distribution Sets");
-
 
9351
PackageSetRules();
-
 
9352
 
-
 
9353
#-------------------------------------------------------------------------------
9289
#
9354
#
9290
#   Subdir deletion
9355
#   Subdir deletion
9291
#   This is done AFTER the toolset functions have been invoked to create the
9356
#   This is done AFTER the toolset functions have been invoked to create the
9292
#   build artifacts so that the toolsets can create directories too
9357
#   build artifacts so that the toolsets can create directories too
9293
#
9358
#
Line 9682... Line 9747...
9682
        #   Distribution sets
9747
        #   Distribution sets
9683
        #
9748
        #
9684
        my $dist = $entry->{'set'};
9749
        my $dist = $entry->{'set'};
9685
        if ( $dist )
9750
        if ( $dist )
9686
        {
9751
        {
9687
            my (@sets, $set, $sep);
9752
            foreach my $set ( split( ',', $dist ) )
9688
 
-
 
9689
            $sep = "";
9753
            {
9690
            @sets = split( ',', $dist );        # foreach(set)
-
 
9691
            foreach $set ( @sets ) {            # append
-
 
9692
                MakePrint $sep."package_set$set:\t$dest\n";
9754
                push @{$PACKAGE_SETS{$set}{LIST}}, $dest;
9693
                $sep = "\n";
-
 
9694
            }
9755
            }
9695
            MakeNewLine();
9756
            MakeNewLine();
9696
        }
9757
        }
9697
    }
9758
    }
9698
}
9759
}
9699
 
9760
 
9700
#-------------------------------------------------------------------------------
9761
#-------------------------------------------------------------------------------
-
 
9762
# Function        : PackageSetRules
-
 
9763
#
-
 
9764
# Description     : Generate the packageset rules
-
 
9765
#                   These appear to be a now-defuct feature
-
 
9766
#
-
 
9767
#                   By default all packaged files are a part of package_setALL
-
 
9768
#
-
 
9769
# Inputs          : None
-
 
9770
#                   Takes data from %PACKAGE_SET
-
 
9771
#
-
 
9772
# Returns         : Nothing
-
 
9773
#
-
 
9774
sub PackageSetRules
-
 
9775
{
-
 
9776
    foreach my $set ( sort keys %PACKAGE_SETS )
-
 
9777
    {
-
 
9778
        my $me = MakeEntry::New( *MAKEFILE, "package_set$set", '--Phony' );
-
 
9779
        $me->AddDependancy( @{$PACKAGE_SETS{$set}{LIST}} );
-
 
9780
        $me->Print();
-
 
9781
    }
-
 
9782
}
-
 
9783
 
-
 
9784
#-------------------------------------------------------------------------------
9701
# Function        : UnPackageRule
9785
# Function        : UnPackageRule
9702
#
9786
#
9703
# Description     : Generate rules and recipes to "uninstall" and "unpackage" files
9787
# Description     : Generate rules and recipes to "uninstall" and "unpackage" files
9704
#
9788
#
9705
# Inputs          : target      - Name of the target
9789
# Inputs          : target      - Name of the target