Re: [PATCH] kbuild: Consolidate header generation from ASM offset information

From: Masahiro Yamada
Date: Tue Apr 11 2017 - 20:03:43 EST


Hi Matthias,


2017-04-04 4:37 GMT+09:00 Matthias Kaehlcke <mka@xxxxxxxxxxxx>:
> Largely redundant code is used in different places to generate C headers
> from offset information extracted from assembly language output.
> Consolidate the code in a Makefile include and use this instead.
>
> Signed-off-by: Matthias Kaehlcke <mka@xxxxxxxxxxxx>


Please move sed-y and filechk_offsets to scripts/Makefile.lib .
(You may need to rename sed-y
because arch/xtensa/kernel/Makefile uses this name.)


We see various helpers in scripts/Makefile.lib,
so I do not think we need to create a new file just for this one.

Then, please reuse it from arch/ia64/kernel/Makefile and scripts/mod/Makefile.
Like this:

include/generated/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s FORCE
$(call filechk,offsets,__ASM_NR_IRQS_H__)

$(obj)/$(devicetable-offsets-file): $(obj)/devicetable-offsets.s FORCE
$(call filechk,offsets,__DEVICETABLE_OFFSETS_H__)






--
Best Regards
Masahiro Yamada