summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-11-18 16:25:58 -0500
committerPeter Korsgaard <jacmet@sunsite.dk>2010-11-24 22:14:33 +0100
commit68ad6d4ee07aa8b800a0ec3f25f61d0177c43d40 (patch)
tree2af22cf9946b7d4c99e2dcccdd31c0850cb1f755 /Makefile
parent7dccbc44a84f371694ab7b38833908125df315d9 (diff)
downloadbuildroot-novena-68ad6d4ee07aa8b800a0ec3f25f61d0177c43d40.tar.gz
buildroot-novena-68ad6d4ee07aa8b800a0ec3f25f61d0177c43d40.zip
auto remove empty /usr/share dir
Often times, the only reason /usr/share exists is because of documentation installed into it. So once we're done cleaning the docs, attempt to rmdir /usr/share. If it's empty, things will work out nicely. [Peter: use make infrastructure to ignore errors rather than shell] Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a53ef89da..86aea91a2 100644
--- a/Makefile
+++ b/Makefile
@@ -416,6 +416,7 @@ ifneq ($(BR2_HAVE_DOCUMENTATION),y)
rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/share/info
rm -rf $(TARGET_DIR)/usr/doc $(TARGET_DIR)/usr/share/doc
rm -rf $(TARGET_DIR)/usr/share/gtk-doc
+ -rmdir $(TARGET_DIR)/usr/share 2>/dev/null
endif
find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true
find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \