From 1afb8226cbaf011f81158b63c2c169ce05842d21 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 21 Aug 2007 14:32:38 +0000 Subject: [PATCH] - start to use BR2_HAVE_MANPAGES and BR2_HAVE_INFOPAGES - always error out if ldconfig for the target fails (was inconsistent..) --- target/cloop/cloop.mk | 4 ++++ target/cpio/cpioroot.mk | 6 +++++- target/cramfs/cramfs.mk | 6 +++++- target/ext2/ext2root.mk | 6 +++++- target/initramfs/initramfs.mk | 6 +++++- target/jffs2/jffs2root.mk | 6 +++++- target/squashfs/squashfsroot.mk | 4 ++++ target/tar/tarroot.mk | 4 ++++ 8 files changed, 37 insertions(+), 5 deletions(-) diff --git a/target/cloop/cloop.mk b/target/cloop/cloop.mk index f092f0b13b..e03fe2516e 100644 --- a/target/cloop/cloop.mk +++ b/target/cloop/cloop.mk @@ -75,9 +75,13 @@ check-tools: clooproot: cloop check-tools $(IMAGE).cramfs ### cramfsroot -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 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 ### $(CLOOP_DIR)/create_compressed_fs -q -D target/default/device_table.txt $(TARGET_DIR) $(CLOOP_TARGET) ## mkisofs -r $(TARGET_DIR) | $(CLOOP_DIR)/create_compressed_fs - 65536 > $(CLOOP_TARGET) diff --git a/target/cpio/cpioroot.mk b/target/cpio/cpioroot.mk index b2b4c4951f..42c5aecad2 100644 --- a/target/cpio/cpioroot.mk +++ b/target/cpio/cpioroot.mk @@ -38,9 +38,13 @@ cpioroot-init: $(CPIO_BASE): host-fakeroot makedevs cpioroot-init -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 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 - -$(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null +endif + $(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 diff --git a/target/cramfs/cramfs.mk b/target/cramfs/cramfs.mk index 2af85a6a99..3acc86a817 100644 --- a/target/cramfs/cramfs.mk +++ b/target/cramfs/cramfs.mk @@ -50,9 +50,13 @@ CRAMFS_TARGET=$(IMAGE).cramfs cramfsroot: host-fakeroot makedevs cramfs #-@find $(TARGET_DIR)/lib -type f -name \*.so\* | xargs $(STRIP) --strip-unneeded 2>/dev/null || true; -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 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 - -$(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null +endif + $(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 diff --git a/target/ext2/ext2root.mk b/target/ext2/ext2root.mk index d49b9c86bd..94f2456ce9 100644 --- a/target/ext2/ext2root.mk +++ b/target/ext2/ext2root.mk @@ -88,13 +88,17 @@ endif $(EXT2_BASE): host-fakeroot makedevs genext2fs -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 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 - -$(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null + $(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 diff --git a/target/initramfs/initramfs.mk b/target/initramfs/initramfs.mk index dcc0df1846..936489c02e 100644 --- a/target/initramfs/initramfs.mk +++ b/target/initramfs/initramfs.mk @@ -16,9 +16,13 @@ $(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 $(STRIP) 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 - -/sbin/ldconfig -r $(TARGET_DIR) 2>/dev/null +endif + $(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 diff --git a/target/jffs2/jffs2root.mk b/target/jffs2/jffs2root.mk index 2d4a325a0c..869668bc81 100644 --- a/target/jffs2/jffs2root.mk +++ b/target/jffs2/jffs2root.mk @@ -50,11 +50,15 @@ endif # $(JFFS2_TARGET): host-fakeroot makedevs mtd-host -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 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 - -$(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null + $(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 diff --git a/target/squashfs/squashfsroot.mk b/target/squashfs/squashfsroot.mk index 8e6166e775..3fbdf9a4f7 100644 --- a/target/squashfs/squashfsroot.mk +++ b/target/squashfs/squashfsroot.mk @@ -45,8 +45,12 @@ SQUASHFS_TARGET:=$(IMAGE).squashfs squashfsroot: host-fakeroot makedevs squashfs -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 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 $(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)) diff --git a/target/tar/tarroot.mk b/target/tar/tarroot.mk index df40af1919..4ac27575e9 100644 --- a/target/tar/tarroot.mk +++ b/target/tar/tarroot.mk @@ -24,8 +24,12 @@ endif tarroot: host-fakeroot makedevs -@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 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 $(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)) -- 2.30.2