xml-i18n-tools

Josh Sled jsled@asynchronous.org
Tue, 18 Sep 2001 23:16:52 -0700


On Mon, Sep 17, 2001 at 02:59:50AM -0700, Dave Peticolas wrote:

| If you are compiling gnucash from CVS, you will need to obtain
| the xml-i18n-tools package from
| 
| http://ftp.gnome.org/pub/GNOME/stable/sources/xml-i18n-tools

Note: xml-i18n-tools-0.8.1-ximian.1 [from Ximian Gnome 1.4, I think]
won't suffice...  0.9 works [except, see below]; I don't know in which
intermediate version the fix was made.


I have noticed one problem, however [for which the xml-i18n-tools guys
are CC'd on this]...

xml-i18n-tools.m4 defines a bunch of expansions like:

XML_I18N_MERGE_KEYS_RULE='\%.keys : \%.keys.in $(top_builddir)/xml-i18n-merge $(top_srcdir)/po/*.po\
	$(top_builddir)/xml-i18n-merge -k $(top_srcdir)/po $< [$]*.keys'

These then get included into config.status verbatim, and used in a
here-document output to "/tmp/cs<num>-<num>/subs.sed" [the first step of
the CONFIG_FILES section]...  In this case, this .sed file is rather long
[203 lines]... but config.status wants to be smarter than that, and the
here-doc is immediately followed by the following bit...

config.status>  # Split the substitutions into bite-sized pieces for seds with
config.status>  # small command number limits, like on Digital OSF/1 and HP-UX.
config.status>  ac_max_sed_lines=48

...where it subsequently breaks the 203-line .sed file into 48- [really
50-] line chunks.

However, I happened to get unlucky enough to have it perform
that split in the middle of one of those newline-escaped
XML_I18N_MERGE_{OAF,SERVER,...,XML}_RULE lines, which naturally produces
the following two errors when attempting to produce every Makefile in
the gnucash tree...

config.status: creating Makefile
sed: file /tmp/cs20946-13181/subs-3.sed line 51: Unterminated `s' command
sed: file /tmp/cs20946-13181/subs-4.sed line 3: Unknown command: ``(''

For reference, here are the tail and head [respectively] of subs-3.sed
and subs-4.sed:

jsled@phoenix$ [/tmp/cs21140-3012] tail -3 subs-3.sed
s,@XML_I18N_MERGE_SERVER_RULE@,\%.server : \%.server.in $(top_builddir)/xml-i18n-merge $(top_srcdir)/po/*.po\
        $(top_builddir)/xml-i18n-merge -o $(top_srcdir)/po $< $*.server,;t t
s,@XML_I18N_MERGE_KEYS_RULE@,\%.keys : \%.keys.in $(top_builddir)/xml-i18n-merge $(top_srcdir)/po/*.po\

jsled@phoenix$ [/tmp/cs21140-3012] head -3 subs-4.sed
:t
  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
        $(top_builddir)/xml-i18n-merge -k $(top_srcdir)/po $< $*.keys,;t t


The easy fix [verified] is to remove the newline-escape in those lines in
xml-i18n-tools.m4 ... the Right fix is probably to fix whatever generates
config.status to do better .sed-file chunking.

...jsled