Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp366831pxm; Fri, 25 Feb 2022 09:28:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJzoGU2WX/tOOPvxqvASbPfRExgu/PNtK3fetp347FEcgsf9DWrN28zIOL9JM/dA1H9lG5// X-Received: by 2002:a17:902:d504:b0:14d:846f:e7da with SMTP id b4-20020a170902d50400b0014d846fe7damr2518984plg.133.1645810119354; Fri, 25 Feb 2022 09:28:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645810119; cv=none; d=google.com; s=arc-20160816; b=RyfgnPdKLNHHn6x9lRNQlresf4UpqizhwJgICpBBM9p3KMCGqfyg2QVC/dwriTAuEO elret2e4VghJD3OW+/ooMi6N2ORtm0FeYKKoN8zBNQUshxlBSdcZ/E95Y06QerFW74h+ 7PwG58OW47+uP/rvGgmMwhJcqk32B+zPYc+uhPKhi81uXE8nK1PGJCXyXhqf7X55eUP2 qm4e/jx5bOsOe21GZSJZnP7/nnJboDkMXjRQzhQlc8U8X2rzB1aOAObW9GckFK/HYH2s WFLzyXKNG9wPcSa+sJxlj3Cxd55tAeOJEGyd21FdDQYRFi36v64XSCgcdTqDOX2vKlzd 3J4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=sQMqEnEHCWXRJgwh1MyI+jkYXf/Rsu4bDyFVbGp4W1w=; b=APgB63ejDfBlOQxMB6sWb6UkB0jArkHW4yuMSXr/5m8VAOhPzWn9Edz0z9dcZY1EFp u0BYYAMJ9T/ISY1AWK6Hsek98hPYK7BCHkdj9dbDxMVGTBo7rTUZptSlftvAjLQ4bvI5 f2O4CMPXe2JlR4bWfmkTqlhgQf+qClE6zggTEeXL9BTiMVHZfDtGjWkQrdjIeExFueuT g3PdNkCcn+cmtvVipO9j8eaie5PrkZot9ghUiOnc3uFGJDeb2RS7Vn/uGYOzp9p1wTcU LbYGyOluYn0LQby4zMQYJtUWt4UoUCg8fC0PAIDVtAmwC5KN9B2RfOVd3bs87d+aHFcZ xUNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AgkgmM1e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j15-20020a63ec0f000000b00364c7c0906csi2219725pgh.853.2022.02.25.09.28.18; Fri, 25 Feb 2022 09:28:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AgkgmM1e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242730AbiBYQQA (ORCPT + 99 others); Fri, 25 Feb 2022 11:16:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242720AbiBYQP5 (ORCPT ); Fri, 25 Feb 2022 11:15:57 -0500 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A200F211322; Fri, 25 Feb 2022 08:15:24 -0800 (PST) Received: by mail-pg1-x52c.google.com with SMTP id 75so5057799pgb.4; Fri, 25 Feb 2022 08:15:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=sQMqEnEHCWXRJgwh1MyI+jkYXf/Rsu4bDyFVbGp4W1w=; b=AgkgmM1ek9aT15PnElgRBHwrw0YR+AHcsI4fXEzeAVDMLvvUgujg68skhzyj5KXgAj LHUVJB39SsZib1tLvw1x5uxbh/VaHMhzmE9nKdAwK39QR1tmStJkLX+HIlAzFrGEta8Y EtjPk4Uu9pbXe16PxsGKGAkVz3yJ186ufvbJD4d2a0wJYGnR1mNcDhdUv+r6XVlzdSSL rTC4xwDAf8+oJJuhcyUrPAoclXReAKuNP+vLk00l724GALLLhQg2uMGxkiif/xgQ6135 AXmC1VZiLbEFZ+ZolygiyDdzsGsrKhAKzdAPFj5fEF74UmAPIVUPv8EC/I9iHChlj77C qZfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=sQMqEnEHCWXRJgwh1MyI+jkYXf/Rsu4bDyFVbGp4W1w=; b=UhHBW7hx2AMsZHRSaU9xN+6zCVTTLk8sp/1WMKx2+WfZi6xv37tmbY42Ql2YzXsXKY jL0w/Qd6E7sh2yHOMLknEkGUT0k80IDrhAuaYstsW5TTFArNsgjPznV6hC6mJfa6jnse tnM8uzKKjasb9FxVBlhCq+M9laLGspHQF0vBK/NSEMOkEi18i3t+jyWXSR+mBRkkh2jj kw7WQ5HPGjVxHByWXwIEn3p1GBoqJzxfX6uchwQTLSOvLr2MQ3ns5doj9Vu5/18Me670 ZjQ9XUjiaOb3jKBEjHUWqh0conGkmbu/xTErEOrxJWGTi7gl4B6rImvwA2AqIOqVXhNI 3CdA== X-Gm-Message-State: AOAM531GVmWsonmrnO1mcBEtZPkoWP/k568Eu98KbEnx8LzirEhYn+z3 ZFcMHtloTLmlxKfkO1OSmQs69bzfNq+cKzBM X-Received: by 2002:a63:3ecc:0:b0:36c:63a3:1be with SMTP id l195-20020a633ecc000000b0036c63a301bemr6682175pga.353.1645805723859; Fri, 25 Feb 2022 08:15:23 -0800 (PST) Received: from localhost.localdomain ([223.212.58.71]) by smtp.gmail.com with ESMTPSA id z13-20020a63e10d000000b003733d6c90e4sm2958121pgh.82.2022.02.25.08.15.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 08:15:23 -0800 (PST) From: Yuntao Wang To: bpf@vger.kernel.org Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Quentin Monnet , Jean-Philippe Brucker , =?UTF-8?q?Mauricio=20V=C3=A1squez?= , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Yuntao Wang Subject: [PATCH bpf-next] bpftool: Remove redundant slashes Date: Sat, 26 Feb 2022 00:15:07 +0800 Message-Id: <20220225161507.470763-1-ytcoode@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UPPERCASE_50_75 autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since the _OUTPUT variable holds a value ending with a trailing slash, there is no need to add another one when defining BOOTSTRAP_OUTPUT and LIBBPF_OUTPUT variables. When defining LIBBPF_INCLUDE and LIBBPF_BOOTSTRAP_INCLUDE, we shouldn't add an extra slash either for the same reason. When building libbpf, the value of the DESTDIR argument should also not end with a trailing slash. Signed-off-by: Yuntao Wang --- tools/bpf/bpftool/Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile index ba647aede0d6..9800f966fd51 100644 --- a/tools/bpf/bpftool/Makefile +++ b/tools/bpf/bpftool/Makefile @@ -18,19 +18,19 @@ BPF_DIR = $(srctree)/tools/lib/bpf ifneq ($(OUTPUT),) _OUTPUT := $(OUTPUT) else - _OUTPUT := $(CURDIR) + _OUTPUT := $(CURDIR)/ endif -BOOTSTRAP_OUTPUT := $(_OUTPUT)/bootstrap/ +BOOTSTRAP_OUTPUT := $(_OUTPUT)bootstrap/ -LIBBPF_OUTPUT := $(_OUTPUT)/libbpf/ +LIBBPF_OUTPUT := $(_OUTPUT)libbpf/ LIBBPF_DESTDIR := $(LIBBPF_OUTPUT) -LIBBPF_INCLUDE := $(LIBBPF_DESTDIR)/include +LIBBPF_INCLUDE := $(LIBBPF_DESTDIR)include LIBBPF_HDRS_DIR := $(LIBBPF_INCLUDE)/bpf LIBBPF := $(LIBBPF_OUTPUT)libbpf.a LIBBPF_BOOTSTRAP_OUTPUT := $(BOOTSTRAP_OUTPUT)libbpf/ LIBBPF_BOOTSTRAP_DESTDIR := $(LIBBPF_BOOTSTRAP_OUTPUT) -LIBBPF_BOOTSTRAP_INCLUDE := $(LIBBPF_BOOTSTRAP_DESTDIR)/include +LIBBPF_BOOTSTRAP_INCLUDE := $(LIBBPF_BOOTSTRAP_DESTDIR)include LIBBPF_BOOTSTRAP_HDRS_DIR := $(LIBBPF_BOOTSTRAP_INCLUDE)/bpf LIBBPF_BOOTSTRAP := $(LIBBPF_BOOTSTRAP_OUTPUT)libbpf.a @@ -44,7 +44,7 @@ $(LIBBPF_OUTPUT) $(BOOTSTRAP_OUTPUT) $(LIBBPF_BOOTSTRAP_OUTPUT) $(LIBBPF_HDRS_DI $(LIBBPF): $(wildcard $(BPF_DIR)/*.[ch] $(BPF_DIR)/Makefile) | $(LIBBPF_OUTPUT) $(Q)$(MAKE) -C $(BPF_DIR) OUTPUT=$(LIBBPF_OUTPUT) \ - DESTDIR=$(LIBBPF_DESTDIR) prefix= $(LIBBPF) install_headers + DESTDIR=$(LIBBPF_DESTDIR:/=) prefix= $(LIBBPF) install_headers $(LIBBPF_INTERNAL_HDRS): $(LIBBPF_HDRS_DIR)/%.h: $(BPF_DIR)/%.h | $(LIBBPF_HDRS_DIR) $(call QUIET_INSTALL, $@) @@ -52,7 +52,7 @@ $(LIBBPF_INTERNAL_HDRS): $(LIBBPF_HDRS_DIR)/%.h: $(BPF_DIR)/%.h | $(LIBBPF_HDRS_ $(LIBBPF_BOOTSTRAP): $(wildcard $(BPF_DIR)/*.[ch] $(BPF_DIR)/Makefile) | $(LIBBPF_BOOTSTRAP_OUTPUT) $(Q)$(MAKE) -C $(BPF_DIR) OUTPUT=$(LIBBPF_BOOTSTRAP_OUTPUT) \ - DESTDIR=$(LIBBPF_BOOTSTRAP_DESTDIR) prefix= \ + DESTDIR=$(LIBBPF_BOOTSTRAP_DESTDIR:/=) prefix= \ ARCH= CROSS_COMPILE= CC=$(HOSTCC) LD=$(HOSTLD) $@ install_headers $(LIBBPF_BOOTSTRAP_INTERNAL_HDRS): $(LIBBPF_BOOTSTRAP_HDRS_DIR)/%.h: $(BPF_DIR)/%.h | $(LIBBPF_BOOTSTRAP_HDRS_DIR) -- 2.35.1