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

Re: [PATCH] Documentation/Makefile: fix "make info" regression in dad9cd7d518

From
Adam Dinwoodie <adam@dinwoodie.org>
Date
Apr 6, 2022, 08:26 UTC
Message-ID
<20220406082625.7mots3ziqchjpyhw@lucy.dinwoodie.org>
In-Reply-To
<patch-1.1-e700d372e0c-20220405T195425Z-avarab@gmail.com>
On Tue, Apr 05, 2022 at 09:56:20PM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 48 quoted lines
> Fix a regression in my dad9cd7d518 (Makefile: move ".SUFFIXES" rule to
> shared.mak, 2022-03-03). As explained in the GNU make documentation
> for the $* variable, available at:
> 
> 	info make --index-search='$*'
> 
> This rule relied on ".texi" being in the default list of suffixes, as
> seen at:
> 
> 	make -f/dev/null -p | grep -v -e ^# -e ^$|grep -F .SUFFIXES
> 
> The documentation explains what was going on here:
> 
> 	In an explicit rule, there is no stem; so '$*' cannot be determined
> 	in that way.  Instead, if the target name ends with a recognized
> 	suffix (*note Old-Fashioned Suffix Rules: Suffix Rules.), '$*' is
> 	set to the target name minus the suffix.  For example, if the
> 	target name is 'foo.c', then '$*' is set to 'foo', since '.c' is a
> 	suffix.  GNU 'make' does this bizarre thing only for compatibility
> 	with other implementations of 'make'.  You should generally avoid
> 	using '$*' except in implicit rules or static pattern rules.
> 
> 	If the target name in an explicit rule does not end with a
> 	recognized suffix, '$*' is set to the empty string for that rule.
> 
> I.e. this rule added back in 5cefc33bffd (Documentation: add
> gitman.info target, 2007-12-10) was resolving gitman.texi from
> gitman.info. We can instead just use the more obvious $< variable
> referring to the prerequisite.
> 
> This was the only use of $* in our Makefiles in an explicit rule, the
> three remaining ones are all implicit rules, and therefore didn't
> depend on the ".SUFFIXES" list.
> 
> Reported-by: Adam Dinwoodie <adam@dinwoodie.org>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
> 
> On Tue, Apr 05 2022, Adam Dinwoodie wrote:
> 
> > With this commit, I get the same noisy warnings, but I also get the
> > error "could not open .texi: No such file or directory".
> 
> Sorry about the regression. This fixes it, and as noted above I'm
> pretty sure this was the only fallout of the change.
> 
> (I didn't have building the full extended documentation as part of my
> local build, but I'll be adding it now).
Confirmed this patch fixes things for me.  Thanks for the quick fix!
Tested-by: Adam Dinwoodie <adam@dinwoodie.org>
Previous: Ævar Arnfjörð BjarmasonNext: Junio C Hamano
Message 62 of 67 in “Makefile: optimize noop runs, add shared.mak”
  1. 0/8 Makefile: optimize noop runs, add shared.makÆvar Arnfjörð Bjarmason, Dec 24, 2021
  2. 1/8 Makefiles: add "shared.mak", move ".DELETE_ON_ERROR" to itÆvar Arnfjörð Bjarmason, Dec 24, 2021
  3. 2/8 Makefile: disable GNU make built-in wildcard rulesÆvar Arnfjörð Bjarmason, Dec 24, 2021
  4. 3/8 Makefile: define $(LIB_H) in terms of $(FIND_SOURCE_FILES)Ævar Arnfjörð Bjarmason, Dec 24, 2021
  5. 4/8 Makefile: move ".SUFFIXES" rule to shared.makÆvar Arnfjörð Bjarmason, Dec 24, 2021
  6. Taylor BlauFeb 22, 2022
  7. Ævar Arnfjörð BjarmasonFeb 22, 2022
  8. 6/8 Makefile: add "$(QUIET)" boilerplate to shared.makÆvar Arnfjörð Bjarmason, Dec 24, 2021
  9. 5/8 Makefile: move $(comma), $(empty) and $(space) to shared.makÆvar Arnfjörð Bjarmason, Dec 24, 2021
  10. 7/8 Makefile: use $(wspfx) for $(QUIET...) in shared.makÆvar Arnfjörð Bjarmason, Dec 24, 2021
  11. 8/8 Makefiles: add and use wildcard "mkdir -p" templateÆvar Arnfjörð Bjarmason, Dec 24, 2021
  12. Ævar Arnfjörð BjarmasonFeb 21, 2022
  13. 0/9 Makefile: optimize noop runs, add shared.makÆvar Arnfjörð Bjarmason, Feb 25, 2022
  14. 1/9 scalar Makefile: set the default target after the includesÆvar Arnfjörð Bjarmason, Feb 25, 2022
  15. Junio C HamanoFeb 25, 2022
  16. 2/9 Makefiles: add "shared.mak", move ".DELETE_ON_ERROR" to itÆvar Arnfjörð Bjarmason, Feb 25, 2022
  17. Junio C HamanoFeb 25, 2022
  18. Ævar Arnfjörð BjarmasonFeb 25, 2022
  19. Junio C HamanoFeb 25, 2022
  20. Phillip WoodFeb 28, 2022
  21. Ævar Arnfjörð BjarmasonFeb 28, 2022
  22. Phillip WoodFeb 28, 2022
  23. Ævar Arnfjörð BjarmasonFeb 28, 2022
  24. 3/9 Makefile: disable GNU make built-in wildcard rulesÆvar Arnfjörð Bjarmason, Feb 25, 2022
  25. Junio C HamanoFeb 25, 2022
  26. 5/9 Makefile: move ".SUFFIXES" rule to shared.makÆvar Arnfjörð Bjarmason, Feb 25, 2022
  27. Junio C HamanoFeb 25, 2022
  28. 7/9 Makefile: add "$(QUIET)" boilerplate to shared.makÆvar Arnfjörð Bjarmason, Feb 25, 2022
  29. Junio C HamanoFeb 25, 2022
  30. 6/9 Makefile: move $(comma), $(empty) and $(space) to shared.makÆvar Arnfjörð Bjarmason, Feb 25, 2022
  31. Junio C HamanoFeb 25, 2022
  32. 4/9 Makefile: define $(LIB_H) in terms of $(FIND_SOURCE_FILES)Ævar Arnfjörð Bjarmason, Feb 25, 2022
  33. 8/9 Makefile: use $(wspfx) for $(QUIET...) in shared.makÆvar Arnfjörð Bjarmason, Feb 25, 2022
  34. Junio C HamanoFeb 25, 2022
  35. 9/9 Makefiles: add and use wildcard "mkdir -p" templateÆvar Arnfjörð Bjarmason, Feb 25, 2022
  36. 0/9 Makefile: optimize noop runs, add shared.makÆvar Arnfjörð Bjarmason, Mar 2, 2022
  37. 1/9 scalar Makefile: use "The default target of..." patternÆvar Arnfjörð Bjarmason, Mar 2, 2022
  38. Junio C HamanoMar 2, 2022
  39. 2/9 Makefiles: add "shared.mak", move ".DELETE_ON_ERROR" to itÆvar Arnfjörð Bjarmason, Mar 2, 2022
  40. 3/9 Makefile: disable GNU make built-in wildcard rulesÆvar Arnfjörð Bjarmason, Mar 2, 2022
  41. 4/9 Makefile: define $(LIB_H) in terms of $(FIND_SOURCE_FILES)Ævar Arnfjörð Bjarmason, Mar 2, 2022
  42. 5/9 Makefile: move ".SUFFIXES" rule to shared.makÆvar Arnfjörð Bjarmason, Mar 2, 2022
  43. 7/9 Makefile: add "$(QUIET)" boilerplate to shared.makÆvar Arnfjörð Bjarmason, Mar 2, 2022
  44. 6/9 Makefile: move $(comma), $(empty) and $(space) to shared.makÆvar Arnfjörð Bjarmason, Mar 2, 2022
  45. 8/9 Makefile: use $(wspfx) for $(QUIET...) in shared.makÆvar Arnfjörð Bjarmason, Mar 2, 2022
  46. Junio C HamanoMar 2, 2022
  47. 9/9 Makefiles: add and use wildcard "mkdir -p" templateÆvar Arnfjörð Bjarmason, Mar 2, 2022
  48. Junio C HamanoMar 2, 2022
  49. Junio C HamanoMar 2, 2022
  50. Phillip WoodMar 3, 2022
  51. 0/8 Makefile: optimize noop runs, add shared.makÆvar Arnfjörð Bjarmason, Mar 3, 2022
  52. 1/8 scalar Makefile: use "The default target of..." patternÆvar Arnfjörð Bjarmason, Mar 3, 2022
  53. 2/8 Makefiles: add "shared.mak", move ".DELETE_ON_ERROR" to itÆvar Arnfjörð Bjarmason, Mar 3, 2022
  54. 3/8 Makefile: disable GNU make built-in wildcard rulesÆvar Arnfjörð Bjarmason, Mar 3, 2022
  55. Rene KitaApr 11, 2022
  56. Ævar Arnfjörð BjarmasonApr 11, 2022
  57. 4/8 Makefile: define $(LIB_H) in terms of $(FIND_SOURCE_FILES)Ævar Arnfjörð Bjarmason, Mar 3, 2022
  58. 5/8 Makefile: move ".SUFFIXES" rule to shared.makÆvar Arnfjörð Bjarmason, Mar 3, 2022
  59. Adam DinwoodieApr 5, 2022
  60. Ævar Arnfjörð BjarmasonApr 5, 2022
  61. Documentation/Makefile: fix "make info" regression in dad9cd7d518Ævar Arnfjörð Bjarmason, Apr 5, 2022
  62. Adam DinwoodieApr 6, 2022
  63. Junio C HamanoApr 6, 2022
  64. Taylor BlauApr 6, 2022
  65. 7/8 Makefile: add "$(QUIET)" boilerplate to shared.makÆvar Arnfjörð Bjarmason, Mar 3, 2022
  66. 6/8 Makefile: move $(comma), $(empty) and $(space) to shared.makÆvar Arnfjörð Bjarmason, Mar 3, 2022
  67. 8/8 Makefiles: add and use wildcard "mkdir -p" templateÆvar Arnfjörð Bjarmason, Mar 3, 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.