# ==========================================================================
# Installing headers
#
# All headers under include/uapi, include/generated/uapi,
# arch/<arch>/include/uapi and arch/<arch>/include/generated/uapi are
# exported.
# They are preprocessed to remove __KERNEL__ section of the file.
#
# ==========================================================================

PHONY := __headers
__headers:

include scripts/Kbuild.include

srcdir        := $(srctree)/$(obj)

# When make is run under a fakechroot environment, the function
# $(wildcard $(srcdir)/*/.) doesn't only return directories, but also regular
# files. So, we are using a combination of sort/dir/wildcard which works
# with fakechroot.
subdirs       := $(patsubst $(srcdir)/%/,%,\
		 $(filter-out $(srcdir)/,\
		 $(sort $(dir $(wildcard $(srcdir)/*/)))))

# caller may set destination dir (when installing to asm/)
_dst          := $(if $(dst),$(dst),$(obj))

# Recursion
__headers: $(subdirs)

.PHONY: $(subdirs)
$(subdirs):
	$(Q)$(MAKE) $(hdr-inst)=$(obj)/$@ dst=$(_dst)/$@

# Skip header install/check for include/uapi and arch/$(hdr-arch)/include/uapi.
# We have only sub-directories there.
skip-inst := $(if $(filter %/uapi,$(obj)),1)

ifeq ($(skip-inst),)

# Kbuild file is optional
kbuild-file := $(srctree)/$(obj)/Kbuild
-include $(kbuild-file)

old-kbuild-file := $(srctree)/$(subst uapi/,,$(obj))/Kbuild
ifneq ($(wildcard $(old-kbuild-file)),)
include $(old-kbuild-file)
endif

installdir    := $(INSTALL_HDR_PATH)/$(subst uapi/,,$(_dst))

gendir        := $(objtree)/$(subst include/,include/generated/,$(obj))
header-files  := $(notdir $(wildcard $(srcdir)/*.h))
header-files  += $(notdir $(wildcard $(srcdir)/*.agh))
header-files  := $(filter-out $(no-export-headers), $(header-files))
genhdr-files  := $(notdir $(wildcard $(gendir)/*.h))
genhdr-files  := $(filter-out $(header-files), $(genhdr-files))

# files used to track state of install/check
install-file  := $(installdir)/.install
check-file    := $(installdir)/.check

# generic-y list all files an architecture uses from asm-generic
# Use this to build a list of headers which require a wrapper
generic-files := $(notdir $(wildcard $(srctree)/include/uapi/asm-generic/*.h))
wrapper-files := $(filter $(generic-files), $(generic-y))
wrapper-files := $(filter-out $(header-files), $(wrapper-files))

# all headers files for this dir
all-files     := $(header-files) $(genhdr-files) $(wrapper-files)
output-files  := $(addprefix $(installdir)/, $(all-files))

ifneq ($(mandatory-y),)
missing       := $(filter-out $(all-files),$(mandatory-y))
ifneq ($(missing),)
$(error Some mandatory headers ($(missing)) are missing in $(obj))
endif
endif

# Work out what needs to be removed
oldheaders    := $(patsubst $(installdir)/%,%,$(wildcard $(installdir)/*.h))
unwanted      := $(filter-out $(all-files),$(oldheaders))

# Prefix unwanted with full paths to $(INSTALL_HDR_PATH)
unwanted-file := $(addprefix $(installdir)/, $(unwanted))

printdir = $(patsubst $(INSTALL_HDR_PATH)/%/,%,$(dir $@))

quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\
                            file$(if $(word 2, $(all-files)),s))
      cmd_install = \
        $(CONFIG_SHELL) $< $(installdir) $(srcdir) $(header-files); \
        $(CONFIG_SHELL) $< $(installdir) $(gendir) $(genhdr-files); \
        for F in $(wrapper-files); do                                   \
                echo "\#include <asm-generic/$$F>" > $(installdir)/$$F;    \
        done;                                                           \
        touch $@

quiet_cmd_remove = REMOVE  $(unwanted)
      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
# the "Argument list too long" error.
      cmd_check = for f in $(all-files); do                          \
                  echo "$(installdir)/$${f}"; done                      \
                  | xargs                                            \
                  $(PERL) $< $(INSTALL_HDR_PATH)/include $(SRCARCH); \
	          touch $@

ifndef HDRCHECK
# Rules for installing headers
__headers: $(install-file)
	@:

targets += $(install-file)
$(install-file): scripts/headers_install.sh \
		 $(addprefix $(srcdir)/,$(header-files)) \
		 $(addprefix $(gendir)/,$(genhdr-files)) FORCE
	$(if $(unwanted),$(call cmd,remove),)
	$(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@)))
	$(call if_changed,install)

else
__headers: $(check-file)
	@:

targets += $(check-file)
$(check-file): scripts/headers_check.pl $(output-files) FORCE
	$(call if_changed,check)

endif

targets := $(wildcard $(sort $(targets)))
cmd_files := $(wildcard \
             $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd))

ifneq ($(cmd_files),)
	include $(cmd_files)
endif

endif # skip-inst

.PHONY: $(PHONY)
PHONY += FORCE
FORCE: ;
