[ros-diffs] [hyperion] 41370: modified tools/rbuild/backend/mingw/compilers/msc.mak Fix definition of cl Fix definition of RBUILD_CXX modified tools/rbuild/backend/mingw/mingw.cpp modified tools/rbuild/backend/mingw/mingw.h modified tools/rbuild/backend/mingw/mstools_detection.cpp Actually set RBUILD_CL_PATH and RBUILD_LINK_PATH

hyperion at svn.reactos.org hyperion at svn.reactos.org
Wed Jun 10 20:24:34 CEST 2009


Author: hyperion
Date: Wed Jun 10 22:24:33 2009
New Revision: 41370

URL: http://svn.reactos.org/svn/reactos?rev=41370&view=rev
Log:
modified   tools/rbuild/backend/mingw/compilers/msc.mak
   Fix definition of cl
   Fix definition of RBUILD_CXX

modified   tools/rbuild/backend/mingw/mingw.cpp
modified   tools/rbuild/backend/mingw/mingw.h
modified   tools/rbuild/backend/mingw/mstools_detection.cpp
   Actually set RBUILD_CL_PATH and RBUILD_LINK_PATH

Modified:
    trunk/reactos/tools/rbuild/backend/mingw/compilers/msc.mak
    trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp
    trunk/reactos/tools/rbuild/backend/mingw/mingw.h
    trunk/reactos/tools/rbuild/backend/mingw/mstools_detection.cpp

Modified: trunk/reactos/tools/rbuild/backend/mingw/compilers/msc.mak
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw/compilers/msc.mak?rev=41370&r1=41369&r2=41370&view=diff
==============================================================================
--- trunk/reactos/tools/rbuild/backend/mingw/compilers/msc.mak [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/compilers/msc.mak [iso-8859-1] Wed Jun 10 22:24:33 2009
@@ -15,7 +15,7 @@
 
 BUILTIN_CPPFLAGS+= /X
 
-cl=$$(Q)$$(RBUILD_HELPER_TARGET) "RBUILD_CL_" "$(notdir $<<)" cl /nologo
+cl=$(Q)$(RBUILD_HELPER_TARGET) "RBUILD_CL_" "$(notdir $<)" cl /nologo
 
 #(module, source, dependencies, cflags, output)
 #TODO
@@ -79,6 +79,8 @@
 	$$(ECHO_CC)
 	$${cl} /TP /Fo$$@ ${call RBUILD_cxxflags,$(1),$(4)} /c $$<
 
+endif
+
 endef
 
 #(module, source, dependencies, cflags)

Modified: trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp?rev=41370&r1=41369&r2=41370&view=diff
==============================================================================
--- trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp [iso-8859-1] Wed Jun 10 22:24:33 2009
@@ -70,6 +70,9 @@
 	{ HostFalse, "", "", "" }, // MessageHeader
 };
 
+static std::string mscPath;
+static std::string mslinkPath;
+
 string
 MingwBackend::GetFullPath ( const FileLocation& file ) const
 {
@@ -426,6 +429,12 @@
 	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 () );
 
+	if ( mscPath.length() )
+		fprintf ( fMakefile, "export RBUILD_CL_PATH=%s\n", mscPath.c_str () );
+
+	if ( mslinkPath.length() )
+		fprintf ( fMakefile, "export RBUILD_LINK_PATH=%s\n", mslinkPath.c_str () );
+
 	if ( configuration.Dependencies == FullDependencies )
 	{
 		fprintf ( fMakefile,
@@ -762,7 +771,7 @@
 	}
 	else if ( ProjectNode.configuration.Compiler == MicrosoftC )
 	{
-		detectedCompiler = DetectMicrosoftCompiler ( compilerVersion );
+		detectedCompiler = DetectMicrosoftCompiler ( compilerVersion, mscPath );
 		supportedCompiler = true; // TODO
 	}
 
@@ -1006,7 +1015,7 @@
 	}
 	else if ( ProjectNode.configuration.Linker == MicrosoftLink )
 	{
-		detectedBinutils = DetectMicrosoftLinker ( binutilsVersion );
+		detectedBinutils = DetectMicrosoftLinker ( binutilsVersion, mslinkPath );
 		supportedBinutils = true; // TODO
 	}
 

Modified: trunk/reactos/tools/rbuild/backend/mingw/mingw.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw/mingw.h?rev=41370&r1=41369&r2=41370&view=diff
==============================================================================
--- trunk/reactos/tools/rbuild/backend/mingw/mingw.h [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/mingw.h [iso-8859-1] Wed Jun 10 22:24:33 2009
@@ -117,8 +117,8 @@
 	void GenerateDirectoryTargets ();
 	FILE* fMakefile;
 	bool use_pch;
-	bool DetectMicrosoftCompiler ( std::string& version );
-	bool DetectMicrosoftLinker ( std::string& version );
+	bool DetectMicrosoftCompiler ( std::string& version, std::string& path );
+	bool DetectMicrosoftLinker ( std::string& version, std::string& path );
 };
 
 

Modified: trunk/reactos/tools/rbuild/backend/mingw/mstools_detection.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw/mstools_detection.cpp?rev=41370&r1=41369&r2=41370&view=diff
==============================================================================
--- trunk/reactos/tools/rbuild/backend/mingw/mstools_detection.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/mstools_detection.cpp [iso-8859-1] Wed Jun 10 22:24:33 2009
@@ -2216,7 +2216,7 @@
 }
 
 bool
-MingwBackend::DetectMicrosoftCompiler ( std::string& version )
+MingwBackend::DetectMicrosoftCompiler ( std::string& version, std::string& path )
 {
 	bool wantCompiler = ProjectNode.configuration.Compiler == MicrosoftC;
 	bool wantLinker = ProjectNode.configuration.Linker == MicrosoftLink;
@@ -2234,13 +2234,14 @@
 		std::ostringstream compilerVersion;
 		compilerVersion << msCompilerVersion;
 		version = compilerVersion.str();
+		path = msCompilerPath;
 	}
 
 	return ret;
 }
 
 bool
-MingwBackend::DetectMicrosoftLinker ( std::string& version )
+MingwBackend::DetectMicrosoftLinker ( std::string& version, std::string& path )
 {
 	bool wantCompiler = ProjectNode.configuration.Compiler == MicrosoftC;
 	bool wantLinker = ProjectNode.configuration.Linker == MicrosoftLink;
@@ -2258,6 +2259,7 @@
 		std::ostringstream linkerVersion;
 		linkerVersion << msLinkerVersion;
 		version = linkerVersion.str();
+		path = msLinkerPath;
 	}
 
 	return ret;
@@ -2273,13 +2275,13 @@
 #include "mingw.h"
 
 bool
-MingwBackend::DetectMicrosoftCompiler ( std::string& )
+MingwBackend::DetectMicrosoftCompiler ( std::string&, std::string& )
 {
 	return false;
 }
 
 bool
-MingwBackend::DetectMicrosoftLinker ( std::string& )
+MingwBackend::DetectMicrosoftLinker ( std::string&, std::string& )
 {
 	return false;
 }



More information about the Ros-diffs mailing list