Hello Daiki, On Fri, May 29, 2015, at 07:53, Daiki Ueno wrote: > Benno Schulenberg <bensb...@justemail.net> writes: > > In a source tree of nano, after I've edited a PO file, running a simple > > 'make' in the main directory will regenerate the corresponding GMO file. > > But in the source trees of for example grep or texinfo this is not the > > case; a 'make' will not update the GMO file, and even a 'make install' > > will just install the existing .gmo file (which no longer matches with > > the .po file). I think this is wrong. > > That is an intentional behavior change made around gettext-0.12: > http://git.savannah.gnu.org/cgit/gettext.git/commit/?id=37b1870c1979c42adbca49825ee14cbe9bd33ca1 > > Prior to that, "make all" did only update .gmo files from the existing > .po files, while it now also updates .po files as needed (i.e., when the > POT file has changed). > > If we added .gmo files as a prerequisite of "make all", it could trigger > .po files update, which is not desirable, especially when .po files are > version controlled.
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, but it does not trigger an update of the POT file -- even though I have changed a string in src/grep.c, which should trigger a POT update if this were automatic. But what these projects (or in fact gettext) have done is make an update of the POT file a deliberate act; it should never happen automatically. And as PO files depend only on the POT file, also those get updated only when that deliberate make target is run. GMO files depend on the PO files, and thus also those would get updated only when the POT file was updated. Except... when someone manually edits a PO file, then the coressponding GMO file should get regenerated. As the PO file in this case will be _newer than the POT file, I don't see how this could trigger a regeneration of the POT file. Regards, Benno -- http://www.fastmail.com - The way an email service should be