[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[XEN PATCH 37/57] tools/xentop: rework makefile
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Date: Mon, 6 Dec 2021 17:02:20 +0000
- Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- Cc: Anthony PERARD <anthony.perard@xxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Mon, 06 Dec 2021 17:07:47 +0000
- Ironport-data: A9a23:+sF+Z6Oe3UH/4cnvrR1DkMFynXyQoLVcMsEvi/4bfWQNrUon0jEGn WQXXT2BOPnbYzH8ed1xPoXj9UtXuMPdnN9rGgto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdpJYz/uUGuCJQUNUjMlkfZKhTr6bUsxNbVU8En5400o9w7RRbrNA2rBVPSvc4 bsenOWHULOV82Yc3rU8sv/rRLtH5ZweiRtA1rAMTakjUGz2zhH5OKk3N6CpR0YUd6EPdgKMq 0Qv+5nilo/R109F5tpICd8XeGVSKlLZFVDmZna7x8FOK/WNz8A/+v9TCRYSVatYo2Wrg9l7w ttzjrjucAEkb/KPkbVaSgYNRkmSPYUekFPGCX22sMjVxEzaaXr8hf5pCSnaP6VBpLwxWzsXs 6VFdnZdNXhvhMrvqF6/YuBqmsQkKtitJI4Fs2ts5TrYEewnUdbIRKCiCdpwgm5s3JgRTae2i 8wxYCFyVSjmXQV0H3wuKo4inb6ln2X2bGgNwL6SjfVuuDWCpOBr65DsL9j9atGMXd9SnEuTu iTB5WuRKg4eHMySz3yC6H3Erv/Cm2b3VZwfEJW89+V2mxuDy2oLEhoUWFCn5/6jhSaWUtRDK 0sS62w2oLI77kCDQdz0Xhn+q3mB1iPwQPIJTbd8slvUjPOJvUDJXQDoUwKtdvR2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xQo+W6zA==
- Ironport-sdr: PMFEPc+L8bkSjMM1BsImfIQ/8HRwMqQdH5O+591xy3I2KyxaSv59Y3B/fEAZqVJOsHufkVvtZo 9IxObt2WtsY2qFYZ6TZYMhI5sHUZzuX+S3Zy3CIE03FdM6MPUIsoPDEgDSWLqeg/f5Mh3yArCm qKe67eEpZ9DvkE4VMU8RvC+vDdSUQ6p2byrW/k7qUAvRHrA++PPfN3y5tNMGVwQanE0iAQdnAA UH7sL84CMfG9fASDgSrsyrB22fLgkPh750njAnvHRlpewf7hb+9bbjQdIObYEiv4s1SXvAnOt1 6ZHC1rebJ9FUWTJF6Ahiod54
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Add "xentop" to "TARGETS" because this variable will be useful later.
Always define all the targets, even when configured with
--disable-monitor, instead don't visit the subdirectory.
This mean xentop/ isn't visited anymore during "make clean" that's how
most other subdirs in the tools/ works.
Also add missing "xentop" rules. 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.
Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
tools/Makefile | 2 +-
tools/xentop/Makefile | 19 ++++++++-----------
2 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/tools/Makefile b/tools/Makefile
index 79b4c7e3de..0c1d8b64a4 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -17,7 +17,7 @@ SUBDIRS-$(CONFIG_XCUTILS) += xcutils
SUBDIRS-$(CONFIG_X86) += firmware
SUBDIRS-y += console
SUBDIRS-y += xenmon
-SUBDIRS-y += xentop
+SUBDIRS-$(XENSTAT_XENTOP) += xentop
SUBDIRS-y += libfsimage
SUBDIRS-$(CONFIG_Linux) += vchan
diff --git a/tools/xentop/Makefile b/tools/xentop/Makefile
index 0034114684..1e52b29b37 100644
--- a/tools/xentop/Makefile
+++ b/tools/xentop/Makefile
@@ -13,24 +13,23 @@
XEN_ROOT=$(CURDIR)/../..
include $(XEN_ROOT)/tools/Rules.mk
-ifneq ($(XENSTAT_XENTOP),y)
-.PHONY: all install xentop uninstall
-all install xentop uninstall:
-else
-
CFLAGS += -DGCC_PRINTF -Werror $(CFLAGS_libxenstat)
LDLIBS += $(LDLIBS_libxenstat) $(CURSES_LIBS) $(TINFO_LIBS) $(SOCKET_LIBS) -lm
CFLAGS += -DHOST_$(XEN_OS)
# Include configure output (config.h)
CFLAGS += -include $(XEN_ROOT)/tools/config.h
-LDFLAGS += $(APPEND_LDFLAGS)
+
+TARGETS := xentop
.PHONY: all
-all: xentop
+all: $(TARGETS)
+
+xentop: xentop.o
+ $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS) $(APPEND_LDFLAGS)
.PHONY: install
-install: xentop
+install: all
$(INSTALL_DIR) $(DESTDIR)$(sbindir)
$(INSTALL_PROG) xentop $(DESTDIR)$(sbindir)/xentop
@@ -38,11 +37,9 @@ install: xentop
uninstall:
rm -f $(DESTDIR)$(sbindir)/xentop
-endif
-
.PHONY: clean
clean:
- rm -f xentop xentop.o $(DEPS_RM)
+ rm -f $(TARGETS) xentop.o $(DEPS_RM)
.PHONY: distclean
distclean: clean
--
Anthony PERARD
|