{"thread":{"id":"36588","subject":"[PATCH v2 2/5] contrib/subtree/Makefile: Use GIT-VERSION-FILE","startedAt":"2014-05-06T12:41:44Z","lastAt":"2014-05-06T21:46:10Z","messageCount":8,"participants":["James Denholm","Junio C Hamano"],"isPatch":true,"patchVersion":2,"patchTotal":5},"messages":[{"id":"240804","messageId":"1399380109-3805-1-git-send-email-nod.helm@gmail.com","threadId":"36588","inReplyTo":null,"subject":"[PATCH v2 0/5] contrib/subtree/Makefile: Standardisation pass","fromName":"James Denholm","fromEmail":"nod.helm@gmail.com","sentAt":"2014-05-06T12:41:44Z","receivedAt":"2014-05-06T12:41:44Z","isPatch":true,"sender":{"key":"nod.helm@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1721189?v=4"},"body":"contrib/subtree/Makefile is a shambles in regards to it's consistency\nwith other makefiles, which makes subtree overly painful to include in\nbuild scripts.\n\nThe main issues are that calls are made to git itself in the build\nprocess, and that a subtree-exclusive variable is used for specifying\nthe exec path. Patches 1/5 through 3/5 resolve these.\n\nThe \"cleanup\" fixes (4/5 and 5/5) are based on precedents set by other\nmakefiles across the project.\n\nOne problem is foreseen: 3/5 will necessitate that package maintainers\nwho already have git-subtree included in their packages update their\nbuild-scripts.\n\nReviewed-by: Jeff King <peff@peff.net>\nSigned-off-by: James Denholm <nod.helm@gmail.com>\nBased-on-patch-by: Dan McGee <dpmcgee@gmail.com>\n\nJames Denholm (5):\n  contrib/subtree/Makefile: scrap unused $(gitdir)\n  contrib/subtree/Makefile: Use GIT-VERSION-FILE\n  contrib/subtree/Makefile: s/libexecdir/gitexecdir\n  contrib/subtree/Makefile: Doc-gen rules cleanup\n  contrib/subtree/Makefile: clean rule cleanup\n\n contrib/subtree/Makefile | 38 +++++++++++++++++++++++---------------\n 1 file changed, 23 insertions(+), 15 deletions(-)\n\n-- \n1.9.2\n"},{"id":"240808","messageId":"1399380109-3805-2-git-send-email-nod.helm@gmail.com","threadId":"36588","inReplyTo":"1399380109-3805-1-git-send-email-nod.helm@gmail.com","subject":"[PATCH v2 1/5] contrib/subtree/Makefile: scrap unused $(gitdir)","fromName":"James Denholm","fromEmail":"nod.helm@gmail.com","sentAt":"2014-05-06T12:41:45Z","receivedAt":"2014-05-06T12:41:45Z","isPatch":true,"sender":{"key":"nod.helm@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1721189?v=4"},"body":"In 7ff8463dba0d74fc07a766bed457ae7afcc902b5, the references to gitdir\nwere removed but the assignment itself wasn't. Hence, drop the gitdir\nassignment.\n\nReviewed-by: Jeff King <peff@peff.net>\nSigned-off-by: James Denholm <nod.helm@gmail.com>\n---\n contrib/subtree/Makefile | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile\nindex 4030a16..87797ed 100644\n--- a/contrib/subtree/Makefile\n+++ b/contrib/subtree/Makefile\n@@ -4,7 +4,6 @@\n prefix ?= /usr/local\n mandir ?= $(prefix)/share/man\n libexecdir ?= $(prefix)/libexec/git-core\n-gitdir ?= $(shell git --exec-path)\n man1dir ?= $(mandir)/man1\n \n gitver ?= $(word 3,$(shell git --version))\n-- \n1.9.2\n"},{"id":"240780","messageId":"1399380109-3805-3-git-send-email-nod.helm@gmail.com","threadId":"36588","inReplyTo":"1399380109-3805-1-git-send-email-nod.helm@gmail.com","subject":"[PATCH v2 2/5] contrib/subtree/Makefile: Use GIT-VERSION-FILE","fromName":"James Denholm","fromEmail":"nod.helm@gmail.com","sentAt":"2014-05-06T12:41:46Z","receivedAt":"2014-05-06T12:41:46Z","isPatch":true,"sender":{"key":"nod.helm@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1721189?v=4"},"body":"GVF is already being used in most/all other makefiles in the project,\nand has been for _quite_ a while. Hence, drop file-unique gitver and\nreplace with GIT_VERSION.\n\nReviewed-by: Jeff King <peff@peff.net>\nSigned-off-by: James Denholm <nod.helm@gmail.com>\n---\n contrib/subtree/Makefile | 11 ++++++++---\n 1 file changed, 8 insertions(+), 3 deletions(-)\n\ndiff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile\nindex 87797ed..f63334b 100644\n--- a/contrib/subtree/Makefile\n+++ b/contrib/subtree/Makefile\n@@ -6,7 +6,10 @@ mandir ?= $(prefix)/share/man\n libexecdir ?= $(prefix)/libexec/git-core\n man1dir ?= $(mandir)/man1\n \n-gitver ?= $(word 3,$(shell git --version))\n+../../GIT-VERSION-FILE: FORCE\n+\t$(MAKE) -C ../../ GIT-VERSION-FILE\n+\n+-include ../../GIT-VERSION-FILE\n \n # this should be set to a 'standard' bsd-type install program\n INSTALL ?= install\n@@ -44,11 +47,11 @@ $(GIT_SUBTREE_DOC): $(GIT_SUBTREE_XML)\n \n $(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT)\n \tasciidoc -b docbook -d manpage -f $(ASCIIDOC_CONF) \\\n-\t\t-agit_version=$(gitver) $^\n+\t\t-agit_version=$(GIT_VERSION) $^\n \n $(GIT_SUBTREE_HTML): $(GIT_SUBTREE_TXT)\n \tasciidoc -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) \\\n-\t\t-agit_version=$(gitver) $^\n+\t\t-agit_version=$(GIT_VERSION) $^\n \n test:\n \t$(MAKE) -C t/ test\n@@ -56,3 +59,5 @@ test:\n clean:\n \trm -f *~ *.xml *.html *.1\n \trm -rf subproj mainline\n+\n+.PHONY: FORCE\n-- \n1.9.2\n"},{"id":"240803","messageId":"1399380109-3805-4-git-send-email-nod.helm@gmail.com","threadId":"36588","inReplyTo":"1399380109-3805-1-git-send-email-nod.helm@gmail.com","subject":"[PATCH v2 3/5] contrib/subtree/Makefile: s/libexecdir/gitexecdir","fromName":"James Denholm","fromEmail":"nod.helm@gmail.com","sentAt":"2014-05-06T12:41:47Z","receivedAt":"2014-05-06T12:41:47Z","isPatch":true,"sender":{"key":"nod.helm@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1721189?v=4"},"body":"$(libexecdir) isn't used anywhere else in the project, while\n$(gitexecdir) is the standard in the other appropriate makefiles. Hence,\nreplace the former with the latter.\n\nReviewed-by: Jeff King <peff@peff.net>\nSigned-off-by: James Denholm <nod.helm@gmail.com>\n---\n contrib/subtree/Makefile | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile\nindex f63334b..579bb51 100644\n--- a/contrib/subtree/Makefile\n+++ b/contrib/subtree/Makefile\n@@ -3,7 +3,7 @@\n \n prefix ?= /usr/local\n mandir ?= $(prefix)/share/man\n-libexecdir ?= $(prefix)/libexec/git-core\n+gitexecdir ?= $(prefix)/libexec/git-core\n man1dir ?= $(mandir)/man1\n \n ../../GIT-VERSION-FILE: FORCE\n@@ -33,8 +33,8 @@ $(GIT_SUBTREE): $(GIT_SUBTREE_SH)\n doc: $(GIT_SUBTREE_DOC) $(GIT_SUBTREE_HTML)\n \n install: $(GIT_SUBTREE)\n-\t$(INSTALL) -d -m 755 $(DESTDIR)$(libexecdir)\n-\t$(INSTALL) -m 755 $(GIT_SUBTREE) $(DESTDIR)$(libexecdir)\n+\t$(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)\n+\t$(INSTALL) -m 755 $(GIT_SUBTREE) $(DESTDIR)$(gitexecdir)\n \n install-doc: install-man\n \n-- \n1.9.2\n"},{"id":"240805","messageId":"1399380109-3805-5-git-send-email-nod.helm@gmail.com","threadId":"36588","inReplyTo":"1399380109-3805-1-git-send-email-nod.helm@gmail.com","subject":"[PATCH v2 4/5] contrib/subtree/Makefile: Doc-gen rules cleanup","fromName":"James Denholm","fromEmail":"nod.helm@gmail.com","sentAt":"2014-05-06T12:41:48Z","receivedAt":"2014-05-06T12:41:48Z","isPatch":true,"sender":{"key":"nod.helm@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1721189?v=4"},"body":"git:Documentation/Makefile establishes asciidoc/xmlto calls as being\nhandled through their appropriate variables, Hence, change to bring into\ncongruency with.\n\nSimilarly, MANPAGE_XSL exists in git:Documentation/Makefile, while\nMANPAGE_NORMAL_XSL does not outside contrib/subtree. Hence, replace\nMANPAGE_NORMAL_XSL with MANPAGE_XSL.\n\nReviewed-by: Jeff King <peff@peff.net>\nSigned-off-by: James Denholm <nod.helm@gmail.com>\n---\n contrib/subtree/Makefile | 13 ++++++++-----\n 1 file changed, 8 insertions(+), 5 deletions(-)\n\ndiff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile\nindex 579bb51..f3834b5 100644\n--- a/contrib/subtree/Makefile\n+++ b/contrib/subtree/Makefile\n@@ -14,8 +14,11 @@ man1dir ?= $(mandir)/man1\n # this should be set to a 'standard' bsd-type install program\n INSTALL ?= install\n \n-ASCIIDOC_CONF      = ../../Documentation/asciidoc.conf\n-MANPAGE_NORMAL_XSL =  ../../Documentation/manpage-normal.xsl\n+ASCIIDOC = asciidoc\n+XMLTO    = xmlto\n+\n+ASCIIDOC_CONF = ../../Documentation/asciidoc.conf\n+MANPAGE_XSL   = ../../Documentation/manpage-normal.xsl\n \n GIT_SUBTREE_SH := git-subtree.sh\n GIT_SUBTREE    := git-subtree\n@@ -43,14 +46,14 @@ install-man: $(GIT_SUBTREE_DOC)\n \t$(INSTALL) -m 644 $^ $(DESTDIR)$(man1dir)\n \n $(GIT_SUBTREE_DOC): $(GIT_SUBTREE_XML)\n-\txmlto -m $(MANPAGE_NORMAL_XSL)  man $^\n+\t$(XMLTO) -m $(MANPAGE_XSL) man $^\n \n $(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT)\n-\tasciidoc -b docbook -d manpage -f $(ASCIIDOC_CONF) \\\n+\t$(ASCIIDOC) -b docbook -d manpage -f $(ASCIIDOC_CONF) \\\n \t\t-agit_version=$(GIT_VERSION) $^\n \n $(GIT_SUBTREE_HTML): $(GIT_SUBTREE_TXT)\n-\tasciidoc -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) \\\n+\t$(ASCIIDOC) -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) \\\n \t\t-agit_version=$(GIT_VERSION) $^\n \n test:\n-- \n1.9.2\n"},{"id":"240785","messageId":"1399380109-3805-6-git-send-email-nod.helm@gmail.com","threadId":"36588","inReplyTo":"1399380109-3805-1-git-send-email-nod.helm@gmail.com","subject":"[PATCH v2 5/5] contrib/subtree/Makefile: clean rule cleanup","fromName":"James Denholm","fromEmail":"nod.helm@gmail.com","sentAt":"2014-05-06T12:41:49Z","receivedAt":"2014-05-06T12:41:49Z","isPatch":true,"sender":{"key":"nod.helm@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1721189?v=4"},"body":"git:Documentation/Makefile and others establish \"RM ?= rm -f\" as a\nconvention for rm calls in clean rules, hence follow this convention\ninstead of simply forcing clean to use rm.\n\nsubproj and mainline no longer need to be removed in clean, as they are\nno longer created in git:contrib/subtree by \"make test\". Hence, remove\nthe rm call for those folders.\n\nOther makefiles don't remove \"*~\" files, remove the rm call to prevent\nunexpected behaviour in the future. Similarly, clean doesn't remove the\ninstallable file, so rectify this.\n\nReviewed-by: Jeff King <peff@peff.net>\nSigned-off-by: James Denholm <nod.helm@gmail.com>\n---\n contrib/subtree/Makefile | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile\nindex f3834b5..d888d45 100644\n--- a/contrib/subtree/Makefile\n+++ b/contrib/subtree/Makefile\n@@ -12,7 +12,8 @@ man1dir ?= $(mandir)/man1\n -include ../../GIT-VERSION-FILE\n \n # this should be set to a 'standard' bsd-type install program\n-INSTALL ?= install\n+INSTALL  ?= install\n+RM       ?= rm -f\n \n ASCIIDOC = asciidoc\n XMLTO    = xmlto\n@@ -60,7 +61,7 @@ test:\n \t$(MAKE) -C t/ test\n \n clean:\n-\trm -f *~ *.xml *.html *.1\n-\trm -rf subproj mainline\n+\t$(RM) $(GIT_SUBTREE)\n+\t$(RM) *.xml *.html *.1\n \n .PHONY: FORCE\n-- \n1.9.2\n"},{"id":"240841","messageId":"xmqq7g5yehf4.fsf@gitster.dls.corp.google.com","threadId":"36588","inReplyTo":"1399380109-3805-1-git-send-email-nod.helm@gmail.com","subject":"Re: [PATCH v2 0/5] contrib/subtree/Makefile: Standardisation pass","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-05-06T21:17:03Z","receivedAt":"2014-05-06T21:17:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"James Denholm <nod.helm@gmail.com> writes:\n\n> contrib/subtree/Makefile is a shambles in regards to it's consistency\n> with other makefiles, which makes subtree overly painful to include in\n> build scripts.\n>\n> The main issues are that calls are made to git itself in the build\n> process, and that a subtree-exclusive variable is used for specifying\n> the exec path. Patches 1/5 through 3/5 resolve these.\n>\n> The \"cleanup\" fixes (4/5 and 5/5) are based on precedents set by other\n> makefiles across the project.\n>\n> One problem is foreseen: 3/5 will necessitate that package maintainers\n> who already have git-subtree included in their packages update their\n> build-scripts.\n>\n> Reviewed-by: Jeff King <peff@peff.net>\n> Signed-off-by: James Denholm <nod.helm@gmail.com>\n> Based-on-patch-by: Dan McGee <dpmcgee@gmail.com>\n\nIt is funny to see sign-off on 0/5 ;-)\n\nBy the way, this is v3, not v2, no?  It was somewhat confusing to\nsee Peff saying \"filfre to add my reviewed-by\" on v2, noticing you\nposted something new, and not finding v3.\n\nWill queue.  Thanks.\n\n>\n> James Denholm (5):\n>   contrib/subtree/Makefile: scrap unused $(gitdir)\n>   contrib/subtree/Makefile: Use GIT-VERSION-FILE\n>   contrib/subtree/Makefile: s/libexecdir/gitexecdir\n>   contrib/subtree/Makefile: Doc-gen rules cleanup\n>   contrib/subtree/Makefile: clean rule cleanup\n>\n>  contrib/subtree/Makefile | 38 +++++++++++++++++++++++---------------\n>  1 file changed, 23 insertions(+), 15 deletions(-)\n"},{"id":"240842","messageId":"fa80985d-6420-4eb5-8623-00e2d8e8e798@email.android.com","threadId":"36588","inReplyTo":"xmqq7g5yehf4.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v2 0/5] contrib/subtree/Makefile: Standardisation pass","fromName":"James Denholm","fromEmail":"nod.helm@gmail.com","sentAt":"2014-05-06T21:46:10Z","receivedAt":"2014-05-06T21:46:10Z","isPatch":true,"sender":{"key":"nod.helm@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1721189?v=4"},"body":"Junio C Hamano <gitster@pobox.com> wrote:\n>It is funny to see sign-off on 0/5 ;-)\n\nYeah, I wasn't quite sure of exact protocol, and sort-of defaulted to\nsign-all-the-things mode.\n\n>By the way, this is v3, not v2, no?  It was somewhat confusing to\n>see Peff saying \"filfre to add my reviewed-by\" on v2, noticing you\n>posted something new, and not finding v3.\n\nAh, right. I thought that resending a post-discussion patch was the done\nthing, given Documentation/SubmittingPatches, but that a comment line\nmight not have been worth a version bump.\n\n>Will queue.  Thanks.\n\nAwesome, thanks.\n\nRegards,\nJames Denholm.\n"}]}