And remove from each rootfs variant.
include package/*/*.mk
-TARGETS+=target-devfiles
+TARGETS+=target-finalize
ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
TARGETS+=target-purgelocales
erase-fakeroots:
rm -f $(PROJECT_BUILD_DIR)/.fakeroot*
-target-devfiles:
+target-finalize:
ifeq ($(BR2_HAVE_DEVFILES),y)
( scripts/copy.sh $(STAGING_DIR) $(TARGET_DIR) )
else
find $(TARGET_DIR)/lib \( -name '*.a' -o -name '*.la' \) -delete
find $(TARGET_DIR)/usr/lib \( -name '*.a' -o -name '*.la' \) -delete
endif
+ifneq ($(BR2_HAVE_MANPAGES),y)
+ rm -rf $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/man
+endif
+ifneq ($(BR2_HAVE_INFOPAGES),y)
+ rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/share/info
+endif
+ find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true
+ $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null
ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
LOCALE_WHITELIST=$(PROJECT_BUILD_DIR)/locales.nopurge
### Note: target/default/device_table.txt is not yet supported! ck
# the quickfix is to use sudo to mount the previous created cramroot
check-tools:
-ifneq ($(BR2_HAVE_MANPAGES),y)
- @rm -rf $(TARGET_DIR)/usr/man
- @rm -rf $(TARGET_DIR)/usr/share/man
-endif
-ifneq ($(BR2_HAVE_INFOPAGES),y)
- @rm -rf $(TARGET_DIR)/usr/info
- @rm -rf $(TARGET_DIR)/usr/share/info
-endif
- @rmdir -p --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share
- which mkisofs
- -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true
- which symlinks && symlinks -r $(TARGET_DIR)
$(IMAGE).cramfs: cramfsroot
ln -s sbin/init $(TARGET_DIR)/init
$(CPIO_BASE): host-fakeroot makedevs cpioroot-init
- -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true
-ifneq ($(BR2_HAVE_MANPAGES),y)
- @rm -rf $(TARGET_DIR)/usr/man
-endif
-ifneq ($(BR2_HAVE_INFOPAGES),y)
- @rm -rf $(TARGET_DIR)/usr/info
-endif
- $(if $(TARGET_LDCONFIG),test -x $(TARGET_LDCONFIG) && $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null)
# Use fakeroot to pretend all target binaries are owned by root
rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CPIO_BASE))
touch $(PROJECT_BUILD_DIR)/.fakeroot.00000
CRAMFS_TARGET=$(IMAGE).cramfs
cramfsroot: host-fakeroot makedevs cramfs
- #-@find $(TARGET_DIR)/lib -type f -name \*.so\* | xargs $(STRIPCMD) --strip-unneeded 2>/dev/null || true
- -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true
-ifneq ($(BR2_HAVE_MANPAGES),y)
- @rm -rf $(TARGET_DIR)/usr/man
-endif
-ifneq ($(BR2_HAVE_INFOPAGES),y)
- @rm -rf $(TARGET_DIR)/usr/info
-endif
- $(if $(TARGET_LDCONFIG),test -x $(TARGET_LDCONFIG) && $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null)
# Use fakeroot to pretend all target binaries are owned by root
rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(CRAMFS_TARGET))
touch $(PROJECT_BUILD_DIR)/.fakeroot.00000
endif
$(EXT2_BASE): host-fakeroot makedevs genext2fs
- -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true
-ifneq ($(BR2_HAVE_MANPAGES),y)
- @rm -rf $(TARGET_DIR)/usr/man
- @rm -rf $(TARGET_DIR)/usr/share/man
-endif
-ifneq ($(BR2_HAVE_INFOPAGES),y)
- @rm -rf $(TARGET_DIR)/usr/info
-endif
- @test -d $(TARGET_DIR)/usr/share && \
- rmdir -p --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share || \
- true
- $(if $(TARGET_LDCONFIG),test -x $(TARGET_LDCONFIG) && $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null)
# Use fakeroot to pretend all target binaries are owned by root
rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(EXT2_TARGET))
touch $(PROJECT_BUILD_DIR)/.fakeroot.00000
$(INITRAMFS_TARGET) initramfs: host-fakeroot makedevs
rm -f $(TARGET_DIR)/init
ln -s sbin/init $(TARGET_DIR)/init
- -find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true
-ifneq ($(BR2_HAVE_MANPAGES),y)
- rm -rf $(TARGET_DIR)/usr/man
-endif
-ifneq ($(BR2_HAVE_INFOPAGES),y)
- rm -rf $(TARGET_DIR)/usr/info
-endif
- $(if $(TARGET_LDCONFIG),test -x $(TARGET_LDCONFIG) && $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null)
# Use fakeroot to pretend all target binaries are owned by root
rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
touch $(PROJECT_BUILD_DIR)/.fakeroot.00000
# just built.
#
$(JFFS2_TARGET): host-fakeroot makedevs mtd-host
- -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true
-ifneq ($(BR2_HAVE_MANPAGES),y)
- @rm -rf $(TARGET_DIR)/usr/man
- @rm -rf $(TARGET_DIR)/usr/share/man
-endif
-ifneq ($(BR2_HAVE_INFOPAGES),y)
- @rm -rf $(TARGET_DIR)/usr/info
-endif
- @rmdir -p --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share
- $(if $(TARGET_LDCONFIG),test -x $(TARGET_LDCONFIG) && $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null)
# Use fakeroot to pretend all target binaries are owned by root
rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(JFFS2_TARGET))
touch $(PROJECT_BUILD_DIR)/.fakeroot.00000
ROMFS_TARGET=$(IMAGE).romfs
romfsroot: host-fakeroot makedevs romfs
- -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true
-ifneq ($(BR2_HAVE_MANPAGES),y)
- @rm -rf $(TARGET_DIR)/usr/man
-endif
-ifneq ($(BR2_HAVE_INFOPAGES),y)
- @rm -rf $(TARGET_DIR)/usr/info
-endif
- $(if $(TARGET_LDCONFIG),test -x $(TARGET_LDCONFIG) && $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null)
# Use fakeroot to pretend all target binaries are owned by root
rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(ROMFS_TARGET))
touch $(PROJECT_BUILD_DIR)/.fakeroot.00000
SQUASHFS_TARGET:=$(IMAGE).squashfs
squashfsroot: host-fakeroot makedevs squashfs
- -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true
-ifneq ($(BR2_HAVE_MANPAGES),y)
- @rm -rf $(TARGET_DIR)/usr/man
-endif
-ifneq ($(BR2_HAVE_INFOPAGES),y)
- @rm -rf $(TARGET_DIR)/usr/info
-endif
- $(if $(TARGET_LDCONFIG),test -x $(TARGET_LDCONFIG) && $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null)
# Use fakeroot to pretend all target binaries are owned by root
rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(SQUASHFS_TARGET))
touch $(PROJECT_BUILD_DIR)/.fakeroot.00000
# "))
tarroot: host-fakeroot makedevs
- -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true
-ifneq ($(BR2_HAVE_MANPAGES),y)
- @rm -rf $(TARGET_DIR)/usr/man
-endif
-ifneq ($(BR2_HAVE_INFOPAGES),y)
- @rm -rf $(TARGET_DIR)/usr/info
-endif
- $(if $(TARGET_LDCONFIG),test -x $(TARGET_LDCONFIG) && $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null)
# Use fakeroot to pretend all target binaries are owned by root
rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET))
touch $(PROJECT_BUILD_DIR)/.fakeroot.00000
endif
$(UBIFS_BASE): host-fakeroot makedevs mkfs.ubifs
- -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true
-ifneq ($(BR2_HAVE_MANPAGES),y)
- @rm -rf $(TARGET_DIR)/usr/man
- @rm -rf $(TARGET_DIR)/usr/share/man
-endif
-ifneq ($(BR2_HAVE_INFOPAGES),y)
- @rm -rf $(TARGET_DIR)/usr/info
-endif
- @test -d $(TARGET_DIR)/usr/share && \
- rmdir -p --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share || \
- true
- $(if $(TARGET_LDCONFIG),test -x $(TARGET_LDCONFIG) && $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null)
# Use fakeroot to pretend all target binaries are owned by root
rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(UBIFS_TARGET))
touch $(PROJECT_BUILD_DIR)/.fakeroot.00000