diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2004-09-16 12:46:34 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2004-09-16 12:46:34 +0000 |
commit | fb65c2da2244c15ed5f6168aa270737d317a834d (patch) | |
tree | 5c587038218a2961d64a37b62f4d7e76a119a0c6 | |
parent | bb2e19fe2eb900067b8ddfd15d74e1b6dc6136a7 (diff) | |
download | MPC-fb65c2da2244c15ed5f6168aa270737d317a834d.tar.gz |
ChangeLogTag: Thu Sep 16 07:45:11 2004 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | modules/BMakeWorkspaceCreator.pm | 19 | ||||
-rw-r--r-- | modules/MakeWorkspaceCreator.pm | 3 | ||||
-rw-r--r-- | modules/NMakeWorkspaceCreator.pm | 13 | ||||
-rw-r--r-- | templates/nmake.mpd | 4 |
5 files changed, 49 insertions, 4 deletions
@@ -1,3 +1,17 @@ +Thu Sep 16 07:45:11 2004 Chad Elliott <elliott_c@ociweb.com> + + * modules/BMakeWorkspaceCreator.pm: + * modules/MakeWorkspaceCreator.pm: + * modules/NMakeWorkspaceCreator.pm: + + Added a CUSTOM_TARGETS macro that will allow users to access + custom targets that can be generated with the use of the + 'verbatim' clause in mpc files. + + * templates/nmake.mpd: + + Added markers to allow for the use of 'verbatim' with nmake. + Wed Sep 15 11:32:57 2004 Chad Elliott <elliott_c@ociweb.com> * templates/bmake.mpd: diff --git a/modules/BMakeWorkspaceCreator.pm b/modules/BMakeWorkspaceCreator.pm index 6fce02cc..c554b868 100644 --- a/modules/BMakeWorkspaceCreator.pm +++ b/modules/BMakeWorkspaceCreator.pm @@ -20,10 +20,22 @@ use vars qw(@ISA); @ISA = qw(WorkspaceCreator); # ************************************************************ +# Data Section +# ************************************************************ + +my(@targets) = ('clean', 'realclean', '$(CUSTOM_TARGETS)'); + +# ************************************************************ # Subroutine Section # ************************************************************ +sub crlf { + my($self) = shift; + return $self->windows_crlf(); +} + + sub workspace_file_name { my($self) = shift; if ($self->make_coexistence()) { @@ -104,6 +116,11 @@ sub write_comps { my(@list) = $self->number_target_deps($projects, $pjs, \%targnum); my($crlf) = $self->crlf(); + ## Set up the custom targets + print $fh '!ifndef CUSTOM_TARGETS', $crlf, + 'CUSTOM_TARGETS=_EMPTY_TARGET_', $crlf, + '!endif', $crlf; + ## Print out the "all" target print $fh $crlf . 'all:'; foreach my $project (@list) { @@ -112,7 +129,7 @@ sub write_comps { print $fh $crlf; ## Print out all other targets here - foreach my $target ('clean', 'realclean') { + foreach my $target (@targets) { print $fh $crlf . $target . ':' . $crlf; $self->write_project_targets($fh, $target, \@list); diff --git a/modules/MakeWorkspaceCreator.pm b/modules/MakeWorkspaceCreator.pm index 054fd837..2ae73c73 100644 --- a/modules/MakeWorkspaceCreator.pm +++ b/modules/MakeWorkspaceCreator.pm @@ -23,7 +23,8 @@ use vars qw(@ISA); # Data Section # ************************************************************ -my(@targets) = ('clean', 'depend', 'generated', 'realclean'); +my(@targets) = ('clean', 'depend', 'generated', 'realclean', + '$(CUSTOM_TARGETS)'); # ************************************************************ # Subroutine Section diff --git a/modules/NMakeWorkspaceCreator.pm b/modules/NMakeWorkspaceCreator.pm index 589f956e..f7e6eaf4 100644 --- a/modules/NMakeWorkspaceCreator.pm +++ b/modules/NMakeWorkspaceCreator.pm @@ -20,6 +20,12 @@ use vars qw(@ISA); @ISA = qw(WorkspaceCreator); # ************************************************************ +# Data Section +# ************************************************************ + +my(@targets) = ('DEPEND', 'CLEAN', 'REALCLEAN', '$(CUSTOM_TARGETS)'); + +# ************************************************************ # Subroutine Section # ************************************************************ @@ -124,7 +130,10 @@ sub write_comps { 'CFG=' . $default . $crlf . '!MESSAGE No configuration specified. ' . 'Defaulting to ' . $default . '.' . $crlf . - '!ENDIF' . $crlf; + '!ENDIF', $crlf, $crlf, + '!IF "$(CUSTOM_TARGETS)" == ""', $crlf, + 'CUSTOM_TARGETS=_EMPTY_TARGET_', $crlf, + '!ENDIF', $crlf; ## Print out the "all" target print $fh $crlf . 'ALL:'; @@ -134,7 +143,7 @@ sub write_comps { print $fh $crlf; ## Print out all other targets here - foreach my $target ('DEPEND', 'CLEAN', 'REALCLEAN') { + foreach my $target (@targets) { print $fh $crlf . $target . ':' . $crlf; $self->write_project_targets($fh, 'CFG="$(CFG)" ' . $target, \@list); diff --git a/templates/nmake.mpd b/templates/nmake.mpd index 75a5296a..0621773a 100644 --- a/templates/nmake.mpd +++ b/templates/nmake.mpd @@ -1,4 +1,5 @@ # Microsoft Developer Studio Generated NMAKE File +<%marker(top)%> <%foreach(platforms)%> !<%fornotfirst("ELSE")%>IF "$(CFG)" == "" CFG=<%platform%> <%default_configuration%> @@ -207,6 +208,7 @@ LINK32_OBJS= \ !ENDIF !ENDIF +<%marker(macros)%> !IF <%foreach(platforms)%><%foreach(configurations)%>"$(CFG)" == "<%platform%> <%configuration%>" <%fornotlast("|| ")%><%endfor%><%endfor%> <%if(pch_source)%> <%if(pch_header)%> @@ -302,6 +304,8 @@ SOURCE=<%resource_file%> <%endfor%> <%endif%> +<%marker(local)%> !ENDIF +<%marker(bottom)%> |