Subversion Repositories DevTools

Rev

Rev 4836 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4836 Rev 4837
Line 123... Line 123...
123
                                                # 0: Don't write progdeps. Prog is Phony
123
                                                # 0: Don't write progdeps. Prog is Phony
124
our $ScmToolsetSingleType   = 0;                # Toolset does not support Debug and Production
124
our $ScmToolsetSingleType   = 0;                # Toolset does not support Debug and Production
125
our $ScmToolsetProgSource   = ();               # Toolset Program Source
125
our $ScmToolsetProgSource   = ();               # Toolset Program Source
126
our $ScmToolsetSoName       = 0;                # 1: Shared library supports SoName
126
our $ScmToolsetSoName       = 0;                # 1: Shared library supports SoName
127
our $ScmToolsetNillLibSrc   = 0;                # 1: Librarys created without source specified
127
our $ScmToolsetNillLibSrc   = 0;                # 1: Librarys created without source specified
128
our $ScmToolsetProcessTests = 0;                # 1: Pre/Post process unit test runs
-
 
129
 
128
 
130
our $ScmRoot                = "";
129
our $ScmRoot                = "";
131
our $ScmMakelib             = "";
130
our $ScmMakelib             = "";
132
our $ScmPlatform            = "";
131
our $ScmPlatform            = "";
133
our $ScmMachType            = "";
132
our $ScmMachType            = "";
Line 144... Line 143...
144
our %ScmSourceTypes         = ();
143
our %ScmSourceTypes         = ();
145
our $ScmDeploymentPatch     = "";
144
our $ScmDeploymentPatch     = "";
146
our $ProjectBase            = "";               # Base of the user's project
145
our $ProjectBase            = "";               # Base of the user's project
147
our $ScmNoToolsTest         = "";               # Supress compiler tests
146
our $ScmNoToolsTest         = "";               # Supress compiler tests
148
our $ScmDependTags          = 0;                # Create dependancy scanning tag
147
our $ScmDependTags          = 0;                # Create dependancy scanning tag
-
 
148
our $ScmMakeUid;                                # Unique makefile id (number 1 .. )
149
 
149
 
150
our @CFLAGS                 = ();
150
our @CFLAGS                 = ();
151
our @CFLAGS_DEBUG           = ();
151
our @CFLAGS_DEBUG           = ();
152
our @CFLAGS_PROD            = ();
152
our @CFLAGS_PROD            = ();
153
our @CLINTFLAGS             = ();
153
our @CLINTFLAGS             = ();
Line 210... Line 210...
210
our @TOOLSETLIBS            = ();
210
our @TOOLSETLIBS            = ();
211
our @TOOLSETPROGS           = ();
211
our @TOOLSETPROGS           = ();
212
our %INSTALL_HDRS           = ();
212
our %INSTALL_HDRS           = ();
213
our %INSTALL_CLSS           = ();
213
our %INSTALL_CLSS           = ();
214
 
214
 
-
 
215
our @TOOLSET_UTF_PRE        = ();       # Toolsets can extend rules run before all unit tests
-
 
216
our @TOOLSET_UTF_POST       = ();       # Toolsets can extend rules run after all unit tests
-
 
217
our @TOOLSET_UTF_COLLATE    = ();       # Toolsets can extend rules run to collate unit tests results
-
 
218
 
215
our @LIBS                   = ();
219
our @LIBS                   = ();
216
our $LIBS                   = ();
220
our $LIBS                   = ();
217
our %LIB_PKG                = ();
221
our %LIB_PKG                = ();
218
our %LIB_INS                = ();
222
our %LIB_INS                = ();
219
our %INSTALL_LIBS           = ();
223
our %INSTALL_LIBS           = ();
Line 281... Line 285...
281
#
285
#
282
#   Arrays of hook functions
286
#   Arrays of hook functions
283
#
287
#
284
our %MF_RegisterSrcHooks;                       # Hook source file discovery
288
our %MF_RegisterSrcHooks;                       # Hook source file discovery
285
 
289
 
286
 
-
 
287
###############################################################################
290
###############################################################################
288
#
291
#
289
#   Packaging and Installation Information
292
#   Packaging and Installation Information
290
#   Held in a structure as its used in a few places
293
#   Held in a structure as its used in a few places
291
#   Items
294
#   Items
Line 301... Line 304...
301
    'Prog' => { 'PBase' => '$(BINDIR_PKG)'   ,'IBase' => '$(BINDIR_LOCAL)'   , 'Dir' => '/$(GBE_PLATFORM)$(GBE_TYPE)'},
304
    'Prog' => { 'PBase' => '$(BINDIR_PKG)'   ,'IBase' => '$(BINDIR_LOCAL)'   , 'Dir' => '/$(GBE_PLATFORM)$(GBE_TYPE)'},
302
    'Jar'  => { 'PBase' => '$(CLSDIR_PKG)'   ,'IBase' => '$(CLSDIR_LOCAL)'   , 'Dir' => ''},
