mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools/xentrace: rework Makefile
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@citrix.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> Release-acked-by: Henry Wang <Henry.Wang@arm.com>
This commit is contained in:
1 parent
3a206abcd7
commit
a2e8156ba4
1 file changed
+11
-16
+11
-16
@@ -9,41 +9,36 @@ LDLIBS += $(LDLIBS_libxenevtchn)
|
|||||||
LDLIBS += $(LDLIBS_libxenctrl)
|
LDLIBS += $(LDLIBS_libxenctrl)
|
||||||
LDLIBS += $(ARGP_LDFLAGS)
|
LDLIBS += $(ARGP_LDFLAGS)
|
||||||
|
|
||||||
BIN = xenalyze
|
BIN := xenalyze
|
||||||
SBIN = xentrace xentrace_setsize
|
SBIN := xentrace xentrace_setsize
|
||||||
LIBBIN = xenctx
|
LIBBIN := xenctx
|
||||||
SCRIPTS = xentrace_format
|
SCRIPTS := xentrace_format
|
||||||
|
|
||||||
|
TARGETS := $(BIN) $(SBIN) $(LIBBIN)
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: build
|
all: $(TARGETS)
|
||||||
|
|
||||||
.PHONY: build
|
|
||||||
build: $(BIN) $(SBIN) $(LIBBIN)
|
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install: build
|
install: all
|
||||||
$(INSTALL_DIR) $(DESTDIR)$(bindir)
|
$(INSTALL_DIR) $(DESTDIR)$(bindir)
|
||||||
$(INSTALL_DIR) $(DESTDIR)$(sbindir)
|
$(INSTALL_DIR) $(DESTDIR)$(sbindir)
|
||||||
[ -z "$(LIBBIN)" ] || $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
|
$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
|
||||||
ifneq ($(BIN),)
|
|
||||||
$(INSTALL_PROG) $(BIN) $(DESTDIR)$(bindir)
|
$(INSTALL_PROG) $(BIN) $(DESTDIR)$(bindir)
|
||||||
endif
|
|
||||||
$(INSTALL_PROG) $(SBIN) $(DESTDIR)$(sbindir)
|
$(INSTALL_PROG) $(SBIN) $(DESTDIR)$(sbindir)
|
||||||
$(INSTALL_PYTHON_PROG) $(SCRIPTS) $(DESTDIR)$(bindir)
|
$(INSTALL_PYTHON_PROG) $(SCRIPTS) $(DESTDIR)$(bindir)
|
||||||
[ -z "$(LIBBIN)" ] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(LIBEXEC_BIN)
|
$(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(LIBEXEC_BIN)
|
||||||
|
|
||||||
.PHONY: uninstall
|
.PHONY: uninstall
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f $(addprefix $(DESTDIR)$(LIBEXEC_BIN)/, $(LIBBIN))
|
rm -f $(addprefix $(DESTDIR)$(LIBEXEC_BIN)/, $(LIBBIN))
|
||||||
rm -f $(addprefix $(DESTDIR)$(bindir)/, $(SCRIPTS))
|
rm -f $(addprefix $(DESTDIR)$(bindir)/, $(SCRIPTS))
|
||||||
rm -f $(addprefix $(DESTDIR)$(sbindir)/, $(SBIN))
|
rm -f $(addprefix $(DESTDIR)$(sbindir)/, $(SBIN))
|
||||||
ifneq ($(BIN),)
|
|
||||||
rm -f $(addprefix $(DESTDIR)$(bindir)/, $(BIN))
|
rm -f $(addprefix $(DESTDIR)$(bindir)/, $(BIN))
|
||||||
endif
|
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
$(RM) *.a *.so *.o *.rpm $(BIN) $(SBIN) $(LIBBIN) $(DEPS_RM)
|
$(RM) *.o $(TARGETS) $(DEPS_RM)
|
||||||
|
|
||||||
.PHONY: distclean
|
.PHONY: distclean
|
||||||
distclean: clean
|
distclean: clean
|
||||||
|
|||||||