{"thread":{"id":"51367","subject":"[PATCH] Makefile: include contrib docs in dist-doc tarballs","startedAt":"2019-06-24T02:40:04Z","lastAt":"2019-06-24T18:47:34Z","messageCount":2,"participants":["robbat2@gentoo.org","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"377840","messageId":"20190623215046.24030-1-robbat2@gentoo.org","threadId":"51367","inReplyTo":null,"subject":"[PATCH] Makefile: include contrib docs in dist-doc tarballs","fromName":"","fromEmail":"robbat2@gentoo.org","sentAt":"2019-06-23T21:50:46Z","receivedAt":"2019-06-24T02:40:04Z","isPatch":true,"sender":{"key":"robbat2@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/373898?v=4"},"body":"From: \"Robin H. Johnson\" <robbat2@gentoo.org>\n\nThe pre-built htmldoc/manpage tarballs do not include any documentation\nfrom the contrib code. As a result, if you want that documentation, you\nneed the full documentation stack to build them.\n\nBy including the contrib docs in the tarballs, this is prevented.\n\nThe documentation process in the contrib directories could use some\ngeneral cleanups, but this gets it going for now.\n- Add doc install target that includes the .txt files\n- svn-fe has no doc install targets at all.\n\nSee-Also: https://bugs.gentoo.org/687886\nSee-Also: https://bugs.gentoo.org/687848\nSee-Also: https://bugs.gentoo.org/517794\nSigned-off-by: Robin H. Johnson <robbat2@gentoo.org>\n---\n Makefile | 43 +++++++++++++++++++++++++++++++++++--------\n 1 file changed, 35 insertions(+), 8 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex f58bf14c7b..fc36a9211e 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -3008,21 +3008,48 @@ artifacts-tar:: $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) $(OTHER_PROGRAMS) \\\n \n htmldocs = git-htmldocs-$(GIT_VERSION)\n manpages = git-manpages-$(GIT_VERSION)\n-.PHONY: dist-doc distclean\n-dist-doc:\n+.PHONY: dist-doc distclean contrib-doc\n+\n+# subdirs with install-html & install-man targets\n+contrib_doc_dirs := contrib/contacts contrib/subtree\n+doc_dirs := Documentation $(contrib_doc_dirs)\n+\n+contrib-doc:\n+\t$(MAKE) -C contrib/svn-fe svn-fe.html svn-fe.1 # no doc target\n+\tfor d in $(contrib_doc_dirs) ; do \\\n+\t\t$(MAKE) -C $$d doc ; \\\n+\tdone\n+\n+dist-doc: doc contrib-doc\n \t$(RM) -r .doc-tmp-dir\n \tmkdir .doc-tmp-dir\n-\t$(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc\n+\tfor d in $(doc_dirs) ; do \\\n+\t\t$(MAKE) -C $$d \\\n+\t\t\tDESTDIR=$(PWD)/ \\\n+\t\t\thtmldir=/.doc-tmp-dir/ \\\n+\t\t\tinstall-html ; \\\n+\tdone\n+\t: # These files have no install targets\n+\tcp --target .doc-tmp-dir \\\n+\t\tcontrib/subtree/git-subtree.txt \\\n+\t\tcontrib/contacts/git-contacts.txt \\\n+\t\tcontrib/svn-fe/svn-fe.html \\\n+\t\tcontrib/svn-fe/svn-fe.txt\n \tcd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar .\n \tgzip -n -9 -f $(htmldocs).tar\n \t:\n \t$(RM) -r .doc-tmp-dir\n \tmkdir -p .doc-tmp-dir/man1 .doc-tmp-dir/man5 .doc-tmp-dir/man7\n-\t$(MAKE) -C Documentation DESTDIR=./ \\\n-\t\tman1dir=../.doc-tmp-dir/man1 \\\n-\t\tman5dir=../.doc-tmp-dir/man5 \\\n-\t\tman7dir=../.doc-tmp-dir/man7 \\\n-\t\tinstall\n+\tfor d in $(doc_dirs) ; do \\\n+\t\t$(MAKE) -C $$d DESTDIR=$(PWD)/ \\\n+\t\tman1dir=/.doc-tmp-dir/man1 \\\n+\t\tman5dir=/.doc-tmp-dir/man5 \\\n+\t\tman7dir=/.doc-tmp-dir/man7 \\\n+\t\tinstall-man ; \\\n+\tdone\n+\t: # These files have no install targets\n+\tcp --target .doc-tmp-dir/man1/ \\\n+\t\tcontrib/svn-fe/svn-fe.1\n \tcd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar .\n \tgzip -n -9 -f $(manpages).tar\n \t$(RM) -r .doc-tmp-dir\n-- \n2.22.0\n\n"},{"id":"377920","messageId":"xmqqk1dahlc1.fsf@gitster-ct.c.googlers.com","threadId":"51367","inReplyTo":"20190623215046.24030-1-robbat2@gentoo.org","subject":"Re: [PATCH] Makefile: include contrib docs in dist-doc tarballs","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-06-24T18:47:26Z","receivedAt":"2019-06-24T18:47:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"robbat2@gentoo.org writes:\n\n> +.PHONY: dist-doc distclean contrib-doc\n\nI do not think I want to do this.\n\nContrib are not part of the core because they are not.  We do not\ninstall their \"executable\" from the top-level Makefile and I prefer\nto keep it that way.  Why should we ship their documentation\nourselves?  If somebody wants to build and distribute the contrib\nmaterial, they should be spending their cycles to also build and\ndistribute the matching docs, not me.\n\n> +# subdirs with install-html & install-man targets\n> +contrib_doc_dirs := contrib/contacts contrib/subtree\n> +doc_dirs := Documentation $(contrib_doc_dirs)\n> +\n> +contrib-doc:\n> +\t$(MAKE) -C contrib/svn-fe svn-fe.html svn-fe.1 # no doc target\n> +\tfor d in $(contrib_doc_dirs) ; do \\\n> +\t\t$(MAKE) -C $$d doc ; \\\n> +\tdone\n> +\n> +dist-doc: doc contrib-doc\n>  \t$(RM) -r .doc-tmp-dir\n>  \tmkdir .doc-tmp-dir\n> -\t$(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc\n> +\tfor d in $(doc_dirs) ; do \\\n> +\t\t$(MAKE) -C $$d \\\n> +\t\t\tDESTDIR=$(PWD)/ \\\n> +\t\t\thtmldir=/.doc-tmp-dir/ \\\n> +\t\t\tinstall-html ; \\\n> +\tdone\n> +\t: # These files have no install targets\n> +\tcp --target .doc-tmp-dir \\\n\n\"cp --target\"???  It may be tempting but I do not think we can rely\non it being available everywhere.\n\n> +\t\tcontrib/subtree/git-subtree.txt \\\n> +\t\tcontrib/contacts/git-contacts.txt \\\n> +\t\tcontrib/svn-fe/svn-fe.html \\\n> +\t\tcontrib/svn-fe/svn-fe.txt\n"}]}