* [Buildroot] [PATCH] auto remove empty /usr/share dir
@ 2010-11-18 21:25 Mike Frysinger
2010-11-19 7:57 ` Thomas Petazzoni
2010-11-24 21:16 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Mike Frysinger @ 2010-11-18 21:25 UTC (permalink / raw)
To: buildroot
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.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
Makefile | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index 69e4031..4cc62e9 100644
--- a/Makefile
+++ b/Makefile
@@ -403,6 +403,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' | \
--
1.7.3.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] auto remove empty /usr/share dir
2010-11-18 21:25 [Buildroot] [PATCH] auto remove empty /usr/share dir Mike Frysinger
@ 2010-11-19 7:57 ` Thomas Petazzoni
2010-11-24 21:16 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2010-11-19 7:57 UTC (permalink / raw)
To: buildroot
On Thu, 18 Nov 2010 16:25:58 -0500
Mike Frysinger <vapier@gentoo.org> wrote:
> 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.
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] auto remove empty /usr/share dir
2010-11-18 21:25 [Buildroot] [PATCH] auto remove empty /usr/share dir Mike Frysinger
2010-11-19 7:57 ` Thomas Petazzoni
@ 2010-11-24 21:16 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2010-11-24 21:16 UTC (permalink / raw)
To: buildroot
>>>>> "Mike" == Mike Frysinger <vapier@gentoo.org> writes:
Mike> Often times, the only reason /usr/share exists is because of
Mike> documentation installed into it. So once we're done cleaning the
Mike> docs, attempt to rmdir /usr/share. If it's empty, things will
Mike> work out nicely.
Committed, thanks. I prefer to tell make to simply ignore the return
value rather than the '|| :' shell code though.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-11-24 21:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-18 21:25 [Buildroot] [PATCH] auto remove empty /usr/share dir Mike Frysinger
2010-11-19 7:57 ` Thomas Petazzoni
2010-11-24 21:16 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.