Page 1 of 1

workspace with custom build

Posted: Thu Feb 26, 2009 12:30 pm
by jfouche
Using custom build and CL project in a workspace doesn't allow the user to build the workspace.
1 - Create a CL project
2 - Create a custom build project where the working directory is elsewhere
3 - make dependancies between CL project and custom build
4 - Hit F7

The problem commes from the fact that the generated workspace makefile doesn't change directory before calling the build command.

There is no problem using project only -> build.
I will try to fix this during those 2 days

Re: workspace with custom build

Posted: Thu Feb 26, 2009 4:52 pm
by jfouche
Here is a patch that fixes my problem

Code: Select all

Index: Plugin/builder_gnumake.cpp
===================================================================
--- Plugin/builder_gnumake.cpp	(revision 2775)
+++ Plugin/builder_gnumake.cpp	(copie de travail)
@@ -193,7 +193,10 @@
 
 			// we handle custom builds and non-custom build separatly:
 			if ( isCustom ) {
-
+				if (dependProjbldConf->GetCustomBuildWorkingDir().IsEmpty() == false) {
+					fn = ExpandVariables(dependProjbldConf->GetCustomBuildWorkingDir(), dependProj, NULL);
+					fn.MakeRelativeTo(wspfile.GetPath());
+				}
 				CreateCustomPreBuildEvents(dependProjbldConf, text);
 				text << wxT("\t") << GetCdCmd(wspfile, fn) << dependProjbldConf->GetCustomBuildCmd() << wxT("\n");
 				CreateCustomPostBuildEvents(dependProjbldConf, text);

Re: workspace with custom build

Posted: Thu Feb 26, 2009 7:43 pm
by eranif
Thanks I fixed it in SVN trunk (I used other fix since your fix is also missing the clean command)

Eran