aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Peter Korsgaard <jacmet@sunsite.dk>2009-04-07 21:04:31 +0000
committerGravatar Peter Korsgaard <jacmet@sunsite.dk>2009-04-07 21:04:31 +0000
commit32faf35112e5092a5657862a43aadf67d907dbd3 (patch)
tree2095b7b16aec761430e5bb0ff54d6f42c4412b5e /Makefile
parentf276b269181394b26fadcfcd5b768c1d4b57c405 (diff)
downloadbuildroot-32faf35112e5092a5657862a43aadf67d907dbd3.tar.gz
buildroot-32faf35112e5092a5657862a43aadf67d907dbd3.tar.bz2
Makefile: add target-finalize for common filesystem cleanup
And remove from each rootfs variant.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 99a2ceaacb..ed8c2610e6 100644
--- a/Makefile
+++ b/Makefile
@@ -262,7 +262,7 @@ endif
include package/*/*.mk
-TARGETS+=target-devfiles
+TARGETS+=target-finalize
ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
TARGETS+=target-purgelocales
@@ -343,7 +343,7 @@ $(TARGET_DIR): $(PROJECT_BUILD_DIR)/.root
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
@@ -351,6 +351,14 @@ 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