aboutsummaryrefslogtreecommitdiffstats
path: root/rules.mk
diff options
context:
space:
mode:
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk3
1 files changed, 2 insertions, 1 deletions
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