From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Wei Liu <wei.liu2@citrix.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Tim Deegan <tim@xen.org>, Julien Grall <julien.grall@arm.com>,
Jan Beulich <jbeulich@suse.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: [PATCH 2/4] xen/test/livepatch: Regularise Makefiles
Date: Wed, 7 Jun 2017 15:51:30 +0100 [thread overview]
Message-ID: <1496847092-18838-3-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1496847092-18838-1-git-send-email-ian.jackson@eu.citrix.com>
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.
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
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)
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-06-07 14:51 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-07 14:51 [PATCH for-4.9 0/4] Makefiles: Provide way to ship livepatch tests Ian Jackson
2017-06-07 14:51 ` [PATCH 1/4] xen/test/livepatch/Makefile: Install in DESTDIR/usr/lib/debug/xen-livepatch Ian Jackson
2017-06-07 15:04 ` Konrad Rzeszutek Wilk
2017-06-07 14:51 ` Ian Jackson [this message]
2017-06-07 15:05 ` [PATCH 2/4] xen/test/livepatch: Regularise Makefiles Konrad Rzeszutek Wilk
2017-06-07 14:51 ` [PATCH 3/4] xen/test/livepatch: Add xen_nop.livepatch to .gitignore Ian Jackson
2017-06-07 15:06 ` Konrad Rzeszutek Wilk
2017-06-07 15:20 ` Jan Beulich
2017-06-07 14:51 ` [PATCH 4/4] Makefile: Provide way to ship livepatch test files Ian Jackson
2017-06-07 15:07 ` Konrad Rzeszutek Wilk
2017-06-07 15:58 ` Andrew Cooper
2017-06-07 15:07 ` [PATCH for-4.9 0/4] Makefiles: Provide way to ship livepatch tests Konrad Rzeszutek Wilk
2017-06-07 15:22 ` Jan Beulich
2017-06-07 15:31 ` Wei Liu
2017-06-07 15:53 ` [PATCH for-4.9 0/4] Makefiles: Provide way to ship livepatch tests [and 1 more messages] Ian Jackson
2017-06-09 12:41 ` [PATCH for-4.9 0/4] Makefiles: Provide way to ship livepatch tests Julien Grall
2017-06-09 14:31 ` Ian Jackson
2017-06-14 10:28 ` Julien Grall
2017-06-19 12:59 ` Ian Jackson
2017-06-19 13:03 ` Andrew Cooper
2017-06-19 14:23 ` [PATCH for-4.9] xen/test/Makefile: Fix clean target, broken by pattern rule Ian Jackson
2017-06-19 14:55 ` Konrad Rzeszutek Wilk
2017-06-19 20:14 ` Konrad Rzeszutek Wilk
2017-06-20 10:37 ` Julien Grall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1496847092-18838-3-git-send-email-ian.jackson@eu.citrix.com \
--to=ian.jackson@eu.citrix.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=julien.grall@arm.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).