All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
	Wei Liu <wei.liu2@citrix.com>
Subject: Re: [PATCH XTF] build: introduce a dist target
Date: Wed, 20 Jul 2016 14:10:56 +0100	[thread overview]
Message-ID: <20160720131056.GC28784@citrix.com> (raw)
In-Reply-To: <7b40d0eb-dd47-1296-2a45-5cd23e3558a0@citrix.com>

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@citrix.com>
> > ---
> >  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@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2016-07-20 13:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-20 11:55 [PATCH XTF] build: introduce a dist target Wei Liu
2016-07-20 12:52 ` Andrew Cooper
2016-07-20 13:10   ` Wei Liu [this message]
2016-07-20 13:15     ` Andrew Cooper
2016-07-20 18:21 ` [PATCH XTF] Correct the usage of $(DESTDIR) and $(prefix) Andrew Cooper
2016-07-20 18:28   ` Doug Goldstein
2016-07-20 18:31   ` Wei Liu
2016-07-21 10:43   ` Ian Jackson
2016-07-21 10:57     ` Andrew Cooper
2016-07-21 11:10       ` Ian Jackson
2016-07-25 16:23 ` [XTF PATCH v3] Correct the usage of $(DESTDIR) and $(PREFIX) Andrew Cooper
2016-07-26  9:09   ` Wei Liu
2016-07-26 10:14   ` Ian Jackson
2016-07-26 10:17     ` Andrew Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160720131056.GC28784@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.