workspace with custom build

Discussion about CodeLite development process and patches
jfouche
CodeLite Guru
Posts: 351
Joined: Mon Oct 20, 2008 7:26 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

workspace with custom build

Post 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
Jérémie
jfouche
CodeLite Guru
Posts: 351
Joined: Mon Oct 20, 2008 7:26 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: workspace with custom build

Post 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);
Jérémie
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: workspace with custom build

Post by eranif »

Thanks I fixed it in SVN trunk (I used other fix since your fix is also missing the clean command)

Eran
Make sure you have read the HOW TO POST thread
Post Reply