From patchwork Fri Jan 8 13:08:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 7985631 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EFDBE9F6FA for ; Fri, 8 Jan 2016 13:11:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D8091201DD for ; Fri, 8 Jan 2016 13:11:12 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 90A2A201BC for ; Fri, 8 Jan 2016 13:11:11 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aHWmn-0006D3-GU; Fri, 08 Jan 2016 13:08:57 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aHWmk-0006BR-H0 for xen-devel@lists.xen.org; Fri, 08 Jan 2016 13:08:54 +0000 Received: from [85.158.137.68] by server-8.bemta-3.messagelabs.com id 0F/3B-31069-5E4BF865; Fri, 08 Jan 2016 13:08:53 +0000 X-Env-Sender: jgross@suse.com X-Msg-Ref: server-16.tower-31.messagelabs.com!1452258532!7190026!1 X-Originating-IP: [195.135.220.15] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 18001 invoked from network); 8 Jan 2016 13:08:52 -0000 Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by server-16.tower-31.messagelabs.com with DHE-RSA-CAMELLIA256-SHA encrypted SMTP; 8 Jan 2016 13:08:52 -0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A7C78AD78; Fri, 8 Jan 2016 13:08:51 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xen.org, Ian.Campbell@citrix.com, ian.jackson@eu.citrix.com, stefano.stabellini@eu.citrix.com, wei.liu2@citrix.com, dgdegra@tycho.nsa.gov Date: Fri, 8 Jan 2016 14:08:35 +0100 Message-Id: <1452258526-4797-5-git-send-email-jgross@suse.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1452258526-4797-1-git-send-email-jgross@suse.com> References: <1452258526-4797-1-git-send-email-jgross@suse.com> Cc: Juergen Gross Subject: [Xen-devel] [PATCH v3 04/15] xenstore: move init-xenstore-domain to tools/helpers X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The program init-xenstore-domain to start a xenstore domain instead of the xenstored daemon is built, but not installed. Change that. Move the program to a new tools subdirectory "helpers" to be able to use libxl in a later patch. Otherwise a dependency loop will be created. Signed-off-by: Juergen Gross Acked-by: Ian Campbell --- V3: don't adapt coding style as requested by Ian Campbell adjust .gitignore --- .gitignore | 2 +- tools/Makefile | 1 + tools/helpers/Makefile | 34 ++++++++++++++++++++++ tools/{xenstore => helpers}/init-xenstore-domain.c | 0 tools/xenstore/Makefile | 9 ------ 5 files changed, 36 insertions(+), 10 deletions(-) create mode 100644 tools/helpers/Makefile rename tools/{xenstore => helpers}/init-xenstore-domain.c (100%) diff --git a/.gitignore b/.gitignore index e0df903..ec1cde3 100644 --- a/.gitignore +++ b/.gitignore @@ -132,6 +132,7 @@ tools/flask/utils/flask-loadpolicy tools/flask/utils/flask-setenforce tools/flask/utils/flask-set-bool tools/flask/utils/flask-label-pci +tools/helpers/init-xenstore-domain tools/hotplug/common/hotplugpath.sh tools/hotplug/FreeBSD/rc.d/xencommons tools/hotplug/FreeBSD/rc.d/xendriverdomain @@ -200,7 +201,6 @@ tools/xenmon/xenbaked tools/xenpaging/xenpaging tools/xenpmd/xenpmd tools/xenstat/xentop/xentop -tools/xenstore/init-xenstore-domain tools/xenstore/xenstore tools/xenstore/xenstore-chmod tools/xenstore/xenstore-exists diff --git a/tools/Makefile b/tools/Makefile index 9f74ac7..124919b 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -30,6 +30,7 @@ endif SUBDIRS-y += xenpmd SUBDIRS-y += libxl +SUBDIRS-y += helpers SUBDIRS-$(CONFIG_X86) += xenpaging SUBDIRS-$(CONFIG_X86) += debugger/gdbsx SUBDIRS-$(CONFIG_X86) += debugger/kdd diff --git a/tools/helpers/Makefile b/tools/helpers/Makefile new file mode 100644 index 0000000..52347fd --- /dev/null +++ b/tools/helpers/Makefile @@ -0,0 +1,34 @@ +# +# tools/helpers/Makefile +# + +XEN_ROOT = $(CURDIR)/../.. +include $(XEN_ROOT)/tools/Rules.mk + +ifeq ($(CONFIG_Linux),y) +PROGS += init-xenstore-domain +endif + +INIT_XENSTORE_DOMAIN_OBJS = init-xenstore-domain.o +$(INIT_XENSTORE_DOMAIN_OBJS): CFLAGS += $(CFLAGS_libxenguest) +$(INIT_XENSTORE_DOMAIN_OBJS): CFLAGS += $(CFLAGS_libxenctrl) +$(INIT_XENSTORE_DOMAIN_OBJS): CFLAGS += $(CFLAGS_libxenstore) + +.PHONY: all +all: $(PROGS) + +init-xenstore-domain: $(INIT_XENSTORE_DOMAIN_OBJS) + $(CC) $(LDFLAGS) -o $@ $(INIT_XENSTORE_DOMAIN_OBJS) $(LDLIBS_libxenstore) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(APPEND_LDFLAGS) + +.PHONY: install +install: all + $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) +ifeq ($(CONFIG_Linux),y) + $(INSTALL_PROG) init-xenstore-domain $(DESTDIR)$(LIBEXEC_BIN) +endif + +.PHONY: clean +clean: + $(RM) -f *.o $(PROGS) $(DEPS) + +distclean: clean diff --git a/tools/xenstore/init-xenstore-domain.c b/tools/helpers/init-xenstore-domain.c similarity index 100% rename from tools/xenstore/init-xenstore-domain.c rename to tools/helpers/init-xenstore-domain.c diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile index 1b4a494..404d4cb 100644 --- a/tools/xenstore/Makefile +++ b/tools/xenstore/Makefile @@ -46,10 +46,6 @@ ifeq ($(XENSTORE_XENSTORED),y) ALL_TARGETS += xs_tdb_dump xenstored endif -ifeq ($(CONFIG_Linux),y) -ALL_TARGETS += init-xenstore-domain -endif - ifdef CONFIG_STUBDOM CFLAGS += -DNO_SOCKETS=1 endif @@ -72,11 +68,6 @@ xenstored_probes.o: xenstored_solaris.o CFLAGS += -DHAVE_DTRACE=1 endif -init-xenstore-domain.o: CFLAGS += $(CFLAGS_libxenguest) - -init-xenstore-domain: init-xenstore-domain.o $(LIBXENSTORE) - $(CC) $^ $(LDFLAGS) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) -o $@ $(APPEND_LDFLAGS) - xenstored: $(XENSTORED_OBJS) $(CC) $^ $(LDFLAGS) $(LDLIBS_libxenctrl) $(SOCKET_LIBS) -o $@ $(APPEND_LDFLAGS)