Generate the cdef output file
183943
def generate_cdef():
    """"""
    include_libc_path = path.join(HERE, 'fake_libc_include')
    include_vulkan_path = path.join(HERE, 'vulkan_include')
    out_file = path.join(HERE, path.pardir, 'vulkan', 'vulkan.cdef.h')
    header = path.join(include_vulkan_path, 'vulkan.h')

    command = ['cpp',
               '-std=c99',
               '-P',
               '-nostdinc',
               '-I' + include_libc_path,
               '-I' + include_vulkan_path,
               '-o' + out_file,
               '-DVK_USE_PLATFORM_XCB_KHR',
               '-DVK_USE_PLATFORM_WAYLAND_KHR',
               '-DVK_USE_PLATFORM_ANDROID_KHR',
               '-DVK_USE_PLATFORM_WIN32_KHR',
               '-DVK_USE_PLATFORM_XLIB_KHR',
               header]
    subprocess.run(command, check=True)
354528
def generate(env):
    """"""
    path, cxx, shcxx, version = get_cppc(env)
    if path:
        cxx = os.path.join(path, cxx)
        shcxx = os.path.join(path, shcxx)

    cplusplus.generate(env)

    env['CXX'] = cxx
    env['SHCXX'] = shcxx
    env['CXXVERSION'] = version
    env['SHCXXFLAGS']   = SCons.Util.CLVar('$CXXFLAGS -KPIC')
    env['SHOBJPREFIX']  = 'so_'
    env['SHOBJSUFFIX']  = '.o'
884016
def generate(env):
   
   doxyfile_scanner = env.Scanner(
      DoxySourceScan,
      "DoxySourceScan",
      scan_check = DoxySourceScanCheck,
   )

   import SCons.Builder
   doxyfile_builder = SCons.Builder.Builder(
      action = "cd ${SOURCE.dir}  &&  ${DOXYGEN} ${SOURCE.file}",
      emitter = DoxyEmitter,
      target_factory = env.fs.Entry,
      single_source = True,
      source_scanner =  doxyfile_scanner,
   )

   env.Append(BUILDERS = {
      'Doxygen': doxyfile_builder,
   })

   env.AppendUnique(
      DOXYGEN = 'doxygen',
   )
787152
function generateImports (context) {
  const { files, tree } = getPageData(context)

  store.state.components = tree

  const output = files
    .slice()
    .map(file => `import '@/${file}'`)
    .join('\n')

  fs.ensureDirSync(path.join(context, '.temp'))
  fs.writeFileSync(path.join(context, '.temp/html.js'), output)
}
1352838
def generate(env):
    
    static_obj, shared_obj = SCons.Tool.createObjBuilders(env)

    for suffix in CSuffixes:
        static_obj.add_action(suffix, SCons.Defaults.CAction)
        shared_obj.add_action(suffix, SCons.Defaults.ShCAction)
        static_obj.add_emitter(suffix, SCons.Defaults.StaticObjectEmitter)
        shared_obj.add_emitter(suffix, SCons.Defaults.SharedObjectEmitter)

    add_common_cc_variables(env)

    if 'CC' not in env:
        env['CC']    = env.Detect(compilers) or compilers[0]
    env['CFLAGS']    = SCons.Util.CLVar('')
    env['CCCOM']     = '$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES'
    env['SHCC']      = '$CC'
    env['SHCFLAGS'] = SCons.Util.CLVar('$CFLAGS')
    env['SHCCCOM']   = '$SHCC -o $TARGET -c $SHCFLAGS $SHCCFLAGS $_CCCOMCOM $SOURCES'

    env['CPPDEFPREFIX']  = '-D'
    env['CPPDEFSUFFIX']  = ''
    env['INCPREFIX']  = '-I'
    env['INCSUFFIX']  = ''
    env['SHOBJSUFFIX'] = '.os'
    env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 0

    env['CFILESUFFIX'] = '.c'
