Bug 299769 - org.eclipse.cdt.managedbuilder.templateengine.processes.CreateIncludeFolder doesn't work well on CygWin
Summary: org.eclipse.cdt.managedbuilder.templateengine.processes.CreateIncludeFolder d...
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build-managed (show other bugs)
Version: 0 DD 1.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-15 10:24 EST by Jon Beniston CLA
Modified: 2020-09-04 15:23 EDT (History)
3 users (show)

See Also:


Attachments
Jon's Patch (1.11 KB, patch)
2012-01-06 08:47 EST, Branko Drevensek CLA
no flags Details | Diff
patch (1.26 KB, patch)
2012-01-18 11:36 EST, Branko Drevensek CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Beniston CLA 2010-01-15 10:24:08 EST
Build Identifier: M20090917-0800

When using the template engine on windows/cygwin, org.eclipse.cdt.managedbuilder.templateengine.processes.CreateIncludeFolder has a problem whereby it can end up calling setIncludePathOptionForConfig() with paths that have backslashes in them. These backslashes end up in the makefiles, which cause make to fail. The bad path is set via this line:

String path = projectHandle.getFolder(targetPath).getLocation().toOSString();

Changing it to the following, fixes the problem (as the paths are quoted, and more usefully relative the project directory, rather than being absolute)

String path = "\"${workspace_loc:" + projectHandle.getFolder(targetPath).getFullPath().toString() + "}\"";




Reproducible: Always
Comment 1 Andrew Gvozdev CLA 2010-01-27 17:50:04 EST
Can you submit your proposal in a form of a patch? You can create a patch via project context menu->Team->Create Patch. Use "Workspace" in Patch Root option.
Comment 2 Branko Drevensek CLA 2012-01-06 08:47:49 EST
Created attachment 209129 [details]
Jon's Patch
Comment 3 Branko Drevensek CLA 2012-01-06 08:48:08 EST
I did some testing of this fix and it seems to work pretty fine. 

It would probably be better if this include folder was relative to project, not workspace location, but this is definitely better than absolute path.

Added bonus is that added quotes also fix bug #225810.
---
As I can't create patch the proposed way in eGit. I'm hope what I'm attaching is usable.
Comment 4 Branko Drevensek CLA 2012-01-18 11:36:45 EST
Created attachment 209691 [details]
patch
Comment 5 Branko Drevensek CLA 2012-01-18 11:37:26 EST
Comment on attachment 209691 [details]
patch

I hope this new attachment is in proper format.