diff mbox series

[XEN,38/57] tools/xenstrace: rework Makefile

Message ID 20211206170241.13165-39-anthony.perard@citrix.com (mailing list archive)
State New, archived
Headers show
Series Toolstack build system improvement, toward non-recursive makefiles | expand

Commit Message

Anthony PERARD Dec. 6, 2021, 5:02 p.m. UTC
Remove "build" targets.

Use "$(TARGETS)" to list binary to be built.

Cleanup "clean" rule.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 tools/xentrace/Makefile | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

Comments

Andrew Cooper Dec. 16, 2021, 6:38 p.m. UTC | #1
On 06/12/2021 17:02, Anthony PERARD wrote:
>  .PHONY: install
> -install: build
> +install: all
>  	$(INSTALL_DIR) $(DESTDIR)$(bindir)
>  	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
>  	[ -z "$(LIBBIN)" ] || $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)

Doesn't this conditional mkdir want to be dropped?

~Andrew
diff mbox series

Patch

diff --git a/tools/xentrace/Makefile b/tools/xentrace/Makefile
index 9fb7fc96e7..2b166335dc 100644
--- a/tools/xentrace/Makefile
+++ b/tools/xentrace/Makefile
@@ -14,14 +14,13 @@  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)
@@ -43,7 +42,7 @@  endif
 
 .PHONY: clean
 clean:
-	$(RM) *.a *.so *.o *.rpm $(BIN) $(SBIN) $(LIBBIN) $(DEPS_RM)
+	$(RM) *.o $(TARGETS) $(DEPS_RM)
 
 .PHONY: distclean
 distclean: clean