Page 1 of 1

Spaces in pathnames

Posted: Thu Jun 20, 2013 3:35 am
by noahax
Hello,

I'm porting a C library over to Linux (Debian) from Mac OS X using codelite. Unfortunately, lot of the directories in this project have spaces in them (e.g. .../Web Clients/), and codelite doesn't like that. Whenever I try to build the project, I get hundreds of errors like this:

Code: Select all

****.mk:151: warning: overriding commands for target `Debug/Web'
There doesn't seem to be anything about this online, and I haven't found anything in the program itself related to this. Has anyone else had this problem? If so, how did you solve it? Changing all of the directory names is kind of out of the question, and I can try to use qMake or something, but I would rather keep this all within codelite.

Any help is appreciated!

Thank you,

-Noah

Re: Spaces in pathnames

Posted: Sun Aug 04, 2013 12:41 am
by noahax
Well, despite the lack of support from the forum, I was able to get this going. For anyone who still has problems, here's what I did. It's not that elegant, but it works.

I created a Python script to go through the CodeLite-generated makefile and look for lines with spaces in them. Depending on where in the line it was, it would either change the space to an underscore or escape it using a backslash. The python script would then build the project itself with the new makefile:

Code: Select all

os.system('make -d -f new_makefile.mk')
I then enabled custom builds in CodeLite (Project Settings > Customize > Enable Custom Build) and set the Python script to be the build command.

I hope that this is helpful for someone in the future!

-Noah

Re: Spaces in pathnames

Posted: Sun Aug 04, 2013 8:26 am
by eranif
noahax wrote:I then enabled custom builds in CodeLite (Project Settings > Customize > Enable Custom Build) and set the Python script to be the build command.
By enabling the 'custom build' you also disabled the makefile generation. So incase you will add new file to your project, codelite will not update the makefile accordingly, since 'Enable custom build' means
that _you_ are taking the responsibility of creating / updating the makefile

Try this instead:
- Disable 'custom build'
- Place the python command as a pre-build event (Project Settings -> Pre/Post build events -> Pre Build)

Eran

Re: Spaces in pathnames

Posted: Mon Aug 05, 2013 3:05 am
by noahax
I know, that is the downfall of the current set up. I originally had it as a pre-build event, but it wasn't working for some reason. At this point, I don't remember exactly what happened. Now that it's all working though, I may try that again. It would be nicer to do it that way.