Subversion Repositories gelsvn

Rev

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

Rev 107 Rev 217
Line 16... Line 16...
16
 
16
 
17
# ************************************************************
17
# ************************************************************
18
# Data Section
18
# Data Section
19
# ************************************************************
19
# ************************************************************
20
 
20
 
-
 
21
my($deflang)   = 'cplusplus';
21
my(%languages) = ('cplusplus' => 1,
22
my(%languages) = ('cplusplus' => 1,
22
                  'csharp'    => 1,
23
                  'csharp'    => 1,
23
                  'java'      => 1,
24
                  'java'      => 1,
24
                  'vb'        => 1,
25
                  'vb'        => 1,
25
                 );
26
                 );
Line 49... Line 50...
49
               $spaces . "[-value_project <NAME+=VAL | NAME=VAL | NAME-=VAL>]\n" .
50
               $spaces . "[-value_project <NAME+=VAL | NAME=VAL | NAME-=VAL>]\n" .
50
               $spaces . "[-make_coexistence] [-feature_file <file name>]\n" .
51
               $spaces . "[-make_coexistence] [-feature_file <file name>]\n" .
51
               $spaces . "[-expand_vars] [-features <feature definitions>]\n" .
52
               $spaces . "[-expand_vars] [-features <feature definitions>]\n" .
52
               $spaces . "[-exclude <directories>] [-name_modifier <pattern>]\n" .
53
               $spaces . "[-exclude <directories>] [-name_modifier <pattern>]\n" .
53
               $spaces . "[-apply_project] [-version] [-into <directory>]\n" .
54
               $spaces . "[-apply_project] [-version] [-into <directory>]\n" .
-
 
55
               $spaces . "[-gfeature_file <file name>]\n" .
54
               $spaces . "[-language <";
56
               $spaces . "[-language <";
55
 
57
 
56
  my(@keys) = sort keys %languages;
58
  my(@keys) = sort keys %languages;
