History

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.

Masahiro Yamada committed 9 years ago

Commit a8ff49a1 parent 0f042ee2 files · +4 −8Browse files

Showing the changes to scripts (1 of 2 files). Show all

Unified · Split

scripts/Makefile.headersinst+2−6
@@ -23,15 +23,12 @@ subdirs := $(patsubst $(srcdir)/%/,%,\ · 22 unmodified lines
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# Recursion26# 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)),) · 10 unmodified lines
48include $(old-kbuild-file)45include $(old-kbuild-file)
49endif46endif
50 47
51installdir := $(INSTALL_HDR_PATH)/$(subst uapi/,,$(_dst))48installdir := $(INSTALL_HDR_PATH)/$(dst)
52
53gendir := $(objtree)/$(subst include/,include/generated/,$(obj))49gendir := $(objtree)/$(subst include/,include/generated/,$(obj))
54header-files := $(notdir $(wildcard $(srcdir)/*.h))50header-files := $(notdir $(wildcard $(srcdir)/*.h))
55header-files += $(notdir $(wildcard $(srcdir)/*.agh))51header-files += $(notdir $(wildcard $(srcdir)/*.agh))