Uses UE4BuildInterrogator to interrogate UnrealBuildTool about third-party library details
189105
def _getUE4BuildInterrogator(self):
		
		ubtLambda = lambda target, platform, config, args: self._runUnrealBuildTool(target, platform, config, args, True)
		interrogator = UE4BuildInterrogator(self.getEngineRoot(), self._getEngineVersionDetails(), self._getEngineVersionHash(), ubtLambda)
		return interrogator
1123438
def _cleanAndRebuildIfNeeded(portal, cleanrebuild):
    
    for cat in cleanrebuild:
        catalog = getToolByName(portal, cat)
        if catalog:
            if hasattr(catalog, "softClearFindAndRebuild"):
                catalog.softClearFindAndRebuild()
            else:
                catalog.clearFindAndRebuild()
        else:
            logger.warning('%s do not found' % cat)
774574
private List<SourceFile> getBuiltinExterns(CompilerOptions options) {
    try {
      return CommandLineRunner.getBuiltinExterns(options.getEnvironment());
    } catch (IOException e) {
      throw new BuildException(e);
    }
  }
244564
function lookForExternalDependenciesRES( _def, resources, depFile ) {
  if ( !_def ) return;
  try {
    const def = convertExternalDependencyDefinition( _def );
    for ( const dep of Object.keys( def ) ) {
      if ( def[ dep ] === "" ) {
        // `res: { "bob/foo.png": "" }` is equivalent to
        // `res: { "bob/foo.png": "bob/foo.png" }`
        def[ dep ] = dep;
      }
      const
      srcDep = Project.srcOrLibPath( `mod/${dep}` ) ||
        Project.srcOrLibPath( dep );
      if ( !srcDep ) {
        Fatal.fire(
          `Unable to find dependency file "${dep}" nor "mod/${dep}"!`,
          depFile.getAbsoluteFilePath()
        );
      }
      resources[ srcDep ] = Project.wwwPath( def[ dep ] );
    }
  } catch ( ex ) {
    Fatal.fire(
      `Unable to parse RES dependencies: ${JSON.stringify(_def)}!\n${ex}`,
      depFile
    );
  }
}
201817
function ui5CompileLessLib(oFile) {
  const sDestDir = path.dirname(oFile.path)
  const sFileName = oFile.path.split(path.sep).pop()
  const sLessFileContent = oFile.contents.toString('utf8')

  // options for less-openui5
  const oOptions = {
    lessInput: sLessFileContent,
    rootPaths: [sDestDir],
    rtl: true,
    parser: {
      filename: sFileName,
      paths: [sDestDir]
    },
    compiler: { compress: false }
  }

  // build a theme
  const oBuildThemePromise = builder
    .build(oOptions)
    .catch(oError => {
      // CSS build fails in 99% of all cases, because of a missing .less file
      // create empty LESS file and try again if build failed

      // try to parse error message to find out which missing LESS file caused the failed build
      const sMissingFileName = (oError.message.match(
        /((\.*?\/?)*\w.*\.\w+)/g
      ) || [''])[0]
      const sSourceFileName = oError.filename
      const sMissingFilePath = path.resolve(
        sDestDir,
        sSourceFileName.replace('library.source.less', ''),
        sMissingFileName
      )
      let isIssueFixed = false

      // create missing .less file (with empty content), else the library.css can't be created
      if (!fs.existsSync(sMissingFilePath)) {
        try {
          fs.writeFileSync(sMissingFilePath, '')
          isIssueFixed = true
        } catch (e) {
          isIssueFixed = false
        }
      }

      if (!isIssueFixed) {
        // if this error message raises up, the build failed due to the other 1% cases
        return Promise.reject('Compile UI5 less lib: ')
      }

      // if missing file could be created, try theme build again
      return isIssueFixed ? ui5CompileLessLib(oFile) : Promise.reject()
    })
    .then(oResult => {
      // build css content was successfull >> save result
      const aTargetFiles = [
        {
          path: `${sDestDir}/library.css`,
          content: oResult.css
        },
        {
          path: `${sDestDir}/library-RTL.css`,
          content: oResult.cssRtl
        },
        {
          path: `${sDestDir}/library-parameters.json`,
          content:
            JSON.stringify(
              oResult.variables,
              null,
              oOptions.compiler.compress ? 0 : 4
            ) || ''
        }
      ]

      const aWriteFilesPromises = aTargetFiles.map(oFile => {
        return new Promise((resolve, reject) =>
          fs.writeFile(
            oFile.path,
            oFile.content,
            oError => (oError ? reject() : resolve())
          )
        )
      })

      // return promise
      return Promise.all(aWriteFilesPromises)
    })
    .then(() => {
      // clear builder cache when finished to cleanup memory
      builder.clearCache()
      return Promise.resolve()
    })

  return oBuildThemePromise
}
575543
def runtime_to_build(runtime_deps):
    """"""
    build_deps = copy.deepcopy(runtime_deps)
    for dep in build_deps:
        if len(dep) > 0:
            dep[0] = 'BuildRequires'
    return build_deps
