aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.headersinst
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-10 19:05:40 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-10 19:05:40 -0400
commitcb63fc26623ee38fd84d71ea5a98189240ec2e1b (patch)
tree888721f9f48126b0f25711adbd82957d0f965781 /scripts/Makefile.headersinst
parenta9642fa351c9dbf930ad2b5a1c17f3cfe2f62820 (diff)
parent4d47dde47f7dd95042fa56283d948f50dd4b509c (diff)
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild updates from Michal Marek: - fix for make headers_install argv explosion with too long path - scripts/setlocalversion does not call git update-index needlessly - fix for the src.rpm produced by make rpm-pkg. The new make image_name can be useful also for other packaging tools. - scripts/mod/devicetable-offsets.o is not rebuilt during each make run - make modules_install dependency fix - scripts/sortextable portability fix - fix for kbuild to generate the output directory for all object files in subdirs. - a couple of minor fixes * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild: create directory for dir/file.o tools/include: use stdint types for user-space byteshift headers Makefile: Fix install error with make -j option Fix a build warning in scripts/mod/file2alias.c improve modalias building scripts/mod: Spelling s/DEVICEVTABLE/DEVICETABLE/ kbuild: fix error when building from src rpm scripts/setlocalversion on write-protected source tree Makefile.lib: align DTB quiet_cmd kbuild: fix make headers_install when path is too long
Diffstat (limited to 'scripts/Makefile.headersinst')
-rw-r--r--scripts/Makefile.headersinst20
1 files changed, 14 insertions, 6 deletions
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 182084d728c8..8ccf83056a7a 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -47,18 +47,24 @@ header-y := $(filter-out $(generic-y), $(header-y))
47all-files := $(header-y) $(genhdr-y) $(wrapper-files) 47all-files := $(header-y) $(genhdr-y) $(wrapper-files)
48output-files := $(addprefix $(installdir)/, $(all-files)) 48output-files := $(addprefix $(installdir)/, $(all-files))
49 49
50input-files := $(foreach hdr, $(header-y), \ 50input-files1 := $(foreach hdr, $(header-y), \
51 $(if $(wildcard $(srcdir)/$(hdr)), \ 51 $(if $(wildcard $(srcdir)/$(hdr)), \
52 $(wildcard $(srcdir)/$(hdr)), \ 52 $(wildcard $(srcdir)/$(hdr))) \
53 )
54input-files1-name := $(notdir $(input-files1))
55input-files2 := $(foreach hdr, $(header-y), \
56 $(if $(wildcard $(srcdir)/$(hdr)),, \
53 $(if $(wildcard $(oldsrcdir)/$(hdr)), \ 57 $(if $(wildcard $(oldsrcdir)/$(hdr)), \
54 $(wildcard $(oldsrcdir)/$(hdr)), \ 58 $(wildcard $(oldsrcdir)/$(hdr)), \
55 $(error Missing UAPI file $(srcdir)/$(hdr))) \ 59 $(error Missing UAPI file $(srcdir)/$(hdr))) \
56 )) \ 60 ))
57 $(foreach hdr, $(genhdr-y), \ 61input-files2-name := $(notdir $(input-files2))
62input-files3 := $(foreach hdr, $(genhdr-y), \
58 $(if $(wildcard $(gendir)/$(hdr)), \ 63 $(if $(wildcard $(gendir)/$(hdr)), \
59 $(wildcard $(gendir)/$(hdr)), \ 64 $(wildcard $(gendir)/$(hdr)), \
60 $(error Missing generated UAPI file $(gendir)/$(hdr)) \ 65 $(error Missing generated UAPI file $(gendir)/$(hdr)) \
61 )) 66 ))
67input-files3-name := $(notdir $(input-files3))
62 68
63# Work out what needs to be removed 69# Work out what needs to be removed
64oldheaders := $(patsubst $(installdir)/%,%,$(wildcard $(installdir)/*.h)) 70oldheaders := $(patsubst $(installdir)/%,%,$(wildcard $(installdir)/*.h))
@@ -72,7 +78,9 @@ printdir = $(patsubst $(INSTALL_HDR_PATH)/%/,%,$(dir $@))
72quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\ 78quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\
73 file$(if $(word 2, $(all-files)),s)) 79 file$(if $(word 2, $(all-files)),s))
74 cmd_install = \ 80 cmd_install = \
75 $(CONFIG_SHELL) $< $(installdir) $(input-files); \ 81 $(CONFIG_SHELL) $< $(installdir) $(srcdir) $(input-files1-name); \
82 $(CONFIG_SHELL) $< $(installdir) $(oldsrcdir) $(input-files2-name); \
83 $(CONFIG_SHELL) $< $(installdir) $(gendir) $(input-files3-name); \
76 for F in $(wrapper-files); do \ 84 for F in $(wrapper-files); do \
77 echo "\#include <asm-generic/$$F>" > $(installdir)/$$F; \ 85 echo "\#include <asm-generic/$$F>" > $(installdir)/$$F; \
78 done; \ 86 done; \
@@ -98,7 +106,7 @@ __headersinst: $(subdirs) $(install-file)
98 @: 106 @:
99 107
100targets += $(install-file) 108targets += $(install-file)
101$(install-file): scripts/headers_install.sh $(input-files) FORCE 109$(install-file): scripts/headers_install.sh $(input-files1) $(input-files2) $(input-files3) FORCE
102 $(if $(unwanted),$(call cmd,remove),) 110 $(if $(unwanted),$(call cmd,remove),)
103 $(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@))) 111 $(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@)))
104 $(call if_changed,install) 112 $(call if_changed,install)