diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-07-09 14:32:35 -0400 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-07-09 14:43:19 -0400 |
commit | a8ff49a1d92da4eb566d026adc43946852975129 (patch) | |
tree | de89a4354cdc5e30d1fa676b12cd67a9669325bd /scripts/Makefile.headersinst | |
parent | 0f042eea0a4a4fb1b1999784d745a47c0bb2c2f9 (diff) |
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: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/Makefile.headersinst')
-rw-r--r-- | scripts/Makefile.headersinst | 8 |
1 files changed, 2 insertions, 6 deletions
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)) |