don't store dependecies if the target failed to build

The previous behaviour would forever mark a file as generated
if any default.do was found, even if that .do file wasn't
able to build the file.