aboutsummaryrefslogtreecommitdiffstats
path: root/include/package.mk
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-05-22 09:18:33 +0200
committerJo-Philipp Wich <jo@mein.io>2018-05-22 09:27:38 +0200
commitb287c82bed6673648a69be6c1cf84abe8885a3c4 (patch)
tree8367ad40a644054f63e7723a750355e20fdb40b8 /include/package.mk
parenta789c0f49159c618d990541c23e00630f7296ebc (diff)
downloadupstream-b287c82bed6673648a69be6c1cf84abe8885a3c4.tar.gz
upstream-b287c82bed6673648a69be6c1cf84abe8885a3c4.tar.bz2
upstream-b287c82bed6673648a69be6c1cf84abe8885a3c4.zip
build: prevent spurious package rebuilds under CONFIG_AUTOREMOVE
When CONFIG_AUTOREMOVE is enabled, the build system touches an additional ".autoremove" stamp file in the cleaned build directory. Since the autoremove stamp file is touched after the compile process completed, it ends up being the most recent file of the package build directory, causing the timestamp.pl check of depends.mk to erroneously declare the ".built" and ".prepared" stamp files as stale, triggering a forced clean-build submake process. Fix the problem by using the ".built" stamp file as modification time reference when touching the ".autoremove" stamp file. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'include/package.mk')
-rw-r--r--include/package.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/package.mk b/include/package.mk
index 9912c86d6b..2473eecb92 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -228,7 +228,7 @@ define Build/CoreTargets
ifneq ($(CONFIG_AUTOREMOVE),)
compile:
- -touch $(PKG_BUILD_DIR)/.autoremove 2>/dev/null >/dev/null
+ -touch -r $(PKG_BUILD_DIR)/.built $(PKG_BUILD_DIR)/.autoremove 2>/dev/null >/dev/null
$(FIND) $(PKG_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir' | \
$(XARGS) rm -rf
endif