[Xen-devel] [XEN PATCH v2.1 13/12] Makefile: Fix install-tests

Anthony PERARD posted 12 patches 6 years ago
There is a newer version of this series
[Xen-devel] [XEN PATCH v2.1 13/12] Makefile: Fix install-tests
Posted by Anthony PERARD 6 years ago
The top-level makefile make uses of internal implementation detail of
the xen build system. Avoid that by creating a new target
"install-tests" in xen/Makefile, and by fixing the top-level Makefile
to not call xen/Rules.mk anymore.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 Makefile     | 6 ++----
 xen/Makefile | 3 +++
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 512d6b73c898..9ad2602f63f0 100644
--- a/Makefile
+++ b/Makefile
@@ -155,13 +155,11 @@ install-docs:
 # We only have build-tests install-tests, not uninstall-tests etc.
 .PHONY: build-tests
 build-tests: build-xen
-	export BASEDIR=$(XEN_ROOT)/xen; \
-	$(MAKE) -f $$BASEDIR/Rules.mk -C xen/test build
+	$(MAKE) -C xen tests
 
 .PHONY: install-tests
 install-tests: install-xen
-	export BASEDIR=$(XEN_ROOT)/xen; \
-	$(MAKE) -f $$BASEDIR/Rules.mk -C xen/test install
+	$(MAKE) -C xen $@
 
 # build xen and the tools and place them in the install
 # directory. 'make install' should then copy them to the normal system
diff --git a/xen/Makefile b/xen/Makefile
index c326fee5880e..72bc89924622 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -90,6 +90,9 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
 .PHONY: _tests
 _tests:
 	$(MAKE) -f $(BASEDIR)/Rules.mk -C test tests
+.PHONY: install-tests
+install-tests:
+	$(MAKE) -f $(BASEDIR)/Rules.mk -C test install
 
 .PHONY: _uninstall
 _uninstall: D=$(DESTDIR)
-- 
Anthony PERARD


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [XEN PATCH v2.1 13/12] Makefile: Fix install-tests
Posted by Jan Beulich 6 years ago
On 21.01.2020 14:59, Anthony PERARD wrote:
> The top-level makefile make uses of internal implementation detail of
> the xen build system. Avoid that by creating a new target
> "install-tests" in xen/Makefile, and by fixing the top-level Makefile
> to not call xen/Rules.mk anymore.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

This in principle could have my R-b, but ...

> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -90,6 +90,9 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
>  .PHONY: _tests
>  _tests:
>  	$(MAKE) -f $(BASEDIR)/Rules.mk -C test tests
> +.PHONY: install-tests
> +install-tests:
> +	$(MAKE) -f $(BASEDIR)/Rules.mk -C test install

... I'm irritated by the patch context here: Patch 8 changed
_tests to tests, and by the numbering this patch goes on top
of patch 8. Could you clarify what's going on here, please?

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [XEN PATCH v2.1 13/12] Makefile: Fix install-tests
Posted by Anthony PERARD 6 years ago
On Thu, Jan 30, 2020 at 12:37:17PM +0100, Jan Beulich wrote:
> On 21.01.2020 14:59, Anthony PERARD wrote:
> > The top-level makefile make uses of internal implementation detail of
> > the xen build system. Avoid that by creating a new target
> > "install-tests" in xen/Makefile, and by fixing the top-level Makefile
> > to not call xen/Rules.mk anymore.
> > 
> > Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> 
> This in principle could have my R-b, but ...
> 
> > --- a/xen/Makefile
> > +++ b/xen/Makefile
> > @@ -90,6 +90,9 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
> >  .PHONY: _tests
> >  _tests:
> >  	$(MAKE) -f $(BASEDIR)/Rules.mk -C test tests
> > +.PHONY: install-tests
> > +install-tests:
> > +	$(MAKE) -f $(BASEDIR)/Rules.mk -C test install
> 
> ... I'm irritated by the patch context here: Patch 8 changed
> _tests to tests, and by the numbering this patch goes on top
> of patch 8. Could you clarify what's going on here, please?

I wanted to have this patch earlier in the series. I could probably have
put in the subject something like "[PATCH 1.5/12]" to make this clearer.

Cheers,

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [XEN PATCH v2.1 13/12] Makefile: Fix install-tests
Posted by Jan Beulich 6 years ago
On 03.02.2020 15:29, Anthony PERARD wrote:
> On Thu, Jan 30, 2020 at 12:37:17PM +0100, Jan Beulich wrote:
>> On 21.01.2020 14:59, Anthony PERARD wrote:
>>> The top-level makefile make uses of internal implementation detail of
>>> the xen build system. Avoid that by creating a new target
>>> "install-tests" in xen/Makefile, and by fixing the top-level Makefile
>>> to not call xen/Rules.mk anymore.
>>>
>>> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
>>
>> This in principle could have my R-b, but ...
>>
>>> --- a/xen/Makefile
>>> +++ b/xen/Makefile
>>> @@ -90,6 +90,9 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
>>>  .PHONY: _tests
>>>  _tests:
>>>  	$(MAKE) -f $(BASEDIR)/Rules.mk -C test tests
>>> +.PHONY: install-tests
>>> +install-tests:
>>> +	$(MAKE) -f $(BASEDIR)/Rules.mk -C test install
>>
>> ... I'm irritated by the patch context here: Patch 8 changed
>> _tests to tests, and by the numbering this patch goes on top
>> of patch 8. Could you clarify what's going on here, please?
> 
> I wanted to have this patch earlier in the series. I could probably have
> put in the subject something like "[PATCH 1.5/12]" to make this clearer.

I see. In which case, as indicated,
Reviewed-by: Jan Beulich <jbeulich@suse.com>

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel