Removed svn Id tag
[MPC.git] / modules / BMakeProjectCreator.pm
blob6ef1e7f1ffc747c67f134b4b16d984c1baf76b5a
1 package BMakeProjectCreator;
3 # ************************************************************
4 # Description : A BMake Project Creator
5 # Author : Chad Elliott
6 # Create Date : 2/03/2004
7 # ************************************************************
9 # ************************************************************
10 # Pragmas
11 # ************************************************************
13 use strict;
15 use ProjectCreator;
16 use BorlandProjectBase;
17 use MakeProjectBase;
19 use vars qw(@ISA);
20 @ISA = qw(MakeProjectBase BorlandProjectBase ProjectCreator);
22 # ************************************************************
23 # Data Section
24 # ************************************************************
26 my %names = ('cppdir' => 'source_files',
27 'rcdir' => 'resource_files');
29 # ************************************************************
30 # Subroutine Section
31 # ************************************************************
33 sub fill_value {
34 my($self, $name) = @_;
36 if (defined $names{$name}) {
37 my %dirnames = ('.' => 1);
38 foreach my $file ($self->get_component_list($names{$name}, 1)) {
39 my $dirname = $self->mpc_dirname($file);
40 if ($dirname eq '') {
41 $dirname = '.';
43 else {
44 $dirname =~ s/\//\\/g;
46 $dirnames{$dirname} = 1;
49 ## Sort the directories to ensure that '.' comes first
50 return join(';', sort keys %dirnames);
53 return undef;
57 sub get_and_symbol {
58 #my $self = shift;
59 return '&$(__TRICK_BORLAND_MAKE__)&';
62 sub project_file_extension {
63 #my $self = shift;
64 return '.bmak';
68 sub get_dll_exe_template_input_file {
69 #my $self = shift;
70 return 'bmakedllexe';
74 sub get_lib_exe_template_input_file {
75 #my $self = shift;
76 return 'bmakelibexe';
80 sub get_lib_template_input_file {
81 #my $self = shift;
82 return 'bmakelib';
86 sub get_dll_template_input_file {
87 #my $self = shift;
88 return 'bmakedll';
92 sub get_properties {
93 my $self = shift;
95 ## Create the map of properties that we support.
96 my $props = {};
98 ## Merge in properties from all base projects
99 foreach my $base (@ISA) {
100 my $func = $base . '::get_properties';
101 my $p = $self->$func();
102 foreach my $key (keys %$p) {
103 $$props{$key} = $$p{$key};
107 return $props;