Exemple #1
0
func (self *Runtime) makeRuleNodes(astrule *dsl.ASTBuildRule) (
	targets, sources []dag.Node, errs []error) {

	// Evaluate the target and source lists, so we get one FuObject
	// each. It might be a string, a list of strings, a FinderNode...
	// anything, really.
	var targetobj, sourceobj types.FuObject
	targetobj, errs = self.evaluate(astrule.Targets())
	if len(errs) > 0 {
		return
	}
	sourceobj, errs = self.evaluate(astrule.Sources())
	if len(errs) > 0 {
		return
	}

	// Convert each of those FuObjects to a list of DAG nodes.
	targets = self.nodify(targetobj)
	sources = self.nodify(sourceobj)
	return
}