Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Devel

[PATCH 4/9] build: include Tools.mk first in tools/Rules.mk

 

 

Xen devel RSS feed   Index | Next | Previous | View Threaded


roger.pau at citrix

Jul 11, 2012, 3:23 AM

Post #1 of 8 (83 views)
Permalink
[PATCH 4/9] build: include Tools.mk first in tools/Rules.mk

Tools.mk should be included first, or PREFIX is not honoured in the
other conf/ files that define the paths of several tools.

Signed-off-by: Roger Pau Monne <roger.pau [at] citrix>
---
tools/Rules.mk | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/Rules.mk b/tools/Rules.mk
index 1e928b7..2dd8ed3 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -3,8 +3,8 @@
# `all' is the default target
all:

-include $(XEN_ROOT)/Config.mk
-include $(XEN_ROOT)/config/Tools.mk
+include $(XEN_ROOT)/Config.mk

export _INSTALL := $(INSTALL)
INSTALL = $(XEN_ROOT)/tools/cross-install
--
1.7.7.5 (Apple Git-26)


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Christoph.Egger at amd

Jul 11, 2012, 4:52 AM

Post #2 of 8 (77 views)
Permalink
Re: [PATCH 4/9] build: include Tools.mk first in tools/Rules.mk [In reply to]

On 07/11/12 12:23, Roger Pau Monne wrote:

> Tools.mk should be included first, or PREFIX is not honoured in the
> other conf/ files that define the paths of several tools.
>
> Signed-off-by: Roger Pau Monne <roger.pau [at] citrix>


Acked-by: Christoph Egger <Christoph.Egger [at] amd>

> ---
> tools/Rules.mk | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tools/Rules.mk b/tools/Rules.mk
> index 1e928b7..2dd8ed3 100644
> --- a/tools/Rules.mk
> +++ b/tools/Rules.mk
> @@ -3,8 +3,8 @@
> # `all' is the default target
> all:
>
> -include $(XEN_ROOT)/Config.mk
> -include $(XEN_ROOT)/config/Tools.mk
> +include $(XEN_ROOT)/Config.mk
>
> export _INSTALL := $(INSTALL)
> INSTALL = $(XEN_ROOT)/tools/cross-install



--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Campbell at citrix

Jul 23, 2012, 4:34 AM

Post #3 of 8 (71 views)
Permalink
Re: [PATCH 4/9] build: include Tools.mk first in tools/Rules.mk [In reply to]

On Wed, 2012-07-11 at 11:23 +0100, Roger Pau Monne wrote:
> Tools.mk should be included first, or PREFIX is not honoured in the
> other conf/ files that define the paths of several tools.

Isn't it a bug for anything which is included/defined via
$(XEN_ROOT)/Config.mk to depend on the contents of
$(XEN_ROOT)/config/Tools.mk since for anything non-tools Tools.mk would
never be included at all?

>
> Signed-off-by: Roger Pau Monne <roger.pau [at] citrix>
> ---
> tools/Rules.mk | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tools/Rules.mk b/tools/Rules.mk
> index 1e928b7..2dd8ed3 100644
> --- a/tools/Rules.mk
> +++ b/tools/Rules.mk
> @@ -3,8 +3,8 @@
> # `all' is the default target
> all:
>
> -include $(XEN_ROOT)/Config.mk
> -include $(XEN_ROOT)/config/Tools.mk
> +include $(XEN_ROOT)/Config.mk
>
> export _INSTALL := $(INSTALL)
> INSTALL = $(XEN_ROOT)/tools/cross-install



_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Christoph.Egger at amd

Jul 23, 2012, 5:19 AM

Post #4 of 8 (75 views)
Permalink
Re: [PATCH 4/9] build: include Tools.mk first in tools/Rules.mk [In reply to]

On 07/23/12 13:34, Ian Campbell wrote:

> On Wed, 2012-07-11 at 11:23 +0100, Roger Pau Monne wrote:
>> Tools.mk should be included first, or PREFIX is not honoured in the
>> other conf/ files that define the paths of several tools.
>
> Isn't it a bug for anything which is included/defined via
> $(XEN_ROOT)/Config.mk to depend on the contents of
> $(XEN_ROOT)/config/Tools.mk since for anything non-tools Tools.mk would
> never be included at all?

When you specify --prefix to configure then this has no effect
w/o this patch.

Christoph


>>
>> Signed-off-by: Roger Pau Monne <roger.pau [at] citrix>
>> ---
>> tools/Rules.mk | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/tools/Rules.mk b/tools/Rules.mk
>> index 1e928b7..2dd8ed3 100644
>> --- a/tools/Rules.mk
>> +++ b/tools/Rules.mk
>> @@ -3,8 +3,8 @@
>> # `all' is the default target
>> all:
>>
>> -include $(XEN_ROOT)/Config.mk
>> -include $(XEN_ROOT)/config/Tools.mk
>> +include $(XEN_ROOT)/Config.mk
>>
>> export _INSTALL := $(INSTALL)
>> INSTALL = $(XEN_ROOT)/tools/cross-install
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel [at] lists
> http://lists.xen.org/xen-devel
>



--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


roger.pau at citrix

Jul 25, 2012, 2:32 AM

Post #5 of 8 (74 views)
Permalink
Re: [PATCH 4/9] build: include Tools.mk first in tools/Rules.mk [In reply to]

Ian Campbell wrote:
> On Wed, 2012-07-11 at 11:23 +0100, Roger Pau Monne wrote:
>> Tools.mk should be included first, or PREFIX is not honoured in the
>> other conf/ files that define the paths of several tools.
>
> Isn't it a bug for anything which is included/defined via
> $(XEN_ROOT)/Config.mk to depend on the contents of
> $(XEN_ROOT)/config/Tools.mk since for anything non-tools Tools.mk would
> never be included at all?

$(XEN_ROOT)/Config.mk includes config/{Linux.mk/NetBSD.mk} and
config/StdGNU.mk, which contain a bunch of paths, specially
config/StdGNU.mk. If the tools config file is not loaded before, all
this paths get set to the default value (which is probably fine in
Linux), but not desirable in NetBSD if the user has specified a custom
prefix.

So the main problem is that the tools Makefile should include
config/Tools.mk before config/StdGNU.mk, but since config/StdGNU.mk is
included in $(XEN_ROOT)/Config.mk we have to either include Tools.mk
before $(XEN_ROOT)/Config.mk or modify $(XEN_ROOT)/Config.mk to include
Tools.mk (which is not desirable at all). I don't care that
$(XEN_ROOT)/Config.mk uses the default paths when building the xen
kernel, but we should honour the user set paths when installing the tools.

One effect of this patch is that etc and var is installed inside of
$(PREFIX)/etc, which is normal in BSD systems, but I'm quite sure it is
not correct on Linux, so I should add the following chunk:

--- a/config/Linux.mk
+++ b/config/Linux.mk
@@ -6,3 +6,8 @@ KERNELS ?=
XKERNELS := $(foreach kernel, $(KERNELS), \
$(patsubst buildconfigs/mk.%,%, \
$(wildcard buildconfigs/mk.$(kernel))) )
+
+CONFIG_DIR = /etc
+XEN_LOCK_DIR = /var/lock
+XEN_RUN_DIR = /var/run/xen
+XEN_PAGING_DIR = /var/lib/xen/xenpaging

>> Signed-off-by: Roger Pau Monne <roger.pau [at] citrix>
>> ---
>> tools/Rules.mk | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/tools/Rules.mk b/tools/Rules.mk
>> index 1e928b7..2dd8ed3 100644
>> --- a/tools/Rules.mk
>> +++ b/tools/Rules.mk
>> @@ -3,8 +3,8 @@
>> # `all' is the default target
>> all:
>>
>> -include $(XEN_ROOT)/Config.mk
>> -include $(XEN_ROOT)/config/Tools.mk
>> +include $(XEN_ROOT)/Config.mk
>>
>> export _INSTALL := $(INSTALL)
>> INSTALL = $(XEN_ROOT)/tools/cross-install
>
>


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Campbell at citrix

Jul 25, 2012, 3:39 AM

Post #6 of 8 (74 views)
Permalink
Re: [PATCH 4/9] build: include Tools.mk first in tools/Rules.mk [In reply to]

On Wed, 2012-07-25 at 10:32 +0100, Roger Pau Monne wrote:
> Ian Campbell wrote:
> > On Wed, 2012-07-11 at 11:23 +0100, Roger Pau Monne wrote:
> >> Tools.mk should be included first, or PREFIX is not honoured in the
> >> other conf/ files that define the paths of several tools.
> >
> > Isn't it a bug for anything which is included/defined via
> > $(XEN_ROOT)/Config.mk to depend on the contents of
> > $(XEN_ROOT)/config/Tools.mk since for anything non-tools Tools.mk would
> > never be included at all?
>
> $(XEN_ROOT)/Config.mk includes config/{Linux.mk/NetBSD.mk} and
> config/StdGNU.mk, which contain a bunch of paths, specially
> config/StdGNU.mk. If the tools config file is not loaded before, all
> this paths get set to the default value (which is probably fine in
> Linux), but not desirable in NetBSD if the user has specified a custom
> prefix.
>
> So the main problem is that the tools Makefile should include
> config/Tools.mk before config/StdGNU.mk, but since config/StdGNU.mk is
> included in $(XEN_ROOT)/Config.mk we have to either include Tools.mk
> before $(XEN_ROOT)/Config.mk or modify $(XEN_ROOT)/Config.mk to include
> Tools.mk (which is not desirable at all). I don't care that
> $(XEN_ROOT)/Config.mk uses the default paths when building the xen
> kernel, but we should honour the user set paths when installing the tools.

My point was that really all of these paths should move to autoconf and
Tools.mk.in. But for 4.2 I guess your proposed change is more
appropriate.

> One effect of this patch is that etc and var is installed inside of
> $(PREFIX)/etc, which is normal in BSD systems, but I'm quite sure it is
> not correct on Linux, so I should add the following chunk:

StdGNU explicitly has:
ifeq ($(PREFIX),/usr)
CONFIG_DIR = /etc
XEN_LOCK_DIR = /var/lock
XEN_RUN_DIR = /var/run/xen
XEN_PAGING_DIR = /var/lib/xen/xenpaging
else
CONFIG_DIR = $(PREFIX)/etc
XEN_LOCK_DIR = $(PREFIX)/var/lock
XEN_RUN_DIR = $(PREFIX)/var/run/xen
XEN_PAGING_DIR = $(PREFIX)/var/lib/xen/xenpaging
endif
so it looks like this was at least deliberate.

>
> --- a/config/Linux.mk
> +++ b/config/Linux.mk
> @@ -6,3 +6,8 @@ KERNELS ?=
> XKERNELS := $(foreach kernel, $(KERNELS), \
> $(patsubst buildconfigs/mk.%,%, \
> $(wildcard buildconfigs/mk.$(kernel))) )
> +
> +CONFIG_DIR = /etc
> +XEN_LOCK_DIR = /var/lock
> +XEN_RUN_DIR = /var/run/xen
> +XEN_PAGING_DIR = /var/lib/xen/xenpaging
>
> >> Signed-off-by: Roger Pau Monne <roger.pau [at] citrix>
> >> ---
> >> tools/Rules.mk | 2 +-
> >> 1 files changed, 1 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/tools/Rules.mk b/tools/Rules.mk
> >> index 1e928b7..2dd8ed3 100644
> >> --- a/tools/Rules.mk
> >> +++ b/tools/Rules.mk
> >> @@ -3,8 +3,8 @@
> >> # `all' is the default target
> >> all:
> >>
> >> -include $(XEN_ROOT)/Config.mk
> >> -include $(XEN_ROOT)/config/Tools.mk
> >> +include $(XEN_ROOT)/Config.mk
> >>
> >> export _INSTALL := $(INSTALL)
> >> INSTALL = $(XEN_ROOT)/tools/cross-install
> >
> >
>



_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


roger.pau at citrix

Jul 25, 2012, 3:56 AM

Post #7 of 8 (77 views)
Permalink
Re: [PATCH 4/9] build: include Tools.mk first in tools/Rules.mk [In reply to]

Ian Campbell wrote:
> On Wed, 2012-07-25 at 10:32 +0100, Roger Pau Monne wrote:
>> Ian Campbell wrote:
>>> On Wed, 2012-07-11 at 11:23 +0100, Roger Pau Monne wrote:
>>>> Tools.mk should be included first, or PREFIX is not honoured in the
>>>> other conf/ files that define the paths of several tools.
>>> Isn't it a bug for anything which is included/defined via
>>> $(XEN_ROOT)/Config.mk to depend on the contents of
>>> $(XEN_ROOT)/config/Tools.mk since for anything non-tools Tools.mk would
>>> never be included at all?
>> $(XEN_ROOT)/Config.mk includes config/{Linux.mk/NetBSD.mk} and
>> config/StdGNU.mk, which contain a bunch of paths, specially
>> config/StdGNU.mk. If the tools config file is not loaded before, all
>> this paths get set to the default value (which is probably fine in
>> Linux), but not desirable in NetBSD if the user has specified a custom
>> prefix.
>>
>> So the main problem is that the tools Makefile should include
>> config/Tools.mk before config/StdGNU.mk, but since config/StdGNU.mk is
>> included in $(XEN_ROOT)/Config.mk we have to either include Tools.mk
>> before $(XEN_ROOT)/Config.mk or modify $(XEN_ROOT)/Config.mk to include
>> Tools.mk (which is not desirable at all). I don't care that
>> $(XEN_ROOT)/Config.mk uses the default paths when building the xen
>> kernel, but we should honour the user set paths when installing the tools.
>
> My point was that really all of these paths should move to autoconf and
> Tools.mk.in. But for 4.2 I guess your proposed change is more
> appropriate.

Yes, this is just a bandaid to hide a much bigger problem we have with
paths & makefiles in general.

