From: Filip Navara Date: Mon, 21 Nov 2005 20:46:55 +0000 (+0000) Subject: Generate .dsp files with matching !IF/!ELSEIF and !ENDIF directives to make NMAKE... X-Git-Tag: backups/ros-branch-0_2_9@19949~507 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=d3b6316e84009caf08d6c531c57034bba2e058c6 Generate .dsp files with matching !IF/!ELSEIF and !ENDIF directives to make NMAKE accept them. svn path=/trunk/; revision=19421 --- diff --git a/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp b/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp index 0b359b0247a..87cbc46ab58 100644 --- a/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp +++ b/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp @@ -261,25 +261,20 @@ MSVCBackend::_generate_dsp ( const Module& module ) if ( !lib && !exe ) fprintf ( OUT, "MTL=midl.exe\r\n" ); fprintf ( OUT, "RSC=rc.exe\r\n" ); - int n = 0; - std::string output_dir; for ( size_t icfg = 0; icfg < cfgs.size(); icfg++ ) { std::string& cfg = cfgs[icfg]; - if ( icfg ) + if ( icfg == 0 ) { - if ( n == 0 ) - { - fprintf ( OUT, "!IF \"$(CFG)\" == \"%s\"\r\n", cfg.c_str() ); - fprintf ( OUT, "\r\n" ); - } - else - { - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "!ELSEIF \"$(CFG)\" == \"%s\"\r\n", cfg.c_str() ); - fprintf ( OUT, "\r\n" ); - } + fprintf ( OUT, "!IF \"$(CFG)\" == \"%s\"\r\n", cfg.c_str() ); + fprintf ( OUT, "\r\n" ); + } + else + { + fprintf ( OUT, "\r\n" ); + fprintf ( OUT, "!ELSEIF \"$(CFG)\" == \"%s\"\r\n", cfg.c_str() ); + fprintf ( OUT, "\r\n" ); } bool debug = !strstr ( cfg.c_str(), "Release" ); @@ -569,8 +564,6 @@ MSVCBackend::_generate_dsp ( const Module& module ) fprintf ( OUT, "# ADD BASE LIB32 /nologo\r\n" ); fprintf ( OUT, "# ADD LIB32 /nologo\r\n" ); } - - n++; } if ( cfgs.size() != 0 )