From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: [PATCH bpf-next] libbpf: fix Makefile exit code if libelf not found Date: Fri, 15 Dec 2017 16:19:30 -0800 Message-ID: <20171216001930.21836-1-jakub.kicinski@netronome.com> Cc: oss-drivers@netronome.com, daniel@iogearbox.net, alexei.starovoitov@gmail.com, Jakub Kicinski To: netdev@vger.kernel.org Return-path: Received: from mail-pf0-f193.google.com ([209.85.192.193]:42709 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755864AbdLPAT4 (ORCPT ); Fri, 15 Dec 2017 19:19:56 -0500 Received: by mail-pf0-f193.google.com with SMTP id d23so7253408pfe.9 for ; Fri, 15 Dec 2017 16:19:56 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: /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: Jakub Kicinski Reviewed-by: Quentin Monnet --- tools/lib/bpf/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile index 4555304dc18e..8ed43ae9db9b 100644 --- a/tools/lib/bpf/Makefile +++ b/tools/lib/bpf/Makefile @@ -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. -- 2.15.1