Subversion Repositories DevTools

Rev

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

Rev 331 Rev 367
Line 302... Line 302...
302
    #
302
    #
303
    #   Import user platform specification (GBE_PLATFORM)
303
    #   Import user platform specification (GBE_PLATFORM)
304
    #   Note: This is also used by the Makefile and it cannot be
304
    #   Note: This is also used by the Makefile and it cannot be
305
    #         alias expanded or sanitised. Its not really really useful
305
    #         alias expanded or sanitised. Its not really really useful
306
    #
306
    #
307
    #   Only use GB_PLATFORM if the user has not specified to build ALL
307
    #   Only use GBE_PLATFORM if the user has not specified to build ALL makefiles.
308
    #   makefiles.
-
 
309
    #
308
    #
310
    my %filter;
309
    my %filter;
311
    my $filter_present = 0;
310
    my $filter_present = 0;
312
 
311
 
313
    if (  $::ScmAll == 0  )
312
    if (  $::ScmAll == 0  )
Line 551... Line 550...
551
    push( @::ScmDepends, "$file" );
550
    push( @::ScmDepends, "$file" );
552
 
551
 
553
 
552
 
554
#.. Generate primary makefile
553
#.. Generate primary makefile
555
#
554
#
556
    $exitVal = Generate( $noplatforms );
555
    $exitVal = Generate( $noplatforms || $::ROOTMAKEFILE );
557
    if ($::ROOTMAKEFILE == 1) {
556
    if ($::ROOTMAKEFILE == 1)
-
 
557
    {
558
        print STDERR "WARNING: problem generating Makefile ($exitVal)\n"
558
        Warning ("WARNING: Problem generating Makefile ($exitVal)")
559
            if ($exitVal);
559
            if ($exitVal);
560
        return ($exitVal);
560
        return ($exitVal);
561
    }
561
    }
562
 
562
 
-
 
563
    #
-
 
564
    #   Not creating the ROOT Makefile
-
 
565
    #   Exit the phase. All the work has been done
-
 
566
    #
563
    Debug( "Platform ExitVal:   $exitVal" );
567
    Debug( "Platform ExitVal:   $exitVal" );
564
    exit( $exitVal );
568
    exit( $exitVal );
565
}
569
}
566
 
570
 
567
###############################################################################
571
###############################################################################
Line 575... Line 579...
575
#
579
#
576
# Description     : Build makefiles ...
580
# Description     : Build makefiles ...
577
#                   Creates the command data files and the per-target .MK files
581
#                   Creates the command data files and the per-target .MK files
578
#
582
#
579
# Inputs          : $noplatforms    - 1 if this makefile does not have
583
# Inputs          : $noplatforms    - 1 if this makefile does not have
580
#                                       any platforms
584
#                                       any platforms. Also set for ROOTMAKEFILE
581
#
585
#
582
# Returns         : $exitVal
586
# Returns         : $exitVal
583
#
587
#
584
sub Generate
588
sub Generate
585
{
589
{
586
    my( $noplatforms ) = @_;
590
    my( $noplatforms ) = @_;
587
    my( $exitVal ) = 0;
591
    my $exitVal = 0;
588
 
-
 
589
    #.. Dont build platforms within root directory
-
 
590
    #
-
 
591
    $noplatforms = 1
-
 
592
        if ($::ROOTMAKEFILE == 1);
-
 
593
 
592
 
594
    #.. Build 'makefile'
593
    #.. Build all the per-taget makefiles, if any exist
595
    #
594
    #
596
    $exitVal = GeneratePlatforms()
595
    $exitVal = GeneratePlatforms()
597
        unless ($noplatforms );
596
        unless ($noplatforms );
598
 
597
 
-
 
598
    #.. Build the common Makefile.gbe
-
 
599
    #
599
    GenerateMakefile( $noplatforms );
600
    GenerateMakefile( $noplatforms );
600
    return $exitVal;
601
    return $exitVal;
601
}
602
}
602
 
603
 
-
 
604
#-------------------------------------------------------------------------------
-
 
605
# Function        : GeneratePlatforms
603
 
606
#
-
 
607
# Description     : Generate all the per-taget makefiles
-
 
608
#                   Create all .mk files in the current directory
-
 
609
#
-
 
610
#                   Cleanup of unused .mk files is done when the WriteCommonInfo
-
 
611
#                   is processed. Makefiles that are no longer used will be purged
604
#
612
#
605
#   Note:
613
# Inputs          : None
606
#   Currently this function will create all .mk files in the current directory
-
 
607
#
614
#
608
#   Note: Cleanup of unused .mk files is done when the WriteCommonInfo  is
-
 
609
#         processed. Makefiles that are no lonker used will be purged
615
# Returns         : exitVal
610
#
616
#
611
sub GeneratePlatforms
617
sub GeneratePlatforms
612
{
618
{
613
    my( $exitVal, $exitVal2 ) = 0;
619
    my  $exitVal = 0;
-
 
620
    my  $exitVal2;
614
 
621
 
615
    foreach my $platform ( @::PLATFORMS )
622
    foreach my $platform ( @::PLATFORMS )
616
    {
623
    {
617
        my @CmdLine;
624
        my @CmdLine;
618
        push @CmdLine, $::GBE_PERL, $0, $::ScmRoot;
625
        push @CmdLine, $::GBE_PERL, $0, $::ScmRoot;
Line 636... Line 643...
636
        #
643
        #
637
        $exitVal2 = System( '--NoShell', @CmdLine );
644
        $exitVal2 = System( '--NoShell', @CmdLine );
638
 
645
 
639
        #
646
        #
640
        #   Warn on any error
647
        #   Warn on any error
641
        #   Overall return code will be set if any platform fails
648
        #   Overall return code will be set if any platform fails, but we
-
 
649
        #   will process all of them first
642
        #
650
        #
643
        if ( $exitVal2 )
651
        if ( $exitVal2 )
644
        {
652
        {
645
            Warning ("Problem generating $platform.mk in $::Cwd ($exitVal2)");
653
            Warning ("Problem generating $platform.mk in $::Cwd ($exitVal2)");
646
            $exitVal = $exitVal2;
654
            $exitVal = $exitVal2;