57
  for(my $i = 0; $i <= $#keys; $i++) {
59
  for(my $i = 0; $i <= $#keys; $i++) {
58
    print STDERR $keys[$i];
60
    print STDERR $keys[$i];
Line 91... Line 93...
91
"       -feature_file   Specifies the feature file to read before processing.\n" .
93
"       -feature_file   Specifies the feature file to read before processing.\n" .
92
"                       The default feature file is default.features under the\n" .
94
"                       The default feature file is default.features under the\n" .
93
"                       config directory.\n" .
95
"                       config directory.\n" .
94
"       -features       Specifies the feature list to set before processing.\n" .
96
"       -features       Specifies the feature list to set before processing.\n" .
95
"       -genins         Generate .ins files for use with prj_install.pl.\n" .
97
"       -genins         Generate .ins files for use with prj_install.pl.\n" .
-
 
98
"       -gfeature_file  Specifies the global feature file.  The\n" .
-
 
99
"                       default value is global.features under the\n" .
-
 
100
"                       config directory.\n" .
96
"       -global         Specifies the global input file.  Values stored\n" .
101
"       -global         Specifies the global input file.  Values stored\n" .
97
"                       within this file are applied to all projects.\n" .
102
"                       within this file are applied to all projects.\n" .
98
"       -hierarchy      Generate a workspace in a hierarchical fashion.\n" .
103
"       -hierarchy      Generate a workspace in a hierarchical fashion.\n" .
99
"       -include        Specifies a directory to search when looking for base\n" .
104
"       -include        Specifies a directory to search when looking for base\n" .
100
"                       projects, template input files and templates.  This\n" .
105
"                       projects, template input files and templates.  This\n" .
101
"                       option can be used multiple times to add directories.\n" .
106
"                       option can be used multiple times to add directories.\n" .
102
"       -into           Place all output files in a mirrored directory\n" .
107
"       -into           Place all output files in a mirrored directory\n" .
103
"                       structure starting at <directory>.\n" .
108
"                       structure starting at <directory>.\n" .
104
"       -language       Specify the language preference.  The default is\n".
109
"       -language       Specify the language preference; possible values are\n",
-
 
110
"                       [", join(' ', sort keys %languages), "].  The default is\n".
105
"                       cplusplus.\n" .
111
"                       $deflang.\n",
106
"       -make_coexistence If multiple 'make' based project types are\n" .
112
"       -make_coexistence If multiple 'make' based project types are\n" .
107
"                       generated, they will be named such that they can coexist.\n" .
113
"                       generated, they will be named such that they can coexist.\n" .
108
"       -name_modifier  Modify output names.  The pattern passed to this\n" .
114
"       -name_modifier  Modify output names.  The pattern passed to this\n" .
109
"                       parameter will have the '*' portion replaced with the\n" .
115
"                       parameter will have the '*' portion replaced with the\n" .
110
"                       actual output name.  Ex. *_Static\n" .
116
"                       actual output name.  Ex. *_Static\n" .
Line 156... Line 162...
156
  my($str)   = "complete $name " .
162
  my($str)   = "complete $name " .
157
               "'c/-/(genins global include type template relative " .
163
               "'c/-/(genins global include type template relative " .
158
               "ti static noreldefs notoplevel feature_file use_env " .
164
               "ti static noreldefs notoplevel feature_file use_env " .
159
               "value_template value_project make_coexistence language " .
165
               "value_template value_project make_coexistence language " .
160
               "hierarchy exclude name_modifier apply_project version " .
166
               "hierarchy exclude name_modifier apply_project version " .
161
               "expand_vars)/' " .
167
               "expand_vars gfeature_file)/' " .
162
               "'c/dll:/f/' 'c/dll_exe:/f/' 'c/lib_exe:/f/' 'c/lib:/f/' " .
168
               "'c/dll:/f/' 'c/dll_exe:/f/' 'c/lib_exe:/f/' 'c/lib:/f/' " .
163
               "'n/-ti/(dll lib dll_exe lib_exe)/:' ";
169
               "'n/-ti/(dll lib dll_exe lib_exe)/:' ";
164
 
170
 
165
  $str .= "'n/-language/(";
171
  $str .= "'n/-language/(";
166
  my(@keys) = sort keys %languages;
172
  my(@keys) = sort keys %languages;
Line 200... Line 206...
200
  my(%addproj)    = ();
206
  my(%addproj)    = ();
201
  my(@exclude)    = ();
207
  my(@exclude)    = ();
202
  my($global)     = undef;
208
  my($global)     = undef;
203
  my($template)   = undef;
209
  my($template)   = undef;
204
  my($feature_f)  = undef;
210
  my($feature_f)  = undef;
-
 
211
  my($gfeature_f) = undef;
205
  my(@features)   = ();
212
  my(@features)   = ();
206
  my($nmodifier)  = undef;
213
  my($nmodifier)  = undef;
207
  my($into)       = undef;
214
  my($into)       = undef;
208
  my($hierarchy)  = 0;
215
  my($hierarchy)  = 0;
209
  my($language)   = ($defaults ? 'cplusplus' : undef);
216
  my($language)   = ($defaults ? $deflang : undef);
210
  my($dynamic)    = ($defaults ? 1 : undef);
217
  my($dynamic)    = ($defaults ? 1 : undef);
211
  my($reldefs)    = ($defaults ? 1 : undef);
218
  my($reldefs)    = ($defaults ? 1 : undef);
212
  my($toplevel)   = ($defaults ? 1 : undef);
219
  my($toplevel)   = ($defaults ? 1 : undef);
213
  my($use_env)    = ($defaults ? 0 : undef);
220
  my($use_env)    = ($defaults ? 0 : undef);
214
  my($expandvars) = ($defaults ? 0 : undef);
221
  my($expandvars) = ($defaults ? 0 : undef);
Line 265... Line 272...
265
      }
272
      }
266
    }
273
    }
