Skip to content

Commit c442763

Browse files
sravnborggregkh
authored andcommitted
kbuild: fix make headers_check with make 3.80
commit c4619bc upstream. Commit 10b6395 ("UAPI: Plumb the UAPI Kbuilds into the user header installation and checking") introduced a dependency of make 3.81 due to use of $(or ...) We do not want to lift the requirement to gmake 3.81 just yet... Included are a straightforward conversion to $(if ...) Bisected-and-tested-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 06aaf3b commit c442763

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

‎scripts/Makefile.headersinst‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# ==========================================================================
99

1010
# called may set destination dir (when installing to asm/)
11-
_dst := $(or $(destination-y),$(dst),$(obj))
11+
_dst := $(if $(destination-y),$(destination-y),$(if $(dst),$(dst),$(obj)))
1212

1313
# generated header directory
1414
gen := $(if $(gen),$(gen),$(subst include/,include/generated/,$(obj)))
@@ -48,13 +48,14 @@ all-files := $(header-y) $(genhdr-y) $(wrapper-files)
4848
output-files := $(addprefix $(installdir)/, $(all-files))
4949

5050
input-files := $(foreach hdr, $(header-y), \
51-
$(or \
51+
$(if $(wildcard $(srcdir)/$(hdr)), \
5252
$(wildcard $(srcdir)/$(hdr)), \
53-
$(wildcard $(oldsrcdir)/$(hdr)), \
54-
$(error Missing UAPI file $(srcdir)/$(hdr)) \
53+
$(if $(wildcard $(oldsrcdir)/$(hdr)), \
54+
$(wildcard $(oldsrcdir)/$(hdr)), \
55+
$(error Missing UAPI file $(srcdir)/$(hdr))) \
5556
)) \
5657
$(foreach hdr, $(genhdr-y), \
57-
$(or \
58+
$(if $(wildcard $(gendir)/$(hdr)), \
5859
$(wildcard $(gendir)/$(hdr)), \
5960
$(error Missing generated UAPI file $(gendir)/$(hdr)) \
6061
))

0 commit comments

Comments
 (0)