[CRIU] [PATCH 3/6] lib: Generate pkgconfig file

Tycho Andersen tycho.andersen at canonical.com
Wed Jul 30 05:18:45 PDT 2014


On Tue, Jul 29, 2014 at 10:38:02PM +0000, Serge Hallyn wrote:
> Quoting Tycho Andersen (tycho.andersen at canonical.com):
> > Hi Serge,
> > 
> > On Tue, Jul 29, 2014 at 10:09:48PM +0000, Serge Hallyn wrote:
> > > Quoting Tycho Andersen (tycho.andersen at canonical.com):
> > > > --- a/Makefile
> > > > +++ b/Makefile
> > > > @@ -266,6 +266,12 @@ install: $(PROGRAM) install-man
> > > >  	$(Q) install -m 644 scripts/sd/criu.service $(DESTDIR)$(SYSTEMDUNITDIR)
> > > >  	$(Q) mkdir -p $(DESTDIR)$(LOGROTATEDIR)
> > > >  	$(Q) install -m 644 scripts/logrotate.d/criu-service $(DESTDIR)$(LOGROTATEDIR)
> > > > +	$(Q) sed -e 's, at version@,$(GITID),' \
> > > > +		-e 's, at libdir@,$(DESTDIR)$(LIBDIR),' \
> > > 
> > > Hm - I assume you've tested this and I just don't know how it works
> > > anyway, but I wouldn't think you would want DESTDIR to be included
> > > in these paths in criu.pc?
> > 
> > I think we do; DESTDIR is criu's equivalent of ./configure's --prefix,
> > i.e. if you do `DESTDIR=~/.root make install`, things will get
> > installed to ~/.root/usr/lib, so you need that prefix in the pkgconfig
> > file. (Of course, then you'd also need to have your other build system
> > be configured to look in ~/.root as well.)
> 
> Is it?  Normally DESTDIR would be something like $PWD/debian/tmp or
> ~/builddir, and you actually install things into $DESTDIR/$prefix/,
> not one or the other.  Normally, anyway.

Yes, so it is essentially that. Perhaps I don't understand what the
purpose of $DESTDIR is, then. I guess you don't want it in the
pkgconfig because the pkgconfig is supposed to be relative to --prefix
only?

(The confusion here is that users can't really set PREFIX, so you have
to hack DESTDIR if you want to install it somewhere that isn't
/usr/local, at least as I understand it.)

Tycho


More information about the CRIU mailing list