Determines final build properties, generates sources,
        and calls 'construct'. This method should not be
        overridden.
327690
def generate (self, ps):
        
        assert isinstance(ps, property_set.PropertySet)
        self.manager_.errors().push_user_context(
            "Generating target " + self.full_name(), self.user_context_)

        if self.manager().targets().logging():
            self.manager().targets().log(
                "Building target '%s'" % self.name_)
            self.manager().targets().increase_indent ()
            self.manager().targets().log(
                "Build request: '%s'" % str (ps.raw ()))
            cf = self.manager().command_line_free_features()
            self.manager().targets().log(
                "Command line free features: '%s'" % str (cf.raw ()))
            self.manager().targets().log(
                "Target requirements: %s'" % str (self.requirements().raw ()))

        self.manager().targets().push_target(self)

        if ps not in self.generated_:

            # Apply free features form the command line.  If user
            # said
            #   define=FOO
            # he most likely want this define to be set for all compiles.
            ps = ps.refine(self.manager().command_line_free_features())
            rproperties = self.common_properties (ps, self.requirements_)

            self.manager().targets().log(
                "Common properties are '%s'" % str (rproperties))

            if rproperties.get("<build>") != ["no"]:

                result = GenerateResult ()

                properties = rproperties.non_dependency ()

                (p, u) = self.generate_dependency_properties (rproperties.dependency (), rproperties)
                properties += p
                assert all(isinstance(p, property.Property) for p in properties)
                usage_requirements = u

                (source_targets, u) = self.generate_dependency_targets (self.sources_, rproperties)
                usage_requirements += u

                self.manager_.targets().log(
                    "Usage requirements for '%s' are '%s'" % (self.name_, usage_requirements))

                # FIXME:

                rproperties = property_set.create(properties + usage_requirements)
                usage_requirements = property_set.create (usage_requirements)

                self.manager_.targets().log(
                    "Build properties: '%s'" % str(rproperties))

                source_targets += rproperties.get('<source>')

                # We might get duplicate sources, for example if
                # we link to two library which have the same <library> in
                # usage requirements.
                # Use stable sort, since for some targets the order is
                # important. E.g. RUN_PY target need python source to come
                # first.
                source_targets = unique(source_targets, stable=True)

                # FIXME: figure why this call messes up source_targets in-place
                result = self.construct (self.name_, source_targets[:], rproperties)

                if result:
                    assert len(result) == 2
                    gur = result [0]
                    result = result [1]

                    if self.always_:
                        for t in result:
                            t.always()

                    s = self.create_subvariant (
                        result,
                        self.manager().virtual_targets().recent_targets(), ps,
                        source_targets, rproperties, usage_requirements)
                    self.manager().virtual_targets().clear_recent_targets()

                    ur = self.compute_usage_requirements (s)
                    ur = ur.add (gur)
                    s.set_usage_requirements (ur)

                    self.manager_.targets().log (
                        "Usage requirements from '%s' are '%s'" %
                        (self.name(), str(rproperties)))

                    self.generated_[ps] = GenerateResult (ur, result)
                else:
                    self.generated_[ps] = GenerateResult (property_set.empty(), [])
            else:
                # If we just see <build>no, we cannot produce any reasonable
                # diagnostics. The code that adds this property is expected
                # to explain why a target is not built, for example using
                # the configure.log-component-configuration function.

                # If this target fails to build, add <build>no to properties
                # to cause any parent target to fail to build.  Except that it
                # - does not work now, since we check for <build>no only in
                #   common properties, but not in properties that came from
                #   dependencies
                # - it's not clear if that's a good idea anyway.  The alias
                #   target, for example, should not fail to build if a dependency
                #   fails.
                self.generated_[ps] = GenerateResult(
                    property_set.create(["<build>no"]), [])
        else:
            self.manager().targets().log ("Already built")

        self.manager().targets().pop_target()
        self.manager().targets().decrease_indent()

        return self.generated_[ps]
1315031
public void build(final GroovyObject builder) {
        final String[] s = getStrings();
        final int numberOfValues = values.length;

        for (int i = 0, size = s.length; i < size; i++) {
            builder.getProperty("mkp");
            builder.invokeMethod("yield", new Object[]{s[i]});
            if (i < numberOfValues) {
                builder.getProperty("mkp");
                builder.invokeMethod("yield", new Object[]{values[i]});
            }
        }
    }
83354
@Override
	public void afterPropertiesSet() {

		super.afterPropertiesSet();
		compiler = new DefaultLessCompiler();
		lessConfig = new Configuration();
		lessConfig.getSourceMapConfiguration().setLinkSourceMap(false);
	}
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
987492
def build(self, builder):
        """"""
        params = dict(
            OID=self.oid,
            Active=bool_to_true_false(self.active),
            BypassDuringMigration=bool_to_true_false(self.bypass_during_migration),
            NeedsRetesting=bool_to_true_false(self.needs_retesting),
        )

        if self.variable_oid is not None:
            params["VariableOID"] = self.variable_oid

        if self.field_oid is not None:
            params["FieldOID"] = self.field_oid

        if self.form_oid is not None:
            params["FormOID"] = self.form_oid

        if self.folder_oid is not None:
            params["FolderOID"] = self.folder_oid

        if self.record_position is not None:
            params["RecordPosition"] = str(self.record_position)

        if self.form_repeat_number is not None:
            params["FormRepeatNumber"] = str(self.form_repeat_number)

        if self.folder_repeat_number is not None:
            params["FolderRepeatNumber"] = str(self.folder_repeat_number)

        if self.all_variables_in_folders is not None:
            params["AllVariablesInFolders"] = bool_to_true_false(
                self.all_variables_in_folders
            )

        if self.all_variables_in_fields is not None:
            params["AllVariablesInFields"] = bool_to_true_false(
                self.all_variables_in_fields
            )

        if self.logical_record_position is not None:
            params["LogicalRecordPosition"] = self.logical_record_position.value

        builder.start("mdsol:DerivationDef", params)
        for step in self.derivation_steps:
            step.build(builder)
        builder.end("mdsol:DerivationDef")
450883
private void generateConstructor() {
    Method constructor = getMethod(void.class, "<init>", Schema.class, FieldAccessorFactory.class);

    // Constructor(Schema schema, FieldAccessorFactory accessorFactory)
    GeneratorAdapter mg = new GeneratorAdapter(Opcodes.ACC_PUBLIC, constructor, null, null, classWriter);

    // super(); // Calling Object constructor
    mg.loadThis();
    mg.invokeConstructor(Type.getType(Object.class), getMethod(void.class, "<init>"));

    // if (!SCHEMA_HASH.equals(schema.getSchemaHash().toString())) { throw IllegalArgumentException }
    mg.getStatic(classType, "SCHEMA_HASH", Type.getType(String.class));
    mg.loadArg(0);
    mg.invokeVirtual(Type.getType(Schema.class), getMethod(SchemaHash.class, "getSchemaHash"));
    mg.invokeVirtual(Type.getType(SchemaHash.class), getMethod(String.class, "toString"));
    mg.invokeVirtual(Type.getType(String.class), getMethod(boolean.class, "equals", Object.class));
    Label hashEquals = mg.newLabel();
    mg.ifZCmp(GeneratorAdapter.NE, hashEquals);
    mg.throwException(Type.getType(IllegalArgumentException.class), "Schema not match.");
    mg.mark(hashEquals);

    // this.schema = schema;
    mg.loadThis();
    mg.loadArg(0);
    mg.putField(classType, "schema", Type.getType(Schema.class));

    // For each record field that needs an accessor, get the accessor and store it in field.
    for (Map.Entry<TypeToken<?>, String> entry : fieldAccessorRequests.entries()) {
      String fieldAccessorName = getFieldAccessorName(entry.getKey(), entry.getValue());

      classWriter.visitField(Opcodes.ACC_PRIVATE + Opcodes.ACC_FINAL,
                             fieldAccessorName,
                             Type.getDescriptor(FieldAccessor.class), null, null);
      // this.fieldAccessorName
      //  = accessorFactory.getFieldAccessor(TypeToken.of(Class.forName("className")), "fieldName");
      mg.loadThis();
      mg.loadArg(1);
      mg.push(entry.getKey().getRawType().getName());
      mg.invokeStatic(Type.getType(Class.class), getMethod(Class.class, "forName", String.class));
      mg.invokeStatic(Type.getType(TypeToken.class), getMethod(TypeToken.class, "of", Class.class));
      mg.push(entry.getValue());
      mg.invokeInterface(Type.getType(FieldAccessorFactory.class),
                         getMethod(FieldAccessor.class, "getFieldAccessor", TypeToken.class, String.class));
      mg.putField(classType, fieldAccessorName, Type.getType(FieldAccessor.class));
    }

    mg.returnValue();
    mg.endMethod();
  }
