[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen stable-4.9] xen/test/livepatch: Regularise Makefiles



commit 8c60e5f4327583b1c90cf3641388ef618c1727ec
Author:     Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
AuthorDate: Wed Jun 7 14:44:51 2017 +0100
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Mon Jun 19 11:35:30 2017 +0100

    xen/test/livepatch: Regularise Makefiles
    
    In xen/test/livepatch/Makefile:
    
      Provide a `build' target, as most of the
      subdir-invoking Makefiles elsewhere expect.
    
    In xen/test/Makefile:
    
      Replace the two open-coded targets with a generalised pattern rule
      which descends into each of SUBDIRS.  This allows `install' to work
      too (it is already supported by xen/test/livepatch/Makefile).
    
      Provide an explicit default target of `tests', and an `all' target
      (which is conventional).
    
      Suppress entry into the xen/test/livepatch subdir when we are
      building for i386, since the 32-bit hypervisor is not supported any
      more and we can't build livepatches for it either.
    
    After this, the xen/test subdirectory is somewhere were make can be
    invoked in the way which is conventional for xen.git/xen/ subdirs.
    
    None of this is yet invoked from the top-level Makefile.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
    Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Release-acked-by: Julien Grall <julien.grall@xxxxxxx>
    (cherry picked from commit e541982dc21dcc5be61279d22d477ed5c0bc41c5)
---
 xen/test/Makefile           | 18 ++++++++++++------
 xen/test/livepatch/Makefile |  2 +-
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/xen/test/Makefile b/xen/test/Makefile
index d91b319..aa1a23b 100644
--- a/xen/test/Makefile
+++ b/xen/test/Makefile
@@ -1,7 +1,13 @@
-.PHONY: tests
-tests:
-       $(MAKE) -f $(BASEDIR)/Rules.mk -C livepatch livepatch
 
-.PHONY: clean
-clean::
-       $(MAKE) -f $(BASEDIR)/Rules.mk -C livepatch clean
+tests all: build
+
+
+ifneq ($(XEN_TARGET_ARCH),x86_32)
+# Xen 32-bit x86 hypervisor no longer supported, so has no test livepatches
+SUBDIRS += livepatch
+endif
+
+%:
+       set -e; for s in $(SUBDIRS); do \
+               $(MAKE) -f $(BASEDIR)/Rules.mk -C $$s $*; \
+       done
diff --git a/xen/test/livepatch/Makefile b/xen/test/livepatch/Makefile
index 76d65cf..6831383d 100644
--- a/xen/test/livepatch/Makefile
+++ b/xen/test/livepatch/Makefile
@@ -27,7 +27,7 @@ LIVEPATCHES += $(LIVEPATCH_NOP)
 
 LIVEPATCH_DEBUG_DIR ?= $(DEBUG_DIR)/xen-livepatch
 
-default: livepatch
+build default: livepatch
 
 install: livepatch
        $(INSTALL_DIR) $(DESTDIR)$(LIVEPATCH_DEBUG_DIR)
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.9

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.