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

[xen master] tools/xcutils: rework Makefile



commit 0ac694803c0327ab31eda0c26a646c6227f2a394
Author:     Anthony PERARD <anthony.perard@xxxxxxxxxx>
AuthorDate: Mon Dec 6 17:02:17 2021 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Thu Dec 16 20:27:13 2021 +0000

    tools/xcutils: rework Makefile
    
    Use TARGETS to collect targets to build
    
    Remove "build" target.
    
    Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    [Clean up $(RM)]
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 tools/xcutils/Makefile | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/tools/xcutils/Makefile b/tools/xcutils/Makefile
index 82d42624c8..e40a2c4bfa 100644
--- a/tools/xcutils/Makefile
+++ b/tools/xcutils/Makefile
@@ -11,7 +11,7 @@
 XEN_ROOT       = $(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-PROGRAMS = readnotes lsevtchn
+TARGETS := readnotes lsevtchn
 
 CFLAGS += -Werror
 
@@ -19,10 +19,7 @@ CFLAGS_readnotes.o  := $(CFLAGS_libxenevtchn) 
$(CFLAGS_libxenctrl) $(CFLAGS_libx
 CFLAGS_lsevtchn.o   := $(CFLAGS_libxenevtchn) $(CFLAGS_libxenctrl)
 
 .PHONY: all
-all: build
-
-.PHONY: build
-build: $(PROGRAMS)
+all: $(TARGETS)
 
 readnotes: readnotes.o
        $(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) 
$(APPEND_LDFLAGS)
@@ -31,18 +28,17 @@ lsevtchn: lsevtchn.o
        $(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
 
 .PHONY: install
-install: build
+install: all
        $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
-       $(INSTALL_PROG) $(PROGRAMS) $(DESTDIR)$(LIBEXEC_BIN)
+       $(INSTALL_PROG) $(TARGETS) $(DESTDIR)$(LIBEXEC_BIN)
 
 .PHONY: uninstall
 uninstall:
-       rm -f $(addprefix $(DESTDIR)$(LIBEXECDIR)/, $(PROGRAMS))
+       $(RM) $(addprefix $(DESTDIR)$(LIBEXECDIR)/, $(TARGETS))
 
 .PHONY: clean
 clean:
-       $(RM) *.o $(PROGRAMS)
-       $(RM) $(DEPS_RM)
+       $(RM) *.o $(TARGETS) $(DEPS_RM)
 
 .PHONY: distclean
 distclean: clean
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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