git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 1/1] subtree: add build targets 'man' and 'html'
@ 2018-10-07  7:30 Christian Hesse
  2018-10-10  2:26 ` Junio C Hamano
  0 siblings, 1 reply; 12+ messages in thread
From: Christian Hesse @ 2018-10-07  7:30 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Christian Hesse

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(+)

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)

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

* Re: [PATCH 1/1] subtree: add build targets 'man' and 'html'
  2018-10-07  7:30 [PATCH 1/1] subtree: add build targets 'man' and 'html' Christian Hesse
@ 2018-10-10  2:26 ` Junio C Hamano
  2018-10-12  8:08   ` Johannes Schindelin
  2018-10-15 21:15   ` Christian Hesse
  0 siblings, 2 replies; 12+ messages in thread
From: Junio C Hamano @ 2018-10-10  2:26 UTC (permalink / raw)
  To: Christian Hesse; +Cc: Git Mailing List, Christian Hesse

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


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

* Re: [PATCH 1/1] subtree: add build targets 'man' and 'html'
  2018-10-10  2:26 ` Junio C Hamano
@ 2018-10-12  8:08   ` Johannes Schindelin
  2018-10-15 21:15   ` Christian Hesse
  1 sibling, 0 replies; 12+ messages in thread
From: Johannes Schindelin @ 2018-10-12  8:08 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Christian Hesse, Git Mailing List, Christian Hesse

[-- Attachment #1: Type: text/plain, Size: 1693 bytes --]



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
> 
> 

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

* Re: [PATCH 1/1] subtree: add build targets 'man' and 'html'
  2018-10-10  2:26 ` Junio C Hamano
  2018-10-12  8:08   ` Johannes Schindelin
@ 2018-10-15 21:15   ` Christian Hesse
  2018-10-16  2:05     ` Junio C Hamano
  1 sibling, 1 reply; 12+ messages in thread
From: Christian Hesse @ 2018-10-15 21:15 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git Mailing List

[-- Attachment #1: Type: text/plain, Size: 597 bytes --]

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?
-- 
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Best regards             my address:    */=0;b=c[a++];)
putchar(b-1/(/*    Chris            cc -ox -xc - && ./x    */b/42*2-3)*42);}

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 1/1] subtree: add build targets 'man' and 'html'
  2018-10-15 21:15   ` Christian Hesse
@ 2018-10-16  2:05     ` Junio C Hamano
  2018-10-16  5:01       ` Junio C Hamano
  0 siblings, 1 reply; 12+ messages in thread
From: Junio C Hamano @ 2018-10-16  2:05 UTC (permalink / raw)
  To: Christian Hesse; +Cc: Git Mailing List

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.

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

* Re: [PATCH 1/1] subtree: add build targets 'man' and 'html'
  2018-10-16  2:05     ` Junio C Hamano
@ 2018-10-16  5:01       ` Junio C Hamano
  2018-10-16  7:56         ` [PATCH 1/1] subtree: make install targets depend on build targets Christian Hesse
  0 siblings, 1 reply; 12+ messages in thread
From: Junio C Hamano @ 2018-10-16  5:01 UTC (permalink / raw)
  To: Christian Hesse; +Cc: Git Mailing List

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 ;-)


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

* [PATCH 1/1] subtree: make install targets depend on build targets
  2018-10-16  5:01       ` Junio C Hamano
@ 2018-10-16  7:56         ` Christian Hesse
  2018-10-16  8:00           ` Junio C Hamano
  2018-10-17  2:45           ` Jonathan Nieder
  0 siblings, 2 replies; 12+ messages in thread
From: Christian Hesse @ 2018-10-16  7:56 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano, Christian Hesse

From: Christian Hesse <mail@eworm.de>

Now that we have build targets let the install targets depend on them.
Also make the targets phony.

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

diff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile
index 6906aae441..4a10a020a0 100644
--- a/contrib/subtree/Makefile
+++ b/contrib/subtree/Makefile
@@ -69,11 +69,11 @@ install: $(GIT_SUBTREE)
 
 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)
 
@@ -98,4 +98,4 @@ clean:
 	$(RM) $(GIT_SUBTREE)
 	$(RM) *.xml *.html *.1
 
-.PHONY: FORCE
+.PHONY: FORCE man html install-man install-html

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

* Re: [PATCH 1/1] subtree: make install targets depend on build targets
  2018-10-16  7:56         ` [PATCH 1/1] subtree: make install targets depend on build targets Christian Hesse
