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

[XEN PATCH v3 11/25] tools/xentrace: rework Makefile


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Fri, 24 Jun 2022 17:04:08 +0100
  • Authentication-results: esa3.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: Fri, 24 Jun 2022 16:08:49 +0000
  • Ironport-data: A9a23:8i+vGa/vvvkbrBPzjb/gDrUDyX6TJUtcMsCJ2f8bNWPcYEJGY0x3n TYWD2CGMveCN2v1fdknYIji8U8P756DyYAxQANl+Ho8E34SpcT7XtnIdU2Y0wF+jyHgoOCLy +1EN7Es+ehtFie0Si+Fa+Sn9T8mvU2xbuKU5NTsY0idfic5DnZ74f5fs7Rh2NQw34LlW1nlV e7a+KUzBnf0g1aYDUpMg06zgEsHUCPa4W5wUvQWPJinjXeG/5UnJMt3yZKZdhMUdrJ8DO+iL 9sv+Znilo/vE7XBPfv++lrzWhVirrc/pmFigFIOM0SpqkAqSiDfTs/XnRfTAKtao2zhojx/9 DlCnaSUdT8QIbbPo8UmcUEHPx9nH50dpLCSdBBTseTLp6HHW37lwvEoB0AqJ4wIvO1wBAmi9 9RBdmpLNErawbvrnvTrEYGAhex6RCXvFIoZpnFnyyCfFfs8SIrPa67L+cVZzHE7gcUm8fP2O JZCN2A0MkiojxtnZhQTOLcymfaUonDAehx4igikpPI4yj2GpOB2+Oe0a4eEEjCQfu1Kmm6Iq 2SA+H72ajkKOdraxTeb/3aEgu7UgTi9SI8UDKe/9PNhnBuU3GN7NfENfQLl+7/j0Bf4Ao8Bb RxPksYzkUQs3HSPcuHEQAa7m1+/nEZDd+RJMd1htA7Yn8I4/D2l6ng4oi9pMYJ76pdtGGR1h jdljPuyW2Ux7eT9pWa1s+7N8GjsYXV9wXoqP3dscOcT3zX0TGjfZDrrR80rLqO6h8ad9drYk 2HT93hWa1n+YKc2O0SHEbPv2WvESmDhFFJd2+kudjvNAvlFTICkfZe0zlPQ8OxNKo2UJnHY4 iVaw5DPtb9SVcnS/MBofAnrNOvxjxpiGG20vLKSN8N5q2TFF4CLJ+i8Hw2S1G82a51ZKFcFk WfYuB9L5Y87AUZGmZRfOtrrY+xzlPCIPY28Cpj8M4ofCrAsJVTv1Hw/OiatM5XFzRFEfVcXY szAL65BzB8yVMxa8dZBb71Mj+Z1mn9vnj27qFKS503P7IdyrUW9Ed8tWGZipMhjhE9YiG05K +piCvY=
  • Ironport-hdrordr: A9a23:YDMGN6uB8UFkI1xjn5bcU5m/7skDTtV00zEX/kB9WHVpmszxra 6TdZMgpHnJYVcqKQkdcL+7WJVoLUmxyXcx2/h1AV7AZniAhILLFvAA0WKK+VSJcEeSygce79 YFT0EXMqyIMbEQt6fHCWeDfOrIuOP3kpyVuQ==
  • 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:
    v2:
    - fix typo in title
    - drop conditional install of $(BIN) and $(LIBBIN)

 tools/xentrace/Makefile | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/tools/xentrace/Makefile b/tools/xentrace/Makefile
index 9fb7fc96e7..0995fa9203 100644
--- a/tools/xentrace/Makefile
+++ b/tools/xentrace/Makefile
@@ -14,36 +14,31 @@ 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




 


Rackspace

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