Page 1 of 1

Absolute path names in exported makefiles

Posted: Sat Aug 27, 2011 8:39 pm
by johannes
Hi,

I want to export a makefile so others can build the project. CodeLite writes absolute paths into the makefile, which makes it useless for this purpose.

How can I make CodeLite write relative path names?

Re: Absolute path names in exported makefiles

Posted: Sat Aug 27, 2011 8:58 pm
by eranif
johannes wrote:How can I make CodeLite write relative path names?
Settings | Build Settings | Compilers | <your compiler> | File Types

Select the file extension you want to change (e.g. 'cpp')
and change the default pattern (assuming you did not change it) from:

Code: Select all

$(CompilerName) $(SourceSwitch) "$(FileFullPath)" $(CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/$(ObjectName)$(ObjectSuffix) $(IncludePath)
into

Code: Select all

$(CompilerName) $(SourceSwitch) "$(FilePath)$(FileFullName)" $(CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/$(ObjectName)$(ObjectSuffix) $(IncludePath)
Note:

$(FilePath) is the relative path with a terminating slash
$(FileFullName) - the file name + extension, without any path

Click the 'Help...' button of the 'File Types' page to get the full list of macros available and their meaning

Eran

Re: Absolute path names in exported makefiles

Posted: Sat Aug 27, 2011 9:13 pm
by johannes
Thanks for the quick reply! Will try that.

Btw, any news/thoughts about this yet? I have tried looking into the code myself but I'm not familiar with the wx* nor the CodeLite codebase...