.gmo files built twice
Jon Lapham
lapham at extracta.com.br
Thu May 22 10:45:35 CDT 2003
Christian Stimming wrote:
> I have the same problem since I upgraded to SuSE 8.1. The problem is
> that the po files are rebuilt *every* time, not only once after a
> checkout or something like that. It seems to me the po file rebuild is
> being triggered by an update of gnucash.desktop, which in turn is
> somehow rebuild *every* time.
>
> My workaround was to remove the intltool-update command from the build
> rules for (I think) $(POFILE).po from po/Makefile.in.in. I might need to
> do the same thing again after each ./autogen.sh, but at least that
> happens not as often as a source tree rebuild.
>
> Christian
So, the question is what is the behavior we *want*. I'm guessing it is
this (I'm using the "make" definition of depend below):
1) The gnucash.pot file should depend on the files listed in
POTFILES.in. If one of those files is updated, we should rebuild
gnucash.pot
2) The .po files depend on the gnucash.pot file.
3) The .gmo files depend on the .po file.
What we currently have is only parts 2 & 3 above, with the extra
"gotcha" that every time we make a .gmo file, the .pot file is
regenerated. There is no dependency checking on the POTFILES.in file list!
So, after making a .gmo file, the gnucash.pot, .po and .gmo files are
all regenerated.
After some investigation, I've found the following solution. First, we
need to add the following dependency to po/Makefile (via Makefile.in.in
I guess):
569c569
< $(srcdir)/$(DOMAIN).pot:
---
> $(srcdir)/$(DOMAIN).pot: $(POTFILES) $(srcdir)/POTFILES.in
This will do the dependency checking on the POTFILES.in (if you change a
.c file, you need to rebuild the gnucash.pot file).
Secondly, we need to remark out this line of intltool-update:
177c177
< &generate_po_template;
---
> # &generate_po_template;
We should never call "generate_po_template" from within intltool-update,
because that is already being handled by the Makefile within po/.
After this, I believe we achieve the desired dependency behavior. On my
system here, a "second" compiling of the source code is MUCH MUCH faster
now, and the po/ files *are* rebuilt upon a change to any of the POTFILES.in
Comments?
--
-**-*-*---*-*---*-*---*-----*-*-----*---*-*---*-----*-----*-*-----*---
Jon Lapham <lapham at extracta.com.br> Rio de Janeiro, Brasil
Work: Extracta Moléculas Naturais SA http://www.extracta.com.br/
Web: http://www.jandr.org/
***-*--*----*-------*------------*--------------------*---------------
More information about the gnucash-devel
mailing list