[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/5] tests/resource: Rework Makefile


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Tue, 15 Jun 2021 17:19:03 +0100
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Tue, 15 Jun 2021 16:25:06 +0000
  • Ironport-hdrordr: A9a23:3GXDyaoys+EsuLjbOmgImPgaV5rdeYIsimQD101hICG9Evb0qy lhppQmPH7P+VAssRQb8+xoV5PufZqxz/BICMwqTNWftWrdyQyVxeNZnOjfKlTbckWTygce79 YET0EXMrbN5DNB/KLHCWeDcurJwLO8gd+VbeW19QYScem9AZsQnjuQCWygYz1LrBEtP+tBKH IFjPA32gZJfx4sH7yGL0hAZcfvjfvRmqnrZBYXbiRXlDVn3VuTmcXH+wHz5GZlbw9y
  • Ironport-sdr: cOMLRAZrh4TGYSiccUyZQmJRNeWGCWYTmomE3MYu4tnO/LwNnPFF2qUij/6iSskp0Njvqjrpxr tVLih9Ta5IB/lzBw5jIcBGvdTIj+CjDbzJ0HtlihjFvQlISDn1oPhzA1yzX3A+9M0cu7OGShL+ Vw02kCSflV/jqU731ySCU+bSt05jJUZp7lodESMtC6jGVHe1OxAeQeocl5UZhBpv0RWqwnE2bD 8bvEOSmYeSkUBVk5SJ0R3aL9+QqDAzf3OU/Y4dagUmseijWHxQib8JfFuqtjhPr7fqT84EgbVh Bss=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

In particular, fill in the install/uninstall rules so this test can be
packaged to be automated sensibly.

Make all object files depend on the Makefile, and us $(TARGET) when
appropriate.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Ian Jackson <iwj@xxxxxxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Juergen Gross <jgross@xxxxxxxx>
---
 tools/tests/resource/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/tests/resource/Makefile b/tools/tests/resource/Makefile
index da5e2a4f9b..b22eb6fc21 100644
--- a/tools/tests/resource/Makefile
+++ b/tools/tests/resource/Makefile
@@ -16,9 +16,12 @@ distclean: clean
 
 .PHONY: install
 install: all
+       $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
+       $(INSTALL_PROG) $(TARGET) $(DESTDIR)$(LIBEXEC_BIN)
 
 .PHONY: uninstall
 uninstall:
+       $(RM) -f -- $(DESTDIR)$(LIBEXEC_BIN)/$(TARGET)
 
 CFLAGS += -Werror
 CFLAGS += $(CFLAGS_xeninclude)
@@ -30,7 +33,9 @@ LDFLAGS += $(LDLIBS_libxenctrl)
 LDFLAGS += $(LDLIBS_libxenforeignmemory)
 LDFLAGS += $(APPEND_LDFLAGS)
 
-test-resource: test-resource.o
+*.o: Makefile
+
+$(TARGET): test-resource.o
        $(CC) -o $@ $< $(LDFLAGS)
 
 -include $(DEPS_INCLUDE)
-- 
2.11.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.