{"thread":{"id":"7369","subject":"[PATCH 1/2] Documentation: Allow @@GIT_VERSION@@ in asciidoc.conf","startedAt":"2007-03-23T18:54:04Z","lastAt":"2007-03-27T06:55:48Z","messageCount":11,"participants":["Frank Lichtenheld","Junio C Hamano","Brian Gernhardt"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"37833","messageId":"11746760451462-git-send-email-frank@lichtenheld.de","threadId":"7369","inReplyTo":null,"subject":"[PATCH 1/2] Documentation: Allow @@GIT_VERSION@@ in asciidoc.conf","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-03-23T18:54:04Z","receivedAt":"2007-03-23T18:54:04Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"Rename asciidoc.conf to asciidoc.conf.in and create\nthe former on build time after piping it through sed.\n\nThis is useful to allow us to include the git version\nin the documentation.\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n Documentation/Makefile         |   11 ++++++++---\n Documentation/asciidoc.conf    |   39 ---------------------------------------\n Documentation/asciidoc.conf.in |   39 +++++++++++++++++++++++++++++++++++++++\n 3 files changed, 47 insertions(+), 42 deletions(-)\n delete mode 100644 Documentation/asciidoc.conf\n create mode 100644 Documentation/asciidoc.conf.in\n\ndiff --git a/Documentation/Makefile b/Documentation/Makefile\nindex 7c1c9e1..6197929 100644\n--- a/Documentation/Makefile\n+++ b/Documentation/Makefile\n@@ -38,6 +38,7 @@ DOC_REF = origin/man\n \n -include ../config.mak.autogen\n -include ../config.mak\n+-include ../GIT-VERSION-FILE\n \n #\n # Please note that there is a minor bug in asciidoc.\n@@ -90,16 +91,20 @@ $(cmds_txt): cmd-list.perl $(MAN1_TXT)\n git.7 git.html: git.txt core-intro.txt\n \n clean:\n-\trm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html doc.dep\n+\trm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html doc.dep asciidoc.conf\n \trm -f $(cmds_txt)\n \n-%.html : %.txt\n+asciidoc.conf: asciidoc.conf.in\n+\tsed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' $< >$@+\n+\tmv $@+ $@\n+\n+%.html : %.txt asciidoc.conf\n \t$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf $(ASCIIDOC_EXTRA) $<\n \n %.1 %.7 : %.xml\n \txmlto -m callouts.xsl man $<\n \n-%.xml : %.txt\n+%.xml : %.txt asciidoc.conf\n \t$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf $<\n \n user-manual.xml: user-manual.txt user-manual.conf\ndiff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf\ndeleted file mode 100644\nindex 44b1ce4..0000000\n--- a/Documentation/asciidoc.conf\n+++ /dev/null\n@@ -1,39 +0,0 @@\n-## gitlink: macro\n-#\n-# Usage: gitlink:command[manpage-section]\n-#\n-# Note, {0} is the manpage section, while {target} is the command.\n-#\n-# Show GIT link as: <command>(<section>); if section is defined, else just show\n-# the command.\n-\n-[attributes]\n-caret=^\n-startsb=&#91;\n-endsb=&#93;\n-tilde=&#126;\n-\n-ifdef::backend-docbook[]\n-[gitlink-inlinemacro]\n-{0%{target}}\n-{0#<citerefentry>}\n-{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}\n-{0#</citerefentry>}\n-endif::backend-docbook[]\n-\n-ifdef::backend-docbook[]\n-# \"unbreak\" docbook-xsl v1.68 for manpages. v1.69 works with or without this.\n-[listingblock]\n-<example><title>{title}</title>\n-<literallayout>\n-|\n-</literallayout>\n-{title#}</example>\n-endif::backend-docbook[]\n-\n-ifdef::backend-xhtml11[]\n-[gitlink-inlinemacro]\n-<a href=\"{target}.html\">{target}{0?({0})}</a>\n-endif::backend-xhtml11[]\n-\n-\ndiff --git a/Documentation/asciidoc.conf.in b/Documentation/asciidoc.conf.in\nnew file mode 100644\nindex 0000000..44b1ce4\n--- /dev/null\n+++ b/Documentation/asciidoc.conf.in\n@@ -0,0 +1,39 @@\n+## gitlink: macro\n+#\n+# Usage: gitlink:command[manpage-section]\n+#\n+# Note, {0} is the manpage section, while {target} is the command.\n+#\n+# Show GIT link as: <command>(<section>); if section is defined, else just show\n+# the command.\n+\n+[attributes]\n+caret=^\n+startsb=&#91;\n+endsb=&#93;\n+tilde=&#126;\n+\n+ifdef::backend-docbook[]\n+[gitlink-inlinemacro]\n+{0%{target}}\n+{0#<citerefentry>}\n+{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}\n+{0#</citerefentry>}\n+endif::backend-docbook[]\n+\n+ifdef::backend-docbook[]\n+# \"unbreak\" docbook-xsl v1.68 for manpages. v1.69 works with or without this.\n+[listingblock]\n+<example><title>{title}</title>\n+<literallayout>\n+|\n+</literallayout>\n+{title#}</example>\n+endif::backend-docbook[]\n+\n+ifdef::backend-xhtml11[]\n+[gitlink-inlinemacro]\n+<a href=\"{target}.html\">{target}{0?({0})}</a>\n+endif::backend-xhtml11[]\n+\n+\n-- \n1.5.0.3\n"},{"id":"37834","messageId":"11746760452311-git-send-email-frank@lichtenheld.de","threadId":"7369","inReplyTo":"11746760451462-git-send-email-frank@lichtenheld.de","subject":"[PATCH 2/2] Documentation: Add version information to man pages","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-03-23T18:54:05Z","receivedAt":"2007-03-23T18:54:05Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"Override the [header] macro of asciidoc's docbook\nbackend to add version information to the generated\nman pages.\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n Documentation/asciidoc.conf.in |   17 +++++++++++++++++\n 1 files changed, 17 insertions(+), 0 deletions(-)\n\n I personally prefer to have this information available in the man page.\n\n Copying the whole [header] template is at best ugly but works. Better\n suggestions welcome.\n\ndiff --git a/Documentation/asciidoc.conf.in b/Documentation/asciidoc.conf.in\nindex 44b1ce4..a86c31d 100644\n--- a/Documentation/asciidoc.conf.in\n+++ b/Documentation/asciidoc.conf.in\n@@ -31,6 +31,23 @@ ifdef::backend-docbook[]\n {title#}</example>\n endif::backend-docbook[]\n \n+ifdef::backend-docbook[]\n+[header]\n+template::[header-declarations]\n+<refentry>\n+<refmeta>\n+<refentrytitle>{mantitle}</refentrytitle>\n+<manvolnum>{manvolnum}</manvolnum>\n+<refmiscinfo class=\"source\">Git</refmiscinfo>\n+<refmiscinfo class=\"version\">@@GIT_VERSION@@</refmiscinfo>\n+<refmiscinfo class=\"manual\">Git Manual</refmiscinfo>\n+</refmeta>\n+<refnamediv>\n+  <refname>{manname}</refname>\n+  <refpurpose>{manpurpose}</refpurpose>\n+</refnamediv>\n+endif::backend-docbook[]\n+\n ifdef::backend-xhtml11[]\n [gitlink-inlinemacro]\n <a href=\"{target}.html\">{target}{0?({0})}</a>\n-- \n1.5.0.3\n"},{"id":"37840","messageId":"7vejnfpqx5.fsf@assigned-by-dhcp.cox.net","threadId":"7369","inReplyTo":"11746760451462-git-send-email-frank@lichtenheld.de","subject":"Re: [PATCH 1/2] Documentation: Allow @@GIT_VERSION@@ in asciidoc.conf","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-23T21:53:58Z","receivedAt":"2007-03-23T21:53:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Frank Lichtenheld <frank@lichtenheld.de> writes:\n\n> Rename asciidoc.conf to asciidoc.conf.in and create\n> the former on build time after piping it through sed.\n>\n> This is useful to allow us to include the git version\n> in the documentation.\n>\n> Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n> ---\n>  Documentation/Makefile         |   11 ++++++++---\n>  Documentation/asciidoc.conf    |   39 ---------------------------------------\n>  Documentation/asciidoc.conf.in |   39 +++++++++++++++++++++++++++++++++++++++\n>  3 files changed, 47 insertions(+), 42 deletions(-)\n>  delete mode 100644 Documentation/asciidoc.conf\n>  create mode 100644 Documentation/asciidoc.conf.in\n\nWhen sending a patch like this, please use \"format-patch -M\".\n\nWhile this is attractive to some degree, *I* am grumpy.  Doesn't\nthis patch make html and man branches update all files _every_\ntime any small change is made to some documentation?\n"},{"id":"37874","messageId":"20070324120421.GL8017@planck.djpig.de","threadId":"7369","inReplyTo":"7vejnfpqx5.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 1/2] Documentation: Allow @@GIT_VERSION@@ in asciidoc.conf","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-03-24T12:04:22Z","receivedAt":"2007-03-24T12:04:22Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"On Fri, Mar 23, 2007 at 02:53:58PM -0700, Junio C Hamano wrote:\n> Frank Lichtenheld <frank@lichtenheld.de> writes:\n> \n> > Rename asciidoc.conf to asciidoc.conf.in and create\n> > the former on build time after piping it through sed.\n> >\n> > This is useful to allow us to include the git version\n> > in the documentation.\n\n> When sending a patch like this, please use \"format-patch -M\".\n\nOk.\n\n> While this is attractive to some degree, *I* am grumpy.  Doesn't\n> this patch make html and man branches update all files _every_\n> time any small change is made to some documentation?\n\nNot with my patch; which is a bug in the patch though because\nasciidoc.conf should really depend on GIT-VERSION-FILE.\n\nAnother possibility would be to replace the @@GIT_VERSION@@ in the man pages\nthemself and not in the asciidoc.conf. This would mean perhaps slightly\nbigger changes to the build system, but running sed on all the files is of\ncourse a lot faster than regenerating them with asciidoc.\n\nWhat do you think?\n\nGruesse,\n-- \nFrank Lichtenheld <frank@lichtenheld.de>\nwww: http://www.djpig.de/\n"},{"id":"37880","messageId":"382A0F82-0CD9-43B8-8F91-4CAD6DBFF890@silverinsanity.com","threadId":"7369","inReplyTo":"20070324120421.GL8017@planck.djpig.de","subject":"Re: [PATCH 1/2] Documentation: Allow @@GIT_VERSION@@ in asciidoc.conf","fromName":"Brian Gernhardt","fromEmail":"benji@silverinsanity.com","sentAt":"2007-03-24T14:26:30Z","receivedAt":"2007-03-24T14:26:30Z","isPatch":true,"sender":{"key":"benji@silverinsanity.com","avatar":"https://gravatar.com/avatar/e06c101dbc25c68114d859b4a9ec7cf8a2c52fd2b0270ef0eac0e2e63ff22311?d=mp&s=160"},"body":"\nOn Mar 24, 2007, at 8:04 AM, Frank Lichtenheld wrote:\n\n> On Fri, Mar 23, 2007 at 02:53:58PM -0700, Junio C Hamano wrote:\n>\n>> While this is attractive to some degree, *I* am grumpy.  Doesn't\n>> this patch make html and man branches update all files _every_\n>> time any small change is made to some documentation?\n>\n> Not with my patch; which is a bug in the patch though because\n> asciidoc.conf should really depend on GIT-VERSION-FILE.\n>\n> Another possibility would be to replace the @@GIT_VERSION@@ in the  \n> man pages\n> themself and not in the asciidoc.conf. This would mean perhaps  \n> slightly\n> bigger changes to the build system, but running sed on all the  \n> files is of\n> course a lot faster than regenerating them with asciidoc.\n>\n> What do you think?\n\nI think that any change that causes the documentation to be rebuilt  \nwithout any change in the documentation is a horrible horrible idea.   \nThe asciidoc+xmlto/xsltproc chain is noticeably slow, and I don't  \nthink that having the version number is important enough to cause a  \nrebuild.  Using sed is definitely better than doing a rebuild from  \nthe start at the cost of a fair amount of complexity (and extra  \nfiles, but that's fairly negligible).\n\nI'm not convinced of the need to have a version in every doc file,  \nthough.  The only use I can think of is to avoid version skew between  \nthe documentation and the programs, and that's easily solved by  \nalways building and installing them together.  Adding a version to  \njust the main git man file might not be a bad mid-point though to  \nmake that skew easier to detect without having to rebuild *everything*.\n\n~~ Brian\n"},{"id":"37899","messageId":"7vircqe389.fsf@assigned-by-dhcp.cox.net","threadId":"7369","inReplyTo":"20070324120421.GL8017@planck.djpig.de","subject":"Re: [PATCH 1/2] Documentation: Allow @@GIT_VERSION@@ in asciidoc.conf","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-24T21:33:26Z","receivedAt":"2007-03-24T21:33:26Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Frank Lichtenheld <frank@lichtenheld.de> writes:\n\n> On Fri, Mar 23, 2007 at 02:53:58PM -0700, Junio C Hamano wrote:\n> ...\n>> While this is attractive to some degree, *I* am grumpy.  Doesn't\n>> this patch make html and man branches update all files _every_\n>> time any small change is made to some documentation?\n>\n> Not with my patch; which is a bug in the patch though because\n> asciidoc.conf should really depend on GIT-VERSION-FILE.\n>\n> Another possibility would be to replace the @@GIT_VERSION@@ in the man pages\n> themself and not in the asciidoc.conf. This would mean perhaps slightly\n> bigger changes to the build system, but running sed on all the files is of\n> course a lot faster than regenerating them with asciidoc.\n>\n> What do you think?\n\nIdeally, I would like a solution that does not update the\nresulting git-foo.html if I keep running these two commands\nevery time the tip of 'master' in the official repo is updated:\n\n\t$ git pull ;# get the latest 'master' from the official repo\n\t$ make -C Documentation\n\t: do not run 'make clean' here for the next round\n\nwhen the only difference in git-foo.html left from the previous\nround and this make would regenerate are embedded datestamps and\ngit version numbers in the output (same for manpages).  In other\nwords, if the description for the command changed between v1.4.4\nand v1.5.0 but did not change at all in v1.5.1, provided that\nthe above sequence \"pull && make\" is the only thing that is ever\nrun in the repository (especially, no 'make clean' is ever run),\nI would prefer the generated document to say it was formatted on\nthe day v1.5.0 was pushed out to the official repository, and\nthe document describes git v1.5.0, even after I did the above\ncommand sequence on the day v1.5.1 is pushed out.  That would\nprevent html and man branches from getting meaningless updates\nthat only change the embedded version numbers and datestamps.\n\nIn other words, I do not want the git-cat-file.html to mention\n\"v1.5.1-rc1-53-g2499857\", if what it says has not changed since\nv1.2.0.  I'd prefer to see \"v1.2.0\" there.\n\nWhich probably means that the version number should not be part\nof the dependencies of generated documents, as far as 'make's\nrebuilding decision is concerned.\n\nIf somebody wants all documentation to say what the latest git\nis, s/he can do \"make clean && make\", even if you arrange it to\nallow me do the above, but the opposite is more cumbersome and\nerror prone.\n"},{"id":"37931","messageId":"11748238102228-git-send-email-frank@lichtenheld.de","threadId":"7369","inReplyTo":"7vircqe389.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH 1/2] Documentation: Replace @@GIT_VERSION@@ in documentation","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-03-25T11:56:49Z","receivedAt":"2007-03-25T11:56:49Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"Include GIT-VERSION-FILE and replace @@GIT_VERSION@@ in\nthe HTML and XML asciidoc output. The documentation\ndoesn't depend on GIT-VERSION-FILE so it will not be\nautomatically rebuild if nothing else changed.\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n Documentation/Makefile |   13 ++++++++++++-\n 1 files changed, 12 insertions(+), 1 deletions(-)\n\n This should satisfy all of Junio's requirements.\n\ndiff --git a/Documentation/Makefile b/Documentation/Makefile\nindex 7c1c9e1..64cc755 100644\n--- a/Documentation/Makefile\n+++ b/Documentation/Makefile\n@@ -64,6 +64,11 @@ install: man\n \t$(INSTALL) -m644 $(DOC_MAN7) $(DESTDIR)$(man7dir)\n \n \n+../GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE\n+\t$(MAKE) -C ../ GIT-VERSION-FILE\n+\n+-include ../GIT-VERSION-FILE\n+\n #\n # Determine \"include::\" file references in asciidoc files.\n #\n@@ -90,17 +95,21 @@ $(cmds_txt): cmd-list.perl $(MAN1_TXT)\n git.7 git.html: git.txt core-intro.txt\n \n clean:\n-\trm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html doc.dep\n+\trm -f *.xml *.xml+ *.html *.html+ *.1 *.7 howto-index.txt howto/*.html doc.dep\n \trm -f $(cmds_txt)\n \n %.html : %.txt\n \t$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf $(ASCIIDOC_EXTRA) $<\n+\tsed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' $@ >$@+\n+\tmv $@+ $@\n \n %.1 %.7 : %.xml\n \txmlto -m callouts.xsl man $<\n \n %.xml : %.txt\n \t$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf $<\n+\tsed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' $@ >$@+\n+\tmv $@+ $@\n \n user-manual.xml: user-manual.txt user-manual.conf\n \t$(ASCIIDOC) -b docbook -d book $<\n@@ -136,3 +145,5 @@ install-webdoc : html\n \n quick-install:\n \tsh ./install-doc-quick.sh $(DOC_REF) $(mandir)\n+\n+.PHONY: .FORCE-GIT-VERSION-FILE\n-- \n1.5.0.3\n"},{"id":"37932","messageId":"117482381140-git-send-email-frank@lichtenheld.de","threadId":"7369","inReplyTo":"11748238102228-git-send-email-frank@lichtenheld.de","subject":"[PATCH 2/2] Documentation: Add version information to man pages","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-03-25T11:56:50Z","receivedAt":"2007-03-25T11:56:50Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"Override the [header] macro of asciidoc's docbook\nbackend to add version information to the generated\nman pages.\n\nSigned-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n---\n Documentation/asciidoc.conf |   17 +++++++++++++++++\n 1 files changed, 17 insertions(+), 0 deletions(-)\n\n This one is unchanged but now applied to asciidoc.conf directly\n since asciidoc.conf.in is no longer necessary.\n\ndiff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf\nindex 44b1ce4..a86c31d 100644\n--- a/Documentation/asciidoc.conf\n+++ b/Documentation/asciidoc.conf\n@@ -31,6 +31,23 @@ ifdef::backend-docbook[]\n {title#}</example>\n endif::backend-docbook[]\n \n+ifdef::backend-docbook[]\n+[header]\n+template::[header-declarations]\n+<refentry>\n+<refmeta>\n+<refentrytitle>{mantitle}</refentrytitle>\n+<manvolnum>{manvolnum}</manvolnum>\n+<refmiscinfo class=\"source\">Git</refmiscinfo>\n+<refmiscinfo class=\"version\">@@GIT_VERSION@@</refmiscinfo>\n+<refmiscinfo class=\"manual\">Git Manual</refmiscinfo>\n+</refmeta>\n+<refnamediv>\n+  <refname>{manname}</refname>\n+  <refpurpose>{manpurpose}</refpurpose>\n+</refnamediv>\n+endif::backend-docbook[]\n+\n ifdef::backend-xhtml11[]\n [gitlink-inlinemacro]\n <a href=\"{target}.html\">{target}{0?({0})}</a>\n-- \n1.5.0.3\n"},{"id":"37991","messageId":"7v7it41scp.fsf@assigned-by-dhcp.cox.net","threadId":"7369","inReplyTo":"11748238102228-git-send-email-frank@lichtenheld.de","subject":"Re: [PATCH 1/2] Documentation: Replace @@GIT_VERSION@@ in documentation","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-26T05:33:42Z","receivedAt":"2007-03-26T05:33:42Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Frank Lichtenheld <frank@lichtenheld.de> writes:\n\n>  %.html : %.txt\n>  \t$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf $(ASCIIDOC_EXTRA) $<\n> +\tsed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' $@ >$@+\n> +\tmv $@+ $@\n>  \n>  %.1 %.7 : %.xml\n>  \txmlto -m callouts.xsl man $<\n>  \n>  %.xml : %.txt\n>  \t$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf $<\n> +\tsed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' $@ >$@+\n> +\tmv $@+ $@\n>  \n>  user-manual.xml: user-manual.txt user-manual.conf\n>  \t$(ASCIIDOC) -b docbook -d book $<\n\nSorry, but these compositions are wrong, as the build procedure\ncan die after asciidoc finishes but before it manages to finish\nsed/mv.  The next make invocation would not know that the\nprevious one did not complete and would assume that the build\nproduct %.html or %.xml are up to date.\n\nIdeally if we can persuade asciidoc to output to its stdout, we\ncould do this:\n\n\trm -f $@+ $@\n        $(ASCIIDOC) --to-stdout ... | sed -e $(script) >$@+\n        mv $@+ $@\n"},{"id":"37992","messageId":"7v3b3s1rsh.fsf@assigned-by-dhcp.cox.net","threadId":"7369","inReplyTo":"7v7it41scp.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 1/2] Documentation: Replace @@GIT_VERSION@@ in documentation","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-26T05:45:50Z","receivedAt":"2007-03-26T05:45:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <junkio@cox.net> writes:\n\n> Ideally if we can persuade asciidoc to output to its stdout, we\n> could do this:\n>\n> \trm -f $@+ $@\n>         $(ASCIIDOC) --to-stdout ... | sed -e $(script) >$@+\n>         mv $@+ $@\n\nlike this perhaps.\n\n---\n\n Documentation/Makefile |   12 ++++++++----\n 1 files changed, 8 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/Makefile b/Documentation/Makefile\nindex de6cc6e..e82596d 100644\n--- a/Documentation/Makefile\n+++ b/Documentation/Makefile\n@@ -100,16 +100,20 @@ clean:\n \trm -f $(cmds_txt)\n \n %.html : %.txt\n-\t$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf $(ASCIIDOC_EXTRA) $<\n-\tsed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' $@ >$@+\n+\trm -f $@+ $@\n+\t$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf \\\n+\t\t$(ASCIIDOC_EXTRA) -o - $< | \\\n+\t\tsed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' >$@+\n \tmv $@+ $@\n \n %.1 %.7 : %.xml\n \txmlto -m callouts.xsl man $<\n \n %.xml : %.txt\n-\t$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf $<\n-\tsed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' $@ >$@+\n+\trm -f $@+ $@\n+\t$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \\\n+\t\t$(ASCIIDOC_EXTRA) -o - $< | \\\n+\t\tsed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' >$@+\n \tmv $@+ $@\n \n user-manual.xml: user-manual.txt user-manual.conf\n"},{"id":"38115","messageId":"7vtzw7qiob.fsf@assigned-by-dhcp.cox.net","threadId":"7369","inReplyTo":"117482381140-git-send-email-frank@lichtenheld.de","subject":"Re: [PATCH 2/2] Documentation: Add version information to man pages","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-27T06:55:48Z","receivedAt":"2007-03-27T06:55:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Frank Lichtenheld <frank@lichtenheld.de> writes:\n\n> Override the [header] macro of asciidoc's docbook\n> backend to add version information to the generated\n> man pages.\n>\n> Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>\n\nThis breaks documents other than manpages by making everybody\nunconditionally use the header you stole for doctype-manpage.\n\nI needed this to unbreak it.\n\n-- >8 --\n[PATCH] Documentation: unbreak user-manual.\n\nThe previous one broke generated xml files for anything but manpages,\nas it took the header for manpage unconditionally.  This fixes it.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n Documentation/asciidoc.conf |    2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf\nindex a86c31d..fa7dc94 100644\n--- a/Documentation/asciidoc.conf\n+++ b/Documentation/asciidoc.conf\n@@ -31,6 +31,7 @@ ifdef::backend-docbook[]\n {title#}</example>\n endif::backend-docbook[]\n \n+ifdef::doctype-manpage[]\n ifdef::backend-docbook[]\n [header]\n template::[header-declarations]\n@@ -47,6 +48,7 @@ template::[header-declarations]\n   <refpurpose>{manpurpose}</refpurpose>\n </refnamediv>\n endif::backend-docbook[]\n+endif::doctype-manpage[]\n \n ifdef::backend-xhtml11[]\n [gitlink-inlinemacro]\n-- \n1.5.1.rc2.620.g9a7ad\n"}]}