Makefile.headersinst (d1b32bacffe189a0cdc2c36905a753535638cb1c) | Makefile.headersinst (09c3776c5472f2bc73b29b13d5947cec6103a99c) |
---|---|
1# ========================================================================== 2# Installing headers 3# 4# All headers under include/uapi, include/generated/uapi, 5# arch/<arch>/include/uapi and arch/<arch>/include/generated/uapi are 6# exported. 7# They are preprocessed to remove __KERNEL__ section of the file. 8# --- 38 unchanged lines hidden (view full) --- 47header-files := $(filter-out $(no-export-headers), $(header-files)) 48genhdr-files := $(notdir $(wildcard $(gendir)/*.h)) 49genhdr-files := $(filter-out $(header-files), $(genhdr-files)) 50 51# files used to track state of install/check 52install-file := $(installdir)/.install 53check-file := $(installdir)/.check 54 | 1# ========================================================================== 2# Installing headers 3# 4# All headers under include/uapi, include/generated/uapi, 5# arch/<arch>/include/uapi and arch/<arch>/include/generated/uapi are 6# exported. 7# They are preprocessed to remove __KERNEL__ section of the file. 8# --- 38 unchanged lines hidden (view full) --- 47header-files := $(filter-out $(no-export-headers), $(header-files)) 48genhdr-files := $(notdir $(wildcard $(gendir)/*.h)) 49genhdr-files := $(filter-out $(header-files), $(genhdr-files)) 50 51# files used to track state of install/check 52install-file := $(installdir)/.install 53check-file := $(installdir)/.check 54 |
55# generic-y list all files an architecture uses from asm-generic 56# Use this to build a list of headers which require a wrapper 57generic-files := $(notdir $(wildcard $(srctree)/include/uapi/asm-generic/*.h)) 58wrapper-files := $(filter $(generic-files), $(generic-y)) 59wrapper-files := $(filter-out $(header-files), $(wrapper-files)) 60 | |
61# all headers files for this dir | 55# all headers files for this dir |
62all-files := $(header-files) $(genhdr-files) $(wrapper-files) | 56all-files := $(header-files) $(genhdr-files) |
63output-files := $(addprefix $(installdir)/, $(all-files)) 64 65ifneq ($(mandatory-y),) 66missing := $(filter-out $(all-files),$(mandatory-y)) 67ifneq ($(missing),) 68$(error Some mandatory headers ($(missing)) are missing in $(obj)) 69endif 70endif --- 7 unchanged lines hidden (view full) --- 78 79printdir = $(patsubst $(INSTALL_HDR_PATH)/%/,%,$(dir $@)) 80 81quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\ 82 file$(if $(word 2, $(all-files)),s)) 83 cmd_install = \ 84 $(CONFIG_SHELL) $< $(installdir) $(srcdir) $(header-files); \ 85 $(CONFIG_SHELL) $< $(installdir) $(gendir) $(genhdr-files); \ | 57output-files := $(addprefix $(installdir)/, $(all-files)) 58 59ifneq ($(mandatory-y),) 60missing := $(filter-out $(all-files),$(mandatory-y)) 61ifneq ($(missing),) 62$(error Some mandatory headers ($(missing)) are missing in $(obj)) 63endif 64endif --- 7 unchanged lines hidden (view full) --- 72 73printdir = $(patsubst $(INSTALL_HDR_PATH)/%/,%,$(dir $@)) 74 75quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\ 76 file$(if $(word 2, $(all-files)),s)) 77 cmd_install = \ 78 $(CONFIG_SHELL) $< $(installdir) $(srcdir) $(header-files); \ 79 $(CONFIG_SHELL) $< $(installdir) $(gendir) $(genhdr-files); \ |
86 for F in $(wrapper-files); do \ 87 echo "\#include <asm-generic/$$F>" > $(installdir)/$$F; \ 88 done; \ | |
89 touch $@ 90 91quiet_cmd_remove = REMOVE $(unwanted) 92 cmd_remove = rm -f $(unwanted-file) 93 94quiet_cmd_check = CHECK $(printdir) ($(words $(all-files)) files) 95# Headers list can be pretty long, xargs helps to avoid 96# the "Argument list too long" error. --- 42 unchanged lines hidden --- | 80 touch $@ 81 82quiet_cmd_remove = REMOVE $(unwanted) 83 cmd_remove = rm -f $(unwanted-file) 84 85quiet_cmd_check = CHECK $(printdir) ($(words $(all-files)) files) 86# Headers list can be pretty long, xargs helps to avoid 87# the "Argument list too long" error. --- 42 unchanged lines hidden --- |