aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.headersinst
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Makefile.headersinst')
-rw-r--r--scripts/Makefile.headersinst10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index a57f5bd5a13d..d3bae5e7b601 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -4,12 +4,16 @@
4# header-y - list files to be installed. They are preprocessed 4# header-y - list files to be installed. They are preprocessed
5# to remove __KERNEL__ section of the file 5# to remove __KERNEL__ section of the file
6# objhdr-y - Same as header-y but for generated files 6# objhdr-y - Same as header-y but for generated files
7# genhdr-y - Same as objhdr-y but in a generated/ directory
7# 8#
8# ========================================================================== 9# ==========================================================================
9 10
10# called may set destination dir (when installing to asm/) 11# called may set destination dir (when installing to asm/)
11_dst := $(if $(dst),$(dst),$(obj)) 12_dst := $(if $(dst),$(dst),$(obj))
12 13
14# generated header directory
15gen := $(if $(gen),$(gen),$(subst include/,include/generated/,$(obj)))
16
13kbuild-file := $(srctree)/$(obj)/Kbuild 17kbuild-file := $(srctree)/$(obj)/Kbuild
14include $(kbuild-file) 18include $(kbuild-file)
15 19
@@ -33,9 +37,10 @@ wrapper-files := $(filter $(header-y), $(generic-y))
33 37
34# all headers files for this dir 38# all headers files for this dir
35header-y := $(filter-out $(generic-y), $(header-y)) 39header-y := $(filter-out $(generic-y), $(header-y))
36all-files := $(header-y) $(objhdr-y) $(wrapper-files) 40all-files := $(header-y) $(objhdr-y) $(genhdr-y) $(wrapper-files)
37input-files := $(addprefix $(srctree)/$(obj)/,$(header-y)) \ 41input-files := $(addprefix $(srctree)/$(obj)/,$(header-y)) \
38 $(addprefix $(objtree)/$(obj)/,$(objhdr-y)) 42 $(addprefix $(objtree)/$(obj)/,$(objhdr-y)) \
43 $(addprefix $(objtree)/$(gen)/,$(genhdr-y))
39output-files := $(addprefix $(install)/, $(all-files)) 44output-files := $(addprefix $(install)/, $(all-files))
40 45
41# Work out what needs to be removed 46# Work out what needs to be removed
@@ -52,6 +57,7 @@ quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\
52 cmd_install = \ 57 cmd_install = \
53 $(PERL) $< $(srctree)/$(obj) $(install) $(SRCARCH) $(header-y); \ 58 $(PERL) $< $(srctree)/$(obj) $(install) $(SRCARCH) $(header-y); \
54 $(PERL) $< $(objtree)/$(obj) $(install) $(SRCARCH) $(objhdr-y); \ 59 $(PERL) $< $(objtree)/$(obj) $(install) $(SRCARCH) $(objhdr-y); \
60 $(PERL) $< $(objtree)/$(gen) $(install) $(SRCARCH) $(genhdr-y); \
55 for F in $(wrapper-files); do \ 61 for F in $(wrapper-files); do \
56 echo "\#include <asm-generic/$$F>" > $(install)/$$F; \ 62 echo "\#include <asm-generic/$$F>" > $(install)/$$F; \
57 done; \ 63 done; \