@ 2018-10-16  8:00           ` Junio C Hamano
  2018-10-17  2:45           ` Jonathan Nieder
  1 sibling, 0 replies; 12+ messages in thread
From: Junio C Hamano @ 2018-10-16  8:00 UTC (permalink / raw)
  To: Christian Hesse; +Cc: Git Mailing List, Christian Hesse

Christian Hesse <list@eworm.de> writes:

> From: Christian Hesse <mail@eworm.de>
>
> Now that we have build targets let the install targets depend on them.
> Also make the targets phony.
>
> Signed-off-by: Christian Hesse <mail@eworm.de>
> ---
>  contrib/subtree/Makefile | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Thanks, will queue.

> diff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile
> index 6906aae441..4a10a020a0 100644
> --- a/contrib/subtree/Makefile
> +++ b/contrib/subtree/Makefile
> @@ -69,11 +69,11 @@ install: $(GIT_SUBTREE)
>  
>  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)
>  
> @@ -98,4 +98,4 @@ clean:
>  	$(RM) $(GIT_SUBTREE)
>  	$(RM) *.xml *.html *.1
>  
> -.PHONY: FORCE
> +.PHONY: FORCE man html install-man install-html

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

* Re: [PATCH 1/1] subtree: make install targets depend on build targets
  2018-10-16  7:56         ` [PATCH 1/1] subtree: make install targets depend on build targets Christian Hesse
  2018-10-16  8:00           ` Junio C Hamano
@ 2018-10-17  2:45           ` Jonathan Nieder
  2018-10-18  2:05             ` Junio C Hamano
  2018-10-18  2:09             ` Junio C Hamano
  1 sibling, 2 replies; 12+ messages in thread
From: Jonathan Nieder @ 2018-10-17  2:45 UTC (permalink / raw)
  To: Christian Hesse; +Cc: Git Mailing List, Junio C Hamano, Christian Hesse

Hi,

Christian Hesse wrote:

> --- a/contrib/subtree/Makefile
> +++ b/contrib/subtree/Makefile
> @@ -69,11 +69,11 @@ install: $(GIT_SUBTREE)
[...]
> -install-html: $(GIT_SUBTREE_HTML)
> +install-html: html

This broke the build for me:

 make[2]: Entering directory '/build/git-2.19.1+next.20181016/contrib/subtree'
 install -m 644 html /build/git-2.19.1+next.20181016/debian/tmp/usr/share/doc/git/html
 install: cannot stat 'html': No such file or directory
 make[2]: *** [Makefile:78: install-html] Error 1

The rule says

 install-html: html
	$(INSTALL) -d -m 755 $(DESTDIR)$(htmldir)
	$(INSTALL) -m 644 $^ $(DESTDIR)$(htmldir)

and $^ substitutes to "html" after this change.  How was this patch
tested?

Thanks,
Jonathan

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

* Re: [PATCH 1/1] subtree: make install targets depend on build targets
  2018-10-17  2:45           ` Jonathan Nieder
@ 2018-10-18  2:05             ` Junio C Hamano
  2018-10-18  2:09             ` Junio C Hamano
  1 sibling, 0 replies; 12+ messages in thread
From: Junio C Hamano @ 2018-10-18  2:05 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: Christian Hesse, Git Mailing List, Christian Hesse

Jonathan Nieder <jrnieder@gmail.com> writes:

>> -install-html: $(GIT_SUBTREE_HTML)
>> +install-html: html
>
> This broke the build for me:
>
>  make[2]: Entering directory '/build/git-2.19.1+next.20181016/contrib/subtree'
>  install -m 644 html /build/git-2.19.1+next.20181016/debian/tmp/usr/share/doc/git/html
>  install: cannot stat 'html': No such file or directory
>  make[2]: *** [Makefile:78: install-html] Error 1
>
> The rule says
>
>  install-html: html
> 	$(INSTALL) -d -m 755 $(DESTDIR)$(htmldir)
> 	$(INSTALL) -m 644 $^ $(DESTDIR)$(htmldir)
>
> and $^ substitutes to "html" after this change.  How was this patch
> tested?

Gah, that was silly of me.

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

* Re: [PATCH 1/1] subtree: make install targets depend on build targets
  2018-10-17  2:45           ` Jonathan Nieder
  2018-10-18  2:05             ` Junio C Hamano
@ 2018-10-18  2:09             ` Junio C Hamano
  2018-10-18  8:05               ` Christian Hesse
  1 sibling, 1 reply; 12+ messages in thread
