From patchwork Fri Feb 25 15:12:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760459 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 E8937C433F5 for ; Fri, 25 Feb 2022 15:14:04 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279185.476836 (Exim 4.92) (envelope-from ) id 1nNcI6-0000Qu-5d; Fri, 25 Feb 2022 15:13:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279185.476836; Fri, 25 Feb 2022 15:13:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcI5-0000PF-Vk; Fri, 25 Feb 2022 15:13:53 +0000 Received: by outflank-mailman (input) for mailman id 279185; Fri, 25 Feb 2022 15:13:52 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcI4-0007Bf-2j for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:13:52 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 8968535d-964d-11ec-8eb9-a37418f5ba1a; Fri, 25 Feb 2022 16:13:50 +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: 8968535d-964d-11ec-8eb9-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802030; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zZhTh/NI1Yuo6FeFerl0nTlpsDly6vffYs1vsJ0qtn8=; b=aNwn2hPOOo8rCn+DADJTplPCfoLaC2fVIxWXI8Oz+F4HfWcNSXaY/3mJ B9aPzqou5Qserh+H7d+g5xfm9ed7IZZ0VUa2Dm9DYUgb6QNyPofBn6vfo bzn9pVT8pzLVQb5MriMB8/njmQKh+di5wpvri8sE6fkysNoka2puEmI/K E=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 65407506 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:tVQdDamiqXC3S5Q7x/B7+vDo5gyuJkRdPkR7XQ2eYbSJt1+Wr1Gzt xJOUGvXM/qLZDGnft8ga43n9k8Bu8XXyd5hTQs4rCw8QyMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BCpC48T8kk/vgqoPUUIYoAAgoLeNfYHpn2EoLd9IR2NYy24DjWV7V4 7senuWEULOb828sWo4rw/rrRCNH5JwebxtB4zTSzdgS1LPvvyF94KA3fMldHFOhKmVgJcaoR v6r8V2M1jixEyHBqD+Suu2TnkUiGtY+NOUV45Zcc/DKbhNq/kTe3kunXRa1hIg+ZzihxrhMJ NtxWZOYVQhwLIPmo9skFABcDHtXOrFF17bgGC3q2SCT5xWun3rExvxvCAc9PJEC+/YxCmZLn RAaAGlTNFbZ3bvwme/lDLk37iggBJCD0Ic3s3d8zTbfHLA+TIrKWani7t5ExjYgwMtJGJ4yY uJHNGY3M0mYPXWjPH80J6w3n/6on0DeYmECkn+2ubEe/WfcmVkZPL/Fb4OOJ43iqd9utl2Du mvM8mD9AxcbHN+S0zyI9jSrnOCntTz/cJIfEvu/7PECqF+Owm0eDjUGWF39puO24mauVtQaJ 0EK9y4Gqakp6FftXtT7Rwe/onOPolgbQdU4O+8w5RyJy6HUyx2EHWVCRTlEAOHKr+dvG2Zsj AXQ2Yq0W3o/69V5VE5x6J+IomqgFwIuElZFfCsbFyIC/9rMqaYK20enoslYLIa5idj8GDfVy j+MrTQji7h7sfPnx5lX7nic3Wvy+8Ghohodo1yOAzn7tl8RiJuNOtTwgWU3+8qsO2pworOpm HEf0/aT4+kVZX1mvHzcGb5ddF1FChvsDdE9vbKNN8Vwn9hO0yT6FWy13N2YDB04WirjUWW0C HI/QSsLuPdu0IKCNMebmb6ZBcUw1rTHHt/4TP3SZdcmSsEvKFLYoHgyOBbIhziFfK0QfUcXY 8bznSGEVytyNEia5GDuG7d1PUEDnEjSOl8/tbiklk/6gNJylVaeSKsfMUvmUwzKxPjsnekhy P4Gb5Hi40wGCIXWO3CLmaZOfQFiBSVqXvje9p0IHtNv1yI7QQnN/deKmuh/E2Gk9owI/tr1E oaVARcJmAKi3iSccW1nqBlLMdvSYHq2llpjVQREALpi8yN7CWpzxM/zr6cKQIQ= IronPort-HdrOrdr: A9a23:DyULwKsQkEoUWCayie0TaNFu7skDcNV00zEX/kB9WHVpmszxra +TdZMgpHjJYVcqKQgdcL+7WZVoLUmwyXcx2/hyAV7AZniDhILLFuFfBOLZqlWKcREWtNQtsJ uIG5IObuEYZmIVsS+V2mWF+q4bsbq6zJw= X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="65407506" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu Subject: [XEN PATCH v2 01/29] tools/console: have one Makefile per program/directory Date: Fri, 25 Feb 2022 15:12:53 +0000 Message-ID: <20220225151321.44126-2-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 Sources of both xenconsoled and xenconsole are already separated into different directory and don't share anything in common. Having two different Makefile means it's easier to deal with *FLAGS. Some common changes: Rename $(BIN) to $(TARGETS), this will be useful later. Stop removing *.so *.rpm *.a as they aren't created here. Use $(OBJS-y) to list objects. Update $(CFLAGS) for the directory rather than a single object. daemon: Remove the need for $(LDLIBS_xenconsoled), use $(LDLIBS) instead. Remove the need for $(CONSOLE_CFLAGS-y) and use $(CFLAGS-y) instead. client: Remove the unused $(LDLIBS_xenconsole) Signed-off-by: Anthony PERARD --- Notes: v2: - create per-directory .gitignore tools/console/Makefile | 49 ++------------------------------ tools/console/client/Makefile | 39 +++++++++++++++++++++++++ tools/console/daemon/Makefile | 50 +++++++++++++++++++++++++++++++++ .gitignore | 2 -- tools/console/client/.gitignore | 1 + tools/console/daemon/.gitignore | 1 + 6 files changed, 94 insertions(+), 48 deletions(-) create mode 100644 tools/console/client/Makefile create mode 100644 tools/console/daemon/Makefile create mode 100644 tools/console/client/.gitignore create mode 100644 tools/console/daemon/.gitignore diff --git a/tools/console/Makefile b/tools/console/Makefile index 207c04c9cd..63bd2ac302 100644 --- a/tools/console/Makefile +++ b/tools/console/Makefile @@ -1,50 +1,7 @@ XEN_ROOT=$(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror +SUBDIRS-y := daemon client -CFLAGS += $(CFLAGS_libxenctrl) -CFLAGS += $(CFLAGS_libxenstore) -LDLIBS += $(LDLIBS_libxenctrl) -LDLIBS += $(LDLIBS_libxenstore) -LDLIBS += $(SOCKET_LIBS) - -LDLIBS_xenconsoled += $(UTIL_LIBS) -LDLIBS_xenconsoled += -lrt -CONSOLE_CFLAGS-$(CONFIG_ARM) = -DCONFIG_ARM - -BIN = xenconsoled xenconsole - -.PHONY: all -all: $(BIN) - -.PHONY: clean -clean: - $(RM) *.a *.so *.o *.rpm $(BIN) $(DEPS_RM) - $(RM) client/*.o daemon/*.o - -.PHONY: distclean -distclean: clean - -daemon/main.o: CFLAGS += -include $(XEN_ROOT)/tools/config.h -daemon/io.o: CFLAGS += $(CFLAGS_libxenevtchn) $(CFLAGS_libxengnttab) $(CFLAGS_libxenforeignmemory) $(CONSOLE_CFLAGS-y) -xenconsoled: $(patsubst %.c,%.o,$(wildcard daemon/*.c)) - $(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS) $(LDLIBS_libxenevtchn) $(LDLIBS_libxengnttab) $(LDLIBS_libxenforeignmemory) $(LDLIBS_xenconsoled) $(APPEND_LDFLAGS) - -client/main.o: CFLAGS += -include $(XEN_ROOT)/tools/config.h -xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c)) - $(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS) $(LDLIBS_xenconsole) $(APPEND_LDFLAGS) - -.PHONY: install -install: $(BIN) - $(INSTALL_DIR) $(DESTDIR)/$(sbindir) - $(INSTALL_PROG) xenconsoled $(DESTDIR)/$(sbindir) - $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) - $(INSTALL_PROG) xenconsole $(DESTDIR)$(LIBEXEC_BIN) - -.PHONY: uninstall -uninstall: - rm -f $(DESTDIR)$(LIBEXEC_BIN)/xenconsole - rm -f $(DESTDIR)$(sbindir)/xenconsoled - --include $(DEPS_INCLUDE) +.PHONY: all clean install distclean uninstall +all clean install distclean uninstall: %: subdirs-% diff --git a/tools/console/client/Makefile b/tools/console/client/Makefile new file mode 100644 index 0000000000..44176c6d93 --- /dev/null +++ b/tools/console/client/Makefile @@ -0,0 +1,39 @@ +XEN_ROOT=$(CURDIR)/../../.. +include $(XEN_ROOT)/tools/Rules.mk + +CFLAGS += -Werror +CFLAGS += $(CFLAGS_libxenctrl) +CFLAGS += $(CFLAGS_libxenstore) +CFLAGS += -include $(XEN_ROOT)/tools/config.h + +LDLIBS += $(LDLIBS_libxenctrl) +LDLIBS += $(LDLIBS_libxenstore) +LDLIBS += $(SOCKET_LIBS) + +OBJS-y := main.o + +TARGETS := xenconsole + +.PHONY: all +all: $(TARGETS) + +xenconsole: $(OBJS-y) + $(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS) $(APPEND_LDFLAGS) + +.PHONY: install +install: all + $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) + $(INSTALL_PROG) xenconsole $(DESTDIR)$(LIBEXEC_BIN) + +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(LIBEXEC_BIN)/xenconsole + +.PHONY: clean +clean: + $(RM) *.o $(TARGETS) $(DEPS_RM) + +.PHONY: distclean +distclean: clean + +-include $(DEPS_INCLUDE) diff --git a/tools/console/daemon/Makefile b/tools/console/daemon/Makefile new file mode 100644 index 0000000000..0f004f0b14 --- /dev/null +++ b/tools/console/daemon/Makefile @@ -0,0 +1,50 @@ +XEN_ROOT=$(CURDIR)/../../.. +include $(XEN_ROOT)/tools/Rules.mk + +CFLAGS += -Werror +CFLAGS += $(CFLAGS_libxenctrl) +CFLAGS += $(CFLAGS_libxenstore) +CFLAGS += $(CFLAGS_libxenevtchn) +CFLAGS += $(CFLAGS_libxengnttab) +CFLAGS += $(CFLAGS_libxenforeignmemory) +CFLAGS-$(CONFIG_ARM) += -DCONFIG_ARM +CFLAGS += -include $(XEN_ROOT)/tools/config.h + +LDLIBS += $(LDLIBS_libxenctrl) +LDLIBS += $(LDLIBS_libxenstore) +LDLIBS += $(LDLIBS_libxenevtchn) +LDLIBS += $(LDLIBS_libxengnttab) +LDLIBS += $(LDLIBS_libxenforeignmemory) +LDLIBS += $(SOCKET_LIBS) +LDLIBS += $(UTIL_LIBS) +LDLIBS += -lrt + +OBJS-y := main.o +OBJS-y += io.o +OBJS-y += utils.o + +TARGETS := xenconsoled + +.PHONY: all +all: $(TARGETS) + +xenconsoled: $(OBJS-y) + $(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS) $(APPEND_LDFLAGS) + +.PHONY: install +install: all + $(INSTALL_DIR) $(DESTDIR)/$(sbindir) + $(INSTALL_PROG) xenconsoled $(DESTDIR)/$(sbindir) + +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(sbindir)/xenconsoled + +.PHONY: clean +clean: + $(RM) *.o $(TARGETS) $(DEPS_RM) + +.PHONY: distclean +distclean: clean + +-include $(DEPS_INCLUDE) diff --git a/.gitignore b/.gitignore index d425be4bd9..4e2a850f94 100644 --- a/.gitignore +++ b/.gitignore @@ -159,8 +159,6 @@ tools/libs/util/libxenutil.map tools/libs/vchan/headers.chk tools/libs/vchan/libxenvchan.map tools/libs/vchan/xenvchan.pc -tools/console/xenconsole -tools/console/xenconsoled tools/debugger/gdb/gdb-6.2.1-linux-i386-xen/* tools/debugger/gdb/gdb-6.2.1/* tools/debugger/gdb/gdb-6.2.1.tar.bz2 diff --git a/tools/console/client/.gitignore b/tools/console/client/.gitignore new file mode 100644 index 0000000000..b096a1d841 --- /dev/null +++ b/tools/console/client/.gitignore @@ -0,0 +1 @@ +/xenconsole diff --git a/tools/console/daemon/.gitignore b/tools/console/daemon/.gitignore new file mode 100644 index 0000000000..55c8f84664 --- /dev/null +++ b/tools/console/daemon/.gitignore @@ -0,0 +1 @@ +/xenconsoled From patchwork Fri Feb 25 15:12:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760456 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 61DB1C433F5 for ; Fri, 25 Feb 2022 15:14:02 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279183.476822 (Exim 4.92) (envelope-from ) id 1nNcI3-0008PQ-W0; Fri, 25 Feb 2022 15:13:51 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279183.476822; Fri, 25 Feb 2022 15:13:51 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcI3-0008NN-Ku; Fri, 25 Feb 2022 15:13:51 +0000 Received: by outflank-mailman (input) for mailman id 279183; Fri, 25 Feb 2022 15:13:50 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcI2-0007Bf-FK for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:13:50 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 87999e26-964d-11ec-8eb9-a37418f5ba1a; Fri, 25 Feb 2022 16:13:49 +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: 87999e26-964d-11ec-8eb9-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802028; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Itv0TYjJaWvZTLhYwIDcVR+kB+4hcfXSmAszpJaqRIw=; b=E0BA9QO3L+to8fOVx0uIWCjXSqGyG0PnVEPKKd5kxjkvzElXPpjyHuCp MbxHEbK5zzFQLHz6Jg87jPE7poALanePy/90sBL+gSYxY20xqQayggyjo y5/ybP9oAqcV3NzcBY2xT1WrwGbdJNc8nIDoyElRMdzNoj7uEW5g56Z0v Y=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 65407512 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:33+IyK61u+7MofRIySmgkwxRtDbHchMFZxGqfqrLsTDasY5as4F+v mYYUWGHOP+IYGbyctl0Pdm09UtU65PWyNZjSVNo/Co8Hi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuVGuG96yE6j8lkf5KkYAL+EnkZqTRMFWFw0XqPp8Zj2tQy2YLjXlvX0 T/Pi5a31GGNimYc3l08s8pvmDs31BglkGpF1rCWTakjUG72zxH5PrpGTU2CByKQrr1vNvy7X 47+IISRpQs1yfuP5uSNyd4XemVSKlLb0JPnZnB+A8BOiTAazsA+PzpS2FPxpi67hh3Q9+2dx umhurTuRUQ0F/f1mt4XTiN0Ixxcfv1Bu+TIdC3XXcy7lyUqclPpyvRqSko3IZcZ6qB8BmQmG f4wcW5XKErZ3qTvnez9GrIEascLdaEHOKsWvG1gyjfIS+4rW5nZT43B5MNC3Sd2jcdLdRrbT 5RENWIwMU2aC/FJEnlJT7xhp8Kuv2fESz5alV6siqxmvkGGmWSd15CyaYGIK7RmX/59gUKwt m/AuWPjDXkyOdiSzzPD73ytg/PUkD3ycIUIHba8+7hhh1j77nweDlgaWEW2pdG9i1WiQJRPJ koM4C0soKMuskuxQbHAswaQ+SDe+ERGApwJTrN8uFrlJrfoDxixWGRHUxcbUd4cvtIMaQwX9 BzZmJCyCmk62FGKck61+rCRpDK0HCEaK24eeCMJJTc4D8nfTJIb1UyWEIs6eEKhppisQGyrn WjWxMQrr+hL1aY2O7OHEUcrat5GjrzAVUYL6wreRQpJBSspNdf+N+REBbU2hMuszbp1rHHd7 RDoeODEtYji6K1hcgTXEY3h+5nzup643MX02wIHInXY323FF4SfVY5R+ipiA0xiL9wJfzTkC GeK518Mu8MKYCbyNfcvC25UNyjM5fKxfTgCfqqJBuein7ArLFPXlM2QTRT4M5/RfLgEzvhkZ MbznTeEBncGE6V3pAdatM9GuYLHMhsWnDuJLbiilkzP+ePHOBa9FOdUWHPTP7tRxP7V/23oH yN3apLiJ+N3C7alPEE6MOc7cDg3EJTMLcuu+pwPK7XaeVIO9aNII6a5/I7NsrdNx8x9/tokN FnnBye0FHKXaaX7FDi3 IronPort-HdrOrdr: A9a23:eIo/va5jHKV2WBVJ4QPXwPDXdLJyesId70hD6qhwISY6TiX+rb HJoB17726NtN9/YhEdcLy7VJVoBEmskKKdgrNhWotKPjOW21dARbsKheCJrgEIWReOktK1vZ 0QCpSWY+eQMbEVt6nHCXGDYrQd/OU= X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="65407512" From: Anthony PERARD To: CC: Anthony PERARD , Elena Ufimtseva , Wei Liu Subject: [XEN PATCH v2 02/29] tools/debugger/gdbsx: Fix and cleanup makefiles Date: Fri, 25 Feb 2022 15:12:54 +0000 Message-ID: <20220225151321.44126-3-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 gdbsx/: - Make use of subdir facility for the "clean" target. - No need to remove the *.a, they aren't in this dir. - Avoid calling "distclean" in subdirs as "distclean" targets do only call "clean", and the "clean" also runs "clean" in subdirs. - Avoid the need to make "gx_all.a" and "xg_all.a" in the "all" recipe by forcing make to check for update of "xg/xg_all.a" and "gx/gx_all.a" by having "FORCE" as prerequisite. Now, when making "gdbsx", make will recurse even when both *.a already exist. - List target in $(TARGETS). gdbsx/*/: - Fix dependency on *.h. - Remove some dead code. - List targets in $(TARGETS). - Remove "build" target. - Cleanup "clean" targets. - remove comments about the choice of "ar" instead of "ld" - Use "$(AR)" instead of plain "ar". Signed-off-by: Anthony PERARD --- Notes: v2: - also replace plain "ar" by "$(AR)" tools/debugger/gdbsx/Makefile | 20 ++++++++++---------- tools/debugger/gdbsx/gx/Makefile | 15 +++++++-------- tools/debugger/gdbsx/xg/Makefile | 25 +++++++------------------ 3 files changed, 24 insertions(+), 36 deletions(-) diff --git a/tools/debugger/gdbsx/Makefile b/tools/debugger/gdbsx/Makefile index 5571450a89..4aaf427c45 100644 --- a/tools/debugger/gdbsx/Makefile +++ b/tools/debugger/gdbsx/Makefile @@ -1,20 +1,20 @@ XEN_ROOT = $(CURDIR)/../../.. include ./Rules.mk +SUBDIRS-y += gx +SUBDIRS-y += xg + +TARGETS := gdbsx + .PHONY: all -all: - $(MAKE) -C gx - $(MAKE) -C xg - $(MAKE) gdbsx +all: $(TARGETS) .PHONY: clean -clean: - rm -f xg_all.a gx_all.a gdbsx - set -e; for d in xg gx; do $(MAKE) -C $$d clean; done +clean: subdirs-clean + rm -f $(TARGETS) .PHONY: distclean distclean: clean - set -e; for d in xg gx; do $(MAKE) -C $$d distclean; done .PHONY: install install: all @@ -28,7 +28,7 @@ uninstall: gdbsx: gx/gx_all.a xg/xg_all.a $(CC) $(LDFLAGS) -o $@ $^ -xg/xg_all.a: +xg/xg_all.a: FORCE $(MAKE) -C xg -gx/gx_all.a: +gx/gx_all.a: FORCE $(MAKE) -C gx diff --git a/tools/debugger/gdbsx/gx/Makefile b/tools/debugger/gdbsx/gx/Makefile index 3b8467f799..e9859aea9c 100644 --- a/tools/debugger/gdbsx/gx/Makefile +++ b/tools/debugger/gdbsx/gx/Makefile @@ -2,21 +2,20 @@ XEN_ROOT = $(CURDIR)/../../../.. include ../Rules.mk GX_OBJS := gx_comm.o gx_main.o gx_utils.o gx_local.o -GX_HDRS := $(wildcard *.h) + +TARGETS := gx_all.a .PHONY: all -all: gx_all.a +all: $(TARGETS) .PHONY: clean clean: - rm -rf gx_all.a *.o .*.d + rm -f *.o $(TARGETS) $(DEPS_RM) .PHONY: distclean distclean: clean -#%.o: %.c $(GX_HDRS) Makefile -# $(CC) -c $(CFLAGS) -o $@ $< - -gx_all.a: $(GX_OBJS) Makefile $(GX_HDRS) - ar cr $@ $(GX_OBJS) # problem with ld using -m32 +gx_all.a: $(GX_OBJS) Makefile + $(AR) cr $@ $(GX_OBJS) +-include $(DEPS_INCLUDE) diff --git a/tools/debugger/gdbsx/xg/Makefile b/tools/debugger/gdbsx/xg/Makefile index acdcddf0d5..05325d6d81 100644 --- a/tools/debugger/gdbsx/xg/Makefile +++ b/tools/debugger/gdbsx/xg/Makefile @@ -1,35 +1,24 @@ XEN_ROOT = $(CURDIR)/../../../.. include ../Rules.mk -XG_HDRS := xg_public.h XG_OBJS := xg_main.o CFLAGS += -D__XEN_TOOLS__ CFLAGS += $(CFLAGS_xeninclude) +TARGETS := xg_all.a .PHONY: all -all: build +all: $(TARGETS) -.PHONY: build -build: xg_all.a $(XG_HDRS) $(XG_OBJS) Makefile -# build: mk-symlinks xg_all.a $(XG_HDRS) $(XG_OBJS) Makefile -# build: mk-symlinks xg_all.a - -xg_all.a: $(XG_OBJS) Makefile $(XG_HDRS) - ar cr $@ $(XG_OBJS) # problems using -m32 in ld -# $(LD) -b elf32-i386 $(LDFLAGS) -r -o $@ $^ -# $(CC) -m32 -c -o $@ $^ - -# xg_main.o: xg_main.c Makefile $(XG_HDRS) -#$(CC) -c $(CFLAGS) -o $@ $< - -# %.o: %.c $(XG_HDRS) Makefile -- doesn't work as it won't overwrite Rules.mk -#%.o: %.c -- doesn't recompile when .c changed +xg_all.a: $(XG_OBJS) Makefile + $(AR) cr $@ $(XG_OBJS) .PHONY: clean clean: - rm -rf xen xg_all.a $(XG_OBJS) .*.d + rm -f $(TARGETS) $(XG_OBJS) $(DEPS_RM) .PHONY: distclean distclean: clean + +-include $(DEPS_INCLUDE) From patchwork Fri Feb 25 15:12:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760451 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 7EC55C433F5 for ; Fri, 25 Feb 2022 15:13:59 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279178.476767 (Exim 4.92) (envelope-from ) id 1nNcHt-0006vk-4O; Fri, 25 Feb 2022 15:13:41 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279178.476767; Fri, 25 Feb 2022 15:13:41 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcHt-0006vd-07; Fri, 25 Feb 2022 15:13:41 +0000 Received: by outflank-mailman (input) for mailman id 279178; Fri, 25 Feb 2022 15:13:39 +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 1nNcHr-0006fy-1B for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:13:39 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 81401bbd-964d-11ec-8539-5f4723681683; Fri, 25 Feb 2022 16:13:38 +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: 81401bbd-964d-11ec-8539-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802017; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=e4dSMew7ThkfUT4VBhxHq8D2hkxwuVvIslum+Yj9ZTA=; b=ZFdXX2wSzk61xpbrtkxhazU3pLODbgJyrkpmt0aORNUirUMtjbJ93W0X RAJDtAF1W7n3UMETtbCwA6eGSGZH5sb6vjisIQgL++kYSO0zvmN4f1JAW /SFfrqjxfX4/96Os9zGKRTweuWSwmQhhdPORnvTGWym7fEZ00dgMJsM8B o=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 64890228 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:+mI2eKNid+sPdhzvrR3Ol8FynXyQoLVcMsEvi/4bfWQNrUoi0TEPz jZKWjjUOPmCY2HyLo11aI7k9EkFvZ/XydUwTQto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdleF+lH1dOKJQUBUjclkfJKlYAL/En03FFcMpBsJ00o5wbZj2NMw27BVPivW0 T/Mi5yHULOa82Yc3lI8s8pvfzs24ZweEBtB1rAPTagjUG32zhH5P7pGTU2FFFPqQ5E8IwKPb 72rIIdVXI/u10xF5tuNyt4Xe6CRK1LYFVDmZnF+A8BOjvXez8CbP2lS2Pc0MC9qZzu1c99Z5 8lIiZi8WBcQYY7hmcEQAl5JFjtvBPgTkFPHCSDXXc27ykTHdz3nwul0DVFwNoodkgp1KTgQr 7pCcmlLN03dwbLtqF64YrAEasALJc/3PIQZqzd4wCvQF/oOSpHfWaTao9Rf2V/cg+gQQaaPP 5BDOVKDajz+Yz9pKE8mVal9t/mNuUfSIhBRgnG88P9fD2/7k1UqjemF3MDuUsOObdVYmACfv G2u13T0BFQWOcKSzRKB82mwnanfkCXjQoUQGbaksPlwjzWuKnc7UUNMEwHh+L/g1xD4C4k3x 1EoFjQGgrQ3yEinX8nEAD6VoVuJ71kNXsBBKrhvgO2S8Zb87wGcD2kCazdObt06qcM7LQAXO k+1c8DBXmI27uDMIZ6J3vLN9G7pZ3BJRYMXTXJcFWM4D8/fTJbfZ/4lZvJqC+aLg9L8AlkcK Bja/XFl193/YSPmvphXHGwrYRrw9/AlrSZvv207u15JCCsjNeZJgKTytDDmAQ5odtrxc7V4l CFsdzKixO4PF4qRsyeGXf8AGrqkj97cbmGB3gI2Q8R5r2z1k5JGQWy2yGsvTKuOGpxZEQIFn WeJ4V8BjHOtFCHCgVBLj3KZVJ1xkPmI+SXNXfHIdNteCqWdhyfclByCkXW4hji3+GB1yPlXE c7CLa6EUCZLYYw6nWHeb7pMjtcWKtUWmDq7qWbTlE/8j9JzpRe9FN84Dbd5RrthvfPc/V6Mq I432gnj40w3bdASqxL/qeY7RW3m51BgbXwqg6S7rtK+Hzc= IronPort-HdrOrdr: A9a23:otMmpqBLcDW9H/DlHemq55DYdb4zR+YMi2TC1yhKJiC9Ffbo8P xG/c5rrCMc5wxxZJhNo7290ey7MBHhHP1OkO0s1NWZPDUO0VHAROoJ0WKh+UyEJ8SXzJ866U 4KScZD4bPLYWSS9fyKgzWFLw== X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="64890228" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu Subject: [XEN PATCH v2 03/29] tools/examples: cleanup Makefile Date: Fri, 25 Feb 2022 15:12:55 +0000 Message-ID: <20220225151321.44126-4-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 Don't check if a target exist before installing it. For directory, install doesn't complain, and for file it would prevent from updating them. Also remove the existing loop and instead install all files with a single call to $(INSTALL_DATA). Remove XEN_CONFIGS-y which isn't used. Remove "build" target. Add an empty line after the first comment. The comment isn't about $(XEN_READMES), it is about the makefile as a whole. Signed-off-by: Anthony PERARD --- Notes: v2: - remove existing loops in install targets and use a single call to $(INSTALL_DATA) to install multiple files. tools/examples/Makefile | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/tools/examples/Makefile b/tools/examples/Makefile index 14e24f4cb3..c839bf5603 100644 --- a/tools/examples/Makefile +++ b/tools/examples/Makefile @@ -2,6 +2,7 @@ XEN_ROOT = $(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk # Xen configuration dir and configs to go there. + XEN_READMES = README XEN_CONFIGS += xlexample.hvm @@ -10,14 +11,9 @@ XEN_CONFIGS += xlexample.pvhlinux XEN_CONFIGS += xl.conf XEN_CONFIGS += cpupool -XEN_CONFIGS += $(XEN_CONFIGS-y) - .PHONY: all all: -.PHONY: build -build: - .PHONY: install install: all install-readmes install-configs @@ -26,12 +22,8 @@ uninstall: uninstall-readmes uninstall-configs .PHONY: install-readmes install-readmes: - [ -d $(DESTDIR)$(XEN_CONFIG_DIR) ] || \ - $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR) - set -e; for i in $(XEN_READMES); \ - do [ -e $(DESTDIR)$(XEN_CONFIG_DIR)/$$i ] || \ - $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \ - done + $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR) + $(INSTALL_DATA) $(XEN_READMES) $(DESTDIR)$(XEN_CONFIG_DIR) .PHONY: uninstall-readmes uninstall-readmes: @@ -39,14 +31,9 @@ uninstall-readmes: .PHONY: install-configs install-configs: $(XEN_CONFIGS) - [ -d $(DESTDIR)$(XEN_CONFIG_DIR) ] || \ - $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR) - [ -d $(DESTDIR)$(XEN_CONFIG_DIR)/auto ] || \ - $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)/auto - set -e; for i in $(XEN_CONFIGS); \ - do [ -e $(DESTDIR)$(XEN_CONFIG_DIR)/$$i ] || \ - $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \ - done + $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR) + $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)/auto + $(INSTALL_DATA) $(XEN_CONFIGS) $(DESTDIR)$(XEN_CONFIG_DIR) .PHONY: uninstall-configs uninstall-configs: From patchwork Fri Feb 25 15:12:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760452 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 2DB4DC433EF for ; Fri, 25 Feb 2022 15:14:00 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279179.476778 (Exim 4.92) (envelope-from ) id 1nNcHw-0007Cm-Ch; Fri, 25 Feb 2022 15:13:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279179.476778; Fri, 25 Feb 2022 15:13:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcHw-0007Cb-8u; Fri, 25 Feb 2022 15:13:44 +0000 Received: by outflank-mailman (input) for mailman id 279179; Fri, 25 Feb 2022 15:13:43 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcHv-0007Bf-Af for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:13:43 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 834855a0-964d-11ec-8eb9-a37418f5ba1a; Fri, 25 Feb 2022 16:13:41 +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: 834855a0-964d-11ec-8eb9-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802021; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SYJTJIKxHEFQcMKNpvz4kHz4LT/E8ZyffBaU/35UM+o=; b=fxVxyUnGDPXgWIBjQSHfUYV+H9HbwWLe/COFKCKBGoNFTdQFF861SSoB uVSG2fC4vZ+W2PEimi/1BLDXLvbG24gIqrCsGksohAJ5/QbPgGHrxoqx0 mxH/8egw8AImXfPI8DErHqVw7O4FXx4xhBz8kzxlpF2gPM7nPinbDQFWD o=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 64998366 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:OJpQDqqeqBn9aMkcTQo0yxXXTz5eBmIcZRIvgKrLsJaIsI4StFCzt garIBmFb/uDMGKjfN8lPdixpk4F6sTcy9FmSFFt+CsxEH5B8ZuZCYyVIHmrMnLJJKUvbq7GA +byyDXkBJppJpMJjk71atANlVEliefQAOCU5NfsYkidfyc9IMsaoU8lyrZRbrJA24DjWVvX4 46q+aUzBXf+s9JKGjNMg068gEsHUMTa4Fv0aXRnOJinFHeH/5UkJMp3yZOZdhMUcaENdgKOf M7RzanRw4/s10xF5uVJMFrMWhZirrb6ZWBig5fNMkSoqkAqSicais7XOBeAAKv+Zvrgc91Zk b1wWZKMpQgBGqPou8pFFCRjCiBcD6ZZor7uBFWyvpnGp6HGWyOEL/RGCUg3OcsT+/ptAHEI/ vsdQNwPRknd3aTsmuv9E7QywJR4RCXoFNp3VnVIxDfFDfEgUNbbTr/D/9Nw1zYsnMFeW/3ZY qL1bBIxMEWRM0YRZD/7DrogkteLhUHQLQdd8niz+LA35Gbz8hFIhe2F3N39JYXRGJQ9clyjj n3C13T0BFcdLtP34TiP/2+oh+TPtTjmQ49UH7q9ntZ6jVvWymENBRk+UVqgveL/mkO4Q8hYK UEf5mwpt6dayaCwZoCjBVvi+ifC50NCHYoLewEn1O2T4o7axyW3Xi85dSdASu4tq5U3bBkH2 1DcyrsFGgdTmLGSTHuc8JKdojWzJTUZIAc+WMMUcecWy4K9+d9u13ojWv4mSffo1YOtRVkc1 hjX9HBWulkFsSIcO0xXF3jjiinkmJXGRxVdCu7/DjP8tVMRiGJIiuWVBbnnARRocNfxorqp5 iFsdy2iAAYmV8DleMulGrhlIV1Rz6zZWAAweHY2d3Xbyxyj+mS4Yadb6yxkKUFiP64sIGG1P RCP4F8MvMcLZBNGiJObharrWqzGKoC6SLzYug38NIISMvCdiifdlM2RWaJg9z+0yxV9+U3OE ZyabdytHR4n5VdPl1KLqxMm+eZznEgWnDqLLbiilkjP+efONRa9FOZeWHPTP79R0U9xiFiMm zqpH5DRkEs3vSyXSnS/zLP/2nhRdSlrXc2t8pcPHgNBSyI/cFwc5zbq6etJU+RYc259z48kI lnVtpdk9WfC IronPort-HdrOrdr: A9a23:1LyF2K5qTKylOhj0YgPXwPDXdLJyesId70hD6qhwISY6TiX+rb HJoB17726NtN9/YhEdcLy7VJVoBEmskKKdgrNhWotKPjOW21dARbsKheCJrgEIWReOktK1vZ 0QCpSWY+eQMbEVt6nHCXGDYrQd/OU= X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="64998366" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu Subject: [XEN PATCH v2 04/29] tools/firmware/hvmloader: rework Makefile Date: Fri, 25 Feb 2022 15:12:56 +0000 Message-ID: <20220225151321.44126-5-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 Setup proper dependencies with libacpi so we don't need to run "make hvmloader" in the "all" target. ("build.o" new prerequisite isn't exactly proper but a side effect of building the $(DSDT_FILES) is to generate the "ssdt_*.h" needed by "build.o".) Make use if "-iquote" instead of a plain "-I". For "roms.inc" target, use "$(SHELL)" instead of plain "sh". And use full path to "mkhex" instead of a relative one. Lastly, add "-f" flag to "mv", in case the target already exist. Signed-off-by: Anthony PERARD --- tools/firmware/hvmloader/Makefile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile index b754220839..fc20932110 100644 --- a/tools/firmware/hvmloader/Makefile +++ b/tools/firmware/hvmloader/Makefile @@ -60,8 +60,7 @@ ROMS += $(ROMBIOS_ROM) $(STDVGA_ROM) $(CIRRUSVGA_ROM) endif .PHONY: all -all: acpi - $(MAKE) hvmloader +all: hvmloader .PHONY: acpi acpi: @@ -73,12 +72,15 @@ smbios.o: CFLAGS += -D__SMBIOS_DATE__="\"$(SMBIOS_REL_DATE)\"" ACPI_PATH = ../../libacpi DSDT_FILES = dsdt_anycpu.c dsdt_15cpu.c dsdt_anycpu_qemu_xen.c ACPI_OBJS = $(patsubst %.c,%.o,$(DSDT_FILES)) build.o static_tables.o -$(ACPI_OBJS): CFLAGS += -I. -DLIBACPI_STDUTILS=\"$(CURDIR)/util.h\" +$(ACPI_OBJS): CFLAGS += -iquote . -DLIBACPI_STDUTILS=\"$(CURDIR)/util.h\" CFLAGS += -I$(ACPI_PATH) vpath build.c $(ACPI_PATH) vpath static_tables.c $(ACPI_PATH) OBJS += $(ACPI_OBJS) +$(DSDT_FILES): acpi +build.o: $(DSDT_FILES) + hvmloader: $(OBJS) hvmloader.lds $(LD) $(LDFLAGS_DIRECT) -N -T hvmloader.lds -o $@ $(OBJS) @@ -87,21 +89,21 @@ roms.inc: $(ROMS) ifneq ($(ROMBIOS_ROM),) echo "#ifdef ROM_INCLUDE_ROMBIOS" >> $@.new - sh ../../misc/mkhex rombios $(ROMBIOS_ROM) >> $@.new + $(SHELL) $(XEN_ROOT)/tools/misc/mkhex rombios $(ROMBIOS_ROM) >> $@.new echo "#endif" >> $@.new endif ifneq ($(STDVGA_ROM),) echo "#ifdef ROM_INCLUDE_VGABIOS" >> $@.new - sh ../../misc/mkhex vgabios_stdvga $(STDVGA_ROM) >> $@.new + $(SHELL) $(XEN_ROOT)/tools/misc/mkhex vgabios_stdvga $(STDVGA_ROM) >> $@.new echo "#endif" >> $@.new endif ifneq ($(CIRRUSVGA_ROM),) echo "#ifdef ROM_INCLUDE_VGABIOS" >> $@.new - sh ../../misc/mkhex vgabios_cirrusvga $(CIRRUSVGA_ROM) >> $@.new + $(SHELL) $(XEN_ROOT)/tools/misc/mkhex vgabios_cirrusvga $(CIRRUSVGA_ROM) >> $@.new echo "#endif" >> $@.new endif - mv $@.new $@ + mv -f $@.new $@ .PHONY: clean clean: From patchwork Fri Feb 25 15:12:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760453 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 7E42FC4332F for ; Fri, 25 Feb 2022 15:14:00 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279180.476788 (Exim 4.92) (envelope-from ) id 1nNcHz-0007Wi-Sd; Fri, 25 Feb 2022 15:13:47 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279180.476788; Fri, 25 Feb 2022 15:13:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcHz-0007Wb-Oc; Fri, 25 Feb 2022 15:13:47 +0000 Received: by outflank-mailman (input) for mailman id 279180; Fri, 25 Feb 2022 15:13:46 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcHy-0007Bf-43 for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:13:46 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 84f32f10-964d-11ec-8eb9-a37418f5ba1a; Fri, 25 Feb 2022 16:13:44 +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: 84f32f10-964d-11ec-8eb9-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802024; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5eg0u8Tr2A+J7E6dTFFsvBCkPDf1mtYo9cEvKklzXuc=; b=BkNN56BgxF87OvJE7Ndl5wNCbNfvTvUh0yRktHS3w7elYZc5uuEjsQqb n1WVQoENhFWshThtjewpnU22YPE87OV/LknyhaWI/3Bf7KXx5JgaadqdI XI9DEnzMJtY+VOOnSeys6NW9V9k3wXPbW6d18xtnk/9vutunT9sG7FYD2 s=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 65000277 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:nYATfKPWRRNaTgDvrR2Jl8FynXyQoLVcMsEvi/4bfWQNrUog02dSz GRLX22EOfaKYGegKN9wPI7g9UJXsJHcyoRjGQto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdleF+lH1dOKJQUBUjclkfJKlYAL/En03FFcMpBsJ00o5wbZj2NMw27BVPivW0 T/Mi5yHULOa82Yc3lI8s8pvfzs24ZweEBtB1rAPTagjUG32zhH5P7pGTU2FFFPqQ5E8IwKPb 72rIIdVXI/u10xF5tuNyt4Xe6CRK1LYFVDmZnF+A8BOjvXez8CbP2lS2Pc0MC9qZzu1c99Zy 4p2sp+sZAETNYrVw89CThAHTAcuIvgTkFPHCSDXXc27ykTHdz3nwul0DVFwNoodkgp1KTgQr 7pCcmlLN03dwbLtqF64YrAEasALJc/3PIQZqzd4wCvQF/oOSpHfWaTao9Rf2V/cg+gQQK6GP 5BGNlKDajztTTxENkgsEa4kkcGBolnkcSxcjWK88P9fD2/7k1UqjemF3MDuUseRWcxfk0Kcp 2TH12f0GBcXMJqY0zXt2m2orv/Cm2X8Qo16PL+l8v9nhnWDy2pVDwcZPXOrrP/8hkOgVtZ3L 00P5jFovaU07FasTNT2Q1u/unHslhwWVsdUEuY6wBqQ0aeS6AGcblXoVRYYNoZg7pVvA2V3i BnZxLsFGACDrpWWFkma9au5qwm5HjFOBjAfbHBba1satoyLTJ4IsjrDSdNqEaiQh9LzGC3tz z3ikBXSl4n/nuZQifzloAmvbyaE48GQE1Vrvlm/sneNs1shDLNJcbBE/rQyARxoCI+CBmeMs 3Ef8yR1xLBfVMrd/MBhrQhkIV1I2xpnGGGN6bKMN8N4n9hIx5JFVdoBiN2ZDB00WvvogRezP CfuVfp5vfe/xkeCY65teJ6WAM8316XmHtmNfqmKMocRPsEtKVffpHkGiausM4bFyhlEfUYXY 8rzTCpRJSxCVfQPIMSeHY/xLoPHNghhnDiOFPgXPjys0KaEZW79dFv2GADmUwzN14vd+F+92 48Gb6OikkwDOMWjMni/2dNCdjgicClkba0aXuQKL4Zv1CI9Qzp/YxIQqJt8E7FYc1N9zb+Zr ingARYDkDISRxTvcG23V5yqU5u3Nb4XkJ7xFXVE0YqAs5T7XbuS0Q== IronPort-HdrOrdr: A9a23:kUcsQ6s9ODr1zToVJZPIQ0Ow7skDTtV00zEX/kB9WHVpmszxra 6TdZMgpHnJYVcqKQkdcL+7WJVoLUmxyXcx2/h1AV7AZniAhILLFvAA0WKK+VSJcEeSygce79 YFT0EXMqyIMbEQt6fHCWeDfOrIuOP3kpyVuQ== X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="65000277" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu Subject: [XEN PATCH v2 05/29] tools/fuzz/libelf: rework makefile Date: Fri, 25 Feb 2022 15:12:57 +0000 Message-ID: <20220225151321.44126-6-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 Rename ELF_LIB_OBJS to LIBELF_OBJS as to have the same name as in libs/guest/. Replace "-I" by "-iquote". Remove the use of "vpath". It will not works when we will convert this makefile to subdirmk. Instead, we create symlinks to the source files. Since we are creating a new .gitignore for the links, also move the existing entry to it. Signed-off-by: Anthony PERARD --- Notes: v2: - create a per-directory .gitignore to add new entry and existing one tools/fuzz/libelf/Makefile | 21 ++++++++++----------- .gitignore | 1 - tools/fuzz/libelf/.gitignore | 2 ++ 3 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 tools/fuzz/libelf/.gitignore diff --git a/tools/fuzz/libelf/Makefile b/tools/fuzz/libelf/Makefile index 9eb30ee40c..9211f75951 100644 --- a/tools/fuzz/libelf/Makefile +++ b/tools/fuzz/libelf/Makefile @@ -1,25 +1,24 @@ XEN_ROOT = $(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk -# libelf fuzz target -vpath %.c ../../../xen/common/libelf -CFLAGS += -I../../../xen/common/libelf -ELF_SRCS-y += libelf-tools.c libelf-loader.c libelf-dominfo.c -ELF_LIB_OBJS := $(patsubst %.c,%.o,$(ELF_SRCS-y)) +LIBELF_OBJS := libelf-tools.o libelf-loader.o libelf-dominfo.o -$(patsubst %.c,%.o,$(ELF_SRCS-y)): CFLAGS += -Wno-pointer-sign - -$(ELF_LIB_OBJS): CFLAGS += -DFUZZ_NO_LIBXC $(CFLAGS_xeninclude) +CFLAGS += -iquote ../../../xen/common/libelf +$(LIBELF_OBJS): CFLAGS += -Wno-pointer-sign +$(LIBELF_OBJS): CFLAGS += -DFUZZ_NO_LIBXC $(CFLAGS_xeninclude) libelf-fuzzer.o: CFLAGS += $(CFLAGS_xeninclude) -libelf.a: libelf-fuzzer.o $(ELF_LIB_OBJS) +$(LIBELF_OBJS:.o=.c): libelf-%.c: ../../../xen/common/libelf/libelf-%.c FORCE + ln -nsf $< $@ + +libelf.a: libelf-fuzzer.o $(LIBELF_OBJS) $(AR) rc $@ $^ .PHONY: libelf-fuzzer-all libelf-fuzzer-all: libelf.a libelf-fuzzer.o -afl-libelf-fuzzer: afl-libelf-fuzzer.o libelf-fuzzer.o $(ELF_LIB_OBJS) +afl-libelf-fuzzer: afl-libelf-fuzzer.o libelf-fuzzer.o $(LIBELF_OBJS) $(CC) $(CFLAGS) $^ -o $@ # Common targets @@ -31,7 +30,7 @@ distclean: clean .PHONY: clean clean: - rm -f *.o .*.d *.a *-libelf-fuzzer + rm -f *.o .*.d *.a *-libelf-fuzzer $(LIBELF_OBJS:.o=.c) .PHONY: install install: all diff --git a/.gitignore b/.gitignore index 4e2a850f94..fb29d42342 100644 --- a/.gitignore +++ b/.gitignore @@ -194,7 +194,6 @@ tools/flask/utils/flask-loadpolicy tools/flask/utils/flask-setenforce tools/flask/utils/flask-set-bool tools/flask/utils/flask-label-pci -tools/fuzz/libelf/afl-libelf-fuzzer tools/fuzz/x86_instruction_emulator/asm tools/fuzz/x86_instruction_emulator/afl-harness tools/fuzz/x86_instruction_emulator/afl-harness-cov diff --git a/tools/fuzz/libelf/.gitignore b/tools/fuzz/libelf/.gitignore new file mode 100644 index 0000000000..ed634214c9 --- /dev/null +++ b/tools/fuzz/libelf/.gitignore @@ -0,0 +1,2 @@ +/afl-libelf-fuzzer +/libelf-*.c From patchwork Fri Feb 25 15:12:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760460 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 9FE18C433FE for ; Fri, 25 Feb 2022 15:14:05 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279186.476844 (Exim 4.92) (envelope-from ) id 1nNcI7-0000au-0b; Fri, 25 Feb 2022 15:13:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279186.476844; Fri, 25 Feb 2022 15:13:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcI6-0000XO-Nf; Fri, 25 Feb 2022 15:13:54 +0000 Received: by outflank-mailman (input) for mailman id 279186; Fri, 25 Feb 2022 15:13:53 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcI4-0007Bf-VI for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:13:53 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 8a2e6326-964d-11ec-8eb9-a37418f5ba1a; Fri, 25 Feb 2022 16:13:51 +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: 8a2e6326-964d-11ec-8eb9-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802031; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UAbT4K/ao9ETM/4n/1jW37qwLD7c5IdIpzy2VsdfrxM=; b=a7iYnPM95J/FN6D9guuAKj5vCfZ1/0jMIgHLD2rv2aMHzPcLnCfffMWb CC2Jv+ALOY5ivLPB6XGsopJTLWuZB3g2/3WKlsiuBtwYTRY1mkXy2Yj7C SgJ8SjDUnQoOlX8oTrnP+5y3sP94vOqKMfT9IRCJ93BOgRaMEAiDIhLDV 0=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 65407531 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:yuB00KnLwLkyxNy7HZLyCc3o5gyuJkRdPkR7XQ2eYbSJt1+Wr1Gzt xJLWT2APfyDYmb0LtBzYdjg9kxUvZbQm4VjT1Bt+Hg1RiMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BCpC48T8kk/vgqoPUUIYoAAgoLeNfYHpn2EoLd9IR2NYy24DjWV7V4 7senuWEULOb828sWo4rw/rrRCNH5JwebxtB4zTSzdgS1LPvvyF94KA3fMldHFOhKmVgJcaoR v6r8V2M1jixEyHBqD+Suu2TnkUiGtY+NOUV45Zcc/DKbhNq/kTe3kunXRa1hIg+ZzihxrhMJ NtxWZOYdR0kB7zJkt4hfhh6TSVBNoFf+pvfLi3q2SCT5xWun3rExvxvCAc9PJEC+/YxCmZLn RAaAGlTNFbZ3bvwme/lDLk37iggBJCD0Ic3s3d8zTbfHLA+TIrKWani7t5ExjYgwMtJGJ4yY uJHNGY3M0mbOnWjPH9KKJ8umruWjEL9dnoBtGKrn5Zow0jMmVkZPL/Fb4OOJ43iqd9utl2Du mvM8mD9AxcbHN+S0zyI9jSrnOCntTz/cJIfEvu/7PECqF+Owm0eDjUGWF39puO24mauVtQaJ 0EK9y4Gqakp6FftXtT7Rwe/onOPolgbQdU4O+8w5RyJy6HUyx2EHWVCRTlEAOHKr+dvG2Zsj AXQ2Yq0W3o/69V5VE5x6J+otz6LKC0fF1MvZA1aSTQOz8DhhJk820enoslYLIa5idj8GDfVy j+MrTQji7h7sfPnx5lX7nic3Wvy+8Ghohodo1yOAzn7tl8RiJuNOtTwgWU3+8qsO2pworOpm HEf0/aT4+kVZX1mvHzcGb5ddF1FChvsDdE9vbKNN8Vwn9hO0yT6FWy13N2YDB04WirjUWW0C HI/QSsLuPdu0IKCNMebmb6ZBcUw1rTHHt/4TP3SZdcmSsEvKFLYoHgyOBbIhziFfK0QfUcXY 8bznSGEVytyNEia5GDuG7d1PUEDnEjSOl8/tbiklk/6gNJylVaeSKsfMUvmUwzKxPjsnekhy P4Gb5Hi40wGCIXWO3CLmaZOfQFiBSVqXvje9p0IHtNv1yI7QQnN/deKmuh/E2Gk9owI/tr1E oaVARcJmAKi3iSccW1nqBlLMdvSYHq2llpjVQREALpi8yJ6CWpzxM/zr6cKQIQ= IronPort-HdrOrdr: A9a23:v9zODa1cg82wlKRb0ZmrLgqjBLQkLtp133Aq2lEZdPRUGvb2qy nIpoV96faUskdpZJhOo7G90cW7LE80sKQFg7X5Xo3SODUO2lHJEGgK1+KLqFfd8m/Fh4tgPM 9bAs5D4bbLY2SS4/yX3ODBKadC/OW6 X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="65407531" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Subject: [XEN PATCH v2 06/29] tools/fuzz/x86_instruction_emulator: rework makefile Date: Fri, 25 Feb 2022 15:12:58 +0000 Message-ID: <20220225151321.44126-7-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 Rework dependencies of all objects. We don't need to add dependencies for headers that $(CC) is capable of generating, we only need to include $(DEPS_INCLUDE). Some dependencies are still needed so make knows to generate symlinks for them. We remove the use of "vpath" for cpuid.c. While it works fine for now, when we will convert this makefile to subdirmk, vpath will not be usable. Also, "-iquote" is now needed to build "cpuid.o". Replace "-I." by "-iquote .", so it applies to double-quote includes only. Rather than checking if a symlink exist, always regenerate the symlink. So if the source tree changed location, the symlink is updated. Since we are creating a new .gitignore for the symlink, also move the entry to it. Signed-off-by: Anthony PERARD --- Notes: v2: - create a new per-directory .gitignore to add the new entry and existing ones tools/fuzz/x86_instruction_emulator/Makefile | 32 ++++++++----------- .gitignore | 6 ---- .../fuzz/x86_instruction_emulator/.gitignore | 7 ++++ 3 files changed, 21 insertions(+), 24 deletions(-) create mode 100644 tools/fuzz/x86_instruction_emulator/.gitignore diff --git a/tools/fuzz/x86_instruction_emulator/Makefile b/tools/fuzz/x86_instruction_emulator/Makefile index 1a6dbf94e1..f11437e6a2 100644 --- a/tools/fuzz/x86_instruction_emulator/Makefile +++ b/tools/fuzz/x86_instruction_emulator/Makefile @@ -8,33 +8,27 @@ else x86-insn-fuzz-all: endif -# Add libx86 to the build -vpath %.c $(XEN_ROOT)/xen/lib/x86 +cpuid.c: %: $(XEN_ROOT)/xen/lib/x86/% FORCE + ln -nsf $< $@ -x86_emulate: - [ -L $@ ] || ln -sf $(XEN_ROOT)/xen/arch/x86/$@ +x86_emulate: FORCE + ln -nsf $(XEN_ROOT)/xen/arch/x86/$@ x86_emulate/%: x86_emulate ; -x86-emulate.c x86-emulate.h wrappers.c: %: - [ -L $* ] || ln -sf $(XEN_ROOT)/tools/tests/x86_emulator/$* +x86-emulate.c x86-emulate.h wrappers.c: %: $(XEN_ROOT)/tools/tests/x86_emulator/% FORCE + ln -nsf $< $@ -CFLAGS += $(CFLAGS_xeninclude) -D__XEN_TOOLS__ -I. +CFLAGS += $(CFLAGS_xeninclude) -D__XEN_TOOLS__ -iquote . +cpuid.o: CFLAGS += -iquote $(XEN_ROOT)/xen/lib/x86 GCOV_FLAGS := --coverage %-cov.o: %.c $(CC) -c $(CFLAGS) $(GCOV_FLAGS) $< -o $@ -x86.h := $(addprefix $(XEN_ROOT)/tools/include/xen/asm/,\ - x86-vendors.h x86-defns.h msr-index.h) \ - $(addprefix $(XEN_ROOT)/tools/include/xen/lib/x86/, \ - cpuid.h cpuid-autogen.h) -x86_emulate.h := x86-emulate.h x86_emulate/x86_emulate.h $(x86.h) - -# x86-emulate.c will be implicit for both -x86-emulate.o x86-emulate-cov.o: x86_emulate/x86_emulate.c $(x86_emulate.h) - -fuzz-emul.o fuzz-emulate-cov.o cpuid.o wrappers.o: $(x86_emulate.h) +x86-emulate.h: x86_emulate/x86_emulate.h +x86-emulate.o x86-emulate-cov.o: x86-emulate.h x86_emulate/x86_emulate.c +fuzz-emul.o fuzz-emul-cov.o wrappers.o: x86-emulate.h x86-insn-fuzzer.a: fuzz-emul.o x86-emulate.o cpuid.o $(AR) rc $@ $^ @@ -51,7 +45,7 @@ all: x86-insn-fuzz-all .PHONY: distclean distclean: clean - rm -f x86_emulate x86-emulate.c x86-emulate.h + rm -f x86_emulate x86-emulate.c x86-emulate.h wrappers.c cpuid.c .PHONY: clean clean: @@ -67,3 +61,5 @@ afl: afl-harness .PHONY: afl-cov afl-cov: afl-harness-cov + +-include $(DEPS_INCLUDE) diff --git a/.gitignore b/.gitignore index fb29d42342..3da56594c5 100644 --- a/.gitignore +++ b/.gitignore @@ -194,12 +194,6 @@ tools/flask/utils/flask-loadpolicy tools/flask/utils/flask-setenforce tools/flask/utils/flask-set-bool tools/flask/utils/flask-label-pci -tools/fuzz/x86_instruction_emulator/asm -tools/fuzz/x86_instruction_emulator/afl-harness -tools/fuzz/x86_instruction_emulator/afl-harness-cov -tools/fuzz/x86_instruction_emulator/wrappers.c -tools/fuzz/x86_instruction_emulator/x86_emulate -tools/fuzz/x86_instruction_emulator/x86-emulate.[ch] tools/helpers/init-xenstore-domain tools/helpers/xen-init-dom0 tools/hotplug/common/hotplugpath.sh diff --git a/tools/fuzz/x86_instruction_emulator/.gitignore b/tools/fuzz/x86_instruction_emulator/.gitignore new file mode 100644 index 0000000000..65c3cf9702 --- /dev/null +++ b/tools/fuzz/x86_instruction_emulator/.gitignore @@ -0,0 +1,7 @@ +/asm +/afl-harness +/afl-harness-cov +/cpuid.c +/wrappers.c +/x86_emulate +/x86-emulate.[ch] From patchwork Fri Feb 25 15:12:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760454 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 0AE18C43217 for ; Fri, 25 Feb 2022 15:14:01 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279181.476800 (Exim 4.92) (envelope-from ) id 1nNcI1-0007od-6r; Fri, 25 Feb 2022 15:13:49 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279181.476800; Fri, 25 Feb 2022 15:13:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcI1-0007oF-24; Fri, 25 Feb 2022 15:13:49 +0000 Received: by outflank-mailman (input) for mailman id 279181; Fri, 25 Feb 2022 15:13:47 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcHz-0007Bf-CN for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:13:47 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 86cdaa5e-964d-11ec-8eb9-a37418f5ba1a; Fri, 25 Feb 2022 16:13:46 +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: 86cdaa5e-964d-11ec-8eb9-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802026; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=g6V0HqnXbYzHAD7EivABin1e8USUEILeVoIQJoAVubg=; b=LUl/asu+6prFABHSOjfKWNgbVczUtxNV+ru3MR5lhiXdlowdiD03zc9o iBdP1xCDhavmCJ83oYo64bDb2+A8R4txVQ7wwsFz/d0jAA9sA/gjMlbST dmaJDtfCZkeNgJS4qlx0B9nRvW3AY9YQgf1UcenIH7bDWWOL0QEuT8pbf Q=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 64998371 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:kE1Yyqyps4r+weUlnRl6t+dcxirEfRIJ4+MujC+fZmUNrF6WrkUHn TYdWmjVPq7YMzHxf4h/a9vj/EhSvcKEzN9qTQE4qCAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnj/0bv656yMUOZigHtIQMsadUsxKbVIiGX9JZS5LwbZj2NYy24XhWWthh PupyyHhEA79s9JLGjp8B5Kr8HuDa9yr5Vv0FnRnDRx6lAe2e0s9VfrzFonoR5fMeaFGH/bSe gr25OrRElU1XfsaIojNfr7TKiXmS1NJVOSEoiI+t6OK2nCuqsGuu0qS2TV1hUp/0l20c95NJ Nplr4Xudz9qB6r2gb4EUkNDLQEnD4tH5+qSSZS/mZT7I0zudnLtx7NlDV0sPJ1e8eFyaY1M3 aVGcnZXNEnF3r/ohuLgIgVvrp1LwM3DNYUDunZm3HfBAOwvW5zrSKTW/95Imjw3g6iiGN6AO 5tIOWEwNXwsZTVsGGsTBZEYvdyUg2jlUhlAlRGfnKs4tj27IAtZj+G2bYu9lsaxbdpRtlaVo CTB5WuRKgEXMpmTxCSI9lqoh/TThmXrVYQKDrq6+/V2xlqJyQQu5AY+DAXh56Pj0wjnBowZe xd8FjcSQbYa7lX1cOG+ZhqCuSSdv0QHZfoJIcs791TYokbL2DqxCm8BRz9HTdUpss4qWDAnv mO0c8PV6S9H6+PMFy/EnluAhXbrYHVOczdeDcMRZVZdu7HeTJcPYgUjpzqJOIq8lZXLFD752 FhmRwBu1uxI3abnO0hWlG0rYg5ARLCVH2bZBS2NBwpJCz+Vgqb/NuREDnCBsJ59wH6xFAXpg ZT9s5H2ABoyJZ+MjjeRZ+4GAauk4f2IWBWF3wIyQMV4q2n1oyb7FWy13N2YDB04WirjUWW0C HI/RCsLvMMDVJdURfUfj32N5zQCkvG7SIWNugH8ZdtSeJlhHDJrDwk1DXN8K1vFyRB2+YlmY M/zWZ/1UR4yVPQ2pBLrFrx1+eJ6mUgDKZb7GMmTI+KPiuHFOhZ4iN4tbTOzUwzOxPjc8VWNr o0GbJPiJtc2eLSWXxQ7OLU7dTgiRUXXz7ivwyCLXoZv+jZbJVw= IronPort-HdrOrdr: A9a23:azSQoKAQDg4IrJPlHemm55DYdb4zR+YMi2TC1yhKJiC9Ffbo8v xG/c5rsiMc5wxxZJhNo7290cq7MBHhHPxOgbX5VI3KNGKNhILBFvAH0WKI+VPd8kPFmtK1rZ 0QEJRDNA== X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="64998371" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu Subject: [XEN PATCH v2 07/29] tools/helper: Cleanup Makefile Date: Fri, 25 Feb 2022 15:12:59 +0000 Message-ID: <20220225151321.44126-8-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 Use $(TARGETS) to collect targets. Collect library to link against in $(LDLIBS). Remove extra "-f" flags that is already part of $(RM). Signed-off-by: Anthony PERARD --- tools/helpers/Makefile | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/tools/helpers/Makefile b/tools/helpers/Makefile index 7f6c422440..2fe3be2f89 100644 --- a/tools/helpers/Makefile +++ b/tools/helpers/Makefile @@ -5,10 +5,10 @@ XEN_ROOT = $(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk -PROGS += xen-init-dom0 +TARGETS += xen-init-dom0 ifeq ($(CONFIG_Linux),y) ifeq ($(CONFIG_X86),y) -PROGS += init-xenstore-domain +TARGETS += init-xenstore-domain endif endif @@ -17,6 +17,10 @@ $(XEN_INIT_DOM0_OBJS): CFLAGS += $(CFLAGS_libxentoollog) $(XEN_INIT_DOM0_OBJS): CFLAGS += $(CFLAGS_libxenstore) $(XEN_INIT_DOM0_OBJS): CFLAGS += $(CFLAGS_libxenlight) $(XEN_INIT_DOM0_OBJS): CFLAGS += $(CFLAGS_libxenctrl) +xen-init-dom0: LDLIBS += $(LDLIBS_libxenctrl) +xen-init-dom0: LDLIBS += $(LDLIBS_libxentoollog) +xen-init-dom0: LDLIBS += $(LDLIBS_libxenstore) +xen-init-dom0: LDLIBS += $(LDLIBS_libxenlight) INIT_XENSTORE_DOMAIN_OBJS = init-xenstore-domain.o init-dom-json.o $(INIT_XENSTORE_DOMAIN_OBJS): CFLAGS += $(CFLAGS_libxentoollog) @@ -25,27 +29,32 @@ $(INIT_XENSTORE_DOMAIN_OBJS): CFLAGS += $(CFLAGS_libxenctrl) $(INIT_XENSTORE_DOMAIN_OBJS): CFLAGS += $(CFLAGS_libxenstore) $(INIT_XENSTORE_DOMAIN_OBJS): CFLAGS += $(CFLAGS_libxenlight) $(INIT_XENSTORE_DOMAIN_OBJS): CFLAGS += -include $(XEN_ROOT)/tools/config.h +init-xenstore-domain: LDLIBS += $(LDLIBS_libxentoollog) +init-xenstore-domain: LDLIBS += $(LDLIBS_libxenstore) +init-xenstore-domain: LDLIBS += $(LDLIBS_libxenctrl) +init-xenstore-domain: LDLIBS += $(LDLIBS_libxenguest) +init-xenstore-domain: LDLIBS += $(LDLIBS_libxenlight) .PHONY: all -all: $(PROGS) +all: $(TARGETS) xen-init-dom0: $(XEN_INIT_DOM0_OBJS) - $(CC) $(LDFLAGS) -o $@ $(XEN_INIT_DOM0_OBJS) $(LDLIBS_libxenctrl) $(LDLIBS_libxentoollog) $(LDLIBS_libxenstore) $(LDLIBS_libxenlight) $(APPEND_LDFLAGS) + $(CC) $(LDFLAGS) -o $@ $(XEN_INIT_DOM0_OBJS) $(LDLIBS) $(APPEND_LDFLAGS) init-xenstore-domain: $(INIT_XENSTORE_DOMAIN_OBJS) - $(CC) $(LDFLAGS) -o $@ $(INIT_XENSTORE_DOMAIN_OBJS) $(LDLIBS_libxentoollog) $(LDLIBS_libxenstore) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenlight) $(APPEND_LDFLAGS) + $(CC) $(LDFLAGS) -o $@ $(INIT_XENSTORE_DOMAIN_OBJS) $(LDLIBS) $(APPEND_LDFLAGS) .PHONY: install install: all $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) - for i in $(PROGS); do $(INSTALL_PROG) $$i $(DESTDIR)$(LIBEXEC_BIN); done + for i in $(TARGETS); do $(INSTALL_PROG) $$i $(DESTDIR)$(LIBEXEC_BIN); done .PHONY: uninstall uninstall: - for i in $(PROGS); do rm -f $(DESTDIR)$(LIBEXEC_BIN)/$$i; done + for i in $(TARGETS); do rm -f $(DESTDIR)$(LIBEXEC_BIN)/$$i; done .PHONY: clean clean: - $(RM) -f *.o $(PROGS) $(DEPS_RM) + $(RM) *.o $(TARGETS) $(DEPS_RM) distclean: clean From patchwork Fri Feb 25 15:13:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760455 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 55BDDC433FE for ; Fri, 25 Feb 2022 15:14:00 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279182.476810 (Exim 4.92) (envelope-from ) id 1nNcI2-00085s-FR; Fri, 25 Feb 2022 15:13:50 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279182.476810; Fri, 25 Feb 2022 15:13:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcI2-00085R-Aj; Fri, 25 Feb 2022 15:13:50 +0000 Received: by outflank-mailman (input) for mailman id 279182; Fri, 25 Feb 2022 15:13:49 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcI0-0007Bf-Pg for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:13:49 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 879ce21b-964d-11ec-8eb9-a37418f5ba1a; Fri, 25 Feb 2022 16:13:47 +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: 879ce21b-964d-11ec-8eb9-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802027; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+tvgdAnTgDFIQbMFRm+czYIkxCdj45NAL3MUbvPerCo=; b=SG+Fv1Hf0KSYHJUJwpZ+Zkd/ZHARVzwHnHWe/Sa9/zvN7HRsDp0hMNJX 830HmV9VagoWU/6OvzwzIWKrTrDRdhoh07AR0nGckKuPSqLDttt7v1jTp OSsn8N7lQ1buFMN5Yx7wUj5FiKQJimsLDzPKURy3ZKyITYcDXJzOyp6M1 c=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 64998373 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:TEaeMKhcHvuX9+aHKGjzAh4OX161CxAKZh0ujC45NGQN5FlHY01je htvXmiEaPnYMDPxedhyboi3pBtTscTVztZgTVdsri81H34b9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oDJ9CU6jefSLlbFILas1hpZHGeIcw98z0M78wIFqtQw24LhWVnQ4 YmaT/D3YzdJ5RYlagr41IrbwP9flKyaVOQw5wFWiVhj5TcyplFNZH4tDfjZw0jQG+G4KtWSV efbpIxVy0uCl/sb5nFJpZ6gGqECaua60QFjERO6UYD66vRJjnRaPqrWqJPwwKqY4tmEt4kZ9 TlDiXC/YVcoOIndms9NaAlFHS17N7VfoeDBGEHq5KR/z2WeG5ft6/BnDUVwNowE4OdnR2pJ8 JT0KhhUMErF3bjvhuvmFK883azPL+GyVG8bknhm0THeC+dgWZ3ZSr/GzdRZwC0xloZFGvO2i 88xN2Y+PUSbPEYn1lE/MLEjp+KGhCjDSCRXmXi3oboL5FTuw1kkuFTqGIWMIYHbLSlPpW6Ho krW8mK/BQsVXPSPxDzA/n+yi+vnmSLgRJlUBLC+7uRtglCY2ioUEhJ+aLegiaDn0AjkAYsZc hFKvHp1xUQvyKC1Zon8WTmpolXUhQ4BVdZVGfUjsV6L85OBtm51GVM4ZjJGbdUnsuo/Sjory kKFkrvVONB/jFGGYSnDr+nJ9FteLQBQdDZfPnFcEWPp9vG++Nlbs/7Zcjp0/EdZZPXRECq4/ T2FpTNWa1473Z9SjPXTEbwqbluRSnn1ouwdulS/soGNtFoRiGuZi2qAswmzARFodtvxc7V5l CJY8/VyFchXZX13qASDQf8WAJai7OufPTvXjDZHRsd9qmvxoiL+JdgIuFmSwXuF1O5eKFcFh 2eJ5GtsCGJ7ZiP2PcebnarrYyjV8UQQPYu8Da2FBja/SpNwaBWG7ElTib24hAjQfLwXufhnY /+zKJ/0ZV5DUPgP5GfmFo81jO5wrghjlDy7eHwO50n+uVZoTCXOEult3ZrnRr1R0Z5oVy2Oq 4cPb5bRkk4HOAA8CwGOmbMuwZkxBSBTLfjLRwZ/L4Zv/iIO9LkdNsLs IronPort-HdrOrdr: A9a23:pZEU/aHSMBtPf1+SpLqE4seALOsnbusQ8zAXP0AYc3Nom6uj5q WTdZUgpHjJYVkqOU3I9ersBEDiewK/yXcW2+ks1N6ZNWGM0ldARLsSibcKqAePJ8SRzIJgPN 9bAstDNOE= X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="64998373" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu Subject: [XEN PATCH v2 08/29] tools/hotplug: cleanup Makefiles Date: Fri, 25 Feb 2022 15:13:00 +0000 Message-ID: <20220225151321.44126-9-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 Remove "build" targets. Use simply expanded variables when recursively expanded variable aren't needed. (Use ":=" instead of "=".) Don't check if a directory already exist when installing, just create it. Fix $(HOTPLUGPATH), it shouldn't have any double-quote. Some reindentation. FreeBSD, "hotplugpath.sh" is already installed by common/. Signed-off-by: Anthony PERARD --- tools/hotplug/FreeBSD/Makefile | 11 +++-------- tools/hotplug/Linux/Makefile | 16 ++++++---------- tools/hotplug/Linux/systemd/Makefile | 16 +++++++--------- tools/hotplug/NetBSD/Makefile | 9 +++------ tools/hotplug/common/Makefile | 16 ++++++---------- 5 files changed, 25 insertions(+), 43 deletions(-) diff --git a/tools/hotplug/FreeBSD/Makefile b/tools/hotplug/FreeBSD/Makefile index de9928cd86..a6552c9884 100644 --- a/tools/hotplug/FreeBSD/Makefile +++ b/tools/hotplug/FreeBSD/Makefile @@ -2,18 +2,15 @@ XEN_ROOT = $(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk # Xen script dir and scripts to go there. -XEN_SCRIPTS = vif-bridge block +XEN_SCRIPTS := vif-bridge block -XEN_SCRIPT_DATA = +XEN_SCRIPT_DATA := -XEN_RCD_PROG = rc.d/xencommons rc.d/xendriverdomain +XEN_RCD_PROG := rc.d/xencommons rc.d/xendriverdomain .PHONY: all all: -.PHONY: build -build: - .PHONY: install install: install-scripts install-rcd @@ -44,12 +41,10 @@ install-rcd: do \ $(INSTALL_PROG) $$i $(DESTDIR)$(INITD_DIR); \ done - $(INSTALL_DATA) ../common/hotplugpath.sh $(DESTDIR)$(XEN_SCRIPT_DIR) .PHONY: uninstall-rcd uninstall-rcd: rm -f $(addprefix $(DESTDIR)$(INITD_DIR)/, $(XEN_RCD_PROG)) - rm -f $(DESTDIR)$(XEN_SCRIPT_DIR)/hotplugpath.sh .PHONY: clean clean: diff --git a/tools/hotplug/Linux/Makefile b/tools/hotplug/Linux/Makefile index 0b1d111d7e..9a7b3a3515 100644 --- a/tools/hotplug/Linux/Makefile +++ b/tools/hotplug/Linux/Makefile @@ -2,7 +2,7 @@ XEN_ROOT = $(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk # Xen script dir and scripts to go there. -XEN_SCRIPTS = vif-bridge +XEN_SCRIPTS := vif-bridge XEN_SCRIPTS += vif-route XEN_SCRIPTS += vif-nat XEN_SCRIPTS += vif-openvswitch @@ -22,16 +22,13 @@ XEN_SCRIPTS += launch-xenstore SUBDIRS-$(CONFIG_SYSTEMD) += systemd -XEN_SCRIPT_DATA = xen-script-common.sh locking.sh logging.sh +XEN_SCRIPT_DATA := xen-script-common.sh locking.sh logging.sh XEN_SCRIPT_DATA += xen-hotplug-common.sh xen-network-common.sh vif-common.sh XEN_SCRIPT_DATA += block-common.sh .PHONY: all all: subdirs-all -.PHONY: build -build: - .PHONY: install install: install-initd install-scripts subdirs-install @@ -41,9 +38,9 @@ uninstall: uninstall-initd uninstall-scripts subdirs-uninstall # See docs/misc/distro_mapping.txt for INITD_DIR location .PHONY: install-initd install-initd: - [ -d $(DESTDIR)$(INITD_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(INITD_DIR) - [ -d $(DESTDIR)$(SYSCONFIG_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(SYSCONFIG_DIR) - [ -d $(DESTDIR)$(LIBEXEC_BIN) ] || $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) + $(INSTALL_DIR) $(DESTDIR)$(INITD_DIR) + $(INSTALL_DIR) $(DESTDIR)$(SYSCONFIG_DIR) + $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) $(INSTALL_DATA) init.d/sysconfig.xendomains $(DESTDIR)$(SYSCONFIG_DIR)/xendomains $(INSTALL_DATA) init.d/sysconfig.xencommons $(DESTDIR)$(SYSCONFIG_DIR)/xencommons $(INSTALL_PROG) xendomains $(DESTDIR)$(LIBEXEC_BIN) @@ -64,8 +61,7 @@ uninstall-initd: .PHONY: install-scripts install-scripts: - [ -d $(DESTDIR)$(XEN_SCRIPT_DIR) ] || \ - $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR) + $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR) set -e; for i in $(XEN_SCRIPTS); \ do \ $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \ diff --git a/tools/hotplug/Linux/systemd/Makefile b/tools/hotplug/Linux/systemd/Makefile index a5d41d86ef..26df2a43b1 100644 --- a/tools/hotplug/Linux/systemd/Makefile +++ b/tools/hotplug/Linux/systemd/Makefile @@ -1,12 +1,12 @@ XEN_ROOT = $(CURDIR)/../../../.. include $(XEN_ROOT)/tools/Rules.mk -XEN_SYSTEMD_MODULES = xen.conf +XEN_SYSTEMD_MODULES := xen.conf -XEN_SYSTEMD_MOUNT = proc-xen.mount +XEN_SYSTEMD_MOUNT := proc-xen.mount XEN_SYSTEMD_MOUNT += var-lib-xenstored.mount -XEN_SYSTEMD_SERVICE = xenstored.service +XEN_SYSTEMD_SERVICE := xenstored.service XEN_SYSTEMD_SERVICE += xenconsoled.service XEN_SYSTEMD_SERVICE += xen-qemu-dom0-disk-backend.service XEN_SYSTEMD_SERVICE += xendomains.service @@ -14,7 +14,7 @@ XEN_SYSTEMD_SERVICE += xen-watchdog.service XEN_SYSTEMD_SERVICE += xen-init-dom0.service XEN_SYSTEMD_SERVICE += xendriverdomain.service -ALL_XEN_SYSTEMD = $(XEN_SYSTEMD_MODULES) \ +ALL_XEN_SYSTEMD := $(XEN_SYSTEMD_MODULES) \ $(XEN_SYSTEMD_MOUNT) \ $(XEN_SYSTEMD_SERVICE) @@ -30,10 +30,8 @@ distclean: clean .PHONY: install install: $(ALL_XEN_SYSTEMD) - [ -d $(DESTDIR)$(XEN_SYSTEMD_DIR) ] || \ - $(INSTALL_DIR) $(DESTDIR)$(XEN_SYSTEMD_DIR) - [ -d $(DESTDIR)$(XEN_SYSTEMD_MODULES_LOAD) ] || \ - $(INSTALL_DIR) $(DESTDIR)$(XEN_SYSTEMD_MODULES_LOAD) + $(INSTALL_DIR) $(DESTDIR)$(XEN_SYSTEMD_DIR) + $(INSTALL_DIR) $(DESTDIR)$(XEN_SYSTEMD_MODULES_LOAD) $(INSTALL_DATA) *.service $(DESTDIR)$(XEN_SYSTEMD_DIR) $(INSTALL_DATA) *.mount $(DESTDIR)$(XEN_SYSTEMD_DIR) $(INSTALL_DATA) *.conf $(DESTDIR)$(XEN_SYSTEMD_MODULES_LOAD) @@ -48,5 +46,5 @@ $(XEN_SYSTEMD_MODULES): rm -f $@.tmp for mod in $(LINUX_BACKEND_MODULES) ; do \ echo $$mod ; \ - done > $@.tmp + done > $@.tmp $(call move-if-changed,$@.tmp,$@) diff --git a/tools/hotplug/NetBSD/Makefile b/tools/hotplug/NetBSD/Makefile index f909ffa367..1cd3db2ccb 100644 --- a/tools/hotplug/NetBSD/Makefile +++ b/tools/hotplug/NetBSD/Makefile @@ -2,22 +2,19 @@ XEN_ROOT = $(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk # Xen script dir and scripts to go there. -XEN_SCRIPTS = +XEN_SCRIPTS := XEN_SCRIPTS += locking.sh XEN_SCRIPTS += block XEN_SCRIPTS += vif-bridge XEN_SCRIPTS += vif-ip XEN_SCRIPTS += qemu-ifup -XEN_SCRIPT_DATA = -XEN_RCD_PROG = rc.d/xencommons rc.d/xendomains rc.d/xen-watchdog rc.d/xendriverdomain +XEN_SCRIPT_DATA := +XEN_RCD_PROG := rc.d/xencommons rc.d/xendomains rc.d/xen-watchdog rc.d/xendriverdomain .PHONY: all all: -.PHONY: build -build: - .PHONY: install install: install-scripts install-rcd diff --git a/tools/hotplug/common/Makefile b/tools/hotplug/common/Makefile index ef48bfacc9..e8a8dbea6c 100644 --- a/tools/hotplug/common/Makefile +++ b/tools/hotplug/common/Makefile @@ -1,22 +1,19 @@ XEN_ROOT = $(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk -HOTPLUGPATH="hotplugpath.sh" +HOTPLUGPATH := hotplugpath.sh # OS-independent hotplug scripts go in this directory # Xen scripts to go there. -XEN_SCRIPTS = -XEN_SCRIPT_DATA = $(HOTPLUGPATH) +XEN_SCRIPTS := +XEN_SCRIPT_DATA := $(HOTPLUGPATH) genpath-target = $(call buildmakevars2file,$(HOTPLUGPATH)) $(eval $(genpath-target)) .PHONY: all -all: build - -.PHONY: build -build: $(HOTPLUGPATH) +all: $(HOTPLUGPATH) .PHONY: install install: install-scripts @@ -25,9 +22,8 @@ install: install-scripts uninstall: uninstall-scripts .PHONY: install-scripts -install-scripts: build - [ -d $(DESTDIR)$(XEN_SCRIPT_DIR) ] || \ - $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR) +install-scripts: all + $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR) set -e; for i in $(XEN_SCRIPTS); \ do \ $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \ From patchwork Fri Feb 25 15:13:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760458 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 E3DD5C4332F for ; Fri, 25 Feb 2022 15:14:03 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279184.476833 (Exim 4.92) (envelope-from ) id 1nNcI5-0000Jn-JE; Fri, 25 Feb 2022 15:13:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279184.476833; Fri, 25 Feb 2022 15:13:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcI5-0000JJ-Cd; Fri, 25 Feb 2022 15:13:53 +0000 Received: by outflank-mailman (input) for mailman id 279184; Fri, 25 Feb 2022 15:13:51 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcI3-0007Bf-D6 for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:13:51 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 89003833-964d-11ec-8eb9-a37418f5ba1a; Fri, 25 Feb 2022 16:13:50 +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: 89003833-964d-11ec-8eb9-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802029; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vEj0fZWMl+R77ejhJIT+1IS4qvoqXeRC/IzY/VGgI/8=; b=PubzSiPEqzLM6y2qEjQkXxtemIuVSB681AKSO6dAEOVu9+vmhT53gpnv Owb4pm55w4vR0Wre/3k1WeNUByUzSnNosCRCGV3uYNJAssi6DH4smSOAz vtKLD7oZBDR9yCCPQBHDbUXbL6AfUGgx4izGFA3sm15oTKmf/b7sl10il c=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 65000282 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:SOsCnq2e5JUL5bNoy/bD5bhxkn2cJEfYwER7XKvMYLTBsI5bpzNTn DQfUDzTaPmCamanfdtzYY/l80pUucfcn4U1SFdkpC1hF35El5HIVI+TRqvS04J+DSFhoGZPt Zh2hgzodZhsJpPkjk7xdOCn9xGQ7InQLlbGILes1htZGEk1EE/NtTo5w7Rj2tQy3IDja++wk YiaT/P3aQfNNwFcagr424rbwP+4lK2v0N+wlgVWicFj5DcypVFMZH4sDfjZw0/DaptVBoaHq 9Prl9lVyI97EyAFUbtJmp6jGqEDryW70QKm0hK6UID66vROS7BbPg/W+5PwZG8O4whlkeydx /1jiZO0RgxwY5fFv9o+CDBkORNbA+pvreqvzXiX6aR/zmXDenrohf5vEFs3LcsT/eMf7WNmr KJCbmpXN1ba2rzwkOnTpupE36zPKOHiOp8fvXdxiynUF/88TbjIQrnQ5M8e1zA17ixLNaiDP 5JBM2o1BPjGSyxVYgYoFs8mp+mTp2bHcQxil2y4mZNitgA/yyQuieOwYbI5YOeiWsF9jkue4 GXc8AzREhwccdCS1zeB2natnfPU2zP2XpoIE7+1/eIsh0ecrlH/EzVPCwH9+6PgzBfjBZQPc CT45xbCs4AcyEOvQdKkAiexh0Cn5Tcgceh1LaoTvVTlJrXv3y6VAW0NTzhkYdMgtdMrSTFC6 mJlj+8FFhQ07uTLFCv1GqO86GrrZHNLdTNqiTosEFNdi+QPtr3fmf4mojxLNKeuxuP4Fjjrq 9xhhHhv3u5D5SLnOkjSwLwmv95OjsSYJuLWzl+ONo5A0u+fTNT0D2BPwQKGhcus1K7DEjG8U IEswqByFtwmA5CXjzCqS+4QBryv7PvtGGSC3QMwQ8B9qmz1oybLkWVsDNdWfhYB3iEsI2KBX aMukVkJuM870IWCN8ebnL5d++x1lPO9RLwJp9jfb8ZUY4gZSeN01HoGWKJk5Ei0yBJEufhmY f+zKJ/wZV5HWfUP5GfnHI81jO50rh3SMEuOHPgXOTz8iuHADJNUIJ9YWGazghcRt/vV8F2Iq I8Eb6NnCXx3CYXDX8UeyqZLRXhiEJTxLcqeRxB/HgJbHjdbJQ== IronPort-HdrOrdr: A9a23:/P8FrKqY77uZ9uNAHEuoI3oaV5oTeYIsimQD101hICG8cqSj+f xG+85rsyMc6QxhIE3I9urhBEDtex/hHNtOkOws1NSZLW7bUQmTXeJfBOLZqlWKcUDDH6xmpM NdmsBFeaTN5DNB7PoSjjPWLz9Z+qjkzJyV X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="65000282" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu Subject: [XEN PATCH v2 09/29] tools/libfsimage: Cleanup makefiles Date: Fri, 25 Feb 2022 15:13:01 +0000 Message-ID: <20220225151321.44126-10-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 Remove the need for "fs-*" targets by creating a "common.mk" which have flags that are common to libfsimage/common/ and the other libfsimages/*/ directories. In common.mk, make $(PIC_OBJS) a recursively expanded variable so it doesn't matter where $(LIB_SRCS-y) is defined, and remove the extra $(PIC_OBJS) from libfsimage/common/Makefile. Use a $(TARGETS) variable to list things to be built. And $(TARGETS) can be use in the clean target in common.mk. iso9660/: Remove the explicit dependency between fsys_iso9660.c and iso9660.h, this is handled automaticaly by the .*.d dependency files, and iso9660.h already exist. Signed-off-by: Anthony PERARD --- tools/libfsimage/common/Makefile | 11 +++-------- tools/libfsimage/ext2fs-lib/Makefile | 9 --------- tools/libfsimage/ext2fs/Makefile | 9 --------- tools/libfsimage/fat/Makefile | 9 --------- tools/libfsimage/iso9660/Makefile | 11 ----------- tools/libfsimage/reiserfs/Makefile | 9 --------- tools/libfsimage/ufs/Makefile | 9 --------- tools/libfsimage/xfs/Makefile | 9 --------- tools/libfsimage/zfs/Makefile | 9 --------- tools/libfsimage/Rules.mk | 26 ++++++++------------------ tools/libfsimage/common.mk | 11 +++++++++++ 11 files changed, 22 insertions(+), 100 deletions(-) create mode 100644 tools/libfsimage/common.mk diff --git a/tools/libfsimage/common/Makefile b/tools/libfsimage/common/Makefile index 0c5a34baea..79f8cfd28e 100644 --- a/tools/libfsimage/common/Makefile +++ b/tools/libfsimage/common/Makefile @@ -1,5 +1,5 @@ XEN_ROOT = $(CURDIR)/../../.. -include $(XEN_ROOT)/tools/libfsimage/Rules.mk +include $(XEN_ROOT)/tools/libfsimage/common.mk MAJOR := $(shell $(XEN_ROOT)/version.sh $(XEN_ROOT)/xen/Makefile) MINOR = 0 @@ -13,12 +13,10 @@ LDFLAGS += $(PTHREAD_LDFLAGS) LIB_SRCS-y = fsimage.c fsimage_plugin.c fsimage_grub.c -PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y)) - -LIB = libxenfsimage.so libxenfsimage.so.$(MAJOR) libxenfsimage.so.$(MAJOR).$(MINOR) +TARGETS = libxenfsimage.so libxenfsimage.so.$(MAJOR) libxenfsimage.so.$(MAJOR).$(MINOR) .PHONY: all -all: $(LIB) +all: $(TARGETS) .PHONY: install install: all @@ -40,9 +38,6 @@ uninstall: rm -f $(DESTDIR)$(libdir)/libxenfsimage.so.$(MAJOR) rm -f $(DESTDIR)$(libdir)/libxenfsimage.so.$(MAJOR).$(MINOR) -clean distclean:: - rm -f $(LIB) - libxenfsimage.so: libxenfsimage.so.$(MAJOR) ln -sf $< $@ libxenfsimage.so.$(MAJOR): libxenfsimage.so.$(MAJOR).$(MINOR) diff --git a/tools/libfsimage/ext2fs-lib/Makefile b/tools/libfsimage/ext2fs-lib/Makefile index 431a79068e..b9b560df75 100644 --- a/tools/libfsimage/ext2fs-lib/Makefile +++ b/tools/libfsimage/ext2fs-lib/Makefile @@ -9,13 +9,4 @@ FS_LIBDEPS = $(EXTFS_LIBS) # Include configure output (config.h) CFLAGS += -include $(XEN_ROOT)/tools/config.h -.PHONY: all -all: fs-all - -.PHONY: install -install: fs-install - -.PHONY: uninstall -uninstall: fs-uninstall - include $(XEN_ROOT)/tools/libfsimage/Rules.mk diff --git a/tools/libfsimage/ext2fs/Makefile b/tools/libfsimage/ext2fs/Makefile index c62ae359ac..fe01f98148 100644 --- a/tools/libfsimage/ext2fs/Makefile +++ b/tools/libfsimage/ext2fs/Makefile @@ -4,13 +4,4 @@ LIB_SRCS-y = fsys_ext2fs.c FS = ext2fs -.PHONY: all -all: fs-all - -.PHONY: install -install: fs-install - -.PHONY: uninstall -uninstall: fs-uninstall - include $(XEN_ROOT)/tools/libfsimage/Rules.mk diff --git a/tools/libfsimage/fat/Makefile b/tools/libfsimage/fat/Makefile index 7ee5e7588d..58bcc0751d 100644 --- a/tools/libfsimage/fat/Makefile +++ b/tools/libfsimage/fat/Makefile @@ -4,13 +4,4 @@ LIB_SRCS-y = fsys_fat.c FS = fat -.PHONY: all -all: fs-all - -.PHONY: install -install: fs-install - -.PHONY: uninstall -uninstall: fs-uninstall - include $(XEN_ROOT)/tools/libfsimage/Rules.mk diff --git a/tools/libfsimage/iso9660/Makefile b/tools/libfsimage/iso9660/Makefile index bc86baf2c0..acf3164046 100644 --- a/tools/libfsimage/iso9660/Makefile +++ b/tools/libfsimage/iso9660/Makefile @@ -4,15 +4,4 @@ LIB_SRCS-y = fsys_iso9660.c FS = iso9660 -.PHONY: all -all: fs-all - -.PHONY: install -install: fs-install - -.PHONY: uninstall -uninstall: fs-uninstall - -fsys_iso9660.c: iso9660.h - include $(XEN_ROOT)/tools/libfsimage/Rules.mk diff --git a/tools/libfsimage/reiserfs/Makefile b/tools/libfsimage/reiserfs/Makefile index 5acfedf25e..42b751e007 100644 --- a/tools/libfsimage/reiserfs/Makefile +++ b/tools/libfsimage/reiserfs/Makefile @@ -4,13 +4,4 @@ LIB_SRCS-y = fsys_reiserfs.c FS = reiserfs -.PHONY: all -all: fs-all - -.PHONY: install -install: fs-install - -.PHONY: uninstall -uninstall: fs-uninstall - include $(XEN_ROOT)/tools/libfsimage/Rules.mk diff --git a/tools/libfsimage/ufs/Makefile b/tools/libfsimage/ufs/Makefile index f32b9178bd..cca4f0a588 100644 --- a/tools/libfsimage/ufs/Makefile +++ b/tools/libfsimage/ufs/Makefile @@ -4,13 +4,4 @@ LIB_SRCS-y = fsys_ufs.c FS = ufs -.PHONY: all -all: fs-all - -.PHONY: install -install: fs-install - -.PHONY: uninstall -uninstall: fs-uninstall - include $(XEN_ROOT)/tools/libfsimage/Rules.mk diff --git a/tools/libfsimage/xfs/Makefile b/tools/libfsimage/xfs/Makefile index 54eeb6e35e..ebac7baf14 100644 --- a/tools/libfsimage/xfs/Makefile +++ b/tools/libfsimage/xfs/Makefile @@ -4,13 +4,4 @@ LIB_SRCS-y = fsys_xfs.c FS = xfs -.PHONY: all -all: fs-all - -.PHONY: install -install: fs-install - -.PHONY: uninstall -uninstall: fs-uninstall - include $(XEN_ROOT)/tools/libfsimage/Rules.mk diff --git a/tools/libfsimage/zfs/Makefile b/tools/libfsimage/zfs/Makefile index 084e5ec08d..434a9c3580 100644 --- a/tools/libfsimage/zfs/Makefile +++ b/tools/libfsimage/zfs/Makefile @@ -28,13 +28,4 @@ LIB_SRCS-y = zfs_lzjb.c zfs_sha256.c zfs_fletcher.c fsi_zfs.c fsys_zfs.c FS = zfs -.PHONY: all -all: fs-all - -.PHONY: install -install: fs-install - -.PHONY: uninstall -uninstall: fs-uninstall - include $(XEN_ROOT)/tools/libfsimage/Rules.mk diff --git a/tools/libfsimage/Rules.mk b/tools/libfsimage/Rules.mk index bb6d42abb4..cf37d6cb0d 100644 --- a/tools/libfsimage/Rules.mk +++ b/tools/libfsimage/Rules.mk @@ -1,25 +1,18 @@ -include $(XEN_ROOT)/tools/Rules.mk - -CFLAGS += -Wno-unknown-pragmas -I$(XEN_ROOT)/tools/libfsimage/common/ -DFSIMAGE_FSDIR=\"$(FSDIR)\" -CFLAGS += -Werror -D_GNU_SOURCE -LDFLAGS += -L../common/ - -PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y)) - -FSDIR = $(libdir)/xenfsimage +include $(XEN_ROOT)/tools/libfsimage/common.mk FSLIB = fsimage.so +TARGETS += $(FSLIB) -.PHONY: fs-all -fs-all: $(FSLIB) +.PHONY: all +all: $(TARGETS) -.PHONY: fs-install -fs-install: fs-all +.PHONY: install +install: all $(INSTALL_DIR) $(DESTDIR)$(FSDIR)/$(FS) $(INSTALL_PROG) $(FSLIB) $(DESTDIR)$(FSDIR)/$(FS) -.PHONY: fs-uninstall -fs-uninstall: +.PHONY: uninstall +uninstall: rm -f $(addprefix $(DESTDIR)$(FSDIR)/$(FS)/, $(FSLIB)) if [ -d $(DESTDIR)$(FSDIR)/$(FS) ]; then \ rmdir $(DESTDIR)$(FSDIR)/$(FS); \ @@ -28,7 +21,4 @@ fs-uninstall: $(FSLIB): $(PIC_OBJS) $(CC) $(LDFLAGS) $(SHLIB_LDFLAGS) -o $@ $^ -lxenfsimage $(FS_LIBDEPS) $(APPEND_LDFLAGS) -clean distclean:: - rm -f $(PIC_OBJS) $(FSLIB) $(DEPS_RM) - -include $(DEPS_INCLUDE) diff --git a/tools/libfsimage/common.mk b/tools/libfsimage/common.mk new file mode 100644 index 0000000000..77bc957f27 --- /dev/null +++ b/tools/libfsimage/common.mk @@ -0,0 +1,11 @@ +include $(XEN_ROOT)/tools/Rules.mk + +FSDIR := $(libdir)/xenfsimage +CFLAGS += -Wno-unknown-pragmas -I$(XEN_ROOT)/tools/libfsimage/common/ -DFSIMAGE_FSDIR=\"$(FSDIR)\" +CFLAGS += -Werror -D_GNU_SOURCE +LDFLAGS += -L../common/ + +PIC_OBJS = $(patsubst %.c,%.opic,$(LIB_SRCS-y)) + +clean distclean:: + rm -f $(PIC_OBJS) $(TARGETS) $(DEPS_RM) From patchwork Fri Feb 25 15:13:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760471 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 A30B1C433EF for ; Fri, 25 Feb 2022 15:16:54 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279285.476990 (Exim 4.92) (envelope-from ) id 1nNcKr-0001hh-K7; Fri, 25 Feb 2022 15:16:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279285.476990; Fri, 25 Feb 2022 15:16:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcKr-0001f1-9r; Fri, 25 Feb 2022 15:16:45 +0000 Received: by outflank-mailman (input) for mailman id 279285; Fri, 25 Feb 2022 15:16:42 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcIH-0007Bf-8N for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:14:05 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 90344314-964d-11ec-8eb9-a37418f5ba1a; Fri, 25 Feb 2022 16:14:03 +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: 90344314-964d-11ec-8eb9-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802043; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Qi8ktRfGxKz6TVNBfNc+szyw4+rNfchyhf2q4Nw7GMs=; b=F4n+rKBh+eAVFe6BXWJtVlf0DVGDoWrWGGqNwnlV3Rm9cLmP4WslD5L9 yVj9EjemY8P9TnhQdRq6ZwENXP7InJO+JHWYzIxQNdX4k3IVoRFkKdSJl kr8In1+nV5y6G4QdUQqM2KOlp5VbO8xM3JwxpuM043JWQ4cFV7DmglupJ 0=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 64433034 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:4qtPwK3DISLmD7J/6fbD5blxkn2cJEfYwER7XKvMYLTBsI5bp2YCz TZNDzjSOfneMWT3Kt1zPN+0pEpUvsDTzd9gHldqpC1hF35El5HIVI+TRqvS04J+DSFhoGZPt Zh2hgzodZhsJpPkjk7xdOCn9xGQ7InQLlbGILes1htZGEk1EE/NtTo5w7Rj2tQy3IDja++wk YiaT/P3aQfNNwFcagr424rbwP+4lK2v0N+wlgVWicFj5DcypVFMZH4sDfjZw0/DaptVBoaHq 9Prl9lVyI97EyAFUbtJmp6jGqEDryW70QKm0hK6UID66vROS7BbPg/W+5PwZG8O4whlkeydx /1xj467FiUxN5beicMsUiVqTSxbYYJ/reqvzXiX6aR/zmXDenrohf5vEFs3LcsT/eMf7WNmr KJCbmpXN1ba2rzwkOnTpupE36zPKOHiOp8fvXdxiynUF/88TbjIQrnQ5M8e1zA17ixLNaiCO 5FCMWEzBPjGSwRKGg8PI5UaoMipqGLAagZjik+vo6VitgA/yyQuieOwYbI5YOeiWsF9jkue4 GXc8AzREhwccdCS1zeB2natnfPU2zP2XpoIE7+1/eIsh0ecrlH/EzVPCwH9+6PgzBfjBZQPc CT45xbCs4AOzl6gEfvlViaqsVm1vyIuBdd1T8IDvVTlJrXv3y6VAW0NTzhkYdMgtdMrSTFC6 mJlj+8FFhQ07uTLFCv1GqO86GrrZHNLdTNqiTosEFNdi+QPtr3fmf4mojxLNKeuxuP4Fjjrq 9xhhHhv3u5D5SLnOkjSwLwmv95OjsSYJuLWzl+ONo5A0u+fTNT0D2BPwQKGhcus1K7DEjG8U IEswqByFtwmA5CXjzCqS+4QBryv7PvtGGSC3QMwQ8B9qmz1oybLkWVsDNdWfhYB3iEsI2KBX aMukVkJuM870IWCN8ebnL5d++x1lPO9RLwJp9jfb8ZUY4gZSeN01HoGWKJk5Ei0yBJEufhmY f+zKJ/wZV5HWfUP5GfnHI81jO50rh3SMEuOHPgXOTz8iuHADJNUIJ9YWGazghcRt/vV8F2Iq I8Eb6NnCXx3CYXDX8UeyqZLRXhiEJTxLcmowyCLXoZv+jZbJVw= IronPort-HdrOrdr: A9a23:ghfykK9AO/Fxt7JMo09uk+DgI+orL9Y04lQ7vn2YSXRuHPBw8P re+sjztCWE8Ar5N0tBpTntAsW9qDbnhPtICOoqTNCftWvdyQiVxehZhOOIqVDd8m/Fh4pgPM 9bAtFD4bbLbGSS4/yU3ODBKadD/OW6 X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="64433034" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu Subject: [XEN PATCH v2 10/29] tools/xenpaging: Rework makefile Date: Fri, 25 Feb 2022 15:13:02 +0000 Message-ID: <20220225151321.44126-11-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 - Rename $(SRCS) to $(OBJS-y), we don't need to collect sources. - Rename $(IBINS) to $(TARGETS) - Stop cleaning "xen" and non-set variable $(LIB). Signed-off-by: Anthony PERARD --- tools/xenpaging/Makefile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/xenpaging/Makefile b/tools/xenpaging/Makefile index 04743b335c..e2ed9eaa3f 100644 --- a/tools/xenpaging/Makefile +++ b/tools/xenpaging/Makefile @@ -5,33 +5,33 @@ CFLAGS += $(CFLAGS_libxentoollog) $(CFLAGS_libxenevtchn) $(CFLAGS_libxenctrl) $( LDLIBS += $(LDLIBS_libxentoollog) $(LDLIBS_libxenevtchn) $(LDLIBS_libxenctrl) $(LDLIBS_libxenstore) $(PTHREAD_LIBS) LDFLAGS += $(PTHREAD_LDFLAGS) -POLICY = default +POLICY := default -SRC := -SRCS += file_ops.c xenpaging.c policy_$(POLICY).c -SRCS += pagein.c +OBJS-y := file_ops.o +OBJS-y += xenpaging.o +OBJS-y += policy_$(POLICY).o +OBJS-y += pagein.o CFLAGS += -Werror CFLAGS += -Wno-unused -OBJS = $(SRCS:.c=.o) -IBINS = xenpaging +TARGETS := xenpaging -all: $(IBINS) +all: $(TARGETS) -xenpaging: $(OBJS) +xenpaging: $(OBJS-y) $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(APPEND_LDFLAGS) install: all $(INSTALL_DIR) -m 0700 $(DESTDIR)$(XEN_PAGING_DIR) $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) - $(INSTALL_PROG) $(IBINS) $(DESTDIR)$(LIBEXEC_BIN) + $(INSTALL_PROG) $(TARGETS) $(DESTDIR)$(LIBEXEC_BIN) uninstall: - rm -f $(addprefix $(DESTDIR)$(LIBEXEC_BIN)/, $(IBINS)) + rm -f $(addprefix $(DESTDIR)$(LIBEXEC_BIN)/, $(TARGETS)) clean: - rm -f *.o *~ $(DEPS_RM) xen TAGS $(IBINS) $(LIB) + rm -f *.o *~ $(DEPS_RM) TAGS $(TARGETS) distclean: clean @@ -39,6 +39,6 @@ distclean: clean .PHONY: TAGS TAGS: - etags -t $(SRCS) *.h + etags -t *.c *.h -include $(DEPS_INCLUDE) From patchwork Fri Feb 25 15:13:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760462 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 6355BC433FE for ; Fri, 25 Feb 2022 15:14:10 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279188.476866 (Exim 4.92) (envelope-from ) id 1nNcIA-0001YA-Rz; Fri, 25 Feb 2022 15:13:58 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279188.476866; Fri, 25 Feb 2022 15:13:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcIA-0001Xa-Ll; Fri, 25 Feb 2022 15:13:58 +0000 Received: by outflank-mailman (input) for mailman id 279188; Fri, 25 Feb 2022 15:13:56 +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 1nNcI8-0006fy-FH for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:13:56 +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 8af36756-964d-11ec-8539-5f4723681683; Fri, 25 Feb 2022 16:13:54 +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: 8af36756-964d-11ec-8539-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802034; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PsH7X2yVeRIwZGaTHcN3WknuPqURtR6v199OPOJQpsM=; b=eAU7I2/TBmrBo7+9gVKkVDUdQUjMBvi+VAfFXr9b2rL86r6sLqrC56kh KnfCDi9HVBhVX8v+U5sJ0030DqN9SO1yaV4naZiKlACsfMYjao7mcO0bs scDsZnFSY0eULUv4d/1Vvukv50YTpZt0cZ6IHj7X+3l6fXfANtWD1zcF+ A=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 67264742 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:a1ypo6ll8X08Ba4+jWCeC1Po5gyLJkRdPkR7XQ2eYbSJt1+Wr1Gzt xIcDGDVPPaNYzHwf91ya4jg8EkO6p+AzdQyTAFp+ytnRSMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BCpC48T8kk/vgqoPUUIYoAAgoLeNfYHpn2EoLd9IR2NYy24DjWV7V4 7senuWEULOb828sWo4rw/rrRCNH5JwebxtB4zTSzdgS1LPvvyF94KA3fMldHFOhKmVgJcaoR v6r8V2M1jixEyHBqD+Suu2TnkUiGtY+NOUV45Zcc/DKbhNq/kTe3kunXRa1hIg+ZzihxrhMJ NtxWZOYSwhwPfHWs78mVSIINw0gZYpp1Jn5CC3q2SCT5xWun3rExvxvCAc9PJEC+/YxCmZLn RAaAGlTNFbZ3bvwme/lDLk37iggBJCD0Ic3s3d8zTbfHLA+TIrKWani7t5ExjYgwMtJGJ4yY uJHNmAxMEucOXWjPH82KcwMtaShwUDgTANSkUy3m6At73bcmVkZPL/Fb4OOJ43iqd9utkSXv GXd5EziHwoXcteYzFKt8G+oh+LJtTP2XsQVDrLQ3u5nhhify3IeDDUSVECnur+ph0imQdVdJ kcIvC00osAa60iDXtT7GRqirxa5UgU0AoQKVbdgsUfUl/SSs13x6nU4oiBpatN/t5MsbmcR0 GTZu/+3XRtAnJurYCfInluLlg+aNS8QJG4EQCYLSwoZ/tXuyL0OYgLzosVLS/Ds0ICscd3k6 3XT9XVl2e1P5SIe//jjpTj6bySQSo8lp+LfziHeRSqb4wxwf+ZJjKT4uAGAvZ6swGt0J2RtX UToeeDCvYji7rnXzURhpdnh+pnztp5p1xWG3DZS82EJrWjFxpJaVdk4DMtCDEloKN0YXjTif VXevwhcjLcKYif3MvMuP9/pU5xypUQFKTgDfqqFBjapSsIsHDJrAQk0PRLAt4wTuBJEfV4D1 WezLp/3UCdy5VVPxzuqXeYNuYLHNQhlrV4/savTlkz9uZLHPSb9Ye5cbDOmM7BohIvZ8V692 4sOaKO3J+B3DbSWjt//qtVIczjn7BETWPjLliCgXrXbc1o+RTp4UKe5LHFIU9UNopm5X9zgp hmVMnK0AnKm7ZEbAW1mskxeVY4= IronPort-HdrOrdr: A9a23:IzpogKgnKbNH4PsvRxw1oQxXm3BQXuIji2hC6mlwRA09TySZ// rBoB19726TtN9xYgBZpTnuAsm9qB/nmaKdpLNhWItKPzOW31dATrsSjrcKqgeIc0aVm9K1l5 0QF5SWYOeAdGSS5vya3ODXKbkdKaG8gcKVuds= X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="67264742" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu , "Juergen Gross" , Julien Grall Subject: [XEN PATCH v2 11/29] tools/xenstore: Cleanup makefile Date: Fri, 25 Feb 2022 15:13:03 +0000 Message-ID: <20220225151321.44126-12-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 Regroup *FLAGS together, use $(LDLIBS). Remove $(LDLIBS_xenstored) which was the wrong name name as it doesn't decribe how to link to a potential libxenstored.so, instead add the value to $(LDLIBS) of xenstored. Add SYSTEMD_LIBS into $(LDLIBS) instead of $(LDFLAGS). Remove the "-I." from $(CFLAGS), it shouldn't be needed. Removed $(CFLAGS-y) and $(LDFLAGS-y). $(CFLAGS-y) is already included in $(CFLAGS) and both aren't used anyway. Rename ALL_TARGETS to TARGETS. Only add programmes we want to build in $(TARGETS), not phony-targets (replace "clients"). Store all `xenstored` objs into $(XENSTORED_OBJS-y). Replace one $< by $^ even if there's only one dependency, (xenstore-control). clean: "init-xenstore-domain" isn't built here any more, so stop trying to remove it, remove $(TARGETS). Also regroup all files to be removed in one command, using $(RM). Drop $(MAJOR) and $(MINOR), they aren't used anymore. Drop ".SECONDARY:", it doesn't appear there's intermediate files that would be deleted anymore. Drop "tarball:" target. Signed-off-by: Anthony PERARD Reviewed-by: Juergen Gross --- Notes: v2: - drop MAJOR and MINOR variables - drop tarball rule - drop ".SECONDARY:" - rework "clean:" to have one command tools/xenstore/Makefile | 91 +++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 48 deletions(-) diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile index c86278fdb1..830052c65f 100644 --- a/tools/xenstore/Makefile +++ b/tools/xenstore/Makefile @@ -1,11 +1,7 @@ XEN_ROOT=$(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk -MAJOR = 3.0 -MINOR = 3 - CFLAGS += -Werror -CFLAGS += -I. # Include configure output (config.h) CFLAGS += -include $(XEN_ROOT)/tools/config.h CFLAGS += -I./include @@ -16,71 +12,77 @@ CFLAGS += $(CFLAGS_libxentoolcore) CFLAGS += -DXEN_LIB_STORED="\"$(XEN_LIB_STORED)\"" CFLAGS += -DXEN_RUN_STORED="\"$(XEN_RUN_STORED)\"" -CFLAGS += $(CFLAGS-y) -LDFLAGS += $(LDFLAGS-y) +ifdef CONFIG_STUBDOM +CFLAGS += -DNO_SOCKETS=1 +endif -CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm xenstore-chmod -CLIENTS += xenstore-write xenstore-ls xenstore-watch +XENSTORED_OBJS-y := xenstored_core.o xenstored_watch.o xenstored_domain.o +XENSTORED_OBJS-y += xenstored_transaction.o xenstored_control.o +XENSTORED_OBJS-y += xs_lib.o talloc.o utils.o tdb.o hashtable.o -XENSTORED_OBJS = xenstored_core.o xenstored_watch.o xenstored_domain.o -XENSTORED_OBJS += xenstored_transaction.o xenstored_control.o -XENSTORED_OBJS += xs_lib.o talloc.o utils.o tdb.o hashtable.o +XENSTORED_OBJS-$(CONFIG_Linux) += xenstored_posix.o +XENSTORED_OBJS-$(CONFIG_NetBSD) += xenstored_posix.o +XENSTORED_OBJS-$(CONFIG_FreeBSD) += xenstored_posix.o +XENSTORED_OBJS-$(CONFIG_MiniOS) += xenstored_minios.o -XENSTORED_OBJS_$(CONFIG_Linux) = xenstored_posix.o -XENSTORED_OBJS_$(CONFIG_NetBSD) = xenstored_posix.o -XENSTORED_OBJS_$(CONFIG_FreeBSD) = xenstored_posix.o -XENSTORED_OBJS_$(CONFIG_MiniOS) = xenstored_minios.o +$(XENSTORED_OBJS-y): CFLAGS += $(CFLAGS_libxengnttab) -XENSTORED_OBJS += $(XENSTORED_OBJS_y) -LDLIBS_xenstored += -lrt +xenstored: LDLIBS += $(LDLIBS_libxenevtchn) +xenstored: LDLIBS += $(LDLIBS_libxengnttab) +xenstored: LDLIBS += $(LDLIBS_libxenctrl) +xenstored: LDLIBS += -lrt +xenstored: LDLIBS += $(SOCKET_LIBS) -ALL_TARGETS = clients -ifeq ($(XENSTORE_XENSTORED),y) -ALL_TARGETS += xs_tdb_dump xenstored +ifeq ($(CONFIG_SYSTEMD),y) +$(XENSTORED_OBJS-y): CFLAGS += $(SYSTEMD_CFLAGS) +xenstored: LDLIBS += $(SYSTEMD_LIBS) endif -ifdef CONFIG_STUBDOM -CFLAGS += -DNO_SOCKETS=1 +xenstore: LDLIBS += $(LDLIBS_libxenstore) +xenstore: LDLIBS += $(LDLIBS_libxentoolcore) +xenstore: LDLIBS += $(SOCKET_LIBS) + +xenstore-control: LDLIBS += $(LDLIBS_libxenstore) +xenstore-control: LDLIBS += $(LDLIBS_libxenctrl) +xenstore-control: LDLIBS += $(LDLIBS_libxenguest) +xenstore-control: LDLIBS += $(LDLIBS_libxentoolcore) +xenstore-control: LDLIBS += $(SOCKET_LIBS) + +CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm xenstore-chmod +CLIENTS += xenstore-write xenstore-ls xenstore-watch + +TARGETS := xenstore $(CLIENTS) xenstore-control +ifeq ($(XENSTORE_XENSTORED),y) +TARGETS += xs_tdb_dump xenstored endif .PHONY: all -all: $(ALL_TARGETS) +all: $(TARGETS) .PHONY: clients clients: xenstore $(CLIENTS) xenstore-control -ifeq ($(CONFIG_SYSTEMD),y) -$(XENSTORED_OBJS): CFLAGS += $(SYSTEMD_CFLAGS) -xenstored: LDFLAGS += $(SYSTEMD_LIBS) -endif - -$(XENSTORED_OBJS): CFLAGS += $(CFLAGS_libxengnttab) - -xenstored: $(XENSTORED_OBJS) - $(CC) $^ $(LDFLAGS) $(LDLIBS_libxenevtchn) $(LDLIBS_libxengnttab) $(LDLIBS_libxenctrl) $(LDLIBS_xenstored) $(SOCKET_LIBS) -o $@ $(APPEND_LDFLAGS) +xenstored: $(XENSTORED_OBJS-y) + $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ $(APPEND_LDFLAGS) -xenstored.a: $(XENSTORED_OBJS) +xenstored.a: $(XENSTORED_OBJS-y) $(AR) cr $@ $^ $(CLIENTS): xenstore ln -f xenstore $@ xenstore: xenstore_client.o xs_lib.o - $(CC) $^ $(LDFLAGS) $(LDLIBS_libxenstore) $(LDLIBS_libxentoolcore) $(SOCKET_LIBS) -o $@ $(APPEND_LDFLAGS) + $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ $(APPEND_LDFLAGS) xenstore-control: xenstore_control.o - $(CC) $< $(LDFLAGS) $(LDLIBS_libxenstore) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxentoolcore) $(SOCKET_LIBS) -o $@ $(APPEND_LDFLAGS) + $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ $(APPEND_LDFLAGS) xs_tdb_dump: xs_tdb_dump.o utils.o tdb.o talloc.o - $(CC) $^ $(LDFLAGS) -o $@ $(APPEND_LDFLAGS) + $(CC) $(LDFLAGS) $^ -o $@ $(APPEND_LDFLAGS) .PHONY: clean clean: - rm -f *.a *.o - rm -f xenstored - rm -f xs_tdb_dump xenstore-control init-xenstore-domain - rm -f xenstore $(CLIENTS) - $(RM) $(DEPS_RM) + $(RM) *.a *.o $(TARGETS) $(DEPS_RM) .PHONY: distclean distclean: clean @@ -89,10 +91,6 @@ distclean: clean TAGS: etags `find . -name '*.[ch]'` -.PHONY: tarball -tarball: clean - cd .. && tar -c -j -v -h -f xenstore.tar.bz2 xenstore/ - .PHONY: install install: all $(INSTALL_DIR) $(DESTDIR)$(bindir) @@ -135,6 +133,3 @@ clients-install: clients done -include $(DEPS_INCLUDE) - -# never delete any intermediate files. -.SECONDARY: From patchwork Fri Feb 25 15:13:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760461 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 B7F30C433EF for ; Fri, 25 Feb 2022 15:14:09 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279190.476871 (Exim 4.92) (envelope-from ) id 1nNcIB-0001dV-HV; Fri, 25 Feb 2022 15:13:59 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279190.476871; Fri, 25 Feb 2022 15:13:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcIB-0001bi-4Y; Fri, 25 Feb 2022 15:13:59 +0000 Received: by outflank-mailman (input) for mailman id 279190; Fri, 25 Feb 2022 15:13:57 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcI8-0007Bf-Si for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:13:56 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 8b94b611-964d-11ec-8eb9-a37418f5ba1a; Fri, 25 Feb 2022 16:13:55 +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: 8b94b611-964d-11ec-8eb9-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802035; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=06doEHilS6AKmsVA0dHPUnjlMaGNmuuqrJF1JZCOe3k=; b=Ssfq5I8RyMaki5CLdenUAzYmHgnkW5QMIuMss+cZexCDkhLM9oaw4rRE U4Xf9m7231yK2CTlZd7X3Wbz+dR89K4HaIqDz+h/0IuIix02vEEuvLPOX nHYtnlEwRmWPZTMeRtd6TUz21HxifgFCX96hA/an9pf0z7um9KDNF9Iop Y=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 64890254 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:EPQnR6gvCnA1+n0BGDUxZttuX161CxAKZh0ujC45NGQN5FlHY01je htvCD/TM67ZZDH2f9tzat/g80sA6pSEmIAwSgFrqSAyQiIb9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oDJ9CU6jefSLlbFILas1hpZHGeIcw98z0M78wIFqtQw24LhWVnQ4 YmaT/D3YzdJ5RYlagr41IrbwP9flKyaVOQw5wFWiVhj5TcyplFNZH4tDfjZw0jQG+G4KtWSV efbpIxVy0uCl/sb5nFJpZ6gGqECaua60QFjERO6UYD66vRJjnRaPqrWqJPwwKqY4tmEt4kZ9 TlDiXC/YVd3MpXTivssahJRHAI9Aal58uf9LVHq5KR/z2WeG5ft6/BnDUVwNowE4OdnR2pJ8 JT0KhhUMErF3bjvhuvmFK883azPL+GyVG8bknhm0THeC+dgWZ3ZSr/GzdRZwC0xloZFGvO2i 88xN2Y/PUyaPkEn1lE/MtEBmLqWgUvFWgJogxGeg4ce/mH65VkkuFTqGIWMIYHbLSlPpW6Ho krW8mK/BQsVXPSPxDzA/n+yi+vnmSLgRJlUBLC+7uRtglCY2ioUEhJ+aLegiaDn0AjkAYsZc hFKvHp1xUQvyKC1ZomjUyWnsmG1hxUVVPkTL+kF4lm3xoOBtm51GVM4ZjJGbdUnsuo/Sjory kKFkrvVONB/jFGGYSnDr+nJ9FteLQBQdDZfPnFcEWPp9vG++Nlbs/7Zcjp0/EdZZPXRECq4/ T2FpTNWa1473Z9SjPXTEbwqbluRSnn1ouwdulS/soGNtFoRiGuZi2qAswmzARFodtvxc7V5l CJY8/VyFchXZX13qASDQf8WAJai7OufPTvXjDZHRsd9qmvxoiL+JdgIuFmSwXuF1O5eKFcFh 2eJ5GtsCGJ7ZiP2PcebnarrYyjV8UQQPYu8Da2FBja/SpNwaBWG7ElTib24hAjQfLwXufhnY /+zKJ/0ZV5DUPgP5GfmFo81jO5wrghjlDy7eHwO50n+uVZoTCXOEult3ZrnRr1R0Z5oVy2Oq 4cPb5bRkk4HOAA8CwGOmbMuwZkxBSBTLfjLRwZ/LIZv/iIO9LkdNsLs IronPort-HdrOrdr: A9a23:M4+jDK1C+nj0VAtkpVbo/QqjBIokLtp133Aq2lEZdPRUGvb3qy nIpoV86faUskdoZJhOo7C90cW7LU80sKQFhLX5Xo3SOzUO2lHYT72KhLGKq1aLdhEWtNQtsZ uIG5IOceEYZmIasS+V2maF+q4bsbu6zJw= X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="64890254" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu Subject: [XEN PATCH v2 12/29] tools/xentop: rework makefile Date: Fri, 25 Feb 2022 15:13:04 +0000 Message-ID: <20220225151321.44126-13-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-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. Use $(TARGETS) with $(INSTALL_PROG), and thus install into the directory rather than spelling the program name. In the "clean" rule, use $(RM) and remove all "*.o" instead of just one object. Signed-off-by: Anthony PERARD --- Notes: v2: - use $(RM) in clean. - remove all *.o instead of just one object in "clean" rule. - in "install" rule, make use of $(TARGETS). install into a dir rather than to a specific path, in case there's more targets. tools/Makefile | 2 +- tools/xentop/Makefile | 21 +++++++++------------ 2 files changed, 10 insertions(+), 13 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..7bd96f34d5 100644 --- a/tools/xentop/Makefile +++ b/tools/xentop/Makefile @@ -13,36 +13,33 @@ 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 + $(INSTALL_PROG) $(TARGETS) $(DESTDIR)$(sbindir) .PHONY: uninstall uninstall: rm -f $(DESTDIR)$(sbindir)/xentop -endif - .PHONY: clean clean: - rm -f xentop xentop.o $(DEPS_RM) + $(RM) *.o $(TARGETS) $(DEPS_RM) .PHONY: distclean distclean: clean From patchwork Fri Feb 25 15:13:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760480 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 AE8D5C433EF for ; Fri, 25 Feb 2022 15:17:03 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279304.477058 (Exim 4.92) (envelope-from ) id 1nNcKz-0003hz-8f; Fri, 25 Feb 2022 15:16:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279304.477058; Fri, 25 Feb 2022 15:16:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcKy-0003er-PS; Fri, 25 Feb 2022 15:16:52 +0000 Received: by outflank-mailman (input) for mailman id 279304; Fri, 25 Feb 2022 15:16:50 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcI9-0007Bf-TA for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:13:58 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 8cf1125a-964d-11ec-8eb9-a37418f5ba1a; Fri, 25 Feb 2022 16:13:56 +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: 8cf1125a-964d-11ec-8eb9-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802036; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DRUZBzwipLHVi3LrT/VXUcevANDycChtXk37Vv5NYiY=; b=N1/SCWTsIS83qYO6zuT4boiHmdXlCLJ4oqRlBFDVj8gCQqHqNf3OHkss 6F6f//40Xiwsqek4hQC1plEPJ4/h7KCPxHOuq+hEJN/qI8lcyHckQTS2Q hfqS9i5x2pPswd9mxspzmRcaolCiwt5T4XjU8tiPND4ENfOkgsZhKlRRp 8=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 64890255 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:gHA4S6NzNahL3zPvrR3Ol8FynXyQoLVcMsEvi/4bfWQNrUp20jJSn WsbUTiGO6mIMGP3KttzPY609kIEvJPUm4UxGQto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdleF+lH1dOKJQUBUjclkfJKlYAL/En03FFcMpBsJ00o5wbZj2NMw27BVPivW0 T/Mi5yHULOa82Yc3lI8s8pvfzs24ZweEBtB1rAPTagjUG32zhH5P7pGTU2FFFPqQ5E8IwKPb 72rIIdVXI/u10xF5tuNyt4Xe6CRK1LYFVDmZnF+A8BOjvXez8CbP2lS2Pc0MC9qZzu1c99Zw fZNnIC3WVYSF4r8setMbBZkTS9RMvgTkFPHCSDXXc27ykTHdz3nwul0DVFwNoodkgp1KTgQr 7pCcmlLN03dwbLtqF64YrAEasALJc/3PIQZqzd4wCvQF/oOSpHfWaTao9Rf2V/cg+gQQaaPP 5BENFKDajz9PSNkeWUbKa4Fu7+qqCTWKWMFpV6a8P9fD2/7k1UqjemF3MDuUsOObdVYmACfv G2u13T0BFQWOcKSzRKB82mwnanfkCXjQoUQGbaksPlwjzWuKnc7UUNMEwHh+L/g1xD4C4k3x 1EoFjQGpIsy3VCsXojGdjqIiXHVgREgBdR/HLhvgO2S8Zb87wGcD2kCazdObt06qcM7LQAXO k+1c8DBXmI27uDMIZ6J3vLN9G7pZ3BJRYMXTXJcFWM4D8/fTJbfZ/4lZvJqC+aLg9L8AlkcK Bja/XFl193/YSPmvphXHGwrYRrw9/AlrSZvv207u15JCCsjNeZJgKTytDDmAQ5odtrxc7V4l CFsdzKixO4PF4qRsyeGXf8AGrqkj97cbmGB3gI2Q8R5r2z1k5JGQWy2yGsvTKuOGpxZEQIFn WeJ4V8BjHOtFCHCgVBLj3KZVJ1xkPmI+SXNXfHIdNteCqWdhyfclByCkXW4hji3+GB1yPlXE c7CLa6EUCZLYYw6nWHeb7pMjtcWKtUWmDq7qWbTlE/8j9JzpRe9FN84Dbd5RrthvfPc/V6Mq I432gnj40w3bdASqxL/qeY7RW3m51BibXwqg6S7rtK+Hzc= IronPort-HdrOrdr: A9a23:+qM2u6BQamjKN2TlHemU55DYdb4zR+YMi2TC1yhKJyC9Ffbo8f xG/c5rrSMc5wxwZJhNo7y90ey7MBbhHP1OkO4s1NWZLWrbUQKTRekIh+bfKn/baknDH4ZmpN 5dmsNFaeEYY2IUsS+D2njbL+od X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="64890255" From: Anthony PERARD To: CC: Anthony PERARD , George Dunlap , Wei Liu Subject: [XEN PATCH v2 13/29] tools/xentrace: rework Makefile Date: Fri, 25 Feb 2022 15:13:05 +0000 Message-ID: <20220225151321.44126-14-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 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 --- Notes: v2: - fix typo in title - drop conditional install of $(BIN) and $(LIBBIN) tools/xentrace/Makefile | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/tools/xentrace/Makefile b/tools/xentrace/Makefile index 9fb7fc96e7..0995fa9203 100644 --- a/tools/xentrace/Makefile +++ b/tools/xentrace/Makefile @@ -14,36 +14,31 @@ SBIN = xentrace xentrace_setsize LIBBIN = xenctx SCRIPTS = xentrace_format -.PHONY: all -all: build +TARGETS := $(BIN) $(SBIN) $(LIBBIN) -.PHONY: build -build: $(BIN) $(SBIN) $(LIBBIN) +.PHONY: all +all: $(TARGETS) .PHONY: install -install: build +install: all $(INSTALL_DIR) $(DESTDIR)$(bindir) $(INSTALL_DIR) $(DESTDIR)$(sbindir) - [ -z "$(LIBBIN)" ] || $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) -ifneq ($(BIN),) + $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) $(INSTALL_PROG) $(BIN) $(DESTDIR)$(bindir) -endif $(INSTALL_PROG) $(SBIN) $(DESTDIR)$(sbindir) $(INSTALL_PYTHON_PROG) $(SCRIPTS) $(DESTDIR)$(bindir) - [ -z "$(LIBBIN)" ] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(LIBEXEC_BIN) + $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(LIBEXEC_BIN) .PHONY: uninstall uninstall: rm -f $(addprefix $(DESTDIR)$(LIBEXEC_BIN)/, $(LIBBIN)) rm -f $(addprefix $(DESTDIR)$(bindir)/, $(SCRIPTS)) rm -f $(addprefix $(DESTDIR)$(sbindir)/, $(SBIN)) -ifneq ($(BIN),) rm -f $(addprefix $(DESTDIR)$(bindir)/, $(BIN)) -endif .PHONY: clean clean: - $(RM) *.a *.so *.o *.rpm $(BIN) $(SBIN) $(LIBBIN) $(DEPS_RM) + $(RM) *.o $(TARGETS) $(DEPS_RM) .PHONY: distclean distclean: clean From patchwork Fri Feb 25 15:13:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760464 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 07C55C433EF for ; Fri, 25 Feb 2022 15:14:17 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279194.476899 (Exim 4.92) (envelope-from ) id 1nNcII-000365-Rx; Fri, 25 Feb 2022 15:14:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279194.476899; Fri, 25 Feb 2022 15:14:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcII-00035Y-FQ; Fri, 25 Feb 2022 15:14:06 +0000 Received: by outflank-mailman (input) for mailman id 279194; Fri, 25 Feb 2022 15:14:05 +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 1nNcIH-0006fy-Ap for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:14:05 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 90b877c9-964d-11ec-8539-5f4723681683; Fri, 25 Feb 2022 16:14:04 +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: 90b877c9-964d-11ec-8539-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802044; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ECjrP9xItuWCPbZk1vIvsP9mwRYqVRzBpP4c/9vcJbk=; b=AtUAtz/gP8g1le1Y+n21yZF/MJ5bWkIbGsA2cgJ3nsByF9RLqWB+xMIO A0UYQjqKaKWKuHVbvQ8oskmAdLZ0EwBLLLqBRugs6TEKXMS7uTf/7qQ0s XwQK/g4xB6sv9RGtV9EGi5M8p/ADZHwA5zuP/+QM2+wQ04/5XIOIbJVvm 0=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 64433043 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:BEphi65W27NUIGGmTy09ZQxRtD3HchMFZxGqfqrLsTDasY5as4F+v jFLX2qGP6rcN2GjeNojaY7koBwFv8XQy9FhGlRpqHg9Hi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuVGuG96yE6j8lkf5KkYAL+EnkZqTRMFWFw0XqPp8Zj2tQy2YLjXlvX0 T/Pi5a31GGNimYc3l08s8pvmDs31BglkGpF1rCWTakjUG72zxH5PrpGTU2CByKQrr1vNvy7X 47+IISRpQs1yfuP5uSNyd4XemVSKlLb0JPnZnB+A8BOiTAazsA+PzpS2FPxpi67hh3Q9+2dx umhurToSj8wF4vPuNgceEhhTihHYIFX2ZPIdC3XXcy7lyUqclPpyvRqSko3IZcZ6qB8BmQmG f4wcW5XKErZ3qTvnez9GrIEascLdaEHOKsWvG1gyjfIS+4rW5nZT43B5MNC3Sd2jcdLdRrbT 5RFNWE0NEibC/FJEm1PDcMGo+7yvSbcdSVolEnEq4kw8lGGmWSd15CyaYGIK7RmX/59gUKwt m/AuWPjDXkyNtOFziGe2mmxneKJliT+MKoCGbv9+vN0jVm7wm0IFAZQRVa9ueO+iEO1R5RYM UN8x8Y1hfFsrgrxFIC7BkDm5i7f1vIBZzZOO7U50Bik7Kn03weyV1FZRwccRM0HmMBjEFTGy WS1t9/uADVutpicRnSc6qqYoFuOBMQFEYMRTXRaFFVYurEPtKl210uSFYg7TMZZm/WoQWmY/ tyckMQpa1z/Z+Yv3r7zw13IiinESnPhHl9svVW/so5IA2pEiG+Zi26AtQmzARVodt/xory9U J4swZn2AAcmV8zlqcB1aL9RdIxFHt7cWNEmvXZhHoM66xOm8GO5cIZb7VlWfRk1b5lYIGO0O BeL4Wu9AaO/2lPwPMebhKrrVqwXIVXIT4y5Bpg4kPIUCnSOSON31H43PhPBt4wcuEMtjbs+K f+mnTWEVh4n5VBc5GPuHY81iOZzrghnnD+7bc2rnnyPjOvFDFbIGOhtDbd7Rr1ghE9yiF6Oq Ig32grj40g3bdASlQGMqd9DdQ1RdCNjbX00wuQOHtO+zsNdMDlJI5fsLXkJIdcNc3h9/gsQw kyAZw== IronPort-HdrOrdr: A9a23:73PudKs1DQmwVPdIvLu9yGJ/7skDcNV00zEX/kB9WHVpmszxra +TdZMgpHjJYVcqKQgdcL+7WZVoLUmwyXcx2/hyAV7AZniDhILLFuFfBOLZqlWKcREWtNQtsJ uIG5IObuEYZmIVsS+V2mWF+q4bsbq6zJw= X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="64433043" From: Anthony PERARD To: CC: Anthony PERARD , Juergen Gross , Wei Liu Subject: [XEN PATCH v2 14/29] libs: rename LDUSELIBS to LDLIBS and use it instead of APPEND_LDFLAGS Date: Fri, 25 Feb 2022 15:13:06 +0000 Message-ID: <20220225151321.44126-15-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 LDLIBS is more appropriate and intended to be used to add library dependencies. APPEND_LDFLAGS wasn't intended to be changed by the build system. Signed-off-by: Anthony PERARD Reviewed-by: Juergen Gross --- Notes: v2: - reviewed tools/libs/guest/Makefile | 2 +- tools/libs/hypfs/Makefile | 2 +- tools/libs/light/Makefile | 18 +++++++++--------- tools/libs/stat/Makefile | 2 +- tools/libs/store/Makefile | 2 +- tools/libs/libs.mk | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tools/libs/guest/Makefile b/tools/libs/guest/Makefile index ab580e1b64..2005d8a67d 100644 --- a/tools/libs/guest/Makefile +++ b/tools/libs/guest/Makefile @@ -102,7 +102,7 @@ NO_HEADERS_CHK := y include $(XEN_ROOT)/tools/libs/libs.mk -libxenguest.so.$(MAJOR).$(MINOR): APPEND_LDFLAGS += $(ZLIB_LIBS) -lz +libxenguest.so.$(MAJOR).$(MINOR): LDLIBS += $(ZLIB_LIBS) -lz .PHONY: cleanlocal cleanlocal: diff --git a/tools/libs/hypfs/Makefile b/tools/libs/hypfs/Makefile index 39feca87e8..efa955bd50 100644 --- a/tools/libs/hypfs/Makefile +++ b/tools/libs/hypfs/Makefile @@ -4,7 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 0 -APPEND_LDFLAGS += -lz +LDLIBS += -lz SRCS-y += core.c diff --git a/tools/libs/light/Makefile b/tools/libs/light/Makefile index 453bea0067..7c0a5dca85 100644 --- a/tools/libs/light/Makefile +++ b/tools/libs/light/Makefile @@ -166,14 +166,14 @@ NO_HEADERS_CHK := y include $(XEN_ROOT)/tools/libs/libs.mk -LDUSELIBS-y += $(PTYFUNCS_LIBS) -LDUSELIBS-$(CONFIG_LIBNL) += $(LIBNL3_LIBS) -LDUSELIBS-$(CONFIG_Linux) += -luuid -LDUSELIBS-$(CONFIG_Linux) += -lrt -LDUSELIBS-$(CONFIG_ARM) += -lfdt -LDUSELIBS-y += $(PTHREAD_LIBS) -LDUSELIBS-y += -lyajl -LDUSELIBS += $(LDUSELIBS-y) +LDLIBS-y += $(PTYFUNCS_LIBS) +LDLIBS-$(CONFIG_LIBNL) += $(LIBNL3_LIBS) +LDLIBS-$(CONFIG_Linux) += -luuid +LDLIBS-$(CONFIG_Linux) += -lrt +LDLIBS-$(CONFIG_ARM) += -lfdt +LDLIBS-y += $(PTHREAD_LIBS) +LDLIBS-y += -lyajl +LDLIBS += $(LDLIBS-y) $(LIB_OBJS) $(PIC_OBJS) $(LIBXL_TEST_OBJS): CFLAGS += $(CFLAGS_LIBXL) -include $(XEN_ROOT)/tools/config.h $(ACPI_OBJS) $(ACPI_PIC_OBJS): CFLAGS += -I. -DLIBACPI_STDUTILS=\"$(CURDIR)/libxl_x86_acpi.h\" @@ -228,7 +228,7 @@ $(XEN_INCLUDE)/_%.h: _%.h $(call move-if-changed,_$*.h,$(XEN_INCLUDE)/_$*.h) libxenlight_test.so: $(PIC_OBJS) $(LIBXL_TEST_OBJS) - $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenlight.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(LDUSELIBS) $(APPEND_LDFLAGS) + $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenlight.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(LDLIBS) $(APPEND_LDFLAGS) test_%: test_%.o test_common.o libxenlight_test.so $(CC) $(LDFLAGS) -o $@ $^ $(filter-out %libxenlight.so, $(LDLIBS_libxenlight)) $(LDLIBS_libxentoollog) $(LDLIBS_libxentoolcore) -lyajl $(APPEND_LDFLAGS) diff --git a/tools/libs/stat/Makefile b/tools/libs/stat/Makefile index 5840213376..6cd0af5239 100644 --- a/tools/libs/stat/Makefile +++ b/tools/libs/stat/Makefile @@ -26,7 +26,7 @@ SRCS-$(CONFIG_FreeBSD) += xenstat_freebsd.c LDLIBS-y += -lyajl LDLIBS-$(CONFIG_SunOS) += -lkstat -APPEND_LDFLAGS += $(LDLIBS-y) +LDLIBS += $(LDLIBS-y) include $(XEN_ROOT)/tools/libs/libs.mk diff --git a/tools/libs/store/Makefile b/tools/libs/store/Makefile index 8e33db6a66..18ae1fe94d 100644 --- a/tools/libs/store/Makefile +++ b/tools/libs/store/Makefile @@ -5,7 +5,7 @@ MAJOR = 4 MINOR = 0 ifeq ($(CONFIG_Linux),y) -APPEND_LDFLAGS += -ldl +LDLIBS += -ldl endif SRCS-y += xs_lib.c diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk index b3d784c57f..3118cb4194 100644 --- a/tools/libs/libs.mk +++ b/tools/libs/libs.mk @@ -18,7 +18,7 @@ CFLAGS += -Werror -Wmissing-prototypes CFLAGS += $(CFLAGS_xeninclude) CFLAGS += $(foreach lib, $(USELIBS_$(LIBNAME)), $(CFLAGS_libxen$(lib))) -LDUSELIBS = $(foreach lib, $(USELIBS_$(LIBNAME)), $(LDLIBS_libxen$(lib))) +LDLIBS += $(foreach lib, $(USELIBS_$(LIBNAME)), $(LDLIBS_libxen$(lib))) LIB_OBJS := $(SRCS-y:.c=.o) PIC_OBJS := $(SRCS-y:.c=.opic) @@ -88,7 +88,7 @@ lib$(LIB_FILE_NAME).so.$(MAJOR): lib$(LIB_FILE_NAME).so.$(MAJOR).$(MINOR) $(SYMLINK_SHLIB) $< $@ lib$(LIB_FILE_NAME).so.$(MAJOR).$(MINOR): $(PIC_OBJS) libxen$(LIBNAME).map - $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,lib$(LIB_FILE_NAME).so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDUSELIBS) $(APPEND_LDFLAGS) + $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,lib$(LIB_FILE_NAME).so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS) $(APPEND_LDFLAGS) # If abi-dumper is available, write out the ABI analysis ifneq ($(ABI_DUMPER),) From patchwork Fri Feb 25 15:13:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760463 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 A033CC433F5 for ; Fri, 25 Feb 2022 15:14:14 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279192.476888 (Exim 4.92) (envelope-from ) id 1nNcIG-0002VC-4m; Fri, 25 Feb 2022 15:14:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279192.476888; Fri, 25 Feb 2022 15:14:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcIF-0002Uw-UM; Fri, 25 Feb 2022 15:14:03 +0000 Received: by outflank-mailman (input) for mailman id 279192; Fri, 25 Feb 2022 15:14:01 +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 1nNcID-0006fy-KF for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:14:01 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 8ea134df-964d-11ec-8539-5f4723681683; Fri, 25 Feb 2022 16:14:00 +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: 8ea134df-964d-11ec-8539-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802040; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vttR2ey9IAO0GfyGTtbLDlIQNMB1Ci4jM1PA3CUcb8k=; b=KB/LrD5ag1nUBMErNqY/ChMDFWQ/L4vdX+ZeIxXusFwnzpbGIg2j4nux /z7s0Aye08Uk0Sz9lCjJZyu//lXdoGIKw2fx8ZZBctivT0dstXfJ46llD Xq6Vy/JVNiT7PlBKvws8xv+sXYJ3KKFf6q7ZHM8LeIbygqJCs6dvFo+rf 0=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 65000303 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:D2Lds6sCbDgK7S4cYOrOCa6QDOfnVCxeMUV32f8akzHdYApBsoF/q tZmKWyEaf+MNmbxc4sgao23/UsC75+Gy941Gwptri5kEy5G+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZhSAgk/nOHNIQMcacUsxLbVYMpBwJ1FQyw4bVvqYy2YLjW1nX5 IuoyyHiEATNNwBcYzp8B52r8HuDjNyq0N/PlgVjDRzjlAa2e0g9VPrzF4noR5fLatA88tqBb /TC1NmEElbxpH/BPD8HfoHTKSXmSpaKVeSHZ+E/t6KK2nCurQRquko32WZ1he66RFxlkvgoo Oihu6BcRi9uY4bl3/oMCyVBHmZsJvBC+uPcBCKg5Jn7I03uKxMAwt1rBUAye4YZ5vx2ESdF8 vlwxDIlN07ZwbjsmfTiF7cq1p9LwMrDZevzvllpyy3ZCvA3B4jOWazQ6fdT3Ssqh9AIFvHbD yYcQWQyNEyYOEUUUrsRII4dssv5nynAShtnjW6Xi/co6nTLzSUkhdABN/KKI4fXFK25hH2wp G3c+H/iKgoHL9HZwj2AmlqzgsffkCW9X5gdfJWo+/gvjFCNy2g7DBwNSUD9sfS/klS5Wd9UN woT4CVGkEQp3BX1FJ+nBUT++SPa+E5HMzZNLwEkwEbQ4YOT/RfBOnEJCSxaNdgk6NQTHyN/g zdlgOjVLTBotbSUT1eU+bGVsS6+NEApEIMSWcMXZVBbuoe++enfmjqKF48+S/Dt0rUZDBmtm 2jikcQou1kEYSfnPY2f9EuPvT+jr4OhouUdtlSOBTLNAu+UieeYi22UBbrzsacowGWxFADpU J04dy62trFm4XalznHlfQn1NOv1j8tpyRWF6bKVI7Ev9i6251modp1K7Td1KS9Ba5hYJGC1O ROO4VsJvPe/2UdGi4ctMupd7OxwkMDd+SnNDKiIPrKinLArHON4wM2eTRHJhD28+KTduao+J Y2aYa6R4YUyUsxaIM6Nb75Fi9cDn3lmrUuKHMyT50n3gNK2OS/OIZ9YYQTmUwzMxP7dyOkj2 40EbJXiJtQ2eLCWXxQ7BqZIdQFadSVgXMuuwyGVH8baSjdb9KgaI6e56dscl0ZNxMy5Ss+gE qmBZ3Jl IronPort-HdrOrdr: A9a23:oa4zPK2qm5e5XYUDTcpd6AqjBLgkLtp133Aq2lEZdPRUGvb2qy nIpoV/6faUskd3ZJhOo7G90cW7LE80lqQFg7X5X43DYOCOggLBR+tfBOPZslnd8kbFmNK1u5 0NT0EHMqySMWRH X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="65000303" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu , "Juergen Gross" Subject: [XEN PATCH v2 15/29] libs: Remove need for *installlocal targets Date: Fri, 25 Feb 2022 15:13:07 +0000 Message-ID: <20220225151321.44126-16-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 There is no need for an extra "installlocal" target, we can use double-colon rules instead. "install-headers" in "libs/store" was introduced for the same reason that "installlocal" exist, so it is replaced as well. Signed-off-by: Anthony PERARD Reviewed-by: Juergen Gross --- Notes: v2: - fix libs/stat/Makefile, make *install targets of the binding also double-column. tools/libs/light/Makefile | 10 ++-------- tools/libs/stat/Makefile | 8 ++++---- tools/libs/store/Makefile | 10 ++-------- tools/libs/libs.mk | 4 ++-- 4 files changed, 10 insertions(+), 22 deletions(-) diff --git a/tools/libs/light/Makefile b/tools/libs/light/Makefile index 7c0a5dca85..769e2a83e2 100644 --- a/tools/libs/light/Makefile +++ b/tools/libs/light/Makefile @@ -239,17 +239,11 @@ libxl-save-helper: $(SAVE_HELPER_OBJS) libxenlight.so testidl: testidl.o libxenlight.so $(CC) $(LDFLAGS) -o $@ testidl.o $(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) $(LDLIBS_libxentoolcore) $(APPEND_LDFLAGS) -install: installlocal $(LIBHEADERS) - -.PHONY: installlocal -installlocal: libxl-save-helper +install:: $(LIBHEADERS) libxl-save-helper $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) $(INSTALL_PROG) libxl-save-helper $(DESTDIR)$(LIBEXEC_BIN) -uninstall: uninstalllocal - -.PHONY: uninstalllocal -uninstalllocal: +uninstall:: rm -f $(DESTDIR)$(LIBEXEC_BIN)/libxl-save-helper clean: cleanlocal diff --git a/tools/libs/stat/Makefile b/tools/libs/stat/Makefile index 6cd0af5239..1aef25a9bb 100644 --- a/tools/libs/stat/Makefile +++ b/tools/libs/stat/Makefile @@ -78,8 +78,8 @@ uninstall-python-bindings: ifeq ($(XENSTAT_PYTHON_BINDINGS),y) .PHONY: all all: python-bindings -install: install-python-bindings -uninstall: uninstall-python-bindings +install:: install-python-bindings +uninstall:: uninstall-python-bindings endif # Perl bindings @@ -111,8 +111,8 @@ ifeq ($(XENSTAT_PERL_BINDINGS),y) all: perl-bindings .PHONY: install -install: install-perl-bindings -uninstall: uninstall-perl-bindings +install:: install-perl-bindings +uninstall:: uninstall-perl-bindings endif clean: cleanlocal diff --git a/tools/libs/store/Makefile b/tools/libs/store/Makefile index 18ae1fe94d..b94060be8d 100644 --- a/tools/libs/store/Makefile +++ b/tools/libs/store/Makefile @@ -30,10 +30,7 @@ xs.opic: CFLAGS += -DUSE_DLSYM endif .PHONY: install -install: install-headers - -.PHONY: install-headers -install-headers: +install:: $(INSTALL_DIR) $(DESTDIR)$(includedir) $(INSTALL_DIR) $(DESTDIR)$(includedir)/xenstore-compat $(INSTALL_DATA) $(XEN_INCLUDE)/xenstore-compat/xs.h $(DESTDIR)$(includedir)/xenstore-compat/xs.h @@ -42,10 +39,7 @@ install-headers: ln -sf xenstore-compat/xs_lib.h $(DESTDIR)$(includedir)/xs_lib.h .PHONY: uninstall -uninstall: uninstall-headers - -.PHONY: uninstall-headers -uninstall-headers: +uninstall:: rm -f $(DESTDIR)$(includedir)/xs_lib.h rm -f $(DESTDIR)$(includedir)/xs.h rm -f $(DESTDIR)$(includedir)/xenstore-compat/xs_lib.h diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk index 3118cb4194..a173f59a8b 100644 --- a/tools/libs/libs.mk +++ b/tools/libs/libs.mk @@ -100,7 +100,7 @@ endif endif .PHONY: install -install: all +install:: all $(INSTALL_DIR) $(DESTDIR)$(libdir) $(INSTALL_DIR) $(DESTDIR)$(includedir) $(INSTALL_SHLIB) lib$(LIB_FILE_NAME).so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir) @@ -111,7 +111,7 @@ install: all $(INSTALL_DATA) $(PKG_CONFIG) $(DESTDIR)$(PKG_INSTALLDIR) .PHONY: uninstall -uninstall: +uninstall:: rm -f $(DESTDIR)$(PKG_INSTALLDIR)/$(LIB_FILE_NAME).pc for i in $(LIBHEADER); do rm -f $(DESTDIR)$(includedir)/$$i; done rm -f $(DESTDIR)$(libdir)/lib$(LIB_FILE_NAME).so From patchwork Fri Feb 25 15:13:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760466 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 11FEDC433EF for ; Fri, 25 Feb 2022 15:16:31 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279248.476920 (Exim 4.92) (envelope-from ) id 1nNcKT-00074y-NQ; Fri, 25 Feb 2022 15:16:21 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279248.476920; Fri, 25 Feb 2022 15:16:21 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcKT-00074r-Jz; Fri, 25 Feb 2022 15:16:21 +0000 Received: by outflank-mailman (input) for mailman id 279248; Fri, 25 Feb 2022 15:16:20 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcII-0007Bf-QD for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:14:06 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 9233d2c5-964d-11ec-8eb9-a37418f5ba1a; Fri, 25 Feb 2022 16:14:05 +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: 9233d2c5-964d-11ec-8eb9-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802045; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ucmQHqhfA/0/4TjBEifr4fx+A1LGfu70XMt0V9W8px4=; b=XjNQ8kTxd1DYdklKUzRPdh0s4EdJDjQ75IjyFTmG00shNupOPGmg3q1H Wx4e62okaiccej9Ico6hky1VNSJAWtBKSzJbVPkuFvHWql7uPd/NmBsfj PDUEZQAGeb6dKvOvOtLmgSGaQPNmdZRFfzk6dfsOnH6EZRokC51sa21UD 4=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 64433048 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:chIKra+G99YQrBgf6eO+DrUDhX6TJUtcMsCJ2f8bNWPcYEJGY0x3z WMWCDjXPKqMajb0c49+aI7i8xhVuMDRzNFiG1Y5qyw8E34SpcT7XtnIdU2Y0wF+jyHgoOCLy +1EN7Es+ehtFie0Si+Fa+Sn9T8mvU2xbuKU5NTsY0idfic5DnZ54f5fs7Rh2NQw24LkW1nlV e7a+KUzBnf0g1aYDUpMg06zgEsHUCPa4W5wUvQWPJinjXeG/5UnJMt3yZKZdhMUdrJ8DO+iL 9sv+Znilo/vE7XBPfv++lrzWhVirrc/pmFigFIOM0SpqkAqSiDfTs/XnRfTAKtao2zhojx/9 DlCnaWOaA0zP6jRpPRDCgZ9Mzs9H61Nx7CSdBBTseTLp6HHW37lwvEoB0AqJ4wIvO1wBAmi9 9RBdmpLNErawbvrnvTrEYGAhex6RCXvFIoZpnFnyyCfFfs8SIrPa67L+cVZzHE7gcUm8fP2O ZZFMmE3MESojxtnEHk3MaIjk+mUnmT7Ug9c9BWclYs6yj2GpOB2+Oe0a4eEEjCQfu1XkVyfv Xnu5HniD1cRM9n34SWB2mKhgKnIhyyTcJIfEvi0++BnhHWXx3cPE1sGWF2ju/67h0WiHdVFJ CQpFjEG9PZoshbxF5+kAkP+8CXsUgMgt8R4KtMb4huMz7fo81jAGU0kVH1jaNcZu5pjLdA17 WOhk9TsDD1plbSaT3OB67uZxQ+P1TgpwXwqPnFdE1ZcizX3iMRq10+UEI4/eEKgpoCtQVnNL ya2QD/Sbln5peoCzO2F8F/OmFpATbCZH1dutm07so9Ihz6VhbJJhaT0uDA3Dt4ade51q2VtW lBeyqByC8hUUPmweNSlGrllIV1Qz6/t3MfgqVBuBYI90D+m5mSue4tdiBknehs0bZpdJWKxO BeL0e+02HO1FCH7BUOQS9jsY/nGMIC6TYi1PhwqRoAmjmdNmP+vo3g1OB/4M5HFm0kwi6AvU ap3gu73ZUv2/Z9PlWLsL89EiOdD7nlnmQv7GMCqpzz6gOH2TCPEFt843K6mM7lRAFWs+16Or b6y9qKiln1ibQEJSnKPoN5LcAtTdiBT6FKfg5U/S9Nv6zFOQAkJY8I9C5t7I+SJQ4w9ej/0w 0yA IronPort-HdrOrdr: A9a23:1SBHSKyZzm3UNs6jJ+gNKrPwJr1zdoMgy1knxilNoRw8SKOlfq eV7ZEmPH7P+VEssR4b+OxoVJPsfZq+z+8W3WByB9eftWDd0QPCRr2KhbGSpwEIcBeRygcy78 tdmtBFeb7NMWQ= X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="64433048" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu , "Juergen Gross" Subject: [XEN PATCH v2 16/29] libs,tools/include: Clean "clean" targets Date: Fri, 25 Feb 2022 15:13:08 +0000 Message-ID: <20220225151321.44126-17-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 There is no need for an extra "cleanlocal" target, we can use double-colon rules instead. Generated headers are now in tools/include/, so remove those file there. Remove -f flag as it's already in $(RM). libs.mk: - don't try to remove "*.rpm" anymore. libs/light: - "_paths.*.tmp" isn't created anymore. - clean "libxenlight_test.so" and "libxl_test_*.opic". libs/stat: - don't remove $(DEPS_RM) from here as it is already done in "libs.mk". libs/util: - fix clean of version-script file. include/xen-foreign: - remove __pycache__ Signed-off-by: Anthony PERARD Reviewed-by: Juergen Gross --- Notes: v2: - stop removing $(DEPS_RM) from libs/stat/Makefile. tools/include/Makefile | 1 + tools/include/xen-foreign/Makefile | 1 + tools/libs/ctrl/Makefile | 5 +---- tools/libs/guest/Makefile | 3 +-- tools/libs/light/Makefile | 19 ++++++++----------- tools/libs/stat/Makefile | 8 ++------ tools/libs/util/Makefile | 7 ++----- tools/libs/vchan/Makefile | 5 +---- tools/libs/libs.mk | 4 ++-- 9 files changed, 19 insertions(+), 34 deletions(-) diff --git a/tools/include/Makefile b/tools/include/Makefile index d965987f55..3a03a0b0fa 100644 --- a/tools/include/Makefile +++ b/tools/include/Makefile @@ -82,6 +82,7 @@ uninstall: clean: rm -rf xen xen-xsm acpi $(MAKE) -C xen-foreign clean + rm -f _*.h .PHONY: dist dist: install diff --git a/tools/include/xen-foreign/Makefile b/tools/include/xen-foreign/Makefile index 6ce51daf5e..b538d0ea94 100644 --- a/tools/include/xen-foreign/Makefile +++ b/tools/include/xen-foreign/Makefile @@ -13,6 +13,7 @@ clean: rm -f $(headers) rm -f checker checker.c rm -f *.pyc *.o *~ + rm -rf __pycache__ distclean: clean diff --git a/tools/libs/ctrl/Makefile b/tools/libs/ctrl/Makefile index ef7362327f..f58c4ef1aa 100644 --- a/tools/libs/ctrl/Makefile +++ b/tools/libs/ctrl/Makefile @@ -54,8 +54,5 @@ NO_HEADERS_CHK := y include $(XEN_ROOT)/tools/libs/libs.mk -clean: cleanlocal - -.PHONY: cleanlocal -cleanlocal: +clean:: rm -f libxenctrl.map diff --git a/tools/libs/guest/Makefile b/tools/libs/guest/Makefile index 2005d8a67d..56483c545f 100644 --- a/tools/libs/guest/Makefile +++ b/tools/libs/guest/Makefile @@ -104,6 +104,5 @@ include $(XEN_ROOT)/tools/libs/libs.mk libxenguest.so.$(MAJOR).$(MINOR): LDLIBS += $(ZLIB_LIBS) -lz -.PHONY: cleanlocal -cleanlocal: +clean:: rm -f libxenguest.map diff --git a/tools/libs/light/Makefile b/tools/libs/light/Makefile index 769e2a83e2..0c04a5b5cb 100644 --- a/tools/libs/light/Makefile +++ b/tools/libs/light/Makefile @@ -246,15 +246,12 @@ install:: $(LIBHEADERS) libxl-save-helper uninstall:: rm -f $(DESTDIR)$(LIBEXEC_BIN)/libxl-save-helper -clean: cleanlocal - -.PHONY: cleanlocal -cleanlocal: - $(RM) -f _*.h *.o $(CLIENTS) - $(RM) -f _*.c *.pyc _paths.*.tmp _*.api-for-check - $(RM) -f testidl.c.new testidl.c *.api-ok - $(RM) -f $(TEST_PROGS) - $(RM) -rf __pycache__ - $(RM) -f libxenlight.map - $(RM) -f $(AUTOSRCS) $(AUTOINCS) +clean:: + $(RM) _*.h *.o $(CLIENTS) + $(RM) _*.c *.pyc _*.api-for-check + $(RM) testidl.c.new testidl.c *.api-ok + $(RM) $(TEST_PROGS) libxenlight_test.so libxl_test_*.opic + $(RM) -r __pycache__ + $(RM) libxenlight.map + $(RM) $(AUTOSRCS) $(AUTOINCS) $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) clean diff --git a/tools/libs/stat/Makefile b/tools/libs/stat/Makefile index 1aef25a9bb..39a671d7ed 100644 --- a/tools/libs/stat/Makefile +++ b/tools/libs/stat/Makefile @@ -115,9 +115,5 @@ install:: install-perl-bindings uninstall:: uninstall-perl-bindings endif -clean: cleanlocal - -.PHONY: cleanlocal -cleanlocal: - rm -f $(BINDINGS) $(BINDINGSRC) $(DEPS_RM) - rm -f libxenstat.map +clean:: + $(RM) libxenstat.map $(BINDINGS) $(BINDINGSRC) diff --git a/tools/libs/util/Makefile b/tools/libs/util/Makefile index 72fecb4c49..7a658e9446 100644 --- a/tools/libs/util/Makefile +++ b/tools/libs/util/Makefile @@ -49,8 +49,5 @@ $(LIB_OBJS) $(PIC_OBJS): $(AUTOINCS) @rm -f $*.[ch] $(FLEX) --header-file=$*.h --outfile=$*.c $< -clean: cleanlocal - -.PHONY: cleanlocal -cleanlocal: - $(RM) -f libxlutil.map +clean:: + $(RM) libxenutil.map diff --git a/tools/libs/vchan/Makefile b/tools/libs/vchan/Makefile index 83a45d2817..4ccb4dd1f6 100644 --- a/tools/libs/vchan/Makefile +++ b/tools/libs/vchan/Makefile @@ -12,8 +12,5 @@ NO_HEADERS_CHK := y include $(XEN_ROOT)/tools/libs/libs.mk -clean: cleanlocal - -.PHONY: cleanlocal -cleanlocal: +clean:: rm -f libxenvchan.map diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk index a173f59a8b..c2eaefc928 100644 --- a/tools/libs/libs.mk +++ b/tools/libs/libs.mk @@ -124,8 +124,8 @@ TAGS: etags -t *.c *.h .PHONY: clean -clean: - rm -rf *.rpm $(LIB) *~ $(DEPS_RM) $(LIB_OBJS) $(PIC_OBJS) +clean:: + rm -rf $(LIB) *~ $(DEPS_RM) $(LIB_OBJS) $(PIC_OBJS) rm -f lib$(LIB_FILE_NAME).so.$(MAJOR).$(MINOR) lib$(LIB_FILE_NAME).so.$(MAJOR) rm -f headers.chk headers.lst rm -f $(PKG_CONFIG) From patchwork Fri Feb 25 15:13:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760468 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 1ECE6C433FE for ; Fri, 25 Feb 2022 15:16:33 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279253.476943 (Exim 4.92) (envelope-from ) id 1nNcKV-0007Z7-Bf; Fri, 25 Feb 2022 15:16:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279253.476943; Fri, 25 Feb 2022 15:16:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcKV-0007YM-3h; Fri, 25 Feb 2022 15:16:23 +0000 Received: by outflank-mailman (input) for mailman id 279253; Fri, 25 Feb 2022 15:16:21 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcIJ-0007Bf-Uj for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:14:08 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 91582a91-964d-11ec-8eb9-a37418f5ba1a; Fri, 25 Feb 2022 16:14:05 +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: 91582a91-964d-11ec-8eb9-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802044; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ADC2Vsrbqitg8mHjAC2JFay6LpiS741rs0NhF3hf1d8=; b=WG+exY38dYAFDxNd8b4Ae3sKHjWtilQCpiCYkbcHHcBom7GJL5Ei211x fLcn63/imCNHUZ3p36csZRggP8lB14Xw5y+pxL29A3SY+29xtOfRdP1ed jyuVjlq+J8ypRr9LvX6iwr1fSJA1R1V+BMYpmuQiYlitVuvgI46L4WBQi E=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 65407577 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:/KTYKKDrqHYTFxVW/1Pjw5YqxClBgxIJ4kV8jS/XYbTApDlz1mAAm 2MYW2DQP/uIazT3L48kbYSxo0pSvJDXx4dgQQY4rX1jcSlH+JHPbTi7wuYcHM8wwunrFh8PA xA2M4GYRCwMZiaA4E/raNANlFEkvU2ybuOU5NXsZ2YgHWeIdA970Ug5w7Rj39Yy6TSEK1jlV e3a8pW31GCNg1aYAkpMg05UgEoy1BhakGpwUm0WPZinjneH/5UmJMt3yZWKB2n5WuFp8tuSH I4v+l0bElTxpH/BAvv9+lryn9ZjrrT6ZWBigVIOM0Sub4QrSoXfHc/XOdJFAXq7hQllkPhWl NlHtaHoFjsIAabdhs4+aCJ/Oh1HaPguFL/veRBTsOSWxkzCNXDt3+9vHAc9OohwFuRfWD8Us 6ZCcXZUM07F17neLLGTE4GAguwqKtXrO4UO/Glt1zjDAd4tQIzZQrWM7thdtNs1rp4TQa6BO pVGAdZpRC+DUxtOA3MRMpwZzP+C3UDwMDtDoV3A8MLb5ECMlVcsgdABKuH9ZdiiVchT2EGCq Qru/WvjBQoBHMeC0jfD+XWp7sffkCW+VI8MGbmQ8v9xnEbV1mEVEAcRV1awvb++kEHWZj5EA xVKoGx09/F0rRH1CImmN/GlnJKaljlAV9BQLrVl1CCywbvKySWiPU8tcgcUPbTKq/QKbTAt0 1aImfbgCjpurKCZRBqhy1uEkd+hEXNLdDFfPEfoWSNAuoC++99r0nojW/4+SPbdszHjJd3nL 9lmRgAajq5bs8ME3r7TEbvv02P1/cihouLYC2zqsoOZAuFRON/Ni2+AswGzARN8wGCxFAjpU J8swZX20Qz2JcvR/BFhuc1UdF1T296LMSfHnXlkFIQ7+jKm9haLJN4MvW4ifRs0ap5cIVcFh XM/XysLtfe/21PwMMdKj3+ZUZx2ncAM6/y/PhwrUja+SscoL1LWlM2fTUWRw3rsgCARfVIXY v+mnTKXJS9CU8xPlWPuL89EiOND7n1ulAv7GMGgpzz6gOX2WZJgYepcWLd4Rrtit/3sTcS82 4s3CvZmPD0ECLyuOnSMqNVLRb3IRFBiba3LRwVsXrbrCmJb9KsJUpc9HZtJl1RZoplo IronPort-HdrOrdr: A9a23:HPOWV6y9TrUYmc/ULQneKrPwFL1zdoMgy1knxilNoRw8SKKlfq eV7ZImPH7P+U4ssR4b+exoVJPtfZqYz+8R3WBzB8bEYOCFghrKEGgK1+KLqFeMJ8S9zJ846U 4JSdkGNDSaNzlHZKjBjzVQa+xQouW6zA== X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="65407577" From: Anthony PERARD To: CC: Anthony PERARD , Juergen Gross , Wei Liu Subject: [XEN PATCH v2 17/29] libs: Rename $(SRCS-y) to $(OBJS-y) Date: Fri, 25 Feb 2022 15:13:09 +0000 Message-ID: <20220225151321.44126-18-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 The only thing done thing done with $(SRCS-y) is to replace ".c" by ".o". It is more useful to collect which object we want to build as make will figure out how to build it and from which source file. Signed-off-by: Anthony PERARD Reviewed-by: Juergen Gross --- Notes: v2: - reviewed tools/libs/call/Makefile | 12 +-- tools/libs/ctrl/Makefile | 74 +++++++------- tools/libs/devicemodel/Makefile | 12 +-- tools/libs/evtchn/Makefile | 12 +-- tools/libs/foreignmemory/Makefile | 12 +-- tools/libs/gnttab/Makefile | 14 +-- tools/libs/guest/Makefile | 86 ++++++++-------- tools/libs/hypfs/Makefile | 2 +- tools/libs/light/Makefile | 162 +++++++++++++++--------------- tools/libs/stat/Makefile | 12 +-- tools/libs/store/Makefile | 4 +- tools/libs/toolcore/Makefile | 2 +- tools/libs/toollog/Makefile | 4 +- tools/libs/util/Makefile | 16 +-- tools/libs/vchan/Makefile | 4 +- tools/libs/libs.mk | 7 +- 16 files changed, 217 insertions(+), 218 deletions(-) diff --git a/tools/libs/call/Makefile b/tools/libs/call/Makefile index 93d404b79e..e5cb7c937c 100644 --- a/tools/libs/call/Makefile +++ b/tools/libs/call/Makefile @@ -4,11 +4,11 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 3 -SRCS-y += core.c buffer.c -SRCS-$(CONFIG_Linux) += linux.c -SRCS-$(CONFIG_FreeBSD) += freebsd.c -SRCS-$(CONFIG_SunOS) += solaris.c -SRCS-$(CONFIG_NetBSD) += netbsd.c -SRCS-$(CONFIG_MiniOS) += minios.c +OBJS-y += core.o buffer.o +OBJS-$(CONFIG_Linux) += linux.o +OBJS-$(CONFIG_FreeBSD) += freebsd.o +OBJS-$(CONFIG_SunOS) += solaris.o +OBJS-$(CONFIG_NetBSD) += netbsd.o +OBJS-$(CONFIG_MiniOS) += minios.o include $(XEN_ROOT)/tools/libs/libs.mk diff --git a/tools/libs/ctrl/Makefile b/tools/libs/ctrl/Makefile index f58c4ef1aa..5fd06949f1 100644 --- a/tools/libs/ctrl/Makefile +++ b/tools/libs/ctrl/Makefile @@ -1,43 +1,43 @@ XEN_ROOT = $(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk -SRCS-y += xc_altp2m.c -SRCS-y += xc_cpupool.c -SRCS-y += xc_domain.c -SRCS-y += xc_evtchn.c -SRCS-y += xc_gnttab.c -SRCS-y += xc_misc.c -SRCS-y += xc_flask.c -SRCS-y += xc_physdev.c -SRCS-y += xc_private.c -SRCS-y += xc_csched.c -SRCS-y += xc_csched2.c -SRCS-y += xc_arinc653.c -SRCS-y += xc_rt.c -SRCS-y += xc_tbuf.c -SRCS-y += xc_pm.c -SRCS-y += xc_cpu_hotplug.c -SRCS-y += xc_vm_event.c -SRCS-y += xc_vmtrace.c -SRCS-y += xc_monitor.c -SRCS-y += xc_mem_paging.c -SRCS-y += xc_mem_access.c -SRCS-y += xc_memshr.c -SRCS-y += xc_hcall_buf.c -SRCS-y += xc_foreign_memory.c -SRCS-y += xc_kexec.c -SRCS-y += xc_resource.c -SRCS-$(CONFIG_X86) += xc_psr.c -SRCS-$(CONFIG_X86) += xc_pagetab.c -SRCS-$(CONFIG_Linux) += xc_linux.c -SRCS-$(CONFIG_FreeBSD) += xc_freebsd.c -SRCS-$(CONFIG_SunOS) += xc_solaris.c -SRCS-$(CONFIG_NetBSD) += xc_netbsd.c -SRCS-$(CONFIG_NetBSDRump) += xc_netbsd.c -SRCS-$(CONFIG_MiniOS) += xc_minios.c -SRCS-y += xc_evtchn_compat.c -SRCS-y += xc_gnttab_compat.c -SRCS-y += xc_devicemodel_compat.c +OBJS-y += xc_altp2m.o +OBJS-y += xc_cpupool.o +OBJS-y += xc_domain.o +OBJS-y += xc_evtchn.o +OBJS-y += xc_gnttab.o +OBJS-y += xc_misc.o +OBJS-y += xc_flask.o +OBJS-y += xc_physdev.o +OBJS-y += xc_private.o +OBJS-y += xc_csched.o +OBJS-y += xc_csched2.o +OBJS-y += xc_arinc653.o +OBJS-y += xc_rt.o +OBJS-y += xc_tbuf.o +OBJS-y += xc_pm.o +OBJS-y += xc_cpu_hotplug.o +OBJS-y += xc_vm_event.o +OBJS-y += xc_vmtrace.o +OBJS-y += xc_monitor.o +OBJS-y += xc_mem_paging.o +OBJS-y += xc_mem_access.o +OBJS-y += xc_memshr.o +OBJS-y += xc_hcall_buf.o +OBJS-y += xc_foreign_memory.o +OBJS-y += xc_kexec.o +OBJS-y += xc_resource.o +OBJS-$(CONFIG_X86) += xc_psr.o +OBJS-$(CONFIG_X86) += xc_pagetab.o +OBJS-$(CONFIG_Linux) += xc_linux.o +OBJS-$(CONFIG_FreeBSD) += xc_freebsd.o +OBJS-$(CONFIG_SunOS) += xc_solaris.o +OBJS-$(CONFIG_NetBSD) += xc_netbsd.o +OBJS-$(CONFIG_NetBSDRump) += xc_netbsd.o +OBJS-$(CONFIG_MiniOS) += xc_minios.o +OBJS-y += xc_evtchn_compat.o +OBJS-y += xc_gnttab_compat.o +OBJS-y += xc_devicemodel_compat.o CFLAGS += -D__XEN_TOOLS__ CFLAGS += $(PTHREAD_CFLAGS) diff --git a/tools/libs/devicemodel/Makefile b/tools/libs/devicemodel/Makefile index 3e50ff6d90..a0a2d24f99 100644 --- a/tools/libs/devicemodel/Makefile +++ b/tools/libs/devicemodel/Makefile @@ -4,11 +4,11 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 4 -SRCS-y += core.c -SRCS-$(CONFIG_Linux) += common.c -SRCS-$(CONFIG_FreeBSD) += common.c -SRCS-$(CONFIG_SunOS) += compat.c -SRCS-$(CONFIG_NetBSD) += compat.c -SRCS-$(CONFIG_MiniOS) += compat.c +OBJS-y += core.o +OBJS-$(CONFIG_Linux) += common.o +OBJS-$(CONFIG_FreeBSD) += common.o +OBJS-$(CONFIG_SunOS) += compat.o +OBJS-$(CONFIG_NetBSD) += compat.o +OBJS-$(CONFIG_MiniOS) += compat.o include $(XEN_ROOT)/tools/libs/libs.mk diff --git a/tools/libs/evtchn/Makefile b/tools/libs/evtchn/Makefile index b8c37b5b97..8208ecf650 100644 --- a/tools/libs/evtchn/Makefile +++ b/tools/libs/evtchn/Makefile @@ -4,11 +4,11 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 2 -SRCS-y += core.c -SRCS-$(CONFIG_Linux) += linux.c -SRCS-$(CONFIG_FreeBSD) += freebsd.c -SRCS-$(CONFIG_SunOS) += solaris.c -SRCS-$(CONFIG_NetBSD) += netbsd.c -SRCS-$(CONFIG_MiniOS) += minios.c +OBJS-y += core.o +OBJS-$(CONFIG_Linux) += linux.o +OBJS-$(CONFIG_FreeBSD) += freebsd.o +OBJS-$(CONFIG_SunOS) += solaris.o +OBJS-$(CONFIG_NetBSD) += netbsd.o +OBJS-$(CONFIG_MiniOS) += minios.o include $(XEN_ROOT)/tools/libs/libs.mk diff --git a/tools/libs/foreignmemory/Makefile b/tools/libs/foreignmemory/Makefile index 0eb9a3a712..4427435932 100644 --- a/tools/libs/foreignmemory/Makefile +++ b/tools/libs/foreignmemory/Makefile @@ -4,11 +4,11 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 4 -SRCS-y += core.c -SRCS-$(CONFIG_Linux) += linux.c -SRCS-$(CONFIG_FreeBSD) += freebsd.c -SRCS-$(CONFIG_SunOS) += compat.c solaris.c -SRCS-$(CONFIG_NetBSD) += netbsd.c -SRCS-$(CONFIG_MiniOS) += minios.c +OBJS-y += core.o +OBJS-$(CONFIG_Linux) += linux.o +OBJS-$(CONFIG_FreeBSD) += freebsd.o +OBJS-$(CONFIG_SunOS) += compat.o solaris.o +OBJS-$(CONFIG_NetBSD) += netbsd.o +OBJS-$(CONFIG_MiniOS) += minios.o include $(XEN_ROOT)/tools/libs/libs.mk diff --git a/tools/libs/gnttab/Makefile b/tools/libs/gnttab/Makefile index ae390ce60f..7d7aeeadff 100644 --- a/tools/libs/gnttab/Makefile +++ b/tools/libs/gnttab/Makefile @@ -4,13 +4,13 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 2 -SRCS-GNTTAB += gnttab_core.c -SRCS-GNTSHR += gntshr_core.c +OBJS-GNTTAB += gnttab_core.o +OBJS-GNTSHR += gntshr_core.o -SRCS-$(CONFIG_Linux) += $(SRCS-GNTTAB) $(SRCS-GNTSHR) linux.c -SRCS-$(CONFIG_MiniOS) += $(SRCS-GNTTAB) gntshr_unimp.c minios.c -SRCS-$(CONFIG_FreeBSD) += $(SRCS-GNTTAB) $(SRCS-GNTSHR) freebsd.c -SRCS-$(CONFIG_NetBSD) += $(SRCS-GNTTAB) $(SRCS-GNTSHR) netbsd.c -SRCS-$(CONFIG_SunOS) += gnttab_unimp.c gntshr_unimp.c +OBJS-$(CONFIG_Linux) += $(OBJS-GNTTAB) $(OBJS-GNTSHR) linux.o +OBJS-$(CONFIG_MiniOS) += $(OBJS-GNTTAB) gntshr_unimp.o minios.o +OBJS-$(CONFIG_FreeBSD) += $(OBJS-GNTTAB) $(OBJS-GNTSHR) freebsd.o +OBJS-$(CONFIG_NetBSD) += $(OBJS-GNTTAB) $(OBJS-GNTSHR) netbsd.o +OBJS-$(CONFIG_SunOS) += gnttab_unimp.o gntshr_unimp.o include $(XEN_ROOT)/tools/libs/libs.mk diff --git a/tools/libs/guest/Makefile b/tools/libs/guest/Makefile index 56483c545f..17eb0ebf4b 100644 --- a/tools/libs/guest/Makefile +++ b/tools/libs/guest/Makefile @@ -6,69 +6,69 @@ ifeq ($(CONFIG_LIBXC_MINIOS),y) override CONFIG_MIGRATE := n endif -SRCS-y += xg_private.c -SRCS-y += xg_domain.c -SRCS-y += xg_suspend.c -SRCS-y += xg_resume.c +OBJS-y += xg_private.o +OBJS-y += xg_domain.o +OBJS-y += xg_suspend.o +OBJS-y += xg_resume.o ifeq ($(CONFIG_MIGRATE),y) -SRCS-y += xg_sr_common.c -SRCS-$(CONFIG_X86) += xg_sr_common_x86.c -SRCS-$(CONFIG_X86) += xg_sr_common_x86_pv.c -SRCS-$(CONFIG_X86) += xg_sr_restore_x86_pv.c -SRCS-$(CONFIG_X86) += xg_sr_restore_x86_hvm.c -SRCS-$(CONFIG_X86) += xg_sr_save_x86_pv.c -SRCS-$(CONFIG_X86) += xg_sr_save_x86_hvm.c -SRCS-y += xg_sr_restore.c -SRCS-y += xg_sr_save.c -SRCS-y += xg_offline_page.c +OBJS-y += xg_sr_common.o +OBJS-$(CONFIG_X86) += xg_sr_common_x86.o +OBJS-$(CONFIG_X86) += xg_sr_common_x86_pv.o +OBJS-$(CONFIG_X86) += xg_sr_restore_x86_pv.o +OBJS-$(CONFIG_X86) += xg_sr_restore_x86_hvm.o +OBJS-$(CONFIG_X86) += xg_sr_save_x86_pv.o +OBJS-$(CONFIG_X86) += xg_sr_save_x86_hvm.o +OBJS-y += xg_sr_restore.o +OBJS-y += xg_sr_save.o +OBJS-y += xg_offline_page.o else -SRCS-y += xg_nomigrate.c +OBJS-y += xg_nomigrate.o endif -SRCS-y += xg_core.c -SRCS-$(CONFIG_X86) += xg_core_x86.c -SRCS-$(CONFIG_ARM) += xg_core_arm.c +OBJS-y += xg_core.o +OBJS-$(CONFIG_X86) += xg_core_x86.o +OBJS-$(CONFIG_ARM) += xg_core_arm.o CFLAGS += -I$(XEN_libxenctrl) vpath %.c ../../../xen/common/libelf CFLAGS += -I../../../xen/common/libelf -ELF_SRCS-y += libelf-tools.c libelf-loader.c -ELF_SRCS-y += libelf-dominfo.c +ELF_OBJS-y += libelf-tools.o libelf-loader.o +ELF_OBJS-y += libelf-dominfo.o -SRCS-y += $(ELF_SRCS-y) +OBJS-y += $(ELF_OBJS-y) -$(patsubst %.c,%.o,$(ELF_SRCS-y)): CFLAGS += -Wno-pointer-sign -$(patsubst %.c,%.opic,$(ELF_SRCS-y)): CFLAGS += -Wno-pointer-sign +$(ELF_OBJS-y): CFLAGS += -Wno-pointer-sign +$(ELF_OBJS-y:.o=.opic): CFLAGS += -Wno-pointer-sign ifeq ($(CONFIG_X86),y) # Add libx86 to the build vpath %.c ../../../xen/lib/x86 -SRCS-y += cpuid.c msr.c policy.c +OBJS-y += cpuid.o msr.o policy.o endif # new domain builder -SRCS-y += xg_dom_core.c -SRCS-y += xg_dom_boot.c -SRCS-y += xg_dom_elfloader.c -SRCS-$(CONFIG_X86) += xg_dom_bzimageloader.c -SRCS-$(CONFIG_X86) += xg_dom_decompress_lz4.c -SRCS-$(CONFIG_X86) += xg_dom_hvmloader.c -SRCS-$(CONFIG_ARM) += xg_dom_armzimageloader.c -SRCS-y += xg_dom_binloader.c -SRCS-y += xg_dom_compat_linux.c - -SRCS-$(CONFIG_X86) += xg_dom_x86.c -SRCS-$(CONFIG_X86) += xg_cpuid_x86.c -SRCS-$(CONFIG_ARM) += xg_dom_arm.c +OBJS-y += xg_dom_core.o +OBJS-y += xg_dom_boot.o +OBJS-y += xg_dom_elfloader.o +OBJS-$(CONFIG_X86) += xg_dom_bzimageloader.o +OBJS-$(CONFIG_X86) += xg_dom_decompress_lz4.o +OBJS-$(CONFIG_X86) += xg_dom_hvmloader.o +OBJS-$(CONFIG_ARM) += xg_dom_armzimageloader.o +OBJS-y += xg_dom_binloader.o +OBJS-y += xg_dom_compat_linux.o + +OBJS-$(CONFIG_X86) += xg_dom_x86.o +OBJS-$(CONFIG_X86) += xg_cpuid_x86.o +OBJS-$(CONFIG_ARM) += xg_dom_arm.o ifeq ($(CONFIG_LIBXC_MINIOS),y) -SRCS-y += xg_dom_decompress_unsafe.c -SRCS-y += xg_dom_decompress_unsafe_bzip2.c -SRCS-y += xg_dom_decompress_unsafe_lzma.c -SRCS-y += xg_dom_decompress_unsafe_lzo1x.c -SRCS-y += xg_dom_decompress_unsafe_xz.c -SRCS-y += xg_dom_decompress_unsafe_zstd.c +OBJS-y += xg_dom_decompress_unsafe.o +OBJS-y += xg_dom_decompress_unsafe_bzip2.o +OBJS-y += xg_dom_decompress_unsafe_lzma.o +OBJS-y += xg_dom_decompress_unsafe_lzo1x.o +OBJS-y += xg_dom_decompress_unsafe_xz.o +OBJS-y += xg_dom_decompress_unsafe_zstd.o endif CFLAGS += -Werror -Wmissing-prototypes diff --git a/tools/libs/hypfs/Makefile b/tools/libs/hypfs/Makefile index efa955bd50..630e1e6f3e 100644 --- a/tools/libs/hypfs/Makefile +++ b/tools/libs/hypfs/Makefile @@ -6,6 +6,6 @@ MINOR = 0 LDLIBS += -lz -SRCS-y += core.c +OBJS-y += core.o include ../libs.mk diff --git a/tools/libs/light/Makefile b/tools/libs/light/Makefile index 0c04a5b5cb..13545654c2 100644 --- a/tools/libs/light/Makefile +++ b/tools/libs/light/Makefile @@ -1,31 +1,31 @@ XEN_ROOT = $(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk -SRCS-y += osdeps.c -SRCS-y += libxl_paths.c -SRCS-y += libxl_bootloader.c -SRCS-y += flexarray.c +OBJS-y += osdeps.o +OBJS-y += libxl_paths.o +OBJS-y += libxl_bootloader.o +OBJS-y += flexarray.o ifeq ($(CONFIG_LIBNL),y) -SRCS-y += libxl_netbuffer.c +OBJS-y += libxl_netbuffer.o else -SRCS-y += libxl_nonetbuffer.c +OBJS-y += libxl_nonetbuffer.o endif ifeq ($(CONFIG_X86),y) -SRCS-y += libxl_convert_callout.c +OBJS-y += libxl_convert_callout.o else -SRCS-y += libxl_no_convert_callout.c +OBJS-y += libxl_no_convert_callout.o endif -SRCS-y += libxl_remus.c -SRCS-y += libxl_checkpoint_device.c -SRCS-y += libxl_remus_disk_drbd.c +OBJS-y += libxl_remus.o +OBJS-y += libxl_checkpoint_device.o +OBJS-y += libxl_remus_disk_drbd.o ifeq ($(CONFIG_LIBNL),y) -SRCS-y += libxl_colo_restore.c -SRCS-y += libxl_colo_save.c -SRCS-y += libxl_colo_qdisk.c -SRCS-y += libxl_colo_proxy.c -SRCS-y += libxl_colo_nic.c +OBJS-y += libxl_colo_restore.o +OBJS-y += libxl_colo_save.o +OBJS-y += libxl_colo_qdisk.o +OBJS-y += libxl_colo_proxy.o +OBJS-y += libxl_colo_nic.o else -SRCS-y += libxl_no_colo.c +OBJS-y += libxl_no_colo.o endif ACPI_PATH = $(XEN_ROOT)/tools/libacpi @@ -40,82 +40,82 @@ vpath static_tables.c $(ACPI_PATH)/ acpi: $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) DSDT_FILES="$(DSDT_FILES-y)" -SRCS-$(CONFIG_X86) += $(ACPI_OBJS:.o=.c) +OBJS-$(CONFIG_X86) += $(ACPI_OBJS) CFLAGS += -Wno-format-zero-length -Wmissing-declarations \ -Wno-declaration-after-statement -Wformat-nonliteral CFLAGS-$(CONFIG_X86) += -DCONFIG_PCI_SUPP_LEGACY_IRQ -SRCS-$(CONFIG_X86) += libxl_cpuid.c -SRCS-$(CONFIG_X86) += libxl_x86.c -SRCS-$(CONFIG_X86) += libxl_psr.c -SRCS-$(CONFIG_X86) += libxl_x86_acpi.c -SRCS-$(CONFIG_ARM) += libxl_nocpuid.c -SRCS-$(CONFIG_ARM) += libxl_arm.c -SRCS-$(CONFIG_ARM) += libxl_libfdt_compat.c +OBJS-$(CONFIG_X86) += libxl_cpuid.o +OBJS-$(CONFIG_X86) += libxl_x86.o +OBJS-$(CONFIG_X86) += libxl_psr.o +OBJS-$(CONFIG_X86) += libxl_x86_acpi.o +OBJS-$(CONFIG_ARM) += libxl_nocpuid.o +OBJS-$(CONFIG_ARM) += libxl_arm.o +OBJS-$(CONFIG_ARM) += libxl_libfdt_compat.o ifeq ($(CONFIG_ARM_64),y) DSDT_FILES-y = dsdt_anycpu_arm.c -SRCS-y += libxl_arm_acpi.c -SRCS-y += $(DSDT_FILES-y) +OBJS-y += libxl_arm_acpi.o +OBJS-y += $(DSDT_FILES-y:.c=.o) dsdt_anycpu_arm.c: $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) DSDT_FILES="$(DSDT_FILES-y)" else -SRCS-$(CONFIG_ARM) += libxl_arm_no_acpi.c +OBJS-$(CONFIG_ARM) += libxl_arm_no_acpi.o endif -SRCS-OS-$(CONFIG_NetBSD) = libxl_netbsd.c -SRCS-OS-$(CONFIG_Linux) = libxl_linux.c libxl_setresuid.c -SRCS-OS-$(CONFIG_FreeBSD) = libxl_freebsd.c libxl_setresuid.c -ifeq ($(SRCS-OS-y),) +OBJS-OS-$(CONFIG_NetBSD) = libxl_netbsd.o +OBJS-OS-$(CONFIG_Linux) = libxl_linux.o libxl_setresuid.o +OBJS-OS-$(CONFIG_FreeBSD) = libxl_freebsd.o libxl_setresuid.o +ifeq ($(OBJS-OS-y),) $(error Your Operating System is not supported by libxenlight, \ please check libxl_linux.c and libxl_netbsd.c to see how to get it ported) endif -SRCS-y += $(SRCS-OS-y) - -SRCS-y += libxl.c -SRCS-y += libxl_create.c -SRCS-y += libxl_dm.c -SRCS-y += libxl_pci.c -SRCS-y += libxl_dom.c -SRCS-y += libxl_exec.c -SRCS-y += libxl_xshelp.c -SRCS-y += libxl_device.c -SRCS-y += libxl_internal.c -SRCS-y += libxl_utils.c -SRCS-y += libxl_uuid.c -SRCS-y += libxl_json.c -SRCS-y += libxl_aoutils.c -SRCS-y += libxl_numa.c -SRCS-y += libxl_vnuma.c -SRCS-y += libxl_stream_read.c -SRCS-y += libxl_stream_write.c -SRCS-y += libxl_save_callout.c -SRCS-y += _libxl_save_msgs_callout.c -SRCS-y += libxl_qmp.c -SRCS-y += libxl_event.c -SRCS-y += libxl_fork.c -SRCS-y += libxl_dom_suspend.c -SRCS-y += libxl_dom_save.c -SRCS-y += libxl_usb.c -SRCS-y += libxl_vtpm.c -SRCS-y += libxl_nic.c -SRCS-y += libxl_disk.c -SRCS-y += libxl_console.c -SRCS-y += libxl_cpupool.c -SRCS-y += libxl_mem.c -SRCS-y += libxl_sched.c -SRCS-y += libxl_tmem.c -SRCS-y += libxl_9pfs.c -SRCS-y += libxl_domain.c -SRCS-y += libxl_vdispl.c -SRCS-y += libxl_pvcalls.c -SRCS-y += libxl_vsnd.c -SRCS-y += libxl_vkb.c -SRCS-y += libxl_genid.c -SRCS-y += _libxl_types.c -SRCS-y += libxl_flask.c -SRCS-y += _libxl_types_internal.c +OBJS-y += $(OBJS-OS-y) + +OBJS-y += libxl.o +OBJS-y += libxl_create.o +OBJS-y += libxl_dm.o +OBJS-y += libxl_pci.o +OBJS-y += libxl_dom.o +OBJS-y += libxl_exec.o +OBJS-y += libxl_xshelp.o +OBJS-y += libxl_device.o +OBJS-y += libxl_internal.o +OBJS-y += libxl_utils.o +OBJS-y += libxl_uuid.o +OBJS-y += libxl_json.o +OBJS-y += libxl_aoutils.o +OBJS-y += libxl_numa.o +OBJS-y += libxl_vnuma.o +OBJS-y += libxl_stream_read.o +OBJS-y += libxl_stream_write.o +OBJS-y += libxl_save_callout.o +OBJS-y += _libxl_save_msgs_callout.o +OBJS-y += libxl_qmp.o +OBJS-y += libxl_event.o +OBJS-y += libxl_fork.o +OBJS-y += libxl_dom_suspend.o +OBJS-y += libxl_dom_save.o +OBJS-y += libxl_usb.o +OBJS-y += libxl_vtpm.o +OBJS-y += libxl_nic.o +OBJS-y += libxl_disk.o +OBJS-y += libxl_console.o +OBJS-y += libxl_cpupool.o +OBJS-y += libxl_mem.o +OBJS-y += libxl_sched.o +OBJS-y += libxl_tmem.o +OBJS-y += libxl_9pfs.o +OBJS-y += libxl_domain.o +OBJS-y += libxl_vdispl.o +OBJS-y += libxl_pvcalls.o +OBJS-y += libxl_vsnd.o +OBJS-y += libxl_vkb.o +OBJS-y += libxl_genid.o +OBJS-y += _libxl_types.o +OBJS-y += libxl_flask.o +OBJS-y += _libxl_types_internal.o ifeq ($(CONFIG_LIBNL),y) CFLAGS_LIBXL += $(LIBNL3_CFLAGS) @@ -175,7 +175,7 @@ LDLIBS-y += $(PTHREAD_LIBS) LDLIBS-y += -lyajl LDLIBS += $(LDLIBS-y) -$(LIB_OBJS) $(PIC_OBJS) $(LIBXL_TEST_OBJS): CFLAGS += $(CFLAGS_LIBXL) -include $(XEN_ROOT)/tools/config.h +$(OBJS-y) $(PIC_OBJS) $(LIBXL_TEST_OBJS): CFLAGS += $(CFLAGS_LIBXL) -include $(XEN_ROOT)/tools/config.h $(ACPI_OBJS) $(ACPI_PIC_OBJS): CFLAGS += -I. -DLIBACPI_STDUTILS=\"$(CURDIR)/libxl_x86_acpi.h\" $(TEST_PROG_OBJS) _libxl.api-for-check: CFLAGS += $(CFLAGS_libxentoollog) $(CFLAGS_libxentoolcore) libxl_dom.o libxl_dom.opic: CFLAGS += -I$(XEN_ROOT)/tools # include libacpi/x86.h @@ -189,7 +189,7 @@ testidl.c: libxl_types.idl gentest.py $(XEN_INCLUDE)/libxl.h $(AUTOINCS) all: $(CLIENTS) $(TEST_PROGS) $(AUTOSRCS) $(AUTOINCS) -$(LIB_OBJS) $(PIC_OBJS) $(SAVE_HELPER_OBJS) $(LIBXL_TEST_OBJS) $(TEST_PROG_OBJS): $(AUTOINCS) libxl.api-ok +$(OBJS-y) $(PIC_OBJS) $(SAVE_HELPER_OBJS) $(LIBXL_TEST_OBJS) $(TEST_PROG_OBJS): $(AUTOINCS) libxl.api-ok libxl.api-ok: check-libxl-api-rules _libxl.api-for-check $(PERL) $^ @@ -212,8 +212,8 @@ $(XEN_INCLUDE)/libxl_json.h: $(XEN_INCLUDE)/_libxl_types_json.h libxl_internal.h: _libxl_types_internal.h _libxl_types_private.h _libxl_types_internal_private.h libxl_internal_json.h: _libxl_types_internal_json.h -$(LIB_OBJS) $(PIC_OBJS) $(LIBXL_TEST_OBJS) $(TEST_PROG_OBJS) $(SAVE_HELPER_OBJS): $(XEN_INCLUDE)/libxl.h -$(LIB_OBJS) $(PIC_OBJS) $(LIBXL_TEST_OBJS): libxl_internal.h +$(OBJS-y) $(PIC_OBJS) $(LIBXL_TEST_OBJS) $(TEST_PROG_OBJS) $(SAVE_HELPER_OBJS): $(XEN_INCLUDE)/libxl.h +$(OBJS-y) $(PIC_OBJS) $(LIBXL_TEST_OBJS): libxl_internal.h _libxl_type%.h _libxl_type%_json.h _libxl_type%_private.h _libxl_type%.c: libxl_type%.idl gentypes.py idl.py $(eval stem = $(notdir $*)) diff --git a/tools/libs/stat/Makefile b/tools/libs/stat/Makefile index 39a671d7ed..998435d494 100644 --- a/tools/libs/stat/Makefile +++ b/tools/libs/stat/Makefile @@ -17,12 +17,12 @@ include $(XEN_ROOT)/tools/Rules.mk CFLAGS += -include $(XEN_ROOT)/tools/config.h -SRCS-y += xenstat.c -SRCS-y += xenstat_qmp.c -SRCS-$(CONFIG_Linux) += xenstat_linux.c -SRCS-$(CONFIG_SunOS) += xenstat_solaris.c -SRCS-$(CONFIG_NetBSD) += xenstat_netbsd.c -SRCS-$(CONFIG_FreeBSD) += xenstat_freebsd.c +OBJS-y += xenstat.o +OBJS-y += xenstat_qmp.o +OBJS-$(CONFIG_Linux) += xenstat_linux.o +OBJS-$(CONFIG_SunOS) += xenstat_solaris.o +OBJS-$(CONFIG_NetBSD) += xenstat_netbsd.o +OBJS-$(CONFIG_FreeBSD) += xenstat_freebsd.o LDLIBS-y += -lyajl LDLIBS-$(CONFIG_SunOS) += -lkstat diff --git a/tools/libs/store/Makefile b/tools/libs/store/Makefile index b94060be8d..778da51f95 100644 --- a/tools/libs/store/Makefile +++ b/tools/libs/store/Makefile @@ -8,8 +8,8 @@ ifeq ($(CONFIG_Linux),y) LDLIBS += -ldl endif -SRCS-y += xs_lib.c -SRCS-y += xs.c +OBJS-y += xs_lib.o +OBJS-y += xs.o LIBHEADER = xenstore.h xenstore_lib.h diff --git a/tools/libs/toolcore/Makefile b/tools/libs/toolcore/Makefile index 9c013b2879..ce417ea648 100644 --- a/tools/libs/toolcore/Makefile +++ b/tools/libs/toolcore/Makefile @@ -6,7 +6,7 @@ MINOR = 0 LIBHEADER := xentoolcore.h -SRCS-y += handlereg.c +OBJS-y += handlereg.o include $(XEN_ROOT)/tools/libs/libs.mk diff --git a/tools/libs/toollog/Makefile b/tools/libs/toollog/Makefile index dce1b2de85..c09aa02ba5 100644 --- a/tools/libs/toollog/Makefile +++ b/tools/libs/toollog/Makefile @@ -4,7 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 0 -SRCS-y += xtl_core.c -SRCS-y += xtl_logger_stdio.c +OBJS-y += xtl_core.o +OBJS-y += xtl_logger_stdio.o include $(XEN_ROOT)/tools/libs/libs.mk diff --git a/tools/libs/util/Makefile b/tools/libs/util/Makefile index 7a658e9446..ffe507b379 100644 --- a/tools/libs/util/Makefile +++ b/tools/libs/util/Makefile @@ -1,13 +1,13 @@ XEN_ROOT = $(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk -SRCS-y += libxlu_cfg_y.c -SRCS-y += libxlu_cfg_l.c -SRCS-y += libxlu_cfg.c -SRCS-y += libxlu_disk_l.c -SRCS-y += libxlu_disk.c -SRCS-y += libxlu_vif.c -SRCS-y += libxlu_pci.c +OBJS-y += libxlu_cfg_y.o +OBJS-y += libxlu_cfg_l.o +OBJS-y += libxlu_cfg.o +OBJS-y += libxlu_disk_l.o +OBJS-y += libxlu_disk.o +OBJS-y += libxlu_vif.o +OBJS-y += libxlu_pci.o CFLAGS += -Wno-format-zero-length -Wmissing-declarations \ -Wno-declaration-after-statement -Wformat-nonliteral @@ -39,7 +39,7 @@ NO_HEADERS_CHK := y include $(XEN_ROOT)/tools/libs/libs.mk -$(LIB_OBJS) $(PIC_OBJS): $(AUTOINCS) +$(OBJS-y) $(PIC_OBJS): $(AUTOINCS) %.c %.h:: %.y @rm -f $*.[ch] diff --git a/tools/libs/vchan/Makefile b/tools/libs/vchan/Makefile index 4ccb4dd1f6..ac2bff66f5 100644 --- a/tools/libs/vchan/Makefile +++ b/tools/libs/vchan/Makefile @@ -5,8 +5,8 @@ CFLAGS += $(CFLAGS_libxenctrl) LIBHEADER := libxenvchan.h -SRCS-y += init.c -SRCS-y += io.c +OBJS-y += init.o +OBJS-y += io.o NO_HEADERS_CHK := y diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk index c2eaefc928..58d8166b09 100644 --- a/tools/libs/libs.mk +++ b/tools/libs/libs.mk @@ -20,8 +20,7 @@ CFLAGS += $(foreach lib, $(USELIBS_$(LIBNAME)), $(CFLAGS_libxen$(lib))) LDLIBS += $(foreach lib, $(USELIBS_$(LIBNAME)), $(LDLIBS_libxen$(lib))) -LIB_OBJS := $(SRCS-y:.c=.o) -PIC_OBJS := $(SRCS-y:.c=.opic) +PIC_OBJS := $(OBJS-y:.o=.opic) LIB_FILE_NAME = $(FILENAME_$(LIBNAME)) LIB := lib$(LIB_FILE_NAME).a @@ -79,7 +78,7 @@ headers.lst: FORCE libxen$(LIBNAME).map: echo 'VERS_$(MAJOR).$(MINOR) { global: *; };' >$@ -lib$(LIB_FILE_NAME).a: $(LIB_OBJS) +lib$(LIB_FILE_NAME).a: $(OBJS-y) $(AR) rc $@ $^ lib$(LIB_FILE_NAME).so: lib$(LIB_FILE_NAME).so.$(MAJOR) @@ -125,7 +124,7 @@ TAGS: .PHONY: clean clean:: - rm -rf $(LIB) *~ $(DEPS_RM) $(LIB_OBJS) $(PIC_OBJS) + rm -rf $(LIB) *~ $(DEPS_RM) $(OBJS-y) $(PIC_OBJS) rm -f lib$(LIB_FILE_NAME).so.$(MAJOR).$(MINOR) lib$(LIB_FILE_NAME).so.$(MAJOR) rm -f headers.chk headers.lst rm -f $(PKG_CONFIG) From patchwork Fri Feb 25 15:13:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760479 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 C077AC433FE for ; Fri, 25 Feb 2022 15:17:03 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279305.477066 (Exim 4.92) (envelope-from ) id 1nNcL0-0003tv-Kh; Fri, 25 Feb 2022 15:16:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279305.477066; Fri, 25 Feb 2022 15:16:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcKz-0003q4-QY; Fri, 25 Feb 2022 15:16:53 +0000 Received: by outflank-mailman (input) for mailman id 279305; Fri, 25 Feb 2022 15:16:51 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcIM-0007Bf-Qc for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:14:10 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 935c9a50-964d-11ec-8eb9-a37418f5ba1a; Fri, 25 Feb 2022 16:14:07 +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: 935c9a50-964d-11ec-8eb9-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802047; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+VKqQ9Ban5DJzksG49npHQWFkvG/L4HTbI6R5Xjk91w=; b=iPDDwPFn3wbQgYeYWuWznLlzn0mwqcxXKNpXICeCeTcZbik1UUduZ6hQ WMmmsJLhNUe7mmW0HwNfX2B3pYlnLA8DpYvzPgJ3R6POxsnCTu4lb07Q1 RQr102rGZeZTA+GzznVbIbCmCXMKHhC+enQrW9WRiVhhMXK7uRCt7wWGd A=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 65407580 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:LM/w6qOgkd8+srrvrR3fl8FynXyQoLVcMsEvi/4bfWQNrUpw0GMAz DFKWGGFO/qJN2T9ctEiO4rjpEgP7Z/dn9VmHAto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdleF+lH1dOKJQUBUjclkfJKlYAL/En03FFcMpBsJ00o5wbZj2NMw27BVPivW0 T/Mi5yHULOa82Yc3lI8s8pvfzs24ZweEBtB1rAPTagjUG32zhH5P7pGTU2FFFPqQ5E8IwKPb 72rIIdVXI/u10xF5tuNyt4Xe6CRK1LYFVDmZnF+A8BOjvXez8CbP2lS2Pc0MC9qZzu1c99Z5 vpRip+0ZBoVMfPGt+QhWQdYT38uFPgTkFPHCSDXXc27ykTHdz3nwul0DVFwNoodkgp1KTgQr 7pCcmlLN03dwbLtqF64YrAEasALJc/3PIQZqzd4wCvQF/oOSpHfWaTao9Rf2V/cg+gQQKqGO JdJMVKDajyaaCRUFUwKFqgBjdeSilnUTgdBi1ia8P9fD2/7k1UqjemF3MDuUsOObdVYmACfv G2u12b2GBYBL/SE1CGItHmrg4fnjS79HY4fCrC83vprm0GIgHweDgUMUlm2quX/jVSxM++zM GRNpHBo9/JrshX2EJ+tBHVUvUJooDYydMZvEOkX9T2ClKD74zqTGGhYEG5oPYlOWNANeRQm0 VqAntXMDDNpsaGIRX/1yop4vQ9eKgBOczZcOHZsoR8tpoC6/dpt1k6nosNLTfbt5uAZDw0c1 NxjQMIWo7wIxfAG2Kyglbwsq2L9/8OZJuLZC+i+Y45E0u+bTNL0D2BLwQKChRqlEGp/ZgPQ1 JTjs5LDhN3i9bnXyESwrBwlRdlFHcqtPjzGmkJIFJI87Tmr8HPLVdkOvGwheB41b55cIWeBj KrvVeV5vs470JyCN/IfXm5MI55ykfiI+SrNDJg4keaikrAuLVTarUmClGab3nz3kVhErE3ME czzTCpYNl5DUf4P5GPvH481iOZ3rghjlTK7bc2qlHyPjOvBDEN5vJ9YaTNimMhit/jayOgUm v4CX/a3J+J3C7WvMnGKqtdIdTjn7xETXPjLliCeTcbbSiIOJY3rI6W5LW8JE2C9o5loqw== IronPort-HdrOrdr: A9a23:x3xGZayhnHQSaCmhimyDKrPwFL1zdoMgy1knxilNoRw8SKKlfq eV7ZImPH7P+U4ssR4b+exoVJPtfZqYz+8R3WBzB8bEYOCFghrKEGgK1+KLqFeMJ8S9zJ846U 4JSdkGNDSaNzlHZKjBjzVQa+xQouW6zA== X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="65407580" From: Anthony PERARD To: CC: Anthony PERARD , Juergen Gross , Wei Liu Subject: [XEN PATCH v2 18/29] libs/guest: rename ELF_OBJS to LIBELF_OBJS Date: Fri, 25 Feb 2022 15:13:10 +0000 Message-ID: <20220225151321.44126-19-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 It seems a better name. Later, we will introduce LIBX86_OBJS to collect lib/x86/* objects. Signed-off-by: Anthony PERARD Reviewed-by: Juergen Gross --- Notes: v2: - fix typo in patch description - reviewed tools/libs/guest/Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/libs/guest/Makefile b/tools/libs/guest/Makefile index 17eb0ebf4b..7707d4300f 100644 --- a/tools/libs/guest/Makefile +++ b/tools/libs/guest/Makefile @@ -33,13 +33,12 @@ CFLAGS += -I$(XEN_libxenctrl) vpath %.c ../../../xen/common/libelf CFLAGS += -I../../../xen/common/libelf -ELF_OBJS-y += libelf-tools.o libelf-loader.o -ELF_OBJS-y += libelf-dominfo.o +LIBELF_OBJS += libelf-tools.o libelf-loader.o +LIBELF_OBJS += libelf-dominfo.o -OBJS-y += $(ELF_OBJS-y) +OBJS-y += $(LIBELF_OBJS) -$(ELF_OBJS-y): CFLAGS += -Wno-pointer-sign -$(ELF_OBJS-y:.o=.opic): CFLAGS += -Wno-pointer-sign +$(LIBELF_OBJS) $(LIBELF_OBJS:.o=.opic): CFLAGS += -Wno-pointer-sign ifeq ($(CONFIG_X86),y) # Add libx86 to the build vpath %.c ../../../xen/lib/x86 From patchwork Fri Feb 25 15:13:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760474 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 1BE7DC4332F for ; Fri, 25 Feb 2022 15:16:56 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279288.477003 (Exim 4.92) (envelope-from ) id 1nNcKs-0001xz-PE; Fri, 25 Feb 2022 15:16:46 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279288.477003; Fri, 25 Feb 2022 15:16: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 1nNcKs-0001u7-B5; Fri, 25 Feb 2022 15:16:46 +0000 Received: by outflank-mailman (input) for mailman id 279288; Fri, 25 Feb 2022 15:16:43 +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 1nNcIK-0006fy-6j for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:14:08 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 93144fa5-964d-11ec-8539-5f4723681683; Fri, 25 Feb 2022 16:14:06 +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: 93144fa5-964d-11ec-8539-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802046; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qfHKg9nbI8bb67OsGXzXE6dg5Icrubx3wFHR9cPr4Ug=; b=JOM1eAyBzQhkTQTHJ7qH5GJYVBuC0ggkJcoMoFIxp5gD0bpbmUF26rcb NspPOkmjG/b5LY459efDRhRnW9/ev6Q4ssBIYAbhOiZfOoqI0Gksi2WW7 nCT6NWZe0CqKm4js2BuUDx0fITkMRC/vWdi8MRI8eN+eLqglxiuBecUKq c=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 64433057 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:RvLwoKth63cf0m/xIS7FaE0WEufnVCxeMUV32f8akzHdYApBsoF/q tZmKWuAbvuKNjCgeYwnaYqyoB9TvpDWz4ViGwtspH00RXtE+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZhSAgk/nOHNIQMcacUsxLbVYMpBwJ1FQyw4bVvqYy2YLjW1nX5 IuoyyHiEATNNwBcYzp8B52r8HuDjNyq0N/PlgVjDRzjlAa2e0g9VPrzF4noR5fLatA88tqBb /TC1NmEElbxpH/BPD8HfoHTKSXmSpaKVeSHZ+E/t6KK2nCurQRquko32WZ1he66RFxlkvgoo Oihu6BcRi81D4HepvYdcCVXLCRnHJ8BoZ39LnWg5Jn7I03uKxMAwt1rBUAye4YZ5vx2ESdF8 vlwxDIlN07ZwbjsmfTiF7cq1p9LwMrDZevzvllpyy3ZCvA3B4jOWazQ6fdT3Ssqh9AIFvHbD yYcQWQzME+bO0AQUrsRIJxks8ikqWPbTwR370CVp4E9/HHP4iUkhdABN/KKI4fXFK25hH2wu Wbu72n/RBYAO7S3yzWf9Wm3rvTShi69U4UXfJWo+/gvjFCNy2g7DBwNSUD9sfS/klS5Wd9UN woT4CVGkEQp3BX1FJ+nBUT++SPa+E5HMzZNLwEkwB285rjq8Qa6Omc7SydgWpt/lvU5SCN/g zdlgOjVLTBotbSUT1eU+bGVsS6+NEApEIMSWcMXZVBbuoe++enfmjqKF48+S/Dt0rUZDBmtm 2jikcQou1kEYSfnPY2f9EuPvT+jr4OhouUdtlSOBTLNAu+UieeYi22UBbrzsacowGWxFADpU J04dy62trFm4XalznHlfQn1NOv1j8tpyRWF6bKVI7Ev9i6251modp1K7Td1KS9Ba5hYJGC1O ROO4VsJvPe/2UdGi4ctMupd7OxwkMDd+SnNDKiIPrKinLArHON4wM2eTRHJhD28+KTduao+J Y2aYa6R4YUyUsxaIM6Nb75Fi9cDn3lmrUuKHMyT50n3gNK2OS/OIZ9YYQTmUwzMxP7dyOkj2 40EbJXiJtQ2eLCWXxQ7BqZIdQFadSVgXMuuwyGVH8baSjdb9KgaI6e56dscl0ZNxcy5Ss+gE qmBZ3Jl IronPort-HdrOrdr: A9a23:/ZdQs6juOLFlGwpM6jE7g79l13BQXtwji2hC6mlwRA09TySZ// rAoB19726StN9xYgBYpTnuAsi9qB/nmKKdpLNhX4tKPzOW3FdATrsD0WKK+VSJcEfDH6xmpM JdmsBFebvN5DNB4/oSjjPVLz9Z+qjlzJyV X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="64433057" From: Anthony PERARD To: CC: Anthony PERARD , Juergen Gross , Wei Liu Subject: [XEN PATCH v2 19/29] libs/guest: rework CFLAGS Date: Fri, 25 Feb 2022 15:13:11 +0000 Message-ID: <20220225151321.44126-20-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 Remove '-Werror -Wmissing-progress -I./include $(CFLAGS_xeninclude)', those flags are already added via "libs.mk". Flag "-I." isn't needed, we just need to fix the #include of "xg_core.h" as this header isn't expected to be installed. Make use of "-iquote" instead of '-I' for double-quote included headers. Also, regroup the CFLAGS into the same place in the makefile. Signed-off-by: Anthony PERARD Reviewed-by: Juergen Gross --- Notes: v2: - reviewed tools/libs/guest/Makefile | 20 +++++++++----------- tools/libs/guest/xg_offline_page.c | 2 +- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/tools/libs/guest/Makefile b/tools/libs/guest/Makefile index 7707d4300f..4f2373101f 100644 --- a/tools/libs/guest/Makefile +++ b/tools/libs/guest/Makefile @@ -28,18 +28,13 @@ OBJS-y += xg_core.o OBJS-$(CONFIG_X86) += xg_core_x86.o OBJS-$(CONFIG_ARM) += xg_core_arm.o -CFLAGS += -I$(XEN_libxenctrl) - vpath %.c ../../../xen/common/libelf -CFLAGS += -I../../../xen/common/libelf LIBELF_OBJS += libelf-tools.o libelf-loader.o LIBELF_OBJS += libelf-dominfo.o OBJS-y += $(LIBELF_OBJS) -$(LIBELF_OBJS) $(LIBELF_OBJS:.o=.opic): CFLAGS += -Wno-pointer-sign - ifeq ($(CONFIG_X86),y) # Add libx86 to the build vpath %.c ../../../xen/lib/x86 @@ -70,10 +65,12 @@ OBJS-y += xg_dom_decompress_unsafe_xz.o OBJS-y += xg_dom_decompress_unsafe_zstd.o endif -CFLAGS += -Werror -Wmissing-prototypes -CFLAGS += -I. -I./include $(CFLAGS_xeninclude) -CFLAGS += -D__XEN_TOOLS__ -CFLAGS += -include $(XEN_ROOT)/tools/config.h +CFLAGS += -D__XEN_TOOLS__ +CFLAGS += -include $(XEN_ROOT)/tools/config.h +CFLAGS += -iquote ../../../xen/common/libelf + +# To be able to include xc_private.h +CFLAGS += -iquote $(XEN_libxenctrl) # Needed for posix_fadvise64() in xc_linux.c CFLAGS-$(CONFIG_Linux) += -D_GNU_SOURCE @@ -92,8 +89,9 @@ ZLIB_CFLAGS := ZLIB_LIBS := endif -xg_dom_bzimageloader.o: CFLAGS += $(ZLIB_CFLAGS) -xg_dom_bzimageloader.opic: CFLAGS += $(ZLIB_CFLAGS) +xg_dom_bzimageloader.o xg_dom_bzimageloader.opic: CFLAGS += $(ZLIB_CFLAGS) + +$(LIBELF_OBJS) $(LIBELF_OBJS:.o=.opic): CFLAGS += -Wno-pointer-sign LIBHEADER := xenguest.h diff --git a/tools/libs/guest/xg_offline_page.c b/tools/libs/guest/xg_offline_page.c index cfe0e2d537..c594fdba41 100644 --- a/tools/libs/guest/xg_offline_page.c +++ b/tools/libs/guest/xg_offline_page.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include "xg_core.h" #include "xc_private.h" #include "xg_private.h" From patchwork Fri Feb 25 15:13:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760465 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 064A8C433F5 for ; Fri, 25 Feb 2022 15:16:19 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279237.476910 (Exim 4.92) (envelope-from ) id 1nNcKH-0006dp-FN; Fri, 25 Feb 2022 15:16:09 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279237.476910; Fri, 25 Feb 2022 15:16:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcKH-0006dg-AZ; Fri, 25 Feb 2022 15:16:09 +0000 Received: by outflank-mailman (input) for mailman id 279237; Fri, 25 Feb 2022 15:16:08 +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 1nNcIN-0006fy-Re for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:14:11 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 94bd007a-964d-11ec-8539-5f4723681683; Fri, 25 Feb 2022 16:14:10 +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: 94bd007a-964d-11ec-8539-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802050; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=W0bxiqkDioEV6QfS2tr8a6KFXyY+fCoCDm7KXgI9vhg=; b=O0uXr1DJ1UpyOgGqzR5nsHWdanyij+3B/gEI+FjbrMCr76S3J3XTueDe ACqFFHJ+RyQzcA8knjxB70YqF6Zz0dXIeZ7YFMRlHPsyTCeYhGLwcC/c/ UPrmFicAhVk+aX/MYb2S600OgHrEJFHSB1jtG+GLiOSGE8rsGHlPo/u8Y A=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 64998418 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:oYeLqqiMLvOXISJm/8lR0+BBX161GhAKZh0ujC45NGQN5FlHY01je htvXT2DaKmNM2HzKIt+aYjkpE4A68LSydMwTwVqr3w0FS0b9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oDJ9CU6jefSLlbFILas1hpZHGeIcw98z0M78wIFqtQw24LhWVnQ4 YmaT/D3YzdJ5RYlagr41IrbwP9flKyaVOQw5wFWiVhj5TcyplFNZH4tDfjZw0jQG+G4KtWSV efbpIxVy0uCl/sb5nFJpZ6gGqECaua60QFjERO6UYD66vRJjnRaPqrWqJPwwKqY4tmEt4kZ9 TlDiXC/YQQ0A/3ywOYPbzdzAjshG69q1fzjP1Hq5KR/z2WeG5ft6/BnDUVwNowE4OdnR2pJ8 JT0KhhUMErF3bjvhuvmFK883azPL+GyVG8bknhm0THeC+dgWZ3ZSr/GzdRZwC0xloZFGvO2i 88xN2Y+PUScOk0n1lE/VtE/hbiLolbFUDxSmUKYgod0unSO9VkkuFTqGIWMIYHbLSlPpW6Ho krW8mK/BQsVXPSdxiCC6WmEnfLUkGXwX4d6PK218LtmjUOewkQXCQYKTh2rrP+hkEm8VtlDb UsO9UITQbMarRLxCIOnBlvh/SDC7kV0t8ds//MS6xywmpSM4RSlKEMVVGFnavAL9+sobGl/v rOWpO/BCTtqubyTbHuS8LaIsD+/URQowX8+iTwsFlVcvYS6yG0npleWF4s4Tvbp5jHgMWyom 1i3QD4Ca6L/ZCLh/4Gy5hj5jj2lvfAlpSZlt1yMDgpJAu6UDbNJhrBEC3CHvJ6sz67DFzFtW UTofeDEvYji6rnXyUSwrB0lRu3B2hp8GGS0baRTN5cg7S+x3HWoYJpd5jpzTG8wbJpZJmOwP BKL4VsJjHO2AJdMRfUmC25WI553pZUM6Py/DqyEBjawSsIZmPC7ENFGOhfLgjGFfLkEmqAjI 5aLGftA/l5BYZmLOAGeHr9HuZdyn3hW7TqKGfjTkkT2uZLDNSX9YepUbzOzghURsfrsTPP9q I0EaaNnCnx3DYXDX8Ug2dVLfABScCNiXsieRg4+XrfrHzeK0VoJU5f5qY7NsaQ/90iJvo8kJ k2AZ3I= IronPort-HdrOrdr: A9a23:2gbzpK3SaC2cCZBmduItOwqjBIokLtp133Aq2lEZdPRUGvb3qy nIpoV86faUskdoZJhOo7C90cW7LU80sKQFhLX5Xo3SOzUO2lHYT72KhLGKq1aLdhEWtNQtsZ uIG5IOceEYZmIasS+V2maF+q4bsbu6zJw= X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="64998418" From: Anthony PERARD To: CC: Anthony PERARD , Juergen Gross , Wei Liu Subject: [XEN PATCH v2 20/29] libs/store: use of -iquote instead of -I Date: Fri, 25 Feb 2022 15:13:12 +0000 Message-ID: <20220225151321.44126-21-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 Signed-off-by: Anthony PERARD Reviewed-by: Juergen Gross --- Notes: v2: - reviewed tools/libs/store/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libs/store/Makefile b/tools/libs/store/Makefile index 778da51f95..2334c953bb 100644 --- a/tools/libs/store/Makefile +++ b/tools/libs/store/Makefile @@ -22,7 +22,7 @@ CFLAGS += -DXEN_LIB_STORED="\"$(XEN_LIB_STORED)\"" CFLAGS += -DXEN_RUN_STORED="\"$(XEN_RUN_STORED)\"" vpath xs_lib.c $(XEN_ROOT)/tools/xenstore -CFLAGS += -I $(XEN_ROOT)/tools/xenstore +CFLAGS += -iquote $(XEN_ROOT)/tools/xenstore xs.opic: CFLAGS += -DUSE_PTHREAD ifeq ($(CONFIG_Linux),y) From patchwork Fri Feb 25 15:13:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760472 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 A0C07C433F5 for ; Fri, 25 Feb 2022 15:16:55 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279282.476988 (Exim 4.92) (envelope-from ) id 1nNcKr-0001cg-6B; Fri, 25 Feb 2022 15:16:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279282.476988; Fri, 25 Feb 2022 15:16:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcKq-0001cA-Rm; Fri, 25 Feb 2022 15:16:44 +0000 Received: by outflank-mailman (input) for mailman id 279282; Fri, 25 Feb 2022 15:16:42 +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 1nNcIP-0006fy-R5 for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:14:13 +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 95676d2b-964d-11ec-8539-5f4723681683; Fri, 25 Feb 2022 16:14:11 +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: 95676d2b-964d-11ec-8539-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802051; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lstnw/Cy7kkWvWE8Q3+svCB9Cq3t+tCtdqmShje5Wb4=; b=iCo1ZrnSy60EYtvdgjJU+nbJliVULEDnAgYxBv1dyaWTbEWtGMvTDrgY +VO52MMv5C5bnCm12+9EH9HspnMIan27OtMi/ZQp/1M37G5/6sUFr3/Ra HoVjFvGXocHKxhJHKMXCcgAcu2FTKVb8CZyv9HukXnF+msuxAqGaX0BhJ I=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 67264776 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:CLdS6ameic96krdP7A9bnRfo5gz7JkRdPkR7XQ2eYbSJt1+Wr1Gzt xIfXWGDMqneN2WgL4wiYImx9RhTu8DXnINmSFdq/nw9ECMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BCpC48T8kk/vgqoPUUIYoAAgoLeNfYHpn2EoLd9IR2NYy24DjWV7V4 7senuWEULOb828sWo4rw/rrRCNH5JwebxtB4zTSzdgS1LPvvyF94KA3fMldHFOhKmVgJcaoR v6r8V2M1jixEyHBqD+Suu2TnkUiGtY+NOUV45Zcc/DKbhNq/kTe3kunXRa1hIg+ZzihxrhMJ NtxWZOYTgEOI47epskmUD5gMnFTOoFE4aPACC3q2SCT5xWun3rExvxvCAc9PJEC+/YxCmZLn RAaAGlTNFbZ3bvwme/lDLk37iggBJCD0Ic3s3d8zTbfHLA+TIrKWani7t5ExjYgwMtJGJ4yY uJHNmAxMEufPXWjPH8lWIB5hcOWmULEfj5mr3+7te0d+ELMmVkZPL/Fb4OOJ43iqd9utlmcj nLL+SL+GB5yHN6Q0z2e6Vq3m/TC2yj8Xeo6BLC+s/JnnlCX7mgSEwENE0u2p+GjjUyzUM4ZL FYbkhfCtoBrqhbtFIOkGUTl/jjU5XbwRua8DcU97iaQ6bjqzj2aIVAlHhNGRN4/qMgfEGlCO kCyo/vlAjlmsbuwQH2b96uJoT7aBRX5PVPudgdfE1JbvoCLTJUby0uWE409SPLdYsjdRGmoq w1muhTSkFn6YSQj86ygtW7KjDu3znQiZl5kv16HNo5JA+4QWWJEW2BKwQSKhRqjBNzAJrVkg JTis5LPhAzpJcvQ/BFhuM1XQNmUCw+taVUwe2JHEZg77CiK8HW+Z41W6zwWDB43bptbJWa1P ReL4Vs5CHpv0J2CN/4fj2WZUZlC8EQdPY69CqC8giRmOPCdizNrDAkxPBXNjggBYWAnkL0lO IfzTCpfJS1yNEiT9xLvH711+eZynkgWnDqPLbimn0XP+efPPxa9FOZaWGZim8hktctoVi2Oq I0BXyZLoj0CONDDjt7/qtZCfQhXdiFgXfgbaaV/L4a+H+avI0l5Y9e5/F/rU9UNc3h9/gsQw kyAZw== IronPort-HdrOrdr: A9a23:2FKlp6qBOvzFfhuOvMkasUcaV5oteYIsimQD101hICG8cqSj+P xG+85rsiMc6QxhIU3I9urgBEDtex7hHNtOkOss1NSZLW3bUQmTTL2KhLGKq1aLJ8S9zJ856U 4JSdkZNDSaNzZHZKjBjDVQa+xQo+W6zA== X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="67264776" From: Anthony PERARD To: CC: Anthony PERARD , Juergen Gross , Wei Liu Subject: [XEN PATCH v2 21/29] libs/stat: Fix and rework python-bindings build Date: Fri, 25 Feb 2022 15:13:13 +0000 Message-ID: <20220225151321.44126-22-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 Fix the dependency on the library, $(SHLIB) variable doesn't exist anymore. Rework dependency on the include file, we can let `swig` generate the dependency for us with the use of "-M*" flags. The xenstat.h file has moved so we need to fix the include location. Rather than relaying on the VCS to create an empty directory for us, we can create one before generating the *.c file for the bindings. Make use of generic variable names to build a shared library from a source file: CFLAGS, LDFLAGS, and LDLIBS. Fix python's specific *flags by using python-config, and add them to generic flags variables: CFLAGS, LDLIBS. To build a shared library, we need to build the source file with "-fPIC", which was drop by 6d0ec05390 (tools: split libxenstat into new tools/libs/stat directory). The source file generated by swig seems to be missing a prototype for the "init" function, so we need "-Wno-missing-prototypes" in order to build it. Add some targets to .PHONY. Signed-off-by: Anthony PERARD Reviewed-by: Juergen Gross --- Notes: v2: - reviewed tools/libs/stat/Makefile | 27 +++++++++++++++------ tools/libs/stat/bindings/swig/python/.empty | 1 - 2 files changed, 19 insertions(+), 9 deletions(-) delete mode 100644 tools/libs/stat/bindings/swig/python/.empty diff --git a/tools/libs/stat/Makefile b/tools/libs/stat/Makefile index 998435d494..b8d75810fc 100644 --- a/tools/libs/stat/Makefile +++ b/tools/libs/stat/Makefile @@ -49,23 +49,34 @@ install-bindings: install-perl-bindings install-python-bindings .PHONY: uninstall-bindings uninstall-bindings: uninstall-perl-bindings uninstall-python-bindings -$(BINDINGS): $(SHLIB) $(SHLIB_LINKS) include/xenstat.h +$(BINDINGS): libxenstat.so -SWIG_FLAGS=-module xenstat -Iinclude -I. +SWIG_FLAGS = -module xenstat -I$(XEN_INCLUDE) +SWIG_FLAGS += -MMD -MP -MF .$(if $(filter-out .,$(@D)),$(subst /,@,$(@D))@)$(@F).d # Python bindings -PYTHON_VERSION=$(PYTHON:python%=%) -PYTHON_FLAGS=-I/usr/include/python$(PYTHON_VERSION) -lpython$(PYTHON_VERSION) $(PYMOD): $(PYSRC) $(PYSRC): bindings/swig/xenstat.i - swig -python $(SWIG_FLAGS) -outdir $(@D) -o $(PYSRC) $< - + mkdir -p $(@D) + swig -python $(SWIG_FLAGS) -outdir $(@D) -o $@ $< + +$(PYLIB): CFLAGS += $(shell $(PYTHON)-config --includes) +$(PYLIB): CFLAGS += -fPIC +$(PYLIB): CFLAGS += -Wno-missing-prototypes +$(PYLIB): LDFLAGS += $(SHLIB_LDFLAGS) +$(PYLIB): LDLIBS := $(shell $(PYTHON)-config --libs) +$(PYLIB): LDLIBS += $(LDLIBS_libxenstat) $(PYLIB): $(PYSRC) - $(CC) $(CFLAGS) $(LDFLAGS) $(PYTHON_FLAGS) $(SHLIB_LDFLAGS) -lxenstat -o $@ $< $(APPEND_LDFLAGS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS) $(APPEND_LDFLAGS) +.PHONY: python-bindings python-bindings: $(PYLIB) $(PYMOD) -pythonlibdir=$(prefix)/lib/python$(PYTHON_VERSION)/site-packages +pythonlibdir = $(shell $(PYTHON) -c \ + 'import distutils.sysconfig as cfg; \ + print(cfg.get_python_lib(False, False, prefix="$(prefix)"))') + +.PHONY: install-python-bindings install-python-bindings: $(PYLIB) $(PYMOD) $(INSTALL_PROG) $(PYLIB) $(DESTDIR)$(pythonlibdir)/_xenstat.so $(INSTALL_PROG) $(PYMOD) $(DESTDIR)$(pythonlibdir)/xenstat.py diff --git a/tools/libs/stat/bindings/swig/python/.empty b/tools/libs/stat/bindings/swig/python/.empty deleted file mode 100644 index 2a8dd4274d..0000000000 --- a/tools/libs/stat/bindings/swig/python/.empty +++ /dev/null @@ -1 +0,0 @@ -This directory is empty; this file is included to prevent version control systems from removing the directory. From patchwork Fri Feb 25 15:13:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760469 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 55528C43217 for ; Fri, 25 Feb 2022 15:16:34 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279256.476964 (Exim 4.92) (envelope-from ) id 1nNcKY-0008Cm-39; Fri, 25 Feb 2022 15:16:26 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279256.476964; Fri, 25 Feb 2022 15:16:26 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcKX-0008CS-VP; Fri, 25 Feb 2022 15:16:25 +0000 Received: by outflank-mailman (input) for mailman id 279256; Fri, 25 Feb 2022 15:16:24 +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 1nNcIR-0006fy-Rh for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:14:15 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 96495a21-964d-11ec-8539-5f4723681683; Fri, 25 Feb 2022 16:14:13 +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: 96495a21-964d-11ec-8539-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802053; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iBXan52Uptq1lv5gul5Hkg1gH0pXMqxs3qqmW+W01jw=; b=MjzXe7hcOsy22c/tbQJt8Su0MlspPKBSRMoDwBUNGfMUJKeTCt4+q+ts A1w+VEyV1bMS1ygcoO4SmKH0duOqHElUqPQZMhfXz2jDVD8g4asBP1z0h aVeyMWDBgiJ10fgwpXeMQPdK8RMF8SVHMyyt+xnDcPHYdQVzfFF6FoAdS E=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 65000328 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:2sa8AqDh4G2S8xVW/1Pjw5YqxClBgxIJ4kV8jS/XYbTApDNzhmQPy GsfDDyDbv+JMWr1eI1/PoTj8R8DsJbQzodhQQY4rX1jcSlH+JHPbTi7wuYcHM8wwunrFh8PA xA2M4GYRCwMZiaA4E/raNANlFEkvU2ybuOU5NXsZ2YgHWeIdA970Ug5w7Rj39Yy6TSEK1jlV e3a8pW31GCNg1aYAkpMg05UgEoy1BhakGpwUm0WPZinjneH/5UmJMt3yZWKB2n5WuFp8tuSH I4v+l0bElTxpH/BAvv9+lryn9ZjrrT6ZWBigVIOM0Sub4QrSoXfHc/XOdJFAXq7hQllkPhj6 /tKh4e9czwMI4SStLkkWThTHBphaPguFL/veRBTsOSWxkzCNXDt3+9vHAc9OohwFuRfWD8Us 6ZCcXZUM07F17neLLGTE4GAguwqKtXrO4UO/Glt1zjDAd4tQIzZQrWM7thdtNs1rp4TRa6GP JBJAdZpRErtTwVPOWxKMb4vofv2uCKmQywbp2vA8MLb5ECMlVcsgdABKuH9ZdiiVchT2EGCq Qru/WvjBQoBHMeC0jfD+XWp7sffkCW+VI8MGbmQ8v9xnEbV1mEVEAcRV1awvb++kEHWZj5EA xVKoGx09/F0rRH1CImmN/GlnJKalgw/dd1iCOAA0ySQ4/T4vj+TJ2MLdSEUPbTKq/QKbTAt0 1aImfbgCjpurKCZRBqhy1uEkd+hEXNLdDFfPEfoWSNAuoC++99r0nojW/4+SPbdszHjJd3nL 9lmRgAajq5bs8ME3r7TEbvv02P1/cihouLYC2zqsoOZAuFRON/Ni2+AswGzARN8wGCxFAjpU J8swZX20Qz2JcvR/BFhuc1UdF1T296LMSfHnXlkFIQ7+jKm9haLJN4MvW4ifRs0ap5cIVcFh XM/XysLtfe/21PwMMdKj3+ZUZx2ncAM6/y/PhwrUja+SscoL1LWlM2fTUWRw3rsgCARfVIXY v+mnTKXJS9CU8xPlWPuL89EiOND7n1ulAv7GMGgpzz6gOX2WZJgYepcWLd4Rrtit/3sTcS82 4s3CvZmPD0ECLyuOnSMqNVLRb3IRFBiba3LRwVsXrbrCmJb9KsJUZc9HZtJl1RZoplo IronPort-HdrOrdr: A9a23:mzn/raivuTaJtnmKfbjVxuAX0HBQXtwji2hC6mlwRA09TySZ// rAoB19726StN9xYgBYpTnuAsi9qB/nmKKdpLNhX4tKPzOW3FdATrsD0WKK+VSJcEfDH6xmpM JdmsBFebvN5DNB4/oSjjPVLz9Z+qjlzJyV X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="65000328" From: Anthony PERARD To: CC: Anthony PERARD , Juergen Gross , Wei Liu Subject: [XEN PATCH v2 22/29] libs/stat: Fix and rework perl-binding build Date: Fri, 25 Feb 2022 15:13:14 +0000 Message-ID: <20220225151321.44126-23-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 For PERL_FLAGS, use make's shell rather than a backquote. Rather than relying on the VCS to create an empty directory for us, we can create one before generating the *.c file for the bindings. Make use of generic variable names to build a shared library from a source file: CFLAGS, LDFLAGS, and LDLIBS. To build a shared library, we need to build the source file with "-fPIC", which was drop by 6d0ec05390 (tools: split libxenstat into new tools/libs/stat directory). The source file generated by swig seems to be missing many prototype for many functions, so we need "-Wno-missing-prototypes" in order to build it. Also, one of the prototype is deemed malformed, so we also need "-Wno-strict-prototypes". Signed-off-by: Anthony PERARD Reviewed-by: Juergen Gross --- Notes: v2: - reviewed tools/libs/stat/Makefile | 15 +++++++++++---- tools/libs/stat/bindings/swig/perl/.empty | 1 - 2 files changed, 11 insertions(+), 5 deletions(-) delete mode 100644 tools/libs/stat/bindings/swig/perl/.empty diff --git a/tools/libs/stat/Makefile b/tools/libs/stat/Makefile index b8d75810fc..7eaf50e91e 100644 --- a/tools/libs/stat/Makefile +++ b/tools/libs/stat/Makefile @@ -94,13 +94,20 @@ uninstall:: uninstall-python-bindings endif # Perl bindings -PERL_FLAGS=`perl -MConfig -e 'print "$$Config{ccflags} -I$$Config{archlib}/CORE";'` +PERL_FLAGS = $(shell $(PERL) -MConfig -e 'print "$$Config{ccflags} -I$$Config{archlib}/CORE";') $(PERLMOD): $(PERLSRC) $(PERLSRC): bindings/swig/xenstat.i - swig -perl $(SWIG_FLAGS) -outdir $(@D) -o $(PERLSRC) $< - + mkdir -p $(@D) + swig -perl $(SWIG_FLAGS) -outdir $(@D) -o $@ $< + +$(PERLLIB): CFLAGS += -fPIC +$(PERLLIB): CFLAGS += -Wno-strict-prototypes +$(PERLLIB): CFLAGS += -Wno-missing-prototypes +$(PERLLIB): LDFLAGS += $(PERL_FLAGS) +$(PERLLIB): LDFLAGS += $(SHLIB_LDFLAGS) +$(PERLLIB): LDLIBS := $(LDLIBS_libxenstat) $(PERLLIB): $(PERLSRC) - $(CC) $(CFLAGS) $(LDFLAGS) $(PERL_FLAGS) $(SHLIB_LDFLAGS) -lxenstat -o $@ $< $(APPEND_LDFLAGS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS) $(APPEND_LDFLAGS) .PHONY: perl-bindings perl-bindings: $(PERLLIB) $(PERLMOD) diff --git a/tools/libs/stat/bindings/swig/perl/.empty b/tools/libs/stat/bindings/swig/perl/.empty deleted file mode 100644 index 2a8dd4274d..0000000000 --- a/tools/libs/stat/bindings/swig/perl/.empty +++ /dev/null @@ -1 +0,0 @@ -This directory is empty; this file is included to prevent version control systems from removing the directory. From patchwork Fri Feb 25 15:13:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760475 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 BBEC1C4167B for ; Fri, 25 Feb 2022 15:16:56 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279290.477012 (Exim 4.92) (envelope-from ) id 1nNcKt-0002B6-N9; Fri, 25 Feb 2022 15:16:47 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279290.477012; Fri, 25 Feb 2022 15:16:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcKt-00028j-4i; Fri, 25 Feb 2022 15:16:47 +0000 Received: by outflank-mailman (input) for mailman id 279290; Fri, 25 Feb 2022 15:16:43 +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 1nNcIV-0006fy-S4 for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:14:19 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 98a8c4b6-964d-11ec-8539-5f4723681683; Fri, 25 Feb 2022 16:14:16 +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: 98a8c4b6-964d-11ec-8539-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802056; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3vyVdZEIG+4X/H2vZhQNrYK/eTmrh5e09O/takxxz8Q=; b=DJphRGFJ4yDCMBd+gcJQLTpHLXrTJaTLHWPKpv+yPEwPMxiVYmiLrKhT YQVIeY8QMZ2luy/87Bly72XIaqSXqxpt7BN6CIeHEHnq1qUNKnJHjpNQt KUSvs4IX8r2hRfWAY/UVzG4I82oxmRM6Aepj6qditrl0XM7Gvv2Xgyv10 0=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 64998429 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:R+nmIqAPGP9/ehVW/xbjw5YqxClBgxIJ4kV8jS/XYbTApDInhTUCy TEYXjyCP/iIN2TyeNB/boW38UNV68fWm9NjQQY4rX1jcSlH+JHPbTi7wuYcHM8wwunrFh8PA xA2M4GYRCwMZiaA4E/raNANlFEkvU2ybuOU5NXsZ2YgHWeIdA970Ug5w7Rj39Yy6TSEK1jlV e3a8pW31GCNg1aYAkpMg05UgEoy1BhakGpwUm0WPZinjneH/5UmJMt3yZWKB2n5WuFp8tuSH I4v+l0bElTxpH/BAvv9+lryn9ZjrrT6ZWBigVIOM0Sub4QrSoXfHc/XOdJFAXq7hQllkPhK1 dxysYyLQzs7EfThp7QmFDBeAXFXaPguFL/veRBTsOSWxkzCNXDt3+9vHAc9OohwFuRfWD8Us 6ZCcXZUM07F17neLLGTE4GAguwqKtXrO4UO/Glt1zjDAd4tQIzZQrWM7thdtNs1rp4STKeOO 5BIAdZpRCrgZz5TH3MvM6MRzNfx1yDVWTx4pWvA8MLb5ECMlVcsgdABKuH9YceWTM9YmkKZo GPu/GnjBBwectuFxlKt7XaEluLJ2yThV+o6FrKi8eVxqEaO3WFVAxoTPXOrrP/8hkOgVtZ3L 00P5jFovaU07FasTNT2Q1u/unHslhwWVsdUEuY6wBqQ0aeS6AGcbkAGUzpAZdoOpMIwAzsw2 Te0c8jBXGI19ufPEDTEq+nS/Wja1TUpwXEqXjINcg8V2NPfsq5qoy2fdZFKFrzlp4igcd3v+ AyioC87jrQVqMcE0aSn4FzK6w6RSoj1oh0dvVuOAD/8hu9tTMv8PtHztwCHhRpVBNvBFjG8U G44d99yBQzkJbWEj2SzTeoEB9lFDN7VYWSH0TaD83TMnglBGkJPn6gMsVmSx28za67onAMFh meJ6Gu9A7cJYROXgVdfOd7ZNijT5fGI+S7Zfv7VdMFSRZN6aRWK+ipjDWbJgTywzxR1zfxnY c/DGSpJMZr8If42pNZRb71AuYLHOwhknT+DLXwF507PPUWiiI69Fu5ebQrmghER56KYugTFm +uzxOPRoyizpNbWO3GNmaZKdAhiBSFiWfje9pwGHsbec1EOMDxwVJfsLUYJJtUNc1J9zbyTo BlQmyZwlTLCuJEwAV7SOyA7Nei2Bs4XQLBSFXVEAGtEEkMLOe6HhJrzvbNtFVX73ISPFcJJc sQ= IronPort-HdrOrdr: A9a23:TrvJb6mEGxZLBNc4akvo38aCA0LpDfIq3DAbv31ZSRFFG/Fxl6 iV88jzsiWE7wr5OUtQ4OxoV5PgfZqxz/NICMwqTNWftWrdyQ+VxeNZjbcKqgeIc0aVygce79 YET0EXMqyXMbEQt6jHCWeDf+rIuOP3k5yVuQ== X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="64998429" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu , Juergen Gross Subject: [XEN PATCH v2 23/29] .gitignore: Cleanup ignores of tools/libs/*/{headers.chk,*.pc} Date: Fri, 25 Feb 2022 15:13:15 +0000 Message-ID: <20220225151321.44126-24-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 Signed-off-by: Anthony PERARD --- Notes: v2: - move new .gitignore entries to the one in tools/libs/ .gitignore | 26 -------------------------- tools/libs/.gitignore | 2 ++ 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/.gitignore b/.gitignore index 3da56594c5..7a04dc3a89 100644 --- a/.gitignore +++ b/.gitignore @@ -105,26 +105,8 @@ tools/config.cache config/Tools.mk config/Stubdom.mk config/Docs.mk -tools/libs/toolcore/headers.chk -tools/libs/toolcore/xentoolcore.pc -tools/libs/toollog/headers.chk -tools/libs/toollog/xentoollog.pc -tools/libs/evtchn/headers.chk -tools/libs/evtchn/xenevtchn.pc -tools/libs/gnttab/headers.chk -tools/libs/gnttab/xengnttab.pc -tools/libs/hypfs/headers.chk -tools/libs/hypfs/xenhypfs.pc -tools/libs/call/headers.chk -tools/libs/call/xencall.pc tools/libs/ctrl/libxenctrl.map -tools/libs/ctrl/xencontrol.pc -tools/libs/foreignmemory/headers.chk -tools/libs/foreignmemory/xenforeignmemory.pc -tools/libs/devicemodel/headers.chk -tools/libs/devicemodel/xendevicemodel.pc tools/libs/guest/libxenguest.map -tools/libs/guest/xenguest.pc tools/libs/guest/xc_bitops.h tools/libs/guest/xc_core.h tools/libs/guest/xc_core_arm.h @@ -144,21 +126,13 @@ tools/libs/light/testidl.c tools/libs/light/test_timedereg tools/libs/light/test_fdderegrace tools/libs/light/tmp.* -tools/libs/light/xenlight.pc -tools/libs/stat/headers.chk tools/libs/stat/libxenstat.map -tools/libs/stat/xenstat.pc -tools/libs/store/headers.chk tools/libs/store/list.h tools/libs/store/utils.h -tools/libs/store/xenstore.pc tools/libs/store/xs_lib.c -tools/libs/util/*.pc tools/libs/util/libxlu_cfg_y.output tools/libs/util/libxenutil.map -tools/libs/vchan/headers.chk tools/libs/vchan/libxenvchan.map -tools/libs/vchan/xenvchan.pc tools/debugger/gdb/gdb-6.2.1-linux-i386-xen/* tools/debugger/gdb/gdb-6.2.1/* tools/debugger/gdb/gdb-6.2.1.tar.bz2 diff --git a/tools/libs/.gitignore b/tools/libs/.gitignore index 4a13126144..1ad7c7f0cb 100644 --- a/tools/libs/.gitignore +++ b/tools/libs/.gitignore @@ -1 +1,3 @@ +*/*.pc +*/headers.chk */headers.lst From patchwork Fri Feb 25 15:13:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760470 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 BFD04C4332F for ; Fri, 25 Feb 2022 15:16:33 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279254.476955 (Exim 4.92) (envelope-from ) id 1nNcKW-0007uQ-SV; Fri, 25 Feb 2022 15:16:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279254.476955; Fri, 25 Feb 2022 15:16:24 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcKW-0007u8-K5; Fri, 25 Feb 2022 15:16:24 +0000 Received: by outflank-mailman (input) for mailman id 279254; Fri, 25 Feb 2022 15:16:24 +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 1nNcIW-0006fy-S9 for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:14:20 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 98e5e580-964d-11ec-8539-5f4723681683; Fri, 25 Feb 2022 16:14:17 +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: 98e5e580-964d-11ec-8539-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802057; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=d3piZxqZuNJB/VZp7MMLQLrSEQWkmz/CgMBBNprZ0OE=; b=Cy0HYOMWQDvMGGVrqAMhikKvWzPoj9PcC1XZuF4iZUpw5uMzHhBkQz+E c11FArnhk54Mgx6ZDCnnBGwZsweSdgyPRi8SNC+K4nv9xs5+zkzzS5oxS h5b+tc1OeEQ4QJiTBjNjAABhP5J+gkkK1F5+zi40+EKGTlc72neMEs3FL g=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 64433086 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:ugzeC6BqjmufXRVW/yDjw5YqxClBgxIJ4kV8jS/XYbTApD4r0TYPy jAaCG/TPPeDMWajLtt+a4S/9UlVscXXn4I1QQY4rX1jcSlH+JHPbTi7wuYcHM8wwunrFh8PA xA2M4GYRCwMZiaA4E/raNANlFEkvU2ybuOU5NXsZ2YgHWeIdA970Ug5w7Rj39Yy6TSEK1jlV e3a8pW31GCNg1aYAkpMg05UgEoy1BhakGpwUm0WPZinjneH/5UmJMt3yZWKB2n5WuFp8tuSH I4v+l0bElTxpH/BAvv9+lryn9ZjrrT6ZWBigVIOM0Sub4QrSoXfHc/XOdJFAXq7hQllkPhAl IpBuJaiaz50N7XgtMIxECJoAyVhaPguFL/veRBTsOSWxkzCNXDt3+9vHAc9OohwFuRfWD8Us 6ZCcXZUM07F17neLLGTE4GAguwqKtXrO4UO/Glt1zjDAd4tQIzZQrWM7thdtNs1rp4SQa2FP 5pHAdZpRDP4RBFSGGwzNI4nzbmagF/ELTNA9GvA8MLb5ECMlVcsgdABKuH9ZdiiVchT2EGCq Qru5G38HxwecsCfyDCM73awruLJhmb/SYUUUrqi+ZZCkFCVg2AeFhASfV+6uuWizF6zXcpFL E4Z8TZoqrI9nHFHVfGkAUf++iTd+EdBBZwASIXW9T1h1ILlv1mVC2IWbAccYcQKmOkaBgcax luWyoaB6SNUjJWZTneU97GxpDy0ODQIIWJqWRLoXTfp8PG4/tht00unosJLVffs04arQW2YL yWi8XBm74j/m/LnwElSEbrvpzu37qbEQQcujuk8djL0t1gpDGJJimHB1LQ60RqiBNrIJrVil CJd8yR70AzoJcvc/MBqaL9QdIxFH97fbFXhbadHRvHNDQiF9X+5Zpx36zpjPkpvOctsUWa3P BKM5VoNuccLZCPCgUpLj2SZUZVCIU/IT4mNaxwpRoAWPsgZmPGvpkmCmnJ8L0iyyRNxwMnTy L+QcNq2DGZyNEiU5GHeegvp6pdynnpW7TqKHfjTlk37uZLDNC/9YepUazOmM7FmhJ5oVS2Iq r6zwePRkE4BOAA/CwGKmbMuwacidiBqVcir8JUMLoZu4GNOQQkcNhMY+pt5E6QNokifvrygE q2VMqOA9GfCuA== IronPort-HdrOrdr: A9a23:cZOTB6rBSZWrKJwZSx7rYJYaV5oteYIsimQD101hICG8cqSj+P xG+85rsiMc6QxhIU3I9urgBEDtex7hHNtOkOss1NSZLW3bUQmTTL2KhLGKq1aLJ8S9zJ856U 4JSdkZNDSaNzZHZKjBjDVQa+xQo+W6zA== X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="64433086" From: Anthony PERARD To: CC: Anthony PERARD , Samuel Thibault , Wei Liu Subject: [XEN PATCH v2 24/29] stubdom: introduce xenlibs.mk Date: Fri, 25 Feb 2022 15:13:16 +0000 Message-ID: <20220225151321.44126-25-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 This new makefile will be used to build libraries that provides "Makefile.common". At some point, we will be converting Makefile in tools/ to "subdirmk" and stubdom build will not be able to use those new makefiles, so we will put the necessary information for stubdom to build the xen libraries into a new Makefile.common and xenlibs.mk will use it. We only need to build static libraries and don't need anything else. The check for the presence of "Makefile.common" will go aways once there is one for all libraries used by stubdom build. Also remove DESTDIR= from "clean" targets, we don't do installation in this recipe so the value of DESTDIR doesn't matter. Signed-off-by: Anthony PERARD Reviewed-by: Samuel Thibault --- Notes: v2: - reviewed stubdom/Makefile | 9 +++++++-- stubdom/xenlibs.mk | 13 +++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 stubdom/xenlibs.mk diff --git a/stubdom/Makefile b/stubdom/Makefile index 5fb5dbc341..fba4c977ef 100644 --- a/stubdom/Makefile +++ b/stubdom/Makefile @@ -346,6 +346,7 @@ define do_links cd $(dir $@); \ ln -sf $(dir $<)include/*.h include/; \ ln -sf $(dir $<)*.[ch] .; \ + [ -e $(dir $<)Makefile.common ] && ln -sf $(dir $<)Makefile.common . ||:; \ ln -sf $(dir $<)Makefile . touch $@ endef @@ -355,10 +356,14 @@ define BUILD_lib libxen$(1): libs-$$(XEN_TARGET_ARCH)/$(1)/libxen$(1).a libs-$$(XEN_TARGET_ARCH)/$(1)/libxen$(1).a: $$(LIBDEPS_$(1)) $$(LIBDEP_$(1)) libs-$$(XEN_TARGET_ARCH)/$(1)/libxen$(1).a: mk-headers-$$(XEN_TARGET_ARCH) $$(NEWLIB_STAMPFILE) .phony - CPPFLAGS="$$(TARGET_CPPFLAGS)" CFLAGS="$$(TARGET_CFLAGS)" $$(MAKE) CONFIG_LIBXC_MINIOS=y -C $$(@D) $$(@F) + CPPFLAGS="$$(TARGET_CPPFLAGS)" CFLAGS="$$(TARGET_CFLAGS)" $$(MAKE) CONFIG_LIBXC_MINIOS=y $$(if $$(wildcard $$(@D)/Makefile.common),-f $(CURDIR)/xenlibs.mk) -C $$(@D) $$(@F) clean-libxen$(1): - [ ! -e libs-$$(XEN_TARGET_ARCH)/$(1)/Makefile ] || $$(MAKE) DESTDIR= -C libs-$$(XEN_TARGET_ARCH)/$(1) clean + if [ -e libs-$$(XEN_TARGET_ARCH)/$(1)/Makefile.common ]; then \ + $$(MAKE) -f $(CURDIR)/xenlibs.mk -C libs-$$(XEN_TARGET_ARCH)/$(1) clean; \ + elif [ -e libs-$$(XEN_TARGET_ARCH)/$(1)/Makefile ]; then \ + $$(MAKE) -C libs-$$(XEN_TARGET_ARCH)/$(1) clean; \ + fi libs-$$(XEN_TARGET_ARCH)/$(1)/stamp: $$(XEN_ROOT)/tools/libs/$(1)/Makefile $$(do_links) diff --git a/stubdom/xenlibs.mk b/stubdom/xenlibs.mk new file mode 100644 index 0000000000..5c8742ccf9 --- /dev/null +++ b/stubdom/xenlibs.mk @@ -0,0 +1,13 @@ +include $(XEN_ROOT)/tools/Rules.mk + +include Makefile.common + +LIBNAME := $(notdir $(CURDIR)) +FILENAME_$(LIBNAME) ?= xen$(LIBNAME) +LIB_FILE_NAME = $(FILENAME_$(LIBNAME)) + +lib$(LIB_FILE_NAME).a: $(OBJS-y) + $(AR) rc $@ $^ + +clean:: + rm -f $(OBJS-y) lib$(LIB_FILE_NAME).a From patchwork Fri Feb 25 15:13:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760476 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 0A2EBC433FE for ; Fri, 25 Feb 2022 15:16:56 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279280.476975 (Exim 4.92) (envelope-from ) id 1nNcKp-0001H0-Fo; Fri, 25 Feb 2022 15:16:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279280.476975; Fri, 25 Feb 2022 15:16:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcKp-0001Gu-BF; Fri, 25 Feb 2022 15:16:43 +0000 Received: by outflank-mailman (input) for mailman id 279280; Fri, 25 Feb 2022 15:16:42 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcIY-0007Bf-Da for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:14:22 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 9a7d7af3-964d-11ec-8eb9-a37418f5ba1a; Fri, 25 Feb 2022 16:14:20 +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: 9a7d7af3-964d-11ec-8eb9-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802060; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ae6Vs1nYUDXcC+AeNHwQbE6sOaNWGywbrl+G+3LlLsM=; b=Bz4Kn8I01W6nIeSsoYj7gcqadaW4K6E6KjOiPPv69JMZ8YC93t+DFr8n Qz36MN5flOZELNEVbgiH3PskO91IEgw+ZsaXRCA5jEYa36QBuovYVFp// DO0tLAF5Eh7YQ8c8tbnvpGUmuDxCa4qP+SENdoSoukjw2/fqGEozQT8Hu c=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 65000340 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:iYn56ahvJU19gsPbU+X4iVjRX161eBAKZh0ujC45NGQN5FlHY01je htvCGjUP6nYYGH3fdAiPNy28UwB7ZTXmNZiSwI6/CFgF3wb9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oDJ9CU6jefSLlbFILas1hpZHGeIcw98z0M78wIFqtQw24LhWVnQ4 YmaT/D3YzdJ5RYlagr41IrbwP9flKyaVOQw5wFWiVhj5TcyplFNZH4tDfjZw0jQG+G4KtWSV efbpIxVy0uCl/sb5nFJpZ6gGqECaua60QFjERO6UYD66vRJjnRaPqrWqJPwwKqY4tmEt4kZ9 TlDiXC/YSgFH7bAivo6aj9nL3h4PaBH/5aaJnfq5KR/z2WeG5ft6/BnDUVwNowE4OdnR2pJ8 JT0KhhUMErF3bjvhuvmFK883azPL+GyVG8bknhm0THeC+dgWZ3ZSr/GzdRZwC0xloZFGvO2i 88xN2c3NEybP0Un1lE/DM5nsLaLhFfDTxpIsmq5vIgJoGTo9VkkuFTqGIWMIYHbLSlPpW6Ho krW8mK/BQsVXPSEwD+Y/3bqmu/OlyrmXJ46Gbujs/p7h1vVwXYcYDUGWF3+rfSnh0qWX9NEN 1dS6icotbI19kGgUp/6RRLQiHyLpBkHQPJLDvY3rgqKz8LpDx2xXzZeCGQbMZp/6ZFwFWdCO kK1c83BKhBOq7GHV1Wk0Iio9DWyNCkSBDIFanpRJeca2OXLrIY2hxPJa99sFq+pk9H4cQ3NL yC2QDsW3OtK05NSv0mv1RWe2m/3+MCVJuIgzliPBgqYAhVFiJlJjmBCwXzS9r5+IYmQVTFtV 1BUypHFvIji4Xxg/RFhodnh/pn1tp5p0xWG2DaD+qXNERz3qhZPmqgKvVlDyL9BaJpsRNMQS Ba7VfltzJFSJmC2SqR8fpi8Dc8npYC5S4i4CayNMocWOsApHONiwM2ITRTBt4wKuBJx+ZzTx L/BKZr8ZZrkIf4PIMWKqxc1juZwm3FWKZL7TpHn1RW3uYdyl1bOIYrpxGCmN7hjhIvd+V292 48Ga6OilkUOOMWjM3K/2dNCcjg3wY0TWMmeRzp/LbXYfGKL2QgJVpfs/F/WU9c9zvQNy7yRp SnVt40x4AOXuEAr4D6iMhhLAI4Dl74lxZ7nFUTA5WqV5kU= IronPort-HdrOrdr: A9a23:W+MrOqDZ/CU3RrvlHemU55DYdb4zR+YMi2TC1yhKJyC9Ffbo8f xG/c5rrSMc5wxwZJhNo7y90ey7MBbhHP1OkO4s1NWZLWrbUQKTRekIh+bfKn/baknDH4ZmpN 5dmsNFaeEYY2IUsS+D2njbL+od X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="65000340" From: Anthony PERARD To: CC: Anthony PERARD , Juergen Gross , Wei Liu , Samuel Thibault Subject: [XEN PATCH v2 25/29] tools/libs: create Makefile.common to be used by stubdom build system Date: Fri, 25 Feb 2022 15:13:17 +0000 Message-ID: <20220225151321.44126-26-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 This new "Makefile.common" is intended to be used by both tools/ and stubdom/ build system without stubdom needed to use tools/ build system. It should contain the necessary list of objects and CFLAGS needed to build a static library. Change stubdom/ to check Makefile.common, for the linkfarm. Signed-off-by: Anthony PERARD Reviewed-by: Juergen Gross --- Notes: v2: - reviewed stubdom/Makefile | 2 +- tools/libs/call/Makefile | 7 +- tools/libs/ctrl/Makefile | 45 +----------- tools/libs/devicemodel/Makefile | 7 +- tools/libs/evtchn/Makefile | 7 +- tools/libs/foreignmemory/Makefile | 7 +- tools/libs/gnttab/Makefile | 9 +-- tools/libs/guest/Makefile | 90 +----------------------- tools/libs/toolcore/Makefile | 2 +- tools/libs/toollog/Makefile | 3 +- tools/libs/call/Makefile.common | 6 ++ tools/libs/ctrl/Makefile.common | 44 ++++++++++++ tools/libs/devicemodel/Makefile.common | 6 ++ tools/libs/evtchn/Makefile.common | 6 ++ tools/libs/foreignmemory/Makefile.common | 6 ++ tools/libs/gnttab/Makefile.common | 8 +++ tools/libs/guest/Makefile.common | 84 ++++++++++++++++++++++ tools/libs/toolcore/Makefile.common | 1 + tools/libs/toollog/Makefile.common | 2 + 19 files changed, 174 insertions(+), 168 deletions(-) create mode 100644 tools/libs/call/Makefile.common create mode 100644 tools/libs/ctrl/Makefile.common create mode 100644 tools/libs/devicemodel/Makefile.common create mode 100644 tools/libs/evtchn/Makefile.common create mode 100644 tools/libs/foreignmemory/Makefile.common create mode 100644 tools/libs/gnttab/Makefile.common create mode 100644 tools/libs/guest/Makefile.common create mode 100644 tools/libs/toolcore/Makefile.common create mode 100644 tools/libs/toollog/Makefile.common diff --git a/stubdom/Makefile b/stubdom/Makefile index fba4c977ef..fbc63a5063 100644 --- a/stubdom/Makefile +++ b/stubdom/Makefile @@ -365,7 +365,7 @@ define BUILD_lib $$(MAKE) -C libs-$$(XEN_TARGET_ARCH)/$(1) clean; \ fi - libs-$$(XEN_TARGET_ARCH)/$(1)/stamp: $$(XEN_ROOT)/tools/libs/$(1)/Makefile + libs-$$(XEN_TARGET_ARCH)/$(1)/stamp: $$(XEN_ROOT)/tools/libs/$(1)/Makefile.common $$(do_links) endef diff --git a/tools/libs/call/Makefile b/tools/libs/call/Makefile index e5cb7c937c..103f5ad360 100644 --- a/tools/libs/call/Makefile +++ b/tools/libs/call/Makefile @@ -4,11 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 3 -OBJS-y += core.o buffer.o -OBJS-$(CONFIG_Linux) += linux.o -OBJS-$(CONFIG_FreeBSD) += freebsd.o -OBJS-$(CONFIG_SunOS) += solaris.o -OBJS-$(CONFIG_NetBSD) += netbsd.o -OBJS-$(CONFIG_MiniOS) += minios.o +include Makefile.common include $(XEN_ROOT)/tools/libs/libs.mk diff --git a/tools/libs/ctrl/Makefile b/tools/libs/ctrl/Makefile index 5fd06949f1..93442ab389 100644 --- a/tools/libs/ctrl/Makefile +++ b/tools/libs/ctrl/Makefile @@ -1,50 +1,7 @@ XEN_ROOT = $(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk -OBJS-y += xc_altp2m.o -OBJS-y += xc_cpupool.o -OBJS-y += xc_domain.o -OBJS-y += xc_evtchn.o -OBJS-y += xc_gnttab.o -OBJS-y += xc_misc.o -OBJS-y += xc_flask.o -OBJS-y += xc_physdev.o -OBJS-y += xc_private.o -OBJS-y += xc_csched.o -OBJS-y += xc_csched2.o -OBJS-y += xc_arinc653.o -OBJS-y += xc_rt.o -OBJS-y += xc_tbuf.o -OBJS-y += xc_pm.o -OBJS-y += xc_cpu_hotplug.o -OBJS-y += xc_vm_event.o -OBJS-y += xc_vmtrace.o -OBJS-y += xc_monitor.o -OBJS-y += xc_mem_paging.o -OBJS-y += xc_mem_access.o -OBJS-y += xc_memshr.o -OBJS-y += xc_hcall_buf.o -OBJS-y += xc_foreign_memory.o -OBJS-y += xc_kexec.o -OBJS-y += xc_resource.o -OBJS-$(CONFIG_X86) += xc_psr.o -OBJS-$(CONFIG_X86) += xc_pagetab.o -OBJS-$(CONFIG_Linux) += xc_linux.o -OBJS-$(CONFIG_FreeBSD) += xc_freebsd.o -OBJS-$(CONFIG_SunOS) += xc_solaris.o -OBJS-$(CONFIG_NetBSD) += xc_netbsd.o -OBJS-$(CONFIG_NetBSDRump) += xc_netbsd.o -OBJS-$(CONFIG_MiniOS) += xc_minios.o -OBJS-y += xc_evtchn_compat.o -OBJS-y += xc_gnttab_compat.o -OBJS-y += xc_devicemodel_compat.o - -CFLAGS += -D__XEN_TOOLS__ -CFLAGS += $(PTHREAD_CFLAGS) -CFLAGS += -include $(XEN_ROOT)/tools/config.h - -# Needed for posix_fadvise64() in xc_linux.c -CFLAGS-$(CONFIG_Linux) += -D_GNU_SOURCE +include Makefile.common LIBHEADER := xenctrl.h xenctrl_compat.h PKG_CONFIG := xencontrol.pc diff --git a/tools/libs/devicemodel/Makefile b/tools/libs/devicemodel/Makefile index a0a2d24f99..b70dd774e4 100644 --- a/tools/libs/devicemodel/Makefile +++ b/tools/libs/devicemodel/Makefile @@ -4,11 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 4 -OBJS-y += core.o -OBJS-$(CONFIG_Linux) += common.o -OBJS-$(CONFIG_FreeBSD) += common.o -OBJS-$(CONFIG_SunOS) += compat.o -OBJS-$(CONFIG_NetBSD) += compat.o -OBJS-$(CONFIG_MiniOS) += compat.o +include Makefile.common include $(XEN_ROOT)/tools/libs/libs.mk diff --git a/tools/libs/evtchn/Makefile b/tools/libs/evtchn/Makefile index 8208ecf650..3dad3840c6 100644 --- a/tools/libs/evtchn/Makefile +++ b/tools/libs/evtchn/Makefile @@ -4,11 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 2 -OBJS-y += core.o -OBJS-$(CONFIG_Linux) += linux.o -OBJS-$(CONFIG_FreeBSD) += freebsd.o -OBJS-$(CONFIG_SunOS) += solaris.o -OBJS-$(CONFIG_NetBSD) += netbsd.o -OBJS-$(CONFIG_MiniOS) += minios.o +include Makefile.common include $(XEN_ROOT)/tools/libs/libs.mk diff --git a/tools/libs/foreignmemory/Makefile b/tools/libs/foreignmemory/Makefile index 4427435932..b70dd774e4 100644 --- a/tools/libs/foreignmemory/Makefile +++ b/tools/libs/foreignmemory/Makefile @@ -4,11 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 4 -OBJS-y += core.o -OBJS-$(CONFIG_Linux) += linux.o -OBJS-$(CONFIG_FreeBSD) += freebsd.o -OBJS-$(CONFIG_SunOS) += compat.o solaris.o -OBJS-$(CONFIG_NetBSD) += netbsd.o -OBJS-$(CONFIG_MiniOS) += minios.o +include Makefile.common include $(XEN_ROOT)/tools/libs/libs.mk diff --git a/tools/libs/gnttab/Makefile b/tools/libs/gnttab/Makefile index 7d7aeeadff..3dad3840c6 100644 --- a/tools/libs/gnttab/Makefile +++ b/tools/libs/gnttab/Makefile @@ -4,13 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 2 -OBJS-GNTTAB += gnttab_core.o -OBJS-GNTSHR += gntshr_core.o - -OBJS-$(CONFIG_Linux) += $(OBJS-GNTTAB) $(OBJS-GNTSHR) linux.o -OBJS-$(CONFIG_MiniOS) += $(OBJS-GNTTAB) gntshr_unimp.o minios.o -OBJS-$(CONFIG_FreeBSD) += $(OBJS-GNTTAB) $(OBJS-GNTSHR) freebsd.o -OBJS-$(CONFIG_NetBSD) += $(OBJS-GNTTAB) $(OBJS-GNTSHR) netbsd.o -OBJS-$(CONFIG_SunOS) += gnttab_unimp.o gntshr_unimp.o +include Makefile.common include $(XEN_ROOT)/tools/libs/libs.mk diff --git a/tools/libs/guest/Makefile b/tools/libs/guest/Makefile index 4f2373101f..19d3ff2fdb 100644 --- a/tools/libs/guest/Makefile +++ b/tools/libs/guest/Makefile @@ -1,97 +1,11 @@ XEN_ROOT = $(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk -ifeq ($(CONFIG_LIBXC_MINIOS),y) -# Save/restore of a domain is currently incompatible with a stubdom environment -override CONFIG_MIGRATE := n -endif - -OBJS-y += xg_private.o -OBJS-y += xg_domain.o -OBJS-y += xg_suspend.o -OBJS-y += xg_resume.o -ifeq ($(CONFIG_MIGRATE),y) -OBJS-y += xg_sr_common.o -OBJS-$(CONFIG_X86) += xg_sr_common_x86.o -OBJS-$(CONFIG_X86) += xg_sr_common_x86_pv.o -OBJS-$(CONFIG_X86) += xg_sr_restore_x86_pv.o -OBJS-$(CONFIG_X86) += xg_sr_restore_x86_hvm.o -OBJS-$(CONFIG_X86) += xg_sr_save_x86_pv.o -OBJS-$(CONFIG_X86) += xg_sr_save_x86_hvm.o -OBJS-y += xg_sr_restore.o -OBJS-y += xg_sr_save.o -OBJS-y += xg_offline_page.o -else -OBJS-y += xg_nomigrate.o -endif -OBJS-y += xg_core.o -OBJS-$(CONFIG_X86) += xg_core_x86.o -OBJS-$(CONFIG_ARM) += xg_core_arm.o - -vpath %.c ../../../xen/common/libelf - -LIBELF_OBJS += libelf-tools.o libelf-loader.o -LIBELF_OBJS += libelf-dominfo.o - -OBJS-y += $(LIBELF_OBJS) - -ifeq ($(CONFIG_X86),y) # Add libx86 to the build -vpath %.c ../../../xen/lib/x86 - -OBJS-y += cpuid.o msr.o policy.o -endif - -# new domain builder -OBJS-y += xg_dom_core.o -OBJS-y += xg_dom_boot.o -OBJS-y += xg_dom_elfloader.o -OBJS-$(CONFIG_X86) += xg_dom_bzimageloader.o -OBJS-$(CONFIG_X86) += xg_dom_decompress_lz4.o -OBJS-$(CONFIG_X86) += xg_dom_hvmloader.o -OBJS-$(CONFIG_ARM) += xg_dom_armzimageloader.o -OBJS-y += xg_dom_binloader.o -OBJS-y += xg_dom_compat_linux.o - -OBJS-$(CONFIG_X86) += xg_dom_x86.o -OBJS-$(CONFIG_X86) += xg_cpuid_x86.o -OBJS-$(CONFIG_ARM) += xg_dom_arm.o - -ifeq ($(CONFIG_LIBXC_MINIOS),y) -OBJS-y += xg_dom_decompress_unsafe.o -OBJS-y += xg_dom_decompress_unsafe_bzip2.o -OBJS-y += xg_dom_decompress_unsafe_lzma.o -OBJS-y += xg_dom_decompress_unsafe_lzo1x.o -OBJS-y += xg_dom_decompress_unsafe_xz.o -OBJS-y += xg_dom_decompress_unsafe_zstd.o -endif - -CFLAGS += -D__XEN_TOOLS__ -CFLAGS += -include $(XEN_ROOT)/tools/config.h -CFLAGS += -iquote ../../../xen/common/libelf - -# To be able to include xc_private.h -CFLAGS += -iquote $(XEN_libxenctrl) - -# Needed for posix_fadvise64() in xc_linux.c -CFLAGS-$(CONFIG_Linux) += -D_GNU_SOURCE - -CFLAGS += $(PTHREAD_CFLAGS) -CFLAGS += $(CFLAGS_libxentoollog) -CFLAGS += $(CFLAGS_libxenevtchn) -CFLAGS += $(CFLAGS_libxendevicemodel) - -# libxenguest includes xc_private.h, so needs this despite not using -# this functionality directly. -CFLAGS += $(CFLAGS_libxencall) $(CFLAGS_libxenforeignmemory) - -ifeq ($(CONFIG_MiniOS),y) -ZLIB_CFLAGS := -ZLIB_LIBS := -endif +include Makefile.common xg_dom_bzimageloader.o xg_dom_bzimageloader.opic: CFLAGS += $(ZLIB_CFLAGS) -$(LIBELF_OBJS) $(LIBELF_OBJS:.o=.opic): CFLAGS += -Wno-pointer-sign +$(LIBELF_OBJS:.o=.opic): CFLAGS += -Wno-pointer-sign LIBHEADER := xenguest.h diff --git a/tools/libs/toolcore/Makefile b/tools/libs/toolcore/Makefile index ce417ea648..0d92b68b3b 100644 --- a/tools/libs/toolcore/Makefile +++ b/tools/libs/toolcore/Makefile @@ -6,7 +6,7 @@ MINOR = 0 LIBHEADER := xentoolcore.h -OBJS-y += handlereg.o +include Makefile.common include $(XEN_ROOT)/tools/libs/libs.mk diff --git a/tools/libs/toollog/Makefile b/tools/libs/toollog/Makefile index c09aa02ba5..2361b8cbf1 100644 --- a/tools/libs/toollog/Makefile +++ b/tools/libs/toollog/Makefile @@ -4,7 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 0 -OBJS-y += xtl_core.o -OBJS-y += xtl_logger_stdio.o +include Makefile.common include $(XEN_ROOT)/tools/libs/libs.mk diff --git a/tools/libs/call/Makefile.common b/tools/libs/call/Makefile.common new file mode 100644 index 0000000000..85e608f8ad --- /dev/null +++ b/tools/libs/call/Makefile.common @@ -0,0 +1,6 @@ +OBJS-y += core.o buffer.o +OBJS-$(CONFIG_Linux) += linux.o +OBJS-$(CONFIG_FreeBSD) += freebsd.o +OBJS-$(CONFIG_SunOS) += solaris.o +OBJS-$(CONFIG_NetBSD) += netbsd.o +OBJS-$(CONFIG_MiniOS) += minios.o diff --git a/tools/libs/ctrl/Makefile.common b/tools/libs/ctrl/Makefile.common new file mode 100644 index 0000000000..0a09c28fd3 --- /dev/null +++ b/tools/libs/ctrl/Makefile.common @@ -0,0 +1,44 @@ +OBJS-y += xc_altp2m.o +OBJS-y += xc_cpupool.o +OBJS-y += xc_domain.o +OBJS-y += xc_evtchn.o +OBJS-y += xc_gnttab.o +OBJS-y += xc_misc.o +OBJS-y += xc_flask.o +OBJS-y += xc_physdev.o +OBJS-y += xc_private.o +OBJS-y += xc_csched.o +OBJS-y += xc_csched2.o +OBJS-y += xc_arinc653.o +OBJS-y += xc_rt.o +OBJS-y += xc_tbuf.o +OBJS-y += xc_pm.o +OBJS-y += xc_cpu_hotplug.o +OBJS-y += xc_vm_event.o +OBJS-y += xc_vmtrace.o +OBJS-y += xc_monitor.o +OBJS-y += xc_mem_paging.o +OBJS-y += xc_mem_access.o +OBJS-y += xc_memshr.o +OBJS-y += xc_hcall_buf.o +OBJS-y += xc_foreign_memory.o +OBJS-y += xc_kexec.o +OBJS-y += xc_resource.o +OBJS-$(CONFIG_X86) += xc_psr.o +OBJS-$(CONFIG_X86) += xc_pagetab.o +OBJS-$(CONFIG_Linux) += xc_linux.o +OBJS-$(CONFIG_FreeBSD) += xc_freebsd.o +OBJS-$(CONFIG_SunOS) += xc_solaris.o +OBJS-$(CONFIG_NetBSD) += xc_netbsd.o +OBJS-$(CONFIG_NetBSDRump) += xc_netbsd.o +OBJS-$(CONFIG_MiniOS) += xc_minios.o +OBJS-y += xc_evtchn_compat.o +OBJS-y += xc_gnttab_compat.o +OBJS-y += xc_devicemodel_compat.o + +CFLAGS += -D__XEN_TOOLS__ +CFLAGS += $(PTHREAD_CFLAGS) +CFLAGS += -include $(XEN_ROOT)/tools/config.h + +# Needed for posix_fadvise64() in xc_linux.c +CFLAGS-$(CONFIG_Linux) += -D_GNU_SOURCE diff --git a/tools/libs/devicemodel/Makefile.common b/tools/libs/devicemodel/Makefile.common new file mode 100644 index 0000000000..a7bf7c35bb --- /dev/null +++ b/tools/libs/devicemodel/Makefile.common @@ -0,0 +1,6 @@ +OBJS-y += core.o +OBJS-$(CONFIG_Linux) += common.o +OBJS-$(CONFIG_FreeBSD) += common.o +OBJS-$(CONFIG_SunOS) += compat.o +OBJS-$(CONFIG_NetBSD) += compat.o +OBJS-$(CONFIG_MiniOS) += compat.o diff --git a/tools/libs/evtchn/Makefile.common b/tools/libs/evtchn/Makefile.common new file mode 100644 index 0000000000..20629f521a --- /dev/null +++ b/tools/libs/evtchn/Makefile.common @@ -0,0 +1,6 @@ +OBJS-y += core.o +OBJS-$(CONFIG_Linux) += linux.o +OBJS-$(CONFIG_FreeBSD) += freebsd.o +OBJS-$(CONFIG_SunOS) += solaris.o +OBJS-$(CONFIG_NetBSD) += netbsd.o +OBJS-$(CONFIG_MiniOS) += minios.o diff --git a/tools/libs/foreignmemory/Makefile.common b/tools/libs/foreignmemory/Makefile.common new file mode 100644 index 0000000000..ff3b1d4f3e --- /dev/null +++ b/tools/libs/foreignmemory/Makefile.common @@ -0,0 +1,6 @@ +OBJS-y += core.o +OBJS-$(CONFIG_Linux) += linux.o +OBJS-$(CONFIG_FreeBSD) += freebsd.o +OBJS-$(CONFIG_SunOS) += compat.o solaris.o +OBJS-$(CONFIG_NetBSD) += netbsd.o +OBJS-$(CONFIG_MiniOS) += minios.o diff --git a/tools/libs/gnttab/Makefile.common b/tools/libs/gnttab/Makefile.common new file mode 100644 index 0000000000..759e36e1cb --- /dev/null +++ b/tools/libs/gnttab/Makefile.common @@ -0,0 +1,8 @@ +OBJS-GNTTAB += gnttab_core.o +OBJS-GNTSHR += gntshr_core.o + +OBJS-$(CONFIG_Linux) += $(OBJS-GNTTAB) $(OBJS-GNTSHR) linux.o +OBJS-$(CONFIG_MiniOS) += $(OBJS-GNTTAB) gntshr_unimp.o minios.o +OBJS-$(CONFIG_FreeBSD) += $(OBJS-GNTTAB) $(OBJS-GNTSHR) freebsd.o +OBJS-$(CONFIG_NetBSD) += $(OBJS-GNTTAB) $(OBJS-GNTSHR) netbsd.o +OBJS-$(CONFIG_SunOS) += gnttab_unimp.o gntshr_unimp.o diff --git a/tools/libs/guest/Makefile.common b/tools/libs/guest/Makefile.common new file mode 100644 index 0000000000..a026a2f662 --- /dev/null +++ b/tools/libs/guest/Makefile.common @@ -0,0 +1,84 @@ +ifeq ($(CONFIG_LIBXC_MINIOS),y) +# Save/restore of a domain is currently incompatible with a stubdom environment +override CONFIG_MIGRATE := n +endif + +OBJS-y += xg_private.o +OBJS-y += xg_domain.o +OBJS-y += xg_suspend.o +OBJS-y += xg_resume.o +ifeq ($(CONFIG_MIGRATE),y) +OBJS-y += xg_sr_common.o +OBJS-$(CONFIG_X86) += xg_sr_common_x86.o +OBJS-$(CONFIG_X86) += xg_sr_common_x86_pv.o +OBJS-$(CONFIG_X86) += xg_sr_restore_x86_pv.o +OBJS-$(CONFIG_X86) += xg_sr_restore_x86_hvm.o +OBJS-$(CONFIG_X86) += xg_sr_save_x86_pv.o +OBJS-$(CONFIG_X86) += xg_sr_save_x86_hvm.o +OBJS-y += xg_sr_restore.o +OBJS-y += xg_sr_save.o +OBJS-y += xg_offline_page.o +else +OBJS-y += xg_nomigrate.o +endif +OBJS-y += xg_core.o +OBJS-$(CONFIG_X86) += xg_core_x86.o +OBJS-$(CONFIG_ARM) += xg_core_arm.o + +vpath %.c ../../../xen/common/libelf + +LIBELF_OBJS += libelf-tools.o libelf-loader.o +LIBELF_OBJS += libelf-dominfo.o + +OBJS-y += $(LIBELF_OBJS) + +ifeq ($(CONFIG_X86),y) # Add libx86 to the build +vpath %.c ../../../xen/lib/x86 + +OBJS-y += cpuid.o msr.o policy.o +endif + +# new domain builder +OBJS-y += xg_dom_core.o +OBJS-y += xg_dom_boot.o +OBJS-y += xg_dom_elfloader.o +OBJS-$(CONFIG_X86) += xg_dom_bzimageloader.o +OBJS-$(CONFIG_X86) += xg_dom_decompress_lz4.o +OBJS-$(CONFIG_X86) += xg_dom_hvmloader.o +OBJS-$(CONFIG_ARM) += xg_dom_armzimageloader.o +OBJS-y += xg_dom_binloader.o +OBJS-y += xg_dom_compat_linux.o + +OBJS-$(CONFIG_X86) += xg_dom_x86.o +OBJS-$(CONFIG_X86) += xg_cpuid_x86.o +OBJS-$(CONFIG_ARM) += xg_dom_arm.o + +ifeq ($(CONFIG_LIBXC_MINIOS),y) +OBJS-y += xg_dom_decompress_unsafe.o +OBJS-y += xg_dom_decompress_unsafe_bzip2.o +OBJS-y += xg_dom_decompress_unsafe_lzma.o +OBJS-y += xg_dom_decompress_unsafe_lzo1x.o +OBJS-y += xg_dom_decompress_unsafe_xz.o +OBJS-y += xg_dom_decompress_unsafe_zstd.o +endif + +CFLAGS += -D__XEN_TOOLS__ +CFLAGS += -include $(XEN_ROOT)/tools/config.h +CFLAGS += -iquote ../../../xen/common/libelf + +# To be able to include xc_private.h +CFLAGS += -iquote $(XEN_libxenctrl) + +# Needed for posix_fadvise64() in xc_linux.c +CFLAGS-$(CONFIG_Linux) += -D_GNU_SOURCE + +CFLAGS += $(PTHREAD_CFLAGS) +CFLAGS += $(CFLAGS_libxentoollog) +CFLAGS += $(CFLAGS_libxenevtchn) +CFLAGS += $(CFLAGS_libxendevicemodel) + +# libxenguest includes xc_private.h, so needs this despite not using +# this functionality directly. +CFLAGS += $(CFLAGS_libxencall) $(CFLAGS_libxenforeignmemory) + +$(LIBELF_OBJS): CFLAGS += -Wno-pointer-sign diff --git a/tools/libs/toolcore/Makefile.common b/tools/libs/toolcore/Makefile.common new file mode 100644 index 0000000000..9ade6c12bf --- /dev/null +++ b/tools/libs/toolcore/Makefile.common @@ -0,0 +1 @@ +OBJS-y += handlereg.o diff --git a/tools/libs/toollog/Makefile.common b/tools/libs/toollog/Makefile.common new file mode 100644 index 0000000000..c053ac6a73 --- /dev/null +++ b/tools/libs/toollog/Makefile.common @@ -0,0 +1,2 @@ +OBJS-y += xtl_core.o +OBJS-y += xtl_logger_stdio.o From patchwork Fri Feb 25 15:13:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760473 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 441EAC43217 for ; Fri, 25 Feb 2022 15:16:56 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279286.476997 (Exim 4.92) (envelope-from ) id 1nNcKs-0001oB-1M; Fri, 25 Feb 2022 15:16:46 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279286.476997; Fri, 25 Feb 2022 15:16:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcKr-0001l2-O7; Fri, 25 Feb 2022 15:16:45 +0000 Received: by outflank-mailman (input) for mailman id 279286; Fri, 25 Feb 2022 15:16:43 +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 1nNcIX-0006fy-SP for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:14:21 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 9af70695-964d-11ec-8539-5f4723681683; Fri, 25 Feb 2022 16:14:20 +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: 9af70695-964d-11ec-8539-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802060; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zUPvHCMrHWztCdZF7XbOEKTRFq0ToqxKkhG98hXZpoI=; b=YrlaRQD5Aa33JuOGuqUBaqA1iN5OncTLT6WFT7Qy+8Jhm/zVADYaiUkv K/WIJpXKea3sZKGFD+c3EwABmxaEeZd3t9Z77FTWaCnN2kvQwgtg9ZpNL 8475PuhrOUiWgzGJt7elX/Ukau4IN7RtOOiaDSx9cvVGWCuAkzWgL7dvq 4=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 64433090 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:OzsjYq5KZJr+Pz+KkCm9EgxRtCDHchMFZxGqfqrLsTDasY5as4F+v mJNCzrVb67YNDPwLd53O4q18ElTu57RyNNlHQtrqihgHi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuVGuG96yE6j8lkf5KkYAL+EnkZqTRMFWFw0XqPp8Zj2tQy2YLjXlvX0 T/Pi5a31GGNimYc3l08s8pvmDs31BglkGpF1rCWTakjUG72zxH5PrpGTU2CByKQrr1vNvy7X 47+IISRpQs1yfuP5uSNyd4XemVSKlLb0JPnZnB+A8BOiTAazsA+PzpS2FPxpi67hh3Q9+2dx umhurSdSRYXI/HNnt4PCRp0HiRMEJBnwePIdC3XXcy7lyUqclPpyvRqSko3IZcZ6qB8BmQmG f4wcW5XKErZ3qTvnez9GrIEascLdaEHOKsWvG1gyjfIS+4rW5nZT43B5MNC3Sd2jcdLdRrbT 5RFNWE0NEWYC/FJEkoaJokFsceQvHfiXhJTpVPOo5omuFGGmWSd15CyaYGIK7RmX/59gUKwt m/AuWPjDXkyL9Wa1DeBtG6sh+XGgCfncI8UD/i85/lsxlqJyQQ7GBAQEFe2v/S9okq/QM5Eb VwZ/DI0qqo//1DtScPyNzW6r2SDpQU0QMdLHqsx7wTl90bPy1/HXC5eFGcHMYF48p9tLdA36 rOXt/7pFAJy7LyTc2DH9ZuZqAGfBAkscWBXMEfoUjA5y9XkpYgyiDfGQdBiDLO5g7XJJN3g/ 9yZhHNg3utO1Kbnw43+pAma2Gz0+vAlWyZovl2/Y46z0u9uiGdJjaSM4EOT0/tPJZ3xorKp7 CldwJj2AAzj4PiweM2xrAclQODBCxWtamS0bbtT838JrWXFF5mLJ9043d2GDB01WvvogBewC KMphStf5YVIIFyhZrJtboS6BqwClPa8SIu5D6yJNoIWOvCdkTNrGgk0NCZ8OEi3zSARfVwXY 8/HIa5A815AYUiY8NZGb7hEiuJ6rszP7WjSWYr633yaPUm2PxaopUM+GALWNIgRtfrcyC2Mq oo3H5bamn13DbylCgGKoNF7ELz/BSVibXwAg5cMLbDrz8sPMDxJNsI9Npt6I901x/kOz7yQl px/M2cBoGfCabT8AV3iQhhehHnHB/6TcVpT0fQQAGuV IronPort-HdrOrdr: A9a23:86t1jq2sqHlSKlmk7QFdrgqjBLQkLtp133Aq2lEZdPRUGvb2qy nIpoV96faUskdpZJhOo7G90cW7LE80sKQFg7X5Xo3SODUO2lHJEGgK1+KLqFfd8m/Fh4tgPM 9bAs5D4bbLY2SS4/yX3ODBKadC/OW6 X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="64433090" From: Anthony PERARD To: CC: Anthony PERARD , Juergen Gross , Wei Liu , Samuel Thibault Subject: [XEN PATCH v2 26/29] tools/xenstore: introduce Makefile.common to be used by stubdom Date: Fri, 25 Feb 2022 15:13:18 +0000 Message-ID: <20220225151321.44126-27-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 Also change stubdom to depends on Makefile.common. Signed-off-by: Anthony PERARD Reviewed-by: Juergen Gross --- Notes: v2: - reviewed stubdom/Makefile | 4 ++-- tools/xenstore/Makefile | 33 +++------------------------------ tools/xenstore/Makefile.common | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 32 deletions(-) create mode 100644 tools/xenstore/Makefile.common diff --git a/stubdom/Makefile b/stubdom/Makefile index fbc63a5063..6b804824ba 100644 --- a/stubdom/Makefile +++ b/stubdom/Makefile @@ -371,10 +371,10 @@ endef $(foreach lib,$(STUB_LIBS),$(eval $(call BUILD_lib,$(lib)))) -xenstore/stamp: $(XEN_ROOT)/tools/xenstore/Makefile +xenstore/stamp: $(XEN_ROOT)/tools/xenstore/Makefile.common $(do_links) -xenstorepvh/stamp: $(XEN_ROOT)/tools/xenstore/Makefile +xenstorepvh/stamp: $(XEN_ROOT)/tools/xenstore/Makefile.common $(do_links) LINK_DIRS := xenstore xenstorepvh $(foreach dir,$(STUB_LIBS),libs-$(XEN_TARGET_ARCH)/$(dir)) diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile index 830052c65f..1b66190cc5 100644 --- a/tools/xenstore/Makefile +++ b/tools/xenstore/Makefile @@ -1,31 +1,7 @@ XEN_ROOT=$(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror -# Include configure output (config.h) -CFLAGS += -include $(XEN_ROOT)/tools/config.h -CFLAGS += -I./include -CFLAGS += $(CFLAGS_libxenevtchn) -CFLAGS += $(CFLAGS_libxenctrl) -CFLAGS += $(CFLAGS_libxenguest) -CFLAGS += $(CFLAGS_libxentoolcore) -CFLAGS += -DXEN_LIB_STORED="\"$(XEN_LIB_STORED)\"" -CFLAGS += -DXEN_RUN_STORED="\"$(XEN_RUN_STORED)\"" - -ifdef CONFIG_STUBDOM -CFLAGS += -DNO_SOCKETS=1 -endif - -XENSTORED_OBJS-y := xenstored_core.o xenstored_watch.o xenstored_domain.o -XENSTORED_OBJS-y += xenstored_transaction.o xenstored_control.o -XENSTORED_OBJS-y += xs_lib.o talloc.o utils.o tdb.o hashtable.o - -XENSTORED_OBJS-$(CONFIG_Linux) += xenstored_posix.o -XENSTORED_OBJS-$(CONFIG_NetBSD) += xenstored_posix.o -XENSTORED_OBJS-$(CONFIG_FreeBSD) += xenstored_posix.o -XENSTORED_OBJS-$(CONFIG_MiniOS) += xenstored_minios.o - -$(XENSTORED_OBJS-y): CFLAGS += $(CFLAGS_libxengnttab) +include Makefile.common xenstored: LDLIBS += $(LDLIBS_libxenevtchn) xenstored: LDLIBS += $(LDLIBS_libxengnttab) @@ -65,9 +41,6 @@ clients: xenstore $(CLIENTS) xenstore-control xenstored: $(XENSTORED_OBJS-y) $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ $(APPEND_LDFLAGS) -xenstored.a: $(XENSTORED_OBJS-y) - $(AR) cr $@ $^ - $(CLIENTS): xenstore ln -f xenstore $@ @@ -81,8 +54,8 @@ xs_tdb_dump: xs_tdb_dump.o utils.o tdb.o talloc.o $(CC) $(LDFLAGS) $^ -o $@ $(APPEND_LDFLAGS) .PHONY: clean -clean: - $(RM) *.a *.o $(TARGETS) $(DEPS_RM) +clean:: + $(RM) $(TARGETS) $(DEPS_RM) .PHONY: distclean distclean: clean diff --git a/tools/xenstore/Makefile.common b/tools/xenstore/Makefile.common new file mode 100644 index 0000000000..21b78b0538 --- /dev/null +++ b/tools/xenstore/Makefile.common @@ -0,0 +1,33 @@ +# Makefile shared with stubdom + +XENSTORED_OBJS-y := xenstored_core.o xenstored_watch.o xenstored_domain.o +XENSTORED_OBJS-y += xenstored_transaction.o xenstored_control.o +XENSTORED_OBJS-y += xs_lib.o talloc.o utils.o tdb.o hashtable.o + +XENSTORED_OBJS-$(CONFIG_Linux) += xenstored_posix.o +XENSTORED_OBJS-$(CONFIG_NetBSD) += xenstored_posix.o +XENSTORED_OBJS-$(CONFIG_FreeBSD) += xenstored_posix.o +XENSTORED_OBJS-$(CONFIG_MiniOS) += xenstored_minios.o + +CFLAGS += -Werror +# Include configure output (config.h) +CFLAGS += -include $(XEN_ROOT)/tools/config.h +CFLAGS += -I./include +CFLAGS += $(CFLAGS_libxenevtchn) +CFLAGS += $(CFLAGS_libxenctrl) +CFLAGS += $(CFLAGS_libxenguest) +CFLAGS += $(CFLAGS_libxentoolcore) +CFLAGS += -DXEN_LIB_STORED="\"$(XEN_LIB_STORED)\"" +CFLAGS += -DXEN_RUN_STORED="\"$(XEN_RUN_STORED)\"" + +ifdef CONFIG_STUBDOM +CFLAGS += -DNO_SOCKETS=1 +endif + +$(XENSTORED_OBJS-y): CFLAGS += $(CFLAGS_libxengnttab) + +xenstored.a: $(XENSTORED_OBJS-y) + $(AR) cr $@ $^ + +clean:: + $(RM) *.a *.o From patchwork Fri Feb 25 15:13:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760467 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 B2D20C433F5 for ; Fri, 25 Feb 2022 15:16:33 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279250.476926 (Exim 4.92) (envelope-from ) id 1nNcKU-00077a-0w; Fri, 25 Feb 2022 15:16:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279250.476926; Fri, 25 Feb 2022 15:16:21 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcKT-000773-Rt; Fri, 25 Feb 2022 15:16:21 +0000 Received: by outflank-mailman (input) for mailman id 279250; Fri, 25 Feb 2022 15:16:20 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcIa-0007Bf-6O for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:14:24 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 9c196b56-964d-11ec-8eb9-a37418f5ba1a; Fri, 25 Feb 2022 16:14:23 +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: 9c196b56-964d-11ec-8eb9-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802062; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PjwCsNWxlB3gIKV9SoGAb5GW19kuozp+yzWw4gCwjzk=; b=iFrMEcm3XYP/19IRvxvJ/Vfi2cJ7RdYppZAQusk3SggO4hgP8Fhcwxm5 dg5+32DICiQU0WgVS14dDfgU2O1f33gFQtgCa2WOxTgM2CwOXUls4IEj0 X8cqC6y8mwbe0U8tQBwP/JqoFljdFmReJjuTrBVLRT8FWTiSDyHqEVCyl o=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 65407611 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:no3q46wld09LXDghvzh6t+c+xirEfRIJ4+MujC+fZmUNrF6WrkUEm DFLUGyHOP6KMTb9Kd9+OYi3908HvZ+Ex4JjSFNprSAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnj/0bv656yMUOZigHtIQMsadUsxKbVIiGX9JZS5LwbZj2NYy24XhWWthh PupyyHhEA79s9JLGjp8B5Kr8HuDa9yr5Vv0FnRnDRx6lAe2e0s9VfrzFonoR5fMeaFGH/bSe gr25OrRElU1XfsaIojNfr7TKiXmS1NJVOSEoiI+t6OK2nCuqsGuu0qS2TV1hUp/0l20c95NJ NpljsKdEiQUHKn2mekhXhBUSSRTZ7McweqSSZS/mZT7I0zudnLtx7NlDV0sPJ1e8eFyaY1M3 aVGcnZXNEnF3r/ohuLgIgVvrp1LwM3DNYUDunZm3HfBAOwvW5zrSKTW/95Imjw3g6iiGN6AO pZBNmQ2NXwsZTUXC2Y3S41npt6Lizr/XmBF8lO0ipIOtj27IAtZj+G2bYu9lsaxbdpRtlaVo CTB5WuRKgoTMcGSzXyZ8nOmj/LLgQv2XplXEKy/8LhtmlL77nweDlgaWEW2pdG9i1WiQJRPJ koM4C0soKMuskuxQbHAswaQ+SDe+ERGApwJTrN8uFrlJrfoDxixPTYpFR18StgctcIKSDUmj Fqkxc2zPGk62FGKck61+rCRpDK0HCEaK24eeCMJJTc4D8nfTJIb1UyWEIs6eEKhppisQGyrn WjWxMQrr+hL1aY2O7OHEUcrat5GjrzAVUYL6wreRQpJBSspNdf+N+REBbU2hMuszbp1rHHd7 RDoeODEtYji6K1hcgTXEY3h+5nzup643MX02wIHInXY323FF4SfVY5R+ipiA0xiL9wJfzTkC GeK518Mu8MKYCbyNfcvC25UNyjM5fKxfTgCfqqJBuein7ArLFPXlM2QTRT4M5/RfLgEzvhkZ MbznTeEBncGE6V3pAdatM9GuYLHMhsWnDuJLbiilkzP+ePHOBa9FOdUWHPTP7tRxP7V/23oH yN3apLiJ+N3C7alPEE6MOc7cDg3EJTMLcuu+pwPK7XaeVIO9aNII6a5/I7NsrdNx8x9/tokN FnkMqOE4DITXUH6FDg= IronPort-HdrOrdr: A9a23:hKt77qjydAUsfVa8aUocqJQDB3BQXtwji2hC6mlwRA09TySZ// rAoB19726StN9xYgBYpTnuAsi9qB/nmKKdpLNhX4tKPzOW3FdATrsD0WKK+VSJcEfDH6xmpM JdmsBFebvN5DNB4/oSjjPVLz9Z+qjlzJyV X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="65407611" From: Anthony PERARD To: CC: Anthony PERARD , Samuel Thibault , Wei Liu Subject: [XEN PATCH v2 27/29] stubdom: build xenstore*-stubdom using new Makefile.common Date: Fri, 25 Feb 2022 15:13:19 +0000 Message-ID: <20220225151321.44126-28-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 Makefile.common have everything needed by stubdom, when used with xenlibs.mk, so we don't need "Makefile" anymore. Also, remove DESTDIR for "xenstore" related targets, "xenlibs.mk" doesn't use DESTDIR so its value doesn't matter. Signed-off-by: Anthony PERARD Reviewed-by: Samuel Thibault --- Notes: v2: - reviewed stubdom/Makefile | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/stubdom/Makefile b/stubdom/Makefile index 6b804824ba..1fa075b9ad 100644 --- a/stubdom/Makefile +++ b/stubdom/Makefile @@ -346,8 +346,7 @@ define do_links cd $(dir $@); \ ln -sf $(dir $<)include/*.h include/; \ ln -sf $(dir $<)*.[ch] .; \ - [ -e $(dir $<)Makefile.common ] && ln -sf $(dir $<)Makefile.common . ||:; \ - ln -sf $(dir $<)Makefile . + ln -sf $(dir $<)Makefile.common . touch $@ endef @@ -356,13 +355,11 @@ define BUILD_lib libxen$(1): libs-$$(XEN_TARGET_ARCH)/$(1)/libxen$(1).a libs-$$(XEN_TARGET_ARCH)/$(1)/libxen$(1).a: $$(LIBDEPS_$(1)) $$(LIBDEP_$(1)) libs-$$(XEN_TARGET_ARCH)/$(1)/libxen$(1).a: mk-headers-$$(XEN_TARGET_ARCH) $$(NEWLIB_STAMPFILE) .phony - CPPFLAGS="$$(TARGET_CPPFLAGS)" CFLAGS="$$(TARGET_CFLAGS)" $$(MAKE) CONFIG_LIBXC_MINIOS=y $$(if $$(wildcard $$(@D)/Makefile.common),-f $(CURDIR)/xenlibs.mk) -C $$(@D) $$(@F) + CPPFLAGS="$$(TARGET_CPPFLAGS)" CFLAGS="$$(TARGET_CFLAGS)" $$(MAKE) CONFIG_LIBXC_MINIOS=y -f $(CURDIR)/xenlibs.mk -C $$(@D) $$(@F) clean-libxen$(1): if [ -e libs-$$(XEN_TARGET_ARCH)/$(1)/Makefile.common ]; then \ $$(MAKE) -f $(CURDIR)/xenlibs.mk -C libs-$$(XEN_TARGET_ARCH)/$(1) clean; \ - elif [ -e libs-$$(XEN_TARGET_ARCH)/$(1)/Makefile ]; then \ - $$(MAKE) -C libs-$$(XEN_TARGET_ARCH)/$(1) clean; \ fi libs-$$(XEN_TARGET_ARCH)/$(1)/stamp: $$(XEN_ROOT)/tools/libs/$(1)/Makefile.common @@ -494,7 +491,7 @@ xenstore-minios-config.mk: $(CURDIR)/xenstore-minios.cfg .PHONY: xenstore xenstore: $(CROSS_ROOT) xenstore-minios-config.mk - CPPFLAGS="$(TARGET_CPPFLAGS) $(shell cat xenstore-minios-config.mk)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C $@ xenstored.a CONFIG_STUBDOM=y + CPPFLAGS="$(TARGET_CPPFLAGS) $(shell cat xenstore-minios-config.mk)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) -f $(CURDIR)/xenlibs.mk -C $@ xenstored.a CONFIG_STUBDOM=y ############# # xenstorepvh @@ -505,7 +502,7 @@ xenstorepvh-minios-config.mk: $(CURDIR)/xenstorepvh-minios.cfg .PHONY: xenstorepvh xenstorepvh: $(CROSS_ROOT) xenstorepvh-minios-config.mk - CPPFLAGS="$(TARGET_CPPFLAGS) $(shell cat xenstorepvh-minios-config.mk)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C $@ xenstored.a CONFIG_STUBDOM=y + CPPFLAGS="$(TARGET_CPPFLAGS) $(shell cat xenstorepvh-minios-config.mk)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) -f $(CURDIR)/xenlibs.mk -C $@ xenstored.a CONFIG_STUBDOM=y ######## # minios @@ -657,8 +654,8 @@ clean: rm -f *-minios-config.mk rm -fr pkg-config -[ ! -d ioemu ] || $(MAKE) DESTDIR= -C ioemu clean - -[ ! -d xenstore ] || $(MAKE) DESTDIR= -C xenstore clean - -[ ! -d xenstorepvh ] || $(MAKE) DESTDIR= -C xenstorepvh clean + -[ ! -d xenstore ] || $(MAKE) -f $(CURDIR)/xenlibs.mk -C xenstore clean + -[ ! -d xenstorepvh ] || $(MAKE) -f $(CURDIR)/xenlibs.mk -C xenstorepvh clean # clean the cross-compilation result .PHONY: crossclean From patchwork Fri Feb 25 15:13:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760477 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 0F828C433EF for ; Fri, 25 Feb 2022 15:16:58 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279292.477022 (Exim 4.92) (envelope-from ) id 1nNcKu-0002MN-K8; Fri, 25 Feb 2022 15:16:48 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279292.477022; Fri, 25 Feb 2022 15:16:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcKt-0002GR-MQ; Fri, 25 Feb 2022 15:16:47 +0000 Received: by outflank-mailman (input) for mailman id 279292; Fri, 25 Feb 2022 15:16:44 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcIa-0007Bf-OF for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:14:24 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 9cda7daa-964d-11ec-8eb9-a37418f5ba1a; Fri, 25 Feb 2022 16:14:23 +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: 9cda7daa-964d-11ec-8eb9-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802063; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kixkpefhBRjANCwQ7euq99oUP/7Tc6+q09WVcxZqwx4=; b=R1tdvDVn14vuC39rem7NsgwufwPpQyQkPWoLASSZ9/1rUzjnEDjSG0dx 7yqF4yhlirsoOcTM/fAmzdArvwY0/KuSQtzp0GKv6ZLVkPOXr0ZGoNtkj f0g5pUqGQaIqWc6+YUEX3bfuAunR3LMD7oIAYW9Zed+5sy6QkQOV0fUcq M=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 65000348 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:3iVG06DMRirSzhVW/yDjw5YqxClBgxIJ4kV8jS/XYbTApDMqg2AAn zMaC22EPv+CN2T3Lt9wa4q39hkAsJ+Hz99nQQY4rX1jcSlH+JHPbTi7wuYcHM8wwunrFh8PA xA2M4GYRCwMZiaA4E/raNANlFEkvU2ybuOU5NXsZ2YgHWeIdA970Ug5w7Rj39Yy6TSEK1jlV e3a8pW31GCNg1aYAkpMg05UgEoy1BhakGpwUm0WPZinjneH/5UmJMt3yZWKB2n5WuFp8tuSH I4v+l0bElTxpH/BAvv9+lryn9ZjrrT6ZWBigVIOM0Sub4QrSoXfHc/XOdJFAXq7hQllkPhoj /5TmL3uFjwgZIncl+UkXwAFPgdHaPguFL/veRBTsOSWxkzCNXDt3+9vHAc9OohwFuRfWD8Us 6ZCcXZUM07F17neLLGTE4GAguwqKtXrO4UO/Glt1zjDAd4tQIzZQrWM7thdtNs1rp4TRa6GP JZJAdZpRBnhSEFDCg1INMsnubu3tF2iWjcfpU3A8MLb5ECMlVcsgdABKuH9ZdiiVchT2EGCq Qru5G38HxwecsCfyDCM73awruLJhmb/SYUUUrqi+ZZCkFCVg2AeFhASfV+6uuWizF6zXcpFL E4Z8TZoqrI9nHFHVfGkAUf++iTd+EdBBZwASIXW9T1h1ILNpC2HK0laEQVIMvg2u84PSSV3+ 3mwyoaB6SNUjJWZTneU97GxpDy0ODQIIWJqWRLoXTfp8PG4/tht00unosJLVffs04arQW2YL yWi8XBm74j/m/LnwElSEbrvpzu37qbEQQcujuk8djL0t1gpDGJJimHB1LQ60RqiBNrIJrVil CJd8yR70AzoJcvc/MBqaL9QdIxFH97fbFXhbadHRvHNDQiF9X+5Zpx36zpjPkpvOctsUWa3P BKM5VoNuccLZCPCgUpLj2SZUZVCIU/IT4mNaxwpRoAWPsgZmPGvpkmCmnJ8L0iyyRNxwMnTy L+QcNq2DGZyNEiU5GHeegvp6pdynnpW7TqKHfjTlk37uZLDNC/9YepUazOmM7FmhJ5oVS2Iq r6zwePRkE4BOAA/CwGKmbMuwacidiBqVcir8JUMLoZu4GNOQQkcNhMY+pt5E6QNokifvrygE q2VMqOA9GfCuA== IronPort-HdrOrdr: A9a23:+l1Y0apOvw0CxQuxZb+GZqgaV5oTeYIsimQD101hICG8cqSj+f xG+85rsyMc6QxhIE3I9urhBEDtex/hHNtOkOws1NSZLW7bUQmTXeJfBOLZqlWKcUDDH6xmpM NdmsBFeaTN5DNB7PoSjjPWLz9Z+qjkzJyV X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="65000348" From: Anthony PERARD To: CC: Anthony PERARD , Samuel Thibault , Wei Liu Subject: [XEN PATCH v2 28/29] stubdom: xenlibs linkfarm, ignore non-regular files Date: Fri, 25 Feb 2022 15:13:20 +0000 Message-ID: <20220225151321.44126-29-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 When we will convert tools/ build system, their will be a need to replace some use of "vpath". This will done making symbolic links. Those symlinks are not wanted by stubdom build system when making a linkfarm for the Xen libraries. To avoid them, we will use `find` instead of plain shell globbing. For example, there will be a link to "xen/lib/x86/cpuid.o" in "tools/libs/guest/". Signed-off-by: Anthony PERARD Reviewed-by: Samuel Thibault --- Notes: v2: - reviewed stubdom/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubdom/Makefile b/stubdom/Makefile index 1fa075b9ad..b312f710cd 100644 --- a/stubdom/Makefile +++ b/stubdom/Makefile @@ -345,7 +345,7 @@ define do_links mkdir -p $(dir $@)include cd $(dir $@); \ ln -sf $(dir $<)include/*.h include/; \ - ln -sf $(dir $<)*.[ch] .; \ + find $(dir $<) -maxdepth 1 -type f -name '*.[ch]' -exec ln -sf {} . \; ; \ ln -sf $(dir $<)Makefile.common . touch $@ endef From patchwork Fri Feb 25 15:13:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12760478 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 C7E21C433F5 for ; Fri, 25 Feb 2022 15:16:59 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.279299.477028 (Exim 4.92) (envelope-from ) id 1nNcKv-0002dE-E4; Fri, 25 Feb 2022 15:16:49 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 279299.477028; Fri, 25 Feb 2022 15:16:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcKu-0002XG-RI; Fri, 25 Feb 2022 15:16:48 +0000 Received: by outflank-mailman (input) for mailman id 279299; Fri, 25 Feb 2022 15:16:46 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nNcIf-0007Bf-NL for xen-devel@lists.xenproject.org; Fri, 25 Feb 2022 15:14:29 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 9e8be35f-964d-11ec-8eb9-a37418f5ba1a; Fri, 25 Feb 2022 16:14:27 +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: 9e8be35f-964d-11ec-8eb9-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1645802067; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kVfi8O5fUs5vOwYORwAwSsIcv2wq/KeyJm02u0brLh8=; b=B13VtlZNDjEy4Lrb9Kncz0B4+D3s/zKtSIl04Sx2+vyytNnTwG81aSR3 i+MH9Y8Tk3/7SUmkAfZpCoh3u32CBzDijK0NzepCPpKw2lqR7Dbqo50q5 5cm0JDqcfdzS1mlTbY4LQpp4vcOcLAIYRoQjhlgLT2+YRktpLvx83auid k=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 64998443 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:42XmkqOCEpmHjzzvrR3fl8FynXyQoLVcMsEvi/4bfWQNrUor3zEHx mcbDD2CPv/eYGX2ed0naIm0oBlVsZfVmNZlSgto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdleF+lH1dOKJQUBUjclkfJKlYAL/En03FFcMpBsJ00o5wbZj2NMw27BVPivW0 T/Mi5yHULOa82Yc3lI8s8pvfzs24ZweEBtB1rAPTagjUG32zhH5P7pGTU2FFFPqQ5E8IwKPb 72rIIdVXI/u10xF5tuNyt4Xe6CRK1LYFVDmZnF+A8BOjvXez8CbP2lS2Pc0MC9qZzu1c99Z0 /t3t7GoaAkSIrzhnt8+fitID2ZYMvgTkFPHCSDXXc27ykTHdz3nwul0DVFwNoodkgp1KTgQr 7pCcmlLN03dwbLtqF64YrAEasALJc/3PIQZqzd4wCvQF/oOSpHfWaTao9Rf2V/cg+gQQaePN 5ZFMlKDajzcURNWZQhQNa4sxvXvo0vwVAVJ72ua8P9fD2/7k1UqjemF3MDuUsOObdVYmACfv G2u12jwHBwyLtGUzjuBtHW2iYfnjS79HY4fCrC83vprm0GIgHweDgUMUlm2quX/jVSxM++zM GRNpHBo9/JrshX2EJ+tBHVUvUJooDYHdeBSPvUb5jqR24fS2CW0NHgYCRhOPYlOWNANeRQm0 VqAntXMDDNpsaGIRX/1yop4vQ9eKgBOczZcOHZsoR8tpoC6/dpt1k6nosNLTfbt5uAZDw0c1 NxjQMIWo7wIxfAG2Kyglbwsq2L9/8OZJuLZC+i+Y45E0u+bTNL0D2BLwQKChRqlEGp/ZgPQ1 JTjs5LDhN3i9bnXyESwrBwlRdlFHcqtPjzGmkJIFJI87Tmr8HPLVdkOvGwheB41b55cIWeBj KrvVeV5vs470JyCN/IfXm5MI55ykfiI+SrNDJg4keaikrAuLVTarUmClGab3nz3kVhErE3ME czzTCpYNl5DUf4P5GPvH481iOZ3rghjlTK7bc2qlHyPjOvBDEN5vJ9YaTNimMhit/jayOgUm v4CX/a3J+J3C7WvMnGKqtdIdTjn7xETXPjLliCeTcbbSiIOJY3rI6K5LW8JE2C9o5loqw== IronPort-HdrOrdr: A9a23:0gL9g6jOi35dwX2lbuVCiV4eEHBQXuIji2hC6mlwRA09TySZ// rBoB19726TtN9xYgBZpTnuAsm9qB/nmaKdpLNhWItKPzOW31dATrsSjrcKqgeIc0aVm9K1l5 0QF5SWYOeAdGSS5vya3ODXKbkdKaG8gcKVuds= X-IronPort-AV: E=Sophos;i="5.90,136,1643691600"; d="scan'208";a="64998443" From: Anthony PERARD To: CC: Anthony PERARD , Christian Lindig , David Scott , Wei Liu Subject: [XEN PATCH v2 29/29] tools/ocaml: fix build dependency target Date: Fri, 25 Feb 2022 15:13:21 +0000 Message-ID: <20220225151321.44126-30-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220225151321.44126-1-anthony.perard@citrix.com> References: <20220225151321.44126-1-anthony.perard@citrix.com> MIME-Version: 1.0 They are two competiting spelling for the variable holding the path to "tools/ocaml", $(TOPLEVEL) and $(OCAML_TOPLEVEL). The "Makefile.rules" which is included in all ocaml Makefiles have one rule which make use of that variable which is then sometime unset. When building "ocaml/xenstored", make isn't capable of generating ".ocamldep.make" because $(TOPLEVEL) isn't defined in this case. This can fail with an error like this when paths.ml have been regenerated: Error: Files define.cmx and paths.cmx make inconsistent assumptions over interface Paths This patch fix ".ocamldep.make" rule by always spelling the variable $(OCAML_TOPLEVEL). Signed-off-by: Anthony PERARD Acked-by: Christian Lindig --- Notes: v2: - new patch tools/ocaml/libs/eventchn/Makefile | 8 ++++---- tools/ocaml/libs/mmap/Makefile | 8 ++++---- tools/ocaml/libs/xb/Makefile | 8 ++++---- tools/ocaml/libs/xc/Makefile | 8 ++++---- tools/ocaml/libs/xentoollog/Makefile | 8 ++++---- tools/ocaml/libs/xl/Makefile | 8 ++++---- tools/ocaml/libs/xs/Makefile | 8 ++++---- tools/ocaml/Makefile.rules | 2 +- 8 files changed, 29 insertions(+), 29 deletions(-) diff --git a/tools/ocaml/libs/eventchn/Makefile b/tools/ocaml/libs/eventchn/Makefile index 154efd4a8e..7362a28d9e 100644 --- a/tools/ocaml/libs/eventchn/Makefile +++ b/tools/ocaml/libs/eventchn/Makefile @@ -1,6 +1,6 @@ -TOPLEVEL=$(CURDIR)/../.. -XEN_ROOT=$(TOPLEVEL)/../.. -include $(TOPLEVEL)/common.make +OCAML_TOPLEVEL=$(CURDIR)/../.. +XEN_ROOT=$(OCAML_TOPLEVEL)/../.. +include $(OCAML_TOPLEVEL)/common.make CFLAGS += $(CFLAGS_libxenevtchn) $(CFLAGS_xeninclude) @@ -31,5 +31,5 @@ install: $(LIBS) META uninstall: $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xeneventchn -include $(TOPLEVEL)/Makefile.rules +include $(OCAML_TOPLEVEL)/Makefile.rules diff --git a/tools/ocaml/libs/mmap/Makefile b/tools/ocaml/libs/mmap/Makefile index df45819df5..a621537135 100644 --- a/tools/ocaml/libs/mmap/Makefile +++ b/tools/ocaml/libs/mmap/Makefile @@ -1,6 +1,6 @@ -TOPLEVEL=$(CURDIR)/../.. -XEN_ROOT=$(TOPLEVEL)/../.. -include $(TOPLEVEL)/common.make +OCAML_TOPLEVEL=$(CURDIR)/../.. +XEN_ROOT=$(OCAML_TOPLEVEL)/../.. +include $(OCAML_TOPLEVEL)/common.make OBJS = xenmmap INTF = $(foreach obj, $(OBJS),$(obj).cmi) @@ -26,5 +26,5 @@ install: $(LIBS) META uninstall: $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenmmap -include $(TOPLEVEL)/Makefile.rules +include $(OCAML_TOPLEVEL)/Makefile.rules diff --git a/tools/ocaml/libs/xb/Makefile b/tools/ocaml/libs/xb/Makefile index be4499147e..ff4428af6d 100644 --- a/tools/ocaml/libs/xb/Makefile +++ b/tools/ocaml/libs/xb/Makefile @@ -1,6 +1,6 @@ -TOPLEVEL=$(CURDIR)/../.. -XEN_ROOT=$(TOPLEVEL)/../.. -include $(TOPLEVEL)/common.make +OCAML_TOPLEVEL=$(CURDIR)/../.. +XEN_ROOT=$(OCAML_TOPLEVEL)/../.. +include $(OCAML_TOPLEVEL)/common.make CFLAGS += -I../mmap CFLAGS += $(CFLAGS_libxenctrl) # For xen_mb() @@ -49,4 +49,4 @@ install: $(LIBS) META uninstall: $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenbus -include $(TOPLEVEL)/Makefile.rules +include $(OCAML_TOPLEVEL)/Makefile.rules diff --git a/tools/ocaml/libs/xc/Makefile b/tools/ocaml/libs/xc/Makefile index b6da4fdbaf..67acc46bee 100644 --- a/tools/ocaml/libs/xc/Makefile +++ b/tools/ocaml/libs/xc/Makefile @@ -1,6 +1,6 @@ -TOPLEVEL=$(CURDIR)/../.. -XEN_ROOT=$(TOPLEVEL)/../.. -include $(TOPLEVEL)/common.make +OCAML_TOPLEVEL=$(CURDIR)/../.. +XEN_ROOT=$(OCAML_TOPLEVEL)/../.. +include $(OCAML_TOPLEVEL)/common.make CFLAGS += -I../mmap $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) CFLAGS += $(APPEND_CFLAGS) @@ -38,4 +38,4 @@ xenctrl_abi_check.h: abi-check xenctrl_stubs.c xenctrl.ml GENERATED_FILES += xenctrl_abi_check.h -include $(TOPLEVEL)/Makefile.rules +include $(OCAML_TOPLEVEL)/Makefile.rules diff --git a/tools/ocaml/libs/xentoollog/Makefile b/tools/ocaml/libs/xentoollog/Makefile index 593f9e9e9d..9ede2fd124 100644 --- a/tools/ocaml/libs/xentoollog/Makefile +++ b/tools/ocaml/libs/xentoollog/Makefile @@ -1,6 +1,6 @@ -TOPLEVEL=$(CURDIR)/../.. -XEN_ROOT=$(TOPLEVEL)/../.. -include $(TOPLEVEL)/common.make +OCAML_TOPLEVEL=$(CURDIR)/../.. +XEN_ROOT=$(OCAML_TOPLEVEL)/../.. +include $(OCAML_TOPLEVEL)/common.make # allow mixed declarations and code CFLAGS += -Wno-declaration-after-statement @@ -62,4 +62,4 @@ install: $(LIBS) META uninstall: ocamlfind remove -destdir $(OCAMLDESTDIR) xentoollog -include $(TOPLEVEL)/Makefile.rules +include $(OCAML_TOPLEVEL)/Makefile.rules diff --git a/tools/ocaml/libs/xl/Makefile b/tools/ocaml/libs/xl/Makefile index cbe1569cc5..7c1c4edced 100644 --- a/tools/ocaml/libs/xl/Makefile +++ b/tools/ocaml/libs/xl/Makefile @@ -1,6 +1,6 @@ -TOPLEVEL=$(CURDIR)/../.. -XEN_ROOT=$(TOPLEVEL)/../.. -include $(TOPLEVEL)/common.make +OCAML_TOPLEVEL=$(CURDIR)/../.. +XEN_ROOT=$(OCAML_TOPLEVEL)/../.. +include $(OCAML_TOPLEVEL)/common.make # ignore unused generated functions and allow mixed declarations and code CFLAGS += -Wno-unused -Wno-declaration-after-statement @@ -68,4 +68,4 @@ install: $(LIBS) META uninstall: $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenlight -include $(TOPLEVEL)/Makefile.rules +include $(OCAML_TOPLEVEL)/Makefile.rules diff --git a/tools/ocaml/libs/xs/Makefile b/tools/ocaml/libs/xs/Makefile index 572efb76c4..e934bbb550 100644 --- a/tools/ocaml/libs/xs/Makefile +++ b/tools/ocaml/libs/xs/Makefile @@ -1,6 +1,6 @@ -TOPLEVEL=$(CURDIR)/../.. -XEN_ROOT=$(TOPLEVEL)/../.. -include $(TOPLEVEL)/common.make +OCAML_TOPLEVEL=$(CURDIR)/../.. +XEN_ROOT=$(OCAML_TOPLEVEL)/../.. +include $(OCAML_TOPLEVEL)/common.make OCAMLINCLUDE += -I ../xb/ OCAMLOPTFLAGS += -for-pack Xenstore @@ -43,7 +43,7 @@ install: $(LIBS) META uninstall: $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenstore -include $(TOPLEVEL)/Makefile.rules +include $(OCAML_TOPLEVEL)/Makefile.rules genpath-target = $(call buildmakevars2module,paths.ml) $(eval $(genpath-target)) diff --git a/tools/ocaml/Makefile.rules b/tools/ocaml/Makefile.rules index abfbc64ce0..7e4db457a1 100644 --- a/tools/ocaml/Makefile.rules +++ b/tools/ocaml/Makefile.rules @@ -44,7 +44,7 @@ META: META.in ALL_OCAML_OBJ_SOURCES=$(addsuffix .ml, $(ALL_OCAML_OBJS)) -.ocamldep.make: $(ALL_OCAML_OBJ_SOURCES) Makefile $(TOPLEVEL)/Makefile.rules +.ocamldep.make: $(ALL_OCAML_OBJ_SOURCES) Makefile $(OCAML_TOPLEVEL)/Makefile.rules $(call quiet-command, $(OCAMLDEP) $(ALL_OCAML_OBJ_SOURCES) *.mli $o,MLDEP,) clean: $(CLEAN_HOOKS)