From: Jo-Philipp Wich Date: Wed, 27 Jun 2018 16:51:25 +0000 (+0200) Subject: build: include package directory in sha256sums when running on buildbot X-Git-Tag: v19.07.0-rc1~3305 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=681e825f8fbf59a32c3b09810b2a3fef29880c63;p=openwrt%2Fstaging%2Fpepe2k.git 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 --- 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 a97b2d2155..b1ecc24fab 100644 --- a/rules.mk +++ b/rules.mk @@ -390,8 +390,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