[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 1/4] build: add make macro for making file from file.in


  • To: Juergen Gross <jgross@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 21 Nov 2025 15:03:38 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2fOaz8+DeRIrMeBhKJtCfiKmGwPIvGWTFHxf/4YwmhA=; b=Q/1N030Oq/XsBYpEfXwEozzWoWFRAMBp9hUWpPwgddhByTlsqphSDV99yjQ8nzveJVsecDel09mLoY1FI4SzFA/G3k4SgkpRdt7IeN6gX1Kth8azYyRRaTycZyEV08WzdseQv1gdiB32Eevd9DUoilg/gOAKwNFTv2ggdU+XESWRb9uuFObXdsdS9y0Xpn9iusPA4tr69uB6pY+6VIrdmkNdszCoNcOC8qcxN7OKK73Z7GWNwk+rZjegUGB9//pzNSt3ovvtz0Cd3mg/iKlw0bVFRlh2AK5Dj7E0UiiFXnIk/q78UFcX39py5TP3GXctqSqQALXfU0H18DX0N5RoNg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SyqerrGSTmGLU7D9pGSKHuCwkVssYahaQYunWL+MuGoCGN/6FWL30W+x/dy41X+5rhRgOMg5WizTwe58wEv6zuIGakzxdXzWZCboB4/xhYOheb6+IgObIXCJ2ZT/L2DCwCcVmYSH+74QeWpdB80R2UJ2ON/RmIjg+XGdcMAOB00ENfbQbJ9ZIj3Jofs7r7iHFXXG99GIisM2z/CJkzXsVpj/kDdreZWxvhlowpsXygXgcSGxQf1zpj09jvPvOhOtjmq8bAi18UBuG/Q88gQBsFcBxHrzFNdcZTYCdVrMzBoKofEsWTAQvviKz82+WaEkkCTWOknYR2CLKjy7xzxUkA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Fri, 21 Nov 2025 15:04:02 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 21/11/2025 1:23 pm, Juergen Gross wrote:
> Add a new make macro for creating <file> from <file>.in at build
> time. To be used like this:
>
> $(foreach file,$(IN_TARGETS),$(eval $(call apply-build-vars,$(file))))
>
> This can be used instead of the current approach to perform the similar
> step for file.in during ./configure.
>
> This will avoid having to run ./configure just because of modifying a
> file depending on a variable set by configure.
>
> Prepare to have multiple files as source for the replacement patterns.
>
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> ---
> V2:
> - don't use pattern rule, but create explicit dependency in macro,
>   don't require to rename source files (Jan Beulich, Andrew Cooper)
> V3:
> - prepare for $(PATH_FILES) to be extended by other Makefile
> - let generated file depend on $(INC_FILES)
> ---
>  Config.mk | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/Config.mk b/Config.mk
> index e1556dfbfa..39e8007b9c 100644
> --- a/Config.mk
> +++ b/Config.mk
> @@ -159,6 +159,19 @@ define move-if-changed
>       if ! cmp -s $(1) $(2); then mv -f $(1) $(2); else rm -f $(1); fi
>  endef
>  
> +PATH_FILES := Paths
> +INC_FILES = $(foreach f, $(PATH_FILES), $(XEN_ROOT)/config/$(f).mk)
> +
> +include $(INC_FILES)
> +
> +BUILD_MAKE_VARS = $(foreach f, $(PATH_FILES), $(shell awk '$$2 == ":=" { 
> print $$1; }' $(XEN_ROOT)/config/$(f).mk.in))

Everything else in the series is looking fine now.  But why is
PATH_FILES dropping the .mk extension from the file?

It looks weird for both INC_FILES and BUILD_MAKE_VARS to have to
re-insert it.

~Andrew



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.