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 NMakeProjectCreator;
15
use NMakeProjectCreator;
17
use WorkspaceCreator;
16
use WorkspaceCreator;
18
 
17
 
19
use vars qw(@ISA);
18
use vars qw(@ISA);
Line 65... Line 64...
65
  my($fh)   = shift;
64
  my($fh)   = shift;
66
  my($crlf) = $self->crlf();
65
  my($crlf) = $self->crlf();
67
 
66
 
68
  print $fh '# Microsoft Developer Studio Generated NMAKE File', $crlf,
67
  print $fh '# Microsoft Developer Studio Generated NMAKE File', $crlf,
69
            '#', $crlf,
68
            '#', $crlf,
70
            '# $Id: NMakeWorkspaceCreator.pm 198 2005-12-15 11:30:53Z bj $', $crlf,
69
            '# $Id: NMakeWorkspaceCreator.pm 217 2006-05-05 09:35:48Z bj $', $crlf,
71
            '#', $crlf,
70
            '#', $crlf,
72
            '# This file was generated by MPC.  Any changes made directly to', $crlf,
71
            '# This file was generated by MPC.  Any changes made directly to', $crlf,
73
            '# this file will be lost the next time it is generated.', $crlf,
72
            '# this file will be lost the next time it is generated.', $crlf,
74
            '#', $crlf,
73
            '#', $crlf,
75
            '# MPC Command:', $crlf,
74
            '# MPC Command:', $crlf,
Line 94... Line 93...
94
    ## If the directory isn't '.' then we need
93
    ## If the directory isn't '.' then we need
95
    ## to figure out how to get back to our starting point
94
    ## to figure out how to get back to our starting point
96
    if ($dir ne '.') {
95
    if ($dir ne '.') {
97
      $chdir = 1;
96
      $chdir = 1;
98
      my($count) = ($dir =~ tr/\///) + 1;
97
      my($count) = ($dir =~ tr/\///) + 1;
99
      if ($dir =~ /^\.\.\//) {
98
      if (index($dir, '../') == 0) {
100
        ## Find out how many directories we went down
99
        ## Find out how many directories we went down
101
        my($rel) = $dir;
100
        my($rel) = $dir;
102
        while($rel =~ s/^\.\.\///) {
101
        while($rel =~ s/^\.\.\///) {
103
        }
102
        }
104
        my($down) = ($rel =~ tr/\///) + 1;
103
        my($down) = ($rel =~ tr/\///) + 1;
Line 118... Line 117...
118
        $back = ('../' x $count);
117
        $back = ('../' x $count);
119
      }
118
      }
120
    }
119
    }
121
 
120
 
122
    print $fh ($chdir ? "\tcd $dir$crlf" : ''),
121
    print $fh ($chdir ? "\tcd $dir$crlf" : ''),
123
              "\t\$(MAKE) /f ", basename($project), " $target$crlf",
122
              "\t\$(MAKE) /f ", $self->mpc_basename($project),
-
 
123
              " $target$crlf",
124
              ($chdir ? "\tcd $back$crlf" : '');
124
              ($chdir ? "\tcd $back$crlf" : '');
125
  }
125
  }
126
}
126
}
127
 
127
 
128
 
128
 
Line 131... Line 131...
131
  my($fh)       = shift;
131
  my($fh)       = shift;
132
  my($projects) = $self->get_projects();
132
  my($projects) = $self->get_projects();
133
  my($pjs)      = $self->get_project_info();
133
  my($pjs)      = $self->get_project_info();
134
  my($trans)    = $self->project_target_translation();
134
  my($trans)    = $self->project_target_translation();
135
  my(%targnum)  = ();
135
  my(%targnum)  = ();
136
  my(@list)     = $self->number_target_deps($projects, $pjs, \%targnum);
136
  my(@list)     = $self->number_target_deps($projects, $pjs, \%targnum, 0);
137
  my($crlf)     = $self->crlf();
137
  my($crlf)     = $self->crlf();
138
  my($default)  = 'Win32 Debug';
138
  my($default)  = 'Win32 Debug';
139
 
139
 
140
  ## Determine the default configuration
140
  ## Determine the default configuration
141
  foreach my $project (keys %$pjs) {
141
  foreach my $project (keys %$pjs) {
142
    my($name, $deps, $pguid, @cfgs) = @{$pjs->{$project}};
142
    my($name, $deps, $pguid, $lang, @cfgs) = @{$pjs->{$project}};
143
    @cfgs = sort @cfgs;
143
    @cfgs = sort @cfgs;
144
    if (defined $cfgs[0]) {
144
    if (defined $cfgs[0]) {
145
      $default = $cfgs[0];
145
      $default = $cfgs[0];
146
      $default =~ s/(.*)\|(.*)/$2 $1/;
146
      $default =~ s/(.*)\|(.*)/$2 $1/;
147
      last;
147
      last;