Resource Custom Build Step corrupts Project [message #919299] |
Fri, 21 September 2012 22:07 |
John Stile Messages: 20 Registered: July 2009 |
Junior Member |
|
|
Using a "Resource Custom Build Step", I use m4 macro language to modify a .cpp file before building the cpp, in eclipse 3.7.2, 3.8, or 4.2 (all I have tested so far).
When "Custom Build Step Applicability", is set to "Disable Custom Build Step", I can close and open the project.
When "Custom Build Step Applicability", is set to "Apply Custom Build Step Overriding Other Tools", the build step executes, but after closing the project it opens to and empty list of items in "Project Explorer"
In my project resource list I have files:
Server.cpp
Server.m4
taks.m4
Server.m4 Properties
C/C++ Build
Settings->Build Steps->
Custom Build Step Applicability: Disable Custom Build Step
Additional input file name: task.m4
Output file name: ../Server.cpp
Command: m4 < ../Server.m4 > ../Server.cpp
Description: Invoking: Resource Custom Build Step for Server.m4
I can close and open the project.
When I change
Custom Build Step Applicability: Apply Custom Build Step Overriding Other Tools
the project will open to an empty list.
I saved a copy of the project directory before and after the change.
Only the .cproject file changed in the directory.
Only one line in the .cproject file changed.
Before: Custom Build Step Applicability: Apply Custom Build Step Overriding Other Tools
<fileInfo id="cdt.managedbuild.config.gnu.lib.release.1507965422.2118444669" name="Server.m4" rcbsApplicability="disable" resourcePath="Server.m4" toolsToInvoke="">
<tool announcement="Invoking: Resource Custom Build Step for Server.m4" command="m4 < ../Server.m4 > ../Server.cpp" customBuildStep="true" id="org.eclipse.cdt.managedbuilder.ui.rcbs.1036878463" name="Resource Custom Build Step">
<inputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.inputtype.1084327982" name="Resource Custom Build Step Input Type">
<additionalInput kind="additionalinputdependency" paths="task.m4"/>
</inputType>
<outputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.outputtype.248576857" name="Resource Custom Build Step Output Type" outputNames="../Server.cpp"/>
</tool>
</fileInfo>
After: Custom Build Step Applicability: Apply Custom Build Step Overriding Other Tools
<fileInfo id="cdt.managedbuild.config.gnu.lib.release.1507965422.2118444669" name="Server.m4" rcbsApplicability="override" resourcePath="Server.m4" toolsToInvoke="org.eclipse.cdt.managedbuilder.ui.rcbs.1036878463">
<tool announcement="Invoking: Resource Custom Build Step for Server.m4" command="m4 < ../Server.m4 > ../Server.cpp" customBuildStep="true" id="org.eclipse.cdt.managedbuilder.ui.rcbs.1036878463" name="Resource Custom Build Step">
<inputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.inputtype.1084327982" name="Resource Custom Build Step Input Type">
<additionalInput kind="additionalinputdependency" paths="task.m4"/>
</inputType>
<outputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.outputtype.248576857" name="Resource Custom Build Step Output Type" outputNames="../Server.cpp"/>
</tool>
</fileInfo>
If I change the .cproject file back, it all works.
Is this supposed to work?
I haven't figured out how to make a Builder work, so this is all I have.
|
|
|
Re: Resource Custom Build Step corrupts Project [message #923213 is a reply to message #919299] |
Tue, 25 September 2012 18:09 |
John Stile Messages: 20 Registered: July 2009 |
Junior Member |
|
|
I would love for anyone to share some support (I did not find any paid support offers).
I can at least share my frustration.
With eclipse-3.5.2, enabling the custom build step does not corrupt the project, and the step runs. By enable the custom build step, I mean:
project properties->Settings->Build Steps->Resource Custom Build Step->Custom Build Step Applicability->"Apply Custom Build Step Overriding Other Tools".
Anything newer than eclipse-3.5.2 this problem with custom build steps.
I found one thread with the same corruption:
"custom build steps for QT ui and moc file [message #812260]"
http://www.eclipse.org/forums/index.php/m/815480/?srch=Custom+Build+Step
To sum it up: "It does not work as expected", and they gave up.
Giving up is not an option for me.
Why would eclipse still contain something functionally broken, even in Juno(4.2)?
Or why doesn't the documentation clarify a common misconception?
The IDE should offer a well advertized and documented way to run custom build steps (for external tools) for a specific resource file, and include details in examples that least the most common cases.
Help Please!
I also tried the external tools route, but it has also failed me, but I hesitate to go that route, as it is not clear to me whether custom build steps are the wrong way to go.
[Updated on: Tue, 25 September 2012 18:28] Report message to a moderator
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03496 seconds