diff mbox series

[1/1] subtree: add build targets 'man' and 'html'

Message ID 20181007073036.30643-1-list@eworm.de (mailing list archive)
State New, archived
Headers show
Series [1/1] subtree: add build targets 'man' and 'html' | expand

Commit Message

Christian Hesse Oct. 7, 2018, 7:30 a.m. UTC
From: Christian Hesse <mail@eworm.de>

We have targets 'install-man' and 'install-html', let's add build
targets as well.

Signed-off-by: Christian Hesse <mail@eworm.de>
---
 contrib/subtree/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Junio C Hamano Oct. 10, 2018, 2:26 a.m. UTC | #1
Christian Hesse <list@eworm.de> writes:

> From: Christian Hesse <mail@eworm.de>
>
> We have targets 'install-man' and 'install-html', let's add build
> targets as well.
>   ...
> +man: $(GIT_SUBTREE_DOC)
> +
> +html: $(GIT_SUBTREE_HTML)
> +

As 'contrib' material without real maintenance, I do not care too
deeply, but shouldn't this change be more like this to avoid
duplicating the list of targets?


diff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile
index 5c6cc4ab2c..4a10a020a0 100644
--- a/contrib/subtree/Makefile
+++ b/contrib/subtree/Makefile
@@ -59,17 +59,21 @@ $(GIT_SUBTREE): $(GIT_SUBTREE_SH)
 
 doc: $(GIT_SUBTREE_DOC) $(GIT_SUBTREE_HTML)
 
+man: $(GIT_SUBTREE_DOC)
+
+html: $(GIT_SUBTREE_HTML)
+
 install: $(GIT_SUBTREE)
 	$(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
 	$(INSTALL) -m 755 $(GIT_SUBTREE) $(DESTDIR)$(gitexecdir)
 
 install-doc: install-man install-html
 
-install-man: $(GIT_SUBTREE_DOC)
+install-man: man
 	$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
 	$(INSTALL) -m 644 $^ $(DESTDIR)$(man1dir)
 
-install-html: $(GIT_SUBTREE_HTML)
+install-html: html
 	$(INSTALL) -d -m 755 $(DESTDIR)$(htmldir)
 	$(INSTALL) -m 644 $^ $(DESTDIR)$(htmldir)
 
@@ -94,4 +98,4 @@ clean:
 	$(RM) $(GIT_SUBTREE)
 	$(RM) *.xml *.html *.1
 
-.PHONY: FORCE
+.PHONY: FORCE man html install-man install-html
Johannes Schindelin Oct. 12, 2018, 8:08 a.m. UTC | #2
On Wed, 10 Oct 2018, Junio C Hamano wrote:

> Christian Hesse <list@eworm.de> writes:
> 
> > From: Christian Hesse <mail@eworm.de>
> >
> > We have targets 'install-man' and 'install-html', let's add build
> > targets as well.
> >   ...
> > +man: $(GIT_SUBTREE_DOC)
> > +
> > +html: $(GIT_SUBTREE_HTML)
> > +
> 
> As 'contrib' material without real maintenance, I do not care too
> deeply, but shouldn't this change be more like this to avoid
> duplicating the list of targets?

Ævar mentioned that he'd like this to graduate from contrib into core, and
I had briefly looked at making subtree a built-in to that end. IOW please
do not get too used to subtree being in contrib.

Ciao,
Dscho

> 
> 
> diff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile
> index 5c6cc4ab2c..4a10a020a0 100644
> --- a/contrib/subtree/Makefile
> +++ b/contrib/subtree/Makefile
> @@ -59,17 +59,21 @@ $(GIT_SUBTREE): $(GIT_SUBTREE_SH)
>  
>  doc: $(GIT_SUBTREE_DOC) $(GIT_SUBTREE_HTML)
>  
> +man: $(GIT_SUBTREE_DOC)
> +
> +html: $(GIT_SUBTREE_HTML)
> +
>  install: $(GIT_SUBTREE)
>  	$(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
>  	$(INSTALL) -m 755 $(GIT_SUBTREE) $(DESTDIR)$(gitexecdir)
>  
>  install-doc: install-man install-html
>  
> -install-man: $(GIT_SUBTREE_DOC)
> +install-man: man
>  	$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
>  	$(INSTALL) -m 644 $^ $(DESTDIR)$(man1dir)
>  
> -install-html: $(GIT_SUBTREE_HTML)
> +install-html: html
>  	$(INSTALL) -d -m 755 $(DESTDIR)$(htmldir)
>  	$(INSTALL) -m 644 $^ $(DESTDIR)$(htmldir)
>  
> @@ -94,4 +98,4 @@ clean:
>  	$(RM) $(GIT_SUBTREE)
>  	$(RM) *.xml *.html *.1
>  
> -.PHONY: FORCE
> +.PHONY: FORCE man html install-man install-html
> 
>
Christian Hesse Oct. 15, 2018, 9:15 p.m. UTC | #3
Junio C Hamano <gitster@pobox.com> on Wed, 2018/10/10 11:26:
> As 'contrib' material without real maintenance, I do not care too
> deeply, but shouldn't this change be more like this to avoid
> duplicating the list of targets?

Probably, yes.
Do you want to add this yourself or do you want me to send an updated patch
or one on top of the last change?
Junio C Hamano Oct. 16, 2018, 2:05 a.m. UTC | #4
Christian Hesse <list@eworm.de> writes:

> Junio C Hamano <gitster@pobox.com> on Wed, 2018/10/10 11:26:
>> As 'contrib' material without real maintenance, I do not care too
>> deeply, but shouldn't this change be more like this to avoid
>> duplicating the list of targets?
>
> Probably, yes.
> Do you want to add this yourself or do you want me to send an updated patch
> or one on top of the last change?

In principle either is fine but keep in mind that I'll likely forget
if you leave it up to me.
Junio C Hamano Oct. 16, 2018, 5:01 a.m. UTC | #5
Junio C Hamano <gitster@pobox.com> writes:

> Christian Hesse <list@eworm.de> writes:
>
>> Junio C Hamano <gitster@pobox.com> on Wed, 2018/10/10 11:26:
>>> As 'contrib' material without real maintenance, I do not care too
>>> deeply, but shouldn't this change be more like this to avoid
>>> duplicating the list of targets?
>>
>> Probably, yes.
>> Do you want to add this yourself or do you want me to send an updated patch
>> or one on top of the last change?
>
> In principle either is fine but keep in mind that I'll likely forget
> if you leave it up to me.

Actully, I take it back.  The original patch is already in 'next',
so an incremental on top of what you sent is the only valid
improvement ;-)
diff mbox series

Patch

diff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile
index 5c6cc4ab2c..6906aae441 100644
--- a/contrib/subtree/Makefile
+++ b/contrib/subtree/Makefile
@@ -59,6 +59,10 @@  $(GIT_SUBTREE): $(GIT_SUBTREE_SH)
 
 doc: $(GIT_SUBTREE_DOC) $(GIT_SUBTREE_HTML)
 
+man: $(GIT_SUBTREE_DOC)
+
+html: $(GIT_SUBTREE_HTML)
+
 install: $(GIT_SUBTREE)
 	$(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
 	$(INSTALL) -m 755 $(GIT_SUBTREE) $(DESTDIR)$(gitexecdir)