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

RE: [PATCH 3/3] Makefile: remove an out-of-date comment

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Jun 17, 2021, 20:55 UTC
Message-ID
<60cbb6bc37daf_9bf20865@natae.notmuch>
In-Reply-To
<patch-3.3-ddae86802e-20210617T095827Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason wrote:
Show 5 quoted lines
> This comment added in dfea575017 (Makefile: lazily compute header
> dependencies, 2010-01-26) has been out of date since
> 92b88eba9f (Makefile: use `git ls-files` to list header files, if
> possible, 2019-03-04), when we did exactly what it tells us not to do
> and added $(GENERATED_H) to $(OBJECTS) dependencies.
Very true.
Show 5 quoted lines
> The rest of it was also somewhere between inaccurate and outdated,
> since as of b8ba629264 (Makefile: fold MISC_H into LIB_H, 2012-06-20)
> it's not followed by a list of header files, that got moved earlier in
> the file into LIB_H in b8ba629264 (Makefile: fold MISC_H into LIB_H,
> 2012-06-20).
I don't see the point in mentioning b8ba629264 twice, perhaps you meant:
60d24dd255 (Makefile: fold XDIFF_H and VCSSVN_H into LIB_H, 2012-07-06)
This commit also removed part of the comment:
  # XXX. Please check occasionally that these include all dependencies
  # gcc detects!

I have tried to understand what was the purpose of that comment in the past, but I don't get it, it says:

  Dependencies on automatically generated headers such as command-list.h
  should _not_ be included here, since they are necessary even when
  building an object for the first time.

Why would it matter if we are building the object for the first time, or rebuilding it? If we need command-list.h to build help.o once, we need it always. What am I missing?

It seems to me this comment never made sense.
Show 13 quoted lines
> --- a/Makefile
> +++ b/Makefile
> @@ -2503,12 +2503,6 @@ ifneq ($(dep_files_present),)
>  include $(dep_files_present)
>  endif
>  else
> -# Dependencies on header files, for platforms that do not support
> -# the gcc -MMD option.
> -#
> -# Dependencies on automatically generated headers such as command-list.h
> -# should _not_ be included here, since they are necessary even when
> -# building an object for the first time.
>  
Can we remove that extra space once we are at it?
>  $(OBJECTS): $(LIB_H) $(GENERATED_H)
>  endif
The change itself looks good to me.
Cheers.
-- 
Felipe Contreras
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 5 of 15 in “Makefile: misc trivial fixes”
  1. 0/3 Makefile: misc trivial fixesÆvar Arnfjörð Bjarmason, Jun 17, 2021
  2. 1/3 Makefile: mark "check" target as .PHONYÆvar Arnfjörð Bjarmason, Jun 17, 2021
  3. Felipe ContrerasJun 17, 2021
  4. 3/3 Makefile: remove an out-of-date commentÆvar Arnfjörð Bjarmason, Jun 17, 2021
  5. Felipe ContrerasJun 17, 2021
  6. 2/3 Makefile: stop hardcoding {command,config}-list.hÆvar Arnfjörð Bjarmason, Jun 17, 2021
  7. Felipe ContrerasJun 17, 2021
  8. Ævar Arnfjörð BjarmasonJun 17, 2021
  9. Felipe ContrerasJun 17, 2021
  10. Ævar Arnfjörð BjarmasonJun 18, 2021
  11. 0/3 Makefile: misc trivial fixesÆvar Arnfjörð Bjarmason, Jun 29, 2021
  12. 1/3 Makefile: mark "check" target as .PHONYÆvar Arnfjörð Bjarmason, Jun 29, 2021
  13. 2/3 Makefile: stop hardcoding {command,config}-list.hÆvar Arnfjörð Bjarmason, Jun 29, 2021
  14. 3/3 Makefile: remove an out-of-date commentÆvar Arnfjörð Bjarmason, Jun 29, 2021
  15. Felipe ContrerasJun 29, 2021

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.