]> git.neil.brown.name Git - history.git/commit
kbuild: Use a standard "update-if-changed"
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Wed, 5 Jun 2002 12:23:17 +0000 (07:23 -0500)
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Wed, 5 Jun 2002 12:23:17 +0000 (07:23 -0500)
commit1e5a87300c37a1f27943130316fc28fcaa9773df
tree09c5786e738a47a756f5a0afbcac7d68f227f6ab
parent4e30f812f3f3a8fc3ec5ac55226e1d3bc63eff6e
kbuild: Use a standard "update-if-changed"

For some cases, we cannot decide if a target would change just by looking
at its prequisites, i.e. it's quite likely that it remains the same
even though a prequisite changed. The updated timestamp would cause
a lot of unnecessary recompiles. In this case, we actually generate
a temporary file, compare it to the old file and only the contents
are different do overwrite the old file.

The "update-if-changed" snippet remains always the same, so let's
put it into a macro instead of duplicating it. After that change,
scripts/mkversion_h is so small that we rather put the three remaining
lines directly into the Makefile.
Makefile
scripts/Makefile
scripts/mkversion_h [deleted file]