--- zzzz-none-000/linux-2.6.39.4/scripts/Makefile.headersinst 2011-08-03 19:43:28.000000000 +0000 +++ puma6-atom-6490-729/linux-2.6.39.4/scripts/Makefile.headersinst 2021-11-10 13:38:18.000000000 +0000 @@ -7,8 +7,12 @@ # # ========================================================================== +# generated header directory +gen := $(if $(gen),$(gen),$(subst include/,include/generated/,$(obj))) + # called may set destination dir (when installing to asm/) -_dst := $(if $(dst),$(dst),$(obj)) +# AVM: filter-out uapi part to be compatible with genhdr-stub asuming this will not be present in the final file +_dst := $(patsubst include/uapi/%,include/%,$(if $(dst),$(dst),$(obj))) kbuild-file := $(srctree)/$(obj)/Kbuild include $(kbuild-file) @@ -27,10 +31,13 @@ install-file := $(install)/.install check-file := $(install)/.check +gendir := $(objtree)/$(gen) + # all headers files for this dir -all-files := $(header-y) $(objhdr-y) +all-files := $(header-y) $(objhdr-y) $(genhdr-y) input-files := $(addprefix $(srctree)/$(obj)/,$(header-y)) \ - $(addprefix $(objtree)/$(obj)/,$(objhdr-y)) + $(addprefix $(objtree)/$(obj)/,$(objhdr-y)) \ + $(addprefix $(gendir)/,$(genhdr-y)) output-files := $(addprefix $(install)/, $(all-files)) # Work out what needs to be removed @@ -47,10 +54,11 @@ cmd_install = \ $(PERL) $< $(srctree)/$(obj) $(install) $(SRCARCH) $(header-y); \ $(PERL) $< $(objtree)/$(obj) $(install) $(SRCARCH) $(objhdr-y); \ + $(PERL) $< $(gendir) $(install) $(SRCARCH) $(genhdr-y); \ touch $@ quiet_cmd_remove = REMOVE $(unwanted) - cmd_remove = rm -f $(unwanted-file) + cmd_remove = #rm -f $(unwanted-file) quiet_cmd_check = CHECK $(printdir) ($(words $(all-files)) files) # Headers list can be pretty long, xargs helps to avoid