From patchwork Mon Dec 6 17:02:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12659017 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 91933C433EF for ; Mon, 6 Dec 2021 17:07:54 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.239493.415259 (Exim 4.92) (envelope-from ) id 1muHSs-00037f-UR; Mon, 06 Dec 2021 17:07:46 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 239493.415259; Mon, 06 Dec 2021 17:07:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1muHSr-00034S-QU; Mon, 06 Dec 2021 17:07:45 +0000 Received: by outflank-mailman (input) for mailman id 239493; Mon, 06 Dec 2021 17:07:44 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1muHPP-0005ti-0k for xen-devel@lists.xenproject.org; Mon, 06 Dec 2021 17:04:11 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 8684aff7-56b6-11ec-8a4d-196798b21f7b; Mon, 06 Dec 2021 18:04:09 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 8684aff7-56b6-11ec-8a4d-196798b21f7b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1638810249; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HYzxa9IJ0gs1g2ZQBPATfpRkikT39MPJWLs4P8HFYcY=; b=RaWmFIHpTc4H59/E6Q1dMIU1PaQZmh1v41GwfSd1VaIK4BmzwInlVtot eNSDNeaoY8jFW/bvdELpxoOnBY5ZIDbHavizOWf5S5lHuz5e26phP7jna Aaz+ncRTQBiDBLLoLi9Gs7UtHoPAOvkxNA9b1M55KOVgax7jjeqDh1nY5 c=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: PMFEPc+L8bkSjMM1BsImfIQ/8HRwMqQdH5O+591xy3I2KyxaSv59Y3B/fEAZqVJOsHufkVvtZo 9IxObt2WtsY2qFYZ6TZYMhI5sHUZzuX+S3Zy3CIE03FdM6MPUIsoPDEgDSWLqeg/f5Mh3yArCm qKe67eEpZ9DvkE4VMU8RvC+vDdSUQ6p2byrW/k7qUAvRHrA++PPfN3y5tNMGVwQanE0iAQdnAA UH7sL84CMfG9fASDgSrsyrB22fLgkPh750njAnvHRlpewf7hb+9bbjQdIObYEiv4s1SXvAnOt1 6ZHC1rebJ9FUWTJF6Ahiod54 X-SBRS: 5.1 X-MesageID: 61420789 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:+sF+Z6Oe3UH/4cnvrR1DkMFynXyQoLVcMsEvi/4bfWQNrUon0jEGn WQXXT2BOPnbYzH8ed1xPoXj9UtXuMPdnN9rGgto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdpJYz/uUGuCJQUNUjMlkfZKhTr6bUsxNbVU8En5400o9w7RRbrNA2rBVPSvc4 bsenOWHULOV82Yc3rU8sv/rRLtH5Z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+OOvKixl+8p1YHn+d2UxeaK9VfYhy0ooNrNzbwnrk8JMRVcUfPwT6T1 gC3BxYEpLaS/99poYeR3a3d9tWnCepzGEZeDlL317fuOHmI5HenzK9BTP2MIWLXWlTr9fjwf u5S1fz9bqEKxQ4Yr4pmHr935qsi/N+z9aRCxwFpEXiXPVSmDrRsfiuP0cVV7/Afw7ZYvU29W 16V+8kcMrKMYZu3HFkULQsjT+KCyfBLxWWCsaVreB33tH1t4b6KcUROJB3d2iVSIYx8PJ4h3 ep86tUd7Bayi0ZyP9uL5syOG79g8pDUv30bi6wn IronPort-HdrOrdr: A9a23:Od3UPKqI97AP6oVSHMwMHv8aV5oteYIsimQD101hICG8cqSj+P xG+85rsiMc6QxhIU3I9urgBEDtex7hHNtOkOss1NSZLW3bUQmTTL2KhLGKq1aLJ8S9zJ856U 4JSdkZNDSaNzZHZKjBjDVQa+xQo+W6zA== X-IronPort-AV: E=Sophos;i="5.87,292,1631592000"; d="scan'208";a="61420789" From: Anthony PERARD To: CC: Anthony PERARD , Anthony PERARD , Ian Jackson , Wei Liu Subject: [XEN PATCH 37/57] tools/xentop: rework makefile Date: Mon, 6 Dec 2021 17:02:20 +0000 Message-ID: <20211206170241.13165-38-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211206170241.13165-1-anthony.perard@citrix.com> References: <20211206170241.13165-1-anthony.perard@citrix.com> MIME-Version: 1.0 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 --- 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