|
|
Re: nested packages [message #705345 is a reply to message #705254] |
Fri, 29 July 2011 18:46   |
Dave Russo Messages: 172 Registered: July 2009 |
Senior Member |
|
|
RTSC consistently uses the package path exclusively to locate all files;
C headers, JavaScript files, libraries, ... In addition, all references
consistently use the package name prefix to ensure files with the same
base name in two different packages are never confused.
So, C sources that #include <ti/packageC/packageA/package.h> will
include the first file named 'ti/packageC/packageA/package.h' found by
successively appending this name to each directory appearing in the
package path.
Since packages can be installed and found in any directory on the
package path, the fact that a package shares a common prefix does not
imply any "container" relationship between the two. For example, if you
build a release of pkgC, the package pkgC's archive will _not_ contain
pkgA of pkgB. The package name is mostly just a namespace.
'requires' statements do not affect the package path. The 'requires'
declaration affects
1. whether a package's libraries will be added to the list of
libraries to link with; if pkgA requires pkgC and your app
uses pkgA, pkgC's libraries will be automatically added
to the generated linker command file
2. the ordering of libraries in the the generated linker command
files; if pkgA requires pkgB, pkgB's library is linked after
pkgA's library
3. the order in which packages are built by the xdc tool (when
using -PD option)
On 7/29/2011 9:16 AM, Patrick Geremia wrote:
> Suppose I have package A and package B.
> I would like to have package C as a container package. Package C will
> basically will a wrapper package for A and B
>
> ti.packageC
> ti.packageC.packageA
> ti.packageC.packageB
>
> packageA has packageA.h as interface
> packageB has packageB.h as interface
>
> I assume that if I write as below, I will pull in packageA and packageB
> if a package requires packageC.
>
> - I write packageC.h to include ti/packageA.h and ti/packageB.h
> - I write packageC.xdc with requires statements for ti.packageA and
> ti.packageB
>
> Can you confirm?
>
> Regards
> Patrick Geremia
>
|
|
|
|
Re: nested packages [message #707104 is a reply to message #705345] |
Mon, 01 August 2011 08:43  |
Patrick Geremia Messages: 79 Registered: July 2009 |
Member |
|
|
Understood. Thanks.
dave russo wrote:
> RTSC consistently uses the package path exclusively to locate all files;
> C headers, JavaScript files, libraries, ... In addition, all references
> consistently use the package name prefix to ensure files with the same
> base name in two different packages are never confused.
>
> So, C sources that #include <ti/packageC/packageA/package.h> will
> include the first file named 'ti/packageC/packageA/package.h' found by
> successively appending this name to each directory appearing in the
> package path.
>
> Since packages can be installed and found in any directory on the
> package path, the fact that a package shares a common prefix does not
> imply any "container" relationship between the two. For example, if you
> build a release of pkgC, the package pkgC's archive will _not_ contain
> pkgA of pkgB. The package name is mostly just a namespace.
>
> 'requires' statements do not affect the package path. The 'requires'
> declaration affects
> 1. whether a package's libraries will be added to the list of
> libraries to link with; if pkgA requires pkgC and your app
> uses pkgA, pkgC's libraries will be automatically added
> to the generated linker command file
> 2. the ordering of libraries in the the generated linker command
> files; if pkgA requires pkgB, pkgB's library is linked after
> pkgA's library
> 3. the order in which packages are built by the xdc tool (when
> using -PD option)
>
>
> On 7/29/2011 9:16 AM, Patrick Geremia wrote:
>> Suppose I have package A and package B.
>> I would like to have package C as a container package. Package C will
>> basically will a wrapper package for A and B
>>
>> ti.packageC
>> ti.packageC.packageA
>> ti.packageC.packageB
>>
>> packageA has packageA.h as interface
>> packageB has packageB.h as interface
>>
>> I assume that if I write as below, I will pull in packageA and packageB
>> if a package requires packageC.
>>
>> - I write packageC.h to include ti/packageA.h and ti/packageB.h
>> - I write packageC.xdc with requires statements for ti.packageA and
>> ti.packageB
>>
>> Can you confirm?
>>
>> Regards
>> Patrick Geremia
>>
|
|
|
Powered by
FUDForum. Page generated in 0.02653 seconds