# ==========================================================================
# 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.
#
# ==========================================================================

# generated header directory
gen := $(if $(gen),$(gen),$(subst include/,include/generated/,$(obj)))

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

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

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

include scripts/Kbuild.include

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

srcdir        := $(srctree)/$(obj)
gendir        := $(objtree)/$(gen)
subdirs       := $(patsubst $(srcdir)/%/.,%,$(wildcard $(srcdir)/*/.))
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 $@

PHONY += __headersinst __headerscheck

ifndef HDRCHECK
# Rules for installing headers
__headersinst: $(subdirs) $(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
__headerscheck: $(subdirs) $(check-file)
	@:

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

endif

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

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

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

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