Rework r339635 to fix .depend.tables.h handling.
Avoid touching the tables.h file unless it has changed to avoid unneeded
rebuilds.
Also revert r350301's explicit dependencies.
Reviewed by: emaste
MFC after: 2 weeks
X-MFC-With: r339635 (kevans request)
PR: 238828
Sponsored by: DellEMC
Differential Revision: https://reviews.freebsd.org/D21295