[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH XTF] build: introduce a dist target



On Wed, Jul 20, 2016 at 01:52:43PM +0100, Andrew Cooper wrote:
> On 20/07/16 12:55, Wei Liu wrote:
> > The install target doesn't honour $PREFIX. Introduce a dist target to
> > make it easier to package the artifacts.
> >
> > Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> > ---
> >  Makefile | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/Makefile b/Makefile
> > index 1a8099d..d625b90 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1,6 +1,7 @@
> >  MAKEFLAGS += -r
> >  ROOT := $(abspath $(CURDIR))
> >  DESTDIR ?= $(ROOT)/dist
> > +DISTDIR ?= $(ROOT)/dist
> >  PREFIX ?= $(ROOT)
> >  
> >  .PHONY: all
> > @@ -10,6 +11,10 @@ all:
> >             $(MAKE) -C $$D build; \
> >     done
> >  
> > +.PHONY: dist
> > +dist: DESTDIR=$(DISTDIR)$(PREFIX)
> > +dist: install
> 
> Thusfar, I have been following GNU coding standards.
> 
> I don't see any references to DISTDIR, and this usage if `make dist` is
> incompatible with the standard expectation.
> 

There is dist target in GNU standard. I regard DISTDIR an internal
variable. It's fine that the user doesn't set it.

> FWIW, `make dist` seems incompatible with XTF at the moment, because of
> the embedded absolute paths needed in the written xl configuration files.
> 

Exactly. There is hardcoded paths in guest config files.

> 
> 
> For XenServer, my RPM configuration is:
> 
> %{__make} %{?_smp_mflags} install DESTDIR=%{buildroot}/opt/%{name}
> PREFIX=/opt/%{name}

/opt/%{name} appeared twice here and the DESTDIR and PREFIX need to be
kept in sync.

I'm fine with this too. Don't feel I want to argue one way or another.

> 
> to get `make install` to put the content sensibly in the build root, and
> to generate files with correct absolute paths.
> 
> How are you intending to make use of this new `make dist` target?

More or less like what you do for XenServer -- I suppose you just
package buildroot and send that to the test host and install the
artifacts.

Wei.

> 
> ~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.