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

Re: [PATCH 1/1] Avoid multiple patterns when recipes generate one file

From
Paul Smith <psmith@gnu.org>
Date
Nov 28, 2022, 18:33 UTC
Message-ID
<43914959458ef34a0f29271afa9c9d981c2b3553.camel@gnu.org>
In-Reply-To
<221128.86mt8bkyqt.gmgdl@evledraar.gmail.com>
On Mon, 2022-11-28 at 14:08 +0100, Ævar Arnfjörð Bjarmason wrote:
Show 8 quoted lines
> Whether we use eval/define or not (I just tried to avoid the
> repetition) I think referring to $(DOC_MAN[157]) here probably makes
> more sense if we're poking at these rules.
> 
> I.e. in this case the rest of the Makefile is carrying forward what
> manpages we're generating exactly, so rather than a wildcard %.1 to
> %.xml we can narrow it down to just the %.1 files we're going to b
> generating (but maybe that's best left for later...):
I have no opinion on which is better :).

I'm not sure what the above comment is asking for though: are you going to take over pushing this change? Or do you want me to reroll the commit with these changes instead? Or are we waiting for more opinions?

Show 19 quoted lines
> diff --git a/Documentation/Makefile b/Documentation/Makefile
> index 5e1a7f655c2..7404cead084 100644
> --- a/Documentation/Makefile
> +++ b/Documentation/Makefile
> @@ -351,8 +351,12 @@ $(OBSOLETE_HTML): %.html : %.txto $(ASCIIDOC_DEPS)
>  manpage-base-url.xsl: manpage-base-url.xsl.in
>         $(QUIET_GEN)sed "s|@@MAN_BASE_URL@@|$(MAN_BASE_URL)|" $< > $@
>  
> -%.1 %.5 %.7 : %.xml manpage-base-url.xsl $(wildcard manpage*.xsl)
> -       $(QUIET_XMLTO)$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
> +define doc-man-tmpl
> +$$(DOC_MAN$(1)): %.$(1) : %.xml manpage-base-url.xsl $$(wildcard manpage*.xsl)
> +       $$(QUIET_XMLTO)$$(XMLTO) -m $$(MANPAGE_XSL) $$(XMLTO_EXTRA) man $$<
> +
> +endef
> +$(eval $(foreach n,1 5 7,$(call doc-man-tmpl,$(n))))
>  
>  %.xml : %.txt $(ASCIIDOC_DEPS)
>         $(QUIET_ASCIIDOC)$(TXT_TO_XML) -d manpage -o $@ $<
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 4 of 23 in “Avoid multiple patterns when recipes generate one file”
  1. 0/1 Avoid multiple patterns when recipes generate one filePaul Smith, Nov 27, 2022
  2. 1/1 Avoid multiple patterns when recipes generate one filePaul Smith, Nov 27, 2022
  3. Ævar Arnfjörð BjarmasonNov 28, 2022
  4. Paul SmithNov 28, 2022
  5. Ævar Arnfjörð BjarmasonNov 28, 2022
  6. 0/4 Makefiles: GNU make 4.4 fixesÆvar Arnfjörð Bjarmason, Nov 29, 2022
  7. 3/4 Makefiles: change search through $(MAKEFLAGS) for GNU make 4.4Ævar Arnfjörð Bjarmason, Nov 29, 2022
  8. Junio C HamanoNov 30, 2022
  9. Paul SmithNov 30, 2022
  10. Ævar Arnfjörð BjarmasonDec 1, 2022
  11. 1/4 Documentation/Makefile: de-duplicate *.[157] dependency listÆvar Arnfjörð Bjarmason, Nov 29, 2022
  12. Junio C HamanoNov 30, 2022
  13. 2/4 Documentation/Makefile: avoid multiple patterns when generating one fileÆvar Arnfjörð Bjarmason, Nov 29, 2022
  14. Junio C HamanoNov 30, 2022
  15. 4/4 Documentation/Makefile: narrow wildcard rules to our known filesÆvar Arnfjörð Bjarmason, Nov 29, 2022
  16. Junio C HamanoNov 30, 2022
  17. 0/1 Makefiles: GNU make 4.4 fixesÆvar Arnfjörð Bjarmason, Nov 30, 2022
  18. 1/1 Makefiles: change search through $(MAKEFLAGS) for GNU make 4.4Ævar Arnfjörð Bjarmason, Nov 30, 2022
  19. Paul SmithNov 30, 2022
  20. Junio C HamanoNov 30, 2022
  21. Johannes SchindelinDec 6, 2022
  22. Ævar Arnfjörð BjarmasonDec 6, 2022
  23. Junio C HamanoDec 6, 2022

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.