On 06.09.2023 14:28, Oleksii wrote:
> On Wed, 2023-09-06 at 14:16 +0200, Jan Beulich wrote:
>> On 01.09.2023 18:02, Oleksii Kurochko wrote:
>>> --- /dev/null
>>> +++ b/xen/scripts/Makefile.asm-generic
>>> @@ -0,0 +1,23 @@
>>> +# SPDX-License-Identifier: GPL-2.0
>>
>> While this is what the Linux file presently says, you still want to
>> add
>> "-only", which is merely the newer name for the same thing.
>>
>>> +# include/asm-generic contains a lot of files that are used
>>> +# verbatim by several architectures.
>>> +#
>>> +# This Makefile reads the file arch/$(SRCARCH)/include/asm/Kbuild
>>> +# and for each file listed in this file with generic-y creates
>>> +# a small wrapper file in $(obj)
>>> (arch/$(SRCARCH)/include/generated/asm)
>>> +
>>> +kbuild-file := $(srctree)/arch/$(SRCARCH)/include/asm/Kbuild
>>> +include $(kbuild-file)
>>> +
>>> +include scripts/Kbuild.include
>>> +
>>> +# Create output directory if not already present
>>> +_dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj))
>>> +
>>> +quiet_cmd_wrap = WRAP    $@
>>> +cmd_wrap = echo "\#include <asm-generic/$*.h>" >$@
>>> +
>>> +all: $(patsubst %, $(obj)/%, $(generic-y))
>>> +
>>> +$(obj)/%.h:
>>> +       $(call cmd,wrap)
>>
>> You've removed quite a bit of functionality, comparing with the Linux
>> original. May I ask why that is? What they have all makes sense to
>> me,
>> and looks to be useful down the road.
> I decided to take only minimum needed now but if you think it would be
> better to use the latest Linux's Makefile.asm-generic then I will
> update it in the next patch version.

Unless there are things getting in the way, I indeed think it would be
better to take the whole thing largely verbatim (a few edits are
unavoidable afaict).

Jan

Reply via email to