Subversion Repositories gelsvn

Rev

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

Rev 198 Rev 217
Line 9... Line 9...
9
# ************************************************************
9
# ************************************************************
10
# Pragmas
10
# Pragmas
11
# ************************************************************
11
# ************************************************************
12
 
12
 
13
use strict;
13
use strict;
14
use File::Basename;
-
 
15
 
14
 
16
use BMakeProjectCreator;
15
use BMakeProjectCreator;
17
use WorkspaceCreator;
16
use WorkspaceCreator;
18
 
17
 
19
use vars qw(@ISA);
18
use vars qw(@ISA);
Line 66... Line 65...
66
  my($crlf) = $self->crlf();
65
  my($crlf) = $self->crlf();
67
 
66
 
68
  print $fh '#----------------------------------------------------------------------------', $crlf,
67
  print $fh '#----------------------------------------------------------------------------', $crlf,
69
            '#       Borland Workspace Makefile', $crlf,
68
            '#       Borland Workspace Makefile', $crlf,
70
            '#', $crlf,
69
            '#', $crlf,
71
            '# $Id: BMakeWorkspaceCreator.pm 198 2005-12-15 11:30:53Z bj $', $crlf,
70
            '# $Id: BMakeWorkspaceCreator.pm 217 2006-05-05 09:35:48Z bj $', $crlf,
72
            '#', $crlf,
71
            '#', $crlf,
73
            '# This file was generated by MPC.  Any changes made directly to', $crlf,
72
            '# This file was generated by MPC.  Any changes made directly to', $crlf,
74
            '# this file will be lost the next time it is generated.', $crlf,
73
            '# this file will be lost the next time it is generated.', $crlf,
75
            '#', $crlf,
74
            '#', $crlf,
76
            '# MPC Command:', $crlf,
75
            '# MPC Command:', $crlf,
Line 97... Line 96...
97
    ## If the directory isn't '.' then we need
96
    ## If the directory isn't '.' then we need
98
    ## to figure out how to get back to our starting point
97
    ## to figure out how to get back to our starting point
99
    if ($dir ne '.') {
98
    if ($dir ne '.') {
100
      $chdir = 1;
99
      $chdir = 1;
101
      my($count) = ($dir =~ tr/\///) + 1;
100
      my($count) = ($dir =~ tr/\///) + 1;
102
      if ($dir =~ /^\.\.\//) {
101
      if (index($dir, '../') == 0) {
103
        ## Find out how many directories we went down
102
        ## Find out how many directories we went down
104
        my($rel) = $dir;
103
        my($rel) = $dir;
105
        while($rel =~ s/^\.\.\///) {
104
        while($rel =~ s/^\.\.\///) {
106
        }
105
        }
107
        my($down) = ($rel =~ tr/\///) + 1;
106
        my($down) = ($rel =~ tr/\///) + 1;
Line 121... Line 120...
121
        $back = ('../' x $count);
120
        $back = ('../' x $count);
122
      }
121
      }
123
    }
122
    }
124
 
123
 
125
    print $fh ($chdir ? "\t\@cd $dir$crlf" : ''),
124
    print $fh ($chdir ? "\t\@cd $dir$crlf" : ''),
126
              "\t\$(MAKE) -\$(MAKEFLAGS) -f ", basename($project),
125
              "\t\$(MAKE) -\$(MAKEFLAGS) -f ",
127
              " $target$crlf",
126
              $self->mpc_basename($project), " $target$crlf",
128
              ($chdir ? "\t\@cd $back$crlf" : '');
127
              ($chdir ? "\t\@cd $back$crlf" : '');
129
  }
128
  }
130
}
129
}
131
 
130
 
132
 
131
 
Line 134... Line 133...
134
  my($self)     = shift;
133
  my($self)     = shift;
135
  my($fh)       = shift;
134
  my($fh)       = shift;
136
  my($projects) = $self->get_projects();
135
  my($projects) = $self->get_projects();
137
  my($pjs)      = $self->get_project_info();
136
  my($pjs)      = $self->get_project_info();
138
  my(%targnum)  = ();
137
  my(%targnum)  = ();
139
  my(@list)     = $self->number_target_deps($projects, $pjs, \%targnum);
138
  my(@list)     = $self->number_target_deps($projects, $pjs, \%targnum, 0);
140
  my($crlf)     = $self->crlf();
139
  my($crlf)     = $self->crlf();
141
  my(@ltargets) = @targets;
140
  my(@ltargets) = @targets;
142
 
141
 
143
  ## Set up the custom targets
142
  ## Set up the custom targets
144
  print $fh '!ifndef CUSTOM_TARGETS', $crlf,
143
  print $fh '!ifndef CUSTOM_TARGETS', $crlf,