bugGNU gettext - Bugs: bug #28944, update-po should not be run...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #28944: update-po should not be run automatically in distdir

Submitted by:  Patrice Dumas <pertusus>
Submitted on:  Sat 20 Feb 2010 03:57:12 PM UTC  
 
Category: Programmer toolsSeverity: 3 - Normal
Item Group: NoneStatus: Not a Bug
Privacy: PublicAssigned to: Bruno Haible <haible>
Open/Closed: Closed

(Jump to the original submission Jump to the original submission)

Sun 21 Feb 2010 05:22:13 PM UTC, comment #6:

My use case is the following. I am integrating texi2html in texinfo. Basically I took the texi2html directory and put it in texinfo, and add texi2html to the SUBDIRS of the toplevel texinfo Makefile.am. But I also would like that using texi2html independently remains possible. Basically there is a configure.ac and a configure in the texi2html directory that is not used when built as part of texinfo, and is used when texi2html is stand-alone.

The layout is there fore like
texinfo/
texinfo/configure.ac
texinfo/texi2html/
texinfo/texi2html/configure.ac
texinfo/po
texinfo/texi2html/po_messages

If one wants to build texi2html as part of texinfo, one does
cd texinfo && autoreconf && ./configure

If one wants to build texi2html standalone, one goes in the texi2html directory and do
cd texinfo/texi2html && autoreconf && ./configure

Now I would like to avoid duplicating the .po files in the po directories of texinfo and texi2html. So in texinfo, there is a po directory where in POTFILES.in there are the texinfo files, and also the texi2html ones, like

info/footnotes.c
...
texi2html/texi2html.pl
...

Then in the texi2html directory there is a po directory (which is called po_messages), with, in POTFILES.in only the texi2html files:
texi2html.pl
...

Since the messages in texinfo are a superset of messages in texi2html, I would have liked to copy the .po (and maybe .gmo files) from the texinfo/po directory.

Then when doing make dist when building texinfo, I wouldn't do update-po in texi2html/po_messages but instead copy files from po/ to texi2html/po_messages and distribute the files and be done.

When doing make dist when building texi2html, everything would be as usual, .gmo would be regenerated from .po files in po_messages, and it would be transparent that the .po came from texinfo/po.

With this setup, make update-po in texi2html/po_messages fails because the paths are not right when doing make dist in texinfo. That's the reason why I wanted to conditionalize doing make update-po in texi2html/po_messages to being built from the texi2html configure, while still having files in texi2html/po_messages being distributed.

Here is my current solution to this issue.
Since it is not possible to avoid doing update-po in texi2html/po_messages when doing make dist from the toplevel texinfo directory, what I have done is used configure to set the right paths in the po directories, differently when running configure in texinfo or texi2html.

In texi2html/po_messages po_messages/POTFILES.in.in there is:
@t2h_po_dir@texi2html.pl
...

and in po_messages/Makevars.in:
# These two variables depend on the location of this directory.
subdir = @t2h_po_dir@po_messages
top_builddir = @t2h_po_top_builddir@

Then in texinfo configure.ac one the paths are set like:
t2h_po_dir='texi2html/'
AC_SUBST([t2h_po_dir])
t2h_po_top_builddir='../..'
AC_SUBST([t2h_po_top_builddir])

in texi2html configure.ac the paths are:
t2h_po_dir=
AC_SUBST([t2h_po_dir])
t2h_po_top_builddir='..'
AC_SUBST([t2h_po_top_builddir])

Therefore update-po is run in both directories but with the right paths (that are different when building texinfo and standalone texi2html).

(to be precise, there are in fact 2 po directories, po and po_document in texinfo and respectively po_messages and po_document in texi2html, but I don't think it is important).

Those changes will be commited in texinfo soon.

Patrice Dumas <pertusus>
Sun 21 Feb 2010 03:06:02 PM UTC, comment #5:

> it is not easy to prevent po directories to be processed,
> while still having the files within them distributed.
> ...
> my use case is a duplication of po directories, and, based
> on an automake condition, I'd like only one to be processed,
> while both appear in the tarball


Can you please describe what your real problem is? Why do
you want one of the PO directories to be skipped? "make"
in a PO directory is normally a no-op.

Bruno Haible <haible>
Project AdministratorIn charge of this item.
Sun 21 Feb 2010 12:14:28 PM UTC, comment #4:

> It is irrelevant what the automake rules for makeinfo and
> yacc targets do. The decision how to handle .po and .gmo files
> is independent.


They should be consistent. But in fact they are since it is
explicit that gmo files are only created in make dist, so it is consistent to have them created in DIST_SUBDIRS.

Now there is the issue (that triggered me to open the bug report, although I was wrong, since .gmo are not built as part of make all, but only as part of make dist) that it is not easy to prevent po directories to be processed, while still having the files within them distributed. However it is an unrelated issue, and I guess that handling this issue will lead to too much work for minor gain (my use case is a duplication of po directories, and, based on an automake condition, I'd like only one to be processed, while both appear in the tarball).

Patrice Dumas <pertusus>
Sun 21 Feb 2010 11:30:26 AM UTC, comment #3:

> My point was that producing .gmo files should be considered
> as build and not as distributing.


The behaviour of po/Makefile was decided based on needs and
expectations of developers. Developers change their source code
frequently and don't usually need to run their program with the
latest update of the localization. Therefore, developers
don't want to see 1 xgettext, 20 msgmerge and 20 msgfmt
invocations each time they do "make" in the top-level directory
of their package.

> However I checked with texinfo and yacc stuff


It is irrelevant what the automake rules for makeinfo and
yacc targets do. The decision how to handle .po and .gmo files
is independent.

Bruno Haible <haible>
Project AdministratorIn charge of this item.
Sun 21 Feb 2010 10:47:36 AM UTC, comment #2:

My point was that producing .gmo files should be considered as build and not as distributing. And therefore not be done as a part of make dist.

However I checked with texinfo and yacc stuff, and indeed, makeinfo is not run in make all, but in make dist, and same for yacc. So it is consistent with what is done in automake for texinfo and yacc (though this is not really documented for yacc). Ok, I'll prepare a patch for the automake documentation.

Patrice Dumas <pertusus>
Sat 20 Feb 2010 05:36:24 PM UTC, comment #1:

This is as it should be. See the automake documentation
<http://www.gnu.org/software/automake/manual/html_node/SUBDIRS-vs-DIST_005fSUBDIRS.html>

The rationale is that with "make dist", you are creating a
tarball that should be usable by other people, on other machines.
These people don't necessarily have the GNU gettext tools
('msgfmt' etc.) installed. They are only supposed to have
a system with libc, libintl (if libc != glibc), and the
"usual tools": cc, sh, sed. You find the precise list in the
GNU standards
<http://www.gnu.org/prep/standards/standards.html>.

Bruno Haible <haible>
Project AdministratorIn charge of this item.
Sat 20 Feb 2010 03:57:12 PM UTC, original submission:

If a project list a po/ directory in DIST_SUBDIRS and not SUBDIRS, I think that it is more natural if update-po is not run in the po/ directory. Currently it is not the case.

Patrice Dumas <pertusus>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by haible (Posted a comment)
  • -unavailable- added by pertusus (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 27 Nov 2016 12:31:03 AM UTChaibleCategoryNone=>Programmer tools
    Sat 20 Feb 2010 05:36:24 PM UTChaibleStatusNone=>Not a Bug
      Assigned toNone=>haible
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1