build: Fix depfile updating code

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>