summaryrefslogtreecommitdiff
path: root/modules/Options.pm
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2008-02-11 15:22:16 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2008-02-11 15:22:16 +0000
commit257f46302a00ac81074d5cc1b4ff3b9d3f3ec54f (patch)
tree44022a0b744236c577518b7ea29f2e54fbcce8f7 /modules/Options.pm
parentd52f0fdaafd958eb4824d6a4d46650a12e276d37 (diff)
downloadMPC-257f46302a00ac81074d5cc1b4ff3b9d3f3ec54f.tar.gz
Mon Feb 11 15:21:12 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'modules/Options.pm')
-rw-r--r--modules/Options.pm18
1 files changed, 16 insertions, 2 deletions
diff --git a/modules/Options.pm b/modules/Options.pm
index f053db0e..9bab5d4b 100644
--- a/modules/Options.pm
+++ b/modules/Options.pm
@@ -53,7 +53,8 @@ sub printUsage {
$spaces . "[-expand_vars] [-features <feature definitions>]\n" .
$spaces . "[-exclude <directories>] [-name_modifier <pattern>]\n" .
$spaces . "[-apply_project] [-version] [-into <directory>]\n" .
- $spaces . "[-gfeature_file <file name>] [-nocomments] [-for_eclipse]\n" .
+ $spaces . "[-gfeature_file <file name>] [-nocomments]\n" .
+ $spaces . "[-relative_file <file name>] [-for_eclipse]\n" .
$spaces . "[-language <";
my($olen) = length($spaces) + 12;
@@ -145,6 +146,9 @@ sub printUsage {
" relative path based on the current working directory.\n" .
" This option can be used multiple times to add multiple\n" .
" variables.\n" .
+" -relative_file Specifies the relative file to read before processing.\n" .
+" The default feature file is default.rel under the\n" .
+" config directory.\n" .
" -static Specifies that only static projects will be generated.\n" .
" By default, only dynamic projects are generated.\n" .
" -template Specifies the template name (with no extension).\n" .
@@ -185,7 +189,7 @@ sub completion_command {
"ti static noreldefs notoplevel feature_file use_env " .
"value_template value_project make_coexistence language " .
"hierarchy exclude name_modifier apply_project version " .
- "expand_vars gfeature_file nocomments for_eclipse)/' " .
+ "expand_vars gfeature_file nocomments for_eclipse relative_file)/' " .
"'c/dll:/f/' 'c/dll_exe:/f/' 'c/lib_exe:/f/' 'c/lib:/f/' " .
"'n/-ti/(dll lib dll_exe lib_exe)/:' ";
@@ -230,6 +234,7 @@ sub options {
my($template) = undef;
my($feature_f) = undef;
my($gfeature_f) = undef;
+ my($relative_f) = undef;
my(@features) = ();
my($nmodifier) = undef;
my($into) = undef;
@@ -337,6 +342,14 @@ sub options {
'requires a file name argument');
}
}
+ elsif ($arg eq '-relative_file') {
+ $i++;
+ $relative_f = $args[$i];
+ if (!defined $relative_f) {
+ $self->optionError('-relative_file ' .
+ 'requires a file name argument');
+ }
+ }
elsif ($arg eq '-gendot') {
$gendot = 1;
}
@@ -542,6 +555,7 @@ sub options {
return {'global' => $global,
'feature_file' => $feature_f,
'gfeature_file' => $gfeature_f,
+ 'relative_file' => $relative_f,
'features' => \@features,
'for_eclipse' => $foreclipse,
'include' => \@include,