aboutsummaryrefslogtreecommitdiff
path: root/fs/common.mk
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2018-03-31 11:05:57 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2018-03-31 20:53:06 +0200
commit31fd0b1cac219ec058b02281c5b5363513f585de (patch)
tree5d8e4be4888651ccf6160923445384b6a0d69286 /fs/common.mk
parent98d1e7f9287405cd8848300932555c176eae6423 (diff)
downloadbuildroot-31fd0b1cac219ec058b02281c5b5363513f585de.tar.gz
buildroot-31fd0b1cac219ec058b02281c5b5363513f585de.tar.bz2
fs: introduce a macro for reproducible command
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'fs/common.mk')
-rw-r--r--fs/common.mk10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/common.mk b/fs/common.mk
index a6ab6c6795..20e8446131 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -34,6 +34,12 @@ ROOTFS_DEVICE_TABLES = $(call qstrip,$(BR2_ROOTFS_DEVICE_TABLE) \
USERS_TABLE = $(FS_DIR)/users_table.txt
ROOTFS_USERS_TABLES = $(call qstrip,$(BR2_ROOTFS_USERS_TABLES))
+ifeq ($(BR2_REPRODUCIBLE),y)
+define ROOTFS_REPRODUCIBLE
+ find $(TARGET_DIR) -print0 | xargs -0 -r touch -hd @$(SOURCE_DATE_EPOCH)
+endef
+endif
+
ROOTFS_COMMON_TAR = $(FS_DIR)/rootfs.common.tar
.PHONY: rootfs-common
@@ -119,9 +125,7 @@ endif
echo $$(EXTRA_ENV) $$(s) $$(TARGET_DIR) $$(BR2_ROOTFS_POST_SCRIPT_ARGS) >> $$(FAKEROOT_SCRIPT)$$(sep))
$$(foreach hook,$$(ROOTFS_PRE_CMD_HOOKS),\
$$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep))
-ifeq ($$(BR2_REPRODUCIBLE),y)
- echo "find $$(TARGET_DIR) -print0 | xargs -0 -r touch -hd @$$(SOURCE_DATE_EPOCH)" >> $$(FAKEROOT_SCRIPT)
-endif
+ $$(call PRINTF,$$(ROOTFS_REPRODUCIBLE)) >> $$(FAKEROOT_SCRIPT)
$$(call PRINTF,$$(ROOTFS_$(2)_CMD)) >> $$(FAKEROOT_SCRIPT)
$$(foreach hook,$$(ROOTFS_POST_CMD_HOOKS),\
$$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep))