mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-12 06:57:57 +04:00
build: clean the package root dir only if the packages can have changed
The stamp of package/cleanup depends on tmp/.build, which is touched on every make call, so every build deletes $(STAGING_DIR_ROOT) and every package copies its files into it again, one after the other under a lock. With all packages selected, this takes 5 s of a build that has nothing to do, most of it in the 1102 kmods of package/kernel/linux. Only clean it if .config, the package metadata or a file below package/ changed since the last cleanup. An edit of the source in a build directory alone does not clean it, so a file that such an edit removes from a package stays until then. make package/cleanup cleans it at any time. Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
1 parent
e7d105af30
commit
bc2e85eb8d
1 file changed
+1
-1
+1
-1
@@ -188,7 +188,7 @@ endif
|
||||
$(curdir)/flags-install:= -j1
|
||||
|
||||
$(eval $(call stampfile,$(curdir),package,prereq,.config))
|
||||
$(eval $(call stampfile,$(curdir),package,cleanup,$(TMP_DIR)/.build))
|
||||
$(eval $(call stampfile,$(curdir),package,cleanup,.config $(TMP_DIR)/.packageinfo))
|
||||
$(eval $(call stampfile,$(curdir),package,compile,$(TMP_DIR)/.build))
|
||||
$(eval $(call stampfile,$(curdir),package,install,$(TMP_DIR)/.build))
|
||||
$(eval $(call stampfile,$(curdir),package,check,$(TMP_DIR)/.build))
|
||||
|
||||
Reference in new issue
Block a user