756804
private void generateSources() {
        try {
            ExecutorService pool = Executors.newFixedThreadPool(context.getSettings().getNbThread());

            for (Java4CppType type : context.getClassesAlreadyDone()) {
                Class<?> clazz = type.getRawClass();
                if (isValid(clazz)) {
                    pool.execute(new SourceExecutor(context, type));
                }
            }

            pool.shutdown();
            while (!pool.isTerminated()) {
                pool.awaitTermination(TIMEOUT, TimeUnit.MILLISECONDS);
            }
        } catch (InterruptedException e) {
            throw new RuntimeException("Interrupted " + e.getMessage());
        }
    }
301385
View build() throws IOException {
        final Class<? extends T> proxyClass = generateProxyClass();
        if (proxyClass == null) {
            return null;
        }

        final Constructor<? extends T> constructor = getProxyClassConstructor(proxyClass);

        final View result;
        try {
            result = constructor.newInstance(CONSTRUCTOR_ARG_VALUES);
        } catch (InstantiationException e) {
            // Should not be thrown, generated class is not abstract.
            throw new AssertionError(e);
        } catch (IllegalAccessException e) {
            // Should not be thrown, the generated constructor is accessible.
            throw new AssertionError(e);
        } catch (InvocationTargetException e) {
            // Thrown when the base class constructor throws an exception.
            throw launderCause(e);
        }

        ((ViewProxy) result).setInterceptor(mInterceptor);
        return result;
    }
