示例#1
0
func makeSmallerGraph() *dag.DAG {
	// construct the same graph as makeSimpleGraph(), but minus
	// misc.{h,c}
	tdag := dag.NewTestDAG()
	tdag.Add("tool1", "tool1.o", "util.o")
	tdag.Add("tool2", "tool2.o", "util.o")
	tdag.Add("tool1.o", "tool1.c", "util.h")
	tdag.Add("util.o", "util.h", "util.c")
	tdag.Add("tool2.o", "tool2.c", "util.h")
	tdag.Add("tool1.c")
	tdag.Add("util.h")
	tdag.Add("util.c")
	tdag.Add("tool2.c")
	return tdag.Finish()
}
示例#2
0
func makeSimpleGraph() *dag.DAG {
	// this is the same as makeSimpleGraph() in ../dag/dag_test.go; it
	// would be nice to keep them in sync for as long as possible ...
	// but eventually they will drift out of sync, so don't kill
	// yourself trying to keep them the same
	tdag := dag.NewTestDAG()
	tdag.Add("tool1", "tool1.o", "misc.o", "util.o")
	tdag.Add("tool2", "tool2.o", "util.o")
	tdag.Add("tool1.o", "tool1.c", "misc.h", "util.h")
	tdag.Add("misc.o", "misc.h", "misc.c")
	tdag.Add("util.o", "util.h", "util.c")
	tdag.Add("tool2.o", "tool2.c", "util.h")
	tdag.Add("tool1.c")
	tdag.Add("misc.h")
	tdag.Add("misc.c")
	tdag.Add("util.h")
	tdag.Add("util.c")
	tdag.Add("tool2.c")
	return tdag.Finish()
}