856059
private AbstractBuild getBuildForDeprecatedMethods() {
        Executor e = Executor.currentExecutor();
        if(e!=null) {
            Executable exe = e.getCurrentExecutable();
            if (exe instanceof AbstractBuild) {
                AbstractBuild b = (AbstractBuild) exe;
                if(b.getProject()==this)
                    return b;
            }
        }
        R lb = getLastBuild();
        if(lb!=null)    return lb;
        return null;
    }
625269
def getThirdPartyLibCompilerFlags(self, libs):
		
		fmt = PrintingFormat.singleLine()
		if libs[0] == '--multiline':
			fmt = PrintingFormat.multiLine()
			libs = libs[1:]
		
		platformDefaults = True
		if libs[0] == '--nodefaults':
			platformDefaults = False
			libs = libs[1:]
		
		details = self.getThirdpartyLibs(libs, includePlatformDefaults=platformDefaults)
		return details.getCompilerFlags(self.getEngineRoot(), fmt)
809989
def generated?
      xcode_file? ||
      cocoapods? ||
      carthage_build? ||
      generated_graphql_relay? ||
      generated_net_designer_file? ||
      generated_net_specflow_feature_file? ||
      composer_lock? ||
      cargo_lock? ||
      node_modules? ||
      go_vendor? ||
      go_lock? ||
      npm_shrinkwrap_or_package_lock? ||
      godeps? ||
      generated_by_zephir? ||
      minified_files? ||
      has_source_map? ||
      source_map? ||
      compiled_coffeescript? ||
      generated_parser? ||
      generated_net_docfile? ||
      generated_postscript? ||
      compiled_cython_file? ||
      generated_go? ||
      generated_protocol_buffer? ||
      generated_javascript_protocol_buffer? ||
      generated_apache_thrift? ||
      generated_jni_header? ||
      vcr_cassette? ||
      generated_module? ||
      generated_unity3d_meta? ||
      generated_racc? ||
      generated_jflex? ||
      generated_grammarkit? ||
      generated_roxygen2? ||
      generated_pkgdown? ||
      generated_jison? ||
      generated_grpc_cpp? ||
      generated_dart? ||
      generated_perl_ppport_header? ||
      generated_gamemakerstudio?
    end
571268
def raise_unresolved_targets(build_context, conf, unknown_seeds, seed_refs):
    """"""

    def format_target(target_name):
        # TODO: suggest similar known target names
        build_module = split_build_module(target_name)
        return '{} (in {})'.format(target_name,
                                   conf.get_build_file_path(build_module))

    def format_unresolved(seed):
        if seed not in seed_refs:
            return seed
        seed_ref = seed_refs[seed]
        reasons = []
        if seed_ref.on_cli:
            reasons.append('seen on command line')
        if seed_ref.from_default:
            reasons.append('specified as default target in {}'
                           .format(conf.get_project_build_file))
        if seed_ref.dep_of:
            reasons.append(
                'dependency of ' +
                ', '.join(format_target(target_name)
                          for target_name in sorted(seed_ref.dep_of)))
        if seed_ref.buildenv_of:
            reasons.append(
                'buildenv of ' +
                ', '.join(format_target(target_name)
                          for target_name in sorted(seed_ref.buildenv_of)))

        return '{} - {}'.format(seed, ', '.join(reasons))

    unresolved_str = '\n'.join(format_unresolved(target_name)
                               for target_name in sorted(unknown_seeds))
    num_target_str = '{} target'.format(len(unknown_seeds))
    if len(unknown_seeds) > 1:
        num_target_str += 's'
    raise ValueError('Could not resolve {}:\n{}'
                     .format(num_target_str, unresolved_str))
