Use ninja "deps" feature.

See http://martine.github.io/ninja/manual.html#_deps for reference.

Signed-off-by: Thiago Farina <tfarina@chromium.org>