305
    'Jar'  => { 'PBase' => '$(CLSDIR_PKG)'   ,'IBase' => '$(CLSDIR_LOCAL)'   , 'Dir' => ''},
303
    'Tool' => { 'PBase' => '$(PKGDIR)'       ,'IBase' => '$(LOCALDIR)'       , 'Dir' => '/tools/bin/$(GBE_HOSTMACH)'},
306
    'Tool' => { 'PBase' => '$(PKGDIR)'       ,'IBase' => '$(LOCALDIR)'       , 'Dir' => '/tools/bin/$(GBE_HOSTMACH)'},
304
    );
307
    );
305
 
308
 
-
 
309
###############################################################################
-
 
310
#
-
 
311
#   An array of reserved names
-
 
312
#   Used to attempt to prevent developers from naming toolset targets with names reserved
-
 
313
#   within the build system
-
 
314
our @reservedMakeTargets = qw (
-
 
315
    preprocess_tests postprocess_tests collate_test_results
-
 
316
);
-
 
317
 
306
MakeLib2Init();                                 # Runtime initialisation
318
MakeLib2Init();                                 # Runtime initialisation
307
 
319
 
308
sub MakeLib2Init
320
sub MakeLib2Init
309
{
321
{
310
#.. Test environment
322
#.. Test environment
Line 344... Line 356...
344
    $ScmSourceTypes{ ".awk" }   = "--Ignore";
356
    $ScmSourceTypes{ ".awk" }   = "--Ignore";
345
 
357
 
346
#.. Get the stuff from the build configuration file
358
#.. Get the stuff from the build configuration file
347
#
359
#
348
    ConfigLoad();
360
    ConfigLoad();
-
 
361
    $ScmMakeUid = GetMakfilefileUid();
-
 
362
    Debug("ScmMakeUid: $ScmMakeUid");
349
 
363
 
350
    if ( (%::ScmBuildPlatforms) )        # Interface/build.cfg
364
    if ( (%::ScmBuildPlatforms) )        # Interface/build.cfg
351
    {
365
    {
352
        AddPlatformArg( split( /$;/, $::ScmBuildPlatforms{ $ScmPlatform } ));
366
        AddPlatformArg( split( /$;/, $::ScmBuildPlatforms{ $ScmPlatform } ));
353
    }
367
    }
Line 1010... Line 1024...
1010
    }
1024
    }
1011
    push( @ScmDepends, "$script" );             # makefile dependencies
1025
    push( @ScmDepends, "$script" );             # makefile dependencies
1012
    close( $fh );
1026
    close( $fh );
1013
}
1027
}
1014
 
1028
 
-
 
1029
#-------------------------------------------------------------------------------
-
 
1030
# Function        : ToolsetAddUnitTestPreProcess
-
 
1031
#                   ToolsetAddUnitTestPostProcess
-
 
1032
#                   ToolsetAddUnitTestCollateProcess
-
 
1033
#
-
 
1034
# Description     : Functions to allow toolsets to add recipes to be run before
-
 
1035
#                   and after Unit Tests are run.    
-
 
1036
#
-
 
1037
# Inputs          : $target         - Name of the recipe to be run 
-
 
1038
#
-
 
1039
# Returns         : Nothing
-
 
1040
#
-
 
1041
sub ToolsetAddUnitTestPreProcess
-
 
1042
{
-
 
1043
    _ToolsetAddUnitTest(\@TOOLSET_UTF_PRE, @_ );
-
 
1044
}
-
 
1045
 
-
 
1046
sub ToolsetAddUnitTestPostProcess
-
 
1047
{
-
 
1048
    _ToolsetAddUnitTest(\@TOOLSET_UTF_POST, @_ );
-
 
1049
}
-
 
1050
 
-
 
1051
sub ToolsetAddUnitTestCollateProcess
-
 
1052
{
-
 
1053
    _ToolsetAddUnitTest(\@TOOLSET_UTF_COLLATE, @_ );
-
 
1054
}
-
 
1055
 
-
 
1056
#-------------------------------------------------------------------------------
-
 
1057
# Function        : _ToolsetAddUnitTest  
-
 
1058
#
-
 
1059
# Description     : Internal helper function used by ToolsetAddUnitTest*
-
 
1060
#
-
 
1061
# Inputs          : $aref           - Ref to an array of names to extend
-
 
1062
#                   $target         - Name of recipe to run 
-
 
1063
#
-
 
1064
# Returns         : Nothing
-
 
1065
#
-
 
1066
sub _ToolsetAddUnitTest
-
 
1067
{
-
 
1068
    my ($aref, $target ) = @_;
-
 
1069
 
-
 
1070
    #   Determine name of parent function
-
 
1071
    my $fname = (caller(1))[3];
-
 
1072
    $fname =~ s~.*::~~;
-
 
1073
    Debug2( "$fname ($target)" );
-
 
1074
 
-
 
1075
    #
-
 
1076
    #   Ensure user is not using a reserved target
-
 
1077
    #
-
 
1078
    if (grep {$_ eq $target} @reservedMakeTargets) {
-
 
1079
        Error("Internal: $fname uses reserved make taget: $target");
-
 
1080
    }
-
 
1081
 
-
 
1082
    push @$aref, $target;
-
 
1083
 
-
 
1084
}
1015
 
