Author: gedmurphy Date: Tue Jan 26 10:30:52 2010 New Revision: 45258
URL: http://svn.reactos.org/svn/reactos?rev=45258&view=rev Log: Fix rbuild paths and try to improve the hardcoded mess by using the preprocessor instead
Modified: branches/Tree-restructure-test/sdk/tools/rbuild/backend/codeblocks/codeblocks.cpp branches/Tree-restructure-test/sdk/tools/rbuild/backend/mingw/mingw.cpp branches/Tree-restructure-test/sdk/tools/rbuild/rbuild.h branches/Tree-restructure-test/sdk/tools/rbuild/rbuild.vcproj branches/Tree-restructure-test/sdk/tools/rbuild/test.h
Modified: branches/Tree-restructure-test/sdk/tools/rbuild/backend/codeblocks/codeblocks.cpp URL: http://svn.reactos.org/svn/reactos/branches/Tree-restructure-test/sdk/tools/... ============================================================================== --- branches/Tree-restructure-test/sdk/tools/rbuild/backend/codeblocks/codeblocks.cpp [iso-8859-1] (original) +++ branches/Tree-restructure-test/sdk/tools/rbuild/backend/codeblocks/codeblocks.cpp [iso-8859-1] Tue Jan 26 10:30:52 2010 @@ -682,9 +682,9 @@ if ( dll ) { if (IsSpecDefinitionFile( module )) - fprintf ( OUT, "\t\t\t\t\t<Add before="%s%stools%swinebuild%swinebuild.exe -o %s --def -E %s.spec" />\r\n", outdir.c_str(), sSep, sSep, sSep, module.importLibrary->definition.c_str(), module.name.c_str()); + fprintf ( OUT, "\t\t\t\t\t<Add before="%s%s%swinebuild%swinebuild.exe -o %s --def -E %s.spec" />\r\n", outdir.c_str(), sSep, TOOLS_BASE, sSep, module.importLibrary->definition.c_str(), module.name.c_str()); fprintf ( OUT, "\t\t\t\t\t<Add before="dlltool --dllname %s --def %s --output-exp %s.temp.exp %s" />\r\n", module.GetTargetName ().c_str(), module.importLibrary->definition.c_str(), module.name.c_str(), module.mangledSymbols ? "" : "--kill-at" ); - fprintf ( OUT, "\t\t\t\t\t<Add after="%s%stools%spefixup $exe_output -exports" />\r\n", outdir.c_str(), sSep, sSep ); + fprintf ( OUT, "\t\t\t\t\t<Add after="%s%s%spefixup $exe_output -exports" />\r\n", outdir.c_str(), sSep, TOOLS_BASE); #ifdef WIN32 fprintf ( OUT, "\t\t\t\t\t<Add after="cmd /c del %s.temp.exp 2>NUL" />\r\n", module.name.c_str() ); #else @@ -760,13 +760,13 @@ else if ( extension == ".idl" || extension == ".IDL" ) { fprintf ( OUT, "\t\t\t<Option compile="1" />\r\n" ); - fprintf ( OUT, "\t\t\t<Option compiler="gcc" use="1" buildCommand="%s%stools%swidl%swidl.exe %s %s -h -H "$(TARGET_OUTPUT_DIR)$filetitle_c.h" -c -C "$(TARGET_OUTPUT_DIR)$filetitle_c.c" $file%sngcc %s -c "$(TARGET_OUTPUT_DIR)$filetitle_c.c" -o "$(TARGET_OUTPUT_DIR)$file_c.o"" />\r\n", outdir.c_str(), sSep.c_str(), sSep.c_str(), sSep.c_str(), widl_options.c_str(), windres_defines.c_str(), sSep.c_str(), widl_options.c_str() ); + fprintf ( OUT, "\t\t\t<Option compiler="gcc" use="1" buildCommand="%s%s%swidl%swidl.exe %s %s -h -H "$(TARGET_OUTPUT_DIR)$filetitle_c.h" -c -C "$(TARGET_OUTPUT_DIR)$filetitle_c.c" $file%sngcc %s -c "$(TARGET_OUTPUT_DIR)$filetitle_c.c" -o "$(TARGET_OUTPUT_DIR)$file_c.o"" />\r\n", outdir.c_str(), sSep.c_str(), TOOLS_BASE, sSep.c_str(), widl_options.c_str(), windres_defines.c_str(), sSep.c_str(), widl_options.c_str() ); } else if ( extension == ".spec" || extension == ".SPEC" ) { fprintf ( OUT, "\t\t\t<Option compile="1" />\r\n" ); fprintf ( OUT, "\t\t\t<Option link="1" />\r\n" ); - fprintf ( OUT, "\t\t\t<Option compiler="gcc" use="1" buildCommand="%s%stools%swinebuild%swinebuild.exe -o $file.stubs.c --pedll $file\n$compiler -c $options $includes $file.stubs.c -o $(TARGET_OBJECT_DIR)%s$file.o" />\r\n", outdir.c_str(), sSep.c_str(), sSep.c_str(), sSep.c_str(), sSep.c_str() ); + fprintf ( OUT, "\t\t\t<Option compiler="gcc" use="1" buildCommand="%s%s%swinebuild%swinebuild.exe -o $file.stubs.c --pedll $file\n$compiler -c $options $includes $file.stubs.c -o $(TARGET_OBJECT_DIR)%s$file.o" />\r\n", outdir.c_str(), sSep.c_str(), TOOLS_BASE, sSep.c_str(), sSep.c_str() ); }
for ( size_t icfg = 0; icfg < m_configurations.size(); icfg++ ) @@ -784,7 +784,9 @@ fprintf ( OUT, "\t\t<Unit filename="%s">\r\n", resource_file.c_str() ); fprintf ( OUT, "\t\t\t<Option compilerVar="WINDRES" />\r\n" ); string extension = GetExtension ( resource_file ); - fprintf ( OUT, "\t\t\t<Option compiler="gcc" use="1" buildCommand="gcc -xc -E -DRC_INVOKED $includes %s $file -o $(TARGET_OBJECT_DIR)%s$file.rci.tmp\n%s%stools%swrc%swrc.exe $includes %s $(TARGET_OBJECT_DIR)%s$file.rci.tmp $(TARGET_OBJECT_DIR)%s$file.res.tmp\n$rescomp --output-format=coff $(TARGET_OBJECT_DIR)%s$file.res.tmp -o $resource_output" />\r\n" , windres_defines.c_str(), sSep.c_str(), outdir.c_str(), sSep.c_str(), sSep.c_str(), sSep.c_str(), windres_defines.c_str(), sSep.c_str(), sSep.c_str(), sSep.c_str() ); + // FIXME: Sort out this param mess. This backend is probably gonna be deleted, so I couldn't be arsed ... Ged. + //fprintf ( OUT, "\t\t\t<Option compiler="gcc" use="1" buildCommand="gcc -xc -E -DRC_INVOKED $includes %s $file -o $(TARGET_OBJECT_DIR)%s$file.rci.tmp\n%swrc%swrc.exe $includes %s $(TARGET_OBJECT_DIR)%s$file.rci.tmp $(TARGET_OBJECT_DIR)%s$file.res.tmp\n$rescomp --output-format=coff $(TARGET_OBJECT_DIR)%s$file.res.tmp -o $resource_output" />\r\n" , + // windres_defines.c_str(), sSep.c_str(), TOOLS_BASE, sSep.c_str(), outdir.c_str(), sSep.c_str(), sSep.c_str(), sSep.c_str(), windres_defines.c_str(), sSep.c_str(), sSep.c_str() ); for ( size_t icfg = 0; icfg < m_configurations.size(); icfg++ ) { const CBConfiguration& cfg = *m_configurations[icfg];
Modified: branches/Tree-restructure-test/sdk/tools/rbuild/backend/mingw/mingw.cpp URL: http://svn.reactos.org/svn/reactos/branches/Tree-restructure-test/sdk/tools/... ============================================================================== --- branches/Tree-restructure-test/sdk/tools/rbuild/backend/mingw/mingw.cpp [iso-8859-1] (original) +++ branches/Tree-restructure-test/sdk/tools/rbuild/backend/mingw/mingw.cpp [iso-8859-1] Tue Jan 26 10:30:52 2010 @@ -429,9 +429,9 @@ void MingwBackend::GenerateGlobalVariables () const { - fputs ( "include tools$(SEP)rbuild$(SEP)backend$(SEP)mingw$(SEP)rules.mak\n", fMakefile ); - fprintf ( fMakefile, "include tools$(SEP)rbuild$(SEP)backend$(SEP)mingw$(SEP)linkers$(SEP)%s.mak\n", ProjectNode.GetLinkerSet ().c_str () ); - fprintf ( fMakefile, "include tools$(SEP)rbuild$(SEP)backend$(SEP)mingw$(SEP)compilers$(SEP)%s.mak\n", ProjectNode.GetCompilerSet ().c_str () ); + fprintf ( fMakefile, "include %sbackend$(SEP)mingw$(SEP)rules.mak\n", RBUILD_BASE ); + fprintf ( fMakefile, "include %sbackend$(SEP)mingw$(SEP)linkers$(SEP)%s.mak\n", RBUILD_BASE, ProjectNode.GetLinkerSet ().c_str () ); + fprintf ( fMakefile, "include %sbackend$(SEP)mingw$(SEP)compilers$(SEP)%s.mak\n", RBUILD_BASE, ProjectNode.GetCompilerSet ().c_str () );
if ( mscPath.length() ) fprintf ( fMakefile, "export RBUILD_CL_PATH=%s\n", mscPath.c_str () ); @@ -1089,7 +1089,8 @@ { printf ( "Detecting compiler -pipe support..." );
- string pipe_detection = "tools" + sSep + "rbuild" + sSep + "backend" + sSep + "mingw" + sSep + "pipe_detection.c"; + string rbuild_base = RBUILD_BASE; + string pipe_detection = rbuild_base + "backend" + sSep + "mingw" + sSep + "pipe_detection.c"; string pipe_detectionObjectFilename = ReplaceExtension ( pipe_detection, ".o" ); string command = ssprintf ( @@ -1126,7 +1127,7 @@
if ( configuration.PrecompiledHeadersEnabled && ProjectNode.configuration.Compiler == GnuGcc ) { - string path = "tools" + sSep + "rbuild" + sSep + "backend" + sSep + "mingw" + sSep + "pch_detection.h"; + string path = "sdk" + sSep + "tools" + sSep + "rbuild" + sSep + "backend" + sSep + "mingw" + sSep + "pch_detection.h"; string cmd = ssprintf ( "%s -c %s 1>%s 2>%s", FixSeparatorForSystemCommand(compilerCommand).c_str (),
Modified: branches/Tree-restructure-test/sdk/tools/rbuild/rbuild.h URL: http://svn.reactos.org/svn/reactos/branches/Tree-restructure-test/sdk/tools/... ============================================================================== --- branches/Tree-restructure-test/sdk/tools/rbuild/rbuild.h [iso-8859-1] (original) +++ branches/Tree-restructure-test/sdk/tools/rbuild/rbuild.h [iso-8859-1] Tue Jan 26 10:30:52 2010 @@ -67,6 +67,10 @@ #define DEF_SSEP "/" #define DEF_SBAD_SEP "\" #endif + +#define SSEP DEF_SSEP +#define TOOLS_BASE "sdk" SSEP "tools" SSEP +#define RBUILD_BASE TOOLS_BASE "rbuild" SSEP
#define MS_VS_DEF_VERSION "9.00"
Modified: branches/Tree-restructure-test/sdk/tools/rbuild/rbuild.vcproj URL: http://svn.reactos.org/svn/reactos/branches/Tree-restructure-test/sdk/tools/... ============================================================================== --- branches/Tree-restructure-test/sdk/tools/rbuild/rbuild.vcproj [iso-8859-1] (original) +++ branches/Tree-restructure-test/sdk/tools/rbuild/rbuild.vcproj [iso-8859-1] Tue Jan 26 10:30:52 2010 @@ -132,7 +132,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="..,../../lib/inflib,../../include/reactos;../../include" + AdditionalIncludeDirectories="..;../../libs/inflib;../../include/reactos;../../include" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;INFLIB_HOST;_CRT_SECURE_NO_WARNINGS;_CRT_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -1064,147 +1064,147 @@ Name="inflib" > <File - RelativePath="....\lib\inflib\builddep.h" - > - </File> - <File - RelativePath="....\lib\inflib\infcommon.h" - > - </File> - <File - RelativePath="....\lib\inflib\infcore.c" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="....\lib\inflib\infget.c" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="....\lib\inflib\infhost.h" - > - </File> - <File - RelativePath="....\lib\inflib\infhostgen.c" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="....\lib\inflib\infhostget.c" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="....\lib\inflib\infhostput.c" - > - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="2" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - /> - </FileConfiguration> - </File> - <File - RelativePath="....\lib\inflib\inflib.h" - > - </File> - <File - RelativePath="....\lib\inflib\infpriv.h" - > - </File> - <File - RelativePath="....\lib\inflib\infput.c" + RelativePath="....\libs\inflib\builddep.h" + > + </File> + <File + RelativePath="....\libs\inflib\infcommon.h" + > + </File> + <File + RelativePath="....\libs\inflib\infcore.c" + > + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="2" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + /> + </FileConfiguration> + </File> + <File + RelativePath="....\libs\inflib\infget.c" + > + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="2" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + /> + </FileConfiguration> + </File> + <File + RelativePath="....\libs\inflib\infhost.h" + > + </File> + <File + RelativePath="....\libs\inflib\infhostgen.c" + > + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="2" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + /> + </FileConfiguration> + </File> + <File + RelativePath="....\libs\inflib\infhostget.c" + > + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="2" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + /> + </FileConfiguration> + </File> + <File + RelativePath="....\libs\inflib\infhostput.c" + > + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="2" + PreprocessorDefinitions="" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + /> + </FileConfiguration> + </File> + <File + RelativePath="....\libs\inflib\inflib.h" + > + </File> + <File + RelativePath="....\libs\inflib\infpriv.h" + > + </File> + <File + RelativePath="....\libs\inflib\infput.c" > <FileConfiguration Name="Release|Win32"
Modified: branches/Tree-restructure-test/sdk/tools/rbuild/test.h URL: http://svn.reactos.org/svn/reactos/branches/Tree-restructure-test/sdk/tools/... ============================================================================== --- branches/Tree-restructure-test/sdk/tools/rbuild/test.h [iso-8859-1] (original) +++ branches/Tree-restructure-test/sdk/tools/rbuild/test.h [iso-8859-1] Tue Jan 26 10:30:52 2010 @@ -21,9 +21,6 @@ #include "rbuild.h" #include "backend/mingw/mingw.h"
-#define SSEP DEF_SSEP - -#define RBUILD_BASE "tools" SSEP "rbuild" SSEP
class BaseTest {