All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
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
Cc: Juergen Gross <jgross@suse.com>
Subject: [PATCH v4 03/14] xenstore: move init-xenstore-domain to tools/helpers
Date: Mon, 18 Jan 2016 09:03:53 +0100	[thread overview]
Message-ID: <1453104244-6268-4-git-send-email-jgross@suse.com> (raw)
In-Reply-To: <1453104244-6268-1-git-send-email-jgross@suse.com>

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 <jgross@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
V3: don't adapt coding style as requested by Ian Campbell
    adjust .gitignore

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 .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)
 
-- 
2.6.2

  parent reply	other threads:[~2016-01-18  8:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-18  8:03 [PATCH v4 00/14] xenstore: make it easier to run xenstore in a domain Juergen Gross
2016-01-18  8:03 ` [PATCH v4 01/14] libxc: support new xenstore domain flag in libxc Juergen Gross
2016-01-18  8:03 ` [PATCH v4 02/14] libxl: provide a flag in dominfo to avoid stopping it Juergen Gross
2016-01-18  8:03 ` Juergen Gross [this message]
2016-01-18  8:03 ` [PATCH v4 04/14] xenstore: adjust coding style of init-xenstore-domain.c Juergen Gross
2016-01-18  8:03 ` [PATCH v4 05/14] libxl: move xen-init-dom0 to tools/helpers Juergen Gross
2016-01-18  8:03 ` [PATCH v4 06/14] xenstore: destroy xenstore domain in case of error after creating it Juergen Gross
2016-01-18  8:03 ` [PATCH v4 07/14] xenstore: add error messages to init-xenstore-domain Juergen Gross
2016-01-18  8:03 ` [PATCH v4 08/14] xenstore: modify init-xenstore-domain parameter syntax Juergen Gross
2016-01-18  8:03 ` [PATCH v4 09/14] xenstore: make use of the "xenstore domain" flag Juergen Gross
2016-01-18  8:04 ` [PATCH v4 10/14] xenstore: add init-xenstore-domain parameter to specify cmdline Juergen Gross
2016-01-18  8:04 ` [PATCH v4 11/14] tools: split up xen-init-dom0.c Juergen Gross
2016-01-18  8:04 ` [PATCH v4 12/14] xenstore: write xenstore domain data to xenstore Juergen Gross
2016-01-18  8:04 ` [PATCH v4 13/14] tools: don't stop xenstore domain when stopping dom0 Juergen Gross
2016-01-18  8:04 ` [PATCH v4 14/14] docs: document xenstore domain xenstore paths Juergen Gross
2016-01-18 16:55 ` [PATCH v4 00/14] xenstore: make it easier to run xenstore in a domain Ian Campbell

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=1453104244-6268-4-git-send-email-jgross@suse.com \
    --to=jgross@suse.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=ian.jackson@eu.citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.