[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[XEN PATCH v4 08/32] tools/xentrace: rework Makefile
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Date: Thu, 11 Aug 2022 17:48:21 +0100
- Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Thu, 11 Aug 2022 16:59:38 +0000
- Ironport-data: A9a23:+APeZa2eRjgzzysAofbDix16xWv30HFdZTh5Nfl8DyL0cXcT1ZMr2eOEzzPWbIdy115diuC4uy+r1PHeSnFXDSeApxFbC0K+UO0llYYYIyPPm3mvWNhM752KLcE10Xgsmn+BdeF2TUlQWDDXdGdLsPJl70DStNd3SJQQMJsrO6ZHMP1habBC69VLLYUeGSf9fxq9A4sLxtays0wk3y02Bs8wYi5wUF8fGz5zlAsC4OW6VfDCyOw8TBBwhtP+5cGQpdyuU/RB3doDp3ho+guZRmMBvVJ6n0z089wSytH0P61rbwkrxjPdIt3Pm9JRGw0V8Qw1wKbZ5FLq9nKtvM2Dhn+UVr7g/Rn9e0HFVZ4pKT7rou+gW751+ROouShen9WzBar93k/T43PFxR3GRPcg0wzbXEUxyLna3VRgD7cAKbAHYWdDEynUHTKgGYIpmnj8wc7RD18RyZSJXVuPd8qAw43AhoEVfjh/9269ak/fbthJbh1TRefvldBwOitC+J7T79oqZhRauPvcTaDv5gFMGrlurpZ06IquN+r9krn6vNvOlq1sc0GnCEMeM49ywTrdtuSj1FiWQa5h1R4E+0k/KnQh59QAtIUOkFYZroKcKHWsGfYcfbZe1duif6gQdS7H9tSCxcxiJPxc9cTA7+JZ+QCpWveTGo0uNe0h5dCNRlRFL624s2FAdZvWX4y/comGe5RClZhfG7QOmDBDIzuIWc8rsqKLohIXrfhKlnjcZi4oIwZ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Vtl7nIKmldCl8M9uF5mM4xs4xpgkZEe0LkscwoOC/9csGfOl6IhmX5wr5sIKu6Sp7mEZXXd90Ari9OwwueEqLeLwt0fJUomgZeO4cWWoMedbLLvYRvUV+UWBGq5++fsNlcdJK2imlyHqWYFbjtKnH+//DnNDGD1HZOA/wRyfkJ2brkPsn5Q0ztLOB1u3Xf2FKsZpgHHbn5hEDL4hRM4c4rAMr1g+qGXM11rwCrkJ5h3B3W+XYBwl7DwBQgMU9KAgvkwBdV7uWUPF/OdHuuB8K2iXlpPMJphu+3+BhCUktNVdbxXBKPsF+Ne2e/4A7HsAMgH9e/O9HeRePaJ1zm9Ltaah/gFIQLXA4zImuCI5RvdVg1oSgFlzmoTk8Iqw6hAWfItM1ok8pSJ8DdlN2qlxWVZQ/0zM956RLg3CofzJdbKoQzb3P/iYoyiNTbiFUY7WP4ehkGe4Koz/sfoV3hG++Utd0caI0AOa6pAOJtAge3L7o/zo9l7HClxNpeNFrqZaP06pphEmQi1ht9Yghglv/TZYmwZDkpyvBKlz4R3bvpwdIlwa7ryWHGHIkru4LhHYNAAdeyYkqZ3q0qZMn/Cp8S+Sgg/Db12JhQO1bIRH0ea8nWLShaI9BthIVK1YR2IBORshAEU3qn6h/VXimYD1tPCFsTbsfK+KmWdH7voCEBa9lI7Nuc9CGDcgfnAGZkPMUjild5qD0ChF8h2ezCXvvzn3Qr4ZNa93YSVtyjSzq1YBESQ3aMc2Sa3+y8y4jltJwwU22uf2ue0OoXYZWODnX4mb
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Remove "build" targets.
Use "$(TARGETS)" to list binary to be built.
Cleanup "clean" rule.
Also drop conditional install of $(BIN) and $(LIBBIN) as those two
variables are now always populated.
Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
Notes:
v4:
- also use := for BIN, SBIN, LIBBIN, SCRIPTS
v2:
- fix typo in title
- drop conditional install of $(BIN) and $(LIBBIN)
tools/xentrace/Makefile | 27 +++++++++++----------------
1 file changed, 11 insertions(+), 16 deletions(-)
diff --git a/tools/xentrace/Makefile b/tools/xentrace/Makefile
index 9fb7fc96e7..63f2f6532d 100644
--- a/tools/xentrace/Makefile
+++ b/tools/xentrace/Makefile
@@ -9,41 +9,36 @@ LDLIBS += $(LDLIBS_libxenevtchn)
LDLIBS += $(LDLIBS_libxenctrl)
LDLIBS += $(ARGP_LDFLAGS)
-BIN = xenalyze
-SBIN = xentrace xentrace_setsize
-LIBBIN = xenctx
-SCRIPTS = xentrace_format
+BIN := xenalyze
+SBIN := xentrace xentrace_setsize
+LIBBIN := xenctx
+SCRIPTS := xentrace_format
-.PHONY: all
-all: build
+TARGETS := $(BIN) $(SBIN) $(LIBBIN)
-.PHONY: build
-build: $(BIN) $(SBIN) $(LIBBIN)
+.PHONY: all
+all: $(TARGETS)
.PHONY: install
-install: build
+install: all
$(INSTALL_DIR) $(DESTDIR)$(bindir)
$(INSTALL_DIR) $(DESTDIR)$(sbindir)
- [ -z "$(LIBBIN)" ] || $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
-ifneq ($(BIN),)
+ $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
$(INSTALL_PROG) $(BIN) $(DESTDIR)$(bindir)
-endif
$(INSTALL_PROG) $(SBIN) $(DESTDIR)$(sbindir)
$(INSTALL_PYTHON_PROG) $(SCRIPTS) $(DESTDIR)$(bindir)
- [ -z "$(LIBBIN)" ] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(LIBEXEC_BIN)
+ $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(LIBEXEC_BIN)
.PHONY: uninstall
uninstall:
rm -f $(addprefix $(DESTDIR)$(LIBEXEC_BIN)/, $(LIBBIN))
rm -f $(addprefix $(DESTDIR)$(bindir)/, $(SCRIPTS))
rm -f $(addprefix $(DESTDIR)$(sbindir)/, $(SBIN))
-ifneq ($(BIN),)
rm -f $(addprefix $(DESTDIR)$(bindir)/, $(BIN))
-endif
.PHONY: clean
clean:
- $(RM) *.a *.so *.o *.rpm $(BIN) $(SBIN) $(LIBBIN) $(DEPS_RM)
+ $(RM) *.o $(TARGETS) $(DEPS_RM)
.PHONY: distclean
distclean: clean
--
Anthony PERARD
|