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@eu.citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-acked-by: Julien Grall <julien.grall@arm.com>
(cherry picked from commit
e541982dc21dcc5be61279d22d477ed5c0bc41c5)
(cherry picked from commit
8c60e5f4327583b1c90cf3641388ef618c1727ec)
-.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
LIVEPATCH_DEBUG_DIR ?= $(DEBUG_DIR)/xen-livepatch
-default: livepatch
+build default: livepatch
install: livepatch
$(INSTALL_DIR) $(DESTDIR)$(LIVEPATCH_DEBUG_DIR)