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

Re: [PATCH 2/3] Makefile: use `find` to determine static header dependencies

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 25, 2014, 19:30 UTC
Message-ID
<xmqqvbpgl638.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20140822043303.GB18192@peff.net>
Jeff King <peff@peff.net> writes:
Show 11 quoted lines
> Since we do not use the value $(LIB_H) unless either
> COMPUTE_HEADER_DEPENDENCIES is turned on or the user is
> building "po/git.pot" (where it comes in via $(LOCALIZED_C),
> make is smart enough to not even run this "find" in most
> cases. However, we do need to stop using the "immediate"
> variable assignment ":=" for $(LOCALIZED_C). That's OK,
> because it was not otherwise useful here.
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> I cannot see any reason for the ":=", but maybe I am missing something.

If the right-hand-side were something like $(shell find ...) that was heavy-weight then it might have made sense, but I do not think it is that. It has stayed to be := ever since it was introduced by cd5513a7 (i18n: Makefile: "pot" target to extract messages marked for translation, 2011-02-22).

And now you use LIB_H only once ;-).

Also interestingly, I notice that it is very clear that it is not "LIB_H" but "ANY_H" ;-)

Show 22 quoted lines
>
>  Makefile | 140 ++++-----------------------------------------------------------
>  1 file changed, 8 insertions(+), 132 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index cf0ccdf..f2b85c9 100644
> --- a/Makefile
> +++ b/Makefile
> ...
> @@ -2128,9 +2004,9 @@ XGETTEXT_FLAGS_C = $(XGETTEXT_FLAGS) --language=C \
>  XGETTEXT_FLAGS_SH = $(XGETTEXT_FLAGS) --language=Shell \
>  	--keyword=gettextln --keyword=eval_gettextln
>  XGETTEXT_FLAGS_PERL = $(XGETTEXT_FLAGS) --keyword=__ --language=Perl
> -LOCALIZED_C := $(C_OBJ:o=c) $(LIB_H) $(GENERATED_H)
> -LOCALIZED_SH := $(SCRIPT_SH)
> -LOCALIZED_PERL := $(SCRIPT_PERL)
> +LOCALIZED_C = $(C_OBJ:o=c) $(GENERATED_H)
> +LOCALIZED_SH = $(SCRIPT_SH)
> +LOCALIZED_PERL = $(SCRIPT_PERL)
>  
>  ifdef XGETTEXT_INCLUDE_TESTS
>  LOCALIZED_C += t/t0200/test.c
Previous: Jeff KingNext: Jeff King
Message 10 of 27 in “Update hard-coded header dependencies”
  1. Update hard-coded header dependenciesJonathan Nieder, Aug 8, 2014
  2. Jeff KingAug 10, 2014
  3. Jeff KingAug 21, 2014
  4. 1/2 Makefile: use "find" to determine static header dependenciesJeff King, Aug 21, 2014
  5. Jonathan NiederAug 21, 2014
  6. Jeff KingAug 22, 2014
  7. 0/3 dropping manually-maintained LIB_HJeff King, Aug 22, 2014
  8. 1/3 i18n: treat "make pot" as an explicitly-invoked targetJeff King, Aug 22, 2014
  9. 2/3 Makefile: use `find` to determine static header dependenciesJeff King, Aug 22, 2014
  10. Junio C HamanoAug 25, 2014
  11. Jeff KingAug 25, 2014
  12. Jonathan NiederAug 25, 2014
  13. Jeff KingAug 25, 2014
  14. Jeff KingAug 25, 2014
  15. Jonathan NiederAug 25, 2014
  16. Junio C HamanoAug 25, 2014
  17. Jonathan NiederAug 25, 2014
  18. Junio C HamanoAug 25, 2014
  19. Jeff KingAug 26, 2014
  20. Junio C HamanoAug 26, 2014
  21. Jeff KingAug 26, 2014
  22. Junio C HamanoAug 26, 2014
  23. 3/3 Makefile: drop CHECK_HEADER_DEPENDENCIES codeJeff King, Aug 22, 2014
  24. Jiang XinAug 23, 2014
  25. 2/2 Makefile: drop CHECK_HEADER_DEPENDENCIES codeJeff King, Aug 21, 2014
  26. Junio C HamanoAug 10, 2014
  27. Junio C HamanoAug 10, 2014

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.