diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2002-08-21 16:16:31 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2002-08-21 16:16:31 +0000 |
commit | f51243fa7c701848140a05c21616f657b2df6155 (patch) | |
tree | ff828eaf21fa8adc0186c85ac08e57ae17a3c8f9 | |
parent | 0a8268a24a6b1b807a6c1537b851671449f7f70c (diff) | |
download | MPC-f51243fa7c701848140a05c21616f657b2df6155.tar.gz |
ChangeLogTag: Wed Aug 21 11:15:11 2002 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r-- | modules/NMakeWorkspaceCreator.pm | 31 | ||||
-rw-r--r-- | modules/TemplateParser.pm | 10 | ||||
-rw-r--r-- | templates/nmake.mpd | 19 |
3 files changed, 49 insertions, 11 deletions
diff --git a/modules/NMakeWorkspaceCreator.pm b/modules/NMakeWorkspaceCreator.pm index fc0e4fb5..59a9ba31 100644 --- a/modules/NMakeWorkspaceCreator.pm +++ b/modules/NMakeWorkspaceCreator.pm @@ -45,16 +45,14 @@ sub pre_workspace { } -sub write_comps { +sub write_project_targets { my($self) = shift; my($fh) = shift; - my($projects) = $self->get_projects(); - my($pjs) = $self->get_project_info(); - my(@list) = $self->sort_dependencies($projects, $pjs); + my($target) = shift; + my($list) = shift; my($crlf) = $self->crlf(); - print $fh "ALL:$crlf"; - foreach my $project (@list) { + foreach my $project (@$list) { my($dir) = dirname($project); my($chdir) = 0; my($back) = 1; @@ -71,14 +69,29 @@ sub write_comps { } } - ## These commands will work. In practicality, only the - ## default configuration can be built at the top level. print $fh ($chdir ? "\tcd $dir$crlf" : "") . - "\t\$(MAKE) /f " . basename($project) . " CFG=\"\$(CFG)\"$crlf" . + "\t\$(MAKE) /f " . basename($project) . " $target$crlf" . ($chdir ? "\tcd " . ("../" x $back) . $crlf : ""); } } +sub write_comps { + my($self) = shift; + my($fh) = shift; + my($projects) = $self->get_projects(); + my($pjs) = $self->get_project_info(); + my(@list) = $self->sort_dependencies($projects, $pjs); + my($crlf) = $self->crlf(); + + print $fh "ALL:$crlf"; + $self->write_project_targets($fh, "CFG=\"\$(CFG)\"", \@list); + + print $fh "$crlf" . + "CLEAN\tREALCLEAN:$crlf"; + $self->write_project_targets($fh, "CLEAN", \@list); +} + + 1; diff --git a/modules/TemplateParser.pm b/modules/TemplateParser.pm index 76c1e2df..1fb9cb0b 100644 --- a/modules/TemplateParser.pm +++ b/modules/TemplateParser.pm @@ -164,7 +164,7 @@ sub relative { my(@keys) = keys %$rel; if (defined $value && defined $keys[0] && $value =~ /\$/) { - if (UNIVERSAL::isa($value, 'ARRAY')) { + if (UNIVERSAL::isa($value, 'ARRAY')) { my(@built) = (); foreach my $val (@$value) { push(@built, $self->relative($val)); @@ -174,17 +174,23 @@ sub relative { else { my($cwd) = getcwd(); my($start) = 0; + my($fixed) = 0; + + if ($cwd =~ /[a-z]:[\/\\]/) { + substr($cwd, 0, 1) = uc(substr($cwd, 0, 1)); + } while(substr($value, $start) =~ /(\$\(([^)]+)\))/) { my($whole) = $1; my($name) = $2; my($val) = $$rel{$name}; if (defined $val) { - if ($^O eq 'cygwin' && + if ($^O eq 'cygwin' && !$fixed && $cwd !~ /[A-Za-z]:/ && $val =~ /[A-Za-z]:/) { my($cyg) = `cygpath -w $cwd`; if (defined $cyg) { $cyg =~ s/\\/\//g; chop($cwd = $cyg); + $fixed = 1; } } diff --git a/templates/nmake.mpd b/templates/nmake.mpd index 0d2b6b09..4d03aed9 100644 --- a/templates/nmake.mpd +++ b/templates/nmake.mpd @@ -189,6 +189,25 @@ SOURCE=.\<%source_file%> <%foreach(template_files)%> SOURCE=.\<%template_file%> <%endfor%> +<%foreach(idl_files)%> +SOURCE=.\<%idl_file%> + +<%foreach(configurations)%> +!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%platform%> <%configuration%>" + +InputPath=.\<%idl_file%> +InputName=<%noextension(idl_file)%> + +".\$(InputName)C.h" ".\$(InputName)C.i" ".\$(InputName)C.cpp" ".\$(InputName)S.h" ".\$(InputName)S.i" ".\$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + <<tempfile.bat + @echo off + <%tao_idl_exe("$(ACE_ROOT)\\bin\\tao_idl")%> <%idlflags("-Sc")%> $(InputPath) +<< + +<%endfor%> +!ENDIF + +<%endfor%> <%foreach(resource_files)%> SOURCE=.\<%resource_file%> |