MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / parseBuild

Method parseBuild

tools/mcmanifest.js:3022–3063  ·  view source on GitHub ↗
(platform)

Source from the content-addressed store, hash-verified

3020 }
3021 }
3022 parseBuild(platform) {
3023 let properties = platform.build;
3024 if (properties) {
3025 for (let name in properties) {
3026 let value = properties[name];
3027 if (name == "ZEPHYR_BOARD")
3028 this.environment[name] = value;
3029 else if (name == "LIBRARIES" || name == "C_FLAGS") {
3030 if (undefined == this.environment[name])
3031 this.environment[name] = value;
3032 else
3033 this.environment[name] = `${this.environment[name]} ${value}`;
3034 }
3035 else {
3036 if (typeof value == "string") {
3037 let shellValue;
3038 if (name.endsWith(" ?=") && !(name in this.environment)) {
3039 name = name.slice(0, -3);;
3040
3041 shellValue = this.getenv(name);
3042 if (undefined !== shellValue)
3043 value = shellValue;
3044 }
3045 if (undefined === shellValue) {
3046 const dotSlash = "." + this.slash;
3047 value = this.resolveVariable(value);
3048 if (value.startsWith(dotSlash)) {
3049 const path = this.resolveDirectoryPath(dotSlash);
3050 if (path) {
3051 if (dotSlash == value)
3052 value = path;
3053 else
3054 value = path + value.slice(1);
3055 }
3056 }
3057 }
3058 }
3059 this.environment[name] = value;
3060 }
3061 }
3062 }
3063 }
3064 parseManifest(path, manifest) {
3065 let platformInclude;
3066 if (!manifest) {

Callers 1

parseManifestMethod · 0.95

Calls 2

resolveVariableMethod · 0.95
sliceMethod · 0.65

Tested by

no test coverage detected