From dd25d44880063f2dcd54265f68010eb9a485d466 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Tue, 12 Feb 2008 12:18:23 +0000 Subject: [PATCH] - pass the correct path to _strip_gcc_deffile - automatically create directories for converted def files - fixes auto-def file generation svn path=/trunk/; revision=32320 --- reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp b/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp index 9b75601b308..79295a40d3d 100644 --- a/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp +++ b/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp @@ -272,7 +272,7 @@ MSVCBackend::_generate_vcproj ( const Module& module ) // don't do the work m_configurations.size() times if (module.importLibrary != NULL) { - intermediatedir = intdir + "\\" + module.output->relative_path + vcdir; + intermediatedir = module.output->relative_path + vcdir; importLib = _strip_gcc_deffile(module.importLibrary->source->name, module.importLibrary->source->relative_path, intermediatedir); } @@ -848,12 +848,15 @@ MSVCBackend::_generate_vcproj ( const Module& module ) std::string MSVCBackend::_strip_gcc_deffile(std::string Filename, std::string sourcedir, std::string objdir) { - std::string NewFilename = objdir + "\\" + Filename; + std::string NewFilename = Environment::GetIntermediatePath () + "\\" + objdir + "\\" + Filename; // we don't like infinite loops - so replace it in two steps NewFilename = _replace_str(NewFilename, ".def", "_msvc.de"); NewFilename = _replace_str(NewFilename, "_msvc.de", "_msvc.def"); Filename = sourcedir + "\\" + Filename; + Directory dir(objdir); + dir.GenerateTree(IntermediateDirectory, false); + std::fstream in_file(Filename.c_str(), std::ios::in); std::fstream out_file(NewFilename.c_str(), std::ios::out); std::string::size_type pos;