Working directory in Custom Build

CodeLite installation/troubleshooting forum
marfi
CodeLite Expert
Posts: 159
Joined: Mon Nov 03, 2008 9:17 pm
Contact:

Working directory in Custom Build

Post by marfi »

Hi, it seems a "Working Directory" option in a "Custom Build" panel doesn't work, because if I set this value to any directory (or CL macro) then the working dir is always a workspace directory anyway.

I use Ubunut 8.10 and CL rev 2747.

Regards
marfi
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Working directory in Custom Build

Post by eranif »

Works here :)

Can u run this simple test:

What happen if you set the working directory to:

Code: Select all

/home/
and then in the build command set:

Code: Select all

echo `pwd`
what is the output that you get?

Eran
Make sure you have read the HOW TO POST thread
marfi
CodeLite Expert
Posts: 159
Joined: Mon Nov 03, 2008 9:17 pm
Contact:

Re: Working directory in Custom Build

Post by marfi »

I've already tried it with 'ls' command but with 'pwd' it works the same way: I set the working dir to "/home/", build command to "echo `pwd`" and the output is as follows:

Code: Select all

echo /home/michal/Src 
/home/michal/Src
Regards
marfi
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Working directory in Custom Build

Post by eranif »

Hi,

I created a simple hello world application using codelite, now I ticked the 'enable custom build' and set as 'Working Directory' in the 'Custom Build' tab to /home/eran,

I get this in the build command;

Code: Select all

----------Build Started--------
echo /home/eran 
----------Building project:[ Main - Debug ]----------
/home/eran
----------Build Ended----------
0 errors, 0 warnings
When leaving the 'Working Directory' empty, here is the output:

Code: Select all

----------Build Started--------
echo /home/eran/devl/MainTest 
----------Building project:[ Main - Debug ]----------
/home/eran/devl/MainTest
----------Build Ended----------
0 errors, 0 warnings
This makes me thinking: which 'Working Directory' entry do u refer to? (there are 2, one in the 'Custom Build' and another one in the 'General' tab)

Also, can u please copy the exact output as it appears in the 'Build' tab?

EDIT: reading your first post again, make me realize that you are refering to the correct entry (the one from the Custom Build), but how come your output is different than mine? (I miss the "status lines" Build Started, Building project etc.)
Eran
Make sure you have read the HOW TO POST thread
marfi
CodeLite Expert
Posts: 159
Joined: Mon Nov 03, 2008 9:17 pm
Contact:

Re: Working directory in Custom Build

Post by marfi »

I tried to do the same things like you and I've got the same output like you for Build target command, so this part is OK. But, the problem is that a working directory of "Command to use for makefile generation:" is not involved by a value set in the "Working directory" text field, so the output of "echo `pwd`" from "build command" field and from "makefile generation" field differs (I used Qmake generator).
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Working directory in Custom Build

Post by eranif »

Ok, now it make sense.

I am too using qmake at work and never came across this issue, the reason is:
I simply defined new build target qmake ...

So my list contains:

Code: Select all

Compile Single File
Clean
Build
qmake MODULE_BUILD=DEBUG
qmake
This way I can use more than one qmake command (MODULE_BUILD=DEBUG generates Makefile with debug information, while qmake alone generates release Makefile)

Eran
Make sure you have read the HOW TO POST thread
marfi
CodeLite Expert
Posts: 159
Joined: Mon Nov 03, 2008 9:17 pm
Contact:

Re: Working directory in Custom Build

Post by marfi »

Oh, I see. Now it works fine.

Btw, I think I'll stay with wxWidgets... ;)

Thank you for your effort!
Michal
Post Reply