Pino Toscano
2015-Oct-02 11:31 UTC
Re: [Libguestfs] [PATCH] build: ensure .pot and .pod files for docs are up-to-date
On Friday 02 October 2015 12:19:16 Richard W.M. Jones wrote:> On Fri, Oct 02, 2015 at 11:48:46AM +0200, Pino Toscano wrote: > > Traverse the po-docs directory before the subdirectories with translated > > documentations, so we can make sure that libguestfs-docs.pot and the > > translated .pod files have been generated. As a consequence of that, > > when generating the translated manpages for documentations, all the > > needed .pod files should be already there. > > --- > > po-docs/Makefile.am | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/po-docs/Makefile.am b/po-docs/Makefile.am > > index a274898..bf10558 100644 > > --- a/po-docs/Makefile.am > > +++ b/po-docs/Makefile.am > > @@ -41,7 +41,9 @@ CLEANFILES = po4a.conf > > # language directory contains a Makefile.am that we need to keep up to > > # date (note each $lang/Makefile.am should be identical). > > # XXX Is there a better way? > > -SUBDIRS = $(linguas) > > +# The current directory is traversed first, to make sure that .pot and .pod > > +# files are up-to-date and generated before applying translations in subdirs. > > +SUBDIRS = . $(linguas) > > > > update-po: libguestfs-docs.pot > > > > @@ -88,3 +90,5 @@ podfiles: Makefile > > for f in `cat $(top_srcdir)/po/POTFILES-pl`; do echo $(top_srcdir)/$$f; done >> $@-t > > LC_ALL=C sort -o $@-t $@-t > > mv $@-t $@ > > + > > +all-local: update-po > > This means the PO files are going to get rebuilt on every ordinary > build.Where do you see .po files of documentation being rebuilt? (Note that usually "building a .po file" implies its .po -> .mo conversion.) If you refer to their conversion to .pod, well, the status quo is that you get a nice *** *** You need to run the following commands: *** rm po-docs/podfiles; make -C po-docs update-po *** After that, rerun make. *** when make steps into the po-docs subdirs (currently ja and uk), precisely because the .pod files in those directories are missing. -- Pino Toscano
Richard W.M. Jones
2015-Oct-02 13:13 UTC
Re: [Libguestfs] [PATCH] build: ensure .pot and .pod files for docs are up-to-date
On Fri, Oct 02, 2015 at 01:31:30PM +0200, Pino Toscano wrote:> On Friday 02 October 2015 12:19:16 Richard W.M. Jones wrote: > > On Fri, Oct 02, 2015 at 11:48:46AM +0200, Pino Toscano wrote: > > > Traverse the po-docs directory before the subdirectories with translated > > > documentations, so we can make sure that libguestfs-docs.pot and the > > > translated .pod files have been generated. As a consequence of that, > > > when generating the translated manpages for documentations, all the > > > needed .pod files should be already there. > > > --- > > > po-docs/Makefile.am | 6 +++++- > > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > > > diff --git a/po-docs/Makefile.am b/po-docs/Makefile.am > > > index a274898..bf10558 100644 > > > --- a/po-docs/Makefile.am > > > +++ b/po-docs/Makefile.am > > > @@ -41,7 +41,9 @@ CLEANFILES = po4a.conf > > > # language directory contains a Makefile.am that we need to keep up to > > > # date (note each $lang/Makefile.am should be identical). > > > # XXX Is there a better way? > > > -SUBDIRS = $(linguas) > > > +# The current directory is traversed first, to make sure that .pot and .pod > > > +# files are up-to-date and generated before applying translations in subdirs. > > > +SUBDIRS = . $(linguas) > > > > > > update-po: libguestfs-docs.pot > > > > > > @@ -88,3 +90,5 @@ podfiles: Makefile > > > for f in `cat $(top_srcdir)/po/POTFILES-pl`; do echo $(top_srcdir)/$$f; done >> $@-t > > > LC_ALL=C sort -o $@-t $@-t > > > mv $@-t $@ > > > + > > > +all-local: update-po > > > > This means the PO files are going to get rebuilt on every ordinary > > build.I meant the pot file, followed after that (because they depend on it) by the .po files.> Where do you see .po files of documentation being rebuilt? (Note that > usually "building a .po file" implies its .po -> .mo conversion.) > If you refer to their conversion to .pod, well, the status quo is that > you get a nice > > *** > *** You need to run the following commands: > *** rm po-docs/podfiles; make -C po-docs update-po > *** After that, rerun make. > *** > > when make steps into the po-docs subdirs (currently ja and uk), > precisely because the .pod files in those directories are missing.This message is there for a good reason. When doing parallel builds it's impossible to safely run po4a -- see the comment which appears just above where the message gets printed. What's the actual problem you're trying to fix with this commit? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
Pino Toscano
2015-Oct-02 13:34 UTC
Re: [Libguestfs] [PATCH] build: ensure .pot and .pod files for docs are up-to-date
On Friday 02 October 2015 14:13:44 Richard W.M. Jones wrote:> > On Fri, Oct 02, 2015 at 01:31:30PM +0200, Pino Toscano wrote: > > On Friday 02 October 2015 12:19:16 Richard W.M. Jones wrote: > > > On Fri, Oct 02, 2015 at 11:48:46AM +0200, Pino Toscano wrote: > > > > Traverse the po-docs directory before the subdirectories with translated > > > > documentations, so we can make sure that libguestfs-docs.pot and the > > > > translated .pod files have been generated. As a consequence of that, > > > > when generating the translated manpages for documentations, all the > > > > needed .pod files should be already there. > > > > --- > > > > po-docs/Makefile.am | 6 +++++- > > > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/po-docs/Makefile.am b/po-docs/Makefile.am > > > > index a274898..bf10558 100644 > > > > --- a/po-docs/Makefile.am > > > > +++ b/po-docs/Makefile.am > > > > @@ -41,7 +41,9 @@ CLEANFILES = po4a.conf > > > > # language directory contains a Makefile.am that we need to keep up to > > > > # date (note each $lang/Makefile.am should be identical). > > > > # XXX Is there a better way? > > > > -SUBDIRS = $(linguas) > > > > +# The current directory is traversed first, to make sure that .pot and .pod > > > > +# files are up-to-date and generated before applying translations in subdirs. > > > > +SUBDIRS = . $(linguas) > > > > > > > > update-po: libguestfs-docs.pot > > > > > > > > @@ -88,3 +90,5 @@ podfiles: Makefile > > > > for f in `cat $(top_srcdir)/po/POTFILES-pl`; do echo $(top_srcdir)/$$f; done >> $@-t > > > > LC_ALL=C sort -o $@-t $@-t > > > > mv $@-t $@ > > > > + > > > > +all-local: update-po > > > > > > This means the PO files are going to get rebuilt on every ordinary > > > build. > > I meant the pot file, followed after that (because they depend on it) > by the .po files.Isn't po4a doing all the job here? Also, according to the current rules in po-docs/Makefile.am, the .pot is not regenerated at each make invocation.> > Where do you see .po files of documentation being rebuilt? (Note that > > usually "building a .po file" implies its .po -> .mo conversion.) > > If you refer to their conversion to .pod, well, the status quo is that > > you get a nice > > > > *** > > *** You need to run the following commands: > > *** rm po-docs/podfiles; make -C po-docs update-po > > *** After that, rerun make. > > *** > > > > when make steps into the po-docs subdirs (currently ja and uk), > > precisely because the .pod files in those directories are missing. > > This message is there for a good reason. When doing parallel builds > it's impossible to safely run po4a -- see the comment which appears > just above where the message gets printed.Yes, I can read comments. OTOH, I'm tackling the issue from a different angle, forcing to inspect the po-docs directory itself before its own "SUBDIRS".> What's the actual problem you're trying to fix with this commit?The one I pointed out above, which happens in every single clean build from git. -- Pino Toscano
Maybe Matching Threads
- [PATCH] build: ensure .pot and .pod files for docs are up-to-date
- Re: [PATCH] build: ensure .pot and .pod files for docs are up-to-date
- Re: [PATCH] build: ensure .pot and .pod files for docs are up-to-date
- [PATCH] Allow manual pages and POD files to be translated.
- [v2v PATCH 00/14] Adaptations to Weblate