git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Documentation: fix man page dependency on asciidoc.conf

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 6, 2013, 06:51 UTC
Message-ID
<7vbod2pzxd.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20130105232800.GF3247@elie.Belkin>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 14 quoted lines
> John Keeping wrote:
>
>> When building manual pages, the source text is transformed to XML with
>> AsciiDoc before the man pages are generated from the XML with xmlto.
>>
>> Fix the dependency in the Makefile so that the XML files are rebuilt
>> when asciidoc.conf changes and not just the manual pages from unchanged
>> XML.
>
> Good catch, thanks.
>
> Would something like the following make sense, to make it more obvious
> how the dependency needs to be adjusted if we change the $(ASCIIDOC)
> command line for some reason?

I think such a more explicit approach is easier to understand, than a separate "By the way, I do not define any rule to build these targets using asciidoc.conf, but I know they depend on it" rule.

Care to do a real patch?
Thanks.
Show 53 quoted lines
> diff --git i/Documentation/Makefile w/Documentation/Makefile
> index e53d333e..971977b8 100644
> --- i/Documentation/Makefile
> +++ w/Documentation/Makefile
> @@ -178,8 +178,6 @@ all: html man
>  
>  html: $(DOC_HTML)
>  
> -$(DOC_HTML) $(DOC_MAN1) $(DOC_MAN5) $(DOC_MAN7): asciidoc.conf
> -
>  man: man1 man5 man7
>  man1: $(DOC_MAN1)
>  man5: $(DOC_MAN5)
> @@ -257,7 +255,7 @@ clean:
>  	$(RM) $(cmds_txt) *.made
>  	$(RM) manpage-base-url.xsl
>  
> -$(MAN_HTML): %.html : %.txt
> +$(MAN_HTML): %.html : %.txt asciidoc.conf
>  	$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
>  	$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf \
>  		$(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $< && \
> @@ -270,7 +268,7 @@ manpage-base-url.xsl: manpage-base-url.xsl.in
>  	$(QUIET_XMLTO)$(RM) $@ && \
>  	$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
>  
> -%.xml : %.txt
> +%.xml : %.txt asciidoc.conf
>  	$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
>  	$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \
>  		$(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $< && \
> @@ -286,7 +284,7 @@ technical/api-index.txt: technical/api-index-skel.txt \
>  	$(QUIET_GEN)cd technical && '$(SHELL_PATH_SQ)' ./api-index.sh
>  
>  technical/%.html: ASCIIDOC_EXTRA += -a git-relative-html-prefix=../
> -$(patsubst %,%.html,$(API_DOCS) technical/api-index $(TECH_DOCS)): %.html : %.txt
> +$(patsubst %,%.html,$(API_DOCS) technical/api-index $(TECH_DOCS)): %.html : %.txt asciidoc.conf
>  	$(QUIET_ASCIIDOC)$(ASCIIDOC) -b xhtml11 -f asciidoc.conf \
>  		$(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) $*.txt
>  
> diff --git i/t/test-terminal.perl w/t/test-terminal.perl
> index 10172aee..1fb373f2 100755
> --- i/t/test-terminal.perl
> +++ w/t/test-terminal.perl
> @@ -31,7 +31,7 @@ sub finish_child {
>  	} elsif ($? & 127) {
>  		my $code = $? & 127;
>  		warn "died of signal $code";
> -		return $code - 128;
> +		return $code + 128;
>  	} else {
>  		return $? >> 8;
>  	}
Previous: Jonathan NiederNext: Jonathan Nieder
Message 3 of 6 in “Documentation: fix man page dependency on asciidoc.conf”
  1. Documentation: fix man page dependency on asciidoc.confJohn Keeping, Jan 5, 2013
  2. Jonathan NiederJan 5, 2013
  3. Junio C HamanoJan 6, 2013
  4. docs: manpage XML depends on asciidoc.confJonathan Nieder, Jan 6, 2013
  5. John KeepingJan 6, 2013
  6. Junio C HamanoJan 6, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.