Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 21567ede authored by Jakub Kicinski's avatar Jakub Kicinski Committed by Daniel Borkmann
Browse files

libbpf: fix Makefile exit code if libelf not found



/bin/sh's exit does not recognize -1 as a number, leading to
the following error message:

/bin/sh: 1: exit: Illegal number: -1

Use 1 as the exit code.

Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: default avatarQuentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent ef9fde06
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -213,10 +213,10 @@ PHONY += force elfdep bpfdep
force:

elfdep:
	@if [ "$(feature-libelf)" != "1" ]; then echo "No libelf found"; exit -1 ; fi
	@if [ "$(feature-libelf)" != "1" ]; then echo "No libelf found"; exit 1 ; fi

bpfdep:
	@if [ "$(feature-bpf)" != "1" ]; then echo "BPF API too old"; exit -1 ; fi
	@if [ "$(feature-bpf)" != "1" ]; then echo "BPF API too old"; exit 1 ; fi

# Declare the contents of the .PHONY variable as phony.  We keep that
# information in a variable so we can use it in if_changed and friends.