Fix .d generation in Chrome OS.

Chrome OS toolchain generates "-:" instead of "-.o:" when reading the
source from stdin "-". This patch makes the code handle both cases and
fixes some missing quotes.

Bug: chromium:609385
Bug: 27954979
TEST=FEATURES=test emerge-link chromeos-minijail

(cherry picked from commit 477f2e32a7e4a6ce96baf960ad9f915f52f920a6)

Change-Id: I783db1c0617cafa9b999500b49df36a927fe16b9
Commit-Ready: Dylan Reid <>
Tested-by: Dylan Reid <>
Reviewed-by: Stephen Barber <>
2 files changed