Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] vim: Add option to remove documentation from target
@ 2013-02-12 10:14 Markos Chandras
  2013-02-12 10:30 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Markos Chandras @ 2013-02-12 10:14 UTC (permalink / raw)
  To: buildroot

From: Markos Chandras <markos.chandras@imgtec.com>

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
 package/vim/Config.in |    8 ++++++++
 package/vim/vim.mk    |    8 ++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/package/vim/Config.in b/package/vim/Config.in
index 891715e..28e34b5 100644
--- a/package/vim/Config.in
+++ b/package/vim/Config.in
@@ -14,3 +14,11 @@ config BR2_PACKAGE_VIM_RUNTIME
 	help
 	  Install VIM runtime (syntax highlighing + macros).
 	  This option adds about 15MB of data to /usr/share/
+
+config BR2_PACKAGE_VIM_REMOVE_DOCS
+	bool "remove documentation"
+	default y
+	depends on BR2_PACKAGE_VIM
+	help
+	  Remove documentation files from the target.
+	  This option removes about 5.6MB of data from /usr/share/
diff --git a/package/vim/vim.mk b/package/vim/vim.mk
index fa5f8ae..d199d9b 100644
--- a/package/vim/vim.mk
+++ b/package/vim/vim.mk
@@ -36,8 +36,16 @@ define VIM_INSTALL_RUNTIME_CMDS
 		$(MAKE) DESTDIR=$(TARGET_DIR) installmacros
 endef
 
+define VIM_REMOVE_DOCS
+	find $(TARGET_DIR)/usr/share/vim -type f -name "*.txt" -delete
+endef
+
 ifeq ($(BR2_PACKAGE_VIM_RUNTIME),y)
 VIM_POST_INSTALL_TARGET_HOOKS += VIM_INSTALL_RUNTIME_CMDS
 endif
 
+ifeq ($(BR2_PACKAGE_VIM_REMOVE_DOCS),y)
+VIM_POST_INSTALL_TARGET_HOOKS += VIM_REMOVE_DOCS
+endif
+
 $(eval $(autotools-package))
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] vim: Add option to remove documentation from target
  2013-02-12 10:14 [Buildroot] [PATCH] vim: Add option to remove documentation from target Markos Chandras
@ 2013-02-12 10:30 ` Thomas Petazzoni
  2013-02-12 10:35   ` Markos Chandras
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2013-02-12 10:30 UTC (permalink / raw)
  To: buildroot

Dear Markos Chandras,

On Tue, 12 Feb 2013 10:14:55 +0000, Markos Chandras wrote:

> +config BR2_PACKAGE_VIM_REMOVE_DOCS
> +	bool "remove documentation"
> +	default y
> +	depends on BR2_PACKAGE_VIM
> +	help
> +	  Remove documentation files from the target.
> +	  This option removes about 5.6MB of data from /usr/share/

Please don't add a special option for this: use BR2_HAVE_DOCUMENTATION
instead.

Thanks!

Thomas
-- 
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] 4+ messages in thread

* [Buildroot] [PATCH] vim: Add option to remove documentation from target
  2013-02-12 10:30 ` Thomas Petazzoni
@ 2013-02-12 10:35   ` Markos Chandras
  2013-02-12 10:37     ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Markos Chandras @ 2013-02-12 10:35 UTC (permalink / raw)
  To: buildroot

On 12 February 2013 10:30, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Markos Chandras,
>
> On Tue, 12 Feb 2013 10:14:55 +0000, Markos Chandras wrote:
>
>> +config BR2_PACKAGE_VIM_REMOVE_DOCS
>> +     bool "remove documentation"
>> +     default y
>> +     depends on BR2_PACKAGE_VIM
>> +     help
>> +       Remove documentation files from the target.
>> +       This option removes about 5.6MB of data from /usr/share/
>
> Please don't add a special option for this: use BR2_HAVE_DOCUMENTATION
> instead.
>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

Hi Thomas,

Thanks for the reply. This BR2_HAVE_DOCUMENTATION option is marked as
"deprecated" so I was not sure if we should use it anymore or not. I
will prepare a new patch.

-- 
Regards,
Markos Chandras

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] vim: Add option to remove documentation from target
  2013-02-12 10:35   ` Markos Chandras
@ 2013-02-12 10:37     ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2013-02-12 10:37 UTC (permalink / raw)
  To: buildroot

Dear Markos Chandras,

On Tue, 12 Feb 2013 10:35:02 +0000, Markos Chandras wrote:

> Thanks for the reply. This BR2_HAVE_DOCUMENTATION option is marked as
> "deprecated" so I was not sure if we should use it anymore or not. I
> will prepare a new patch.

Right, it's deprecated, because we believe that installing the
documentation on the target is useless in Buildroot's context. So we
don't want BR2_HAVE_DOCUMENTATION to be replaced by new, package
specific options that do the same thing :-)

For now, I'd say: use BR2_HAVE_DOCUMENTATION, so that the day we decide
to finally remove it, we can easily grep in the source code to find the
things we can remove or simplify.

Thanks!

Thomas
-- 
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] 4+ messages in thread

end of thread, other threads:[~2013-02-12 10:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-12 10:14 [Buildroot] [PATCH] vim: Add option to remove documentation from target Markos Chandras
2013-02-12 10:30 ` Thomas Petazzoni
2013-02-12 10:35   ` Markos Chandras
2013-02-12 10:37     ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox