# The skeleton also handles the merged /usr case in the sysroot
SKELETON_INSTALL_STAGING = YES
+############
+# Macros available for use by any skeleton package:
+# - SKELETON_RSYNC
+
+# This function rsyncs the skeleton directory in $(1) to the destination
+# in $(2), which should be either $(TARTGET_DIR) or $(STAGING_DIR)
+define SKELETON_RSYNC
+ rsync -a --ignore-times $(RSYNC_VCS_EXCLUSIONS) \
+ --chmod=u=rwX,go=rX --exclude .empty --exclude '*~' \
+ $(1)/ $(2)/
+endef
+
ifeq ($(BR2_ROOTFS_SKELETON_CUSTOM),y)
SKELETON_PATH = $(call qstrip,$(BR2_ROOTFS_SKELETON_CUSTOM_PATH))
endif
define SKELETON_INSTALL_TARGET_CMDS
- rsync -a --ignore-times $(RSYNC_VCS_EXCLUSIONS) \
- --chmod=u=rwX,go=rX --exclude .empty --exclude '*~' \
- $(SKELETON_PATH)/ $(TARGET_DIR)/
+ $(call SKELETON_RSYNC,$(SKELETON_PATH),$(TARGET_DIR))
$(call SKELETON_USR_SYMLINKS_OR_DIRS,$(TARGET_DIR))
ln -snf lib $(TARGET_DIR)/$(SKELETON_LIB_SYMLINK)
ln -snf lib $(TARGET_DIR)/usr/$(SKELETON_LIB_SYMLINK)