913045
def dump
      puts '******************'
      puts '* RakeOE::Config *'
      puts '******************'
      puts "Directories                 : #{@directories}"
      puts "Suffixes                    : #{@suffixes}"
      puts "Platform                    : #{@platform}"
      puts "Release mode                : #{@release}"
      puts "Test framework              : #{@test_fw}"
      puts "Optimization dbg            : #{@optimization_dbg}"
      puts "Optimization release        : #{@optimization_release}"
      puts "Language Standard for C     : #{@language_std_c}"
      puts "Language Standard for C++   : #{@language_std_cpp}"
      puts "Software version string     : #{@sw_version}"
      puts "Generate bin file           : #{@generate_bin}"
      puts "Generate hex file           : #{@generate_hex}"
      puts "Generate map file           : #{@generate_map}"
      puts "Strip objects               : #{@stripped}"
    end
678993
def gen_file_jinja(self, template_file, data, output, dest_path):
        if not os.path.exists(dest_path):
            os.makedirs(dest_path)
        output = join(dest_path, output)
        logger.debug("Generating: %s" % output)

        
        env = Environment()
        env.loader = FileSystemLoader(self.TEMPLATE_DIR)
        # TODO: undefined=StrictUndefined - this needs fixes in templates
        template = env.get_template(template_file)
        target_text = template.render(data)

        open(output, "w").write(target_text)
        return dirname(output), output
586642
def generate(env):
    """"""
    import SCons.Defaults
    import SCons.Tool

    set_vars(env)

    static_obj, shared_obj = SCons.Tool.createObjBuilders(env)

    for suffix in CSuffixes:
        static_obj.add_action(suffix, SCons.Defaults.CAction)
        shared_obj.add_action(suffix, SCons.Defaults.ShCAction)

    for suffix in CXXSuffixes:
        static_obj.add_action(suffix, SCons.Defaults.CXXAction)
        shared_obj.add_action(suffix, SCons.Defaults.ShCXXAction)

    env['CCCOMFLAGS'] = '$CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -nolink -o $TARGET $SOURCES'

    env['CC']         = 'mwcc'
    env['CCCOM']      = '$CC $CFLAGS $CCFLAGS $CCCOMFLAGS'

    env['CXX']        = 'mwcc'
    env['CXXCOM']     = '$CXX $CXXFLAGS $CCCOMFLAGS'

    env['SHCC']       = '$CC'
    env['SHCCFLAGS']  = '$CCFLAGS'
    env['SHCFLAGS']   = '$CFLAGS'
    env['SHCCCOM']    = '$SHCC $SHCFLAGS $SHCCFLAGS $CCCOMFLAGS'

    env['SHCXX']       = '$CXX'
    env['SHCXXFLAGS']  = '$CXXFLAGS'
    env['SHCXXCOM']    = '$SHCXX $SHCXXFLAGS $CCCOMFLAGS'

    env['CFILESUFFIX'] = '.c'
    env['CXXFILESUFFIX'] = '.cpp'
    env['CPPDEFPREFIX']  = '-D'
    env['CPPDEFSUFFIX']  = ''
    env['INCPREFIX']  = '-I'
    env['INCSUFFIX']  = ''
452171
def cdf(data,mode='continuous',**kwargs):
  '''

  '''

  return ( np.linspace(0.0,1.0,len(data)), np.sort(data) )
930700
def GenerateFile(self, input_filename=None, output_filename=None):
    """"""
    if input_filename is None:
      input_filename = output_filename + ".in"
    if output_filename[-3:] == ".in":
      output_filename = output_filename[:-3]
    logging.debug("Generating file %s from %s", output_filename, input_filename)

    with io.open(input_filename, "r") as fd:
      data = fd.read()

    with io.open(output_filename, "w") as fd:
      fd.write(config.CONFIG.InterpolateValue(data, context=self.context))
1282294
function fileToOutput(output, filePath) {
    var book = output.getBook();
    var readme = book.getReadme();
    var fileReadme = readme.getFile();

    if (
        path.basename(filePath, path.extname(filePath)) == 'README' ||
        (fileReadme.exists() && filePath == fileReadme.getPath())
    ) {
        filePath = path.join(path.dirname(filePath), 'index' + OUTPUT_EXTENSION);
    } else {
        filePath = PathUtils.setExtension(filePath, OUTPUT_EXTENSION);
    }

    return LocationUtils.normalize(filePath);
}
220104
def generate_text_files(in_dir, out_dir, include_header=False):
    
    for cable in cables_from_source(in_dir):
        out = codecs.open(out_dir + '/' + cable.reference_id + '.txt', 'wb', encoding='utf-8')
        out.write(cable_to_text(cable, include_header))
        out.close()
