mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-13 17:38:48 +04:00
prepare-tmpinfo runs the metadata scan for the packages and for the targets on every build. Each run starts two more make processes and walks the whole directory, which takes 0.15 s per scan even when it finds nothing to do. Keep a stamp per scan and skip the scan while no Makefile, no .mk file and no directory below the scanned tree is newer than the stamp, and while include, rules.mk and .config are unchanged as well. package/kernel/linux reads target/linux/*/modules.mk through SCAN_DEPS, so the package scan watches those files although they sit in the target tree. This takes the time of the prereq step from 0.45 s to 0.21 s, and the time of a full no-op build from 3.40 s to 3.25 s for the OpenWrt One. Signed-off-by: John Crispin <john@phrozen.org>