From patchwork Mon Jan 18 08:03:53 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: 8053341 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AA828BEEE5 for ; Mon, 18 Jan 2016 08:07:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BD8CE201FE for ; Mon, 18 Jan 2016 08:07:13 +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 2DFF520265 for ; Mon, 18 Jan 2016 08:07:12 +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 1aL4nb-0007mm-Tp; Mon, 18 Jan 2016 08:04:27 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aL4na-0007mI-Hr for xen-devel@lists.xen.org; Mon, 18 Jan 2016 08:04:26 +0000 Received: from [85.158.139.211] by server-3.bemta-5.messagelabs.com id 3B/23-13487-98C9C965; Mon, 18 Jan 2016 08:04:25 +0000 X-Env-Sender: jgross@suse.com X-Msg-Ref: server-3.tower-206.messagelabs.com!1453104263!16390404!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 28290 invoked from network); 18 Jan 2016 08:04:24 -0000 Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by server-3.tower-206.messagelabs.com with DHE-RSA-CAMELLIA256-SHA encrypted SMTP; 18 Jan 2016 08:04:24 -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 D7F48AC86; Mon, 18 Jan 2016 08:04:21 +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: Mon, 18 Jan 2016 09:03:53 +0100 Message-Id: <1453104244-6268-4-git-send-email-jgross@suse.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1453104244-6268-1-git-send-email-jgross@suse.com> References: <1453104244-6268-1-git-send-email-jgross@suse.com> Cc: Juergen Gross Subject: [Xen-devel] [PATCH v4 03/14] 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 Signed-off-by: Juergen Gross --- .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 02b2100..01d3305 100644 --- a/.gitignore +++ b/.gitignore @@ -133,6 +133,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 @@ -201,7 +202,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)