>> One effect of this patch is that etc and var is installed inside of
>> $(PREFIX)/etc, which is normal in BSD systems, but I'm quite sure it is
>> not correct on Linux, so I should add the following chunk:
>
> StdGNU explicitly has:
> ifeq ($(PREFIX),/usr)
> CONFIG_DIR = /etc
> XEN_LOCK_DIR = /var/lock
> XEN_RUN_DIR = /var/run/xen
> XEN_PAGING_DIR = /var/lib/xen/xenpaging
> else
> CONFIG_DIR = $(PREFIX)/etc
> XEN_LOCK_DIR = $(PREFIX)/var/lock
> XEN_RUN_DIR = $(PREFIX)/var/run/xen
> XEN_PAGING_DIR = $(PREFIX)/var/lib/xen/xenpaging
> endif
> so it looks like this was at least deliberate.

Yes, this was the behaviour we had before the autoconf patch, when
PREFIX was specified in .config (which I find strange in a Linux
system). So I'm not going to add this chunk and leave the patch as-is.

Thanks.

>
>> --- a/config/Linux.mk
>> +++ b/config/Linux.mk
>> @@ -6,3 +6,8 @@ KERNELS ?=
>> XKERNELS := $(foreach kernel, $(KERNELS), \
>> $(patsubst buildconfigs/mk.%,%, \
>> $(wildcard buildconfigs/mk.$(kernel))) )
>> +
>> +CONFIG_DIR = /etc
>> +XEN_LOCK_DIR = /var/lock
>> +XEN_RUN_DIR = /var/run/xen
>> +XEN_PAGING_DIR = /var/lib/xen/xenpaging
>>
>>>> Signed-off-by: Roger Pau Monne <roger.pau [at] citrix>
>>>> ---
>>>> tools/Rules.mk | 2 +-
>>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>>
>>>> diff --git a/tools/Rules.mk b/tools/Rules.mk
>>>> index 1e928b7..2dd8ed3 100644
>>>> --- a/tools/Rules.mk
>>>> +++ b/tools/Rules.mk
>>>> @@ -3,8 +3,8 @@
>>>> # `all' is the default target
>>>> all:
>>>>
>>>> -include $(XEN_ROOT)/Config.mk
>>>> -include $(XEN_ROOT)/config/Tools.mk
>>>> +include $(XEN_ROOT)/Config.mk
>>>>
>>>> export _INSTALL := $(INSTALL)
>>>> INSTALL = $(XEN_ROOT)/tools/cross-install
>>>
>
>


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Campbell at citrix

Jul 25, 2012, 9:43 AM

Post #8 of 8 (78 views)
Permalink
Re: [PATCH 4/9] build: include Tools.mk first in tools/Rules.mk [In reply to]

On Wed, 2012-07-25 at 11:56 +0100, Roger Pau Monne wrote:
> Ian Campbell wrote:
> > On Wed, 2012-07-25 at 10:32 +0100, Roger Pau Monne wrote:
> >> Ian Campbell wrote:
> >>> On Wed, 2012-07-11 at 11:23 +0100, Roger Pau Monne wrote:
> >>>> Tools.mk should be included first, or PREFIX is not honoured in the
> >>>> other conf/ files that define the paths of several tools.
> >>> Isn't it a bug for anything which is included/defined via
> >>> $(XEN_ROOT)/Config.mk to depend on the contents of
> >>> $(XEN_ROOT)/config/Tools.mk since for anything non-tools Tools.mk would
> >>> never be included at all?
> >> $(XEN_ROOT)/Config.mk includes config/{Linux.mk/NetBSD.mk} and
> >> config/StdGNU.mk, which contain a bunch of paths, specially
> >> config/StdGNU.mk. If the tools config file is not loaded before, all
> >> this paths get set to the default value (which is probably fine in
> >> Linux), but not desirable in NetBSD if the user has specified a custom
> >> prefix.
> >>
> >> So the main problem is that the tools Makefile should include
> >> config/Tools.mk before config/StdGNU.mk, but since config/StdGNU.mk is
> >> included in $(XEN_ROOT)/Config.mk we have to either include Tools.mk
> >> before $(XEN_ROOT)/Config.mk or modify $(XEN_ROOT)/Config.mk to include
> >> Tools.mk (which is not desirable at all). I don't care that
> >> $(XEN_ROOT)/Config.mk uses the default paths when building the xen
> >> kernel, but we should honour the user set paths when installing the tools.
> >
> > My point was that really all of these paths should move to autoconf and
> > Tools.mk.in. But for 4.2 I guess your proposed change is more
> > appropriate.
>
> Yes, this is just a bandaid to hide a much bigger problem we have with
> paths & makefiles in general.

OK then.

Acked-by: Ian Campbell <ian.campbell [at] citrix>

and applied, thanks.




_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel

Xen devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.