From 0f952b265990e76444f09e2d5ff816e9b001082f Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Sun, 7 Oct 2018 09:30:36 +0200 Subject: [PATCH 1/3] subtree: add build targets 'man' and 'html' We have targets 'install-man' and 'install-html', let's add build targets as well. Signed-off-by: Christian Hesse Signed-off-by: Junio C Hamano --- 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) From 744f7c4c314dc0e7816ac05520e8358c8318187a Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 16 Oct 2018 09:56:24 +0200 Subject: [PATCH 2/3] subtree: make install targets depend on build targets Now that we have build targets let the install targets depend on them. Also make the targets phony. Signed-off-by: Christian Hesse Signed-off-by: Junio C Hamano --- 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 From 0df8e6d5a534f2e1d445dd6d5101fe1fd5f9bded Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 18 Oct 2018 11:07:17 +0900 Subject: [PATCH 3/3] 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