releases and default label [message #711121] |
Fri, 05 August 2011 15:39  |
Eclipse User |
|
|
|
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 #711209 is a reply to message #711179] |
Fri, 05 August 2011 18:11  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04694 seconds