Check dependencies of a file to decide if it should be compiled.

Bug: Doesn't check the include paths yet.