|
@@ -57,6 +57,23 @@ GLOBAL_INSTRUMENTATION_HOOKS += step_time
|
|
|
|
|
|
# Hooks to collect statistics about installed files
|
|
# Hooks to collect statistics about installed files
|
|
|
|
|
|
|
|
+# Helper function to create the file list -- also used from target-finalize
|
|
|
|
+# $(1): base directory to search in
|
|
|
|
+# $(2): suffix of file (optional)
|
|
|
|
+define step_pkg_size_file_list
|
|
|
|
+ cd $(1); \
|
|
|
|
+ LC_ALL=C find . \( -type f -o -type l \) -printf '%T@:%i:%#m:%y:%s,%p\n' \
|
|
|
|
+ | LC_ALL=C sort > $(BUILD_DIR)/.files-list$(2).new
|
|
|
|
+endef
|
|
|
|
+
|
|
|
|
+# Helper function to mark the latest file list as the reference for next
|
|
|
|
+# iteration -- also used from target-finalize
|
|
|
|
+# $(1): suffix of file (optional)
|
|
|
|
+define step_pkg_size_finalize
|
|
|
|
+ mv $(BUILD_DIR)/.files-list$(1).new \
|
|
|
|
+ $(BUILD_DIR)/.files-list$(1).stat
|
|
|
|
+endef
|
|
|
|
+
|
|
# The suffix is typically empty for the target variant, for legacy backward
|
|
# The suffix is typically empty for the target variant, for legacy backward
|
|
# compatibility.
|
|
# compatibility.
|
|
# $(1): package name
|
|
# $(1): package name
|
|
@@ -66,9 +83,7 @@ define step_pkg_size_inner
|
|
@touch $(BUILD_DIR)/.files-list$(3).stat
|
|
@touch $(BUILD_DIR)/.files-list$(3).stat
|
|
@touch $(BUILD_DIR)/packages-file-list$(3).txt
|
|
@touch $(BUILD_DIR)/packages-file-list$(3).txt
|
|
$(SED) '/^$(1),/d' $(BUILD_DIR)/packages-file-list$(3).txt
|
|
$(SED) '/^$(1),/d' $(BUILD_DIR)/packages-file-list$(3).txt
|
|
- cd $(2); \
|
|
|
|
- LC_ALL=C find . \( -type f -o -type l \) -printf '%T@:%i:%#m:%y:%s,%p\n' \
|
|
|
|
- | LC_ALL=C sort > $(BUILD_DIR)/.files-list$(3).new
|
|
|
|
|
|
+ $(call step_pkg_size_file_list,$(2),$(3))
|
|
LC_ALL=C comm -13 \
|
|
LC_ALL=C comm -13 \
|
|
$(BUILD_DIR)/.files-list$(3).stat \
|
|
$(BUILD_DIR)/.files-list$(3).stat \
|
|
$(BUILD_DIR)/.files-list$(3).new \
|
|
$(BUILD_DIR)/.files-list$(3).new \
|
|
@@ -76,8 +91,7 @@ define step_pkg_size_inner
|
|
sed -r -e 's/^[^,]+/$(1)/' \
|
|
sed -r -e 's/^[^,]+/$(1)/' \
|
|
$($(PKG)_BUILDDIR)/.files-list$(3).txt \
|
|
$($(PKG)_BUILDDIR)/.files-list$(3).txt \
|
|
>> $(BUILD_DIR)/packages-file-list$(3).txt
|
|
>> $(BUILD_DIR)/packages-file-list$(3).txt
|
|
- mv $(BUILD_DIR)/.files-list$(3).new \
|
|
|
|
- $(BUILD_DIR)/.files-list$(3).stat
|
|
|
|
|
|
+ $(call step_pkg_size_finalize,$(3))
|
|
endef
|
|
endef
|
|
|
|
|
|
define step_pkg_size
|
|
define step_pkg_size
|