All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] build: always use BASEDIR for xen sub-directory
@ 2020-10-02 10:42 Bertrand Marquis
  2020-10-02 12:12 ` Jan Beulich
  0 siblings, 1 reply; 10+ messages in thread
From: Bertrand Marquis @ 2020-10-02 10:42 UTC (permalink / raw)
  To: xen-devel
  Cc: Andrew Cooper, George Dunlap, Ian Jackson, Jan Beulich,
	Julien Grall, Stefano Stabellini, Wei Liu, Roger Pau Monné,
	Doug Goldstein, Daniel De Graaf

Modify Makefiles using $(XEN_ROOT)/xen to use $(BASEDIR) instead.

This is removing the dependency to xen subdirectory preventing using a
wrong configuration file when xen subdirectory is duplicated for
compilation tests.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
---
 xen/common/Makefile                | 6 +++---
 xen/include/xen/lib/x86/Makefile   | 4 ++--
 xen/tools/kconfig/Makefile.kconfig | 2 +-
 xen/xsm/flask/Makefile             | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/xen/common/Makefile b/xen/common/Makefile
index b3b60a1ba2..083f62acb6 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -78,14 +78,14 @@ obj-$(CONFIG_UBSAN) += ubsan/
 obj-$(CONFIG_NEEDS_LIBELF) += libelf/
 obj-$(CONFIG_HAS_DEVICE_TREE) += libfdt/
 
-CONF_FILE := $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(XEN_ROOT)/xen/)$(KCONFIG_CONFIG)
+CONF_FILE := $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(BASEDIR)/)$(KCONFIG_CONFIG)
 config.gz: $(CONF_FILE)
 	gzip -c $< >$@
 
 config_data.o: config.gz
 
-config_data.S: $(XEN_ROOT)/xen/tools/binfile
-	$(SHELL) $(XEN_ROOT)/xen/tools/binfile $@ config.gz xen_config_data
+config_data.S: $(BASEDIR)/tools/binfile
+	$(SHELL) $(BASEDIR)/tools/binfile $@ config.gz xen_config_data
 
 clean::
 	rm -f config_data.S config.gz 2>/dev/null
diff --git a/xen/include/xen/lib/x86/Makefile b/xen/include/xen/lib/x86/Makefile
index 408d69c99e..f1229b9bc8 100644
--- a/xen/include/xen/lib/x86/Makefile
+++ b/xen/include/xen/lib/x86/Makefile
@@ -3,6 +3,6 @@ include $(XEN_ROOT)/Config.mk
 .PHONY: all
 all: cpuid-autogen.h
 
-cpuid-autogen.h: $(XEN_ROOT)/xen/include/public/arch-x86/cpufeatureset.h $(XEN_ROOT)/xen/tools/gen-cpuid.py
-	$(PYTHON) $(XEN_ROOT)/xen/tools/gen-cpuid.py -i $< -o $@.new
+cpuid-autogen.h: $(BASEDIR)/include/public/arch-x86/cpufeatureset.h $(BASEDIR)/tools/gen-cpuid.py
+	$(PYTHON) $(BASEDIR)/tools/gen-cpuid.py -i $< -o $@.new
 	$(call move-if-changed,$@.new,$@)
diff --git a/xen/tools/kconfig/Makefile.kconfig b/xen/tools/kconfig/Makefile.kconfig
index 065f4b8471..799321ec4d 100644
--- a/xen/tools/kconfig/Makefile.kconfig
+++ b/xen/tools/kconfig/Makefile.kconfig
@@ -9,7 +9,7 @@ Q :=
 kecho := :
 
 # eventually you'll want to do out of tree builds
-srctree := $(XEN_ROOT)/xen
+srctree := $(BASEDIR)
 objtree := $(srctree)
 src := tools/kconfig
 obj := $(src)
diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile
index 50bec20a1e..637159ad82 100644
--- a/xen/xsm/flask/Makefile
+++ b/xen/xsm/flask/Makefile
@@ -35,8 +35,8 @@ $(subst include/,%/,$(AV_H_FILES)): $(AV_H_DEPEND) $(mkaccess) FORCE
 obj-bin-$(CONFIG_XSM_FLASK_POLICY) += flask-policy.o
 flask-policy.o: policy.bin
 
-flask-policy.S: $(XEN_ROOT)/xen/tools/binfile
-	$(SHELL) $(XEN_ROOT)/xen/tools/binfile -i $@ policy.bin xsm_flask_init_policy
+flask-policy.S: $(BASEDIR)/tools/binfile
+	$(SHELL) $(BASEDIR)/tools/binfile -i $@ policy.bin xsm_flask_init_policy
 
 FLASK_BUILD_DIR := $(CURDIR)
 POLICY_SRC := $(FLASK_BUILD_DIR)/xenpolicy-$(XEN_FULLVERSION)
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] build: always use BASEDIR for xen sub-directory
  2020-10-02 10:42 [PATCH] build: always use BASEDIR for xen sub-directory Bertrand Marquis
@ 2020-10-02 12:12 ` Jan Beulich
  2020-10-02 12:34   ` Bertrand Marquis
  2020-10-07 11:03   ` Bertrand Marquis
  0 siblings, 2 replies; 10+ messages in thread
