diff options
Diffstat (limited to 'scripts/Makefile.headersinst')
-rw-r--r-- | scripts/Makefile.headersinst | 10 |
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 | ||
15 | gen := $(if $(gen),$(gen),$(subst include/,include/generated/,$(obj))) | ||
16 | |||
13 | kbuild-file := $(srctree)/$(obj)/Kbuild | 17 | kbuild-file := $(srctree)/$(obj)/Kbuild |
14 | include $(kbuild-file) | 18 | include $(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 |
35 | header-y := $(filter-out $(generic-y), $(header-y)) | 39 | header-y := $(filter-out $(generic-y), $(header-y)) |
36 | all-files := $(header-y) $(objhdr-y) $(wrapper-files) | 40 | all-files := $(header-y) $(objhdr-y) $(genhdr-y) $(wrapper-files) |
37 | input-files := $(addprefix $(srctree)/$(obj)/,$(header-y)) \ | 41 | input-files := $(addprefix $(srctree)/$(obj)/,$(header-y)) \ |
38 | $(addprefix $(objtree)/$(obj)/,$(objhdr-y)) | 42 | $(addprefix $(objtree)/$(obj)/,$(objhdr-y)) \ |
43 | $(addprefix $(objtree)/$(gen)/,$(genhdr-y)) | ||
39 | output-files := $(addprefix $(install)/, $(all-files)) | 44 | output-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; \ |