From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
"Ian Jackson" <iwj@xenproject.org>, "Wei Liu" <wl@xen.org>,
"Jan Beulich" <JBeulich@suse.com>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Juergen Gross" <jgross@suse.com>
Subject: [PATCH 2/4] tests/resource: Rework Makefile
Date: Tue, 22 Jun 2021 19:21:22 +0100 [thread overview]
Message-ID: <20210622182124.11571-3-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <20210622182124.11571-1-andrew.cooper3@citrix.com>
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, drop redundant -f's for $(RM),
and use $(TARGET) when appropriate.
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>
v2:
* Fix typo in commit message
* Drop -f's
* Use %.o rather than *.o for Make level wildcards
---
tools/tests/resource/Makefile | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/tools/tests/resource/Makefile b/tools/tests/resource/Makefile
index 4bef482966..1c3aee4ff7 100644
--- a/tools/tests/resource/Makefile
+++ b/tools/tests/resource/Makefile
@@ -12,17 +12,20 @@ run: $(TARGET)
.PHONY: clean
clean:
- $(RM) -f -- *.o $(TARGET) $(DEPS_RM)
+ $(RM) -- *.o $(TARGET) $(DEPS_RM)
.PHONY: distclean
distclean: clean
- $(RM) -f -- *~
+ $(RM) -- *~
.PHONY: install
install: all
+ $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
+ $(INSTALL_PROG) $(TARGET) $(DESTDIR)$(LIBEXEC_BIN)
.PHONY: uninstall
uninstall:
+ $(RM) -- $(DESTDIR)$(LIBEXEC_BIN)/$(TARGET)
CFLAGS += -Werror
CFLAGS += $(CFLAGS_xeninclude)
@@ -34,7 +37,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
next prev parent reply other threads:[~2021-06-22 18:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-22 18:21 [PATCH v2 0/4] tools/tests: More cleanup for automation improvements Andrew Cooper
2021-06-22 18:21 ` [PATCH 1/4] tools/tests: Drop obsolete mce-test infrastructure Andrew Cooper
2021-06-22 18:21 ` Andrew Cooper [this message]
2021-06-28 12:42 ` [PATCH 2/4] tests/resource: Rework Makefile Jan Beulich
2021-06-22 18:21 ` [PATCH 3/4] tests/cpu-policy: " Andrew Cooper
2021-06-28 12:47 ` Jan Beulich
2021-06-22 18:21 ` [PATCH 4/4] tests/xenstore: " Andrew Cooper
2021-06-28 12:52 ` Jan Beulich
2021-06-28 12:59 ` [PATCH v2 0/4] tools/tests: More cleanup for automation improvements Jan Beulich
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=20210622182124.11571-3-andrew.cooper3@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=iwj@xenproject.org \
--cc=jgross@suse.com \
--cc=roger.pau@citrix.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).