From: Jan Beulich @ 2020-10-02 12:12 UTC (permalink / raw)
  To: Bertrand Marquis
  Cc: xen-devel, Andrew Cooper, George Dunlap, Ian Jackson,
	Julien Grall, Stefano Stabellini, Wei Liu, Roger Pau Monné,
	Doug Goldstein, Daniel De Graaf

On 02.10.2020 12:42, Bertrand Marquis wrote:
> Modify Makefiles using $(XEN_ROOT)/xen to use $(BASEDIR) instead.
> 
> This is removing the dependency to xen subdirectory preventing using a
> wrong configuration file when xen subdirectory is duplicated for
> compilation tests.
> 
> Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>

Acked-by: Jan Beulich <jbeulich@suse.com>

(but more for the slight tidying than the purpose you name)

Jan


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] build: always use BASEDIR for xen sub-directory
  2020-10-02 12:12 ` Jan Beulich
@ 2020-10-02 12:34   ` Bertrand Marquis
  2020-10-02 12:38     ` Jan Beulich
  2020-10-07 11:03   ` Bertrand Marquis
  1 sibling, 1 reply; 10+ messages in thread
From: Bertrand Marquis @ 2020-10-02 12:34 UTC (permalink / raw)
  To: Jan Beulich; +Cc: open list:X86



> On 2 Oct 2020, at 13:12, Jan Beulich <jbeulich@suse.com> wrote:
> 
> On 02.10.2020 12:42, Bertrand Marquis wrote:
>> Modify Makefiles using $(XEN_ROOT)/xen to use $(BASEDIR) instead.
>> 
>> This is removing the dependency to xen subdirectory preventing using a
>> wrong configuration file when xen subdirectory is duplicated for
>> compilation tests.
>> 
>> Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
> 
> Acked-by: Jan Beulich <jbeulich@suse.com>

Thanks :-)

> 
> (but more for the slight tidying than the purpose you name)

Feel free to remove the justification from the commit message if
you think it is not usefull.

Cheers
Bertrand



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] build: always use BASEDIR for xen sub-directory
  2020-10-02 12:34   ` Bertrand Marquis
@ 2020-10-02 12:38     ` Jan Beulich
  2020-10-02 12:44       ` Bertrand Marquis
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2020-10-02 12:38 UTC (permalink / raw)
  To: Bertrand Marquis; +Cc: open list:X86

On 02.10.2020 14:34, Bertrand Marquis wrote:
>> On 2 Oct 2020, at 13:12, Jan Beulich <jbeulich@suse.com> wrote:
>>
>> On 02.10.2020 12:42, Bertrand Marquis wrote:
>>> Modify Makefiles using $(XEN_ROOT)/xen to use $(BASEDIR) instead.
>>>
>>> This is removing the dependency to xen subdirectory preventing using a
>>> wrong configuration file when xen subdirectory is duplicated for
>>> compilation tests.
>>>
>>> Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
>>
>> Acked-by: Jan Beulich <jbeulich@suse.com>
> 
> Thanks :-)
> 
>>
>> (but more for the slight tidying than the purpose you name)
> 
> Feel free to remove the justification from the commit message if
> you think it is not usefull.

Oh, no, it's not like I consider it not useful. It shows how you
arrived at making the change. It's just that I didn't consider
making copies of xen/ something we mean to be supported. I wouldn't
be surprised if it got broken again ...

Jan


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] build: always use BASEDIR for xen sub-directory
  2020-10-02 12:38     ` Jan Beulich
@ 2020-10-02 12:44       ` Bertrand Marquis
  2020-10-02 13:17         ` Jan Beulich
  0 siblings, 1 reply; 10+ messages in thread
From: Bertrand Marquis @ 2020-10-02 12:44 UTC (permalink / raw)
  To: Jan Beulich; +Cc: open list:X86



> On 2 Oct 2020, at 13:38, Jan Beulich <jbeulich@suse.com> wrote:
> 
> On 02.10.2020 14:34, Bertrand Marquis wrote:
>>> On 2 Oct 2020, at 13:12, Jan Beulich <jbeulich@suse.com> wrote:
>>> 
>>> On 02.10.2020 12:42, Bertrand Marquis wrote:
>>>> Modify Makefiles using $(XEN_ROOT)/xen to use $(BASEDIR) instead.
>>>> 
>>>> This is removing the dependency to xen subdirectory preventing using a
>>>> wrong configuration file when xen subdirectory is duplicated for
>>>> compilation tests.
>>>> 
>>>> Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
>>> 
>>> Acked-by: Jan Beulich <jbeulich@suse.com>
>> 
>> Thanks :-)
>> 
>>> 
>>> (but more for the slight tidying than the purpose you name)
>> 
>> Feel free to remove the justification from the commit message if
>> you think it is not usefull.
> 
> Oh, no, it's not like I consider it not useful. It shows how you
> arrived at making the change. It's just that I didn't consider
> making copies of xen/ something we mean to be supported. I wouldn't
> be surprised if it got broken again ...

basically i do this a “cp -rs” of xen subdirectory so that i can have directories
in which xen is compiled for x86, arm32 and arm64 and recompile all of them
quickly without having to go through distclean, config, make each time or modify
the original tree.

If it gets broken i will fix it :-)

In the long term it is a step toward out of tree compilation (with some of the
changes already started dealing with links and other stuff).

Bertrand


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] build: always use BASEDIR for xen sub-directory
  2020-10-02 12:44       ` Bertrand Marquis
@ 2020-10-02 13:17         ` Jan Beulich
  2020-10-02 13:39           ` Bertrand Marquis
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2020-10-02 13:17 UTC (permalink / raw)
  To: Bertrand Marquis; +Cc: open list:X86

On 02.10.2020 14:44, Bertrand Marquis wrote:
> 
> 
>> On 2 Oct 2020, at 13:38, Jan Beulich <jbeulich@suse.com> wrote:
>>
>> On 02.10.2020 14:34, Bertrand Marquis wrote:
>>>> On 2 Oct 2020, at 13:12, Jan Beulich <jbeulich@suse.com> wrote:
>>>>
>>>> On 02.10.2020 12:42, Bertrand Marquis wrote:
>>>>> Modify Makefiles using $(XEN_ROOT)/xen to use $(BASEDIR) instead.
>>>>>
>>>>> This is removing the dependency to xen subdirectory preventing using a
>>>>> wrong configuration file when xen subdirectory is duplicated for
>>>>> compilation tests.
>>>>>
>>>>> Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
>>>>
>>>> Acked-by: Jan Beulich <jbeulich@suse.com>
>>>
>>> Thanks :-)
>>>
>>>>
>>>> (but more for the slight tidying than the purpose you name)
>>>
>>> Feel free to remove the justification from the commit message if
>>> you think it is not usefull.
>>
>> Oh, no, it's not like I consider it not useful. It shows how you
>> arrived at making the change. It's just that I didn't consider
>> making copies of xen/ something we mean to be supported. I wouldn't
>> be surprised if it got broken again ...
> 
> basically i do this a “cp -rs” of xen subdirectory so that i can have directories
> in which xen is compiled for x86, arm32 and arm64 and recompile all of them
> quickly without having to go through distclean, config, make each time or modify
> the original tree.

But then you must have adjustments also in the top level makefile,
such that besides "make xen", "make xen-xyz" also works.

Jan


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] build: always use BASEDIR for xen sub-directory
  2020-10-02 13:17         ` Jan Beulich
@ 2020-10-02 13:39           ` Bertrand Marquis
  0 siblings, 0 replies; 10+ messages in thread
From: Bertrand Marquis @ 2020-10-02 13:39 UTC (permalink / raw)
  To: Jan Beulich; +Cc: open list:X86



> On 2 Oct 2020, at 14:17, Jan Beulich <jbeulich@suse.com> wrote:
> 
> On 02.10.2020 14:44, Bertrand Marquis wrote:
>> 
>> 
>>> On 2 Oct 2020, at 13:38, Jan Beulich <jbeulich@suse.com> wrote:
>>> 
>>> On 02.10.2020 14:34, Bertrand Marquis wrote:
>>>>> On 2 Oct 2020, at 13:12, Jan Beulich <jbeulich@suse.com> wrote:
>>>>> 
>>>>> On 02.10.2020 12:42, Bertrand Marquis wrote:
>>>>>> Modify Makefiles using $(XEN_ROOT)/xen to use $(BASEDIR) instead.
>>>>>> 
>>>>>> This is removing the dependency to xen subdirectory preventing using a
>>>>>> wrong configuration file when xen subdirectory is duplicated for
>>>>>> compilation tests.
>>>>>> 
>>>>>> Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
>>>>> 
>>>>> Acked-by: Jan Beulich <jbeulich@suse.com>
>>>> 
>>>> Thanks :-)
>>>> 
>>>>> 
>>>>> (but more for the slight tidying than the purpose you name)
>>>> 
>>>> Feel free to remove the justification from the commit message if
>>>> you think it is not usefull.
>>> 
>>> Oh, no, it's not like I consider it not useful. It shows how you
>>> arrived at making the change. It's just that I didn't consider
>>> making copies of xen/ something we mean to be supported. I wouldn't
>>> be surprised if it got broken again ...
>> 
>> basically i do this a “cp -rs” of xen subdirectory so that i can have directories
>> in which xen is compiled for x86, arm32 and arm64 and recompile all of them
>> quickly without having to go through distclean, config, make each time or modify
>> the original tree.
> 
> But then you must have adjustments also in the top level makefile,
> such that besides "make xen", "make xen-xyz" also works.

No there i am only compiling the hypervisor, not the tools, so only xen subdir.

Bertrand


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] build: always use BASEDIR for xen sub-directory
  2020-10-02 12:12 ` Jan Beulich
  2020-10-02 12:34   ` Bertrand Marquis
@ 2020-10-07 11:03   ` Bertrand Marquis
  2020-10-07 11:10     ` Wei Liu
  1 sibling, 1 reply; 10+ messages in thread
From: Bertrand Marquis @ 2020-10-07 11:03 UTC (permalink / raw)
  To: Jan Beulich
  Cc: open list:X86, Andrew Cooper, George Dunlap, Ian Jackson,
	Julien Grall, Stefano Stabellini, Wei Liu, Roger Pau Monné,
	Doug Goldstein, Daniel De Graaf



> On 2 Oct 2020, at 13:12, Jan Beulich <jbeulich@suse.com> wrote:
> 
> On 02.10.2020 12:42, Bertrand Marquis wrote:
>> Modify Makefiles using $(XEN_ROOT)/xen to use $(BASEDIR) instead.
>> 
>> This is removing the dependency to xen subdirectory preventing using a
>> wrong configuration file when xen subdirectory is duplicated for
>> compilation tests.
>> 
>> Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
> 
> Acked-by: Jan Beulich <jbeulich@suse.com>
> 
> (but more for the slight tidying than the purpose you name)

Ping: Could this be pushed ?

Thanks
Bertrand



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] build: always use BASEDIR for xen sub-directory
  2020-10-07 11:03   ` Bertrand Marquis
@ 2020-10-07 11:10     ` Wei Liu
  2020-10-07 11:15       ` Bertrand Marquis
  0 siblings, 1 reply; 10+ messages in thread
From: Wei Liu @ 2020-10-07 11:10 UTC (permalink / raw)
  To: Bertrand Marquis
  Cc: Jan Beulich, open list:X86, Andrew Cooper, George Dunlap,
	Ian Jackson, Julien Grall, Stefano Stabellini, Wei Liu,
	Roger Pau Monné,
	Doug Goldstein, Daniel De Graaf

On Wed, Oct 07, 2020 at 11:03:37AM +0000, Bertrand Marquis wrote:
> 
> 
> > On 2 Oct 2020, at 13:12, Jan Beulich <jbeulich@suse.com> wrote:
> > 
> > On 02.10.2020 12:42, Bertrand Marquis wrote:
> >> Modify Makefiles using $(XEN_ROOT)/xen to use $(BASEDIR) instead.
> >> 
> >> This is removing the dependency to xen subdirectory preventing using a
> >> wrong configuration file when xen subdirectory is duplicated for
> >> compilation tests.
> >> 
> >> Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
> > 
> > Acked-by: Jan Beulich <jbeulich@suse.com>
> > 
> > (but more for the slight tidying than the purpose you name)
> 
> Ping: Could this be pushed ?
> 

Done.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] build: always use BASEDIR for xen sub-directory
  2020-10-07 11:10     ` Wei Liu
@ 2020-10-07 11:15       ` Bertrand Marquis
  0 siblings, 0 replies; 10+ messages in thread
From: Bertrand Marquis @ 2020-10-07 11:15 UTC (permalink / raw)
  To: Wei Liu
  Cc: Jan Beulich, open list:X86, Andrew Cooper, George Dunlap,
	Ian Jackson, Julien Grall, Stefano Stabellini,
	Roger Pau Monné,
	Doug Goldstein, Daniel De Graaf



> On 7 Oct 2020, at 12:10, Wei Liu <wl@xen.org> wrote:
> 
> On Wed, Oct 07, 2020 at 11:03:37AM +0000, Bertrand Marquis wrote:
>> 
>> 
>>> On 2 Oct 2020, at 13:12, Jan Beulich <jbeulich@suse.com> wrote:
>>> 
>>> On 02.10.2020 12:42, Bertrand Marquis wrote:
>>>> Modify Makefiles using $(XEN_ROOT)/xen to use $(BASEDIR) instead.
>>>> 
>>>> This is removing the dependency to xen subdirectory preventing using a
>>>> wrong configuration file when xen subdirectory is duplicated for
>>>> compilation tests.
>>>> 
>>>> Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
>>> 
>>> Acked-by: Jan Beulich <jbeulich@suse.com>
>>> 
>>> (but more for the slight tidying than the purpose you name)
>> 
>> Ping: Could this be pushed ?
>> 
> 
> Done.

Thanks a lot

Bertrand




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-10-07 11:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-02 10:42 [PATCH] build: always use BASEDIR for xen sub-directory Bertrand Marquis
2020-10-02 12:12 ` Jan Beulich
2020-10-02 12:34   ` Bertrand Marquis
2020-10-02 12:38     ` Jan Beulich
2020-10-02 12:44       ` Bertrand Marquis
2020-10-02 13:17         ` Jan Beulich
2020-10-02 13:39           ` Bertrand Marquis
2020-10-07 11:03   ` Bertrand Marquis
2020-10-07 11:10     ` Wei Liu
2020-10-07 11:15       ` Bertrand Marquis

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.