[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/5] build: add new make pattern for making file from file.src
- To: Jan Beulich <jbeulich@xxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Thu, 13 Nov 2025 19:41:20 +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=o9jckqquql43oSFg1P7lULuQw6lRNfcvKyEb4bMI478=; b=SfWCVcPopyHMonbl50yCBKlzN3JCLTHAXAidkSp51bc8UtdXI17kx3pCmtZrSE2j8qVZ0Y+WAYUXUhV05TIXKsMPdaaQAIYo6IPNxrV5HLR9hZ6oPzcJyfsU4UEXzbIjhcU7EbTQoT6GmEfM+LpPx+ECJuNopFYROTPGpogXDprOlb4hNhrwK57HidaEr0aiaiVQGaT2W307Vy7GVf0IOvO5JBDaIhABzp5jBBPFAlgMJEnBuuW5ltUv5rCrVPPJ8bD8DSIQOk4A5IPM9GjY9yLhqtmtUqYy3aRQ+IiJS88y8Nu3oN4WLtrbphjTDT6d/21HYQ1LfE08VWsTZr/gcA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PoxYjJhgMOvLCVOgLOlboHqT/bAdefHvU+FWT6IExYkwE40zty85sJaGWpD5E70P+4jQV1R8U9xdTz8bdbETGOu1D0v1wvxAvsyyF7H6YuIetDA+xId5jZJU+CPXSMQJnKy3nEWAyVG0g+TjIMQrXYZ0xhi8gUtQMDu/LmACzvYskBVNp6T1FUjjpsu9dNwoxYf5n3ssCxyVcoUaIy4XlV1kfxpM8AEHbduwZFGtfMzKEIVJeBHWC75+Pw+6SeEyYYhqMwgtfBEXCV6F2VrvsHiAKKRBK4fPXR36FKUTHnVYvRjCcCo9/v82wvWQl4P0B0aqxwtzqCfATTEo5p5bvw==
- 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>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Thu, 13 Nov 2025 19:41:42 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 13/11/2025 4:49 pm, Jan Beulich wrote:
> On 11.11.2025 17:19, Juergen Gross wrote:
>> --- a/Config.mk
>> +++ b/Config.mk
>> @@ -159,6 +159,20 @@ 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))
>> +
>> +define apply-build-vars
>> + sed $(foreach v, $(BUILD_MAKE_VARS), -e 's#@$(v)@#$($(v))#g') <$< >$@
>> +endef
>> +
>> +%:: %.src
>> + $(apply-build-vars)
> I'm not convinced of having this here, rather than in less central places (say
> under tools/ and docs/). I'm also not sure I really understand why it needs to
> be .src - can't we stick to .in, enumerating the specific files that want
> generating this way (thus avoiding accidental attempts to re-generate files
> which need generating a different way)?
>
> Also - why the double colon here?
>
> (Maybe I figure answers to these questions as I look at subsequent patches.)
I too am wondering about .src vs .in.
.in is a well known naming scheme, and the exact point in the build
where it's generated isn't of interest IMO. I've not come across .src
before, as far as I'm aware.
Is it going to cause a problem to keep all these files named .in ?
~Andrew
|