diff mbox series

[XEN,32/57] tools/misc: rework Makefile

Message ID 20211206170241.13165-33-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
Add missing "xen-detect" rule. It only works without it because we
still have make's built-ins rules and variables, but fix this to not
have to rely on them.

Rename $(TARGETS_BUILD) to $(TARGETS).

Remove the unused "build" target.

Also, they are no more "build-only" targets, remove the extra code.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 tools/misc/Makefile | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/tools/misc/Makefile b/tools/misc/Makefile
index 8b9558b93f..5e7787e501 100644
--- a/tools/misc/Makefile
+++ b/tools/misc/Makefile
@@ -50,16 +50,13 @@  TARGETS_COPY += xencov_split
 TARGETS_COPY += xenpvnetboot
 
 # Everything which needs to be built
-TARGETS_BUILD := $(filter-out $(TARGETS_COPY),$(TARGETS_ALL))
+TARGETS := $(filter-out $(TARGETS_COPY),$(TARGETS_ALL))
 
-# ... including build-only targets
-TARGETS_BUILD += $(TARGETS_BUILD-y)
-
-.PHONY: all build
-all build: $(TARGETS_BUILD)
+.PHONY: all
+all: $(TARGETS)
 
 .PHONY: install
-install: build
+install: all
 	$(INSTALL_DIR) $(DESTDIR)$(bindir)
 	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
 	$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
@@ -75,7 +72,7 @@  uninstall:
 
 .PHONY: clean
 clean:
-	$(RM) *.o $(TARGETS_BUILD) *~ $(DEPS_RM)
+	$(RM) *.o $(TARGETS) *~ $(DEPS_RM)
 
 .PHONY: distclean
 distclean: clean
@@ -86,6 +83,9 @@  xen-access: xen-access.o
 xen-cpuid: xen-cpuid.o
 	$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(APPEND_LDFLAGS)
 
+xen-detect: xen-detect.o
+	$(CC) $(LDFLAGS) -o $@ $< $(APPEND_LDFLAGS)
+
 xen-hvmctx: xen-hvmctx.o
 	$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)