From patchwork Thu Aug 11 16:48: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: 12941616 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 7AC24C25B06 for ; Thu, 11 Aug 2022 16:49:20 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384784.620257 (Exim 4.92) (envelope-from ) id 1oMBMn-0003h9-Av; Thu, 11 Aug 2022 16:49:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384784.620257; Thu, 11 Aug 2022 16:49:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBMn-0003gq-7E; Thu, 11 Aug 2022 16:49:05 +0000 Received: by outflank-mailman (input) for mailman id 384784; Thu, 11 Aug 2022 16:49:03 +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 1oMBMl-0003Aq-Ng for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:03 +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 7fd7056e-1995-11ed-bd2e-47488cf2e6aa; Thu, 11 Aug 2022 18:49:02 +0200 (CEST) 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: 7fd7056e-1995-11ed-bd2e-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236542; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gzc+84ow+LQ9Ng3mQt5cbeoe9zzNOiJroC8il6G69uY=; b=GlnYUnMLAfnEfL2OrJOt/rANRB3EZRMdKRoa+IrWckwN1VKtYMKNrhBP 3UXYbvWfdpiKWd7rBU2AWg00N5KauagrltJpKEWVexVav3+hfzG9K7XUx rjKFIPc5I7yTznuyw1LuqGL770WF70eOsbUtDx2t3tLiUBa9qCABdO3gS o=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77650091 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:t45c66xRkZX1kofBna56t+c5xirEfRIJ4+MujC+fZmUNrF6WrkUCx mFJDG6Ea/qLYTH9eYojbNvn8B5TusfSz9Q1TVNq+yAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnj/0bv676yEUOZigHtLUEPTDNj16WThqQSIgjQMLs+Mii8tjjMPR7zml4 LsemOWCfg7+s9JIGjhMsfjb+Eo25K6aVA4w5TTSW9ga5DcyqFFNZH4vDfnZB2f1RIBSAtm7S 47rpF1u1jqEl/uFIorNfofTKiXmcJaLVeS9oiM+t5yZqgpDvkQPPpMTb5LwX6v1ZwKhxLidw P0V3XC5pJxA0qfkwIzxWDEAe81y0DEvFBYq7hFTvOTKp3AqfUcAzN1cIU91EaQx9NxQW19e6 +1FITJdYw2M0rfeLLKTEoGAh+wmJcjveogepmth3XfSCvNOrZLrGvuQo4UChXFp254ITa22i 8kxMFKDaDzJZQFPPVEGToozhu6yilH0ciFCqULTrq0yi4TW5FMujuW1aIuMEjCMbfxIkFy0r Tr7xUmnD0s3b+CDymOv6G3504cjmgukAdlPRdVU7MVCjVmewGVVFRMXUEegrOewokmkUtlbJ gof/S9Ghbc23FymSJ/6RRLQiG6JuFsQVsRdF8U+6RqR0ezE7gCBHG8GQzVdLts8u6ceQSEh3 xmHltXiCDhrrZWcU3fb/bCRxQ5eIgBMczVEP3VdC1JYvZ+z++nfky4jUP5RPaD2ovTcFwvXm Q6asjljjrdDgNMEgvDTEU/8v968mnTYZldruF2PDz38t10RiJ2NPNLxtwWChRpUBMPAFwTa4 iBZ8ySLxLpWZaxhghBhVwnk8FuBw/+eeAPRjld0d3XK32T8oiXzFWy8DdwXGauIDirnUWWwC KMrkVkNjKK/xVPzBUONX6q/Ct4x0Y/rHsn/W/bfY7JmO8YvLFfYpHg/NRPKhQgBdXTAdolhU ap3jO72VSpKYUiZ5GPeqxghPU8DmXllmDK7qWHTxBW7y7uODEOopUM+GALXNogRsfLbyDg5B v4FaKNmPT0DD7ClCsQWmKZPRW03wY8TWcmq95AKLb7fe2KL2ggJUpfs/F/oQKQ994w9qwsC1 ivVtpNwoLYnuUD6FA== IronPort-HdrOrdr: A9a23:+olYBam11KpyHAy5sEVcrer8bYXpDfIq3DAbv31ZSRFFG/Fxl6 iV88jzsiWE7wr5OUtQ4OxoV5PgfZqxz/NICMwqTNWftWrdyQ+VxeNZjbcKqgeIc0aVygce79 YET0EXMqyXMbEQt6jHCWeDf+rIuOP3k5yVuQ== X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="77650091" From: Anthony PERARD To: CC: Anthony PERARD , Luca Fancellu , Elena Ufimtseva , "Wei Liu" Subject: [XEN PATCH v4 01/32] tools/debugger/gdbsx: Fix and cleanup makefiles Date: Thu, 11 Aug 2022 17:48:14 +0100 Message-ID: <20220811164845.38083-2-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-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 Reviewed-by: Luca Fancellu --- 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 Thu Aug 11 16:48: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: 12941614 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 E111EC25B0C for ; Thu, 11 Aug 2022 16:49:19 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384783.620241 (Exim 4.92) (envelope-from ) id 1oMBMk-0003Ec-54; Thu, 11 Aug 2022 16:49:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384783.620241; Thu, 11 Aug 2022 16:49:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBMj-0003Dv-Um; Thu, 11 Aug 2022 16:49:01 +0000 Received: by outflank-mailman (input) for mailman id 384783; Thu, 11 Aug 2022 16:49:01 +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 1oMBMj-0003Aq-2Q for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:01 +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 7f637913-1995-11ed-bd2e-47488cf2e6aa; Thu, 11 Aug 2022 18:48:59 +0200 (CEST) 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: 7f637913-1995-11ed-bd2e-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236539; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uKZYwxU/eeIoJex6/iy2xttzxFfQWkQ9g42h+ITNP2Y=; b=G3hdQemnFsCmJ2NOBt7B1klHUBEB1iTnHzH3Apeyv6MsD/I9E+DK7m9+ XC1sxXxM//kbGcpC9Rie0AkCCw/gdKCNml//edkWmMujnP+uGSyjLXrvV d8AbKZjDQ8c7NsCZ7Dca9Kt7IJenu8MpY/NWkIY5KE/C0CYu5GpvG2Pvr g=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77134656 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:hJALB6BiirHEOxVW/y7jw5YqxClBgxIJ4kV8jS/XYbTApDMl0mBVy DcdCD/QM6zeN2byLt1/Ydy0/RsPu5/Xm9ZhQQY4rX1jcSlH+JHPbTi7wuYcHM8wwunrFh8PA xA2M4GYRCwMZiaA4E3ratANlFEkvYmQXL3wFeXYDS54QA5gWU8JhAlq3uU0meaEu/Dga++2k Y608pa31GONgWYuaDpEsvvb8nuDgdyp0N8mlg1mDRx0lAe2e0k9VPo3Oay3Jn3kdYhYdsbSq zHrlezREsvxpn/BO/v9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77134656" From: Anthony PERARD To: CC: Anthony PERARD , Luca Fancellu , Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu Subject: [XEN PATCH v4 02/32] tools/firmware/hvmloader: rework Makefile Date: Thu, 11 Aug 2022 17:48:15 +0100 Message-ID: <20220811164845.38083-3-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-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" to avoid a prompt in case the target already exist and we don't have write permission. Signed-off-by: Anthony PERARD Reviewed-by: Luca Fancellu Reviewed-by: Jan Beulich --- Notes: v4: - fix reason for 'mv -f' in patch description. - add a comment about build.o's new prerequisites. tools/firmware/hvmloader/Makefile | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile index b754220839..2bb5deb0c6 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,18 @@ 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 + +# Add DSDT_FILES as a prerequisite of "build.o" so that make will also +# generates the "ssdt_*.h" headers needed by "build.o". +build.o: $(DSDT_FILES) + hvmloader: $(OBJS) hvmloader.lds $(LD) $(LDFLAGS_DIRECT) -N -T hvmloader.lds -o $@ $(OBJS) @@ -87,21 +92,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 Thu Aug 11 16:48: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: 12941615 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 7AF1CC282E7 for ; Thu, 11 Aug 2022 16:49:20 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384785.620268 (Exim 4.92) (envelope-from ) id 1oMBMo-0003xt-Ib; Thu, 11 Aug 2022 16:49:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384785.620268; Thu, 11 Aug 2022 16:49: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 1oMBMo-0003xh-FN; Thu, 11 Aug 2022 16:49:06 +0000 Received: by outflank-mailman (input) for mailman id 384785; Thu, 11 Aug 2022 16:49:05 +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 1oMBMm-0003Aq-T4 for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:05 +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 81b25845-1995-11ed-bd2e-47488cf2e6aa; Thu, 11 Aug 2022 18:49:03 +0200 (CEST) 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: 81b25845-1995-11ed-bd2e-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236543; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=J/SLv4tpkZk1s80iDBxg+IpFakavr4UAIdUl4Zv0U+U=; b=iRSnFYAAMyzWhH5DZm2PxxqtfNpG4kDPzWFGzS1z7iCaYF0DKlqo5Xk3 4naHTPgzgXmDNph1Y34VxOIQw/bUm42cSTXjHIGnI1CY4Kh5m1VgLHmcO 2uomQPq2wcV4yEMQn71MUbB+xYPmktrhe3WaDtDwqCuiYSARpXLnS+QS1 4=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77650092 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:6r5dPaO5BQILab7vrR2Kl8FynXyQoLVcMsEvi/4bfWQNrUorhDACy DdMWz2AaP7ZNGH3eooiPNi09UsEucLSy9NiQAto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdleF+lH3dOCJQUBUjcmgXqD7BPPPJhd/TAplTDZJoR94kqsyj5UAbeKRWmthg vuv5ZyEULOZ82QsaDhMu/va8EkHUMna41v0gHRvPZing3eG/5UlJMp3Db28KXL+Xr5VEoaSL woU5Ojklo9x105F5uKNyt4XQGVTKlLhFVHmZk5tc7qjmnB/Shkaic7XAha+hXB/0F1ll/gpo DlEWAfZpQ0BZsUgk8xFO/VU/r0X0QSrN9YrLFDm2fF/wXEqfFPe7vstIGgfM7c/oNhnH3AT/ P5IJS0CO0Xra+KemNpXS8Fpj8UnasLqIJkeqjdryjSx4fQOGM6ZBf+QvJkBgWl21psm8fX2P qL1bRJmagjAZBtefE8aEpskkM+jh2Xlci0eo1WQzUYyyzeMklEpiOm3WDbTUt6zH9lEjnqXn Uff21vlXSBLJtajkSXQpxpAgceQxHimCer+DoaQ9ONugVCV7nweDlsRT1TTieKilke0VtZbK koV0ikjt64/8AqsVNaVdwK8iG6JuFgbQdU4O/037kSBx7TZ5y6dB3MYVXhRZdo+rsg0SDc2k FiTkLvBASFkufubQHSW+7OQsBu7Iy1TJmgHDQcGRwYY59jooKkokwnCCN1kFcaIYsbdQG+qh WrQ9W5n2utV3ZVjO7iHEU7vsR+i5bTgZwAPwV/pTny0swp7NIO4aNn9gbTE1sqsPLp1X3HY4 iZcw5nBtblQZX2evHfTGbtQRdlF897AaWSB2gA3QvHN4hz3oxaekZZsDCaSzauDGuINYnfXb UDaomu9D7cDbSLxPcebj29cYvnGLJQM9vy/D5g4lvIUPvBMmPavpUmCn3K40WH3i1QLmqoiI 5qdesvEJS9EV/w/k2LvFrdAi+VDKsUCKYT7G/jGI+mPi+LCNBZ5t59cWLdxUgzJxPzd+1iEm zquH8CL1w9eQIXDX8UjyqZKdAhiBSVqWvjLRzl/LLHrzvxORD58UJc8ANoJJ+RYokiivruRo i3hBxQIlAOXaL+uAVziV02PoYjHBf5XxU/X9wR1Vbp08xDPubqS0Zo= IronPort-HdrOrdr: A9a23:lJ988K+KyqxXtxpLzi9uk+DeI+orL9Y04lQ7vn2YSXRuHfBw8P re+8jztCWE8Qr5N0tApTntAsS9qDbnhPxICOoqTNOftWvd2FdARbsKheCJ/9SjIVyaygc079 YHT0EUMrPN5DZB4foSmDPIcOod/A== X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="77650092" From: Anthony PERARD To: CC: Anthony PERARD , Luca Fancellu , Andrew Cooper , "George Dunlap" , Jan Beulich , "Julien Grall" , Stefano Stabellini , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Subject: [XEN PATCH v4 03/32] tools/fuzz/x86_instruction_emulator: rework makefile Date: Thu, 11 Aug 2022 17:48:16 +0100 Message-ID: <20220811164845.38083-4-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-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 Reviewed-by: Luca Fancellu Acked-by: Jan Beulich --- Notes: v4: - Use pattern rules to link sources from libx86 and from x86 emulator tests - fix rm of .*.d2 dependency files v2: - create a new per-directory .gitignore to add the new entry and existing ones tools/fuzz/x86_instruction_emulator/Makefile | 35 +++++++++---------- .gitignore | 6 ---- .../fuzz/x86_instruction_emulator/.gitignore | 7 ++++ 3 files changed, 24 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..13aa238503 100644 --- a/tools/fuzz/x86_instruction_emulator/Makefile +++ b/tools/fuzz/x86_instruction_emulator/Makefile @@ -9,32 +9,29 @@ x86-insn-fuzz-all: endif # Add libx86 to the build -vpath %.c $(XEN_ROOT)/xen/lib/x86 +%.c: $(XEN_ROOT)/xen/lib/x86/%.c 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/$* +%.c: $(XEN_ROOT)/tools/tests/x86_emulator/%.c FORCE + ln -nsf $< $@ +%.h: $(XEN_ROOT)/tools/tests/x86_emulator/%.h 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,11 +48,11 @@ 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: - rm -f *.a *.o .*.d afl-harness afl-harness-cov *.gcda *.gcno *.gcov + rm -f *.a *.o $(DEPS_RM) afl-harness afl-harness-cov *.gcda *.gcno *.gcov .PHONY: install install: all @@ -67,3 +64,5 @@ afl: afl-harness .PHONY: afl-cov afl-cov: afl-harness-cov + +-include $(DEPS_INCLUDE) diff --git a/.gitignore b/.gitignore index ed7bd8bdc7..ff1d668489 100644 --- a/.gitignore +++ b/.gitignore @@ -195,12 +195,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 Thu Aug 11 16:48: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: 12941611 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 C9EC0C3F6B0 for ; Thu, 11 Aug 2022 16:49:19 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384787.620288 (Exim 4.92) (envelope-from ) id 1oMBMq-0004Tj-FX; Thu, 11 Aug 2022 16:49:08 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384787.620288; Thu, 11 Aug 2022 16:49:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBMq-0004SM-Be; Thu, 11 Aug 2022 16:49:08 +0000 Received: by outflank-mailman (input) for mailman id 384787; Thu, 11 Aug 2022 16:49:06 +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 1oMBMo-0003Aq-OE for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:06 +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 81cb3c3d-1995-11ed-bd2e-47488cf2e6aa; Thu, 11 Aug 2022 18:49:05 +0200 (CEST) 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: 81cb3c3d-1995-11ed-bd2e-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236545; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ysnWsjj7Rb1EHEFLlv8kUsqZAX1qaQM4OVjafbYC2NQ=; b=N3h0c+becblvFHHaq6ZaIovFvr8+Evh9C5SdTq4LC0cUBST2WpU3IUmb 9Xx8xY3zBTLSP/nqEuk+nGkTk7l04I4Hcy77sRwXsVN2aS0dZb0QyL3Pc Ie8AVRlYJHvmi+epXlNqgzLVyR/U0Kct+SdDbTBrzCaa6Q3GAV/PcsdSy E=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77650099 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:hJ6ys6Ouj/mpT0fvrR3Pl8FynXyQoLVcMsEvi/4bfWQNrUp31zBVz jQZXWiPO//fYTageohwOoS3o01QvsSBnYNnSAto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdleF+lH3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K+VSJcEfDH6xmpM JdmsBFebvN5DNB4/oSjjPVLz9Z+qjlzJyV X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="77650099" From: Anthony PERARD To: CC: Anthony PERARD , Luca Fancellu , Wei Liu Subject: [XEN PATCH v4 04/32] tools/hotplug: cleanup Makefiles Date: Thu, 11 Aug 2022 17:48:17 +0100 Message-ID: <20220811164845.38083-5-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-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 Reviewed-by: Luca Fancellu --- 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 Thu Aug 11 16:48: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: 12941613 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 E132DC25B0D for ; Thu, 11 Aug 2022 16:49:19 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384786.620275 (Exim 4.92) (envelope-from ) id 1oMBMp-000469-7Z; Thu, 11 Aug 2022 16:49:07 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384786.620275; Thu, 11 Aug 2022 16:49:07 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBMp-00043n-0A; Thu, 11 Aug 2022 16:49:07 +0000 Received: by outflank-mailman (input) for mailman id 384786; Thu, 11 Aug 2022 16:49:06 +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 1oMBMo-0003Aq-6M for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:06 +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 82648173-1995-11ed-bd2e-47488cf2e6aa; Thu, 11 Aug 2022 18:49:05 +0200 (CEST) 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: 82648173-1995-11ed-bd2e-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236545; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=k96LELiDF10OR0dJpj9/L9eHF1chcvy5FKD7ZziqpbI=; b=ExhRiGbFJZhVr35o565dACaO3qs6iq6X6qj2p+APfe36UrTmYTjL4yLu JwXq58NnpOsQV1bHSCjrTcxLH11ld/8mFL34M7GTsHpvCo0MXT5zt1HeK GQPjBldVI+6fjDZf7Mb5/fh1kFCoay9m+pvzVnwZKSiJ47lMIKaD8Qznl I=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77650097 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:aLWkLKDmIbH8tBVW/0Pjw5YqxClBgxIJ4kV8jS/XYbTApDt2hWBUx 2BMUW7VOPePZjD9ct90ad61pBsG7ZLcnYMwQQY4rX1jcSlH+JHPbTi7wuYcHM8wwunrFh8PA xA2M4GYRCwMZiaA4E3ratANlFEkvYmQXL3wFeXYDS54QA5gWU8JhAlq3uU0meaEu/Dga++2k Y608pa31GONgWYuaDpEsvvb8nuDgdyp0N8mlg1mDRx0lAe2e0k9VPo3Oay3Jn3kdYhYdsbSq zHrlezREsvxpn/BO/v9+lrJWhRiro36ZGBivkF+Sam66iWukwRpukoN2FjwXm8M49mBt4gZJ NygLvVcQy9xVkHHsLx1vxW1j0iSlECJkVPKCSHXjCCd86HJW1zn2OxRCmYzBNMZ/fZGKmRj8 /JHDS9YO3hvh8ruqF66Yuxlh8BlJ8j3JoIP/HpnyFk1D95/H8qFGf+To4YFgnFg3aiiHt6HD yYdQTNpcBTHZQwJIloNAYgytOypmmP+Y3tTr1f9Sa8fvDeNkVQpgeeF3Nz9SOTbXucEwkiij WeBpGvmGz07C4CQ8G/Qmp6rrrCWxn6qMG4IL5Wn8tZ6jVvVwXYcYDUSSFCy5/ewjEWzX9ZCA 0UO/2wlqq1a3FymSJzxUgO1pFaAvwUAQJxAHusi8gaPx6HIpQGDCQA5oiVpMYJ88pVsHHpzi wHPz4iB6SFTXKO9bnmG74iSijaLZykSPV4pYAICQ1Qg/Iy2yG0stS4jXuqPAYbs0IOtQWCvm mnUxMQtr+5N1JBWjs1X6XiC2mvx/caRE2bZ8y2NBgqYAhVFiJlJjmBCwXzS9r5+IYmQVTFtV 1BUypHFvIji4Xxg/RFhodnh/5nzvp5pyBWG3TZS82AJrlxBAUKLc4FK+y1ZL0x0KMsCcjKBS BaN51sJu8cKbSv3N/Ufj2eN5yMCk8Dd+SnNDKiIPrKinLAoHON4wM2eTRHJhD28+KTduao+J Y2aYa6RMJruMow+lWLeb7pMjtcWKtUWnzy7qWbTk0v6itJzpRe9Fd84Dbd5RrxgsP/Y/V6Fr 4832gnj40w3bdASqxL/qeY7RW3m51BibXwqg6S7rtK+Hzc= IronPort-HdrOrdr: A9a23:2vNaWKikuLfTI5Ni3HsU2p88CnBQXtwji2hC6mlwRA09TySZ// rAoB19726StN9xYgBYpTnuAsi9qB/nmKKdpLNhX4tKPzOW3FdATrsD0WKK+VSJcEfDH6xmpM JdmsBFebvN5DNB4/oSjjPVLz9Z+qjlzJyV X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="77650097" From: Anthony PERARD To: CC: Anthony PERARD , Luca Fancellu , Wei Liu Subject: [XEN PATCH v4 05/32] tools/libfsimage: Cleanup makefiles Date: Thu, 11 Aug 2022 17:48:18 +0100 Message-ID: <20220811164845.38083-6-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-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 Reviewed-by: Luca Fancellu --- 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 Thu Aug 11 16:48: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: 12941610 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 BD691C19F2A for ; Thu, 11 Aug 2022 16:49:19 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384788.620294 (Exim 4.92) (envelope-from ) id 1oMBMq-0004Yb-SA; Thu, 11 Aug 2022 16:49:08 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384788.620294; Thu, 11 Aug 2022 16:49:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBMq-0004Wp-M1; Thu, 11 Aug 2022 16:49:08 +0000 Received: by outflank-mailman (input) for mailman id 384788; Thu, 11 Aug 2022 16:49:07 +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 1oMBMp-0003s9-7m for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:07 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 81a2f48f-1995-11ed-924f-1f966e50362f; Thu, 11 Aug 2022 18:49:04 +0200 (CEST) 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: 81a2f48f-1995-11ed-924f-1f966e50362f DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236544; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gjxG4UugGwSCb9wRzYZyec8iEMLX7UmigAqba15IK2A=; b=Ca8vguqhH9MiMHrB7qfh8teFLkmdKyGAwRsa0A+ChJ3nM2Lgc2xmJ06n rfQgRBhdmvy4lwyG79EQOH3q0Bf4QghjR8jFDlS4EkyhgfGvQF9tkemk/ kWqMsOxGxK6A51mWYnbeJLgdv3Ir38fQvqlTslUrp1UhBZ4yWDO1DUvM9 I=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 78334312 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:/4cj/6vLQyM2aWAMgFf/zfiXw+fnVDxeMUV32f8akzHdYApBsoF/q tZmKTqAP/zZazT8e9pxOtiwpB9X6JOGx95rQVBt/ng3RioT+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZhSAgk/vOHtIQMcacUghpXwhoVSw9vhxqnu89k+ZAjMOwRgiAo rsemeWGULOe82MyYzl8B56r8ks15qyi4WpA5DTSWNgQ1LPgvyhNZH4gDfnZw0vQGuF8AuO8T uDf+7C1lkuxE8AFU47Nfh7TKyXmc5aKVeS8oiM+t5uK23CukhcawKcjXMfwXG8M49m/c3Kd/ /0W3XC4YV9B0qQhA43xWTEAe811FfUuFLMqvRFTGCFcpqHLWyKE/hlgMK05FY0YysZ8P0sJz MIdJBEkZU661ry38JvuH4GAhux7RCXqFIYWu3UmxjDFF/c2B5vERs0m5/cBgm123JoXW6+DO YxJMlKDbzyZC/FLEl4RFJI5mvbunnTleidUgFmUubA28y7YywkZPL3Fb4qOIYDRHJ89ckCwu lLh3XTHWB4mKtWAymqo8lme2bGTpHauMG4VPOLhraM76LGJ/UQMDDUGWF39puO24ma6RtlWb UId/CEjqawv3EWxS5/2WBjQiG6JuFsQVsRdF8U+6RqR0ezE7gCBHG8GQzVdLts8u6cLqScCj wHT2YmzXHo27ePTGSn1GqqoQS2aOSglDWQ8T2g9cw4JwvDo/rhi0BP/Z4M2eEKqteEZCQ0c0 hjT8nZm3+RM1JdVv0mo1QuZ2mzx//AlWiZwv1yKBTz9s2uVcab/P+SVBU7nAeGsxWpzZn2Ip zA6lseX94ji5rndxXXWEI3h8FxEjstp0QEwYnY1RvHNDxz3pxaekXl4uVmS3ntBPMceYiPOa 0TOow5X75I7FCL0M/cvPNroWpR3l/KI+THZuhf8MLJzjmVZLlfbrEmCm2bJt4wSrKTcuf5mY srKGSpdJX0bFb5m3FKLegvp6pdyn3hW7T6CGvjGI+GPi+X2iIi9FehYazNjr4kRsMu5neki2 4oGa5fWlk4PDLSWj+u+2dd7EG3m5EMTXfjew/G7vMbSSua6MAnN08Ps/I4= IronPort-HdrOrdr: A9a23:qc3dzajltrtv8yiecBQELNVcw3BQXuIji2hC6mlwRA09TySZ// rBoB19726TtN9xYgBZpTnuAsm9qB/nmaKdpLNhWItKPzOW31dATrsSjrcKqgeIc0aVm9K1l5 0QF5SWYOeAdGSS5vya3ODXKbkdKaG8gcKVuds= X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="78334312" From: Anthony PERARD To: CC: Anthony PERARD , Luca Fancellu , Wei Liu Subject: [XEN PATCH v4 06/32] tools/xenpaging: Rework makefile Date: Thu, 11 Aug 2022 17:48:19 +0100 Message-ID: <20220811164845.38083-7-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-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 Reviewed-by: Luca Fancellu --- 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 Thu Aug 11 16:48: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: 12941612 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 29EB9C25B0E for ; Thu, 11 Aug 2022 16:49:20 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384789.620300 (Exim 4.92) (envelope-from ) id 1oMBMr-0004fD-BL; Thu, 11 Aug 2022 16:49:09 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384789.620300; Thu, 11 Aug 2022 16:49: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 1oMBMr-0004e3-3m; Thu, 11 Aug 2022 16:49:09 +0000 Received: by outflank-mailman (input) for mailman id 384789; Thu, 11 Aug 2022 16:49:07 +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 1oMBMp-0003s9-Oo for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:07 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 83148bdf-1995-11ed-924f-1f966e50362f; Thu, 11 Aug 2022 18:49:06 +0200 (CEST) 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: 83148bdf-1995-11ed-924f-1f966e50362f DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236545; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=oiMxhY9aNAuabaL1poisWXh5+cq7pv8wOKvWKuB/m94=; b=R3jt1ro69G6fAqc79zHZ0N3saSgB98WWnMWfjoGdOkOgehzfzENO0Stv DYvFUB1O4toi9tH0LgGHciVM0tUzelnA5TS7GCZn5wprhYrVNZG5rpNiF 060j4mSLhKyFz4jAdP0psrmq3rB/1BKDI9KqqYVZoTjiKkZPilWFyXZVk U=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 78334323 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:YWYn3qjcjDODML9NnKEhr1iUX161ChAKZh0ujC45NGQN5FlHY01je htvW2+Ba6qPZWf0c9ElPYuzoB8AuZfTz95kHgo5qCszFysb9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oDJ9CU6j+fQLlbFILasEjhrQgN5QzsWhxtmmuoo6qZlmtH8CA6W0 T/Ii5S31GSNhnglaQr414rZ8Ek15KSr4WtC1rADTasjUGH2xiF94K03fcldH1OgKqFIE+izQ fr0zb3R1gs1KD90V7tJOp6iGqE7aua60Tqm0xK6aID76vR2nQQg075TCRYpQRw/ZwNlPTxG4 I4lWZSYEW/FN0BX8QgXe0Ew/ypWZcWq9FJbSJQWXAP6I0DuKhPRL/tS4E4eM6IS0OlyX25yz OUyKTsBVE+Bqe2s3+fuIgVsrpxLwMjDOYoevjdrzC3DDOZgSpfGK0nIzYYGhnFq3JkIRKuAI ZpCAdZsRE2ojxlnM1ELCJU4jaGwi2P2aTFwo1OJv6snpWPUyWSd1ZCyYIGOJofQHq25mG6Al j7m8ifTPSsoMc2t5hy/7C+u19X2yHaTtIU6S+Tjq68CbEeo7nMXIA0bUx28u/bRokqjUNsZJ UUS8ScqqbUa/VauCNL6WnWQsHOC+xIRRddUO+k78x2WjLrZ5R6DAWoJRSIHb8Yp3PLaXhRzi AXPxYmwQ2Uy7vvFEhpx64t4sxu8FiI/ImpcahM9VCEE6NXZ/4MdgQjQG4ML/LGOsjHlJd3h6 2nU8nBm1upK1JBjO7aTpg6e3W/1znTdZktsv1iMADr4hu9sTNT9D7FE/2Q3+hqpwGyxalCa9 EYJlMGFhAzlJcHczXfdKAnh8VzA2hpkDNE/qQQ2d3XZ327xk0NPhKgJiN2EGG9nM9wfZRjia 1LJtAVa6fd7ZSX0NfcoO9vgW5lwl8AM8OgJsdiKBuein7ArLFPXlM2QTRf4M5/RfLgEzvhkZ MbznTeEBncGE6V3pAeLqxMm+eZynkgWmDKMLa0XOjz9jtJyklbJFupeWLZPB8hlhJ65TPL9r 48Da5fXkEUDCYUToED/qOYuELzDFlBjbbieliCdXrXrztZOcI35N8Ls/A== IronPort-HdrOrdr: A9a23:jtS076zDTBAGJb3Vc5voKrPwFL1zdoMgy1knxilNoRw8SKKlfq eV7ZImPH7P+U4ssR4b+exoVJPtfZqYz+8R3WBzB8bEYOCFghrKEGgK1+KLqFeMJ8S9zJ846U 4JSdkGNDSaNzlHZKjBjzVQa+xQouW6zA== X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="78334323" From: Anthony PERARD To: CC: Anthony PERARD , Luca Fancellu , Wei Liu Subject: [XEN PATCH v4 07/32] tools/xentop: rework makefile Date: Thu, 11 Aug 2022 17:48:20 +0100 Message-ID: <20220811164845.38083-8-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-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 Reviewed-by: Luca Fancellu --- 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 Thu Aug 11 16:48: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: 12941637 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 7F07AC25B06 for ; Thu, 11 Aug 2022 16:59:45 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384888.620444 (Exim 4.92) (envelope-from ) id 1oMBWz-0005Nh-W5; Thu, 11 Aug 2022 16:59:37 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384888.620444; Thu, 11 Aug 2022 16:59:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBWz-0005NR-RN; Thu, 11 Aug 2022 16:59:37 +0000 Received: by outflank-mailman (input) for mailman id 384888; Thu, 11 Aug 2022 16:59:36 +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 1oMBNC-0003Aq-Em for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:30 +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 9083ff3b-1995-11ed-bd2e-47488cf2e6aa; Thu, 11 Aug 2022 18:49:28 +0200 (CEST) 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: 9083ff3b-1995-11ed-bd2e-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236568; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fHsG9B8lizzzPD6/i3Kul1uCNtvyOlPvp3xYploET6A=; b=SwlQjw5ZRyhr3gQwcxhpc5NwUjroick4OFZl+gpi5JDr+289RLflDMdE KzqveBQXm6Tz0dOceTDN5EQD2vBaiwQ4xM+4q4k6kay4NhFEXwA3yhHPw oM0XxuHu0M2MIcbOtJOFSSUTErFK3WrX29pJQ4k6QPtRwqhPALAtR6Q/j k=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77898045 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:+APeZa2eRjgzzysAofbDix16xWv30HFdZTh5Nfl8DyL0cXcT1ZMr2eOEzzPWbIdy115diuC4uy+r1PHeSnFXDSeApxFbC0K+UO0llYYYIyPP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/iYoyiNTbiFUY7WP4ehkGe4Koz/sfoV3hG++Utd0caI0AOa6pAOJtAge3L7o/zo9l7HClxNpeNFrqZaP06pphEmQi1ht9Yghglv/TZYmwZDkpyvBKlz4R3bvpwdIlwa7ryWHGHIkru4LhHYNAAdeyYkqZ3q0qZMn/Cp8S+Sgg/Db12JhQO1bIRH0ea8nWLShaI9BthIVK1YR2IBORshAEU3qn6h/VXimYD1tPCFsTbsfK+KmWdH7voCEBa9lI7Nuc9CGDcgfnAGZkPMUjild5qD0ChF8h2ezCXvvzn3Qr4ZNa93YSVtyjSzq1YBESQ3aMc2Sa3+y8y4jltJwwU22uf2ue0OoXYZWODnX4mb X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="77898045" From: Anthony PERARD To: CC: Anthony PERARD , George Dunlap , Wei Liu Subject: [XEN PATCH v4 08/32] tools/xentrace: rework Makefile Date: Thu, 11 Aug 2022 17:48:21 +0100 Message-ID: <20220811164845.38083-9-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-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: v4: - also use := for BIN, SBIN, LIBBIN, SCRIPTS v2: - fix typo in title - drop conditional install of $(BIN) and $(LIBBIN) tools/xentrace/Makefile | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/tools/xentrace/Makefile b/tools/xentrace/Makefile index 9fb7fc96e7..63f2f6532d 100644 --- a/tools/xentrace/Makefile +++ b/tools/xentrace/Makefile @@ -9,41 +9,36 @@ LDLIBS += $(LDLIBS_libxenevtchn) LDLIBS += $(LDLIBS_libxenctrl) LDLIBS += $(ARGP_LDFLAGS) -BIN = xenalyze -SBIN = xentrace xentrace_setsize -LIBBIN = xenctx -SCRIPTS = xentrace_format +BIN := xenalyze +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 Thu Aug 11 16:48:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941617 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 039D1C28B2B for ; Thu, 11 Aug 2022 16:49:20 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384792.620323 (Exim 4.92) (envelope-from ) id 1oMBMw-0005X7-1k; Thu, 11 Aug 2022 16:49:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384792.620323; Thu, 11 Aug 2022 16:49:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBMv-0005Ws-U5; Thu, 11 Aug 2022 16:49:13 +0000 Received: by outflank-mailman (input) for mailman id 384792; Thu, 11 Aug 2022 16:49:12 +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 1oMBMu-0003s9-8S for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:12 +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 85426978-1995-11ed-924f-1f966e50362f; Thu, 11 Aug 2022 18:49:11 +0200 (CEST) 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: 85426978-1995-11ed-924f-1f966e50362f DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236551; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mxTVCPUj7pxiYMIM697LcuDAzSCMllkoIRIujuNp3so=; b=EpGIt1LDO8mVGxactmy9AOUGZy+3rDDBvQUFFcOfLZVi7xoXU0vQR34C izd7IKXgX9zoL7u3ap/gUwaYfhTCDKrk/FpaEJqrjGM+n/IeFp2ZKtANl RlcxP42pFNyTtsIePKAO5jIy53Nm+uVQHwmRFCr0zmXA/gCfLKkB2F5iX M=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77893905 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:3dNdqarAoVGKQxsgKi97r107YLpeBmIjZRIvgKrLsJaIsI4StFCzt garIBmOMviMM2WmKIx2aojnpBtSvZTSyoRjHQY5/ilgH3xGopuZCYyVIHmrMnLJJKUvbq7GA +byyDXkBJppJpMJjk71atANlVEliefSAOKU5NfsYkhZXRVjRDoqlSVtkus4hp8AqdWiCkaGt MiaT/f3YTdJ4BYpdDNPg06/gEk35q6q6GpB5gZWic1j5zcyqVFEVPrzGonpR5fIatE8NvK3Q e/F0Ia48gvxl/v6Ior4+lpTWhRiro/6ZWBiuFIPM0SRqkEqShgJ+rQ6LJIhhXJ/0F1lqTzTJ OJl7vRcQS9xVkHFdX90vxNwS0mSNoUekFPLzOTWXWV+ACQqflO1q8iCAn3aMqUn+MR5MUcR7 sYkMTIiSxzf3tmq/LekH7wEasQLdKEHPasas3BkizrYEewnUdbIRKCiCd1whWlqwJoURLCHO pRfOWEHgBfoOnWjPn8eDo4+m+G5wGHyaTRCpHqepLYt4niVxwt0uFToGIWKKo3RFJ0I9qqej l3s+Wa6Oh87COGglgKO+WOln9bhhwquDer+E5Xnr6U30TV/3Fc7CgASVFa9iem0jAi5Qd03A 1cP5iMkoKw29UqqZtrwRRu1pDiDpBF0c8VUO/037keK0KW8ywSTC3UATzVBQMc7r8JwTjsvv neZktWsCTFxvbm9TXOG6qzSvT60ITISL2IJeWkDVwRty9vsuoYolTrUU81uVqWyi7XdEzzq3 yqDqiR4grwJlNMKzI2y51WBiDWpzqUlVSZsuF+RBDj8qFokOsj1PORE9GQ3895/LqSXfn/ep 0I4gsqxyexSVKqRqCmSFbBl8K6S2xqVDNHNqQcxQcF5pmv0oiDLkZN4u28nehowWioQUXqwO RKI51sMjHNGFCHyBZKbdb5dHCjDIULIMd3+Hs7ZYdNVCnSaXF/WpXo+DaJ8Mo2EraTNrU3cE c3CGSpUJSxGYZmLNRLvLwvn7Zclxzol2UTYTo3hwhKs3NK2PSDLEe9aaALfPr1jtstoRTk5F P4BX/ZmNj0FCLGuCsUp2dd7wa82wYgTWsmt9p0/mh+rKQt6AmAxY8LsLUcaU9U8x8x9y7aXl kxRr2cClzITc1WbdljRAp2iAZuzNatCQYUTYXVwYQr1gCh/OO5CLs43LvMKQFXuz8Q7pdYcc hXPU5/o7ihnItgfxwkgUA== IronPort-HdrOrdr: A9a23:xyfUKqjEGoK27h0u45GvSX60z3BQXtwji2hC6mlwRA09TySZ// rAoB19726StN9xYgBYpTnuAsi9qB/nmKKdpLNhX4tKPzOW3FdATrsD0WKK+VSJcEfDH6xmpM JdmsBFebvN5DNB4/oSjjPVLz9Z+qjlzJyV X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="77893905" From: Anthony PERARD To: CC: Anthony PERARD , Juergen Gross , Bertrand Marquis , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu Subject: [XEN PATCH v4 09/32] .gitignore: Cleanup ignores of tools/libs/*/{headers.chk,*.pc} Date: Thu, 11 Aug 2022 17:48:22 +0100 Message-ID: <20220811164845.38083-10-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 Signed-off-by: Anthony PERARD Reviewed-by: Juergen Gross Reviewed-by: Bertrand Marquis --- 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 ff1d668489..e3fe06cd13 100644 --- a/.gitignore +++ b/.gitignore @@ -106,26 +106,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 @@ -145,21 +127,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 Thu Aug 11 16:48:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941641 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 D95A2C25B0C for ; Thu, 11 Aug 2022 16:59:54 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384908.620488 (Exim 4.92) (envelope-from ) id 1oMBX8-00075O-Hp; Thu, 11 Aug 2022 16:59:46 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384908.620488; Thu, 11 Aug 2022 16:59: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 1oMBX8-00074P-4J; Thu, 11 Aug 2022 16:59:46 +0000 Received: by outflank-mailman (input) for mailman id 384908; Thu, 11 Aug 2022 16:59: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 1oMBNA-0003Aq-JA for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:28 +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 8eee6a8d-1995-11ed-bd2e-47488cf2e6aa; Thu, 11 Aug 2022 18:49:27 +0200 (CEST) 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: 8eee6a8d-1995-11ed-bd2e-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236567; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IYKuPYRjZ6pvXVQdnWBlSSCMGmweNvIFFiS+JhxCSBY=; b=YP9nzi4lncPf28Qmtkw/6vdTGP1apUtKhhLHJ1yGKGR+xO/EJdDxX9cB bgtJ/sY8nu4reKiarjMoVRc9N50Jg8zYfi++rrF/pvfuvllBnobUFQ94m SYDnj+WCbYXngn81s7PvO9jLVZFlQfD+LYmZksBR52xANQWbSWby2J59F k=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77898051 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:+y7RlaM1YfKrNxLvrXNrnJZn9oimJRAgMRhcQxGJyBt+GUZOw4laZrtjiq2i3aJmyGb9mmIBeKSSRr53aQm6gXAjCuHlasX+95QHLC0YumKzbe0XjW3twuEXz1JRUf8BtCM7bJ8mgR2FR/vv/j1PJnkIdwUDMA15FlVxhm+g3eQV6f2UeZZ5LJGwsp5ifkrjn1gPlhF7vW5yEW4eLeEqvXAXVo/BIvZgFei4+eLqAsjioD2WaKfh/Pv4N+gnpFoR2q5z8BdREzFfQ1FHsdT1mw0aW/e2HSTeNU27twua3Pbh/ux4pnYCkePlZpqUJNDZH65g0giiiRHQVWa/XFIlLRnA6k1s0dnji49pQ8Z/fm1cENPEDSk72hwYifP/wSHFrvvgMH0/Bo+oeGPjTMRuB0qUBcrN8Mq6PPcZT4QAVbuI3TDzd4ksGhYsP3pL6JiXENF+g3agNXsV4hMNeY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1sphrMCEJC3CSCw3d/4kM8lC9fxzZvr7LzM/7MXGfhl635yJyx73Bq7sAtIiEOG3iOsIsj9FtfXFbhk7jHs4Ws420j0ZaeIJoWBkft3spBGvGSXFaWbFKdKUF3LPsGy8c2L1w== X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="77898051" From: Anthony PERARD To: CC: Anthony PERARD , Juergen Gross , Bertrand Marquis , Wei Liu Subject: [XEN PATCH v4 10/32] tools/libs/util: cleanup Makefile Date: Thu, 11 Aug 2022 17:48:23 +0100 Message-ID: <20220811164845.38083-11-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 Remove -I. from CFLAGS, it isn't necessary. Removed $(AUTOSRCS), it isn't used. Signed-off-by: Anthony PERARD Reviewed-by: Juergen Gross Reviewed-by: Bertrand Marquis --- tools/libs/util/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/libs/util/Makefile b/tools/libs/util/Makefile index ffe507b379..493d2e00be 100644 --- a/tools/libs/util/Makefile +++ b/tools/libs/util/Makefile @@ -11,7 +11,7 @@ OBJS-y += libxlu_pci.o CFLAGS += -Wno-format-zero-length -Wmissing-declarations \ -Wno-declaration-after-statement -Wformat-nonliteral -CFLAGS += -I. $(CFLAGS_libxenctrl) +CFLAGS += $(CFLAGS_libxenctrl) CFLAGS += $(PTHREAD_CFLAGS) LDFLAGS += $(PTHREAD_LDFLAGS) @@ -29,7 +29,6 @@ ifeq ($(BISON),) endif AUTOINCS = libxlu_cfg_y.h libxlu_cfg_l.h libxlu_disk_l.h -AUTOSRCS = libxlu_cfg_y.c libxlu_cfg_l.c LIBHEADER := libxlutil.h PKG_CONFIG_NAME := Xlutil From patchwork Thu Aug 11 16:48:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941618 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 5E625C19F2A for ; Thu, 11 Aug 2022 16:49:23 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384793.620333 (Exim 4.92) (envelope-from ) id 1oMBMx-0005p0-Ei; Thu, 11 Aug 2022 16:49:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384793.620333; Thu, 11 Aug 2022 16:49:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBMx-0005nr-9I; Thu, 11 Aug 2022 16:49:15 +0000 Received: by outflank-mailman (input) for mailman id 384793; Thu, 11 Aug 2022 16:49:14 +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 1oMBMw-0003s9-Fx for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:14 +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 8762dcb2-1995-11ed-924f-1f966e50362f; Thu, 11 Aug 2022 18:49:13 +0200 (CEST) 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: 8762dcb2-1995-11ed-924f-1f966e50362f DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236553; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gpM48lpnObCIjWGPGvBVueMdTtMWC0q32u6eUBiFh6U=; b=TvHRgEh1n7m2WRGC0A2xLmVMeD9uVWs0mTMvqmzafQ8uLzJcQYDu7zoo 2XaOmPmlbKyLk/tJiipjV0+aYL6CZivGhDpG6DROExfIvtmEFVJQ8TkcO mJUt7yAerLuCoXXcsyRF7ZGJw5Di8DzD50SDaqAubkx5QUCz8ALq85Jkl c=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77893912 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:SP/Te6IP0IRaLWxpFE+R3pUlxSXFcZb7ZxGr2PjKsXjdYENS0zMEm DQXCjvQOayKZDP2f4p1YN++9UNQvsOHmoUyT1BlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokf0/0vraP65xZVF/fngbqLmD+LZMTxGSwZhSSMw4TpugOd8iYNz6TSDK1rlV eja/ouOYzdJ5xYuajhOs/La8Us11BjPkGhwUmIWNKgjUGD2zxH5PLpHTYmtIn3xRJVjH+LSb 44vG5ngows1Vz90Yj+Uuu6Tnn8iG9Y+DiDX4pZiYICwgwAqm8AH+v1T2Mzwy6tgo27hc9hZk L2hvHErIOsjFvWkdO81C3G0H8ziVEHvFXCuzXWX6KSuI0P6n3TE2q5JL0NoH4Yj+Mk0Gj9W6 6IeCyEvcUXW7w626OrTpuhEg80iKI/gPZ8Fu2EmxjbcZRokacmdGeOQv4YehWpuwJAVdRrdT 5NxhT5HZRLcYxpJKxEPBYg3huuAjXjjaTxI7lmSoMLb5kCMk1wgi+m0arI5fPSEFeUNxVegm ljL9nn5PBI3Ju6m1BmapyfEaujnwnqgBdN6+KeD3vJym1iS2mw7AQUbT0emuuK+jlOiWtVZM Aof/S9Ghbc23FymSJ/6RRLQiG6JuFsQVsRdF8U+6RqR0ezE7gCBHG8GQzVdLts8u6ceZTEsz E7PoNrvChRmqrjTQnWYnop4thvrZ3JTdzVbI3ZZE01VuLEPvb3fkDrWFfFAEvCXheb3NnLrn SiU8i4dlpcM2JtjO7qAwbzXv969jsGXEFZtt1qOBzzNAhBRP9D8OdHxgbTPxbMZddvCEAHc1 JQRs5LGhN3iG61hg8BkrA8lOLiyr8iIPzTH6bKEN8lwrm/9k5JPkG053d2fGKuKGpxdEdMRS BWP0T69HbcKVJdQUYd5YpiqF+MhxrX6GNLuW5j8N4QQOsAuLFbWrHw0PyZ8OlwBd2By+ZzTx L/BKZr8ZZrkIf0PIMWKqxc1juZwm3FWKZL7TpHn1RW3uYejiIquYe5caDOmM7FmhJ5oVS2Pr L6zwePWlEgEOAA/CwGLmbMuwacicSFnWcyr8JwLL4Zu4GNOQQkcNhMY+pt5E6QNokifvr6gE q2VMqOA9GfCuA== IronPort-HdrOrdr: A9a23:vS0YTKmMyXb2lFXb79pgXRsRMifpDfIU3DAbv31ZSRFFG/Fxl6 iV8sjzsiWE7gr5OUtQ4exoV5PhfZqxz/JICMwqTNKftWrdyQyVxeNZnOjfKlTbckWUnINgPO VbAsxD4bXLfCFHZK3BgTVQfexO/DD+ytHLudvj X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="77893912" From: Anthony PERARD To: CC: Anthony PERARD , Henry Wang , "Daniel P. Smith" , "Wei Liu" Subject: [XEN PATCH v4 11/32] tools/flask/utils: list build targets in $(TARGETS) Date: Thu, 11 Aug 2022 17:48:24 +0100 Message-ID: <20220811164845.38083-12-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 Signed-off-by: Anthony PERARD Reviewed-by: Henry Wang Acked-by: Daniel P. Smith --- tools/flask/utils/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/flask/utils/Makefile b/tools/flask/utils/Makefile index db567b13dc..6be134142a 100644 --- a/tools/flask/utils/Makefile +++ b/tools/flask/utils/Makefile @@ -4,10 +4,10 @@ include $(XEN_ROOT)/tools/Rules.mk CFLAGS += -Werror CFLAGS += $(CFLAGS_libxenctrl) -CLIENTS := flask-loadpolicy flask-setenforce flask-getenforce flask-label-pci flask-get-bool flask-set-bool +TARGETS := flask-loadpolicy flask-setenforce flask-getenforce flask-label-pci flask-get-bool flask-set-bool .PHONY: all -all: $(CLIENTS) +all: $(TARGETS) flask-loadpolicy: loadpolicy.o $(CC) $(LDFLAGS) $< $(LDLIBS) $(LDLIBS_libxenctrl) -o $@ @@ -29,7 +29,7 @@ flask-set-bool: set-bool.o .PHONY: clean clean: - $(RM) *.o $(CLIENTS) $(DEPS_RM) + $(RM) *.o $(TARGETS) $(DEPS_RM) .PHONY: distclean distclean: clean @@ -37,10 +37,10 @@ distclean: clean .PHONY: install install: all $(INSTALL_DIR) $(DESTDIR)$(sbindir) - $(INSTALL_PROG) $(CLIENTS) $(DESTDIR)$(sbindir) + $(INSTALL_PROG) $(TARGETS) $(DESTDIR)$(sbindir) .PHONY: uninstall uninstall: - rm -f $(addprefix $(DESTDIR)$(sbindir)/, $(CLIENTS)) + rm -f $(addprefix $(DESTDIR)$(sbindir)/, $(TARGETS)) -include $(DEPS_INCLUDE) From patchwork Thu Aug 11 16:48:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941621 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 6F947C25B0C for ; Thu, 11 Aug 2022 16:49:29 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384798.620350 (Exim 4.92) (envelope-from ) id 1oMBN3-0006e1-IZ; Thu, 11 Aug 2022 16:49:21 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384798.620350; Thu, 11 Aug 2022 16:49: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 1oMBN3-0006cO-4s; Thu, 11 Aug 2022 16:49:21 +0000 Received: by outflank-mailman (input) for mailman id 384798; Thu, 11 Aug 2022 16:49:19 +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 1oMBN1-0003Aq-Ep for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:19 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 8991fb32-1995-11ed-bd2e-47488cf2e6aa; Thu, 11 Aug 2022 18:49:18 +0200 (CEST) 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: 8991fb32-1995-11ed-bd2e-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236558; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bUOi3WNc8oZFZzCNM4EoNrFdmqodDZX34IS+jodiKpU=; b=dN/QJmGl+E1J8AFUSvoBbfrhpgGmGsE4Cb0KLvREZ9zFUjsseW/YoNqQ r8mfAH8EPG67qn2rq4hz4RIatUaJ/GJyy9IcgTxfMU9/4xpIrkWbgCyK4 /0NzafJhMtjBKGyU0+0tOfuL/fFMNB5F0EZ3IWxQF2fIleDl0bZcokIyC A=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 80449000 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:BgLCHKJ4Z7WBzAExFE+R15UlxSXFcZb7ZxGr2PjKsXjdYENShDwPm GoZCzrTO/fbZmrwLYt2Ot7ipkkBv5/Sm4BhHgdlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokf0/0vraP65xZVF/fngbqLmD+LZMTxGSwZhSSMw4TpugOd8iYNz6TSDK1rlV eja/ouOYzdJ5xYuajhOs/La8Us11BjPkGhwUmIWNKgjUGD2zxH5PLpHTYmtIn3xRJVjH+LSb 44vG5ngows1Vz90Yj+Uuu6Tnn8iG9Y+DiDX4pZiYICwgwAqm8AH+v1T2Mzwy6tgo27hc9hZk L2hvHErIOsjFvWkdO81C3G0H8ziVEHvFXCuzXWX6KSuI0P6n3TE298/FkQ5L6gjo8FzInFHy uIaETAnV0XW7w626OrTpuhEg80iKI/gPZ8Fu2EmxjbcZRokacmdGeOQv4YehWpuwJAVdRrdT 5NxhT5HZRLcYxpJKxEPBYg3huuAjXjjaTxI7lmSoMLb5kCDlFAtgeC1aLI5fPSGH9lEgRjEm ljm2Fn5IC4EL5uj1QSspyfEaujnwnqgBdN6+KeD3vRnmkGJz2ofThgfT0KmoOKRg1S7HdlYL iQ85S4GvaU0skuxQbHVTxC+5XKJoBMYc95RCPEhrhGAzLLO5ASUDXRCSSROAPQku9UxXicCz UKSkpXiAjkHjVGOYSvDrPHO92r0YHVLaz9ZDcMZcecby8HJ8Zs2gQDqdY9EFI2lh+LrGwjw6 Qnf+UDSmI4vYd43O7STpA6Z22r9+cGQEGbZ9S2MADv7s1oRiJqNItXxtAOFtasowJOxFAHpg ZQSpySJAAni57mpnTfFfugCFarBCx2tYGyF2g4H83XMGl2QF5+fkWN4umgWyL9BaJpsRNMQS Ba7VfltzJFSJmC2SqR8fpi8Dc8npYC5S4q9Dq+MN4seP8IrHONiwM2JTRD44owQuBJ0zfFX1 WmzKK5A8kr2+Yw4lWHrFo/xIJcgxzwkxHO7eK0XOy+PiOPGDFbIGOhtDbd7RrpmhE9yiFmKr o032grj40k3bdASlQGLqNJPcQ1RfSRibX00wuQOHtO+zsNdMDlJI5fsLXkJJ+SJQ4w9ej/0w 0yA IronPort-HdrOrdr: A9a23:+r1HwKCOkpHHAgPlHemU55DYdb4zR+YMi2TC1yhKJyC9Ffbo8f xG/c5rrSMc5wxwZJhNo7y90ey7MBbhHP1OkO4s1NWZLWrbUQKTRekIh+bfKn/baknDH4ZmpN 5dmsNFaeEYY2IUsS+D2njbL+od X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="80449000" From: Anthony PERARD To: CC: Anthony PERARD , Juergen Gross , Bertrand Marquis , Wei Liu Subject: [XEN PATCH v4 12/32] libs/libs.mk: Rename $(LIB) to $(TARGETS) Date: Thu, 11 Aug 2022 17:48:25 +0100 Message-ID: <20220811164845.38083-13-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 Signed-off-by: Anthony PERARD Reviewed-by: Juergen Gross Reviewed-by: Bertrand Marquis --- tools/libs/libs.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk index 58d8166b09..e02f91f95e 100644 --- a/tools/libs/libs.mk +++ b/tools/libs/libs.mk @@ -23,9 +23,9 @@ LDLIBS += $(foreach lib, $(USELIBS_$(LIBNAME)), $(LDLIBS_libxen$(lib))) PIC_OBJS := $(OBJS-y:.o=.opic) LIB_FILE_NAME = $(FILENAME_$(LIBNAME)) -LIB := lib$(LIB_FILE_NAME).a +TARGETS := lib$(LIB_FILE_NAME).a ifneq ($(nosharedlibs),y) -LIB += lib$(LIB_FILE_NAME).so +TARGETS += lib$(LIB_FILE_NAME).so endif PKG_CONFIG ?= $(LIB_FILE_NAME).pc @@ -55,7 +55,7 @@ $(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_INCLUDE) $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR) .PHONY: all -all: headers.chk $(LIB) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL) libxen$(LIBNAME).map $(LIBHEADERS) +all: headers.chk $(TARGETS) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL) libxen$(LIBNAME).map $(LIBHEADERS) ifneq ($(NO_HEADERS_CHK),y) headers.chk: @@ -124,7 +124,7 @@ TAGS: .PHONY: clean clean:: - rm -rf $(LIB) *~ $(DEPS_RM) $(OBJS-y) $(PIC_OBJS) + rm -rf $(TARGETS) *~ $(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 Thu Aug 11 16:48:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941620 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 98F48C19F2A for ; Thu, 11 Aug 2022 16:49:28 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384797.620345 (Exim 4.92) (envelope-from ) id 1oMBN2-0006Xf-Qm; Thu, 11 Aug 2022 16:49:20 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384797.620345; Thu, 11 Aug 2022 16:49:20 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBN2-0006We-K9; Thu, 11 Aug 2022 16:49:20 +0000 Received: by outflank-mailman (input) for mailman id 384797; Thu, 11 Aug 2022 16:49:19 +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 1oMBN1-0003s9-5c for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49: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 8a279d32-1995-11ed-924f-1f966e50362f; Thu, 11 Aug 2022 18:49:18 +0200 (CEST) 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: 8a279d32-1995-11ed-924f-1f966e50362f DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236557; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=t6+BU0EnWCm/vG2lzwqGir5k7zNv5buwu52uFlyPjUo=; b=WMJEVobZgCdcTj4551wJAWJe+3bkHGEJq2vIITlYHDema7NOuHHnFKoj EQRQYm52iI8dBuNrR2flkUX2v/q0Swp6ePiPM72SwRStyhXcM7GQ7Ock9 KVH/R/rJkk8bnekbM/4G7rf7ZVXLCAHzF+5I0Wb3F7FblkIGwh+QcYF/Y E=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77893921 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:lHfRe6nKpApFlm1UP5jwDNXo5gyHJkRdPkR7XQ2eYbSJt1+Wr1Gzt xJLUGyFbq6PZTbzet8gbN+y/UxS6JPWy99lHAQ+qCE3RiMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BCpC48T8mk/ngqoPUUIbsIjp2SRJvVBAvgBdin/9RqoNziJ2yDhjlV ena+qUzA3f4nW8vWo4ow/jb8kk37K2r4GlwUmEWPpingnePzxH5M7pHTU2BByOQapVZGOe8W 9HCwNmRlo8O105wYj8Nuu+TnnwiGtY+DyDX4pZlc/HKbix5jj4zys4G2M80Mi+7vdkrc+dZk 72hvbToIesg0zaldO41C3G0GAkmVUFKFSOuzdFSfqV/wmWfG0YAzcmCA2kNfoIq495wHlhl+ MMyARctfDPEv/+plefTpulE3qzPLeHuNYIb/Hph0SvYHbAtRpWrr6fivIECmm1q34YXQKiYN 5FxhTlHNXwsZzVGPEsXD5Qv2v+lnHDlfxVTqU6PpLpx6G/WpOB0+OeyYIuOK4bTLSlTtneG/ XzEomHoOztEJZuyjmTc1nesrcaayEsXX6pNTeblp5aGmma7zGEJFAcfU1f9pPCjk1O/QPpWM UlS8S0rxYAt8GS7Q9+7WAe3yFaUsxhZV9dOHukS7ACW1rGS8wufHnIDTDNKdJohrsBebT4lz FiShPvyGCdi9raSTBqgGqy89G3of3JPdClbOHFCHVBtD8TfTJ8btVHAfM9bF7GMpdDKMxjX4 yKp6xAjmOBG5SIU7JlX7Wwrkhr1+MaRFl9qv1yJNo62xlgnPdD4PuRE/XCetK8dd9jBEzFtq VBew6CjAPYy4YZhfcBnaMEEB/mX6vmMK1UwanY/TsB6p1xBF5NOFL28AQ2Sx28za67ogRezP CfuVfp5vfe/xkeCY65teJ6WAM8316XmHtmNfqmKMIIWPcAoJV/apnsGiausM4fFziARfVwXY 8/HIa5A815DYUiY8NZGb7hEiuJ6rszP7WjSWYr633ya7FZqX1bMEO9tGAbfMYgEAFas+lq9H yB3a5TXkH2ykYTWPkHqzGLkBQxTcSRnWMum95U/myzqClMOJVzNwsT5mdsJE7GJVYwM/gsU1 hlRgnNl9Wc= IronPort-HdrOrdr: A9a23:Ck9m36n4nj6tF//ad5Ynb8arHyHpDfIU3DAbv31ZSRFFG/Fxl6 iV8sjzsiWE7gr5OUtQ4exoV5PhfZqxz/JICMwqTNKftWrdyQyVxeNZnOjfKlTbckWUnINgPO VbAsxD4bXLfCFHZK3BgTVQfexO/DD+ytHLudvj X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="77893921" From: Anthony PERARD To: CC: Anthony PERARD , Juergen Gross , Bertrand Marquis , Wei Liu Subject: [XEN PATCH v4 13/32] libs/libs.mk: Remove the need for $(PKG_CONFIG_INST) Date: Thu, 11 Aug 2022 17:48:26 +0100 Message-ID: <20220811164845.38083-14-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 We can simply use $(PKG_CONFIG) to set the parameters, and add it to $(TARGETS) as necessary. Signed-off-by: Anthony PERARD Reviewed-by: Juergen Gross Reviewed-by: Bertrand Marquis --- tools/libs/libs.mk | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk index e02f91f95e..7aee449370 100644 --- a/tools/libs/libs.mk +++ b/tools/libs/libs.mk @@ -37,10 +37,10 @@ PKG_CONFIG_LIB := $(LIB_FILE_NAME) PKG_CONFIG_REQPRIV := $(subst $(space),$(comma),$(strip $(foreach lib,$(patsubst ctrl,control,$(USELIBS_$(LIBNAME))),xen$(lib)))) ifneq ($(CONFIG_LIBXC_MINIOS),y) -PKG_CONFIG_INST := $(PKG_CONFIG) -$(PKG_CONFIG_INST): PKG_CONFIG_PREFIX = $(prefix) -$(PKG_CONFIG_INST): PKG_CONFIG_INCDIR = $(includedir) -$(PKG_CONFIG_INST): PKG_CONFIG_LIBDIR = $(libdir) +TARGETS += $(PKG_CONFIG) +$(PKG_CONFIG): PKG_CONFIG_PREFIX = $(prefix) +$(PKG_CONFIG): PKG_CONFIG_INCDIR = $(includedir) +$(PKG_CONFIG): PKG_CONFIG_LIBDIR = $(libdir) endif PKG_CONFIG_LOCAL := $(PKG_CONFIG_DIR)/$(PKG_CONFIG) @@ -55,7 +55,7 @@ $(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_INCLUDE) $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR) .PHONY: all -all: headers.chk $(TARGETS) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL) libxen$(LIBNAME).map $(LIBHEADERS) +all: headers.chk $(TARGETS) $(PKG_CONFIG_LOCAL) libxen$(LIBNAME).map $(LIBHEADERS) ifneq ($(NO_HEADERS_CHK),y) headers.chk: @@ -127,7 +127,6 @@ clean:: rm -rf $(TARGETS) *~ $(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) .PHONY: distclean distclean: clean From patchwork Thu Aug 11 16:48:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941622 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 98A9FC19F2A for ; Thu, 11 Aug 2022 16:49:32 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384801.620362 (Exim 4.92) (envelope-from ) id 1oMBN6-0007OD-1j; Thu, 11 Aug 2022 16:49:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384801.620362; Thu, 11 Aug 2022 16:49: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 1oMBN5-0007KG-P0; Thu, 11 Aug 2022 16:49:23 +0000 Received: by outflank-mailman (input) for mailman id 384801; Thu, 11 Aug 2022 16:49: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 1oMBN3-0003Aq-DN for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:21 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 8b44c487-1995-11ed-bd2e-47488cf2e6aa; Thu, 11 Aug 2022 18:49:20 +0200 (CEST) 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: 8b44c487-1995-11ed-bd2e-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236560; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OlPVmttWbfxru1ipdHV5J3q6iQpuewLRL8Acv8ppp/4=; b=DGMyvuWFQm9J9AsKIUTS1WRxQ4igH+5ijF57Bkx8jdfgPUFM6hRC/DZ7 ea/NcbpqkcLny9FqH9JBXblfUX1mPvxyvGWRYUFoPqA9zYqlS4uMu6w7i W+DYGKPdTgF5THZl5wUOeJKml4+llKpzv4gdm/0FAGaed5C/WQEwfq7wg s=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 80449013 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:Yy9cUaDLkqfJnhVW/y/jw5YqxClBgxIJ4kV8jS/XYbTApDgi0DUAy WFNCmuBbP6CZ2b1co8kPYvg/U4Bu8LRxtVqQQY4rX1jcSlH+JHPbTi7wuYcHM8wwunrFh8PA xA2M4GYRCwMZiaA4E3ratANlFEkvYmQXL3wFeXYDS54QA5gWU8JhAlq3uU0meaEu/Dga++2k Y608pa31GONgWYuaDpEsvvb8nuDgdyp0N8mlg1mDRx0lAe2e0k9VPo3Oay3Jn3kdYhYdsbSq zHrlezREsvxpn/BO/v9+lrJWhRiro36ZGBivkF+Sam66iWukwRpukoN2FjwXm8M49mBt4gZJ NygLvVcQy9xVkHHsLx1vxW1j0iSlECJkVPKCSHXjCCd86HJW2Du6PlvE1wTBK8d/fZTLGhv1 uAgIglYO3hvh8ruqF66Yuxlh8BlJ8j3JoIP/HpnyFk1D95/H8qFGf+To4YFgnFg3aiiHt6HD yYdQTNpcBTHZQwJIloNAYgytOypmmP+Y3tTr1f9Sa8fszCPkF0pieOF3Nz9VdmFaOdTr3+ig kH07WPLCykWMO2h4G/Qmp6rrrCWxn6qMG4IL5Wy++R2mlSVyioWAQcPSFqgifCjjwi1XNc3A 1MQ0jojq+417kPDZsnwWVi0rWCJujYYWsFMCKsq5QeV0K3W7g2FQG8eQVZpatM8s9QtbSc3z VLPlNTsbQGDq5XMFyjbrO3N62rvZ25FdgfueBPoUyMe4fLvoZ4uqyvtS9FzNIO8r/7pITvJl mXiQDcFu1kDsSIa//zlowif0m31/8ahoh0dvVuOAD/8hu9tTMv8PtHztwCGhRpVBNzBJmRtq kTojCR3AAomKZiW3BKAT+wWdF1Cz6bUaWaM6bKD8nRIythMx5JAVdoJiN2GDB01WvvogBewC KMphStf5YVIIFyhZrJtboS6BqwClPa+TYy6DqmFPocUOPCdkTNrGwkwDXN8Iki3yBR8+U3BE c7znTmQ4YYyVv08kWveqxY12r433CEurV7uqWTA503+idK2OS/KIYrpxXPUMYjVGovY/1iOm zueXuPWoyhivBrWPnCLrdJOdgBWdBDWx/ne8qRqSwJKGSI+cElJNhMb6ehJl1BN90iNqtr1w w== IronPort-HdrOrdr: A9a23:us/JbqMoefBe4cBcTvmjsMiBIKoaSvp037Eqv3oedfUzSL3/qy nOpoVi6faaslYssR0b9exofZPwJE80lqQFhrX5X43SPzUO0VHAROoJgLcKgQeQfxEWntQtrJ uIGJIeNDSfNzdHZL7BkWuFL+o= X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="80449013" From: Anthony PERARD To: CC: Anthony PERARD , Juergen Gross , Bertrand Marquis , Wei Liu Subject: [XEN PATCH v4 14/32] libs/libs.mk: Rework target headers.chk dependencies Date: Thu, 11 Aug 2022 17:48:27 +0100 Message-ID: <20220811164845.38083-15-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 There is no need to call the "headers.chk" target when it isn't wanted, so it never need to be .PHONY. Also, there is no more reason to separate the prerequisites from the recipe. Signed-off-by: Anthony PERARD Reviewed-by: Juergen Gross Reviewed-by: Bertrand Marquis --- tools/libs/libs.mk | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk index 7aee449370..f778a7df82 100644 --- a/tools/libs/libs.mk +++ b/tools/libs/libs.mk @@ -55,22 +55,20 @@ $(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_INCLUDE) $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR) .PHONY: all -all: headers.chk $(TARGETS) $(PKG_CONFIG_LOCAL) libxen$(LIBNAME).map $(LIBHEADERS) +all: $(TARGETS) $(PKG_CONFIG_LOCAL) libxen$(LIBNAME).map $(LIBHEADERS) ifneq ($(NO_HEADERS_CHK),y) -headers.chk: +all: headers.chk + +headers.chk: $(LIBHEADERS) $(AUTOINCS) for i in $(filter %.h,$^); do \ $(CC) -x c -ansi -Wall -Werror $(CFLAGS_xeninclude) \ -S -o /dev/null $$i || exit 1; \ echo $$i; \ done >$@.new mv $@.new $@ -else -.PHONY: headers.chk endif -headers.chk: $(LIBHEADERS) $(AUTOINCS) - headers.lst: FORCE @{ set -e; $(foreach h,$(LIBHEADERS),echo $(h);) } > $@.tmp @$(call move-if-changed,$@.tmp,$@) From patchwork Thu Aug 11 16:48:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941623 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 67C16C19F2A for ; Thu, 11 Aug 2022 16:49:37 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384826.620378 (Exim 4.92) (envelope-from ) id 1oMBNA-0008QD-SA; Thu, 11 Aug 2022 16:49:28 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384826.620378; Thu, 11 Aug 2022 16:49:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBNA-0008Pm-Ld; Thu, 11 Aug 2022 16:49:28 +0000 Received: by outflank-mailman (input) for mailman id 384826; Thu, 11 Aug 2022 16:49:27 +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 1oMBN9-0003s9-LG for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:27 +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 8e4d9076-1995-11ed-924f-1f966e50362f; Thu, 11 Aug 2022 18:49:26 +0200 (CEST) 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: 8e4d9076-1995-11ed-924f-1f966e50362f DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236566; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=y0p9wecYa39WMmq/hIK8QCu/gWTJKL1bo3dIpGAizxw=; b=LXr7GhqkeV+/WVXnN+t7PyLC5lYakUZSW3m6VJjbsIK1qefuDsgz+iiu SRYJmAUdAuGBqG+W2i+GJQhAotMagWCGqfajhb0S2x8Wb+R+hK1nIMFbz 5EE1oXNKO2y4bZewjobv/L67A+tnP8SWVX9wjcw1nqBv06+aXHA08D50Z 4=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77134689 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:CzK5X6qfq+vdpDvHMWG4GGszpb9eBmJ0ZRIvgKrLsJaIsI4StFCzt garIBmOOf2NYWH9Kdxya4nl/U8Avp6GnYJiTFM6qiw0RSsU+JuZCYyVIHm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xG+85rsyMc6QxhIE3I9urhBEDtex/hHNtOkOws1NSZLW7bUQmTXeJfBOLZqlWKcUDDH6xmpM NdmsBFeaTN5DNB7PoSjjPWLz9Z+qjkzJyV X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="77134689" From: Anthony PERARD To: CC: Anthony PERARD , Juergen Gross , Wei Liu Subject: [XEN PATCH v4 15/32] tools: Introduce $(xenlibs-rpath,..) to replace $(SHDEPS_lib*) Date: Thu, 11 Aug 2022 17:48:28 +0100 Message-ID: <20220811164845.38083-16-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 This patch introduce a new macro $(xenlibs-dependencies,) to generate a list of all the xen library that a library is list against, and they are listed only once. We use the side effect of $(sort ) which remove duplicates. This is used by another macro $(xenlibs-rpath,) which is to replace $(SHDEPS_libxen*). In libs.mk, we don't need to $(sort ) SHLIB_lib* anymore as this was used to remove duplicates and they are no more duplicates. Signed-off-by: Anthony PERARD Reviewed-by: Juergen Gross --- tools/Rules.mk | 29 ++++++++++++++++------------- tools/libs/libs.mk | 2 +- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/tools/Rules.mk b/tools/Rules.mk index 47424935ba..23979ed254 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -61,13 +61,8 @@ endif # public headers. Users of libfoo are therefore transitively # using libbaz's header but not linking against libbaz. # -# SHDEPS_libfoo: Flags for linking recursive dependencies of -# libfoo. Must contain SHLIB for every library which -# libfoo links against. So must contain both -# $(SHLIB_libbar) and $(SHLIB_libbaz). -# # SHLIB_libfoo: Flags for recursively linking against libfoo. Must -# contains SHDEPS_libfoo and: +# contains $(call xenlibs-rpath,foo) and: # -Wl,-rpath-link= # # CFLAGS_libfoo: Flags for compiling against libfoo. Must add the @@ -79,23 +74,31 @@ endif # libfoo. # # LDLIBS_libfoo: Flags for linking against libfoo. Must contain -# $(SHDEPS_libfoo) and the path to libfoo.so +# $(call xenlibs-rpath,foo) and the path to libfoo.so # # Consumers of libfoo should include $(CFLAGS_libfoo) and # $(LDLIBS_libfoo) in their appropriate directories. They should not # include any CFLAGS or LDLIBS relating to libbar or libbaz unless # they use those libraries directly (not via libfoo) too. -# -# Consumers of libfoo should not directly use $(SHDEPS_libfoo) or -# $(SHLIB_libfoo) + +# Give the list of Xen library that the libraries in $(1) are linked against, +# directly or indirectly. +define xenlibs-dependencies + $(sort $(foreach lib,$(1), \ + $(USELIBS_$(lib)) $(call xenlibs-dependencies,$(USELIBS_$(lib))))) +endef + +# Flags for linking recursive dependencies of Xen libraries in $(1) +define xenlibs-rpath + $(addprefix -Wl$(comma)-rpath-link=$(XEN_ROOT)/tools/libs/,$(call xenlibs-dependencies,$(1))) +endef define LIB_defs FILENAME_$(1) ?= xen$(1) XEN_libxen$(1) = $$(XEN_ROOT)/tools/libs/$(1) CFLAGS_libxen$(1) = $$(CFLAGS_xeninclude) - SHDEPS_libxen$(1) = $$(foreach use,$$(USELIBS_$(1)),$$(SHLIB_libxen$$(use))) - LDLIBS_libxen$(1) = $$(SHDEPS_libxen$(1)) $$(XEN_libxen$(1))/lib$$(FILENAME_$(1))$$(libextension) - SHLIB_libxen$(1) = $$(SHDEPS_libxen$(1)) -Wl,-rpath-link=$$(XEN_libxen$(1)) + SHLIB_libxen$(1) = $$(call xenlibs-rpath,$(1)) -Wl,-rpath-link=$$(XEN_libxen$(1)) + LDLIBS_libxen$(1) = $$(call xenlibs-rpath,$(1)) $$(XEN_libxen$(1))/lib$$(FILENAME_$(1))$$(libextension) endef $(foreach lib,$(LIBS_LIBS),$(eval $(call LIB_defs,$(lib)))) diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk index f778a7df82..d7e1274249 100644 --- a/tools/libs/libs.mk +++ b/tools/libs/libs.mk @@ -32,7 +32,7 @@ PKG_CONFIG ?= $(LIB_FILE_NAME).pc PKG_CONFIG_NAME ?= Xen$(LIBNAME) PKG_CONFIG_DESC ?= The $(PKG_CONFIG_NAME) library for Xen hypervisor PKG_CONFIG_VERSION := $(MAJOR).$(MINOR) -PKG_CONFIG_USELIBS := $(sort $(SHLIB_libxen$(LIBNAME))) +PKG_CONFIG_USELIBS := $(SHLIB_libxen$(LIBNAME)) PKG_CONFIG_LIB := $(LIB_FILE_NAME) PKG_CONFIG_REQPRIV := $(subst $(space),$(comma),$(strip $(foreach lib,$(patsubst ctrl,control,$(USELIBS_$(LIBNAME))),xen$(lib)))) From patchwork Thu Aug 11 16:48:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941646 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 F41AAC25B06 for ; Thu, 11 Aug 2022 17:00:08 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384959.620555 (Exim 4.92) (envelope-from ) id 1oMBXN-0001uy-2r; Thu, 11 Aug 2022 17:00:01 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384959.620555; Thu, 11 Aug 2022 17:00:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBXM-0001qf-Gr; Thu, 11 Aug 2022 17:00:00 +0000 Received: by outflank-mailman (input) for mailman id 384959; Thu, 11 Aug 2022 16:59:59 +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 1oMBN8-0003Aq-1i for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:26 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 8e3751cf-1995-11ed-bd2e-47488cf2e6aa; Thu, 11 Aug 2022 18:49:24 +0200 (CEST) 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: 8e3751cf-1995-11ed-bd2e-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236564; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Cj3s7yDvAwdl+LH39Fhy7fBMjMaaqIg2Y2xcVMdDEwk=; b=O8na1xt/KDB20tzbE75aGDUGv0n69HGJMmUck1QfbLPeOqhKd4+GFAUB 9K8bo7crr0CdpBs0W/fKkhfDztEdPHm/mNWZPZSH/YanpJUiopFKhTEvy 07aHaquZEwFW86c4Wlkd89bUwO5JEXU75vPkAq9O2TdCoQZi/q1uIkoYv 4=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 80449025 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:sh0As6o9z6XTXhWa2mGTO8Sc+pNeBmJ0ZRIvgKrLsJaIsI4StFCzt garIBmHbP7fYzP9etByPoq3/UoD6sXXnYRgTAc9/no0FnwQ9ZuZCYyVIHmrMnLJJKUvbq7GA +byyDXkBJppJpMJjk71atANlVEliefSAOKU5NfsYkhZXRVjRDoqlSVtkus4hp8AqdWiCkaGt MiaT/f3YTdJ4BYpdDNPg06/gEk35q6q6GpB5gZWic1j5zcyqVFEVPrzGonpR5fI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'208";a="80449025" From: Anthony PERARD To: CC: Anthony PERARD , Juergen Gross , Wei Liu Subject: [XEN PATCH v4 16/32] tools: Introduce $(xenlibs-ldlibs, ) macro Date: Thu, 11 Aug 2022 17:48:29 +0100 Message-ID: <20220811164845.38083-17-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 This can be used when linking against multiple in-tree Xen libraries, and avoid duplicated flags. It can be used instead of multiple $(LDLIBS_libxen*). For now, replace the open-coding in libs.mk. The macro $(xenlibs-libs, ) will be useful later when only the path to the libraries is wanted (e.g. for checking for dependencies). Signed-off-by: Anthony PERARD Reviewed-by: Juergen Gross --- tools/Rules.mk | 16 ++++++++++++++-- tools/libs/libs.mk | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/tools/Rules.mk b/tools/Rules.mk index 23979ed254..ce77dd2eb1 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -93,12 +93,24 @@ define xenlibs-rpath $(addprefix -Wl$(comma)-rpath-link=$(XEN_ROOT)/tools/libs/,$(call xenlibs-dependencies,$(1))) endef +# Provide a path for each library in $(1) +define xenlibs-libs + $(foreach lib,$(1), \ + $(XEN_ROOT)/tools/libs/$(lib)/lib$(FILENAME_$(lib))$(libextension)) +endef + +# Flags for linking against all Xen libraries listed in $(1) +define xenlibs-ldlibs + $(call xenlibs-rpath,$(1)) $(call xenlibs-libs,$(1)) \ + $(foreach lib,$(1),$(xenlibs-ldlibs-$(lib))) +endef + define LIB_defs FILENAME_$(1) ?= xen$(1) XEN_libxen$(1) = $$(XEN_ROOT)/tools/libs/$(1) CFLAGS_libxen$(1) = $$(CFLAGS_xeninclude) SHLIB_libxen$(1) = $$(call xenlibs-rpath,$(1)) -Wl,-rpath-link=$$(XEN_libxen$(1)) - LDLIBS_libxen$(1) = $$(call xenlibs-rpath,$(1)) $$(XEN_libxen$(1))/lib$$(FILENAME_$(1))$$(libextension) + LDLIBS_libxen$(1) = $$(call xenlibs-ldlibs,$(1)) endef $(foreach lib,$(LIBS_LIBS),$(eval $(call LIB_defs,$(lib)))) @@ -108,7 +120,7 @@ $(foreach lib,$(LIBS_LIBS),$(eval $(call LIB_defs,$(lib)))) CFLAGS_libxenctrl += -D__XEN_TOOLS__ ifeq ($(CONFIG_Linux),y) -LDLIBS_libxenstore += -ldl +xenlibs-ldlibs-store := -ldl endif CFLAGS_libxenlight += $(CFLAGS_libxenctrl) diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk index d7e1274249..2b8e7a6128 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))) -LDLIBS += $(foreach lib, $(USELIBS_$(LIBNAME)), $(LDLIBS_libxen$(lib))) +LDLIBS += $(call xenlibs-ldlibs,$(USELIBS_$(LIBNAME))) PIC_OBJS := $(OBJS-y:.o=.opic) From patchwork Thu Aug 11 16:48:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941640 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 630A8C19F2A for ; Thu, 11 Aug 2022 16:59:54 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384909.620493 (Exim 4.92) (envelope-from ) id 1oMBX9-0007BX-7s; Thu, 11 Aug 2022 16:59:47 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384909.620493; Thu, 11 Aug 2022 16:59: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 1oMBX8-00079Q-Q7; Thu, 11 Aug 2022 16:59:46 +0000 Received: by outflank-mailman (input) for mailman id 384909; Thu, 11 Aug 2022 16:59:44 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBNB-0003s9-L5 for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:29 +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 8fadaf68-1995-11ed-924f-1f966e50362f; Thu, 11 Aug 2022 18:49:27 +0200 (CEST) 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: 8fadaf68-1995-11ed-924f-1f966e50362f DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236567; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qDrQV7EHclVKP7YqOg4K6xaUcpWhXjaa6NfN5s1VLLM=; b=fDMozji7l0DCFmMSd/wR422tnl/HJuQ3mELQuxUw6jd/SlJ6De42tFgb Zi302Prj3HaAo+VrVcAX0FGRrozOjtFJl0D9/dmD3FFNVRAIeYWLbjcbo Pbikh/eMufpqKoEPfb9T1atZ55g0RbQ68BCYv9PqpIRQaGJJqXhW+799f U=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77134691 X-Ironport-Server: esa5.hc3370-68.i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jo/1QvueHwP9Dz+iOL2TCPEFt843K6mNL9RAFWs/FqIq L6y9qKil31ibQEJSnWOrdJPcAtacSFT6FKfg5U/S9Nv6zFOQAkJY8I9C5t7E2C5t8y5Ttv1w 0w= IronPort-HdrOrdr: A9a23:tK2Gia/ixrzluuJQ1WRuk+DgI+orL9Y04lQ7vn2YSXRuHPBw8P re+sjztCWE8Ar5N0tBpTntAsW9qDbnhPtICOoqTNCftWvdyQiVxehZhOOIqVDd8m/Fh4pgPM 9bAtFD4bbLbGSS4/yU3ODBKadD/OW6 X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="77134691" From: Anthony PERARD To: CC: Anthony PERARD , Henry Wang , Wei Liu , Nick Rosbrook Subject: [XEN PATCH v4 17/32] tools: Introduce $(xenlibs-ldflags, ) macro Date: Thu, 11 Aug 2022 17:48:30 +0100 Message-ID: <20220811164845.38083-18-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 This avoid the need to open-coding the list of flags needed to link with an in-tree Xen library when using -lxen*. Signed-off-by: Anthony PERARD Reviewed-by: Henry Wang --- tools/golang/xenlight/Makefile | 2 +- tools/Rules.mk | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/golang/xenlight/Makefile b/tools/golang/xenlight/Makefile index 64671f246c..00e6d17f2b 100644 --- a/tools/golang/xenlight/Makefile +++ b/tools/golang/xenlight/Makefile @@ -27,7 +27,7 @@ GOXL_GEN_FILES = types.gen.go helpers.gen.go # so that it can find the actual library. .PHONY: build build: xenlight.go $(GOXL_GEN_FILES) - CGO_CFLAGS="$(CFLAGS_libxenlight) $(CFLAGS_libxentoollog) $(APPEND_CFLAGS)" CGO_LDFLAGS="$(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) -L$(XEN_libxenlight) -L$(XEN_libxentoollog) $(APPEND_LDFLAGS)" $(GO) build -x + CGO_CFLAGS="$(CFLAGS_libxenlight) $(CFLAGS_libxentoollog) $(APPEND_CFLAGS)" CGO_LDFLAGS="$(call xenlibs-ldflags,light toollog) $(APPEND_LDFLAGS)" $(GO) build -x .PHONY: install install: build diff --git a/tools/Rules.mk b/tools/Rules.mk index ce77dd2eb1..26958b2948 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -105,6 +105,14 @@ define xenlibs-ldlibs $(foreach lib,$(1),$(xenlibs-ldlibs-$(lib))) endef +# Provide needed flags for linking an in-tree Xen library by an external +# project (or when it is necessary to link with "-lxen$(1)" instead of using +# the full path to the library). +define xenlibs-ldflags + $(call xenlibs-rpath,$(1)) \ + $(foreach lib,$(1),-L$(XEN_ROOT)/tools/libs/$(lib)) +endef + define LIB_defs FILENAME_$(1) ?= xen$(1) XEN_libxen$(1) = $$(XEN_ROOT)/tools/libs/$(1) From patchwork Thu Aug 11 16:48:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941642 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 50534C19F2A for ; Thu, 11 Aug 2022 16:59:57 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384910.620498 (Exim 4.92) (envelope-from ) id 1oMBXA-0007L9-CB; Thu, 11 Aug 2022 16:59:48 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384910.620498; Thu, 11 Aug 2022 16:59: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 1oMBX9-0007HC-K4; Thu, 11 Aug 2022 16:59:47 +0000 Received: by outflank-mailman (input) for mailman id 384910; Thu, 11 Aug 2022 16:59:45 +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 1oMBNB-0003Aq-Sj for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:30 +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 8fcff216-1995-11ed-bd2e-47488cf2e6aa; Thu, 11 Aug 2022 18:49:28 +0200 (CEST) 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: 8fcff216-1995-11ed-bd2e-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236568; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fS+wXyRWRj324Cveg5Ri5jEcXsCtRAlbPU6C8RaaQxw=; b=e++SsEIb7gtIJfdACUDP2J7sMTsGBYhLMH+y6zGxrVhjuWMkzhvhkGoS 8WbG3Bp/HCMLI0aG8hoxXSPI9pgyAD6Dn5hdEb1/qqVPJPg47bd9s7msC shE2uujHFnLn2CxXDUAZH7f/GN7xaUWLiqUI7icQMoh1ct+7INMHpTiVZ M=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77650143 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:Z7wPEKiqgzY37ADrzRBYJInmX161ChAKZh0ujC45NGQN5FlHY01je htvXW7Xa67Y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-HdrOrdr: A9a23:rsaVJqPdi++MN8BcTvmjsMiBIKoaSvp037Eqv3oedfUzSL3/qy nOpoVi6faaslYssR0b9exofZPwJE80lqQFhrX5X43SPzUO0VHAROoJgLcKgQeQfxEWntQtrJ uIGJIeNDSfNzdHZL7BkWuFL+o= X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="77650143" From: Anthony PERARD To: CC: Anthony PERARD , Luca Fancellu , Wei Liu Subject: [XEN PATCH v4 18/32] tools/helper: Cleanup Makefile Date: Thu, 11 Aug 2022 17:48:31 +0100 Message-ID: <20220811164845.38083-19-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 Use $(TARGETS) to collect targets. Use := for the first target instead of +=. Collect library to link against in $(LDLIBS). Remove extra "-f" flags that is already part of $(RM). Signed-off-by: Anthony PERARD Reviewed-by: Luca Fancellu Tested-by: Luca Fancellu --- Notes: v4: - use := for the first TARGETS v3: - apply changes to the new "init-dom0less" helper. - make use of the new macro $(xenlibs-ldlibs,) tools/helpers/Makefile | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/tools/helpers/Makefile b/tools/helpers/Makefile index 8d78ab1e90..09590eb5b6 100644 --- a/tools/helpers/Makefile +++ b/tools/helpers/Makefile @@ -5,13 +5,13 @@ 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 ifeq ($(CONFIG_ARM),y) -PROGS += init-dom0less +TARGETS += init-dom0less endif endif @@ -20,6 +20,7 @@ $(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 += $(call xenlibs-ldlibs,ctrl toollog store light) INIT_XENSTORE_DOMAIN_OBJS = init-xenstore-domain.o init-dom-json.o $(INIT_XENSTORE_DOMAIN_OBJS): CFLAGS += $(CFLAGS_libxentoollog) @@ -28,6 +29,7 @@ $(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 += $(call xenlibs-ldlibs,toollog store ctrl guest light) INIT_DOM0LESS_OBJS = init-dom0less.o init-dom-json.o $(INIT_DOM0LESS_OBJS): CFLAGS += $(CFLAGS_libxentoollog) @@ -35,30 +37,31 @@ $(INIT_DOM0LESS_OBJS): CFLAGS += $(CFLAGS_libxenstore) $(INIT_DOM0LESS_OBJS): CFLAGS += $(CFLAGS_libxenlight) $(INIT_DOM0LESS_OBJS): CFLAGS += $(CFLAGS_libxenctrl) $(INIT_DOM0LESS_OBJS): CFLAGS += $(CFLAGS_libxenevtchn) +init-dom0less: LDLIBS += $(call xenlibs-ldlibs,ctrl evtchn toollog store light guest foreignmemory) .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) init-dom0less: $(INIT_DOM0LESS_OBJS) - $(CC) $(LDFLAGS) -o $@ $(INIT_DOM0LESS_OBJS) $(LDLIBS_libxenctrl) $(LDLIBS_libxenevtchn) $(LDLIBS_libxentoollog) $(LDLIBS_libxenstore) $(LDLIBS_libxenlight) $(LDLIBS_libxenguest) $(LDLIBS_libxenforeignmemory) $(APPEND_LDFLAGS) + $(CC) $(LDFLAGS) -o $@ $(INIT_DOM0LESS_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 Thu Aug 11 16:48:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941648 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 21648C25B0C for ; Thu, 11 Aug 2022 17:00:15 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384974.620573 (Exim 4.92) (envelope-from ) id 1oMBXS-0002q8-0d; Thu, 11 Aug 2022 17:00:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384974.620573; Thu, 11 Aug 2022 17:00:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBXQ-0002k4-SL; Thu, 11 Aug 2022 17:00:04 +0000 Received: by outflank-mailman (input) for mailman id 384974; Thu, 11 Aug 2022 17:00:02 +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 1oMBNF-0003Aq-4R for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:33 +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 91429361-1995-11ed-bd2e-47488cf2e6aa; Thu, 11 Aug 2022 18:49:31 +0200 (CEST) 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: 91429361-1995-11ed-bd2e-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236570; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2Y09ZveeXsnK5zkGHgMts4gAI2d4WcooLONx/5eIfns=; b=SVSPGxRzA37g+Njw08565uIcJJb183hbNyIxTzMPadyNRxvbPkJB8mCH gbL4U0sYHy+8CTVZuzBC9TrcBqLG5+Cns93NY8ngZciLx3Dwzfsl4j5m1 kd12tUZ9zIRi77wwLcpXxCxF8ydgQAZsfzKWE1XLJ+Mbrn4hTfMH4RxG+ o=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 78334368 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:TPPWoKtcNkjam30gOlF4KI/VEefnVDxeMUV32f8akzHdYApBsoF/q tZmKW+FOPiDNmPxfNknbo228k4B68WDy4QxGVFvqig3EyxA+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZhSAgk/vOHtIQMcacUghpXwhoVSw9vhxqnu89k+ZAjMOwRgiAo rsemeWGULOe82MyYzl8B56r8ks15qyi4WpA5DTSWNgQ1LPgvyhNZH4gDfnZw0vQGuF8AuO8T uDf+7C1lkuxE8AFU47Nfh7TKyXmc5aKVeS8oiM+t5uK23CukhcawKcjXMfwXG8M49m/c3Kd/ /0W3XC4YV9B0qQhA43xWTEAe811FfUuFLMqvRFTGCFcpqHLWyKE/hlgMK05Fd0g38RwCEVOz NpbGAI1aQu8rMSH+r3uH4GAhux7RCXqFIYWu3UmxjDFF/c2B5vERs0m5/cBgm123JoXW6+DO YxJMlKDbzyZC/FLEl4RFJI5mvbunnTleidUgFmUubA28y7YywkZPL3Fb4qOIYDRG5U9ckCwt Hnj9UPQRSghHZ+Q7AKl/yKIiuSUgnauMG4VPOLhraM76LGJ/UQMDDUGWF39puO24ma6RtlWb UId/CEjqawv3EWxS5/2WBjQiG6JuFsQVsRdF8U+6RqR0ezE7gCBHG8GQzVdLts8u6cLqScCj wHT2YmzXHo27ePTGSn1GqqoQS2aaRAwD2gLQS89a0g10eHku74YqCP1QYM2eEKqteEZCQ0c0 hjT8nZm3+RM1JdVv0mo1QuZ2mzx//AlWiZwv1yKBTz9s2uVcab/P+SVBU7nAeGsxWpzZn2Ip zA6lseX94ji5rndxXXWEI3h8FxEjstp0QEwYnY1RvHNDxz3pxaekXl4uVmS3ntBPMceYiPOa 0TOow5X75I7FCL0M/cvPNroWpR3l/KI+THZuhf8MLJzjmVZLlfbrEmCm2bJt4wSrKTcuf5mY srKGSpdJX0bFb5m3FKLegvp6pdyn3hW7T6CGvjGI+GPi+X2iIi9FehYazNjr4kRsMu5neki2 4oGa5fWlk4PDLSWj+u+2dd7EG3m5EMTXfjew/G7vMbZSua6MAnN08Ps/I4= IronPort-HdrOrdr: A9a23:c//VTa2bW3gLUZkmrZ3jsgqjBIokLtp133Aq2lEZdPRUGvb3qy nIpoV86faUskdoZJhOo7C90cW7LU80sKQFhLX5Xo3SOzUO2lHYT72KhLGKq1aLdhEWtNQtsZ uIG5IOceEYZmIasS+V2maF+q4bsbu6zJw= X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="78334368" From: Anthony PERARD To: CC: Anthony PERARD , Luca Fancellu , Wei Liu Subject: [XEN PATCH v4 19/32] tools/console: Use $(xenlibs-ldlibs,) Date: Thu, 11 Aug 2022 17:48:32 +0100 Message-ID: <20220811164845.38083-20-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 Signed-off-by: Anthony PERARD Reviewed-by: Luca Fancellu --- tools/console/client/Makefile | 3 +-- tools/console/daemon/Makefile | 6 +----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/tools/console/client/Makefile b/tools/console/client/Makefile index 44176c6d93..e2f2554f92 100644 --- a/tools/console/client/Makefile +++ b/tools/console/client/Makefile @@ -6,8 +6,7 @@ CFLAGS += $(CFLAGS_libxenctrl) CFLAGS += $(CFLAGS_libxenstore) CFLAGS += -include $(XEN_ROOT)/tools/config.h -LDLIBS += $(LDLIBS_libxenctrl) -LDLIBS += $(LDLIBS_libxenstore) +LDLIBS += $(call xenlibs-ldlibs,ctrl store) LDLIBS += $(SOCKET_LIBS) OBJS-y := main.o diff --git a/tools/console/daemon/Makefile b/tools/console/daemon/Makefile index 0f004f0b14..99bb33b6a2 100644 --- a/tools/console/daemon/Makefile +++ b/tools/console/daemon/Makefile @@ -10,11 +10,7 @@ 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 += $(call xenlibs-ldlibs,ctrl store evtchn gnttab foreignmemory) LDLIBS += $(SOCKET_LIBS) LDLIBS += $(UTIL_LIBS) LDLIBS += -lrt From patchwork Thu Aug 11 16:48:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941649 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 098C8C25B06 for ; Thu, 11 Aug 2022 17:00:13 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384964.620566 (Exim 4.92) (envelope-from ) id 1oMBXP-0002NL-Ez; Thu, 11 Aug 2022 17:00:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384964.620566; Thu, 11 Aug 2022 17:00:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBXO-0002KO-N5; Thu, 11 Aug 2022 17:00:02 +0000 Received: by outflank-mailman (input) for mailman id 384964; Thu, 11 Aug 2022 17:00:00 +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 1oMBNG-0003Aq-S4 for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:35 +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 93328ea4-1995-11ed-bd2e-47488cf2e6aa; Thu, 11 Aug 2022 18:49:33 +0200 (CEST) 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: 93328ea4-1995-11ed-bd2e-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236573; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uMtbT9OvCCyn0S146BCICiBUUfTxeCiBwu/GDB4z7hw=; b=FOFga99893KBBx+W9cGQRyYl/0RF7LyBfhadKIMo74J93ZE0sZXg5ftM IFtXjjmZmQ+ZYh6tgkS5hlYmM4bbXAKeJOYjICxVDXIG1AAdiszmV08wY Ma2pEdr+RqUZvGElS1U6WygVbjVCEZSIKJWZZFU2D5R+iS4OsoxM403rv o=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77650151 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23: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g3wbITXvgad+Q/mja/Hzdb IronPort-HdrOrdr: A9a23:1uBn5KzFQd+EeIWxeoFRKrPwFL1zdoMgy1knxilNoRw8SKKlfq eV7ZImPH7P+U4ssR4b+exoVJPtfZqYz+8R3WBzB8bEYOCFghrKEGgK1+KLqFeMJ8S9zJ846U 4JSdkGNDSaNzlHZKjBjzVQa+xQouW6zA== X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="77650151" From: Anthony PERARD To: CC: Anthony PERARD , Luca Fancellu , Wei Liu Subject: [XEN PATCH v4 20/32] tools: Add -Werror by default to all tools/ Date: Thu, 11 Aug 2022 17:48:33 +0100 Message-ID: <20220811164845.38083-21-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 And provide an option to ./configure to disable it. A follow-up patch will remove -Werror from every other Makefile in tools/. ("tools: Remove -Werror everywhere else") Signed-off-by: Anthony PERARD Reviewed-by: Luca Fancellu --- tools/configure.ac | 1 + tools/Rules.mk | 4 ++++ config/Tools.mk.in | 1 + tools/configure | 26 ++++++++++++++++++++++++++ 4 files changed, 32 insertions(+) diff --git a/tools/configure.ac b/tools/configure.ac index 32cbe6bd3c..09059bc569 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -81,6 +81,7 @@ m4_include([../m4/header.m4]) AX_XEN_EXPAND_CONFIG() # Enable/disable options +AX_ARG_DEFAULT_ENABLE([werror], [Build tools without -Werror]) AX_ARG_DEFAULT_DISABLE([rpath], [Build tools with -Wl,-rpath,LIBDIR]) AX_ARG_DEFAULT_DISABLE([githttp], [Download GIT repositories via HTTP]) AX_ARG_DEFAULT_ENABLE([monitors], [Disable xenstat and xentop monitoring tools]) diff --git a/tools/Rules.mk b/tools/Rules.mk index 26958b2948..a165dc4bda 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -133,6 +133,10 @@ endif CFLAGS_libxenlight += $(CFLAGS_libxenctrl) +ifeq ($(CONFIG_WERROR),y) +CFLAGS += -Werror +endif + ifeq ($(debug),y) # Use -Og if available, -O0 otherwise dbg_opt_level := $(call cc-option,$(CC),-Og,-O0) diff --git a/config/Tools.mk.in b/config/Tools.mk.in index 6c1a0a676f..d0d460f922 100644 --- a/config/Tools.mk.in +++ b/config/Tools.mk.in @@ -1,5 +1,6 @@ -include $(XEN_ROOT)/config/Paths.mk +CONFIG_WERROR := @werror@ CONFIG_RUMP := @CONFIG_RUMP@ ifeq ($(CONFIG_RUMP),y) XEN_OS := NetBSDRump diff --git a/tools/configure b/tools/configure index 41deb7fb96..acd9a04c3b 100755 --- a/tools/configure +++ b/tools/configure @@ -716,6 +716,7 @@ ocamltools monitors githttp rpath +werror DEBUG_DIR XEN_DUMP_DIR XEN_PAGING_DIR @@ -805,6 +806,7 @@ with_xen_scriptdir with_xen_dumpdir with_rundir with_debugdir +enable_werror enable_rpath enable_githttp enable_monitors @@ -1490,6 +1492,7 @@ Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-largefile omit support for large files + --disable-werror Build tools without -Werror (default is ENABLED) --enable-rpath Build tools with -Wl,-rpath,LIBDIR (default is DISABLED) --enable-githttp Download GIT repositories via HTTP (default is @@ -4111,6 +4114,29 @@ DEBUG_DIR=$debugdir_path # Enable/disable options +# Check whether --enable-werror was given. +if test "${enable_werror+set}" = set; then : + enableval=$enable_werror; +fi + + +if test "x$enable_werror" = "xno"; then : + + ax_cv_werror="n" + +elif test "x$enable_werror" = "xyes"; then : + + ax_cv_werror="y" + +elif test -z $ax_cv_werror; then : + + ax_cv_werror="y" + +fi +werror=$ax_cv_werror + + + # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; From patchwork Thu Aug 11 16:48:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941635 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 E72DBC19F2A for ; Thu, 11 Aug 2022 16:59:43 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384877.620400 (Exim 4.92) (envelope-from ) id 1oMBWt-0004AL-HJ; Thu, 11 Aug 2022 16:59:31 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384877.620400; Thu, 11 Aug 2022 16:59:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBWt-0004AE-ED; Thu, 11 Aug 2022 16:59:31 +0000 Received: by outflank-mailman (input) for mailman id 384877; Thu, 11 Aug 2022 16:59:30 +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 1oMBNI-0003Aq-HJ for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:36 +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 93f71ad2-1995-11ed-bd2e-47488cf2e6aa; Thu, 11 Aug 2022 18:49:34 +0200 (CEST) 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: 93f71ad2-1995-11ed-bd2e-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236574; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1Trsd0GfZi3ovEtSWpQIjoAN7t64kJh+RAV0yxYm0vI=; b=amettWsLI7OueoTswHpZSGJnbsAR2cGNi800YlARKKtvJ0U1NZ5WASS/ 3BtKJ1/GCQHhYwtuihkoc8c8Am3Ojd5juRMM3B38b0Q79cp0x5PBePkhF SVHNp5rCLIeFeWQqK/RqUn8P/v4429DAe5+33j3J+9K9gYzISNDiLHjEf A=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77650154 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:a3o9sa6OdjGLoCRMKZviiwxRtPzHchMFZxGqfqrLsTDasY5as4F+v jNKWGzSa/3ZY2anfI1yadywpBtQ7J6An9ZlHgY6+H03Hi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuVGuG96yM6jclkf5KkYMbcICd9WAR4fykojBNnioYRj5VhxNO0GGthg /uryyHkEALjimUc3l48sfrZ8ks/5a2q4lv0g3RlDRx1lA6G/5UqJMp3yZGZdxPQXoRSF+imc OfPpJnRErTxpkpF5nuNy94XQ2VSKlLgFVHmZkl+AsBOtiNqtC0qupvXAdJHAathZ5dlqPgqo DlFncTYpQ7EpcQgksxFO/VTO3kW0aGrZNYriJVw2CCe5xSuTpfi/xlhJBoUFtFA5NgwO1pD+ fokJw4CbxDYvP3jldpXSsE07igiBMziPYdZsXB81zDJS/0hRPgvQY2Tu4Uehm1pwJkTQ7COP KL1ahI2BPjESxRJJlcQDoN4hOqyj2PzWzZZtEiUtew85G27IAlZj+ezbYKMJ4DiqcN9mES8o 2eY+V3COEs2Mc6AlQaj6zG2v7qa9c/8cN1LT+DpnhJwu3Wf3ncWCQEWfVKjrOOll1WlXNZCN 00T/DFopq83nGSpQcP6RAaQu2Ofs1gXXN84O+Ez9gyl0Kff5AedQG8eQVZpdN0jnN87Q3otz FDht8PkA3ljvaOYTVqZ96yItnWiNC4NN2gAaCQYCwwf7LHLv4Ubnh/JCNF5H8adg9n4Hzi23 j6LqTQliqsapckR3q6/8BbMhDfEm3TSZldrvEONBDvjt14nIt7+D2C11bTFxa1iB9rBUGfGh kMJl86i494BDJHWrzPYFY3hA4qVC+a53Cz02AAxR8FwqG30pRZPbqgLvmggeR4B3tIsPGawP RSN4V45CIp7ZiPCUENhX26m5y3GJ4DEHM+taP3bZ8EmjnNZJF7ep3EGiaJ9MgnQfKkQfUIXY 87znT6EVypyNEie5GPeqx0h+bEq3Dsi4mjYWIr2yR+quZLHOiDNEehdaQreM7pjhE9hnOky2 4g3Cid3408HDL2Wjtf/qOb/0mzm3VBkXMur+qS7h8aIIxZ8GXFJNsI9NYgJItU994wIx7igw 51IchUHoLYJrSGYdF7ih7EKQO+HYKuTWlpnZHBwYQvziyR6CWtthY9GH6YKkXAc3LQL5ZZJo zMtJ61s3twnpuz7xgkg IronPort-HdrOrdr: A9a23:Fx+fd687eD9CjRqMBTFuk+DgI+orL9Y04lQ7vn2YSXRuHPBw8P re+sjztCWE8Ar5N0tBpTntAsW9qDbnhPtICOoqTNCftWvdyQiVxehZhOOIqVDd8m/Fh4pgPM 9bAtFD4bbLbGSS4/yU3ODBKadD/OW6 X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="77650154" From: Anthony PERARD To: CC: Anthony PERARD , Christian Lindig , Wei Liu , Elena Ufimtseva , Tim Deegan , "Daniel P. Smith" , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= , Juergen Gross , David Scott Subject: [XEN PATCH v4 21/32] tools: Remove -Werror everywhere else Date: Thu, 11 Aug 2022 17:48:34 +0100 Message-ID: <20220811164845.38083-22-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 Patch "tools: Add -Werror by default to all tools/" have added "-Werror" to CFLAGS in tools/Rules.mk, remove it from every other makefiles as it is now duplicated. Signed-off-by: Anthony PERARD Acked-by: Christian Lindig Acked-by: Daniel P. Smith Acked-by: Jan Beulich --- tools/console/client/Makefile | 1 - tools/console/daemon/Makefile | 1 - tools/debugger/kdd/Makefile | 1 - tools/flask/utils/Makefile | 1 - tools/fuzz/cpu-policy/Makefile | 2 +- tools/misc/Makefile | 1 - tools/tests/cpu-policy/Makefile | 2 +- tools/tests/depriv/Makefile | 2 +- tools/tests/resource/Makefile | 1 - tools/tests/tsx/Makefile | 1 - tools/tests/xenstore/Makefile | 1 - tools/xcutils/Makefile | 2 -- tools/xenmon/Makefile | 1 - tools/xenpaging/Makefile | 1 - tools/xenpmd/Makefile | 1 - tools/xentop/Makefile | 2 +- tools/xentrace/Makefile | 2 -- tools/xl/Makefile | 2 +- tools/debugger/gdbsx/Rules.mk | 2 +- tools/firmware/Rules.mk | 2 -- tools/libfsimage/common.mk | 2 +- tools/libs/libs.mk | 2 +- tools/ocaml/common.make | 2 +- tools/xenstore/Makefile.common | 1 - 24 files changed, 9 insertions(+), 27 deletions(-) diff --git a/tools/console/client/Makefile b/tools/console/client/Makefile index e2f2554f92..62d89fdeb9 100644 --- a/tools/console/client/Makefile +++ b/tools/console/client/Makefile @@ -1,7 +1,6 @@ XEN_ROOT=$(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror CFLAGS += $(CFLAGS_libxenctrl) CFLAGS += $(CFLAGS_libxenstore) CFLAGS += -include $(XEN_ROOT)/tools/config.h diff --git a/tools/console/daemon/Makefile b/tools/console/daemon/Makefile index 99bb33b6a2..9fc3b6711f 100644 --- a/tools/console/daemon/Makefile +++ b/tools/console/daemon/Makefile @@ -1,7 +1,6 @@ XEN_ROOT=$(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror CFLAGS += $(CFLAGS_libxenctrl) CFLAGS += $(CFLAGS_libxenstore) CFLAGS += $(CFLAGS_libxenevtchn) diff --git a/tools/debugger/kdd/Makefile b/tools/debugger/kdd/Makefile index 26116949d4..a72ad3b1e0 100644 --- a/tools/debugger/kdd/Makefile +++ b/tools/debugger/kdd/Makefile @@ -1,7 +1,6 @@ XEN_ROOT = $(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror CFLAGS += $(CFLAGS_libxenctrl) CFLAGS += -DXC_WANT_COMPAT_MAP_FOREIGN_API LDLIBS += $(LDLIBS_libxenctrl) diff --git a/tools/flask/utils/Makefile b/tools/flask/utils/Makefile index 6be134142a..88d7edb6b1 100644 --- a/tools/flask/utils/Makefile +++ b/tools/flask/utils/Makefile @@ -1,7 +1,6 @@ XEN_ROOT=$(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror CFLAGS += $(CFLAGS_libxenctrl) TARGETS := flask-loadpolicy flask-setenforce flask-getenforce flask-label-pci flask-get-bool flask-set-bool diff --git a/tools/fuzz/cpu-policy/Makefile b/tools/fuzz/cpu-policy/Makefile index 41a2230408..6e7743e0aa 100644 --- a/tools/fuzz/cpu-policy/Makefile +++ b/tools/fuzz/cpu-policy/Makefile @@ -17,7 +17,7 @@ install: all .PHONY: uninstall -CFLAGS += -Werror $(CFLAGS_xeninclude) -D__XEN_TOOLS__ +CFLAGS += $(CFLAGS_xeninclude) -D__XEN_TOOLS__ CFLAGS += $(APPEND_CFLAGS) -Og vpath %.c ../../../xen/lib/x86 diff --git a/tools/misc/Makefile b/tools/misc/Makefile index 0e02401227..1c6e1d6a04 100644 --- a/tools/misc/Makefile +++ b/tools/misc/Makefile @@ -1,7 +1,6 @@ XEN_ROOT=$(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror # Include configure output (config.h) CFLAGS += -include $(XEN_ROOT)/tools/config.h CFLAGS += $(CFLAGS_libxenevtchn) diff --git a/tools/tests/cpu-policy/Makefile b/tools/tests/cpu-policy/Makefile index 93af9d76fa..c5b81afc71 100644 --- a/tools/tests/cpu-policy/Makefile +++ b/tools/tests/cpu-policy/Makefile @@ -36,7 +36,7 @@ install: all uninstall: $(RM) -- $(addprefix $(DESTDIR)$(LIBEXEC_BIN)/,$(TARGETS)) -CFLAGS += -Werror -D__XEN_TOOLS__ +CFLAGS += -D__XEN_TOOLS__ CFLAGS += $(CFLAGS_xeninclude) CFLAGS += $(APPEND_CFLAGS) diff --git a/tools/tests/depriv/Makefile b/tools/tests/depriv/Makefile index 3cba28da25..7d9e3b01bb 100644 --- a/tools/tests/depriv/Makefile +++ b/tools/tests/depriv/Makefile @@ -1,7 +1,7 @@ XEN_ROOT=$(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror -Wno-declaration-after-statement +CFLAGS += -Wno-declaration-after-statement CFLAGS += $(CFLAGS_xeninclude) CFLAGS += $(CFLAGS_libxenctrl) diff --git a/tools/tests/resource/Makefile b/tools/tests/resource/Makefile index b3cd70c06d..a5856bf095 100644 --- a/tools/tests/resource/Makefile +++ b/tools/tests/resource/Makefile @@ -27,7 +27,6 @@ install: all uninstall: $(RM) -- $(DESTDIR)$(LIBEXEC_BIN)/$(TARGET) -CFLAGS += -Werror CFLAGS += $(CFLAGS_xeninclude) CFLAGS += $(CFLAGS_libxenctrl) CFLAGS += $(CFLAGS_libxenforeginmemory) diff --git a/tools/tests/tsx/Makefile b/tools/tests/tsx/Makefile index d7d2a5d95e..a4f516b725 100644 --- a/tools/tests/tsx/Makefile +++ b/tools/tests/tsx/Makefile @@ -26,7 +26,6 @@ uninstall: .PHONY: uninstall uninstall: -CFLAGS += -Werror CFLAGS += -I$(XEN_ROOT)/tools/libs/ctrl -I$(XEN_ROOT)/tools/libs/guest CFLAGS += $(CFLAGS_xeninclude) CFLAGS += $(CFLAGS_libxenctrl) diff --git a/tools/tests/xenstore/Makefile b/tools/tests/xenstore/Makefile index 239e1dce47..202dda0d3c 100644 --- a/tools/tests/xenstore/Makefile +++ b/tools/tests/xenstore/Makefile @@ -27,7 +27,6 @@ install: all uninstall: $(RM) -- $(addprefix $(DESTDIR)$(LIBEXEC_BIN)/,$(TARGETS)) -CFLAGS += -Werror CFLAGS += $(CFLAGS_libxenstore) CFLAGS += $(APPEND_CFLAGS) diff --git a/tools/xcutils/Makefile b/tools/xcutils/Makefile index e40a2c4bfa..3687f6cd8f 100644 --- a/tools/xcutils/Makefile +++ b/tools/xcutils/Makefile @@ -13,8 +13,6 @@ include $(XEN_ROOT)/tools/Rules.mk TARGETS := readnotes lsevtchn -CFLAGS += -Werror - CFLAGS_readnotes.o := $(CFLAGS_libxenevtchn) $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) CFLAGS_lsevtchn.o := $(CFLAGS_libxenevtchn) $(CFLAGS_libxenctrl) diff --git a/tools/xenmon/Makefile b/tools/xenmon/Makefile index 3e150b0659..679c4b41a3 100644 --- a/tools/xenmon/Makefile +++ b/tools/xenmon/Makefile @@ -13,7 +13,6 @@ XEN_ROOT=$(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror CFLAGS += $(CFLAGS_libxenevtchn) CFLAGS += $(CFLAGS_libxenctrl) LDLIBS += $(LDLIBS_libxenctrl) diff --git a/tools/xenpaging/Makefile b/tools/xenpaging/Makefile index e2ed9eaa3f..835cf2b965 100644 --- a/tools/xenpaging/Makefile +++ b/tools/xenpaging/Makefile @@ -12,7 +12,6 @@ OBJS-y += xenpaging.o OBJS-y += policy_$(POLICY).o OBJS-y += pagein.o -CFLAGS += -Werror CFLAGS += -Wno-unused TARGETS := xenpaging diff --git a/tools/xenpmd/Makefile b/tools/xenpmd/Makefile index e0d3f06ab2..8da20510b5 100644 --- a/tools/xenpmd/Makefile +++ b/tools/xenpmd/Makefile @@ -1,7 +1,6 @@ XEN_ROOT=$(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror CFLAGS += $(CFLAGS_libxenstore) LDLIBS += $(LDLIBS_libxenstore) diff --git a/tools/xentop/Makefile b/tools/xentop/Makefile index 7bd96f34d5..70cc2211c5 100644 --- a/tools/xentop/Makefile +++ b/tools/xentop/Makefile @@ -13,7 +13,7 @@ XEN_ROOT=$(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -DGCC_PRINTF -Werror $(CFLAGS_libxenstat) +CFLAGS += -DGCC_PRINTF $(CFLAGS_libxenstat) LDLIBS += $(LDLIBS_libxenstat) $(CURSES_LIBS) $(TINFO_LIBS) $(SOCKET_LIBS) -lm CFLAGS += -DHOST_$(XEN_OS) diff --git a/tools/xentrace/Makefile b/tools/xentrace/Makefile index 63f2f6532d..d50d400472 100644 --- a/tools/xentrace/Makefile +++ b/tools/xentrace/Makefile @@ -1,8 +1,6 @@ XEN_ROOT=$(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror - CFLAGS += $(CFLAGS_libxenevtchn) CFLAGS += $(CFLAGS_libxenctrl) LDLIBS += $(LDLIBS_libxenevtchn) diff --git a/tools/xl/Makefile b/tools/xl/Makefile index b7f439121a..5f7aa5f46c 100644 --- a/tools/xl/Makefile +++ b/tools/xl/Makefile @@ -5,7 +5,7 @@ XEN_ROOT = $(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \ +CFLAGS += -Wno-format-zero-length -Wmissing-declarations \ -Wno-declaration-after-statement -Wformat-nonliteral CFLAGS += -fPIC diff --git a/tools/debugger/gdbsx/Rules.mk b/tools/debugger/gdbsx/Rules.mk index 920f1c87fb..0610db873b 100644 --- a/tools/debugger/gdbsx/Rules.mk +++ b/tools/debugger/gdbsx/Rules.mk @@ -1,6 +1,6 @@ include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror -Wmissing-prototypes +CFLAGS += -Wmissing-prototypes # (gcc 4.3x and later) -Wconversion -Wno-sign-conversion CFLAGS-$(clang) += -Wno-ignored-attributes diff --git a/tools/firmware/Rules.mk b/tools/firmware/Rules.mk index 278cca01e4..d3482c9ec4 100644 --- a/tools/firmware/Rules.mk +++ b/tools/firmware/Rules.mk @@ -11,8 +11,6 @@ ifneq ($(debug),y) CFLAGS += -DNDEBUG endif -CFLAGS += -Werror - $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) $(call cc-option-add,CFLAGS,CC,-fcf-protection=none) diff --git a/tools/libfsimage/common.mk b/tools/libfsimage/common.mk index 77bc957f27..4fc8c66795 100644 --- a/tools/libfsimage/common.mk +++ b/tools/libfsimage/common.mk @@ -2,7 +2,7 @@ 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 +CFLAGS += -D_GNU_SOURCE LDFLAGS += -L../common/ PIC_OBJS = $(patsubst %.c,%.opic,$(LIB_SRCS-y)) diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk index 2b8e7a6128..e47fb30ed4 100644 --- a/tools/libs/libs.mk +++ b/tools/libs/libs.mk @@ -14,7 +14,7 @@ MINOR ?= 0 SHLIB_LDFLAGS += -Wl,--version-script=libxen$(LIBNAME).map -CFLAGS += -Werror -Wmissing-prototypes +CFLAGS += -Wmissing-prototypes CFLAGS += $(CFLAGS_xeninclude) CFLAGS += $(foreach lib, $(USELIBS_$(LIBNAME)), $(CFLAGS_libxen$(lib))) diff --git a/tools/ocaml/common.make b/tools/ocaml/common.make index d5478f626f..0c8a597d5b 100644 --- a/tools/ocaml/common.make +++ b/tools/ocaml/common.make @@ -9,7 +9,7 @@ OCAMLLEX ?= ocamllex OCAMLYACC ?= ocamlyacc OCAMLFIND ?= ocamlfind -CFLAGS += -fPIC -Werror -I$(shell ocamlc -where) +CFLAGS += -fPIC -I$(shell ocamlc -where) OCAMLOPTFLAG_G := $(shell $(OCAMLOPT) -h 2>&1 | sed -n 's/^ *\(-g\) .*/\1/p') OCAMLOPTFLAGS = $(OCAMLOPTFLAG_G) -ccopt "$(LDFLAGS)" -dtypes $(OCAMLINCLUDE) -cc $(CC) -w F -warn-error F diff --git a/tools/xenstore/Makefile.common b/tools/xenstore/Makefile.common index 21b78b0538..ddbac052ac 100644 --- a/tools/xenstore/Makefile.common +++ b/tools/xenstore/Makefile.common @@ -9,7 +9,6 @@ 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 From patchwork Thu Aug 11 16:48:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941647 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 45EB6C19F2A for ; Thu, 11 Aug 2022 17:00:10 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384954.620550 (Exim 4.92) (envelope-from ) id 1oMBXM-0001hv-3A; Thu, 11 Aug 2022 17:00:00 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384954.620550; Thu, 11 Aug 2022 17:00:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBXL-0001fg-M9; Thu, 11 Aug 2022 16:59:59 +0000 Received: by outflank-mailman (input) for mailman id 384954; Thu, 11 Aug 2022 16:59:58 +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 1oMBNO-0003Aq-6b for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:42 +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 95297b85-1995-11ed-bd2e-47488cf2e6aa; Thu, 11 Aug 2022 18:49:36 +0200 (CEST) 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: 95297b85-1995-11ed-bd2e-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236576; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WWgKKsGpMO0s5/MpdnydWA9yplEqj5PrJ/SuQ+hxLac=; b=Z2IliiFVz30TrJkggKbdYyyPykX3xuEqDgmyBhEAfMz1GFZ0OO+yTxQp 85NvynIbftSCCWHRj2OwJrrAw7/wtDQ5gD6Ei4SUA0hXJwKdzZ0XfrP2K M3Z1Yuoz49ksoF4BNZ7vYV1+XffdxrTLInXnwnxB53myOrq/QMaRfOc1r 4=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 78334375 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:XTZfqKjcttlOaiQA46HuDZ7+X161PRAKZh0ujC45NGQN5FlHY01je htvWW6BPqmLY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j4UaCbgqjBIokLtp133Aq2lEZdPRUGvb3qy nIpoV86faUskdoZJhOo7C90cW7LU80sKQFhLX5Xo3SOzUO2lHYT72KhLGKq1aLdhEWtNQtsZ uIG5IOceEYZmIasS+V2maF+q4bsbu6zJw= X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="78334375" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu Subject: [XEN PATCH v4 22/32] tools/hotplug: Generate "hotplugpath.sh" with configure Date: Thu, 11 Aug 2022 17:48:35 +0100 Message-ID: <20220811164845.38083-23-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 Signed-off-by: Anthony PERARD --- Notes: v4: - new patch tools/configure.ac | 1 + tools/hotplug/common/Makefile | 10 ++-------- tools/configure | 3 ++- tools/hotplug/common/hotplugpath.sh.in | 16 ++++++++++++++++ 4 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 tools/hotplug/common/hotplugpath.sh.in diff --git a/tools/configure.ac b/tools/configure.ac index 09059bc569..18e481d77e 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -7,6 +7,7 @@ AC_INIT([Xen Hypervisor Tools], m4_esyscmd([../version.sh ../xen/Makefile]), AC_CONFIG_SRCDIR([libs/light/libxl.c]) AC_CONFIG_FILES([ ../config/Tools.mk +hotplug/common/hotplugpath.sh hotplug/FreeBSD/rc.d/xencommons hotplug/FreeBSD/rc.d/xendriverdomain hotplug/Linux/init.d/sysconfig.xencommons diff --git a/tools/hotplug/common/Makefile b/tools/hotplug/common/Makefile index e8a8dbea6c..62afe1019e 100644 --- a/tools/hotplug/common/Makefile +++ b/tools/hotplug/common/Makefile @@ -1,19 +1,14 @@ XEN_ROOT = $(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk -HOTPLUGPATH := hotplugpath.sh - # OS-independent hotplug scripts go in this directory # Xen scripts to go there. XEN_SCRIPTS := -XEN_SCRIPT_DATA := $(HOTPLUGPATH) - -genpath-target = $(call buildmakevars2file,$(HOTPLUGPATH)) -$(eval $(genpath-target)) +XEN_SCRIPT_DATA := hotplugpath.sh .PHONY: all -all: $(HOTPLUGPATH) +all: .PHONY: install install: install-scripts @@ -40,7 +35,6 @@ uninstall-scripts: .PHONY: clean clean: - rm -f $(HOTPLUGPATH) .PHONY: distclean distclean: clean diff --git a/tools/configure b/tools/configure index acd9a04c3b..6199823f5a 100755 --- a/tools/configure +++ b/tools/configure @@ -2456,7 +2456,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_config_files="$ac_config_files ../config/Tools.mk hotplug/FreeBSD/rc.d/xencommons hotplug/FreeBSD/rc.d/xendriverdomain hotplug/Linux/init.d/sysconfig.xencommons hotplug/Linux/init.d/sysconfig.xendomains hotplug/Linux/init.d/xen-watchdog hotplug/Linux/init.d/xencommons hotplug/Linux/init.d/xendomains hotplug/Linux/init.d/xendriverdomain hotplug/Linux/launch-xenstore hotplug/Linux/vif-setup hotplug/Linux/xen-hotplug-common.sh hotplug/Linux/xendomains hotplug/NetBSD/rc.d/xencommons hotplug/NetBSD/rc.d/xendriverdomain ocaml/libs/xs/paths.ml ocaml/xenstored/paths.ml ocaml/xenstored/oxenstored.conf" +ac_config_files="$ac_config_files ../config/Tools.mk hotplug/common/hotplugpath.sh hotplug/FreeBSD/rc.d/xencommons hotplug/FreeBSD/rc.d/xendriverdomain hotplug/Linux/init.d/sysconfig.xencommons hotplug/Linux/init.d/sysconfig.xendomains hotplug/Linux/init.d/xen-watchdog hotplug/Linux/init.d/xencommons hotplug/Linux/init.d/xendomains hotplug/Linux/init.d/xendriverdomain hotplug/Linux/launch-xenstore hotplug/Linux/vif-setup hotplug/Linux/xen-hotplug-common.sh hotplug/Linux/xendomains hotplug/NetBSD/rc.d/xencommons hotplug/NetBSD/rc.d/xendriverdomain ocaml/libs/xs/paths.ml ocaml/xenstored/paths.ml ocaml/xenstored/oxenstored.conf" ac_config_headers="$ac_config_headers config.h" @@ -10947,6 +10947,7 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "../config/Tools.mk") CONFIG_FILES="$CONFIG_FILES ../config/Tools.mk" ;; + "hotplug/common/hotplugpath.sh") CONFIG_FILES="$CONFIG_FILES hotplug/common/hotplugpath.sh" ;; "hotplug/FreeBSD/rc.d/xencommons") CONFIG_FILES="$CONFIG_FILES hotplug/FreeBSD/rc.d/xencommons" ;; "hotplug/FreeBSD/rc.d/xendriverdomain") CONFIG_FILES="$CONFIG_FILES hotplug/FreeBSD/rc.d/xendriverdomain" ;; "hotplug/Linux/init.d/sysconfig.xencommons") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/init.d/sysconfig.xencommons" ;; diff --git a/tools/hotplug/common/hotplugpath.sh.in b/tools/hotplug/common/hotplugpath.sh.in new file mode 100644 index 0000000000..1036b884b8 --- /dev/null +++ b/tools/hotplug/common/hotplugpath.sh.in @@ -0,0 +1,16 @@ +sbindir="@sbindir@" +bindir="@bindir@" +LIBEXEC="@LIBEXEC@" +LIBEXEC_BIN="@LIBEXEC_BIN@" +libdir="@libdir@" +SHAREDIR="@SHAREDIR@" +XENFIRMWAREDIR="@XENFIRMWAREDIR@" +XEN_CONFIG_DIR="@XEN_CONFIG_DIR@" +XEN_SCRIPT_DIR="@XEN_SCRIPT_DIR@" +XEN_LOCK_DIR="@XEN_LOCK_DIR@" +XEN_RUN_DIR="@XEN_RUN_DIR@" +XEN_PAGING_DIR="@XEN_PAGING_DIR@" +XEN_DUMP_DIR="@XEN_DUMP_DIR@" +XEN_LOG_DIR="@XEN_LOG_DIR@" +XEN_LIB_DIR="@XEN_LIB_DIR@" +XEN_RUN_STORED="@XEN_RUN_STORED@" From patchwork Thu Aug 11 16:48:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941631 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 A4949C25B06 for ; Thu, 11 Aug 2022 16:59:42 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384883.620433 (Exim 4.92) (envelope-from ) id 1oMBWw-0004yI-KI; Thu, 11 Aug 2022 16:59:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384883.620433; Thu, 11 Aug 2022 16:59:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBWw-0004y2-GR; Thu, 11 Aug 2022 16:59:34 +0000 Received: by outflank-mailman (input) for mailman id 384883; Thu, 11 Aug 2022 16:59:33 +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 1oMBNQ-0003Aq-7B for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:44 +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 960c814e-1995-11ed-bd2e-47488cf2e6aa; Thu, 11 Aug 2022 18:49:37 +0200 (CEST) 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: 960c814e-1995-11ed-bd2e-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236578; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4HJ6zZu2n6v+FIEsm8kbGG2N7wL5T8JT/E4hq3TeoGM=; b=Tb6q7swrxzxtJ1Hqz8dleyO9T/bahNe9tIt6Ou8aEos9pkaLzNXLAodY KjQF4q5MbBPrHa6JhYX2CAM8hB+QhzLzbbXhLng1t5nb4B3mv0rHkXVVP N096rtsMLn8Lynw8zIEFplh1qv9GFGY1IYw3004eY3FovBsNfJXEd1Q+b U=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 78334380 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:hiIGY623NseRc55nxvbD5b9xkn2cJEfYwER7XKvMYLTBsI5bpzNVx jAcCmGEO/veYDShKot1Ydy39U8H7cSGmtZrQAJppC1hF35El5HIVI+TRqvS04J+DSFhoGZPt Zh2hgzodZhsJpPkjk7xdOKn9RGQ7InQLpLkEunIJyttcgFtTSYlmHpLlvUwx4VlmrBVOSvU0 T/Ji5CZaQTNNwJcaDpOsfrT8Uo35pwehRtD1rAATaET1LPhvyF94KI3fcmZM3b+S49IKe+2L 86rIGaRpz6xE78FU7tJo56jGqE4aue60Tum0xK6b5OKkBlazhHe545gXBYqheW7vB3S9zx54 I0lWZVd0m7FNIWU8AgWe0Ew/y2TocSqUVIISJSymZX78qHIT5fj6/R/XHw1OKkcwL5uAmJsx 9s9OCgGYB/W0opawJrjIgVtrsEqLc2tN4IDoHBwizreCJ7KQ7iaHf+Mv4UBmm5t2IYeRp4yZ OJAAdZrRB3Gfx1IPEZREJ8klf2krnL+bydZuBSeoq9fD237k1wqi+S2YIK9ltqiHtxXl3+Uj W38/WHhMDMLc8yd2CGO2yf57gPItXyiA99DfFGizdZoj0eU3Xc7EwANWB2wpvzRolG6c8JSL QoT4CVGhbg/8gmnQ8fwWzW8oWWYpVgMVtxICeo45QqRjK3O7G6k6nMsF2AbLoZ87YlvGGJsh gThc87V6SJHsazFdHGY0rOu9SqxOgonCkoSfSQKQl5QizX8m73fni4jX/46TvDt1oyqQGiuq 9yZhHNg3utO1Kbnw43+pAma2Gz0+/AlWyZvvm3qsnSZAhSVjWJPT6ih8hDl4PlJN+51pXHR7 SFfy6ByAA3jZKxhdRBho81XRdlFH97fbFXhbadHRvHNDQiF9X+5Zpx36zpjPkpvOctsUWa3P heL5lsItc8OZiHCgUpLj2WZVawXIVXIT4y5Bpg4kPIXCnSOSON31H43PhPBt4wcuEMtjbs+K f+mTCpYNl5DUPwP5GfnGI8gPUoDnH9WKZX7Gc+mlHxKENO2OBaodFvyGAfXMrxlsfjU/Fy9H hQ2H5Li9iizmdbWOkH/mbP/53hWRZTnLfgac/BqS9M= IronPort-HdrOrdr: A9a23:LnNR96NTXvG3MsBcTvmjsMiBIKoaSvp037Eqv3oedfUzSL3/qy nOpoVi6faaslYssR0b9exofZPwJE80lqQFhrX5X43SPzUO0VHAROoJgLcKgQeQfxEWntQtrJ uIGJIeNDSfNzdHZL7BkWuFL+o= X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="78334380" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu , "Juergen Gross" Subject: [XEN PATCH v4 23/32] libs/light/gentypes.py: allow to generate headers in subdirectory Date: Thu, 11 Aug 2022 17:48:36 +0100 Message-ID: <20220811164845.38083-24-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 This doesn't matter yet but it will when for example the script will be run from tools/ to generate files tools/libs/light/. Signed-off-by: Anthony PERARD --- Notes: v4: - new patch tools/libs/light/gentypes.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/libs/light/gentypes.py b/tools/libs/light/gentypes.py index 9a45e45acc..3fe3873242 100644 --- a/tools/libs/light/gentypes.py +++ b/tools/libs/light/gentypes.py @@ -584,6 +584,9 @@ def libxl_C_enum_from_string(ty, str, e, indent = " "): s = indent + s return s.replace("\n", "\n%s" % indent).rstrip(indent) +def clean_header_define(header_path): + return header_path.split('/')[-1].upper().replace('.','_') + if __name__ == '__main__': if len(sys.argv) != 6: @@ -598,7 +601,7 @@ if __name__ == '__main__': f = open(header, "w") - header_define = header.upper().replace('.','_') + header_define = clean_header_define(header) f.write("""#ifndef %s #define %s @@ -648,7 +651,7 @@ if __name__ == '__main__': f = open(header_json, "w") - header_json_define = header_json.upper().replace('.','_') + header_json_define = clean_header_define(header_json) f.write("""#ifndef %s #define %s @@ -672,7 +675,7 @@ if __name__ == '__main__': f = open(header_private, "w") - header_private_define = header_private.upper().replace('.','_') + header_private_define = clean_header_define(header_private) f.write("""#ifndef %s #define %s From patchwork Thu Aug 11 16:48:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941643 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 05134C25B06 for ; Thu, 11 Aug 2022 16:59:58 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384916.620509 (Exim 4.92) (envelope-from ) id 1oMBXC-0007vk-96; Thu, 11 Aug 2022 16:59:50 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384916.620509; Thu, 11 Aug 2022 16:59: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 1oMBXB-0007sp-Sf; Thu, 11 Aug 2022 16:59:49 +0000 Received: by outflank-mailman (input) for mailman id 384916; Thu, 11 Aug 2022 16:59: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 1oMBNU-0003Aq-87 for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:48 +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 973f5cd3-1995-11ed-bd2e-47488cf2e6aa; Thu, 11 Aug 2022 18:49:41 +0200 (CEST) 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: 973f5cd3-1995-11ed-bd2e-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236581; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=W6vCbrh65CqtneFRPKerc/tF+uYF6bBQ+treqeycw4E=; b=B+yYT4xTMoCyP4HbTgPkrrlRK5VVtV29sJ6Ax11DE/lF6AukyIFj9BxV x3FNfqj8EB5+wr7e7PLN7lW1e4fMmeLzdkfMNPlBb62S89MDA+eDJwK07 ZSb+UQ0K4xqDr77pfU3M2Ur+kubuiTswVSQOr1j7mbpMJSSd+w+37OEAh Y=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77898109 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:aVG8CKnncLjjaAHjvQOC/4ro5mJPLRN+VbBN2KgSYl3aPzYEGi7M+fK5BX4HbfXpEBkXJ6DNWZp+jjygzYrHtUg2Xxbj45YZfyD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G7XSp/NnNVoomyCl9UqxQhtXqG7717zOrUhCMgoG70+bEWkKPx/hUkbfMuhN+fut/gOrIHzajpXshO1uh26g3C75bRWHIPHyYTafacLD/k8W3DmRmcQCpfieuSAPRyz5bVJ4XVm2EcpPBYPp8x7FJK0q7QV7JcLfzt/DOQKzZyCnkkFtwkCmken90hF5xaWtBp7KJG9GNmiVb3H5i7Xpu5mlHxlYk2ZEetIhh8oXMZuqtJdLVaI+Ie+sUyOSteRfEVIahTRmIjyxse1PW/+QoFjlq1QLxV0zHxduRSw4RTT9gC+cc5jwAndNaTLV9Vc6dxtNfH66/iGt/0RYQlU6/bkOV8aM7Clhy7KYvlIOkjmjnntbHIbmZ/xfrhymqIm6nFhoufOEfXsPjSr5UJBU0jWWO7XuOmkW5Gkn3/gJkg4j0R25UDfNn/2zx1CTmbC1AvlnDc/TisvlXmcDMz9iNwH3Xev+JJcsPrBCYUpe6rzrPHmQA0cmdmj3CmidFuEJywFXsBlwGuA/PWpjElA4jIToB01zfbSMAACS75 X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="77898109" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu Subject: [XEN PATCH v4 24/32] git-checkout.sh: handle running git-checkout from a different directory Date: Thu, 11 Aug 2022 17:48:37 +0100 Message-ID: <20220811164845.38083-25-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 "$DIR" might not be a full path and it might not have `pwd` as ".." directory. So use `cd -` to undo the first `cd` command. Also, use `basename` to make a symbolic link with a relative path. This doesn't matter yet but it will when for example the commands to clone OVMF is been run from tools/ rather than tools/firmware/. Signed-off-by: Anthony PERARD --- Notes: v4: - new patch scripts/git-checkout.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/git-checkout.sh b/scripts/git-checkout.sh index 20ae31ff23..fd4425ac4e 100755 --- a/scripts/git-checkout.sh +++ b/scripts/git-checkout.sh @@ -19,9 +19,9 @@ if test \! -d $DIR-remote; then cd $DIR-remote.tmp $GIT branch -D dummy >/dev/null 2>&1 ||: $GIT checkout -b dummy $TAG - cd .. + cd - fi mv $DIR-remote.tmp $DIR-remote fi rm -f $DIR -ln -sf $DIR-remote $DIR +ln -sf $(basename $DIR-remote) $DIR From patchwork Thu Aug 11 16:48:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941633 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 EFADBC3F6B0 for ; Thu, 11 Aug 2022 16:59:42 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384876.620389 (Exim 4.92) (envelope-from ) id 1oMBWs-0003ue-AL; Thu, 11 Aug 2022 16:59:30 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384876.620389; Thu, 11 Aug 2022 16:59:30 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBWs-0003uX-6e; Thu, 11 Aug 2022 16:59:30 +0000 Received: by outflank-mailman (input) for mailman id 384876; Thu, 11 Aug 2022 16:59:29 +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 1oMBNQ-0003s9-NL for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:44 +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 98768f32-1995-11ed-924f-1f966e50362f; Thu, 11 Aug 2022 18:49:43 +0200 (CEST) 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: 98768f32-1995-11ed-924f-1f966e50362f DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236583; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/gk/zrc7mUau8n7u3084orMZkSKyjao6ioLVB6VKyZU=; b=cpPFQ3kzJJGr6vJFYit8uvf6uSzQuR24sSBUT/i9pzGYKr6HQQZ51o09 NQsLMDLZsY2wPs57krO1/Ty6nuXlQKxJIB3+qflOhcM1SJmOMVcOtbYpg 71gNux4cMRirMR0Gyj6dmyn7oTvz+xEQ4evUlB5nnXkgMetj/w7CHFX2B 4=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77893963 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:v94EQaLZjYN0cux2FE+RvZUlxSXFcZb7ZxGr2PjKsXjdYENS0DIAn zYcWm/TbqveZzOmeth2YNm+9BgG75OAnN5lGQRlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokf0/0vraP65xZVF/fngbqLmD+LZMTxGSwZhSSMw4TpugOd8iYNz6TSDK1rlV eja/ouOYzdJ5xYuajhOs/La8Us11BjPkGhwUmIWNKgjUGD2zxH5PLpHTYmtIn3xRJVjH+LSb 44vG5ngows1Vz90Yj+Uuu6Tnn8iG9Y+DiD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"Juergen Gross" Subject: [XEN PATCH v4 25/32] libs: Avoid exposing -Wl,--version-script to other built library Date: Thu, 11 Aug 2022 17:48:38 +0100 Message-ID: <20220811164845.38083-26-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 $(SHLIB_LDFLAGS) is used by more targets that the single targets that except it (libxenfoo.so.X.Y). There is also some dynamic libraries in stats/ that uses $(SHLIB_LDFLAGS) (even if those are never built), and there's libxenlight_test.so which doesn't needs a version script. Also, libxenlight_test.so might failed to build if the version script doesn't exist yet. For these reasons, avoid changing the generic $(SHLIB_LDFLAGS) flags, and add the flag directly on the command line. Signed-off-by: Anthony PERARD --- Notes: v4: - new patch tools/libs/libs.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk index e47fb30ed4..3eb91fc8f3 100644 --- a/tools/libs/libs.mk +++ b/tools/libs/libs.mk @@ -12,8 +12,6 @@ MAJOR := $(shell $(XEN_ROOT)/version.sh $(XEN_ROOT)/xen/Makefile) endif MINOR ?= 0 -SHLIB_LDFLAGS += -Wl,--version-script=libxen$(LIBNAME).map - CFLAGS += -Wmissing-prototypes CFLAGS += $(CFLAGS_xeninclude) CFLAGS += $(foreach lib, $(USELIBS_$(LIBNAME)), $(CFLAGS_libxen$(lib))) @@ -85,7 +83,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) $(LDLIBS) $(APPEND_LDFLAGS) + $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,lib$(LIB_FILE_NAME).so.$(MAJOR) -Wl,--version-script=libxen$(LIBNAME).map $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS) $(APPEND_LDFLAGS) # If abi-dumper is available, write out the ABI analysis ifneq ($(ABI_DUMPER),) From patchwork Thu Aug 11 16:48:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941644 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 DAEDAC19F2A for ; Thu, 11 Aug 2022 17:00:01 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384918.620518 (Exim 4.92) (envelope-from ) id 1oMBXE-00089N-2x; Thu, 11 Aug 2022 16:59:52 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384918.620518; Thu, 11 Aug 2022 16:59: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 1oMBXC-00084e-SA; Thu, 11 Aug 2022 16:59:50 +0000 Received: by outflank-mailman (input) for mailman id 384918; Thu, 11 Aug 2022 16:59:48 +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 1oMBNX-0003Aq-8h for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49: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 99f14366-1995-11ed-bd2e-47488cf2e6aa; Thu, 11 Aug 2022 18:49:44 +0200 (CEST) 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: 99f14366-1995-11ed-bd2e-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236584; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dR83eQZUkBseSL1TT8Ybm7GdBrsNbP3ypihJcI9wWTg=; b=DmIbQsltO6d5Z/VTjJl1iNzjANfDxTKMqOLJjKXxRt+kuvUWk9iT1Hye dxEc5jk7XA7MvS5qi3WBG/TykDA2fwGpwXiBkA/urKE/FMQaCGZpJm50U JubTmTkd6zu/MzykJkZPBdqBE79NAyciHchm6TR+I7iGvm9fqLQVUgfA2 E=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77898114 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:mwNJlaksXp4cVxN+3mINEIHo5mJPLRN1VbBN2KgaYm36RzIEGi7MwEco7ei7X2ZQdm8EpoD9Y5lHzFUYqI9Fpq5fek2hZyTH7r5JptRazAfTr1EELKXvfEPq+ByDfNM6uT8a7r7mlV34rBkx8fxw4femqX/7oTEE0KZYNXvbigSTbgqBRwQzatawkbXCYDgXt4hKiJs4a4X2fCynhMLz/j+R8qnyFWAsm95gDiNmmBPU9f+wTimASqHr8hgbDXXRxpqY1jmhC2QI2yMZP59lif0jE/3B4e6sAi98/ZuFI0LswhRV8b+rdY+olUwI7WvQUZAmjlPmsTb4rjaZOALUix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lxlN12JgC6Pyuum+tCp8ibYQvDTubIF6VyCbMIpyemqZBaeogCWkc8TUSkdvLgTYTQftOzCmSpTdgmeyhkV/6XMI2E6i3dr5FpMODD0a7e8ffmq/ncBqqaOf0zj6jM2nyYgzWx3umyXT+s8VtFuW578LlT9jCkgm9LLcgqSqmNuIBnr8PvTMUoO6VEeedDdlecCP59Y4lskr7oTV+BDqbqMnutW5+TCvxeyFQzi+FGf81iLlSHh88NYpPvc0ZO/uxYf7dR4hQjC6PGo/YuXl8nxiFhobNrudK6vU5f0niDcnyiSTfV4sLuyLpJSGOs3OLJZcn++DK3oOZJTn1HFc/VMfasPbGYBLcczMVzhwQvlzig3p1wNdOA+tUOA2xFnwd7BVkA== X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="77898114" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu , Juergen Gross Subject: [XEN PATCH v4 26/32] libs: Fix auto-generation of version-script for unstable libs Date: Thu, 11 Aug 2022 17:48:39 +0100 Message-ID: <20220811164845.38083-27-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 When there isn't a version-script for a shared library (like for unstable libs), we create one based on the current Xen version. But that version-script became out-of-date as soon as Xen's version changes and make as no way to regenerate the version-script on rebuild. In order to allow regenerating the script, we'll have a different filename. In order to check if the content is up-to-date, we'll always generated it and compare. But we also need to know if there's already an existing version script or if we need to generate one, for that we introduce $(version-script) to be used to point to the path of the existing script. (Guessing if a version script exist for a stable library with for example $(wildcard) won't work as a file will exist when building the library without this patch.) We don't need the version-script unless we are making the shared library so it is removed from the "all" target. Signed-off-by: Anthony PERARD --- Alternatively, we could remove the need for to generate a version-script, but that would mean the exported symbols won't have a version anymore (like before, a few versions of Xen ago). Or, we could use --default-symver, but the symboled would be versionned with the soname (e.g. "libxenctrl.so.4.16.0") instead of "VERS_4.16.0". --- Notes: v4: - new patch tools/libs/call/Makefile | 1 + tools/libs/ctrl/Makefile | 3 --- tools/libs/devicemodel/Makefile | 1 + tools/libs/evtchn/Makefile | 1 + tools/libs/foreignmemory/Makefile | 1 + tools/libs/gnttab/Makefile | 1 + tools/libs/guest/Makefile | 3 --- tools/libs/hypfs/Makefile | 1 + tools/libs/light/Makefile | 1 - tools/libs/stat/Makefile | 2 +- tools/libs/store/Makefile | 1 + tools/libs/toolcore/Makefile | 1 + tools/libs/toollog/Makefile | 1 + tools/libs/util/Makefile | 3 --- tools/libs/vchan/Makefile | 3 --- tools/libs/libs.mk | 19 +++++++++++++------ .gitignore | 6 ------ 17 files changed, 23 insertions(+), 26 deletions(-) diff --git a/tools/libs/call/Makefile b/tools/libs/call/Makefile index 103f5ad360..56a964b517 100644 --- a/tools/libs/call/Makefile +++ b/tools/libs/call/Makefile @@ -3,6 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 3 +version-script := libxencall.map include Makefile.common diff --git a/tools/libs/ctrl/Makefile b/tools/libs/ctrl/Makefile index 93442ab389..094e84b8d8 100644 --- a/tools/libs/ctrl/Makefile +++ b/tools/libs/ctrl/Makefile @@ -10,6 +10,3 @@ PKG_CONFIG_NAME := Xencontrol NO_HEADERS_CHK := y include $(XEN_ROOT)/tools/libs/libs.mk - -clean:: - rm -f libxenctrl.map diff --git a/tools/libs/devicemodel/Makefile b/tools/libs/devicemodel/Makefile index b70dd774e4..20d1d112e7 100644 --- a/tools/libs/devicemodel/Makefile +++ b/tools/libs/devicemodel/Makefile @@ -3,6 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 4 +version-script := libxendevicemodel.map include Makefile.common diff --git a/tools/libs/evtchn/Makefile b/tools/libs/evtchn/Makefile index 3dad3840c6..18cdaab89e 100644 --- a/tools/libs/evtchn/Makefile +++ b/tools/libs/evtchn/Makefile @@ -3,6 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 2 +version-script := libxenevtchn.map include Makefile.common diff --git a/tools/libs/foreignmemory/Makefile b/tools/libs/foreignmemory/Makefile index b70dd774e4..81398e88b1 100644 --- a/tools/libs/foreignmemory/Makefile +++ b/tools/libs/foreignmemory/Makefile @@ -3,6 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 4 +version-script := libxenforeignmemory.map include Makefile.common diff --git a/tools/libs/gnttab/Makefile b/tools/libs/gnttab/Makefile index 3dad3840c6..4528830bdc 100644 --- a/tools/libs/gnttab/Makefile +++ b/tools/libs/gnttab/Makefile @@ -3,6 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 2 +version-script := libxengnttab.map include Makefile.common diff --git a/tools/libs/guest/Makefile b/tools/libs/guest/Makefile index 19d3ff2fdb..93338a9301 100644 --- a/tools/libs/guest/Makefile +++ b/tools/libs/guest/Makefile @@ -14,6 +14,3 @@ NO_HEADERS_CHK := y include $(XEN_ROOT)/tools/libs/libs.mk libxenguest.so.$(MAJOR).$(MINOR): LDLIBS += $(ZLIB_LIBS) -lz - -clean:: - rm -f libxenguest.map diff --git a/tools/libs/hypfs/Makefile b/tools/libs/hypfs/Makefile index 630e1e6f3e..7fae5c750d 100644 --- a/tools/libs/hypfs/Makefile +++ b/tools/libs/hypfs/Makefile @@ -3,6 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 0 +version-script := libxenhypfs.map LDLIBS += -lz diff --git a/tools/libs/light/Makefile b/tools/libs/light/Makefile index 13545654c2..1d5716dbba 100644 --- a/tools/libs/light/Makefile +++ b/tools/libs/light/Makefile @@ -252,6 +252,5 @@ clean:: $(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 7eaf50e91e..ee5c42bf7b 100644 --- a/tools/libs/stat/Makefile +++ b/tools/libs/stat/Makefile @@ -134,4 +134,4 @@ uninstall:: uninstall-perl-bindings endif clean:: - $(RM) libxenstat.map $(BINDINGS) $(BINDINGSRC) + $(RM) $(BINDINGS) $(BINDINGSRC) diff --git a/tools/libs/store/Makefile b/tools/libs/store/Makefile index 2334c953bb..300c271eb0 100644 --- a/tools/libs/store/Makefile +++ b/tools/libs/store/Makefile @@ -3,6 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 4 MINOR = 0 +version-script := libxenstore.map ifeq ($(CONFIG_Linux),y) LDLIBS += -ldl diff --git a/tools/libs/toolcore/Makefile b/tools/libs/toolcore/Makefile index 0d92b68b3b..20671dadd0 100644 --- a/tools/libs/toolcore/Makefile +++ b/tools/libs/toolcore/Makefile @@ -3,6 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 0 +version-script := libxentoolcore.map LIBHEADER := xentoolcore.h diff --git a/tools/libs/toollog/Makefile b/tools/libs/toollog/Makefile index 2361b8cbf1..d612227c85 100644 --- a/tools/libs/toollog/Makefile +++ b/tools/libs/toollog/Makefile @@ -3,6 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 0 +version-script := libxentoollog.map include Makefile.common diff --git a/tools/libs/util/Makefile b/tools/libs/util/Makefile index 493d2e00be..e016baf888 100644 --- a/tools/libs/util/Makefile +++ b/tools/libs/util/Makefile @@ -47,6 +47,3 @@ $(OBJS-y) $(PIC_OBJS): $(AUTOINCS) %.c %.h:: %.l @rm -f $*.[ch] $(FLEX) --header-file=$*.h --outfile=$*.c $< - -clean:: - $(RM) libxenutil.map diff --git a/tools/libs/vchan/Makefile b/tools/libs/vchan/Makefile index ac2bff66f5..a1ef60ac8e 100644 --- a/tools/libs/vchan/Makefile +++ b/tools/libs/vchan/Makefile @@ -11,6 +11,3 @@ OBJS-y += io.o NO_HEADERS_CHK := y include $(XEN_ROOT)/tools/libs/libs.mk - -clean:: - rm -f libxenvchan.map diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk index 3eb91fc8f3..cab8e9704a 100644 --- a/tools/libs/libs.mk +++ b/tools/libs/libs.mk @@ -4,6 +4,8 @@ # PKG_CONFIG: name of pkg-config file (xen$(LIBNAME).pc if empty) # MAJOR: major version of lib (Xen version if empty) # MINOR: minor version of lib (0 if empty) +# version-script: Specify the name of a version script to the linker. +# (If empty, a temporary one for unstable library is created) LIBNAME := $(notdir $(CURDIR)) @@ -12,6 +14,10 @@ MAJOR := $(shell $(XEN_ROOT)/version.sh $(XEN_ROOT)/xen/Makefile) endif MINOR ?= 0 +ifeq ($(origin version-script), undefined) +version-script := libxen$(LIBNAME).map.tmp +endif + CFLAGS += -Wmissing-prototypes CFLAGS += $(CFLAGS_xeninclude) CFLAGS += $(foreach lib, $(USELIBS_$(LIBNAME)), $(CFLAGS_libxen$(lib))) @@ -53,7 +59,7 @@ $(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_INCLUDE) $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR) .PHONY: all -all: $(TARGETS) $(PKG_CONFIG_LOCAL) libxen$(LIBNAME).map $(LIBHEADERS) +all: $(TARGETS) $(PKG_CONFIG_LOCAL) $(LIBHEADERS) ifneq ($(NO_HEADERS_CHK),y) all: headers.chk @@ -71,8 +77,9 @@ headers.lst: FORCE @{ set -e; $(foreach h,$(LIBHEADERS),echo $(h);) } > $@.tmp @$(call move-if-changed,$@.tmp,$@) -libxen$(LIBNAME).map: - echo 'VERS_$(MAJOR).$(MINOR) { global: *; };' >$@ +libxen$(LIBNAME).map.tmp: FORCE + echo 'VERS_$(MAJOR).$(MINOR) { global: *; };' >.$@.tmp + $(call move-if-changed,.$@.tmp,$@) lib$(LIB_FILE_NAME).a: $(OBJS-y) $(AR) rc $@ $^ @@ -82,8 +89,8 @@ lib$(LIB_FILE_NAME).so: lib$(LIB_FILE_NAME).so.$(MAJOR) 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) -Wl,--version-script=libxen$(LIBNAME).map $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS) $(APPEND_LDFLAGS) +lib$(LIB_FILE_NAME).so.$(MAJOR).$(MINOR): $(PIC_OBJS) $(version-script) + $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,lib$(LIB_FILE_NAME).so.$(MAJOR) -Wl,--version-script=$(version-script) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS) $(APPEND_LDFLAGS) # If abi-dumper is available, write out the ABI analysis ifneq ($(ABI_DUMPER),) @@ -122,7 +129,7 @@ TAGS: clean:: rm -rf $(TARGETS) *~ $(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 headers.chk headers.lst libxen*.map.tmp .PHONY: distclean distclean: clean diff --git a/.gitignore b/.gitignore index e3fe06cd13..1e415fbb99 100644 --- a/.gitignore +++ b/.gitignore @@ -106,8 +106,6 @@ tools/config.cache config/Tools.mk config/Stubdom.mk config/Docs.mk -tools/libs/ctrl/libxenctrl.map -tools/libs/guest/libxenguest.map tools/libs/guest/xc_bitops.h tools/libs/guest/xc_core.h tools/libs/guest/xc_core_arm.h @@ -117,7 +115,6 @@ tools/libs/light/_*.[ch] tools/libs/light/*.pyc tools/libs/light/_libxl.api-for-check tools/libs/light/*.api-ok -tools/libs/light/libxenlight.map tools/libs/light/libxl-save-helper tools/libs/light/dsdt* tools/libs/light/mk_dsdt @@ -127,13 +124,10 @@ tools/libs/light/testidl.c tools/libs/light/test_timedereg tools/libs/light/test_fdderegrace tools/libs/light/tmp.* -tools/libs/stat/libxenstat.map tools/libs/store/list.h tools/libs/store/utils.h tools/libs/store/xs_lib.c tools/libs/util/libxlu_cfg_y.output -tools/libs/util/libxenutil.map -tools/libs/vchan/libxenvchan.map 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 From patchwork Thu Aug 11 16:48:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941632 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 D832EC25B0D for ; Thu, 11 Aug 2022 16:59:42 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384879.620405 (Exim 4.92) (envelope-from ) id 1oMBWt-0004D1-RZ; Thu, 11 Aug 2022 16:59:31 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384879.620405; Thu, 11 Aug 2022 16:59:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBWt-0004CM-Ll; Thu, 11 Aug 2022 16:59:31 +0000 Received: by outflank-mailman (input) for mailman id 384879; Thu, 11 Aug 2022 16:59:30 +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 1oMBNT-0003s9-KL for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:47 +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 9b1c3dc9-1995-11ed-924f-1f966e50362f; Thu, 11 Aug 2022 18:49:46 +0200 (CEST) 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: 9b1c3dc9-1995-11ed-924f-1f966e50362f DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236586; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6Ciqslkc0BK3uoE16/zRFo3axUefMUHAjqrqHVfnJXw=; b=HZE0GY9IgBY0obIiMrzoRTY4IW1bsobJp1Vh8/9/Re7OYm3mosghL/tP xawcKH+ro7owbsEMlEgFhuZ0EV8Mu6d6anbuoivO7krQoUv4pl76pewov ehAA/+W3CM/OxqEDNYnn9zFjx+Nxkr/nt2jRMcz1QfLRRGqrLLkJVFJEF g=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77893971 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:OP2KqaL5HoA/ObokFE+RjJUlxSXFcZb7ZxGr2PjKsXjdYENSgzUGy mAXWm3Ua6rfMWHzfot+OYuw8EkH6J+Gm4c3QQdlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3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bUQKTRekIh+bfKn/baknDH4ZmpN 5dmsNFaeEYY2IUsS+D2njbL+od X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="77893971" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu Subject: [XEN PATCH v4 27/32] tools/include: Rework Makefile Date: Thu, 11 Aug 2022 17:48:40 +0100 Message-ID: <20220811164845.38083-28-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 Rework "xen-xsm" rules to not have to change directory to run mkflask.sh, and store mkflask.sh path in a var, and use a full path for FLASK_H_DEPEND, and output directory is made relative. Rename "all-y" target to a more descriptive "xen/lib/x86/all". Removed the "dist" target which was the only one existing in tools/. Signed-off-by: Anthony PERARD --- Notes: v4: - new patch tools/include/Makefile | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/tools/include/Makefile b/tools/include/Makefile index b488f7ca9f..81c3d09039 100644 --- a/tools/include/Makefile +++ b/tools/include/Makefile @@ -7,17 +7,20 @@ include $(XEN_ROOT)/tools/Rules.mk # taken into account, i.e. there should be no rules added here for generating # any tools/include/*.h files. -# Relative to $(XEN_ROOT)/xen/xsm/flask -FLASK_H_DEPEND := policy/initial_sids +.PHONY: all +all: xen-foreign xen-dir xen-xsm/.dir +ifeq ($(CONFIG_X86),y) +all: xen/lib/x86/all +endif -.PHONY: all all-y build xen-dir -all build: all-y xen-foreign xen-dir xen-xsm/.dir -all-y: +.PHONY: build +build: all .PHONY: xen-foreign xen-foreign: $(MAKE) -C xen-foreign +.PHONY: xen-dir xen-dir: mkdir -p xen/libelf acpi find xen/ acpi/ -type l -exec rm '{}' + @@ -36,16 +39,18 @@ ifeq ($(CONFIG_X86),y) ln -s $(XEN_ROOT)/xen/include/xen/lib/x86/Makefile xen/lib/x86/ endif -all-$(CONFIG_X86): xen-dir +.PHONY: xen/lib/x86/all +xen/lib/x86/all: xen-dir $(MAKE) -C xen/lib/x86 all XEN_ROOT=$(XEN_ROOT) PYTHON=$(PYTHON) +MKFLASK := $(XEN_ROOT)/xen/xsm/flask/policy/mkflask.sh +FLASK_H_DEPEND := $(XEN_ROOT)/xen/xsm/flask/policy/initial_sids + # Not xen/xsm as that clashes with link to # $(XEN_ROOT)/xen/include/public/xsm above. -xen-xsm/.dir: $(XEN_ROOT)/xen/xsm/flask/policy/mkflask.sh \ - $(patsubst %,$(XEN_ROOT)/xen/xsm/flask/%,$(FLASK_H_DEPEND)) +xen-xsm/.dir: $(MKFLASK) $(FLASK_H_DEPEND) mkdir -p xen-xsm/flask - cd $(XEN_ROOT)/xen/xsm/flask/ && \ - $(SHELL) policy/mkflask.sh $(AWK) $(CURDIR)/xen-xsm/flask $(FLASK_H_DEPEND) + $(SHELL) $(MKFLASK) $(AWK) xen-xsm/flask $(FLASK_H_DEPEND) touch $@ .PHONY: install @@ -84,8 +89,5 @@ clean: $(MAKE) -C xen-foreign clean rm -f _*.h -.PHONY: dist -dist: install - .PHONY: distclean distclean: clean From patchwork Thu Aug 11 16:48:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941636 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 959B2C3F6B0 for ; Thu, 11 Aug 2022 16:59:45 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384890.620448 (Exim 4.92) (envelope-from ) id 1oMBX0-0005S9-Et; Thu, 11 Aug 2022 16:59:38 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384890.620448; Thu, 11 Aug 2022 16:59:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBX0-0005Qu-7G; Thu, 11 Aug 2022 16:59:38 +0000 Received: by outflank-mailman (input) for mailman id 384890; Thu, 11 Aug 2022 16:59:36 +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 1oMBNX-0003s9-95 for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:51 +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 9caa0ff6-1995-11ed-924f-1f966e50362f; Thu, 11 Aug 2022 18:49:50 +0200 (CEST) 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: 9caa0ff6-1995-11ed-924f-1f966e50362f DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236590; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=V8jWdBRJCxUnfV5R+IMYSD99LmO4hxLhQr7j9mADfWE=; b=dMOWP4pSaG4B/RxBrK2Ww7KNKeFJdTjefQN0JfwKM9MgfegHtgvYyl4E MVsoePZWUIgyy4f3WB1FMlAHbaNFLojejCJbeOVD+J0NQaHqQiThLDfkW luCeNYVRL7CQdDA4FoXoGZFua7TgZqvmZirgHBBHyvfWPN+zuexSHKpHi 0=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 80449106 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-I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px3PSN7xlsP7f8FmMm zudXuPToyhivCTFSnG/2eYuwZoidBDX2bieRxRrS9O+ IronPort-HdrOrdr: A9a23:PZcDj668RgP5j6KAoAPXwM7XdLJyesId70hD6qhwISY7TiX+rb HIoB17726MtN9/YhAdcLy7VZVoBEmsl6KdgrNhWYtKPjOHhILAFugLhuHfKn/bakjDH4ZmpM FdmsNFZuEYY2IXsS+D2njaL+od X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="80449106" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu , "Juergen Gross" Subject: [XEN PATCH v4 28/32] libs/light: Rework acpi table build targets Date: Thu, 11 Aug 2022 17:48:41 +0100 Message-ID: <20220811164845.38083-29-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 Currently, a rebuild of libxl will always rebuild for example "build.o". This is because the target depends on "acpi" which never exist. So instead we will have "build.o" have as prerequisites targets that are actually generated by "acpi", that is $(DSDT_FILES-y). While "dsdt_*.c" isn't really a dependency for "build.o", a side effect of building that dsdt_*.c is to also generate the "ssdt_*.h" that "build.o" needs, but I don't want to list all the headers needed by "build.o" and duplicate the information available in "libacpi/Makefile" at this time. Also avoid duplicating the "acpi" target for Arm, and unique one for both architecture. And move the "acpi" target to be with other targets rather than in the middle of the source listing. For the same reason, move the prerequisites listing for both $(DSDT_FILES-y) and "build.o". Signed-off-by: Anthony PERARD --- Notes: v4: - new patch tools/libs/light/Makefile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/tools/libs/light/Makefile b/tools/libs/light/Makefile index 1d5716dbba..4a8b0f7bcf 100644 --- a/tools/libs/light/Makefile +++ b/tools/libs/light/Makefile @@ -32,14 +32,10 @@ ACPI_PATH = $(XEN_ROOT)/tools/libacpi DSDT_FILES-$(CONFIG_X86) = dsdt_pvh.c ACPI_OBJS = $(patsubst %.c,%.o,$(DSDT_FILES-y)) build.o static_tables.o ACPI_PIC_OBJS = $(patsubst %.o,%.opic,$(ACPI_OBJS)) -$(DSDT_FILES-y) build.o build.opic: acpi + vpath build.c $(ACPI_PATH)/ vpath static_tables.c $(ACPI_PATH)/ -.PHONY: acpi -acpi: - $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) DSDT_FILES="$(DSDT_FILES-y)" - OBJS-$(CONFIG_X86) += $(ACPI_OBJS) CFLAGS += -Wno-format-zero-length -Wmissing-declarations \ @@ -58,8 +54,6 @@ ifeq ($(CONFIG_ARM_64),y) DSDT_FILES-y = dsdt_anycpu_arm.c 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 OBJS-$(CONFIG_ARM) += libxl_arm_no_acpi.o endif @@ -191,6 +185,12 @@ all: $(CLIENTS) $(TEST_PROGS) $(AUTOSRCS) $(AUTOINCS) $(OBJS-y) $(PIC_OBJS) $(SAVE_HELPER_OBJS) $(LIBXL_TEST_OBJS) $(TEST_PROG_OBJS): $(AUTOINCS) libxl.api-ok +$(DSDT_FILES-y): acpi + +# Depends on the source files generated by the "acpi" target even if "build.o" +# don't needs them but do need the headers that are also generated by "acpi". +build.o build.opic: $(DSDT_FILES-y) + libxl.api-ok: check-libxl-api-rules _libxl.api-for-check $(PERL) $^ touch $@ @@ -227,6 +227,10 @@ _libxl_type%.h _libxl_type%_json.h _libxl_type%_private.h _libxl_type%.c: libxl_ $(XEN_INCLUDE)/_%.h: _%.h $(call move-if-changed,_$*.h,$(XEN_INCLUDE)/_$*.h) +.PHONY: acpi +acpi: + $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) DSDT_FILES="$(DSDT_FILES-y)" + libxenlight_test.so: $(PIC_OBJS) $(LIBXL_TEST_OBJS) $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenlight.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(LDLIBS) $(APPEND_LDFLAGS) From patchwork Thu Aug 11 16:48:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941645 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 2567BC19F2A for ; Thu, 11 Aug 2022 17:00:07 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384948.620543 (Exim 4.92) (envelope-from ) id 1oMBXK-0001OC-Nd; Thu, 11 Aug 2022 16:59:58 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384948.620543; Thu, 11 Aug 2022 16:59: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 1oMBXK-0001Mx-5o; Thu, 11 Aug 2022 16:59:58 +0000 Received: by outflank-mailman (input) for mailman id 384948; Thu, 11 Aug 2022 16:59: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 1oMBNY-0003s9-9v for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:52 +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 9e0c3d0a-1995-11ed-924f-1f966e50362f; Thu, 11 Aug 2022 18:49:51 +0200 (CEST) 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: 9e0c3d0a-1995-11ed-924f-1f966e50362f DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236591; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cMqBsfjjVcDOSywKpK4KZmm9RxQrPRiX94KjnGLwZeE=; b=esTkBMLnON8KtvMQ3/n6wFy9M4/npNXoli3R94UK5sINyCSX9+kESmXw S82pSQwVOHtrYXE5Lu2XpCN12NZ0I3dMip4mzKBl2y5vk9t6O8B6Pxktw F8TRFewuXEBqkSl1js95wHkzcZPXeOmdfjOAODYAfV/EVjQTgH5y+q/AW o=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 80449107 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:kjmebK+uz0G2F9aJnS2zDrUD7H6TJUtcMsCJ2f8bNWPcYEJGY0x3y WVOXGmHMqmNM2ukctAnOd++ph4EvJCDn9ZqQAA4pSk8E34SpcT7XtnIdU2Y0wF+jyHgoOCLy +1EN7Es+ehtFie0Si+Fa+Sn9z8kvU2xbuKUIPbePSxsThNTRi4kiBZy88Y0mYctitWia++3k YqaT/b3ZRn0gFaYDkpOs/jZ8EM25ayo0N8llgdWic5j7Qe2e0Y9VPrzFYnpR1PkT49dGPKNR uqr5NlVKUuAon/Bovv8+lrKWhViroz6ZGBiuVIPM0SWuTBQpzRa70oOHKF0hXG7Kdm+t4sZJ N1l7fRcQOqyV0HGsLx1vxJwS0mSMUDakVNuzLfWXcG7liX7n3XQL/pGM0BtPpVB3cFLUV5Ur 90yGitTSgnZvrfjqF67YrEEasULKcDqOMUUu216zCGfBvEjKXzBa/yUv5kChm52350QW6aFD yYaQWMHgBDoahtTOlARGdQmkf2hnHXXeDxEslOF46Ew5gA/ySQhiOSxYYONJbRmQ+1Ou22At lnJz1jJPVIAHdCwljmD21+V07qncSTTB9tJSezQGuRRqF+c3GsIEzUNSEC25/K+jyaWRNZ3O 0ESvC00osAa5EGtC9XwQRC8iHqFpQIHHcpdFfUg7wOAwbaS5ByWblXoVRYYNoZg7pVvA2V3i BnZxLsFGACDrpWqSCme7u6zig/iBjJPDEUwfnEgVFE8toyLTJ4Isv7fcjpyOPfr0IWtSG6pm m7iQDsW3OtK05NSv0mv1RWe2m/3+MCUJuIgzl+PNl9J+D+Vc2JMi2aAzVHApchNI4+CJrVql ChVwpPOhAzi4HzkqcBsfAnuNOvwjxp9GGeA6WOD5rF4n9hXx1atfJpL/BZ1L1pzP8APdFfBO RGN4VsOvMYCbCbwN8ebhr5d7Ox0pZUM6Py/DqyEBjawSsEZmPC7ENFGOhfLgjGFfLkEmqAjI 5aLGfuR4YIhIf0+lFKeGrZCuYLHMwhkmgs/s7inkEn8uVdfDVbJIYo43KymMrllsP/Z+1WJq r6y9aKikn1ibQE3WQGPmaZ7ELzABSFT6UzewyCPStO+Hw== IronPort-HdrOrdr: A9a23:uu/C96y800x41J2pz9j0KrPwKr1zdoMgy1knxilNoRw8SKOlfq eV7ZMmPH7P+U8ssR4b+OxoVJPsfZqYz+8W3WBzB8bHYOCFgguVxehZhOOIqQEIWReOk9K1vZ 0QFZSWY+efMbEVt6rHCXGDYrUd/OU= X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="80449107" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu , "Juergen Gross" Subject: [XEN PATCH v4 29/32] libs/light: Rework generation of include/_libxl_*.h Date: Thu, 11 Aug 2022 17:48:42 +0100 Message-ID: <20220811164845.38083-30-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 Instead of moving the public "_libxl_*.h" headers, we make a copy to the destination so that make doesn't try to remake the targets "_libxl_*.h" in libs/light/ again. A new .PRECIOUS target is added to tell make to not deletes the intermediate targets generated by "gentypes.py". Signed-off-by: Anthony PERARD --- Notes: v4: - new patch tools/libs/light/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/libs/light/Makefile b/tools/libs/light/Makefile index 4a8b0f7bcf..9329055c98 100644 --- a/tools/libs/light/Makefile +++ b/tools/libs/light/Makefile @@ -215,6 +215,8 @@ libxl_internal_json.h: _libxl_types_internal_json.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 +# This exploits the 'multi-target pattern rule' trick. +# gentypes.py should be executed only once to make all the targets. _libxl_type%.h _libxl_type%_json.h _libxl_type%_private.h _libxl_type%.c: libxl_type%.idl gentypes.py idl.py $(eval stem = $(notdir $*)) $(PYTHON) gentypes.py libxl_type$(stem).idl __libxl_type$(stem).h __libxl_type$(stem)_private.h \ @@ -224,8 +226,10 @@ _libxl_type%.h _libxl_type%_json.h _libxl_type%_private.h _libxl_type%.c: libxl_ $(call move-if-changed,__libxl_type$(stem)_json.h,_libxl_type$(stem)_json.h) $(call move-if-changed,__libxl_type$(stem).c,_libxl_type$(stem).c) -$(XEN_INCLUDE)/_%.h: _%.h - $(call move-if-changed,_$*.h,$(XEN_INCLUDE)/_$*.h) +.PRECIOUS: _libxl_type%.h _libxl_type%.c + +$(XEN_INCLUDE)/_libxl_%.h: _libxl_%.h + cp -f $< $@ .PHONY: acpi acpi: From patchwork Thu Aug 11 16:48:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941634 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 1C9B3C25B0C for ; Thu, 11 Aug 2022 16:59:43 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384880.620410 (Exim 4.92) (envelope-from ) id 1oMBWu-0004Hv-20; Thu, 11 Aug 2022 16:59:32 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384880.620410; Thu, 11 Aug 2022 16:59:32 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBWt-0004H4-Tn; Thu, 11 Aug 2022 16:59:31 +0000 Received: by outflank-mailman (input) for mailman id 384880; Thu, 11 Aug 2022 16:59:30 +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 1oMBNd-0003Aq-9y for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:57 +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 9e4059c7-1995-11ed-bd2e-47488cf2e6aa; Thu, 11 Aug 2022 18:49:52 +0200 (CEST) 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: 9e4059c7-1995-11ed-bd2e-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236592; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CGFwXlrWynx6TK1V9fLINkj8ydS6NN68SzpiLukviOo=; b=Bbcn02x9t6ELcMfDYy/1g51p4uiVIBNSpL61EQ27vLlbj2WSyh93IuKM OtcWp1TQ/MiJqTSvS9/oYfiUNjtQcUqj54/FK68Yr0y4Pczfe1sJVdH+1 wxDQu5UdS9jOJX+QWsvfmX20inmGlCHN2Paid7q0G0ujaj1QcaqVIai5P 4=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77898119 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:YZv2BKI7U4ZZJOR0FE//H55y6k4xRxNeGxP+qgilJ80cmdWY4AxU5fiJA7t6h/JklmHkQqc++bkUhDt+1aKTYknsPwqF0fTr+p2GHfAGGAa+5RFE2PFMpiHviMVW1pg09echHfxEm4CRUTqZzBJ/FnhQRbdfsR08ONa+vl/4QdmsU3m8Bu7zUrmmKM/3EY4gLoMCBTT+AMlxqHaXYMsuATrh2jPN5IqhX/ykw8/siy6gl63hjmE8TBKIpsN+5TmQo+WuW4R/0eoEpWBo+wuRRmtFXXJ6n0zzC+ISzr/wT9FrDAkSzjDtOl2yi6QmZNNULEqcaPhPwqidLKtNZlItLzlAynFoGQI4wcxpgqnNH3+GTiRzeRNkORLoqXnDleZkozoVkcq6OEGjJ4DpdSHTEPaOBFC1iAFYKrFu5OcGOdIHY1lDAyHUHTZWKIoJimp88cKTBxvxPPrYHFU5kxex7GMzIymPlrl/MdaJXGSlQsnytm3O41AuDsERw+k7Mh/x/+Grg2iYISO6zNbc5IfLS69a1zCR1nSkOsUXXAtF2/oQXL9kGNL1QZ+RLm3chRFQS+Kf1FjEwc1YzQOHcOxPd1IF58tAI8ABvFZpjppwuWdvnsq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jzp4KfHKUBs5zJQhQ6/tZfFAZ87NCKZAR8EfDnBv620lNi84orif9SqzxSZARLHUvh9IwlA7PL94HvjQWPV+wvlFREKWCicE0G1a56y23m7w6q+QGvGu723Yq+R93GMCvgZ1JatcOVu/QO6tI3rtp4tr2AIbei35It8eTw25hkMqt6klJuPjtH3eD5o5xjWEwJhSuGT9DMzHN8CaC36RwJENXcTwVyiPT6PJL+50Td/Cs+4oC7TDTZGibfkMyu52wqeD/e9gFV1XkmSyL7BrrCEb/+JL9MoCzrxI0/H0wXUfeLkIhRfvH2/c/Auwjetx2DTagZ1CbcoFrQON/crnxw379TMEK1p3uiHqXz9MoN+DxNui/iX105cPDqLOFdxOSMYJBkYs5/NlEiM99sUmkprHOYR+H3zt+Iui2u1wwFr5pTthDuWFQjeguhpFQCW+oi3rk5GG+GLVFOkQvU2NlLmXoB9aTAD57K3ixJjMgWCnL5w61KXZXTF+xIfyhazqasqcUuQuQ6T7IaWNsbAjFExnsFHdLwsLl50WNOsLAhISbmZ/EvrkC9JNKMX7mzwzimxE6X9FZFmmjlRwBLcte4MpElPSeZPZFnHwx48188BkWfNFOb8ffzlF5l+5pDPdGm1AfuwX2kMFg1sm89GKWgAcX9JEV93nujf/VyFnjua9Z9Z5zeOr4vPAONj2gbTcLnBWgQHeoo6wUqvUSIJA18DfJnJFtaiQi6Lrcd6p6uy88Gp/W4RnWdtnwUJeWkPHOWAZj3+7zgbPdTRlN2+s9yj5knaHYsEkdkoN2KLZSjkU52krNDLTFpvALx62ofuCUudifTCBoN6Vn3oUTq5lvSlotQLdT3SkVZyzPDVoeTt7mlMXhk6+UkZMfFwBBDen763VjY9NPvLJ0BRSD74X41ONOZJttjeF/jE9FhM8fFRbotO/s0WZ1FQpB7x8yIexsddGTrm+I1IWV6 X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="77898119" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu , "Juergen Gross" Subject: [XEN PATCH v4 30/32] libs/light: Rework targets prerequisites Date: Thu, 11 Aug 2022 17:48:43 +0100 Message-ID: <20220811164845.38083-31-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 No need for $(AUTOSRCS), GNU make can generate them as needed when trying to build them as needed when trying to build the object. Also, those two AUTOSRCS don't need to be a prerequisite of "all". As for the "clean" target, those two files are already removed via "_*.c". We don't need $(AUTOINCS) either: - As for both _libxl_savm_msgs*.h headers, we are adding more selective dependencies so the headers will still be generated as needed. - "clean" rule already delete the _*.h files, so AUTOINCS aren't needed there. "libxl_internal_json.h" doesn't seems to have ever existed, so the dependency is removed. Add few prerequisite for "libxl_internal.h" so all headers that it depends on should be generated. And have $(SAVE_HELPER_OBJS) depends on "libxl_internal.h". Rework objects prerequisites, to have them dependents on either "libxl.h" or "libxl_internal.h". "libxl.h" is not normally included directly in the source code as "libxl_internal.h" is used instead. But we are adding "libxl.h" as prerequisite of "libxl_internal.h", so generated headers will still be generated as needed. "testidl.c" doesn't depends on "libxl.h" but "testidl.o" does. Also use automatic variables $< and $@. Signed-off-by: Anthony PERARD --- Notes: v4: - new patch tools/libs/light/Makefile | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/tools/libs/light/Makefile b/tools/libs/light/Makefile index 9329055c98..274e8350bb 100644 --- a/tools/libs/light/Makefile +++ b/tools/libs/light/Makefile @@ -147,9 +147,6 @@ LIBXL_TEST_OBJS += $(foreach t, $(LIBXL_TESTS_INSIDE),libxl_test_$t.opic) TEST_PROG_OBJS += $(foreach t, $(LIBXL_TESTS_PROGS),test_$t.o) test_common.o TEST_PROGS += $(foreach t, $(LIBXL_TESTS_PROGS),test_$t) -AUTOINCS = _libxl_save_msgs_callout.h _libxl_save_msgs_helper.h -AUTOSRCS = _libxl_save_msgs_callout.c _libxl_save_msgs_helper.c - CLIENTS = testidl libxl-save-helper SAVE_HELPER_OBJS = libxl_save_helper.o _libxl_save_msgs_helper.o @@ -177,13 +174,13 @@ libxl_x86_acpi.o libxl_x86_acpi.opic: CFLAGS += -I$(XEN_ROOT)/tools $(SAVE_HELPER_OBJS): CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenevtchn) $(CFLAGS_libxenguest) testidl.o: CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenlight) -testidl.c: libxl_types.idl gentest.py $(XEN_INCLUDE)/libxl.h $(AUTOINCS) - $(PYTHON) gentest.py libxl_types.idl testidl.c.new - mv testidl.c.new testidl.c +testidl.c: libxl_types.idl gentest.py + $(PYTHON) gentest.py $< $@.new + mv -f $@.new $@ -all: $(CLIENTS) $(TEST_PROGS) $(AUTOSRCS) $(AUTOINCS) +all: $(CLIENTS) $(TEST_PROGS) -$(OBJS-y) $(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): libxl.api-ok $(DSDT_FILES-y): acpi @@ -195,7 +192,7 @@ libxl.api-ok: check-libxl-api-rules _libxl.api-for-check $(PERL) $^ touch $@ -_libxl.api-for-check: $(XEN_INCLUDE)/libxl.h $(AUTOINCS) +_libxl.api-for-check: $(XEN_INCLUDE)/libxl.h $(CC) $(CPPFLAGS) $(CFLAGS) -c -E $< $(APPEND_CFLAGS) \ -DLIBXL_EXTERNAL_CALLERS_ONLY=LIBXL_EXTERNAL_CALLERS_ONLY \ >$@.new @@ -207,13 +204,22 @@ _libxl_save_msgs_helper.h _libxl_save_msgs_callout.h: \ $(PERL) -w $< $@ >$@.new $(call move-if-changed,$@.new,$@) +# +# headers dependencies on generated headers +# $(XEN_INCLUDE)/libxl.h: $(XEN_INCLUDE)/_libxl_types.h $(XEN_INCLUDE)/libxl_json.h: $(XEN_INCLUDE)/_libxl_types_json.h +libxl_internal.h: $(XEN_INCLUDE)/libxl.h $(XEN_INCLUDE)/libxl_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 +libxl_internal.h: _libxl_save_msgs_callout.h -$(OBJS-y) $(PIC_OBJS) $(LIBXL_TEST_OBJS) $(TEST_PROG_OBJS) $(SAVE_HELPER_OBJS): $(XEN_INCLUDE)/libxl.h +# +# objects dependencies on headers that depends on generated headers +# +$(TEST_PROG_OBJS): $(XEN_INCLUDE)/libxl.h $(OBJS-y) $(PIC_OBJS) $(LIBXL_TEST_OBJS): libxl_internal.h +$(SAVE_HELPER_OBJS): $(XEN_INCLUDE)/libxl.h _libxl_save_msgs_helper.h +testidl.o: $(XEN_INCLUDE)/libxl.h # This exploits the 'multi-target pattern rule' trick. # gentypes.py should be executed only once to make all the targets. @@ -260,5 +266,4 @@ clean:: $(RM) testidl.c.new testidl.c *.api-ok $(RM) $(TEST_PROGS) libxenlight_test.so libxl_test_*.opic $(RM) -r __pycache__ - $(RM) $(AUTOSRCS) $(AUTOINCS) $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) clean From patchwork Thu Aug 11 16:48:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941639 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 369E5C25B0C for ; Thu, 11 Aug 2022 16:59:50 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384902.620476 (Exim 4.92) (envelope-from ) id 1oMBX5-0006Q5-7O; Thu, 11 Aug 2022 16:59:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384902.620476; Thu, 11 Aug 2022 16:59: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 1oMBX5-0006Pc-3O; Thu, 11 Aug 2022 16:59:43 +0000 Received: by outflank-mailman (input) for mailman id 384902; Thu, 11 Aug 2022 16:59:41 +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 1oMBNZ-0003s9-9W for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:53 +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 9e78b31c-1995-11ed-924f-1f966e50362f; Thu, 11 Aug 2022 18:49:52 +0200 (CEST) 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: 9e78b31c-1995-11ed-924f-1f966e50362f DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236592; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Nc4WbeeXR+sXTmS5lu4Ec75pp9DLw9YmC4v+YNyuXWw=; b=FrrnwbbPuRPhqwCM1rL3FadEM/TQXnIur8nzup7OyVtVkxX12Pl6GbYt AxBUKFoyK5AxmT5nexs/j2RmPe9tf2P97VtMIyh6H1gRaMkVPjDIjYcQr 5gapQ32j9SqGeaFVS3SymVZG8kCXG99HMP6Adv1gzsaxMVgi2+H3RBJ7B o=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77893975 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:1DEgOawSvJjofWBdcQ16t+dbxirEfRIJ4+MujC+fZmUNrF6WrkUCz DceDW/VOquKZGv8et91aY3k9RtUuZLdyNQxHlFo/CAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnj/0bv676yEUOZigHtLUEPTDNj16WThqQSIgjQMLs+Mii8tjjMPR7zml4 LsemOWCfg7+s9JIGjhMsfjb+Eo25K6aVA4w5TTSW9ga5DcyqFFNZH4vDfnZB2f1RIBSAtm7S 47rpF1u1jqEl/uFIorNfofTKiXmcJaLVeS9oiM+t5yZqgpDvkQPPpMTb5LwX6v1ZwKhxLidw P0V3XC5pJxA0qfkwIzxWDEAe81y0DEvFBYq7hFTvOTKp3AqfUcAzN1OPQYkJp8n3Np9DF9o3 KccOT8mVA660rfeLLKTEoGAh+wmJcjveogepmth3XfSCvNOrZLrGvuQo4UChXFp254ITa22i 8kxMFKDaDzJZQFPPVEGToozhu6yilH0ciFCqULTrq0yi4TW5FMugOm2YYWIEjCMbdRkrnqxj 07KxG7wQQ9AEeyZmDiEzn3504cjmgukAdlPRdVU7MVCglKJwXcIIAYLTlb9qv684mahX/pPJ kpS/TAhxYAi+UruQtTjUhmQpH+fogVaS9dWC/c96gyG1uzT+QnxO4QfZmcfMpp87pZwHGF0k A/S9z/0OdBxmJ2kDmCG5IiykTm/Bw48dmsTagQ+UzJQtrEPv7oPYgLzosdLSfDr1oWkRmipn VhmvwBl2exN0JdjO7GTuAme3mny/sWhohsdvF2/Y46z0u9uiGdJjaSM4EOT0/tPJZ3xorKp7 CldwJj2AAzj4PiweM2xrAYlRujBCw6tamG0vLKWN8BJG86R03CiZ5tMxzp1OV1kNM0JERewP hGL4VwJvc4DYSHwBUOSX25WI5pC8EQdPY69CqC8giRmO/CdizNrDAkxPBXNjggBYWAnkL0lO IfzTPtA+U0yUP0/pBLrFrh17FPe7nphrY8lbcykkk/PPHv3TCL9dIrpx3PSN7xlsP7f8FmMm zudXuPToyhivCTFSnG/2eYuwZoidBDX2bieRxRrS9O+ IronPort-HdrOrdr: A9a23:CF9MtaqR2nQ0qgGhWYxytlYaV5oteYIsimQD101hICG8cqSj+P xG+85rsiMc6QxhIU3I9urgBEDtex7hHNtOkOss1NSZLW3bUQmTTL2KhLGKq1aLJ8S9zJ856U 4JSdkZNDSaNzZHZKjBjDVQa+xQo+W6zA== X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="77893975" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu , "Juergen Gross" Subject: [XEN PATCH v4 31/32] libs/light: Makefile cleanup Date: Thu, 11 Aug 2022 17:48:44 +0100 Message-ID: <20220811164845.38083-32-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 Rework "libacpi.h" include in "libxl_x86_acpi.c" as to be more selective about the include path and only add "tools/libacpi/". Also "libxl_dom.c" don't use "libacpi.h" anymore. Use "-iquote" for libacpi headers. Get rid of the weird "$(eval stem =" in the middle of a recipe and use a make automatic variable "$(*F)" instead. Signed-off-by: Anthony PERARD --- Notes: v4: - new patch tools/libs/light/Makefile | 16 +++++++--------- tools/libs/light/libxl_x86_acpi.c | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/tools/libs/light/Makefile b/tools/libs/light/Makefile index 274e8350bb..250cc3bd2c 100644 --- a/tools/libs/light/Makefile +++ b/tools/libs/light/Makefile @@ -169,8 +169,7 @@ LDLIBS += $(LDLIBS-y) $(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 -libxl_x86_acpi.o libxl_x86_acpi.opic: CFLAGS += -I$(XEN_ROOT)/tools +libxl_x86_acpi.o libxl_x86_acpi.opic: CFLAGS += -iquote $(ACPI_PATH) $(SAVE_HELPER_OBJS): CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenevtchn) $(CFLAGS_libxenguest) testidl.o: CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenlight) @@ -224,13 +223,12 @@ testidl.o: $(XEN_INCLUDE)/libxl.h # This exploits the 'multi-target pattern rule' trick. # gentypes.py should be executed only once to make all the targets. _libxl_type%.h _libxl_type%_json.h _libxl_type%_private.h _libxl_type%.c: libxl_type%.idl gentypes.py idl.py - $(eval stem = $(notdir $*)) - $(PYTHON) gentypes.py libxl_type$(stem).idl __libxl_type$(stem).h __libxl_type$(stem)_private.h \ - __libxl_type$(stem)_json.h __libxl_type$(stem).c - $(call move-if-changed,__libxl_type$(stem).h,_libxl_type$(stem).h) - $(call move-if-changed,__libxl_type$(stem)_private.h,_libxl_type$(stem)_private.h) - $(call move-if-changed,__libxl_type$(stem)_json.h,_libxl_type$(stem)_json.h) - $(call move-if-changed,__libxl_type$(stem).c,_libxl_type$(stem).c) + $(PYTHON) gentypes.py libxl_type$(*F).idl __libxl_type$(*F).h __libxl_type$(*F)_private.h \ + __libxl_type$(*F)_json.h __libxl_type$(*F).c + $(call move-if-changed,__libxl_type$(*F).h,_libxl_type$(*F).h) + $(call move-if-changed,__libxl_type$(*F)_private.h,_libxl_type$(*F)_private.h) + $(call move-if-changed,__libxl_type$(*F)_json.h,_libxl_type$(*F)_json.h) + $(call move-if-changed,__libxl_type$(*F).c,_libxl_type$(*F).c) .PRECIOUS: _libxl_type%.h _libxl_type%.c diff --git a/tools/libs/light/libxl_x86_acpi.c b/tools/libs/light/libxl_x86_acpi.c index 57a6b63790..22eb160659 100644 --- a/tools/libs/light/libxl_x86_acpi.c +++ b/tools/libs/light/libxl_x86_acpi.c @@ -16,7 +16,7 @@ #include "libxl_arch.h" #include #include -#include "libacpi/libacpi.h" +#include "libacpi.h" /* Number of pages holding ACPI tables */ #define NUM_ACPI_PAGES 16 From patchwork Thu Aug 11 16:48:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12941638 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 1706EC19F2A for ; Thu, 11 Aug 2022 16:59:49 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.384894.620466 (Exim 4.92) (envelope-from ) id 1oMBX2-00060h-Sa; Thu, 11 Aug 2022 16:59:40 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 384894.620466; Thu, 11 Aug 2022 16:59:40 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMBX2-000609-NH; Thu, 11 Aug 2022 16:59:40 +0000 Received: by outflank-mailman (input) for mailman id 384894; Thu, 11 Aug 2022 16:59:40 +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 1oMBNd-0003s9-Dk for xen-devel@lists.xenproject.org; Thu, 11 Aug 2022 16:49:57 +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 a0562e7a-1995-11ed-924f-1f966e50362f; Thu, 11 Aug 2022 18:49:56 +0200 (CEST) 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: a0562e7a-1995-11ed-924f-1f966e50362f DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1660236596; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cmy94LPQCKJ2pSbsopGeQjlv0UX9Mnp6syCdYZy088g=; b=C5oCy9Q4vdPUWCLlpol1v1PWjLlYgSyYheG5oeEEY1Eo8Xj3TTmC1tTw Qk2tj63N0G5Nuq/JDuuylU1KG3SnB6yXCkyLhdj81NE5c3L5e6KkXM1pY rc+itpK8eCD1ZaxotN2ncCCJHDiYPNUso7ZWg5+JBAQniQRSfskoCwnMF o=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 77134720 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:CvI9rqLK7Tg4IyMGFE+RuZUlxSXFcZb7ZxGr2PjKsXjdYENS0DQBy mUdWWyPPP6OMTP8c49/Otm/9UJXv5fRztJgGgRlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokf0/0vraP65xZVF/fngbqLmD+LZMTxGSwZhSSMw4TpugOd8iYNz6TSDK1rlV eja/ouOYzdJ5xYuajhOs/La8Us11BjPkGhwUmIWNKgjUGD2zxH5PLpHTYmtIn3xRJVjH+LSb 44vG5ngows1Vz90Yj+Uuu6Tnn8iG9Y+DiDX4pZiYICwgwAqm8AH+v1T2Mzwy6tgo27hc9hZk L2hvHErIOsjFvWkdO81C3G0H8ziVEHvFXCuzXWX6KSuI0P6n3TE59FTUn8zJd0hoP9UOjxs7 +UHCSEmcUXW7w626OrTpuhEg80iKI/gPZ8Fu2EmxjbcZRokacmdGeOQv4YehWpuwJAVdRrdT 5NxhT5HZRLcYxpJKxEPBYg3huuAjXjjaTxI7lmSoMLb5kCMk1UqjOe3aLI5fPTNaJ9Iz3nDv l6WoVTTLQsKGuTD2CCspyfEaujnwnqgBdN6+KeD3uFuqE2ewCoUEhJ+fUG8uvOjjUm9XfpQL kUV/mwlqq1a3FymSJzxUgO1pFaAvwUAQJxAHusi8gaPx6HIpQGDCQA5oiVpMYJ88pVsHHpzi wHPz4iB6SFTXKO9bVagqImRtWOLYzE2FjIgfzYbbBou/Iy2yG0stS4jXuqPAYbs0IOtQWCvm mnUxMQtr+5N1JBWjs1X6XiC2mvx/caRE2bZ8y2NBgqYAhVFiJlJjmBCwXzS9r5+IYmQVTFtV 1BUypHFvIji4Xxg/RFhodnh/5nzvp5pyBWG3TZS82AJrlxBAUKLc4FK+y1ZL0x0KMsCcjKBS BaN51sJu8cKbSv3N/Ufj2eN5yMCk8Dd+SnNDKiIPrKinLAoHON4wM2eTRHJhD28+KTduao+J Y2aYa6RMJruMow+lWLeb7pMjtcWKtUWnzy7qWbTk0v6itJzpRe9Fd84Dbd5RrxgsP/Y/V6Fr 4832gnj40w3bdASqxL/qeY7RW3m51BhbXwqg6S7rtK+Hzc= IronPort-HdrOrdr: A9a23:wX8Ne6ySDVnHluz0kOmjKrPwKr1zdoMgy1knxilNoRw8SKOlfq eV7ZMmPH7P+U8ssR4b+OxoVJPsfZqYz+8W3WBzB8bHYOCFgguVxehZhOOIqQEIWReOk9K1vZ 0QFZSWY+efMbEVt6rHCXGDYrUd/OU= X-IronPort-AV: E=Sophos;i="5.93,230,1654574400"; d="scan'208";a="77134720" From: Anthony PERARD To: CC: Anthony PERARD , George Dunlap , Nick Rosbrook , Wei Liu Subject: [XEN PATCH v4 32/32] tools/golang/xenlight: Rework gengotypes.py and generation of *.gen.go Date: Thu, 11 Aug 2022 17:48:45 +0100 Message-ID: <20220811164845.38083-33-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220811164845.38083-1-anthony.perard@citrix.com> References: <20220811164845.38083-1-anthony.perard@citrix.com> MIME-Version: 1.0 gengotypes.py creates both "types.gen.go" and "helpers.gen.go", but make can start gengotypes.py twice. Rework the rules so that gengotypes.py is executed only once. Also, add the ability to provide a path to tell gengotypes.py where to put the files. This doesn't matter yet but it will when for example the script will be run from tools/ to generate the targets. Signed-off-by: Anthony PERARD --- Notes: v4: - new patch tools/golang/xenlight/Makefile | 6 ++++-- tools/golang/xenlight/gengotypes.py | 10 +++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/tools/golang/xenlight/Makefile b/tools/golang/xenlight/Makefile index 00e6d17f2b..c5bb6b94a8 100644 --- a/tools/golang/xenlight/Makefile +++ b/tools/golang/xenlight/Makefile @@ -15,8 +15,10 @@ all: build GOXL_GEN_FILES = types.gen.go helpers.gen.go -%.gen.go: gengotypes.py $(LIBXL_SRC_DIR)/libxl_types.idl $(LIBXL_SRC_DIR)/idl.py - LIBXL_SRC_DIR=$(LIBXL_SRC_DIR) $(PYTHON) gengotypes.py $(LIBXL_SRC_DIR)/libxl_types.idl +# This exploits the 'multi-target pattern rule' trick. +# gentypes.py should be executed only once to make all the targets. +$(subst .gen.,.%.,$(GOXL_GEN_FILES)): gengotypes.py $(LIBXL_SRC_DIR)/libxl_types.idl $(LIBXL_SRC_DIR)/idl.py + LIBXL_SRC_DIR=$(LIBXL_SRC_DIR) $(PYTHON) gengotypes.py $(LIBXL_SRC_DIR)/libxl_types.idl $(@D)/types.gen.go $(@D)/helpers.gen.go # Go will do its own dependency checking, and not actuall go through # with the build if none of the input files have changed. diff --git a/tools/golang/xenlight/gengotypes.py b/tools/golang/xenlight/gengotypes.py index ac1cf060dd..ff4c2ad216 100644 --- a/tools/golang/xenlight/gengotypes.py +++ b/tools/golang/xenlight/gengotypes.py @@ -723,7 +723,13 @@ def xenlight_golang_fmt_name(name, exported = True): return words[0] + ''.join(x.title() for x in words[1:]) if __name__ == '__main__': + if len(sys.argv) != 4: + print("Usage: gengotypes.py ", file=sys.stderr) + sys.exit(1) + idlname = sys.argv[1] + path_types = sys.argv[2] + path_helpers = sys.argv[3] (builtins, types) = idl.parse(idlname) @@ -735,9 +741,11 @@ if __name__ == '__main__': // source: {} """.format(os.path.basename(sys.argv[0]), - ' '.join([os.path.basename(a) for a in sys.argv[1:]])) + os.path.basename(sys.argv[1])) xenlight_golang_generate_types(types=types, + path=path_types, comment=header_comment) xenlight_golang_generate_helpers(types=types, + path=path_helpers, comment=header_comment)