[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH 04/15] build: hide policy.bin commands
- To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Thu, 25 May 2023 16:23:18 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=yUFCk+hUYamSYOLj0TqZi8PS+hcJtHPvWTWNAM5Fbr0=; b=b7RB9yz/EwRytrdvInyz5az1JtpOSma7Q3ozzPC8rqAhwsC8WTenjcUmNOlSZEFM3aFCFBEu8WpP7bDqTcfraKaDSn4651gTbP3kvzCJyuRlXlj3tYjDcZwkfV9YnvdASmzVYGf4a6rsFXFLyB04ciCnePPg44aBkH8f9+e5aYCfq6CyQtip8dqVBq8SbQsK9REoZIkbrVNPhj8X4mz3RvbbbmSOqjHWuBxEviwNVKrNhD/RIHfmLGK1/6J8aB5dS34YrF4HOMKuWVgIEah2AhHIF9QoKANmN3KFWwZncjEjkUI7agxq/1WhHppO5oTBD435bHMoNFKR8bLFkA0rlA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MUKsxaG+s8bPnE4aQtSQF53TsC+vEjCEj3efGh9cldw9D97jlixIdINGmvSZXtaAY6uR2F5rC6n0zWS58H5b43weRetfheEQKOEZ2pK5fcsjMMglRzwVizkaOBlxl52+8K1IBXbMbAFSG4OTHWtNtwVN6h4fthQPwCABb2Wf3CTOH7IkXJk18jrWCcvfXdHgjSkNeyBGE4vQYL3RqE34bDnkY4M9mAfbOvgwVLyRfOvjypxIi7eQfxZQ390eRVHlws4o7/tgqk8Rhv2S3StKIF7am/aUokfmBBRtKuljk6Dn0XD8F6vrOFsvdw6n6aVYEJispZojXGdZbVBqOu6H4A==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Thu, 25 May 2023 14:23:45 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 25.05.2023 15:34, Anthony PERARD wrote:
> On Wed, May 24, 2023 at 09:11:10AM +0200, Jan Beulich wrote:
>> On 23.05.2023 18:38, Anthony PERARD wrote:
>>> --- a/xen/xsm/flask/Makefile
>>> +++ b/xen/xsm/flask/Makefile
>>> @@ -48,10 +48,15 @@ targets += flask-policy.S
>>> FLASK_BUILD_DIR := $(abs_objtree)/$(obj)
>>> POLICY_SRC := $(FLASK_BUILD_DIR)/xenpolicy-$(XEN_FULLVERSION)
>>>
>>> +policy_chk = \
>>> + $(Q)if ! cmp -s $(POLICY_SRC) $@; then \
>>> + $(kecho) ' UPD $@'; \
>>> + cp $(POLICY_SRC) $@; \
>>
>> Wouldn't this better use move-if-changed? Which, if "UPD ..." output is
>> desired, would then need overriding from what Config.mk supplies?
>
> I don't like move-if-changed, because it remove the original target. On
> incremental build, make will keep building the original target even
> when not needed. So we keep seeing the `checkpolicy` command line when
> there's otherwise nothing to do.
>
> I could introduce a new generic macro instead, copy-if-changed, which
> will do compare and copy (like policy_chk is doing here).
Ah, yes, I think I see what you mean. I'd be fine with copy-if-changed,
ideally accompanied by some rule of thumb when to prefer it over
move-if-changed.
Jan
|