Message ID | 20190605111416.13341-1-jslaby@suse.cz (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | kbuild: s390, do not remove autogenerated headers on clean | expand |
On Wed, Jun 5, 2019 at 8:14 PM Jiri Slaby <jslaby@suse.cz> wrote: > > 'make clean' does NOT remove autogenerated headers generated from > arch/s390/kernel/syscalls/. For example: > asm-offsets.h > irq_regs.h > irq_work.h > unistd_nr.h > > But 'make clean' DOES currently remove dis-defs.h and facility-defs.h > generated from arch/s390/tools/. > > The issue is that facility-defs.h is included from <asm/facility.h> and > builds of external modules fail due to missing header. (When cleaned > build directory is used.) > > Fix this by adding these targets to no-clean-files. > > Signed-off-by: Jiri Slaby <jslaby@suse.cz> > Cc: Masahiro Yamada <yamada.masahiro@socionext.com> > Cc: Michal Marek <michal.lkml@markovi.net> > Cc: linux-kbuild@vger.kernel.org > Cc: Heiko Carstens <heiko.carstens@de.ibm.com> > Cc: Vasily Gorbik <gor@linux.ibm.com> > Cc: Christian Borntraeger <borntraeger@de.ibm.com> > Cc: linux-s390@vger.kernel.org > --- > > I would love to see comments from KBuild guys as I am not sure if this > fix is correct at all. This issue had already been fixed by the side-effect of another patch, which is in linux-next. See this: commit 10077c9f2dae1afabab2808a0326ecf3e8e5a82c Author: Masahiro Yamada <yamada.masahiro@socionext.com> Date: Fri May 17 16:54:27 2019 +0900 s390: drop meaningless 'targets' from tools Makefile 'targets' should be specified to include .*.cmd files to evaluate if_changed or friends. Here, facility-defs.h and dis-defs.h are generated by filechk. Because filechk does not generate .*.cmd file, the 'targets' addition is meaningless. The filechk correctly updates the target when its content is changed. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Thanks.
On 05. 06. 19, 13:29, Masahiro Yamada wrote: > This issue had already been fixed by the side-effect of > another patch, which is in linux-next. Great, thanks. > See this: > > > commit 10077c9f2dae1afabab2808a0326ecf3e8e5a82c > Author: Masahiro Yamada <yamada.masahiro@socionext.com> > Date: Fri May 17 16:54:27 2019 +0900 > > s390: drop meaningless 'targets' from tools Makefile > > 'targets' should be specified to include .*.cmd files to evaluate > if_changed or friends. > > Here, facility-defs.h and dis-defs.h are generated by filechk. > > Because filechk does not generate .*.cmd file, the 'targets' addition > is meaningless. The filechk correctly updates the target when its > content is changed. > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> > Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
diff --git a/arch/s390/tools/Makefile b/arch/s390/tools/Makefile index 2342b84b3386..984b2f43651e 100644 --- a/arch/s390/tools/Makefile +++ b/arch/s390/tools/Makefile @@ -7,6 +7,7 @@ kapi := arch/$(ARCH)/include/generated/asm kapi-hdrs-y := $(kapi)/facility-defs.h $(kapi)/dis-defs.h targets += $(addprefix ../../../,$(kapi-hdrs-y)) +no-clean-files += $(targets) PHONY += kapi kapi: $(kapi-hdrs-y)
'make clean' does NOT remove autogenerated headers generated from arch/s390/kernel/syscalls/. For example: asm-offsets.h irq_regs.h irq_work.h unistd_nr.h But 'make clean' DOES currently remove dis-defs.h and facility-defs.h generated from arch/s390/tools/. The issue is that facility-defs.h is included from <asm/facility.h> and builds of external modules fail due to missing header. (When cleaned build directory is used.) Fix this by adding these targets to no-clean-files. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Michal Marek <michal.lkml@markovi.net> Cc: linux-kbuild@vger.kernel.org Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Vasily Gorbik <gor@linux.ibm.com> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Cc: linux-s390@vger.kernel.org --- I would love to see comments from KBuild guys as I am not sure if this fix is correct at all. arch/s390/tools/Makefile | 1 + 1 file changed, 1 insertion(+)