Error making pot file.
Neil Williams
linux at codehelp.co.uk
Wed Jan 4 18:32:59 EST 2006
On Wednesday 04 January 2006 9:34 pm, Christian Stimming wrote:
> > > A translator _still_ has to either `make pot' or `make' at toplevel
> > > and in either case, POTFILES.in will already exist. Right?
> >
> > Yes, because making 'make-gnucash-potfiles' now executes the newly built
> > script, creating 'po/POTFILES.in'. It's part of the rule. This was
> > actually a side-effect from the OSX tests - one of the few things from my
> > OSX experience that has directly *benefitted* gnucash instead of
> > complicating it!!
>
> But if "make-gnucash-potfiles" exists, then "make make-gnucash-potfiles"
> won't trigger, so the generation of po/POTFILES.in won't happen.
That is the flip side of the OSX problem.
:-(
As Derek comments, it is better to have two targets but OSX barffed initially.
I'm checking now if all-local will sort out these differences. (Let you now
tomorrow - looks OK so far.)
pilot-qof test version:
make-potfiles: make-potfiles.in Makefile
rm -f $@.tmp
sed < $< > $@.tmp \
-e 's:@-PERL-@:${PERL}:g'
chmod +x $@.tmp
mv $@.tmp $@
all-local: Makefile
rm -f ./po/POTFILES.in
./make-potfiles > ./po/POTFILES.in
pot: Makefile
${MAKE} all-local
rm -f po/$(PACKAGE).pot
make -C po $(PACKAGE).pot
Let make-potfiles only be built once, run it when we need it.
It also updates po/POTFILES.in each time 'make pot' is run (because all-local
is skipped if a specific target is given).
> HOWEVER, what I still don't see is how your change actually solves the
> original problem: A file somewhere in the tree was deleted and POTFILES.in
> wasn't updated. How is your solution going to fix this? Currently I can't
> see how POTFILES.in will be regenerated for that.
AFAICT, the only way to catch all file deletions is to write a new
po/POTFILES.in each time make is run from the top level directory using
all-local because that is what ensures that po/POTFILES.in exists.
It works, but is this OK?
(it also causes POTFILES to be regenerated in po/ but not the pot file, that
is manual as before with 'make pot'.)
Sample output:
$ make
...
make[2]: Entering directory `/opt/working/pilot-qof'
rm -f ./po/POTFILES.in
./make-potfiles > ./po/POTFILES.in
make[2]: Leaving directory `/opt/working/pilot-qof'
Making all in po
make[2]: Entering directory `/opt/working/pilot-qof/po'
( posrcprefix='../'; \
rm -f POTFILES-t POTFILES \
&& (sed -e '/^#/d' \
-e 's/^[[].*] *//' \
-e '/^[ ]*$/d' \
-e "s@^@ $posrcprefix@" ./POTFILES.in \
| sed -e '$!s/$/ \\/') > POTFILES-t \
&& chmod a-w POTFILES-t \
&& mv POTFILES-t POTFILES )
cd .. \
&& CONFIG_FILES=po/Makefile.in CONFIG_HEADERS= \
/bin/sh ./config.status
$ make all-am
rm -f ./po/POTFILES.in
./make-potfiles > ./po/POTFILES.in
'make pot' also creates a new ./po/POTFILES.in each time explicitly as
'all-local' only operates if all is used or no target is specified. e.g. make
install skips all-local as long as everything is up to date. Deleting
make-potfiles or po/POTFILES.in causes 'make install' to recreate them OK.
Testing on OSX tomorrow evening.
--
Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20060104/6a380e29/attachment.bin
More information about the gnucash-devel
mailing list