提交 a8ff49a1 编写于 作者: M Masahiro Yamada

kbuild: pass dst= to Makefile.headersinst from top Makefile

We can always pass dst= from the top Makefile.  This will simplify
the logic in Makefile.headersinst.
Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
上级 0f042eea
...@@ -1154,7 +1154,7 @@ PHONY += headers_install ...@@ -1154,7 +1154,7 @@ PHONY += headers_install
headers_install: __headers headers_install: __headers
$(if $(wildcard $(srctree)/arch/$(hdr-arch)/include/uapi/asm/Kbuild),, \ $(if $(wildcard $(srctree)/arch/$(hdr-arch)/include/uapi/asm/Kbuild),, \
$(error Headers not exportable for the $(SRCARCH) architecture)) $(error Headers not exportable for the $(SRCARCH) architecture))
$(Q)$(MAKE) $(hdr-inst)=include/uapi $(Q)$(MAKE) $(hdr-inst)=include/uapi dst=include
$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi $(hdr-dst) $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi $(hdr-dst)
PHONY += headers_check_all PHONY += headers_check_all
...@@ -1163,7 +1163,7 @@ headers_check_all: headers_install_all ...@@ -1163,7 +1163,7 @@ headers_check_all: headers_install_all
PHONY += headers_check PHONY += headers_check
headers_check: headers_install headers_check: headers_install
$(Q)$(MAKE) $(hdr-inst)=include/uapi HDRCHECK=1 $(Q)$(MAKE) $(hdr-inst)=include/uapi dst=include HDRCHECK=1
$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi $(hdr-dst) HDRCHECK=1 $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi $(hdr-dst) HDRCHECK=1
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
......
...@@ -23,15 +23,12 @@ subdirs := $(patsubst $(srcdir)/%/,%,\ ...@@ -23,15 +23,12 @@ subdirs := $(patsubst $(srcdir)/%/,%,\
$(filter-out $(srcdir)/,\ $(filter-out $(srcdir)/,\
$(sort $(dir $(wildcard $(srcdir)/*/))))) $(sort $(dir $(wildcard $(srcdir)/*/)))))
# caller may set destination dir (when installing to asm/)
_dst := $(if $(dst),$(dst),$(obj))
# Recursion # Recursion
__headers: $(subdirs) __headers: $(subdirs)
.PHONY: $(subdirs) .PHONY: $(subdirs)
$(subdirs): $(subdirs):
$(Q)$(MAKE) $(hdr-inst)=$(obj)/$@ dst=$(_dst)/$@ $(Q)$(MAKE) $(hdr-inst)=$(obj)/$@ dst=$(dst)/$@
# Skip header install/check for include/uapi and arch/$(hdr-arch)/include/uapi. # Skip header install/check for include/uapi and arch/$(hdr-arch)/include/uapi.
# We have only sub-directories there. # We have only sub-directories there.
...@@ -48,8 +45,7 @@ ifneq ($(wildcard $(old-kbuild-file)),) ...@@ -48,8 +45,7 @@ ifneq ($(wildcard $(old-kbuild-file)),)
include $(old-kbuild-file) include $(old-kbuild-file)
endif endif
installdir := $(INSTALL_HDR_PATH)/$(subst uapi/,,$(_dst)) installdir := $(INSTALL_HDR_PATH)/$(dst)
gendir := $(objtree)/$(subst include/,include/generated/,$(obj)) gendir := $(objtree)/$(subst include/,include/generated/,$(obj))
header-files := $(notdir $(wildcard $(srcdir)/*.h)) header-files := $(notdir $(wildcard $(srcdir)/*.h))
header-files += $(notdir $(wildcard $(srcdir)/*.agh)) header-files += $(notdir $(wildcard $(srcdir)/*.agh))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册