Bug 4136 - <%input_noext%> not working with vc10 template
Summary: <%input_noext%> not working with vc10 template
Status: NEW
Alias: None
Product: MPC
Classification: Unclassified
Component: MPC (show other bugs)
Version: unspecified
Hardware: All Linux
: P1 major
Assignee: Chad Elliott
URL:
Depends on:
Blocks:
 
Reported: 2013-10-03 08:25 CDT by Johnny Willemsen
Modified: 2013-10-03 14:26 CDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johnny Willemsen 2013-10-03 08:25:14 CDT
run the following commands under DAnCE/tools/Logger_Backend/ndds

perl $ACE_ROOT/bin/mwc.pl -type gnuace -features ndds=1
perl $ACE_ROOT/bin/mwc.pl -type gnuace -features ndds=1

With gnuace we get in the project file "-corba Log_RecordC.h" but in the msvc10 project we get "-corba C.h"
Comment 1 Johnny Willemsen 2013-10-03 13:48:30 CDT
The problem is in the area of the description below. vc10 uses custom_type->input_file->commands and the commandline flags are written using:
<%custom_type->input_file->command->flags%>

It looks that in the text the <%input_noext%> is not correctly replaced with the input filename. Looks probably cdt6/cdt7 have the same problem.

Certain project types don't support the same input file used by multiple custom types (current examples of this are vc10, cdt6, and cdt7). To accomodate these types, MPC has a capability called "combined custom". With this capability enabled in the specific ProjectCreator, MPC will "fold together" the multiple custom steps so that the target tool (Visual Studio or Eclipse CDT) sees it as a single custom step that happens to run two or more commands. When "combined custom" is enabled, the template needs to be written for it by checking if custom_type->input_file->commands is non-empty. If it isn't empty, the values in it can be iterated over with a <%foreach%>. During that iteration, the following values can be obtained by the template. Each one would appear in the template preceeded by custom_type->input_file->
Comment 2 Johnny Willemsen 2013-10-03 13:51:15 CDT
As far as I can tell the problem is in ProjectCreator.pm, function get_custom_value, and than in the part for commands, around line 4590. 
Comment 3 Phil Mesnier 2013-10-03 14:22:37 CDT
Reassigning to Chad Elliott. He's the primary MPC maintainer.

Johnny, do you thing -features nddi has any influence? We of course don't have access to that here.

Can you compose a small test that demonstrates the error?  Since you've tracked down the likely  offending code, do you have a candidate fix?

Thanks,
Phil
Comment 4 Johnny Willemsen 2013-10-03 14:26:31 CDT
You don't need RTI DDS, you can just look in the generated project file, there should be "-corba Log_RecordC.h" generated. This happens only at the moment when 1 input file has go through 2 different custom commands, in this case tao_idl and rtiddsgen. 

I have looked at a candidate fix but haven't found one yet. I do see in the top of the file comments like "Needs <%...%> conversion", it looks to be related to that, the conversion is probably not done in that case, but not sure where it exactly has to happen, tried a few things, but none worked.