tools: ynl: don't skip regeneration from make targets
authorJakub Kicinski <kuba@kernel.org>
Wed, 29 Nov 2023 19:36:22 +0000 (11:36 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 30 Nov 2023 00:07:00 +0000 (16:07 -0800)
commita115b9279f4897b8afdfbc30035b1382c047fc26
tree9270fe94b20e60693f5a1cb5fc86f7de8ce65830
parent9cf9b57082411ad42d6d12c7b857e60add673877
tools: ynl: don't skip regeneration from make targets

Commit 2b7ac0c87d98 ("tools: ynl-gen: don't touch the output file if
content is the same") is working too well. It was added so that
ynl-regen -f doesn't make us rebuild half of the kernel, if there
are no actual changes in any generated code.

When ynl-gen-c is called by make, however, we're better off trusting
make's tracking and overwrite the file. Otherwise if output is identical
we won't update file timestamps and make will retry code gen on every
invocation.

Link: https://lore.kernel.org/r/20231129193622.2912353-5-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/net/ynl/ynl-gen-c.py
tools/net/ynl/ynl-regen.sh