summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2006-03-15 18:48:14 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2006-03-15 18:48:14 +0000
commit55d597732b7da4bb2b326ef1f83f4d773d97bbfe (patch)
treee34e6a96a7ccebdd61c83b0018558292b85948ac
parent24db7006f6250f1d14a6cc720e8cf6609257d11f (diff)
downloadMPC-55d597732b7da4bb2b326ef1f83f4d773d97bbfe.tar.gz
ChangeLogTag: Wed Mar 15 18:44:03 UTC 2006 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog36
-rw-r--r--README5
-rwxr-xr-xgenerate_export_header.pl7
-rw-r--r--modules/AutomakeWorkspaceCreator.pm22
-rw-r--r--modules/MakeProjectCreator.pm15
-rw-r--r--modules/ProjectCreator.pm13
-rw-r--r--modules/TemplateParser.pm8
-rw-r--r--templates/automake.mpd13
-rw-r--r--templates/bmake.mpd4
-rw-r--r--templates/em3.mpd12
-rw-r--r--templates/ghs.mpd6
-rw-r--r--templates/make.mpd2
-rw-r--r--templates/makedll.mpt8
-rw-r--r--templates/nmake.mpd2
-rw-r--r--templates/vc6.mpd12
-rw-r--r--templates/vc7.mpd42
-rw-r--r--templates/vc8.mpd53
17 files changed, 236 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index bc642ad5..5d1ccb01 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,39 @@
+Wed Mar 15 18:44:03 UTC 2006 Chad Elliott <elliott_c@ociweb.com>
+
+ * generate_export_header.pl:
+
+ Print an error if the script is unable to write to the output
+ file.
+
+ * modules/MakeProjectCreator.pm:
+ * templates/makedll.mpt:
+
+ Moved the default 'compilers' setting from the mpt to the perl
+ module to allow the default compiler to change based on the
+ language setting. Currently, the default is 'java' if the
+ language is set to java otherwise it is set to 'gcc' as it was
+ previously.
+
+ * README:
+ * modules/AutomakeWorkspaceCreator.pm:
+ * modules/ProjectCreator.pm:
+ * modules/TemplateParser.pm:
+ * templates/automake.mpd:
+ * templates/bmake.mpd:
+ * templates/em3.mpd:
+ * templates/ghs.mpd:
+ * templates/make.mpd:
+ * templates/nmake.mpd:
+ * templates/vc6.mpd:
+ * templates/vc7.mpd:
+ * templates/vc8.mpd:
+
+ Implemented a new project keyword that can only be used within the
+ scope of Source_Files. The 'buildflags' setting can be used to
+ specify additional build flags as source files are being compiled.
+ This can be used to build a particular subset of source files with
+ different compiler options.
+
Tue Mar 14 14:19:03 2006 Steve Huston <shuston@riverace.com>
* templates/vc8platforms.mpt: For WinCE 4-based platforms, add
diff --git a/README b/README
index 264ddd8d..1df4b39c 100644
--- a/README
+++ b/README
@@ -150,6 +150,10 @@ Project Keywords
exename Specifies the name of the executable that will be created
sharedname Specifies the name of the shared library that will be created
staticname Specifies the name of the static library that will be created
+buildflags This keyword can only be used as a source component scoped
+ setting (ie. inside the scope of Source_Files). It
+ specifies additional build flags that will be passed to the
+ compiler as the source files are being compiled.
dllout If defined, specifies where the dynamic libraries will be
placed. This overrides libout in the dynamic case.
libout Specifies where the dynamic and static libraries will be placed
@@ -178,7 +182,6 @@ postbuild If this is defined in the project, the value will be
<%quote%> - Project non-specific double quote.
prebuild This is similar to postbuild except that it will be
performed before the build instead of after.
-
recurse If set to 1, MPC will recurse into directories listed under
component listings and add any component corresponding files
to the list. This keyword can be used as a global project
diff --git a/generate_export_header.pl b/generate_export_header.pl
index f6e8d6cd..9fd7545a 100755
--- a/generate_export_header.pl
+++ b/generate_export_header.pl
@@ -32,6 +32,7 @@ sub generate_export_header {
my($name) = shift;
my($output) = shift;
my($fh) = new FileHandle();
+ my($status) = 0;
if (open($fh, ">$output")) {
$name = uc($name);
@@ -79,6 +80,12 @@ EOM
close($fh);
print "Output written to $output\n";
}
+ else {
+ print STDERR "ERROR: Unable to write to $output\n";
+ ++$status;
+ }
+
+ return $status;
}
sub usageAndExit {
diff --git a/modules/AutomakeWorkspaceCreator.pm b/modules/AutomakeWorkspaceCreator.pm
index f1c9bf6e..6ba3e66e 100644
--- a/modules/AutomakeWorkspaceCreator.pm
+++ b/modules/AutomakeWorkspaceCreator.pm
@@ -216,7 +216,7 @@ sub write_comps {
$in_condition--;
}
- if ( /(^[a-zA-Z][a-zA-Z0-9_]*_(PROGRAMS|LIBRARIES|LTLIBRARIES|LISP|PYTHON|JAVA|SCRIPTS|DATA|SOURCES|HEADERS|MANS|TEXINFOS))\s*\+=\s*/
+ if ( /(^[a-zA-Z][a-zA-Z0-9_]*_(PROGRAMS|LIBRARIES|LTLIBRARIES|LISP|PYTHON|JAVA|SCRIPTS|DATA|SOURCES|HEADERS|MANS|TEXINFOS|LIBADD|LDADD))\s*\+=\s*/
|| /(^CLEANFILES)\s*\+=\s*/
|| /(^EXTRA_DIST)\s*\+=\s*/
) {
@@ -325,6 +325,7 @@ sub write_comps {
print $fh "## $local", $crlf;
my($look_for_libs) = 0;
+ my($prev_line) = undef;
while (<$pfh>) {
# Don't emit comments
@@ -345,7 +346,7 @@ sub write_comps {
}
}
- if ( /(^[a-zA-Z][a-zA-Z0-9_]*_(PROGRAMS|LIBRARIES|LTLIBRARIES|LISP|PYTHON|JAVA|SCRIPTS|DATA|SOURCES|HEADERS|MANS|TEXINFOS))\s*\+=\s*/
+ if ( /(^[a-zA-Z][a-zA-Z0-9_]*_(PROGRAMS|LIBRARIES|LTLIBRARIES|LISP|PYTHON|JAVA|SCRIPTS|DATA|SOURCES|HEADERS|MANS|TEXINFOS|LIBADD|LDADD))\s*\+=\s*/
|| /(^CLEANFILES)\s*\+=\s*/
|| /(^EXTRA_DIST)\s*\+=\s*/
) {
@@ -391,7 +392,22 @@ sub write_comps {
$look_for_libs = 1;
}
- print $fh $_;
+ ## I have introduced a one line delay so that I can simplify
+ ## the automake template. If our current line is empty, then
+ ## we will remove the trailing backslash before printing the
+ ## previous line. Automake is horribly unforgiving so we must
+ ## avoid this situation at all cost.
+ if (defined $prev_line) {
+ $prev_line =~ s/\s*\\$// if ($_ =~ /^\s*$/);
+ print $fh $prev_line;
+ }
+ $prev_line = $_;
+ }
+ ## The one line delay requires that we print out the previous
+ ## line (if there was one) when we reach the end of the file.
+ if (defined $prev_line) {
+ $prev_line =~ s/\s*\\$//;
+ print $fh $prev_line;
}
close($pfh);
diff --git a/modules/MakeProjectCreator.pm b/modules/MakeProjectCreator.pm
index 5d91689c..a959cd2d 100644
--- a/modules/MakeProjectCreator.pm
+++ b/modules/MakeProjectCreator.pm
@@ -40,4 +40,19 @@ sub get_dll_template_input_file {
}
+sub fill_value {
+ my($self) = shift;
+ my($name) = shift;
+
+ if ($name eq 'compilers') {
+ if ($self->get_language() eq 'java') {
+ return 'java';
+ }
+ else {
+ return 'gcc';
+ }
+ }
+
+ return undef;
+}
1;
diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm
index 3642c256..3279938b 100644
--- a/modules/ProjectCreator.pm
+++ b/modules/ProjectCreator.pm
@@ -123,6 +123,11 @@ my(%custom) = ('command' => 1,
my(@default_matching_assignments) = ('recurse',
);
+## These matching assingment arrays will get added, but only to the
+## specific project component types.
+my(%default_matching_assignments) = ('source_files' => ['buildflags'],
+ );
+
## Deal with these components in a special way
my(%specialComponents) = ('header_files' => 1,
'inline_files' => 1,
@@ -207,7 +212,7 @@ my(%vbma) = ('source_files' => [ 'subtype' ],
# 4 The language uses a C preprocessor
my(%language) = ('cplusplus' => [ \%cppvc, \%cppec, {} , 'main', 1 ],
'csharp' => [ \%csvc, {}, \%csma, 'Main', 0 ],
- 'java' => [ \%jvc, {}, {} , 'Main', 0 ],
+ 'java' => [ \%jvc, {}, {} , 'main', 0 ],
'vb' => [ \%vbvc, {}, \%vbma, 'Main', 0 ],
);
@@ -4086,7 +4091,11 @@ sub add_default_matching_assignments {
if (defined $lang) {
foreach my $key (keys %{$language{$lang}->[0]}) {
if (!defined $language{$lang}->[2]->{$key}) {
- $language{$lang}->[2]->{$key} = [];
+ $language{$lang}->[2]->{$key} = [];
+ if (defined $default_matching_assignments{$key}) {
+ push(@{$language{$lang}->[2]->{$key}},
+ @{$default_matching_assignments{$key}});
+ }
foreach my $keyword (@default_matching_assignments) {
push(@{$language{$lang}->[2]->{$key}}, $keyword);
}
diff --git a/modules/TemplateParser.pm b/modules/TemplateParser.pm
index 6f449276..c594f6fa 100644
--- a/modules/TemplateParser.pm
+++ b/modules/TemplateParser.pm
@@ -633,6 +633,9 @@ sub get_flag_overrides {
$name = $ct;
}
}
+ elsif ($name =~ /^grouped_(.*_file)\->/) {
+ $name = $1;
+ }
my($key) = (defined $$fo{$name} ? $name :
(defined $$fo{$name . 's'} ? $name . 's' : undef));
@@ -1120,9 +1123,8 @@ sub handle_foreach {
## with variables that can be used with the -> operator
if (defined $vname) {
foreach my $ref (keys %arrow_op_ref) {
- my($arrow_re) = $ref;
my($name_re) = $ref . 's';
- if ($val =~ /^$arrow_re\->/ || $val =~ /^$name_re$/) {
+ if ($val =~ /^$ref\->/ || $val =~ /^$name_re$/) {
$status = 0;
$errorString = 'The foreach variable can not be ' .
'named when dealing with ' .
@@ -1616,7 +1618,7 @@ sub parse_line {
## contains a keyword, then we do
## not need to add a newline to the end.
if (!$self->{'eval'} && $self->{'foreach'}->{'processing'} == 0 &&
- ($line !~ /^[ ]*<%(\w+)(\(((\w+\s*,\s*)?\w+\(.+\)|[^\)]+)\))?%>$/ ||
+ ($line !~ /^[ ]*<%(\w+)(\(((\w+\s*,\s*)?[!]?\w+\(.+\)|[^\)]+)\))?%>$/ ||
!defined $keywords{$1})) {
$line .= $self->{'crlf'};
}
diff --git a/templates/automake.mpd b/templates/automake.mpd
index c1bf0810..fe632326 100644
--- a/templates/automake.mpd
+++ b/templates/automake.mpd
@@ -115,7 +115,9 @@ lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normal
lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la_SOURCES = \
<%endif%>
<%foreach(source_file, sort(source_files))%>
- <%source_file%><%if(exename)%><%if(header_files || inline_files)%> \<%else%><%fornotlast(" \\")%><%endif%><%else%><%fornotlast(" \\")%><%endif%>
+<%if(!flag_overrides(source_file, buildflags))%>
+ <%source_file%> \
+<%endif%>
<%endfor%>
<%if(exename)%>
<%foreach(header_file, sort(header_files inline_files))%>
@@ -198,6 +200,15 @@ CLEANFILES += \
${top_builddir}/config.status --file "$@":${srcdir}/<%pkgconfig_file%>
<%endfor%>
<%endif%>
+<%foreach(sort(source_files))%>
+<%if(flag_overrides(source_file, buildflags))%>
+
+<%if(exename)%><%normalize(exename)%>_LDADD<%else%>lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la_LIBADD<%endif%> += lib<%normalize(source_file)%>_convenience<%forcount%>.la
+noinst_LTLIBRARIES += lib<%normalize(source_file)%>_convenience<%forcount%>.la
+lib<%normalize(source_file)%>_convenience<%forcount%>_la_SOURCES = <%source_file%>
+lib<%normalize(source_file)%>_convenience<%forcount%>_la_CPPFLAGS = $(<%if(exename)%><%normalize(exename)%><%else%>lib<%libname_prefix%><%if(sharedname)%><%normalize(sharedname)%><%else%><%normalize(staticname)%><%endif%>_la<%endif%>_CPPFLAGS) <%flag_overrides(source_file, buildflags)%>
+<%endif%>
+<%endfor%>
<%if(postbuild)%>
all: __postbuild__
diff --git a/templates/bmake.mpd b/templates/bmake.mpd
index 8fa9eebb..9ba064f4 100644
--- a/templates/bmake.mpd
+++ b/templates/bmake.mpd
@@ -288,10 +288,10 @@ generated: $(GENERATED_DIRTY)
$(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) $<
<%foreach(source_files)%>
-<%if(transdir(source_file))%>
+<%if(transdir(source_file) || flag_overrides(source_file, buildflags))%>
"$(INTERMEDIATE)\<%transdir(source_file)%><%basenoextension(source_file)%>$(OBJ_EXT)":
@if not exist "$(INTERMEDIATE)\<%transdir(source_file)%>" mkdir "$(INTERMEDIATE)\<%transdir(source_file)%>"
- $(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) <%source_file%>
+ $(CC) <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>$(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) <%source_file%>
<%endif%>
<%endfor%>
diff --git a/templates/em3.mpd b/templates/em3.mpd
index d26819d3..e38f9807 100644
--- a/templates/em3.mpd
+++ b/templates/em3.mpd
@@ -123,10 +123,14 @@ SOURCE="<%grouped_source_file->file%>"
<%foreach(platforms)%>
<%foreach(configurations)%>
!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%project_name%> - <%operating_system%> (<%platform%>) <%configuration%>"
-# ADD CPP /Fo"<%intermediate_dir%>\<%noextension(project_file)%>\<%machine%>\<%basenoextension(grouped_source_file->file)%><%duplicate_index(grouped_source_file->file)%>.obj"
+# ADD CPP <%if(flag_overrides(grouped_source_file->file, buildflags))%><%flag_overrides(grouped_source_file->file, buildflags)%> <%endif%>/Fo"<%intermediate_dir%>\<%noextension(project_file)%>\<%machine%>\<%basenoextension(grouped_source_file->file)%><%duplicate_index(grouped_source_file->file)%>.obj"
<%endfor%>
!ENDIF
<%endfor%>
+<%else%>
+<%if(flag_overrides(grouped_source_file->file, buildflags))%>
+# ADD CPP <%flag_overrides(grouped_source_file->file, buildflags)%>
+<%endif%>
<%endif%>
# End Source File
<%endfor%>
@@ -141,10 +145,14 @@ SOURCE="<%source_file%>"
<%foreach(platforms)%>
<%foreach(configurations)%>
!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%project_name%> - <%operating_system%> (<%platform%>) <%configuration%>"
-# ADD CPP /Fo"<%intermediate_dir%>\<%noextension(project_file)%>\<%machine%>\<%basenoextension(source_file)%><%duplicate_index(source_file)%>.obj"
+# ADD CPP <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>/Fo"<%intermediate_dir%>\<%noextension(project_file)%>\<%machine%>\<%basenoextension(source_file)%><%duplicate_index(source_file)%>.obj"
<%endfor%>
!ENDIF
<%endfor%>
+<%else%>
+<%if(flag_overrides(source_file, buildflags))%>
+# ADD CPP <%flag_overrides(source_file, buildflags)%>
+<%endif%>
<%endif%>
# End Source File
<%endfor%>
diff --git a/templates/ghs.mpd b/templates/ghs.mpd
index 1fe43987..f28a53ef 100644
--- a/templates/ghs.mpd
+++ b/templates/ghs.mpd
@@ -108,7 +108,11 @@ default:
<%source_file%>
C++
<%if(compile_flags)%>
- :cxx_compiler.args=<%compile_flags%>
+ :cxx_compiler.args=<%compile_flags%><%if(flag_overrides(source_file, buildflags))%> <%flag_overrides(source_file, buildflags)%><%endif%>
+<%else%>
+<%if(flag_overrides(source_file, buildflags))%>
+ :cxx_compiler.args=<%flag_overrides(source_file, buildflags)%>
+<%endif%>
<%endif%>
<%endfor%>
<%foreach(header_files)%>
diff --git a/templates/make.mpd b/templates/make.mpd
index 86388bd8..c027bf8d 100644
--- a/templates/make.mpd
+++ b/templates/make.mpd
@@ -237,7 +237,7 @@ $(TEMPINCDIR):
<%if(targetoutdir)%>
@$(MKDIR) <%targetoutdir%><%dirname(source_file)%>
<%endif%>
- $(COMPILE.cc) <%if(pchuse && pch_source && pchsupport)%><%pchuse%><%pch_header%><%pchext%> <%if(pchstop)%><%pchstop%><%pch_header%><%endif%><%endif%>$(EXPORTFLAGS) $(OUTPUT_OPTION) <%source_file%>
+ $(COMPILE.cc) <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%><%if(pchuse && pch_source && pchsupport)%><%pchuse%><%pch_header%><%pchext%> <%if(pchstop)%><%pchstop%><%pch_header%><%endif%><%endif%>$(EXPORTFLAGS) $(OUTPUT_OPTION) <%source_file%>
<%endfor%>
<%if(resource_files)%>
diff --git a/templates/makedll.mpt b/templates/makedll.mpt
index 0f0d0f60..f342b8c7 100644
--- a/templates/makedll.mpt
+++ b/templates/makedll.mpt
@@ -2,8 +2,9 @@
// $Id$
// ***********************************************************************
-// The default compiler for the 'make' project type is gcc. This
-// is controlled by the compilers template variable. It may be
+// The default compiler for the 'make' project type is gcc (provided by
+// the fill_value() method in MakeProjectCreator.pm). This can be
+// controlled by setting the compilers template variable. It may be
// changed on the MPC command line via the -value_template option.
// Additionally, each compiler has a default platform. The default
// platform for gcc is linux. This too can be changed via the
@@ -21,7 +22,6 @@ conditional_include "common"
conditional_include "unixcommon"
configurations = Release
-compilers = gcc
obj_ext = .o
res_ext = .res
compile_flags =
@@ -54,7 +54,7 @@ Release {
java {
cxx = javac
- ld = echo
+ ld = :
obj_ext = .class
output_option =
compile_option =
diff --git a/templates/nmake.mpd b/templates/nmake.mpd
index 5f79da5b..10993468 100644
--- a/templates/nmake.mpd
+++ b/templates/nmake.mpd
@@ -256,7 +256,7 @@ SOURCE="<%source_file%>"
<%if(transdir(source_file))%>
@if not exist "$(INTDIR)\<%transdir(source_file)%>$(NULL)" mkdir "$(INTDIR)\<%transdir(source_file)%>"
<%endif%>
- $(CPP) $(CPP_COMMON) /Fo"$(INTDIR)\<%transdir(source_file)%><%basenoextension(source_file)%>.obj" $(SOURCE)
+ $(CPP) <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>$(CPP_COMMON) /Fo"$(INTDIR)\<%transdir(source_file)%><%basenoextension(source_file)%>.obj" $(SOURCE)
<%endfor%>
<%endif%>
diff --git a/templates/vc6.mpd b/templates/vc6.mpd
index e706fed6..1252631e 100644
--- a/templates/vc6.mpd
+++ b/templates/vc6.mpd
@@ -113,9 +113,13 @@ SOURCE="<%grouped_source_file->file%>"
<%if(duplicate_index(grouped_source_file->file))%>
<%foreach(configurations)%>
!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%project_name%> - <%platform%> <%configuration%>"
-# ADD CPP /Fo"<%intermediate_dir%>\<%noextension(project_file)%>\<%basenoextension(grouped_source_file->file)%><%duplicate_index(grouped_source_file->file)%>.obj"
+# ADD CPP <%if(flag_overrides(grouped_source_file->file, buildflags))%><%flag_overrides(grouped_source_file->file, buildflags)%> <%endif%>/Fo"<%intermediate_dir%>\<%noextension(project_file)%>\<%basenoextension(grouped_source_file->file)%><%duplicate_index(grouped_source_file->file)%>.obj"
<%endfor%>
!ENDIF
+<%else%>
+<%if(flag_overrides(grouped_source_file->file, buildflags))%>
+# ADD CPP <%flag_overrides(grouped_source_file->file, buildflags)%>
+<%endif%>
<%endif%>
# End Source File
<%endfor%>
@@ -129,9 +133,13 @@ SOURCE="<%source_file%>"
<%if(duplicate_index(source_file))%>
<%foreach(configurations)%>
!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%project_name%> - <%platform%> <%configuration%>"
-# ADD CPP /Fo"<%intermediate_dir%>\<%noextension(project_file)%>\<%basenoextension(source_file)%><%duplicate_index(source_file)%>.obj"
+# ADD CPP <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>/Fo"<%intermediate_dir%>\<%noextension(project_file)%>\<%basenoextension(source_file)%><%duplicate_index(source_file)%>.obj"
<%endfor%>
!ENDIF
+<%else%>
+<%if(flag_overrides(source_file, buildflags))%>
+# ADD CPP <%flag_overrides(source_file, buildflags)%>
+<%endif%>
<%endif%>
# End Source File
<%endfor%>
diff --git a/templates/vc7.mpd b/templates/vc7.mpd
index c1ae070d..f3e7009b 100644
--- a/templates/vc7.mpd
+++ b/templates/vc7.mpd
@@ -218,9 +218,23 @@
Name="<%configuration%>|<%platform%>">
<Tool
Name="VCCLCompilerTool"
+<%if(flag_overrides(grouped_source_file->file, buildflags))%>
+ AdditionalOptions="<%flag_overrides(grouped_source_file->file, buildflags)%>"
+<%endif%>
ObjectFile="$(IntDir)\$(InputName)<%duplicate_index(grouped_source_file->file)%>.obj"/>
</FileConfiguration>
<%endfor%>
+<%else%>
+<%if(flag_overrides(grouped_source_file->file, buildflags))%>
+<%foreach(configurations)%>
+ <FileConfiguration
+ Name="<%configuration%>|<%platform%>">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="<%flag_overrides(grouped_source_file->file, buildflags)%>"/>
+ </FileConfiguration>
+<%endfor%>
+<%endif%>
<%endif%>
</File>
<%endfor%>
@@ -237,9 +251,23 @@
Name="<%configuration%>|<%platform%>">
<Tool
Name="VCCLCompilerTool"
+<%if(flag_overrides(grouped_source_file->file, buildflags))%>
+ AdditionalOptions="<%flag_overrides(grouped_source_file->file, buildflags)%>"
+<%endif%>
ObjectFile="$(IntDir)\$(InputName)<%duplicate_index(grouped_source_file->file)%>.obj"/>
</FileConfiguration>
<%endfor%>
+<%else%>
+<%if(flag_overrides(grouped_source_file->file, buildflags))%>
+<%foreach(configurations)%>
+ <FileConfiguration
+ Name="<%configuration%>|<%platform%>">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="<%flag_overrides(grouped_source_file->file, buildflags)%>"/>
+ </FileConfiguration>
+<%endfor%>
+<%endif%>
<%endif%>
</File>
<%endfor%>
@@ -256,9 +284,23 @@
Name="<%configuration%>|<%platform%>">
<Tool
Name="VCCLCompilerTool"
+<%if(flag_overrides(source_file, buildflags))%>
+ AdditionalOptions="<%flag_overrides(source_file, buildflags)%>"
+<%endif%>
ObjectFile="$(IntDir)\$(InputName)<%duplicate_index(source_file)%>.obj"/>
</FileConfiguration>
<%endfor%>
+<%else%>
+<%if(flag_overrides(source_file, buildflags))%>
+<%foreach(configurations)%>
+ <FileConfiguration
+ Name="<%configuration%>|<%platform%>">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="<%flag_overrides(source_file, buildflags)%>"/>
+ </FileConfiguration>
+<%endfor%>
+<%endif%>
<%endif%>
</File>
<%endfor%>
diff --git a/templates/vc8.mpd b/templates/vc8.mpd
index 441a5e0c..f602e029 100644
--- a/templates/vc8.mpd
+++ b/templates/vc8.mpd
@@ -33,6 +33,9 @@
ConfigurationType="<%ConfigurationType%>"
<%endif%>
<%endif%>
+<%if(UseOfATL)%>
+ UseOfATL="<%UseOfATL%>"
+<%endif%>
<%if(UseOfMFC)%>
UseOfMFC="<%UseOfMFC%>"
<%endif%>
@@ -526,10 +529,26 @@
Name="<%configuration%>|<%platform%>">
<Tool
Name="VCCLCompilerTool"
+<%if(flag_overrides(grouped_source_file->file, buildflags))%>
+ AdditionalOptions="<%flag_overrides(grouped_source_file->file, buildflags)%>"
+<%endif%>
ObjectFile="$(IntDir)\$(InputName)<%duplicate_index(grouped_source_file->file)%>.obj"/>
</FileConfiguration>
<%endfor%>
<%endfor%>
+<%else%>
+<%if(flag_overrides(grouped_source_file->file, buildflags))%>
+<%foreach(platforms)%>
+<%foreach(configurations)%>
+ <FileConfiguration
+ Name="<%configuration%>|<%platform%>">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="<%flag_overrides(grouped_source_file->file, buildflags)%>"/>
+ </FileConfiguration>
+<%endfor%>
+<%endfor%>
+<%endif%>
<%endif%>
</File>
<%endfor%>
@@ -547,10 +566,26 @@
Name="<%configuration%>|<%platform%>">
<Tool
Name="VCCLCompilerTool"
+<%if(flag_overrides(grouped_source_file->file, buildflags))%>
+ AdditionalOptions="<%flag_overrides(grouped_source_file->file, buildflags)%>"
+<%endif%>
ObjectFile="$(IntDir)\$(InputName)<%duplicate_index(grouped_source_file->file)%>.obj"/>
</FileConfiguration>
<%endfor%>
<%endfor%>
+<%else%>
+<%if(flag_overrides(grouped_source_file->file, buildflags))%>
+<%foreach(platforms)%>
+<%foreach(configurations)%>
+ <FileConfiguration
+ Name="<%configuration%>|<%platform%>">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="<%flag_overrides(grouped_source_file->file, buildflags)%>"/>
+ </FileConfiguration>
+<%endfor%>
+<%endfor%>
+<%endif%>
<%endif%>
</File>
<%endfor%>
@@ -568,11 +603,27 @@
Name="<%configuration%>|<%platform%>">
<Tool
Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)\$(InputName)<%duplicate_index(source_file)%>.obj"/>
+<%if(flag_overrides(source_file, buildflags))%>
+ AdditionalOptions="<%flag_overrides(source_file, buildflags)%>"
+<%endif%>
+ ObjectFile="$(IntDir)\$(InputName)<%duplicate_index(source_file)%>.obj"/>
+ </FileConfiguration>
+<%endfor%>
+<%endfor%>
+<%else%>
+<%if(flag_overrides(source_file, buildflags))%>
+<%foreach(platforms)%>
+<%foreach(configurations)%>
+ <FileConfiguration
+ Name="<%configuration%>|<%platform%>">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="<%flag_overrides(source_file, buildflags)%>"/>
</FileConfiguration>
<%endfor%>
<%endfor%>
<%endif%>
+<%endif%>
</File>
<%endfor%>
<%endif%>