diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | scripts/Makefile.headersinst | 8 |
2 files changed, 4 insertions, 8 deletions
@@ -1154,7 +1154,7 @@ PHONY += headers_install | |||
1154 | headers_install: __headers | 1154 | headers_install: __headers |
1155 | $(if $(wildcard $(srctree)/arch/$(hdr-arch)/include/uapi/asm/Kbuild),, \ | 1155 | $(if $(wildcard $(srctree)/arch/$(hdr-arch)/include/uapi/asm/Kbuild),, \ |
1156 | $(error Headers not exportable for the $(SRCARCH) architecture)) | 1156 | $(error Headers not exportable for the $(SRCARCH) architecture)) |
1157 | $(Q)$(MAKE) $(hdr-inst)=include/uapi | 1157 | $(Q)$(MAKE) $(hdr-inst)=include/uapi dst=include |
1158 | $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi $(hdr-dst) | 1158 | $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi $(hdr-dst) |
1159 | 1159 | ||
1160 | PHONY += headers_check_all | 1160 | PHONY += headers_check_all |
@@ -1163,7 +1163,7 @@ headers_check_all: headers_install_all | |||
1163 | 1163 | ||
1164 | PHONY += headers_check | 1164 | PHONY += headers_check |
1165 | headers_check: headers_install | 1165 | headers_check: headers_install |
1166 | $(Q)$(MAKE) $(hdr-inst)=include/uapi HDRCHECK=1 | 1166 | $(Q)$(MAKE) $(hdr-inst)=include/uapi dst=include HDRCHECK=1 |
1167 | $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi $(hdr-dst) HDRCHECK=1 | 1167 | $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi $(hdr-dst) HDRCHECK=1 |
1168 | 1168 | ||
1169 | # --------------------------------------------------------------------------- | 1169 | # --------------------------------------------------------------------------- |
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index 4e9287bfdf28..e9147f05ea77 100644 --- a/scripts/Makefile.headersinst +++ b/scripts/Makefile.headersinst | |||
@@ -23,15 +23,12 @@ subdirs := $(patsubst $(srcdir)/%/,%,\ | |||
23 | $(filter-out $(srcdir)/,\ | 23 | $(filter-out $(srcdir)/,\ |
24 | $(sort $(dir $(wildcard $(srcdir)/*/))))) | 24 | $(sort $(dir $(wildcard $(srcdir)/*/))))) |
25 | 25 | ||
26 | # caller may set destination dir (when installing to asm/) | ||
27 | _dst := $(if $(dst),$(dst),$(obj)) | ||
28 | |||
29 | # Recursion | 26 | # Recursion |
30 | __headers: $(subdirs) | 27 | __headers: $(subdirs) |
31 | 28 | ||
32 | .PHONY: $(subdirs) | 29 | .PHONY: $(subdirs) |
33 | $(subdirs): | 30 | $(subdirs): |
34 | $(Q)$(MAKE) $(hdr-inst)=$(obj)/$@ dst=$(_dst)/$@ | 31 | $(Q)$(MAKE) $(hdr-inst)=$(obj)/$@ dst=$(dst)/$@ |
35 | 32 | ||
36 | # Skip header install/check for include/uapi and arch/$(hdr-arch)/include/uapi. | 33 | # Skip header install/check for include/uapi and arch/$(hdr-arch)/include/uapi. |
37 | # We have only sub-directories there. | 34 | # We have only sub-directories there. |
@@ -48,8 +45,7 @@ ifneq ($(wildcard $(old-kbuild-file)),) | |||
48 | include $(old-kbuild-file) | 45 | include $(old-kbuild-file) |
49 | endif | 46 | endif |
50 | 47 | ||
51 | installdir := $(INSTALL_HDR_PATH)/$(subst uapi/,,$(_dst)) | 48 | installdir := $(INSTALL_HDR_PATH)/$(dst) |
52 | |||
53 | gendir := $(objtree)/$(subst include/,include/generated/,$(obj)) | 49 | gendir := $(objtree)/$(subst include/,include/generated/,$(obj)) |
54 | header-files := $(notdir $(wildcard $(srcdir)/*.h)) | 50 | header-files := $(notdir $(wildcard $(srcdir)/*.h)) |
55 | header-files += $(notdir $(wildcard $(srcdir)/*.agh)) | 51 | header-files += $(notdir $(wildcard $(srcdir)/*.agh)) |