393554
public function cmdGetFile()
    {
        $result = $this->getListFile();
        $this->outputFormat($result);
        $this->outputFormatTableFile($result);
        $this->output();
    }
845996
void generatePackageInfo(Definition def, String outputDir, String subDir)
   {
      try
      {
         FileWriter fw;
         PackageInfoGen phGen;
         if (outputDir.equals("test"))
         {
            fw = Utils.createTestFile("package-info.java", def.getRaPackage(), def.getOutputDir());
            phGen = new PackageInfoGen();

         }
         else
         {

            if (subDir == null)
            {
               fw = Utils.createSrcFile("package-info.java", def.getRaPackage(), def.getOutputDir());
               phGen = new PackageInfoGen();
            }
            else
            {
               fw = Utils.createSrcFile("package-info.java", def.getRaPackage() + "." + subDir, def.getOutputDir());
               phGen = new PackageInfoGen(subDir);
            }
         }
         phGen.generate(def, fw);
         fw.close();
      }
      catch (IOException ioe)
      {
         ioe.printStackTrace();
      }
   }
455394
def gen_cmake_command(config):
    
    from autocmake.extract import extract_list

    s = []
    s.append("\n\ndef gen_cmake_command(options, arguments):")
    s.append('    """')
    s.append("    Generate CMake command based on options and arguments.")
    s.append('    """')
    s.append("    command = []")

    for env in config['export']:
        s.append('    command.append({0})'.format(env))

    s.append("    command.append(arguments['--cmake-executable'])")

    for definition in config['define']:
        s.append('    command.append({0})'.format(definition))

    s.append("    command.append('-DCMAKE_BUILD_TYPE={0}'.format(arguments['--type']))")
    s.append("    command.append('-G\"{0}\"'.format(arguments['--generator']))")
    s.append("    if arguments['--cmake-options'] != \"''\":")
    s.append("        command.append(arguments['--cmake-options'])")
    s.append("    if arguments['--prefix']:")
    s.append("        command.append('-DCMAKE_INSTALL_PREFIX=\"{0}\"'.format(arguments['--prefix']))")

    s.append("\n    return ' '.join(command)")

    return '\n'.join(s)
1323690
def write_files(self, jdoc, output_dir):
        ''''''

        #get all distinct schema names from jdoc:
        schemas = [j for j in jdoc if j.object_type == 'schema']
        schemas = [j for j in schemas if len([x for x in jdoc if x.object_type != 'schema' and x.schema_name == j.object_name]) > 0]
        if not os.path.exists(output_dir):
            os.makedirs(output_dir)
        try:
            shutil.copytree(self.template_dir + os.sep + 'styles',
                            output_dir + os.sep + 'styles')
        except FileExistsError:
            None
        for schema in schemas:
            with open(output_dir + os.sep + schema.object_name + '.html', 'w') as f:
                f.write(self.generate_html(jdoc, schema, schemas))
        with open(output_dir + os.sep + 'index.html', 'w') as f:
            f.write(self.generate_index(schemas))
1097302
def generate(env):
    """"""
    link.generate(env)

    if env['PLATFORM'] == 'hpux':
        env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -shared -fPIC')

    # __RPATH is set to $_RPATH in the platform specification if that
    # platform supports it.
    env['RPATHPREFIX'] = '-Wl,-rpath='
    env['RPATHSUFFIX'] = ''
    env['_RPATH'] = '${_concat(RPATHPREFIX, RPATH, RPATHSUFFIX, __env__)}'

    # OpenBSD doesn't usually use SONAME for libraries
    use_soname = not sys.platform.startswith('openbsd')
    link._setup_versioned_lib_variables(env, tool = 'gnulink', use_soname = use_soname)
    env['LINKCALLBACKS'] = link._versioned_lib_callbacks()

    # For backward-compatibility with older SCons versions
    env['SHLIBVERSIONFLAGS'] = SCons.Util.CLVar('-Wl,-Bsymbolic')