Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » DSDP - Real-Time Software Components (RTSC) » releases and default label
releases and default label [message #711121] Fri, 05 August 2011 19:39 Go to next message
Patrick Geremia is currently offline Patrick GeremiaFriend
Messages: 79
Registered: July 2009
Member
I am using the following package.bld for my bundle

var build = xdc.useModule('xdc.bld.BuildEnvironment');
var pkg = xdc.useModule('xdc.bld.PackageContents');

var pkgReleases = [];
pkg.attrs.compress = true;

for each (var pname in pkg.imports) {
print("requires: " + pname);
pname = pname.substr(0, pname.indexOf("{"));
for each (var relDesc in build.getReleaseDescs(pname)) {
if (relDesc.label = "default") {
print(relDesc.label);
var imp = pname + ":" + relDesc.name;
print("importing: " + imp);
pkgReleases.push(imp);
}
}
}

var repo = pkg.addRepository("packages");
repo.addPackages(pkgReleases);

It looks like the default label is set for each release of a package.

requires: toto.tutu.pclpplIf{
default
importing: toto.tutu.pclpplIf:toto_tutu_pclpplIf
requires: toto.tutu.plt{
default
importing: toto.tutu.plt:toto_tutu_plt_src
default
importing: toto.tutu.plt:toto_tutu_plt
requires: toto.tutu.ppl.ppl_ul{
default
importing: toto.tutu.ppl.ppl_ul:toto_tutu_ppl_ppl_ul_src
default
importing: toto.tutu.ppl.ppl_ul:toto_tutu_ppl_ppl_ul
requires: toto.tutu.ppl.ppl_dl{
default
importing: toto.tutu.ppl.ppl_dl:toto_tutu_ppl_ppl_dl_src
default
importing: toto.tutu.ppl.ppl_dl:toto_tutu_ppl_ppl_dl
js: "./package.bld", line 21: Error: addPackages was passed
'toto.tutu.plt' more than once for the repository 'packages'
xdctools_3_22_01_21\gmake.exe: *** Deleting file `package.mak'
xdctools_3_22_01_21\gmake.exe: *** No rule to make target `package.mak',
needed by `.interfaces'. Stop.

am I missing something? In my package.bld for toto.tutu.plt I have the
following (the default label is there only once):

function buildRelease()
{
var relName = pkgName;

Pkg.attrs.compress = true;

/* Add build files */
Pkg.otherFiles.$add("config.bld");
Pkg.otherFiles.$add("package.bld");
Pkg.otherFiles.$add("package.xdc");
Pkg.otherFiles.$add("package.xs");
Pkg.otherFiles.$add("Settings.xdc");

/* Add all the header files to all releases */
var hFiles = listAllFiles (".h", "include", false);
for (var k = 0 ; k < hFiles.length; k++)
{
Pkg.otherFiles.$add(hFiles[k]);
}

/* Create a release package containing header files, source files
and build system */
var srcRel = Pkg.addRelease (pkgName + "_src");
srcRel.attrs.label = "src";

/* Create a release package containing only header files and
libraries */
var libRel = Pkg.addRelease (pkgName);
libRel.attrs.label = "default";
Pkg.defaultRelease = libRel;

/* Add all the source files to src release */
var cFiles = listAllFiles (".cpp", "src", false);
for (var k = 0 ; k < cFiles.length; k++)
{
srcRel.otherFiles.$add(cFiles[k]);
}

}
Re: releases and default label [message #711179 is a reply to message #711121] Fri, 05 August 2011 21:33 Go to previous messageGo to next message
Chris Ring is currently offline Chris RingFriend
Messages: 16
Registered: July 2009
Location: Santa Barbara, CA
Junior Member
This statement is an assignment, not a comparison:

if (relDesc.label = "default") {

I think you want this:

if (relDesc.label == "default") {

Chris
Re: releases and default label [message #711209 is a reply to message #711179] Fri, 05 August 2011 22:11 Go to previous message
Patrick Geremia is currently offline Patrick GeremiaFriend
Messages: 79
Registered: July 2009
Member
argh!!! Thanks.

Chris Ring wrote:
> This statement is an assignment, not a comparison:
>
> if (relDesc.label = "default") {
>
> I think you want this:
>
> if (relDesc.label == "default") {
>
> Chris
Previous Topic:Software Engineering tools
Next Topic:MessageQ types when using syslink
Goto Forum:
  


Current Time: Fri Mar 29 05:26:09 GMT 2024

Powered by FUDForum. Page generated in 0.02531 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top