From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH XTF] build: introduce a dist target
Date: Wed, 20 Jul 2016 14:15:33 +0100 [thread overview]
Message-ID: <f56c653d-e1f0-f4b7-82f1-a0fdfa6cecc8@citrix.com> (raw)
In-Reply-To: <20160720131056.GC28784@citrix.com>
On 20/07/16 14:10, Wei Liu wrote:
> 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.
Hmm, re-reading
https://www.gnu.org/prep/standards/html_node/DESTDIR.html I may have got
the usage of DESTDIR wrong.
It looks like DESTDIR is supposed to be what you are using DISTDIR for.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-07-20 13:15 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
2016-07-20 13:15 ` Andrew Cooper [this message]
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=f56c653d-e1f0-f4b7-82f1-a0fdfa6cecc8@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=wei.liu2@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).