@@ -275,7 +275,6 @@ tools/tests/x86_emulator/*sse*.[ch]
tools/tests/x86_emulator/test_x86_emulator
tools/tests/x86_emulator/x86_emulate
tools/tests/x86_emulator/xop*.[ch]
-tools/tests/xenstore/xs-test
tools/tests/vpci/list.h
tools/tests/vpci/vpci.[hc]
tools/tests/vpci/test_vpci
new file mode 100644
@@ -0,0 +1 @@
+test-xenstore
@@ -1,11 +1,7 @@
XEN_ROOT=$(CURDIR)/../../..
include $(XEN_ROOT)/tools/Rules.mk
-CFLAGS += -Werror
-
-CFLAGS += $(CFLAGS_libxenstore)
-
-TARGETS-y := xs-test
+TARGETS-y := test-xenstore
TARGETS := $(TARGETS-y)
.PHONY: all
@@ -16,14 +12,31 @@ build: $(TARGETS)
.PHONY: clean
clean:
- $(RM) *.o $(TARGETS) *~ $(DEPS_RM)
+ $(RM) -f -- *.o $(TARGETS) $(DEPS_RM)
.PHONY: distclean
distclean: clean
+ $(RM) -f -- *~
+
+.PHONY: install
+install: all
+ $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
+ $(if $(TARGETS),$(INSTALL_PROG) $(TARGETS) $(DESTDIR)$(LIBEXEC_BIN))
+
+.PHONY: uninstall
+uninstall:
+ $(RM) -f -- $(addprefix $(DESTDIR)$(LIBEXEC_BIN)/,$(TARGETS))
+
+CFLAGS += -Werror
+CFLAGS += $(CFLAGS_libxenstore)
+CFLAGS += $(APPEND_CFLAGS)
+
+LDFLAGS += $(LDLIBS_libxenstore)
+LDFLAGS += $(APPEND_LDFLAGS)
-xs-test: xs-test.o Makefile
- $(CC) -o $@ $< $(LDFLAGS) $(LDLIBS_libxenstore)
+%.o: Makefile
-install uninstall:
+test-xenstore: test-xenstore.o
+ $(CC) -o $@ $< $(LDFLAGS)
-include $(DEPS_INCLUDE)
similarity index 100%
rename from tools/tests/xenstore/xs-test.c
rename to tools/tests/xenstore/test-xenstore.c
In particular, fill in the install/uninstall rules so this test can be packaged to be automated sensibly. Rename xs-test to test-xenstore to be consistent with other tests. Honour APPEND_FLAGS too. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> --- CC: Ian Jackson <iwj@xenproject.org> CC: Wei Liu <wl@xen.org> CC: Jan Beulich <JBeulich@suse.com> CC: Roger Pau Monné <roger.pau@citrix.com> CC: Juergen Gross <jgross@suse.com> --- .gitignore | 1 - tools/tests/xenstore/.gitignore | 1 + tools/tests/xenstore/Makefile | 31 +++++++++++++++------- .../tests/xenstore/{xs-test.c => test-xenstore.c} | 0 4 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 tools/tests/xenstore/.gitignore rename tools/tests/xenstore/{xs-test.c => test-xenstore.c} (100%)