# ==========================================================================
# Installing headers
#
# header-y  - list files to be installed. They are preprocessed
#             to remove __KERNEL__ section of the file
# genhdr-y  - Same as header-y but in a generated/ directory
#
# ==========================================================================

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

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

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

_dst := $(if $(destination-y),$(destination-y),$(_dst))

include scripts/Kbuild.include

install       := $(INSTALL_HDR_PATH)/$(_dst)

header-y      := $(sort $(header-y))
subdirs       := $(patsubst %/,%,$(filter %/, $(header-y)))
header-y      := $(filter-out %/, $(header-y))

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

# generic-y list all files an architecture uses from asm-generic
# Use this to build a list of headers which require a wrapper
wrapper-files := $(filter $(header-y), $(generic-y))

# all headers files for this dir
header-y      := $(filter-out $(generic-y), $(header-y))
all-files     := $(header-y) $(genhdr-y) $(wrapper-files)
input-files   := $(addprefix $(srctree)/$(obj)/,$(header-y)) \
                 $(addprefix $(objtree)/$(gen)/,$(genhdr-y))
output-files  := $(addprefix $(install)/, $(all-files))

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

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

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

quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\
                            file$(if $(word 2, $(all-files)),s))
      cmd_install = \
        $(PERL) $< $(srctree)/$(obj) $(install) $(SRCARCH) $(header-y); \
        $(PERL) $< $(objtree)/$(gen) $(install) $(SRCARCH) $(genhdr-y); \
        for F in $(wrapper-files); do                                   \
                echo "\#include <asm-generic/$$F>" > $(install)/$$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 "$(install)/$${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.pl $(input-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
hdr-inst := -rR -f $(srctree)/scripts/Makefile.headersinst obj
.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: ;