From: Junio C Hamano @ 2018-10-18  2:09 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: Christian Hesse, Git Mailing List, Christian Hesse

Jonathan Nieder <jrnieder@gmail.com> writes:

> The rule says
>
>  install-html: html
> 	$(INSTALL) -d -m 755 $(DESTDIR)$(htmldir)
> 	$(INSTALL) -m 644 $^ $(DESTDIR)$(htmldir)
>
> and $^ substitutes to "html" after this change.

Sorry about that.

From: Junio C Hamano <gitster@pobox.com>
Date: Thu, 18 Oct 2018 11:07:17 +0900
Subject: [PATCH] Revert "subtree: make install targets depend on build targets"

This reverts commit 744f7c4c314dc0e7816ac05520e8358c8318187a.

These targets do depend on the fact that each prereq is explicitly
listed via their use of $^, which I failed to notice, and broke the
build.
---
 contrib/subtree/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile
index 4a10a020a0..6906aae441 100644
--- a/contrib/subtree/Makefile
+++ b/contrib/subtree/Makefile
@@ -69,11 +69,11 @@ install: $(GIT_SUBTREE)
 
 install-doc: install-man install-html
 
-install-man: man
+install-man: $(GIT_SUBTREE_DOC)
 	$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
 	$(INSTALL) -m 644 $^ $(DESTDIR)$(man1dir)
 
-install-html: html
+install-html: $(GIT_SUBTREE_HTML)
 	$(INSTALL) -d -m 755 $(DESTDIR)$(htmldir)
 	$(INSTALL) -m 644 $^ $(DESTDIR)$(htmldir)
 
@@ -98,4 +98,4 @@ clean:
 	$(RM) $(GIT_SUBTREE)
 	$(RM) *.xml *.html *.1
 
-.PHONY: FORCE man html install-man install-html
+.PHONY: FORCE
-- 
2.19.1-450-ga4b8ab5363



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

* Re: [PATCH 1/1] subtree: make install targets depend on build targets
  2018-10-18  2:09             ` Junio C Hamano
@ 2018-10-18  8:05               ` Christian Hesse
  0 siblings, 0 replies; 12+ messages in thread
From: Christian Hesse @ 2018-10-18  8:05 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Jonathan Nieder, Git Mailing List, Christian Hesse

[-- Attachment #1: Type: text/plain, Size: 1197 bytes --]

Junio C Hamano <gitster@pobox.com> on Thu, 2018/10/18 11:09:
> Jonathan Nieder <jrnieder@gmail.com> writes:
> 
> > The rule says
> >
> >  install-html: html
> > 	$(INSTALL) -d -m 755 $(DESTDIR)$(htmldir)
> > 	$(INSTALL) -m 644 $^ $(DESTDIR)$(htmldir)
> >
> > and $^ substitutes to "html" after this change.  
> 
> Sorry about that.
> 
> From: Junio C Hamano <gitster@pobox.com>
> Date: Thu, 18 Oct 2018 11:07:17 +0900
> Subject: [PATCH] Revert "subtree: make install targets depend on build
> targets"
> 
> This reverts commit 744f7c4c314dc0e7816ac05520e8358c8318187a.
> 
> These targets do depend on the fact that each prereq is explicitly
> listed via their use of $^, which I failed to notice, and broke the
> build.
>
> [...]
>
> @@ -98,4 +98,4 @@ clean:
>  	$(RM) $(GIT_SUBTREE)
>  	$(RM) *.xml *.html *.1
>  
> -.PHONY: FORCE man html install-man install-html
> +.PHONY: FORCE

We could keep the phony part at least...

-- 
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Best regards             my address:    */=0;b=c[a++];)
putchar(b-1/(/*    Chris            cc -ox -xc - && ./x    */b/42*2-3)*42);}

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2018-10-18  8:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-07  7:30 [PATCH 1/1] subtree: add build targets 'man' and 'html' Christian Hesse
2018-10-10  2:26 ` Junio C Hamano
2018-10-12  8:08   ` Johannes Schindelin
2018-10-15 21:15   ` Christian Hesse
2018-10-16  2:05     ` Junio C Hamano
2018-10-16  5:01       ` Junio C Hamano
2018-10-16  7:56         ` [PATCH 1/1] subtree: make install targets depend on build targets Christian Hesse
2018-10-16  8:00           ` Junio C Hamano
2018-10-17  2:45           ` Jonathan Nieder
2018-10-18  2:05             ` Junio C Hamano
2018-10-18  2:09             ` Junio C Hamano
2018-10-18  8:05               ` Christian Hesse

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).