Merge topic 'makefile-depfile' into release-3.28

7198f0d149 Makefile: Fix double escaping when DEPFILE is used
5162ff64d4 Makefile: Reduce string copies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9138