| /* create a repository for all packages in this bundle */ |
| var repository = Pkg.addRepository("packages"); |
| |
| /* put the default release in the exports sub-directory */ |
| Pkg.defaultRelease = Pkg.addRelease("xdcsamples"); |
| Pkg.releasePrefix = "../../../exports/"; |
| Pkg.attrs.compress = true; |
| |
| /* compute the set of pkgs to put in this repository from the requires list */ |
| var plist = ""; /* the list of imported packages to pass to custom.mak */ |
| var imports = []; |
| for (var i = 0; i < Pkg.imports.length; i++) { |
| var pname = Pkg.imports[i].split('{')[0]; |
| plist += pname + " "; |
| |
| /* get list of all releases supported by package pname */ |
| var rels = Build.getReleaseDescs(pname); |
| for (var j = 0; j < rels.length; j++) { |
| rel = rels[j]; |
| |
| /* use the default release */ |
| if (rel.label == "default") { |
| imports.push(pname + ':' + rel.name); |
| break; |
| } |
| } |
| } |
| |
| /* add the selected releases of the packages to the repository */ |
| repository.addPackages(imports); |
| |
| /* add rules to build xdoc docs for the packages repository */ |
| Pkg.makeEpilogue = "PLIST = " + plist + "\ninclude custom.mak"; |
| |
| /* add generated xdoc directory to this package */ |
| Pkg.otherFiles = ["cdoc"]; |