aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-06-27 18:51:25 +0200
committerJo-Philipp Wich <jo@mein.io>2018-12-18 09:44:01 +0100
commit3b9bfe8328e071a33b9dad9fd92cd900697456f0 (patch)
treef59253ba7eec7f45c666f30ec7416d99b3f0aca4
parentef7a6a4d7260d88c70ee73605daa81e94a3161be (diff)
downloadupstream-3b9bfe8328e071a33b9dad9fd92cd900697456f0.tar.gz
upstream-3b9bfe8328e071a33b9dad9fd92cd900697456f0.tar.bz2
upstream-3b9bfe8328e071a33b9dad9fd92cd900697456f0.zip
build: include package directory in sha256sums when running on buildbot
In order to be able to better compare files to sync in the future, include all BIN_DIR subdirectories in the checksum calculation. To not break existing applications, restrict the recursive checksumming to CONFIG_BUILDBOT for now. Signed-off-by: Jo-Philipp Wich <jo@mein.io> (backported from 681e825f8fbf59a32c3b09810b2a3fef29880c63)
-rw-r--r--Makefile2
-rw-r--r--rules.mk3
2 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 0a1f96a973..e38d44a810 100644
--- a/Makefile
+++ b/Makefile
@@ -85,7 +85,7 @@ prereq: $(target/stamp-prereq) tmp/.prereq_packages
fi
checksum: FORCE
- $(call sha256sums,$(BIN_DIR))
+ $(call sha256sums,$(BIN_DIR),$(CONFIG_BUILDBOT))
diffconfig: FORCE
mkdir -p $(BIN_DIR)
diff --git a/rules.mk b/rules.mk
index 38afc7777a..6b881a0c61 100644
--- a/rules.mk
+++ b/rules.mk
@@ -391,8 +391,9 @@ endef
# Calculate sha256sum of any plain file within a given directory
# $(1) => Input directory
+# $(2) => If set, recurse into subdirectories
define sha256sums
- (cd $(1); find . -maxdepth 1 -type f -not -name 'sha256sums' -printf "%P\n" | sort | \
+ (cd $(1); find . $(if $(2),,-maxdepth 1) -type f -not -name 'sha256sums' -printf "%P\n" | sort | \
xargs -r $(STAGING_DIR_HOST)/bin/mkhash -n sha256 | sed -ne 's!^\(.*\) \(.*\)$$!\1 *\2!p' > sha256sums)
endef