diff mbox

[v2] vim: Add post-install hook to remove documentation from target

Message ID 1360666299-3661-1-git-send-email-markos.chandras@gmail.com
State Accepted
Commit 443b66ae4bd6957ba66851324a8d1bd9f8a86075
Headers show

Commit Message

Markos Chandras Feb. 12, 2013, 10:51 a.m. UTC
From: Markos Chandras <markos.chandras@imgtec.com>

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

Comments

Thomas Petazzoni Feb. 12, 2013, 11:23 a.m. UTC | #1
Dear Markos Chandras,

On Tue, 12 Feb 2013 10:51:39 +0000, Markos Chandras wrote:
> From: Markos Chandras <markos.chandras@imgtec.com>
> 
> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>

Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

We often try to keep the define ... endef block within the ifneq
condition, since there is no reason for the VIM_REMOVE_DOCS variable to
be defined if it is useless. But it's not something that has been done
systematically in the entire code base (for example, the
VIM_INSTALL_RUNTIME_CMDS just above your patch, doesn't follow this
rule).

Thomas
Markos Chandras Feb. 12, 2013, 11:59 a.m. UTC | #2
On 12 February 2013 11:23, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Markos Chandras,
>
> On Tue, 12 Feb 2013 10:51:39 +0000, Markos Chandras wrote:
>> From: Markos Chandras <markos.chandras@imgtec.com>
>>
>> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
>
> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>
> We often try to keep the define ... endef block within the ifneq
> condition, since there is no reason for the VIM_REMOVE_DOCS variable to
> be defined if it is useless. But it's not something that has been done
> systematically in the entire code base (for example, the
> VIM_INSTALL_RUNTIME_CMDS just above your patch, doesn't follow this
> rule).
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

Hi Thomas,

I agree but seeing how the VIM_INSTALL_RUMTIME_CMDS is implemented, I
figured this was the recommended practice.
If you need me to submit a new patch please let me know.
Thomas Petazzoni Feb. 12, 2013, 12:08 p.m. UTC | #3
Dear Markos Chandras,

On Tue, 12 Feb 2013 11:59:16 +0000, Markos Chandras wrote:

> I agree but seeing how the VIM_INSTALL_RUMTIME_CMDS is implemented, I
> figured this was the recommended practice.
> If you need me to submit a new patch please let me know.

For me, the patch is fine as is, since it's a rule we haven't been
enforcing everywhere.

Thomas
Markos Chandras Feb. 19, 2013, 10:58 a.m. UTC | #4
On 12 February 2013 12:08, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Markos Chandras,
>
> On Tue, 12 Feb 2013 11:59:16 +0000, Markos Chandras wrote:
>
>> I agree but seeing how the VIM_INSTALL_RUMTIME_CMDS is implemented, I
>> figured this was the recommended practice.
>> If you need me to submit a new patch please let me know.
>
> For me, the patch is fine as is, since it's a rule we haven't been
> enforcing everywhere.
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

Friendly reminder, just making sure this fix will be included in the
2013.02 release.
Peter Korsgaard Feb. 19, 2013, 11:42 a.m. UTC | #5
>>>>> "Markos" == Markos Chandras <markos.chandras@gmail.com> writes:

 Markos> From: Markos Chandras <markos.chandras@imgtec.com>
 Markos> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>

Committed, thanks.
Peter Korsgaard Feb. 19, 2013, 3:19 p.m. UTC | #6
>>>>> "Peter" == Peter Korsgaard <jacmet@uclibc.org> writes:

>>>>> "Markos" == Markos Chandras <markos.chandras@gmail.com> writes:
 Markos> From: Markos Chandras <markos.chandras@imgtec.com>
 Markos> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>

 Peter> Committed, thanks.

Hmm, I take that back:

http://autobuild.buildroot.net/results/adc3e2f876f83a4011574e03bceb0007d7e891a2/build-end.log

Seems like it perhaps only should be done if BR2_PACKAGE_VIM_RUNTIME is
enabled?

Care to fix that?
Markos Chandras Feb. 19, 2013, 3:30 p.m. UTC | #7
On 19 February 2013 15:19, Peter Korsgaard <jacmet@sunsite.dk> wrote:
>>>>>> "Peter" == Peter Korsgaard <jacmet@uclibc.org> writes:
>
>>>>>> "Markos" == Markos Chandras <markos.chandras@gmail.com> writes:
>  Markos> From: Markos Chandras <markos.chandras@imgtec.com>
>  Markos> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
>
>  Peter> Committed, thanks.
>
> Hmm, I take that back:
>
> http://autobuild.buildroot.net/results/adc3e2f876f83a4011574e03bceb0007d7e891a2/build-end.log
>
> Seems like it perhaps only should be done if BR2_PACKAGE_VIM_RUNTIME is
> enabled?
>
> Care to fix that?
>
> --
> Bye, Peter Korsgaard

Hi Peter,

Yes I will have a look.
diff mbox

Patch

diff --git a/package/vim/vim.mk b/package/vim/vim.mk
index fa5f8ae..4e273d4 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
 
+ifneq ($(BR2_HAVE_DOCUMENTATION),y)
+VIM_POST_INSTALL_TARGET_HOOKS += VIM_REMOVE_DOCS
+endif
+
 $(eval $(autotools-package))