make: fix #1197

Partial revert of 85b7eca19edf76a5b82c2ebe01e0e90a3292dee7

Fixes #1197.
Merge pull request #1198 from Kijewski/issue-1197

make: fix rebuilding on changes without `clean` or `-B`