267
    elsif ($arg eq '-exclude') {
274
    elsif ($arg eq '-exclude') {
268
      $i++;
275
      $i++;
269
      if (defined $args[$i]) {
276
      if (defined $args[$i]) {
270
        @exclude = split(',', $args[$i]);
277
        foreach my $exclude (split(',', $args[$i])) {
-
 
278
          push(@exclude, DirectoryManager::mpc_glob(undef, $exclude));
-
 
279
        }
271
      }
280
      }
272
      else {
281
      else {
273
        $self->optionError('-exclude requires a ' .
282
        $self->optionError('-exclude requires a ' .
274
                           'comma separated list argument');
283
                           'comma separated list argument');
275
      }
284
      }
Line 291... Line 300...
291
      }
300
      }
292
      else {
301
      else {
293
        $self->optionError('-features requires a comma separated list argument');
302
        $self->optionError('-features requires a comma separated list argument');
294
      }
303
      }
295
    }
304
    }
-
 
305
    elsif ($arg eq '-gfeature_file') {
-
 
306
      $i++;
-
 
307
      $gfeature_f = $args[$i];
-
 
308
      if (!defined $gfeature_f) {
-
 
309
        $self->optionError('-gfeature_file ' .
-
 
310
                           'requires a file name argument');
-
 
311
      }
-
 
312
    }
296
    elsif ($arg eq '-genins') {
313
    elsif ($arg eq '-genins') {
297
      $genins = 1;
314
      $genins = 1;
298
    }
315
    }
299
    elsif ($arg eq '-global') {
316
    elsif ($arg eq '-global') {
300
      $i++;
317
      $i++;
Line 500... Line 517...
500
    else {
517
    else {
501
      push(@input, $arg);
518
      push(@input, $arg);
502
    }
519
    }
503
  }
520
  }
504
 
521
 
505
  my(%options) = ('global'        => $global,
522
  return {'global'        => $global,
506
                  'feature_file'  => $feature_f,
523
          'feature_file'  => $feature_f,
-
 
524
          'gfeature_file' => $gfeature_f,
507
                  'features'      => \@features,
525
          'features'      => \@features,
508
                  'include'       => \@include,
526
          'include'       => \@include,
509
                  'input'         => \@input,
527
          'input'         => \@input,
510
                  'creators'      => \@creators,
528
          'creators'      => \@creators,
511
                  'baseprojs'     => \@baseprojs,
529
          'baseprojs'     => \@baseprojs,
512
                  'template'      => $template,
530
          'template'      => $template,
513
                  'ti'            => \%ti,
531
          'ti'            => \%ti,
514
                  'dynamic'       => $dynamic,
532
          'dynamic'       => $dynamic,
515
                  'static'        => $static,
533
          'static'        => $static,
516
                  'relative'      => \%relative,
534
          'relative'      => \%relative,
517
                  'reldefs'       => $reldefs,
535
          'reldefs'       => $reldefs,
518
                  'toplevel'      => $toplevel,
536
          'toplevel'      => $toplevel,
519
                  'recurse'       => $recurse,
537
          'recurse'       => $recurse,
520
                  'addtemp'       => \%addtemp,
538
          'addtemp'       => \%addtemp,
521
                  'addproj'       => \%addproj,
539
          'addproj'       => \%addproj,
522
                  'coexistence'   => $makeco,
540
          'coexistence'   => $makeco,
523
                  'hierarchy'     => $hierarchy,
541
          'hierarchy'     => $hierarchy,
524
                  'exclude'       => \@exclude,
542
          'exclude'       => \@exclude,
525
                  'name_modifier' => $nmodifier,
543
          'name_modifier' => $nmodifier,
526
                  'apply_project' => $applypj,
544
          'apply_project' => $applypj,
527
                  'genins'        => $genins,
545
          'genins'        => $genins,
528
                  'into'          => $into,
546
          'into'          => $into,
529
                  'language'      => $language,
547
          'language'      => $language,
530
                  'use_env'       => $use_env,
548
          'use_env'       => $use_env,
531
                  'expand_vars'   => $expandvars,
549
          'expand_vars'   => $expandvars,
532
                 );
550
         };
533
 
-
 
534
  return \%options;
-
 
535
}
551
}
536
 
552
 
537
 
553
 
538
sub is_set {
554
sub is_set {
539
  my($self)    = shift;
555
  my($self)    = shift;