[procps] Re: man pot files

  • From: Mario Blättermann <mario.blaettermann@xxxxxxxxx>
  • To: procps@xxxxxxxxxxxxx
  • Date: Thu, 26 Jun 2014 12:11:26 +0200

Hi Craig,

Am 25.06.2014 15:22, schrieb Craig Small:
> On Tue, Jun 24, 2014 at 10:09:58PM +0200, Mario Blättermann wrote:
>> Am 24.06.2014 21:30, schrieb Benno Schulenberg:
>>> No, they are generated files, so they should be ignored by git.
>>>
>> Agreed. Even the translated po files don't have to be in Git. Just use the 
>> rsync
> They're now out of git. They (the pot files) are also deleted no the
> clean target.
> 
>>> Not just exist, but force regeneration, to be sure they match the
>>> current man pages.
> OK, I have moved the man-po pot generation into the Makefile, its
> a little complicated but basically it looks like
> template-man-ps.pot: ps/ps.1
>   po4a (things)
>
That's nice. Due to lack of Autotools knowledge, I had written the small bash
script, but it ius better in any case to have it in the Makefile directly.

> The pot file is only generated if it doesn't exist, or the source
> man page is newer. We were getting the generation rules mixed up with
> the "when to do" rules.
> 
> Makefiles set the "when to do" with targets, such as EXTRA_DIST
> The lines above then tell make how to get those files.
> 
Just tested the behavior. The tarball created with "make dist" ships the three
manpage templates, but it shouldn't actually. But the translated man pages are
still missing from the tarball, although they get created before in man-po.

Besides that, creating the tarball fails due to the missing man-po directory.
Either add it to Git, or let it create on-the-fly once it is needed in the build
chain. I prefer the latter.

>>>> Also, shouldn't the translated man pages be in the dist tar.xz?
>>>
>>> Yes, I would think so.  Only when you start having translations in
>>> more than say twenty languages, and the tarball contains far more
>>> translated stuff than actual procps stuff, then you may wan to start
>>> thinking of splitting the tarball in two: the basic program, and the
>>> translated documentattion.
>>>
>> Don't expect more than a handful of po files within a reasonable time frame 
>> ;)
>> However, it's an interesting idea to unlink the docs from the rest of procps.
>> Maybe it is easier to handle. But it could cause that downstream people keep
>> them in two packages which don't depend on each other, so we wouldn't be 
>> sure to
>> benefit all users.
> Even two sets would be helpful to see the dist part works. I have left
> the second part (po file to man page) generation alone for now. Looking
> at the script I can see how it could be put into a makefile and
> therefore doing dependencies.
> 
> I'm actually thinking it might be better to move the man pages and their
> associated makefiles and scripts into their own directory. That will
> keep the top level makefile clear of all that messy manpage stuff.
> 
Good idea. Although we split the translations anway, it would be less confusing
to have them in a single directory.

Best Regards,
Mario

Other related posts: