msvcmaker: Tweak the .dsp formatting to better match Visual Studio.

This commit is contained in:
Francois Gouget 2006-12-06 12:00:14 +01:00 committed by Alexandre Julliard
parent 72d5c0ddca
commit f1698c4b0c
1 changed files with 10 additions and 7 deletions

View File

@ -519,6 +519,7 @@ sub _generate_dsp($$) {
print OUT "CPP=cl.exe\r\n"; print OUT "CPP=cl.exe\r\n";
print OUT "MTL=midl.exe\r\n" if !$lib && !$exe; print OUT "MTL=midl.exe\r\n" if !$lib && !$exe;
print OUT "RSC=rc.exe\r\n"; print OUT "RSC=rc.exe\r\n";
print OUT "\r\n";
my $n = 0; my $n = 0;
@ -591,12 +592,15 @@ sub _generate_dsp($$) {
} }
foreach my $define (@defines) { foreach my $define (@defines) {
if ($define !~ /=/) {
print OUT " /D \"$define\""; print OUT " /D \"$define\"";
} else {
print OUT " /D $define";
}
} }
print OUT " /YX" if $lib || $exe; print OUT " /YX" if $lib || $exe;
print OUT " /FD"; print OUT " /FD";
print OUT " /GZ" if $debug; print OUT " /GZ" if $debug;
print OUT " " if $debug && ($lib || $exe);
print OUT " /c"; print OUT " /c";
print OUT "\r\n"; print OUT "\r\n";
@ -647,7 +651,7 @@ sub _generate_dsp($$) {
} }
foreach my $define (@defines2) { foreach my $define (@defines2) {
if ($define !~ /[\\\"]/) { if ($define !~ /=/) {
print OUT " /D \"$define\""; print OUT " /D \"$define\"";
} else { } else {
print OUT " /D $define"; print OUT " /D $define";
@ -660,7 +664,6 @@ sub _generate_dsp($$) {
print OUT " /FR" if !$lib; print OUT " /FR" if !$lib;
print OUT " /FD"; print OUT " /FD";
print OUT " /GZ" if $debug; print OUT " /GZ" if $debug;
print OUT " " if $debug && $lib;
print OUT " /c"; print OUT " /c";
print OUT " /TP" if !$no_cpp; print OUT " /TP" if !$no_cpp;
print OUT "\r\n"; print OUT "\r\n";
@ -712,11 +715,11 @@ sub _generate_dsp($$) {
print OUT "\r\n"; print OUT "\r\n";
print OUT "# ADD LINK32"; print OUT "# ADD LINK32";
print OUT " /nologo";
print OUT " libcmt.lib" if $project =~ /^ntdll$/; # FIXME: Kludge print OUT " libcmt.lib" if $project =~ /^ntdll$/; # FIXME: Kludge
foreach my $import (@imports) { foreach my $import (@imports) {
print OUT " $import.lib" if ($import ne "msvcrt"); print OUT " $import.lib" if ($import ne "msvcrt");
} }
print OUT " /nologo";
print OUT " /dll" if $dll; print OUT " /dll" if $dll;
print OUT " /subsystem:console" if $console; print OUT " /subsystem:console" if $console;
print OUT " /debug" if $debug; print OUT " /debug" if $debug;