Message ID | 20181016075624.30176-1-list@eworm.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/1] subtree: make install targets depend on build targets | expand |
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
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
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.
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
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...
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