Subversion Repositories DevTools

Rev

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

Rev 279 Rev 281
Line 108... Line 108...
108
    #   Basic commands / phases of the build process
108
    #   Basic commands / phases of the build process
109
    #   This should be a list of all known makefile commands
109
    #   This should be a list of all known makefile commands
110
    #
110
    #
111
    'make_usage'            => { 'tag' => 0, 'local' => \&DoHelp },
111
    'make_usage'            => { 'tag' => 0, 'local' => \&DoHelp },
112
    'help'                  => { 'tag' => 0, 'local' => \&DoHelp },
112
    'help'                  => { 'tag' => 0, 'local' => \&DoHelp },
-
 
113
    'show'                  => { 'tag' => 0, 'local' => \&ShowMakefiles },
113
    'rebuild'               => { 'tag' => 0, 'local' => \&TestMakeFiles },
114
    'rebuild'               => { 'tag' => 0, 'local' => \&TestMakeFiles },
114
    'makefiles'             => { 'tag' => 0, 'local' => \&TestMakeFiles },
115
    'makefiles'             => { 'tag' => 0, 'local' => \&TestMakeFiles },
115
    'unmakefiles'           => { 'tag' => 0, 'local' => \&UnMakeFiles },
116
    'unmakefiles'           => { 'tag' => 0, 'local' => \&UnMakeFiles },
116
    'make_init'             => { 'tag' => 1, 'nomakecheck' => 1, 'common' => 3, },
117
    'make_init'             => { 'tag' => 1, 'nomakecheck' => 1, 'common' => 3, },
117
    'generate'              => { 'tag' => 1 },
118
    'generate'              => { 'tag' => 1 },
Line 815... Line 816...
815
        }
816
        }
816
    }
817
    }
817
}
818
}
818
 
819
 
819
#-------------------------------------------------------------------------------
820
#-------------------------------------------------------------------------------
-
 
821
# Function        : ShowMakefiles
-
 
822
#
-
 
823
# Description     : Show the makefiles used in the build
-
 
824
#
-
 
825
# Inputs          : $cmd            - Current command
-
 
826
#                   $pref           - Ref to an array of platforms
-
 
827
#
-
 
828
# Returns         : 
-
 
829
#
-
 
830
sub ShowMakefiles
-
 
831
{
-
 
832
    my ( $cmd, $pref ) = @_;
-
 
833
    Verbose ("Show makefiles");
-
 
834
 
-
 
835
    print "\nPlatform targets\n";
-
 
836
    foreach ( sort keys %BUILDINFO )
-
 
837
    {
-
 
838
        print "    $_\n";
-
 
839
    }
-
 
840
 
-
 
841
    my @alias = sort keys %ScmBuildAliases;
-
 
842
    if ( $#alias >=0 )
-
 
843
    {
-
 
844
        print "\nAlias targets\n";
-
 
845
        foreach ( @alias )
-
 
846
        {
-
 
847
            print "    $_   - $ScmBuildAliases{$_}\n";
-
 
848
        }
-
 
849
    }
-
 
850
    
-
 
851
    #
-
 
852
    #   Read in the Tag file for the current directory
-
 
853
    #   This will provide the current list of subdirectories
-
 
854
    #
-
 
855
    #   Process Test the current makefiles, then any subdirs
-
 
856
    #
-
 
857
    ShowSubMake( $cmd, $Cwd, $pref, 0 );
-
 
858
}
-
 
859
 
-
 
860
#-------------------------------------------------------------------------------
-
 
861
# Function        : ShowSubMake
-
 
862
#
-
 
863
# Description     : Test the makefiles in the current directory
-
 
864
#                   Recurse into subdirectories
-
 
865
#
-
 
866
# Inputs          : $cmd            - Current command
-
 
867
#                   $dir            - Directory to test
-
 
868
#                   $pref           - Ref to an array of platforms
-
 
869
#                   $level          - Recursion depth
-
 
870
#
-
 
871
# Returns         : 
-
 
872
#
-
 
873
sub ShowSubMake
-
 
874
{
-
 
875
    my ($cmd, $dir, $pref, $level ) = @_;
-
 
876
 
-
 
877
    $Tags = ReadMaketags( $dir, 1 );
-
 
878
    unless ( $Tags )
-
 
879
    {
-
 
880
        Verbose2 ("ShowSubMake :Directory not in tag database", $dir );
-
 
881
        MakeBuild( $dir);
-
 
882
    }
-
 
883
    elsif ( $level )
-
 
884
    {
-
 
885
        print ("Makefile : " . ' ' x (4 * ($level - 1) ) . DisplayPath(RelPath($dir)) ,"\n");
-
 
886
    } else {
-
 
887
        print ("\nBuildfile: ", DisplayPath($dir), "\n" );
-
 
888
    }
-
 
889
 
-
 
890
    #
-
 
891
    #   Recurse into any subdirectories that may be a part of the build
-
 
892
    #
-
 
893
    foreach my $subdir (@{$Tags->{$dir}{subdirs}} )
-
 
894
    {
-
 
895
        ShowSubMake( $cmd, CleanDirName( "$dir/$subdir"), $pref, $level + 1 );
-
 
896
    }
-
 
897
}
-
 
898
 
-
 
899
 
-
 
900
#-------------------------------------------------------------------------------
820
# Function        : TestMake
901
# Function        : TestMake
821
#
902
#
822
# Description     : Test the makefiles component files
903
# Description     : Test the makefiles component files
823
#                   and determine if the makefile(s) need to be rebuilt
904
#                   and determine if the makefile(s) need to be rebuilt
824
#
905
#
Line 1390... Line 1471...
1390
    rebuild             - recursively rebuild makefiles
1471
    rebuild             - recursively rebuild makefiles
1391
    depend              - construct the dependencies (u*)
1472
    depend              - construct the dependencies (u*)
1392
    rmlitter            - remove build litter (core, tmp and err) (*)
1473
    rmlitter            - remove build litter (core, tmp and err) (*)
1393
    clean               - delete generate, obj, libraries and programs (p*)
1474
    clean               - delete generate, obj, libraries and programs (p*)
1394
    clobber             - delete everything which can be remade (p*)
1475
    clobber             - delete everything which can be remade (p*)
1395
    help                - A list of alias and platforms
1476
    help                - A list of platforms and aliases
-
 
1477
    show                - A list of platforms, alias, and makefile paths
1396
 
1478
 
1397
      (u) undo target available (ie uninstall)
1479
      (u) undo target available (ie uninstall)
1398
      (p) optional [platform_] prefix targets (ie XXX_build)
1480
      (p) optional [platform_] prefix targets (ie XXX_build)
1399
      (*) optional [_debug|_prod] postfix targets (ie clean_debug)
1481
      (*) optional [_debug|_prod] postfix targets (ie clean_debug)
1400
 
1482