Error making pot file.

Derek Atkins warlord at MIT.EDU
Wed Jan 4 16:36:42 EST 2006


Quoting Neil Williams <linux at codehelp.co.uk>:

>> If
>> Christian's concern was that `make pot' no longer suffices on its own,
>> then I think we can solve that by just saying:
>>
>>  pot: Makefile
>> +       ${MAKE} make-gnucash-potfiles
>>         rm -f intl-scm/guile-strings.c
>>         make -C intl-scm
>>         rm -f po/$(PACKAGE).pot
>>         make -C po $(PACKAGE).pot
>
> Sounds good to me. It would be nice to have 'make pot' as standalone.

Don't do this recursively...  just do:

pot: Makefile po/POTFILES.in
  rm -f ...
  ...

po/POTFILES.in: make-gnucash-potfiles .potfiles
  <run make-gnucash-potfiles> > po/POTFILES

.potfiles:

> I couldn't find a way of running 'make' in non-recursive mode and a gnucash
> make is quite a lengthy process.

There are always ways to make "make" run non-recursively...
You just have to understand the magic of Make.  See above.  :)

> Are there any translatable strings in other g-wrap generated files? 
> As long as
> gnucash.pot is the same whether we run 'make && make pot' compared to just
> 'make pot', it sounds good to me. I'll do some testing in pilot-qof (it's
> quicker).

There shouldn't be any translatable strings in g-wrap files.

>> 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!!

Agreed, a translator will still need to run either "make" or "make pot".
However, you should not build po/POTFILES.in during the generation of
the script.  It should be a separate rule.. Otherwise it wont REBUILT
the POTFILES.in file when you want it to, unless you rebuild the SCRIPT
everytime...   No need to rebuild the script, but you DO want to re-run it..
So... two rules.

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available



More information about the gnucash-devel mailing list