Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kbuild: call checksyscalls.sh and check-atomics.sh only if prerequisi…
…tes change Currently, checksyscalls.sh and check-atomics.sh are executed unconditionally. Most developers will not modify the files being checked by those scripts and thus do not need to execute these again for each iterative make. Change Kbuild target so that those two scripts get executed only if the prerequisite are modified. In order to implement this we: 1. use the if_change macro instead of cmd. c.f. [1] 2. create two dot files: scripts/.checksyscalls and scripts/atomic/.check-atomics to keep track of whether the script were already executed or not. Otherwise, the prerequisite would always be considered as newer than the target (c.f. output "due to target missing" of make V=2). 3. modify the CLEAN_FILES target of the root Makefile to removed the two temporary dot files created in 2. We also added an additional dependency to include/linux/atomic/* for check-atomics.sh to make sure that the script gets executed again if the header are modified. check-atomics.sh already has a dependency toward include/generated/asm-offsets.h and so no additional dependencies were added. [1] https://www.kernel.org/doc/html/latest/kbuild/makefiles.html#command-change-detection Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
- Loading branch information