On 05/06/2011 04:54 PM, Eric Blake wrote: > On 05/06/2011 04:43 PM, Bruno Haible wrote: >> Eric Blake wrote: >>> ... want to ensure xgettext scans some generated files not in git. >> >> Normally it is recommended [1] to list in POTFILES.in the actual source >> files, >> not the generated files. > > I tend to agree, for .y or .l files where the C string literals are > quite easy to pick out. But when the files are generated via a custom > perl script, but xgettext still has to pull out C string literals, it's > easier to list the end result than to teach xgettext a new language.
For reference, here is libvirt's custom generator: http://libvirt.org/git/?p=libvirt.git;a=blob;f=daemon/remote_generator.pl;h=062ccc1;hb=d3c5104 And here's the generated file it produced, just before we removed it from libvirt.git: http://libvirt.org/git/?p=libvirt.git;a=blob;f=daemon/remote_dispatch_bodies.h;hb=d3c5104 Now, find _("connection not open") in those two files, then decide how xgettext will do the same :) But yes, the sc_po_check rule already _does_ favor .l or .y files (that part of 'make syntax-check' greps for all _(" in .[ch] whether in version control or not, but then checks the basename with alternate suffixes before computing what file should have been listed in POTFILES.in). -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature