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

Re: [PATCH] makefile: teach git about NO_MSGFMT (as supported in GUI and gitk)

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Sep 2, 2021, 15:32 UTC
Message-ID
<nycvar.QRO.7.76.6.2109021730040.55@tvgsbejvaqbjf.bet>
In-Reply-To
<20210902085438.54121-1-carenas@gmail.com>
Hi Carlo,
On Thu, 2 Sep 2021, Carlo Marcelo Arenas Belón wrote:
Show 7 quoted lines
> NO_MSGFMT can be used to indicate there is no msgfmt available, so
> make git recognize that and avoid failing to build while trying to
> generate i18n files.
>
> while at it, refactor the change introduced in 4348824059
> (artifacts-tar: respect NO_GETTEXT, 2021-07-04) with something as
> functional but shorter.

To me, this commit message is not really related to the diff, which essentially only adds a code comment and then has the only functional change that _prevents_ `POFILES` and `MOFILES` from being set to empty values when `NO_MSGFMT` is set.

I am therefore quite puzzled how that diff is supposed to achieve anything that is described in the commit message (how does this "make git recognize that"?).

Could you maybe clarify that?

Thanks, Dscho

Show 44 quoted lines
>
> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
> ---
>  Makefile | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 9573190f1d..9f09a75801 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -86,6 +86,8 @@ all::
>  # Define LIBC_CONTAINS_LIBINTL if your gettext implementation doesn't
>  # need -lintl when linking.
>  #
> +# Define NO_MSGFMT if you don't have msgfmt
> +#
>  # Define NO_MSGFMT_EXTENDED_OPTIONS if your implementation of msgfmt
>  # doesn't support GNU extensions like --check and --statistics
>  #
> @@ -2691,10 +2693,8 @@ po/git.pot: $(GENERATED_H) FORCE
>  .PHONY: pot
>  pot: po/git.pot
>
> -ifdef NO_GETTEXT
> -POFILES :=
> -MOFILES :=
> -else
> +ifndef NO_MSGFMT
> +ifndef NO_GETTEXT
>  POFILES := $(wildcard po/*.po)
>  MOFILES := $(patsubst po/%.po,po/build/locale/%/LC_MESSAGES/git.mo,$(POFILES))
>
> @@ -2703,6 +2703,7 @@ endif
>
>  po/build/locale/%/LC_MESSAGES/git.mo: po/%.po
>  	$(QUIET_MSGFMT)mkdir -p $(dir $@) && $(MSGFMT) -o $@ $<
> +endif
>
>  LIB_PERL := $(wildcard perl/Git.pm perl/Git/*.pm perl/Git/*/*.pm perl/Git/*/*/*.pm)
>  LIB_PERL_GEN := $(patsubst perl/%.pm,perl/build/lib/%.pm,$(LIB_PERL))
> --
> 2.33.0.481.g26d3bed244
>
>
Previous: Carlo ArenasNext: Carlo Arenas
Message 5 of 6 in “makefile: teach git about NO_MSGFMT (as supported in GUI and gitk)”
  1. makefile: teach git about NO_MSGFMT (as supported in GUI and gitk)Carlo Marcelo Arenas Belón, Sep 2, 2021
  2. Ævar Arnfjörð BjarmasonSep 2, 2021
  3. Ævar Arnfjörð BjarmasonSep 2, 2021
  4. Carlo ArenasSep 3, 2021
  5. Johannes SchindelinSep 2, 2021
  6. Carlo ArenasSep 3, 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.