aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.headersinst
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Makefile.headersinst')
-rw-r--r--scripts/Makefile.headersinst11
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 25f216a841d5..477d137c0557 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -14,7 +14,7 @@ kbuild-file := $(srctree)/$(obj)/Kbuild
14include $(kbuild-file) 14include $(kbuild-file)
15 15
16# called may set destination dir (when installing to asm/) 16# called may set destination dir (when installing to asm/)
17_dst := $(or $(destination-y),$(dst),$(obj)) 17_dst := $(if $(destination-y),$(destination-y),$(if $(dst),$(dst),$(obj)))
18 18
19old-kbuild-file := $(srctree)/$(subst uapi/,,$(obj))/Kbuild 19old-kbuild-file := $(srctree)/$(subst uapi/,,$(obj))/Kbuild
20ifneq ($(wildcard $(old-kbuild-file)),) 20ifneq ($(wildcard $(old-kbuild-file)),)
@@ -48,13 +48,14 @@ all-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-files := $(foreach hdr, $(header-y), \
51 $(or \ 51 $(if $(wildcard $(srcdir)/$(hdr)), \
52 $(wildcard $(srcdir)/$(hdr)), \ 52 $(wildcard $(srcdir)/$(hdr)), \
53 $(wildcard $(oldsrcdir)/$(hdr)), \ 53 $(if $(wildcard $(oldsrcdir)/$(hdr)), \
54 $(error Missing UAPI file $(srcdir)/$(hdr)) \ 54 $(wildcard $(oldsrcdir)/$(hdr)), \
55 $(error Missing UAPI file $(srcdir)/$(hdr))) \
55 )) \ 56 )) \
56 $(foreach hdr, $(genhdr-y), \ 57 $(foreach hdr, $(genhdr-y), \
57 $(or \ 58 $(if $(wildcard $(gendir)/$(hdr)), \
58 $(wildcard $(gendir)/$(hdr)), \ 59 $(wildcard $(gendir)/$(hdr)), \
59 $(error Missing generated UAPI file $(gendir)/$(hdr)) \ 60 $(error Missing generated UAPI file $(gendir)/$(hdr)) \
60 )) 61 ))