1329255
function getBuildFactory(build) {
  return function createBuild(inputpath, outputname) {
    const input = path.relative(process.cwd(), inputpath);
    let parent = build;

    if (!parent.builds.some(build => build.input == input)) {
      const outputpath = path.join(path.dirname(parent.outputpaths[0]), outputname);
      const buildConfig = {
        batch: parent.batch,
        boilerplate: false,
        bootstrap: false,
        browser: parent.browser,
        bundle: parent.bundle,
        fileCache: parent.fileCache,
        index: ++numBuilds,
        input,
        inputpaths: [inputpath],
        isAppServer: false,
        isDynamicBuild: true,
        label: '',
        level: parent.level + 1,
        output: path.relative(process.cwd(), path.dirname(outputpath)),
        outputpaths: [outputpath],
        parent,
        resolverCache: parent.resolverCache,
        runtimeOptions: parent.runtimeOptions,
        type: parent.type,
        watchOnly: parent.watchOnly
      };
      const build = buildFactory(buildConfig);

      build.fileFactoryOptions = getFileFactoryOptions(
        build,
        parent,
        null,
        null,
        Object.assign({}, parent.fileFactoryOptions)
      );
      build.fileFactory = build.fileFactoryOptions.fileFactory;
      parent.builds.push(build);
      parent.childInputpaths.push(inputpath);
    }

    // Find root build
    while (parent.parent)
      parent = parent.parent;
    parent.processFilesOptions.importBoilerplate = true;
  };
}
1106164
public BaseFunction getBuiltinCtor(Builtins type) {
        return ctors != null ? ctors.get(type) : null;
    }
696848
def check_install_build_global(options, check_options=None):
    # type: (Values, Optional[Values]) -> None
    
    if check_options is None:
        check_options = options

    def getname(n):
        return getattr(check_options, n, None)
    names = ["build_options", "global_options", "install_options"]
    if any(map(getname, names)):
        control = options.format_control
        control.disallow_binaries()
        warnings.warn(
            'Disabling all use of wheels due to the use of --build-options '
            '/ --global-options / --install-options.', stacklevel=2,
        )
330445
public static String[] getBuildInfoFromJar(InMemoryJarfile jarfile)
            throws IOException
    {
        // Read the raw build info bytes.
        byte[] buildInfoBytes = jarfile.get(CATALOG_BUILDINFO_FILENAME);
        if (buildInfoBytes == null) {
            throw new IOException("Catalog build information not found - please build your application using the current version of VoltDB.");
        }

        // Convert the bytes to a string and split by lines.
        String buildInfo;
        buildInfo = new String(buildInfoBytes, Constants.UTF8ENCODING);
        String[] buildInfoLines = buildInfo.split("\n");

        // Sanity check the number of lines and the version string.
        if (buildInfoLines.length < 1) {
            throw new IOException("Catalog build info has no version string.");
        }
        String versionFromCatalog = buildInfoLines[0].trim();
        if (!CatalogUtil.isCatalogVersionValid(versionFromCatalog)) {
            throw new IOException(String.format(
                    "Catalog build info version (%s) is bad.", versionFromCatalog));
        }

        // Trim leading/trailing whitespace.
        for (int i = 0; i < buildInfoLines.length; ++i) {
            buildInfoLines[i] = buildInfoLines[i].trim();
        }

        return buildInfoLines;
    }
651426
@Nonnull
	public static LBoolIntConsumer boolIntConsumerFrom(Consumer<LBoolIntConsumerBuilder> buildingFunction) {
		LBoolIntConsumerBuilder builder = new LBoolIntConsumerBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
986769
def use_built_igraph(self):
        """"""
        buildcfg.include_dirs = [os.path.join("igraphcore", "include")]
        buildcfg.library_dirs = [os.path.join("igraphcore", "lib")]
        buildcfg.static_extension = True

        buildcfg_file = os.path.join("igraphcore", "build.cfg")
        if os.path.exists(buildcfg_file):
            buildcfg.libraries = eval(open(buildcfg_file).read())
63630
function assertValidBuildType(value, name, description) {
  if ((value != common.DEBUG) && (value != common.RELEASE)) {
    throw new Error('Invalid build type: <' + value + '>, must be ' +
        'closureProBuild.DEBUG or closureProBuild.RELEASE');
  }
}