1085
 
1016
###############################################################################
1086
###############################################################################
1017
# User interface:
1087
# User interface:
1018
#
1088
#
1019
#   AddFlags( 'platform [, ... ]', 'flags' [, 'flag' ... ] )
1089
#   AddFlags( 'platform [, ... ]', 'flags' [, 'flag' ... ] )
Line 4630... Line 4700...
4630
#                                     This SHOULD return a non-zero exit status
4700
#                                     This SHOULD return a non-zero exit status
4631
#                                     on error. The program may be a 'TestProg'
4701
#                                     on error. The program may be a 'TestProg'
4632
#                                     or a 'Script'.
4702
#                                     or a 'Script'.
4633
#                   @elements       - Options and test arguments
4703
#                   @elements       - Options and test arguments
4634
#                                     Options are:
4704
#                                     Options are:
4635
#                                       --Auto          - Non interactive unit test
4705
#                                       --Auto              - Non interactive unit test
4636
#                                       --Unit          - Same and --Auto
4706
#                                       --Unit              - Same and --Auto
-
 
4707
#                                       --UtfFormat=nnn     - Specifies Automated Unit Test, 
-
 
4708
#                                                             results post processed with formatter
-
 
4709
#                                       --UtfArg=nnn        - Argument passed into the UTF formatter    
-
 
4710
#                                       --Name=nnn          - Test Name.
4637
#                                       --CopyIn=file   - A file to be copied into
4711
#                                       --CopyIn=file       - A file to be copied into
4638
#                                                         The test directory.
4712
#                                                             The test directory.
4639
#
4713
#
4640
#                                     Non Options are passed to the test program.
4714
#                                     Non Options are passed to the test program.
4641
#                                     --PackageBase(xxx)    - Base of package
4715
#                                     --PackageBase(xxx)    - Base of package
4642
#                                     --PackageInfo(xxx)    - Package information
4716
#                                     --PackageInfo(xxx)    - Package information
4643
#                                     --File(xxx)           - Resolved name of file
4717
#                                     --File(xxx)           - Resolved name of file
4644
#                                     --Var(xxx)            - Expanded variable
4718
#                                     --Var(xxx)            - Expanded variable
4645
#                                     --Local(xxx)          - File within the local directory
4719
#                                     --Local(xxx)          - File within the local directory
4646
#
4720
#
-
 
4721
#                                     Toolset Framework support (ie NUNIT in csharp.pl)
-
 
4722
#                                       --FrameWork=name    - Name of framework
-
 
4723
#                                       --xxxx              - Args passed to framework constructor
-
 
4724
#
4647
# Returns         : Nothing
4725
# Returns         : Nothing
4648
#
4726
#
4649
 
-
 
-
 
