lib/make.js
function addDepsToRequiredTargets(target, parents){
        if (parents.have(target)){
            callback(new Error("Circular dependencies detected"));
            return;
        }
        requiredTargets.add(target);
        parents.add(target);
        for(var deps in makeInst.targets[target].dependsOn.hash){
            addDepsToRequiredTargets(deps, parents.clone());
        }
    }
function addDepsToRequiredTargets(target, parents){
        if (parents.have(target)){
            callback(new Error("Circular dependencies detected"));
            return;
        }
        requiredTargets.add(target);
        parents.add(target);
        for(var deps in makeInst.targets[target].dependsOn.hash){
            addDepsToRequiredTargets(deps, parents.clone());
        }
    }
function addDepsToRequiredTargets ( target , parents ) { if ( parents . have ( target ) ) { callback ( new Error ( "Circular dependencies detected" ) ) ; return ; } requiredTargets . add ( target ) ; parents . add ( target ) ; for ( var deps in makeInst . targets [ target ] . dependsOn . hash ) { addDepsToRequiredTargets ( deps , parents . clone ( ) ) ; } }
find all the required targets
find all the required targets