[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gettext] a .gmo file is not regenerated when its .po file chang

From: Daiki Ueno
Subject: Re: [bug-gettext] a .gmo file is not regenerated when its .po file changed
Date: Fri, 29 May 2015 18:16:17 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Benno Schulenberg <address@hidden> writes:

> I've tried it in grep: I've added nl.gmo as a prerequisite of 'make all',
> and have very bluntly added this in po/Makefile:
> nl.gmo: nl.po
>         msgfmt -cv nl.po
>         mv messages.mo nl.gmo
> When I then run 'make', nl.gmo gets updated when I've touched nl.po,

With that setting, I guess you also see weird side effects, for example:

  $ cd grep/po
  $ rm *.pot stamp-po
  $ make
  /usr/bin/msgmerge --update  --lang=nb nb.po grep.pot
  ............. done.
  /usr/bin/msgmerge --update  --lang=nl nl.po grep.pot
  ............. done.
  /usr/bin/msgmerge --update  --lang=pa pa.po grep.pot
  ............. done.
  $ make
  /usr/bin/msgmerge --update  --lang=nl nl.po grep.pot
  ............. done.
  $ make
  /usr/bin/msgmerge --update  --lang=nl nl.po grep.pot
  ............. done.

This happens because nl.gmo depends on nl.po, and the timestamp of nl.po
is behind grep.pot.  Actually, nl.po is not updated on each 'make' run
above (because the '.nop.po-update' rule checks if the file content has
changed), but it's not good to run 'msgmerge' every time, especially
when one compiles a package from a tarball.

> changed a string in src/grep.c, which should trigger a POT update if
> this were automatic.

I was talking about the update of .po files (with 'msgmerge'), not a POT
file (though the above example has nothing to do with version control,
sorry; this stuff is really complex to understand :-)

Daiki Ueno

reply via email to

[Prev in Thread] Current Thread [Next in Thread]