blob: 319ce175ed9ebe84a7476f6c442e9d874c96c8dd [file] [log] [blame]
/* --COPYRIGHT--,EPL
* Copyright (c) 2008-2017 Texas Instruments Incorporated
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Texas Instruments - initial implementation
*
* --/COPYRIGHT--*/
/*
* ======== package.xs ========
*/
/*
* ======== Package.exit ========
* Finalize this package
*/
function exit() {
// print(this.$name + ".exit() ...");
}
/*
* ======== Package.init ========
* Initialize this package.
*
* This is called after the bld package schema has completely finished; i.e.,
* at the very end of the "include('xdc.bld')" processing.
*/
function init () {
this.BuildEnvironment.onInit();
this.PackageContents.onInit();
/* determine hostOSName */
this.BuildEnvironment.hostOSName = "" + environment["xdc.hostOS"];
if (this.BuildEnvironment.hostOSName == null) {
if (environment["file.separator"] == "/") {
this.BuildEnvironment.hostOSName = "Linux";
}
else {
this.BuildEnvironment.hostOSName = "Windows";
}
}
/* initialize hostOS */
this.BuildEnvironment.hostOS = this.BuildEnvironment.WINDOWS;
if (this.BuildEnvironment.hostOSName == "Linux") {
this.BuildEnvironment.hostOS = this.BuildEnvironment.LINUX;
}
else if (this.BuildEnvironment.hostOSName == "MacOS") {
this.BuildEnvironment.hostOS = this.BuildEnvironment.MACOS;
}
}