4727
my %RunTestNames;                       # Unique Name Tests
4650
sub RunTest
4728
sub RunTest
4651
{
4729
{
4652
    my( $platforms, $prog, @elements ) = @_;
4730
    my( $platforms, $prog, @elements ) = @_;
4653
    my $command = './';                 # program prefix / command
4731
    my $command = './';                 # program prefix / command
4654
    my $winprog = 1;                    # 1: Convert / -> \ (WIN32 only)
4732
    my $winprog = 1;                    # 1: Convert / -> \ (WIN32 only)
4655
    my $framework;
4733
    my $framework;
4656
    my @framework_opts;
4734
    my @framework_opts;
4657
    my @copy = ();
4735
    my @copy = ();
4658
    my $auto;
4736
    my $auto;
-
 
4737
    my $utfFormat;
-
 
4738
    my @utfArgs;
-
 
4739
    my $utfName;
4659
 
4740
 
4660
    return if ( ! ActivePlatform($platforms) );
4741
    return if ( ! ActivePlatform($platforms) );
4661
 
4742
 
4662
    #
4743
    #
4663
    #   Scan @elements and extract useful information
4744
    #   Scan @elements and extract useful information
Line 4671... Line 4752...
4671
            $framework = $1;
4752
            $framework = $1;
4672
 
4753
 
4673
        } elsif ( m/^--Auto/ || m/^--Unit/) {
4754
        } elsif ( m/^--Auto/ || m/^--Unit/) {
4674
            $auto = 1;
4755
            $auto = 1;
4675
 
4756
 
-
 
4757
        } elsif ( m/^--Name=(.*)/) {
-
 
4758
            $utfName = $1;
-
 
4759
 
-
 
4760
            Error("Duplicate Test Name: $utfName")
-
 
4761
                if (exists $RunTestNames{$utfName} );
-
 
4762
            $RunTestNames{$utfName} = 1;
-
 
4763
 
-
 
4764
        } elsif ( m/^--UtfFormat=(.*)/) {
-
 
4765
            $utfFormat = $1;
-
 
4766
 
-
 
4767
        } elsif ( m/^--UtfArg=(.*)/) {
-
 
4768
            push @utfArgs, $1;
-
 
4769
 
4676
        } elsif ( m/^--CopyIn=(.*)/ ) {
4770
        } elsif ( m/^--CopyIn=(.*)/ ) {
4677
            push @copy, MakeSrcResolve ( $1 );
4771
            push @copy, MakeSrcResolve ( $1 );
4678
 
4772
 
4679
 
4773
 
4680
        } elsif ( $framework && m/^--\w+=(.+)/ ) {
4774
        } elsif ( $framework && m/^--\w+=(.+)/ ) {
Line 4873... Line 4967...
4873
 
4967
 
4874
    $test_entry{'prog'}     = $prog;
4968
    $test_entry{'prog'}     = $prog;
4875
    $test_entry{'copyprog'} = 1;
4969
    $test_entry{'copyprog'} = 1;
4876
    $test_entry{'args'}     = \@uargs;
4970
    $test_entry{'args'}     = \@uargs;
4877
    $test_entry{'auto'}     = $auto if ( $auto );
4971
    $test_entry{'auto'}     = $auto if ( $auto );
-
 
4972
    $test_entry{'utfformat'}= $utfFormat if ( $utfFormat );
-
 
4973
    $test_entry{'utfargs'}  = \@utfArgs;
-
 
4974
    $test_entry{'utfname'}  = $utfName;
4878
    $test_entry{'copyin'}   = \@copy;
4975
    $test_entry{'copyin'}   = \@copy;
4879
    $test_entry{'copyonce'} = ();
4976
    $test_entry{'copyonce'} = ();
4880
    $test_entry{'preq'}     = \@preq_files;
4977
    $test_entry{'preq'}     = \@preq_files;
4881
    $test_entry{'testdir'}  = 'BINDIR';
4978
    $test_entry{'testdir'}  = 'BINDIR';
4882
 
4979
 
Line 8380... Line 8477...
8380
    ::ToolsetFile ($Makefile);
8477
    ::ToolsetFile ($Makefile);
8381
    open( MAKEFILE, '>', $Makefile ) || Error( "Cannot create $Makefile" );
8478
    open( MAKEFILE, '>', $Makefile ) || Error( "Cannot create $Makefile" );
8382
    ::MakefileHeader( *MAKEFILE,
8479
    ::MakefileHeader( *MAKEFILE,
8383
                      'Auto-generated Platform Dependent Makefile',
8480
                      'Auto-generated Platform Dependent Makefile',
8384
                      "$ScmMakelib (version $ScmVersion)",
8481
                      "$ScmMakelib (version $ScmVersion)",
8385
                      "# Copyright (C) 1995-$::CurrentYear Vix-ERG, All rights reserved",
8482
                      "# Copyright (c) VIX TECHNOLOGY (AUST) LTD",
8386
                      '#',
8483
                      '#',
8387
                      "# Located in $::Cwd",
8484
                      "# Located in $::Cwd",
8388
                      "# Platform $::ScmPlatform",
8485
                      "# Platform $::ScmPlatform",
8389
                      '#' . ('-' x 79),
8486
                      '#' . ('-' x 79),
8390
                      );
8487
                      );
Line 8431... Line 8528...
8431
    if ( $ScmProduct ne "" );
8528
    if ( $ScmProduct ne "" );
8432
 
8529
 
8433
MakePrint( "GBE_OS_COMMON := $::BUILDINFO{$ScmPlatform}{OS_COMMON}\n" )
8530
MakePrint( "GBE_OS_COMMON := $::BUILDINFO{$ScmPlatform}{OS_COMMON}\n" )
8434
    if ( exists($::BUILDINFO{$ScmPlatform}{OS_COMMON}) );
8531
    if ( exists($::BUILDINFO{$ScmPlatform}{OS_COMMON}) );
8435
 
8532
 
8436
 
-
 
8437
    print MAKEFILE <<EOF;
8533
    print MAKEFILE <<EOF;
8438
 
8534
 
8439
SHELL           := \$(GBE_BIN)/sh
8535
SHELL           := \$(GBE_BIN)/sh
8440
SHELLARGS       :=
8536
SHELLARGS       :=
8441
EXTENDED_LINE   := \$(GBE_BIN)/extend.lst
8537
EXTENDED_LINE   := \$(GBE_BIN)/extend.lst
Line 8446... Line 8542...
8446
BUILDVER         := $::ScmBuildVersionFull
8542
BUILDVER         := $::ScmBuildVersionFull
8447
BUILDVERNUM      := $::ScmBuildVersion
8543
BUILDVERNUM      := $::ScmBuildVersion
8448
BUILDPREVIOUSVER := $::ScmBuildPreviousVersion
8544
BUILDPREVIOUSVER := $::ScmBuildPreviousVersion
8449
DEPLOYPATCH      := $ScmDeploymentPatch
8545
DEPLOYPATCH      := $ScmDeploymentPatch
8450
GBE_NOTOOLSTEST  := $ScmNoToolsTest
8546
GBE_NOTOOLSTEST  := $ScmNoToolsTest
-
 
8547
MAKEFILEUID      := $ScmMakeUid
-
 
8548
export MAKEFILEUID
8451
 
8549
 
8452
#
8550
#
8453
#   Ensure PWD is correctly set
8551
#   Ensure PWD is correctly set
8454
#
8552
#
8455
PWD             := \$(CURDIR)
8553
PWD             := \$(CURDIR)
Line 9175... Line 9273...
9175
    MakeHeader ("Automated tests");
9273
    MakeHeader ("Automated tests");
9176
 
9274
 
9177
    my $idx = 0;
9275
    my $idx = 0;
9178
    my @copy_set = ();
9276
    my @copy_set = ();
9179
    
9277
    
9180
    # 
-
 
9181
    #   Insert the three rules that surround test execution:
-
 
9182
    #    - preprocess_tests runs before any test has run
-
 
9183
    #    - postprocess_tests runs after all tests have run
-
 
9184
    #    - collate_test_results runs after all postprocess_tests have run
-
 
9185
    #
-
 
9186
    $if->PreprocessTests();
-
 
9187
    $if->PostprocessTests();
-
 
9188
    $if->CollateTestResults();
-
 
9189
 
-
 
9190
    foreach my $pEntry ( @TESTS_TO_RUN )
9278
    foreach my $pEntry ( @TESTS_TO_RUN )
9191
    {                                           # Foreach test
9279
    {                                           # Foreach test
9192
        $idx++;
9280
        $idx++;
9193
        $pEntry->{'index'} = $idx;
9281
        $pEntry->{'index'} = $idx;
9194
        $pEntry->{'test_name'} = "run_test_$idx";
9282
        $pEntry->{'test_name'} = "run_test_$idx";
-
 
9283
        $pEntry->{'utfname'} = $pEntry->{'test_name'} unless defined $pEntry->{'utfname'};  
9195
 
9284
 
9196
        #
9285
        #
9197
        #   If the test is being run within a 'FrameWork' then the underlying
9286
        #   If the test is being run within a 'FrameWork' then the underlying
9198
        #   toolset must instantiate the frame work.
9287
        #   toolset must instantiate the frame work.
9199
        #
9288
        #
Line 9217... Line 9306...
9217
        push @TESTPROJECT_TO_ARUN, $test_name if     ($pEntry->{'auto'} );
9306
        push @TESTPROJECT_TO_ARUN, $test_name if     ($pEntry->{'auto'} );
9218
 
9307
 
9219
        my $tprog = $tdir . '/' . StripDir( $pEntry->{'prog'} );
9308
        my $tprog = $tdir . '/' . StripDir( $pEntry->{'prog'} );
9220
        
9309
        
9221
        my $me = MakeEntry::New( *MAKEFILE, $test_name, '--Phony' );
9310
        my $me = MakeEntry::New( *MAKEFILE, $test_name, '--Phony' );
-
 
9311
 
-
 
9312
        #
-
 
9313
        #   Export GBE_UTFNAME for the duration of the test
-
 
9314
        #
-
 
9315
        $me->AddDefn('export GBE_UTFNAME', $pEntry->{'utfname'});
-
 
9316
        $me->AddDefn('export GBE_UTFUID', '$(MAKEFILEUID)' . '_' . $pEntry->{'index'});
-
 
9317
 
9222
        $me->AddDependancy( "\$(GBE_$tdir_alias)" );
9318
        $me->AddDependancy( "\$(GBE_$tdir_alias)" );
9223
        $me->AddDependancy( "\$(INTERFACEDIR)/set_$::ScmPlatform.sh" );
9319
        $me->AddDependancy( "\$(INTERFACEDIR)/set_$::ScmPlatform.sh" );
9224
        $me->AddDependancy( $tprog ) if $pEntry->{'copyprog'};
9320
        $me->AddDependancy( $tprog ) if $pEntry->{'copyprog'};
9225
        $me->AddDependancy( @{ $pEntry->{'copyin' } } );
9321
        $me->AddDependancy( @{ $pEntry->{'copyin' } } );
9226
        $me->AddDependancy( map { $tdir . '/' . StripDir($_) } @{ $pEntry->{'copyonce' } } );
9322
        $me->AddDependancy( map { $tdir . '/' . StripDir($_) } @{ $pEntry->{'copyonce' } } );
Line 9246... Line 9342...
9246
            $me->AddShellRecipe ( "\$(cp) -f $file $dst" );
9342
            $me->AddShellRecipe ( "\$(cp) -f $file $dst" );
9247
            $me->AddShellRecipe ( "\$(chmod) -f +wx $dst" );
9343
            $me->AddShellRecipe ( "\$(chmod) -f +wx $dst" );
9248
        }
9344
        }
9249
 
9345
 
9250
        #
9346
        #
9251
        #   Insert and FrameWork Recipe bits
9347
        #   Insert any FrameWork Recipe bits
9252
        #
9348
        #
9253
        $me->AddShellRecipe ( @{$pEntry->{'ShellRecipe'}} );
9349
        $me->AddShellRecipe ( @{$pEntry->{'ShellRecipe'}} );
9254
 
9350
 
-
 
9351
        #
-
 
9352
        #   Insert command
-
 
9353
        #       If we could run a UTF filter, then ignore the commands return code
-
 
9354
        #
9255
        $me->AddShellRecipe ( "cd $tdir" );
9355
        $me->AddShellRecipe ( "cd $tdir" );
9256
        $me->AddShellRecipe ( ["GBE_TYPE=\$(GBE_TYPE)",
9356
        $me->AddShellRecipe ( ["GBE_TYPE=\$(GBE_TYPE)",
9257
                               "GBE_HOST=\$(GBE_HOST)",
9357
                               "GBE_HOST=\$(GBE_HOST)",
9258
                               "GBE_ROOT=\$(GBE_ROOT_ABS)",
9358
                               "GBE_ROOT=\$(GBE_ROOT_ABS)",
9259
                               "PATH=.\\$::ScmPathSep\$(BINDIR_LOCAL_PATH)\\$::ScmPathSep\$\$PATH",
9359
                               "PATH=.\\$::ScmPathSep\$(BINDIR_LOCAL_PATH)\\$::ScmPathSep\$\$PATH",
9260
                               $pEntry->{'command'},
9360
                               $pEntry->{'command'},
9261
                               @{$pEntry->{'args'}},
9361
                               @{$pEntry->{'args'}},
-
 
9362
                               $pEntry->{'utfformat' } ? '|| true' : ''
9262
                               ] );
9363
                               ] );
-
 
9364
        if ($pEntry->{'utfformat' })
-
 
9365
        {
-
 
9366
            #
-
 
9367
            #   Create the basic command line for 'jats_runutf'
-
 
9368
            #
-
 
9369
            my @cmdline;
-
 
9370
            push @cmdline, '--';
-
 
9371
            push @cmdline, '$(VERBOSE_OPT)';
-
 
9372
            push @cmdline, "-filter=$pEntry->{utfformat}";
-
 
9373
            push @cmdline, '-root=$(GBE_ROOT_ABS)' ;
-
 
9374
            push @cmdline, "-dir=$tdir";
-
 
9375
            push @cmdline, '-target=$(GBE_PLATFORM)';
-
 
9376
            push @cmdline, '-pkgdir=$(PKGDIR)';
-
 
9377
            push @cmdline, '-local=$(LOCALDIR)';
-
 
9378
            push @cmdline, '-interface=$(INTERFACEDIR)';
-
 
9379
            foreach my $entry (@{$pEntry->{'utfargs' }})
-
 
9380
            {
-
 
9381
                push @cmdline, '-arg=' . $entry;
-
 
9382
            }
-
 
9383
            
-
 
9384
            #
-
 
9385
            #   Insert commands to post process the test results according to the specified formatter
-
 
9386
            #
-
 
9387
            $me->NewSection     ();
-
 
9388
            $me->SectionDef     ('UTF_POSTPROCESS');
-
 
9389
            $me->RecipePrefix   ('$(XX_PRE)');
-
 
9390
            $me->AddRecipe      ( "\$(GBE_PERL) -Mjats_runutf -e processUtf " . join(" \\\n\t\t\t", @cmdline)  );
-
 
9391
        }
-
 
9392
 
9263
        $me->Print();
9393
        $me->Print();
9264
 
9394
 
9265
 
9395
 
9266
        #
9396
        #
9267
        #   Create entries to handle the copy-once files
9397
        #   Create entries to handle the copy-once files
Line 9475... Line 9605...
9475
MakeDefEntry( "PROJECTSCLEAN",   "=", CreateNameList( 'ProjectClean_', '', \%PROJECTS ));
9605
MakeDefEntry( "PROJECTSCLEAN",   "=", CreateNameList( 'ProjectClean_', '', \%PROJECTS ));
9476
 
9606
 
9477
MakeDefEntry( "UNITTESTS",       "=", \@TESTPROJECT_TO_URUN );
9607
MakeDefEntry( "UNITTESTS",       "=", \@TESTPROJECT_TO_URUN );
9478
MakeDefEntry( "AUTOUNITTESTS",   "=", \@TESTPROJECT_TO_ARUN );
9608
MakeDefEntry( "AUTOUNITTESTS",   "=", \@TESTPROJECT_TO_ARUN );
9479
 
9609
 
-
 
9610
MakeDefEntry( "AUTOUNITTESTS_PRE",    "=", \@TOOLSET_UTF_PRE );
-
 
9611
MakeDefEntry( "AUTOUNITTESTS_POST",   "=", \@TOOLSET_UTF_POST );
-
 
9612
MakeDefEntry( "AUTOUNITTESTS_COLLATE","=", \@TOOLSET_UTF_COLLATE );
-
 
9613
 
-
 
9614
 
9480
MakeHeader ("Toolset components");
9615
MakeHeader ("Toolset components");
9481
MakeDefEntry( "USERGENERATED",        "=", \@USERGENERATED )    if ( @USERGENERATED );
9616
MakeDefEntry( "USERGENERATED",        "=", \@USERGENERATED )    if ( @USERGENERATED );
9482
MakeDefEntry( "TOOLSETGENERATED",     "=", \@TOOLSETGENERATED ) if ( @TOOLSETGENERATED );
9617
MakeDefEntry( "TOOLSETGENERATED",     "=", \@TOOLSETGENERATED ) if ( @TOOLSETGENERATED );
9483
MakeDefEntry( "TOOLSETOBJS",          "=", \@TOOLSETOBJS )      if ( @TOOLSETOBJS );
9618
MakeDefEntry( "TOOLSETOBJS",          "=", \@TOOLSETOBJS )      if ( @TOOLSETOBJS );
9484
MakeDefEntry( "TOOLSETLIBS",          "=", \@TOOLSETLIBS )      if ( @TOOLSETLIBS );
9619
MakeDefEntry( "TOOLSETLIBS",          "=", \@TOOLSETLIBS )      if ( @TOOLSETLIBS );
Line 9804... Line 9939...
9804
 
9939
 
9805
#   make_init - Test toolset presence and sanity
9940
#   make_init - Test toolset presence and sanity
9806
#   Will only be called ONCE for each platform in a recursive build
9941
#   Will only be called ONCE for each platform in a recursive build
9807
#   Should be used to ensure that the required toolset is present
9942
#   Should be used to ensure that the required toolset is present
9808
#
9943
#
9809
PrintPhonyRule ('make_init',       "@initdep" );
9944
PrintPhonyRule ('make_init',            "@initdep" );
9810
 
9945
 
9811
#   make_dir    - Create required subdirectories
9946
#   make_dir    - Create required subdirectories
9812
#   Will be invoked as a part of most targets that create files
9947
#   Will be invoked as a part of most targets that create files
9813
#   Will be invoked by the calling wrappers
9948
#   Will be invoked by the calling wrappers
9814
#   Should not be invoked when cleaning
9949
#   Should not be invoked when cleaning
9815
#
9950
#
9816
PrintPhonyRule ('make_dir',       "@mkdirdep" );
9951
PrintPhonyRule ('make_dir',             "@mkdirdep" );
9817
 
9952
 
9818
PrintPhonyRule ('generate',       "@generatedep @projectgendep" );
9953
PrintPhonyRule ('generate',             "@generatedep @projectgendep" );
9819
PrintPhonyRule ('ungenerate',     "@ungeneratedep",  \@ungenact);
9954
PrintPhonyRule ('ungenerate',           "@ungeneratedep",  \@ungenact);
9820
PrintPhonyRule ('unobj',          "",  \@unobjact);
9955
PrintPhonyRule ('unobj',                "",  \@unobjact);
9821
PrintPhonyRule ('make_lib',       "@libdep" );
9956
PrintPhonyRule ('make_lib',             "@libdep" );
9822
PrintPhonyRule ('lint_lib',       "@liblintdep" );
9957
PrintPhonyRule ('lint_lib',             "@liblintdep" );
9823
PrintPhonyRule ('make_mlib',      "@mlibdep" );
9958
PrintPhonyRule ('make_mlib',            "@mlibdep" );
9824
PrintPhonyRule ('lint_shlib',     "@shliblintdep" );
9959
PrintPhonyRule ('lint_shlib',           "@shliblintdep" );
9825
PrintPhonyRule ('unmake_lib',     "", \@unlibact );
9960
PrintPhonyRule ('unmake_lib',           "", \@unlibact );
9826
PrintPhonyRule ('unmake_mlib',    "", \@unmlibact );
9961
PrintPhonyRule ('unmake_mlib',          "", \@unmlibact );
9827
PrintPhonyRule ('make_script',    "@scriptdep" );
9962
PrintPhonyRule ('make_script',          "@scriptdep" );
9828
PrintPhonyRule ('unmake_script',  "", \@unscriptact );
9963
PrintPhonyRule ('unmake_script',        "", \@unscriptact );
9829
PrintPhonyRule ('make_prog',      "make_script @progdep @projectdep" );
9964
PrintPhonyRule ('make_prog',            "make_script @progdep @projectdep" );
9830
PrintPhonyRule ('unmake_prog',    "unmake_script @projectcleandep", \@unprogact );
9965
PrintPhonyRule ('unmake_prog',          "unmake_script @projectcleandep", \@unprogact );
9831
PrintPhonyRule ('lint_prog',      "@proglintdep" );
9966
PrintPhonyRule ('lint_prog',            "@proglintdep" );
9832
PrintPhonyRule ('exec_tests',     "make_script @testprogdep @runtestdep" );
9967
PrintPhonyRule ('exec_tests',           "make_script @testprogdep @runtestdep" );
9833
PrintPhonyRule ('exec_unit_tests',"make_script @testprogdep @autoruntestdep" );
9968
PrintPhonyRule ('exec_unit_tests',      "make_script @testprogdep @autoruntestdep" );
9834
PrintPhonyRule ('make_test',      "make_script @testprogdep" );
9969
PrintPhonyRule ('make_test',            "make_script @testprogdep" );
9835
PrintPhonyRule ('unmake_test',    "unmake_script", \@untestprogact );
9970
PrintPhonyRule ('unmake_test',          "unmake_script", \@untestprogact );
-
 
9971
PrintPhonyRule ('preprocess_tests',     '$(AUTOUNITTESTS_PRE)' );
-
 
9972
PrintPhonyRule ('postprocess_tests',    '$(AUTOUNITTESTS_POST)' );
-
 
9973
PrintPhonyRule ('collate_test_results', '$(AUTOUNITTESTS_COLLATE)' );
9836
 
9974
 
9837
#-------------------------------------------------------------------------------
9975
#-------------------------------------------------------------------------------
9838
#   Package and Installation Summary
9976
#   Package and Installation Summary
9839
#
9977
#
9840
    MakeHeader ("Package and Installation Summary");
9978
    MakeHeader ("Package and Installation Summary");
Line 9968... Line 10106...
9968
    Maketag( "make_script",         @scriptdep );
10106
    Maketag( "make_script",         @scriptdep );
9969
    Maketag( "make_prog",           @progdep || @projectdep );
10107
    Maketag( "make_prog",           @progdep || @projectdep );
9970
    Maketag( "make_test",           @testprogdep );
10108
    Maketag( "make_test",           @testprogdep );
9971
    Maketag( "exec_tests",          $TESTS_TO_RUN     || @TESTPROJECT_TO_URUN || $TESTS_TO_AUTORUN || @TESTPROJECT_TO_ARUN );
10109
    Maketag( "exec_tests",          $TESTS_TO_RUN     || @TESTPROJECT_TO_URUN || $TESTS_TO_AUTORUN || @TESTPROJECT_TO_ARUN );
9972
    Maketag( "exec_unit_tests",     $TESTS_TO_AUTORUN || @TESTPROJECT_TO_ARUN );
10110
    Maketag( "exec_unit_tests",     $TESTS_TO_AUTORUN || @TESTPROJECT_TO_ARUN );
9973
    Maketag( "process_tests",       $ScmToolsetProcessTests );
10111
    Maketag( "process_tests",       @TOOLSET_UTF_PRE || @TOOLSET_UTF_POST || @TOOLSET_UTF_COLLATE);
9974
    Maketag( "install_hdr",         %INSTALL_HDRS );
10112
    Maketag( "install_hdr",         %INSTALL_HDRS );
9975
    Maketag( "install_class",       %INSTALL_CLSS );
10113
    Maketag( "install_class",       %INSTALL_CLSS );
9976
    Maketag( "install_lib",         %INSTALL_LIBS );
10114
    Maketag( "install_lib",         %INSTALL_LIBS );
9977
    Maketag( "install_prog",        %INSTALL_PROGS );
10115
    Maketag( "install_prog",        %INSTALL_PROGS );
9978
    Maketag( "deploy",              %DEPLOYPACKAGE );
10116
    Maketag( "deploy",              %DEPLOYPACKAGE );
9979
    Maketag( "package",             %PACKAGE_FILES || %PACKAGE_HDRS || %PACKAGE_CLSS ||
10117
    Maketag( "package",             %PACKAGE_FILES || %PACKAGE_HDRS || %PACKAGE_CLSS ||
9980
                                    %PACKAGE_LIBS || %PACKAGE_SHLIBS || %PACKAGE_PROGS );
10118
                                    %PACKAGE_LIBS || %PACKAGE_SHLIBS || %PACKAGE_PROGS );
9981
 
10119
 
9982
    #
10120
    #
9983
    #   Display tags in the MAKEFILE
10121
    #   Display tags in the MAKEFILE
9984
    #   Not used here - just for show
10122
    #       Not used here - just for show
9985
    #
10123
    #
9986
    MakeHeader ("Maketags");
10124
    MakeHeader ("Maketags");
9987
    foreach my $tag ( sort keys %MakeTags )
10125
    foreach my $tag ( sort keys %MakeTags )
9988
    {
10126
    {
9989
        MakePadded( 2, "#   $tag:", defined ($MakeTags{$tag}) ? 1 : 0, "\n");
10127
        MakePadded( 3, "#   $tag:", '1', "\n");
9990
    }
10128
    }
9991
 
10129
 
9992
#-------------------------------------------------------------------------------
10130
#-------------------------------------------------------------------------------
9993
#   End of Makefile
10131
#   End of Makefile
9994
#
10132
#