931788
String build() throws IOException {

		if (built) {
			// Can call build only once per instance
			throw new IllegalStateException();
		}
		built = true;

		Map<String, String> moduleCacheInfo = null;
		if (request.getAttribute(LayerImpl.LAYERCACHEINFO_PROPNAME) != null) {
			moduleCacheInfo = new HashMap<String, String>();
			request.setAttribute(IModuleCache.MODULECACHEINFO_PROPNAME, moduleCacheInfo);
		}

		if (RequestUtil.isDependencyExpansionLogging(request)) {
			DependencyList depList = (DependencyList)request.getAttribute(LayerImpl.EXPANDEDDEPS_PROPNAME);
			if (depList != null) {
				// Output dependency expansion logging
				writer.append(dependencyExpansionLogging(depList));
			}
		}

		List<ModuleBuildFuture> futures = collectFutures(moduleList, request);
		SortedReaders sorted = new SortedReaders(futures, request);

		/*
		 * Set layer dependent features attribute.  The build readers add the layer dependent features
		 * to this collection as they are read.
		 */
		request.setAttribute(ILayer.DEPENDENT_FEATURES, dependentFeatures);

		writer.append(notifyLayerListeners(EventType.BEGIN_LAYER, request, null));
		addTransportContribution(LayerContributionType.BEGIN_RESPONSE, null);

		// Add script files to the layer first.  Scripts have no transport contribution
		for (Map.Entry<IModule, ModuleBuildReader> entry : sorted.getScripts().entrySet()) {
			processReader(entry.getKey(), entry.getValue());
		}
		if (sorted.getCacheEntries().size() > 0 || sorted.getModules().size() > 0) {
			writer.append(notifyLayerListeners(EventType.BEGIN_AMD, request, null));

			// Now add the loader cache entries.
			if (sorted.getCacheEntries().size() > 0) {
				addTransportContribution(LayerContributionType.BEGIN_LAYER_MODULES, moduleList.getRequiredModules());
				int i = 0;
				for (Map.Entry<IModule, ModuleBuildReader> entry : sorted.getCacheEntries().entrySet()) {
					writer.append(notifyLayerListeners(EventType.BEGIN_MODULE, request, entry.getKey()));
					ModuleInfo info = new ModuleInfo(entry.getKey().getModuleId(), entry.getValue().isScript());
					LayerContributionType type = (i++ == 0) ? LayerContributionType.BEFORE_FIRST_LAYER_MODULE : LayerContributionType.BEFORE_SUBSEQUENT_LAYER_MODULE;
					addTransportContribution(type, info);
					processReader(entry.getKey(), entry.getValue());
					addTransportContribution(LayerContributionType.AFTER_LAYER_MODULE, info);
				}
				addTransportContribution(LayerContributionType.END_LAYER_MODULES, moduleList.getRequiredModules());
			}

			// Now add the loader requested modules
			if (sorted.getModules().size() > 0) {
				Set<String> mids = new LinkedHashSet<String>();
				for (IModule module : sorted.getModules().keySet()) {
					mids.add(module.getModuleId());
				}
				addTransportContribution(LayerContributionType.BEGIN_MODULES, mids);
				int i = 0;
				for (Map.Entry<IModule, ModuleBuildReader> entry : sorted.getModules().entrySet()) {
					writer.append(notifyLayerListeners(EventType.BEGIN_MODULE, request, entry.getKey()));
					ModuleInfo info = new ModuleInfo(entry.getKey().getModuleId(), entry.getValue().isScript());
					LayerContributionType type = (i++ == 0) ? LayerContributionType.BEFORE_FIRST_MODULE : LayerContributionType.BEFORE_SUBSEQUENT_MODULE;
					addTransportContribution(type, info);
					processReader(entry.getKey(), entry.getValue());
					addTransportContribution(LayerContributionType.AFTER_MODULE, info);
				}
				addTransportContribution(LayerContributionType.END_MODULES, mids);
			}
		}
 		writer.append(notifyLayerListeners(EventType.END_LAYER, request, null));
		addTransportContribution(LayerContributionType.END_RESPONSE, null);

		moduleList.getDependentFeatures().addAll(dependentFeatures);

		// Output any messages to the console if debug mode is enabled
		if (options.isDebugMode() || options.isDevelopmentMode()) {
			for (String errorMsg : errorMessages) {
				writer.append("\r\nconsole.error(\"" + errorMsg + "\");"); //$NON-NLS-1$ //$NON-NLS-2$
			}
			for (String msg : nonErrorMessages) {
				writer.append("\r\nconsole.warn(\"" + msg + "\");"); //$NON-NLS-1$ //$NON-NLS-2$
			}
		}
		// Help out the GC
		sorted.clear();
		futures.clear();
		layerListenerModuleList.clear();

		if (sectionCount > 0) {
			// If any of the modules in the layer contained source map info, then
			// create a source map for the layer and include the source mapping URL
			// in the response.
			writer.append("\n").append(getSourcesMappingEpilogue()); //$NON-NLS-1$
			finalizeSourceMap();
		}

		return writer.toString();
	}
1305475
function build(projectInfo, backendProject, callback){
    if(isNewBuildNeeded(projectInfo)){
        console.log('   generating backend project content')
        backendContentManager.generateContents(projectInfo, backendProject, function(){
            console.log('   done')
            if(callback){
                callback(true)
            }
        })
    }else{
        if(callback){
            callback(false)
        }
    }
}
571887
public org.inferred.freebuilder.processor.property.Property build() {
    Preconditions.checkState(_unsetProperties.isEmpty(), "Not set: %s", _unsetProperties);
    return new Value(this);
  }
