[Libguestfs] [PATCH 2/3] po: fix dependencies for libguestfs.pot extraction

Pino Toscano ptoscano at redhat.com
Thu Dec 5 18:39:52 UTC 2013


On Thursday 05 December 2013 18:31:59 Richard W.M. Jones wrote:
> On Thu, Dec 05, 2013 at 07:02:28PM +0100, Pino Toscano wrote:
> > On Thursday 05 December 2013 15:53:58 Richard W.M. Jones wrote:
> > > On Thu, Dec 05, 2013 at 04:30:05PM +0100, Pino Toscano wrote:
> > > > Fix the dependencies of the libguestfs.pot target: other than
> > > > using
> > > > the right make variables holding the contents of the POTFILES,
> > > > depend also on the POTFILES themselves.
> > > > ---
> > > > 
> > > >  po/Makefile.am | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/po/Makefile.am b/po/Makefile.am
> > > > index b0a8038..a8343ec 100644
> > > > --- a/po/Makefile.am
> > > > +++ b/po/Makefile.am
> > > > @@ -65,7 +65,7 @@ XGETTEXT_ARGS = \
> > > > 
> > > >  	--msgid-bugs-address="$(MSGID_BUGS_ADDRESS)" \
> > > >  	--directory=$(top_srcdir)
> > > > 
> > > > -$(DOMAIN).pot: Makefile $(POTFILES) $(POTFILES-pl)
> > > > $(POTFILES-ml)
> > > > +$(DOMAIN).pot: Makefile POTFILES $(POTFILES) POTFILES-pl
> > > > $(POTFILES_PL) POTFILES-ml $(POTFILES_ML)>
> > > > 
> > > >  	rm -f $@-t
> > > >  
> > > >  if HAVE_OCAML_GETTEXT
> > > >  
> > > >  	$(OCAML_GETTEXT) --action extract --extract-pot $@-t
> > > >  	$(POTFILES_ML)
> > > 
> > > So I agree that $(POTFILES-pl) is definitely wrong.  Not sure
> > > exactly
> > > what we were thinking about there ...
> > > 
> > > But, won't the addition of the literal file names break separate
> > > compilation?  In particular, $(POTFILES_PL) is supposed to be the
> > > correct path to the file POTFILES-pl (and correspondingly for the
> > > other files), so it shouldn't be necessary to list both
> > > POTFILES-pl
> > > and $(POTFILES_PL).
> 
> This ^^ is bogus.  I misunderstood the $(SED) in the macros.
> Obviously $(POTFILES) expands to the contents of the POTFILES file,
> ie. a list of filenames.
> 
> > The idea behind the addition is make the libguestfs.pot generation
> > dependent on both the POTFILES files and the actual sources, so
> > either adding a new source to any POTFILES or changing any of the
> > listed sources in any POTFILES will trigger a new pot rebuild.
> 
> Right, so I believe the first version (posted above) is correct,
> because $(srcdir)/.. is not necessary (because automake is supposed to
> add a VPATH for these builds).
> 
> Which apparently are called "VPATH builds", not separate compilation.

Ah, ok.

> If you agree, I will push the first version of the 2/3 patch.

Yes, any of the two versions should be good for me.

Thanks,
-- 
Pino Toscano




More information about the Libguestfs mailing list