Bug 4164

Summary: Extend MPC Base project support
Product: MPC Reporter: Johnny Willemsen <jwillemsen>
Component: MPCAssignee: Chip Jones <jones_c>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: unspecified   
Hardware: All   
OS: Linux   

Description Johnny Willemsen 2014-03-13 09:33:55 CDT
Storing some ideas for improving/extending MPC base projects, first set of questions is from me, than a response from Chad, than my additional ideas


>> I have done some quick experiments and I observed a few things, maybe
>> someone at the side of OCI has some ideas;
>> - is there a way to define multiple base projects in one mpb file, in
>> Base there are 5 projects in 1 MPC file, I would like to create 5 base
>> projects, but these now all get in their own mpb file, polluting the
>> directory
>
> This would be a significant change.  Right now, inheritance is based on
> file name.  To do what you want would require MPC to search all .mpb
> files for specific base projects within the file.  It could certainly be
> done, but it would be time consuming to perform a search of that nature.

First, I have attached a modified CIAO Hello Example, Hello.tar.gz was something I had first, HelloCom.tar.gz does generate the MPC files when I run
$ACE_ROOT/bin/mwc.pl -type gnuace -recurse from CIAO/examples/Hello, but not when I leave out the -recurse and when I run it from a higher directory I don't get the recursive GNUmakefiles that iterate through all.

Yes, searching everything would be time consuming, but assume a MPC File as:

project(*lem_gen) : ciaoidldefaults, *idl_gen {

I use *idl_gen as base (in hello.mpc), so it could look if there is a hello_idl_gen.mpb, if that is not there, search for hello.mpb. If a mpb file is loaded, than support naming of the base projects as we can with a project, but also *, so that hello.mpb could contain

project (*idl_gen) {
  after += *idl_gen
}
project (*stub): *idl_gen{
}


>> - At the root of the test I create a Hello.mwc that has an include of
>> base, receiver, and sender for base projects, but when running mwc.pl
>> from the CIAO_ROOT mwc ends up inside of the Sender/Receiver, which than
>> have problems because the base projects can't be found.
>
> I don't follow what you're saying here.  Are you saying that the include
> path doesn't contain the directory for the base projects?  And that's
> the cause of the issue?

For reference I attached the Hello example. Each CIAO test is setup in almost the same way, a base core and 2 components. What I am trying is to see if I can create some mpc/mpb files which I only need to rename with a unique name, and that all project names, libraries, etc, are all dependent on the filename. As less as possible changes to each test.

Each test than gets its own mpb files, they are not in CIAO_ROOT/MPC/config because there are 150 tests, each with about 10 shared libraries. I would prefer a solution where each component/library delivers besides his sources, idl, and mpc file also its base projects, components that want to use something, need to include also the component directory for that specific workspace. I created some workspaces, that works if I use -recurse, but when I have multiple tests that each have these workspaces I don't get the GNUmakefiles at a higher level so that a make from the root builds all. Also I wonder if dependencies than work correctly.