273469
protected void makeConstructorDoc(MethodSymbol meth, TreePath treePath) {
        ConstructorDocImpl result = (ConstructorDocImpl)methodMap.get(meth);
        if (result != null) {
            if (treePath != null) result.setTreePath(treePath);
        } else {
            result = new ConstructorDocImpl(this, meth, treePath);
            methodMap.put(meth, result);
        }
    }
431555
private void generateConstructor(SQLiteDatabaseSchema schema) {
		// constructor
		MethodSpec.Builder methodBuilder = MethodSpec.constructorBuilder()
				.addParameter(DataSourceOptions.class, "options").addModifiers(Modifier.PROTECTED);
		methodBuilder.addStatement("super($S, $L, options)", schema.fileName, schema.version);
		classBuilder.addMethod(methodBuilder.build());
	}
761511
def generate_project(self):
        
        # checks needed properties
        if not self.name or not self.destdir or \
               not os.path.isdir(self.destdir):
            raise ValueError("Empty or invalid property values: run with 'help' command")

        _log("Generating project '%s'" % self.name)
        _log("Destination directory is: '%s'" % self.destdir)

        top = os.path.join(self.destdir, self.name)
        src = os.path.join(top, self.src_name)
        resources = os.path.join(top, self.res_name)
        utils = os.path.join(src, "utils")

        if self.complex:
            models = os.path.join(src, "models")
            ctrls = os.path.join(src, "ctrls")
            views = os.path.join(src, "views")
        else: models = ctrls = views = src

        res = self.__generate_tree(top, src, resources, models, ctrls, views, utils)
        res = self.__generate_classes(models, ctrls, views) or res
        res = self.__mksrc(os.path.join(utils, "globals.py"), templates.glob) or res

        if self.complex: self.templ.update({'model_import' : "from models.application import ApplModel",
                                            'ctrl_import' : "from ctrls.application import ApplCtrl",
                                            'view_import' : "from views.application import ApplView"})
        else: self.templ.update({'model_import' : "from ApplModel import ApplModel",
                                 'ctrl_import' : "from ApplCtrl import ApplCtrl",
                                 'view_import' : "from ApplView import ApplView"})

        res = self.__mksrc(os.path.join(top, "%s.py" % self.name), templates.main) or res

        # builder file
        if self.builder:
            res = self.__generate_builder(resources) or res

        if self.dist_gtkmvc3: res = self.__copy_framework(os.path.join(resources, "external")) or res

        if not res: _log("No actions were taken")
        else: _log("Done")
        return res
267469
def finalize_builder(tc)
      tc.build_operation[:builder].finalize(
        tc.build_operation.merge(
          command_status: tc.thread.value,
          tc: tc))
    end
949353
void init(BuildSource source) {
        this.sqlInfo = source.getSqlInfo();
        this.join = sqlInfo.getJoin();
        this.params = sqlInfo.getParams();
        this.context = source.getParamObj();
        this.prefix = source.getPrefix();
        this.suffix = source.getSuffix();
    }
1141006
def build(filenames, uri, cl_args, link_args, x64, native):
    
    logging.info(_('This is source file building mode.'))
    logging.debug(_('filenames: %s'), filenames)
    logging.debug(_('uri: %s'), uri)
    logging.debug(_('cl_args: %s'), cl_args)
    logging.debug(_('link_args: %s'), link_args)
    logging.debug(_('native: %s'), native)
    logging.debug(_('x64: %s'), x64)

    if is_windows():
        pass
        # ret = msbuild(uri, native, list(filenames), x64=x64,
        #               cl_args=cl_args, link_args=link_args)
    else:
        builder = LinuxBuilder()
        ret = builder.build(filenames, x64, 'src', 'out')
    sys.exit(ret)