Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp832304rwb; Tue, 29 Nov 2022 06:02:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf7wlu6OWj4q24c8c5j6tamRuFm6K0U8/TyeTl8PqamYBxAxJyecV6WqnBp/Nr5VFmSCq8OB X-Received: by 2002:a17:90a:4a8f:b0:215:f80c:18e6 with SMTP id f15-20020a17090a4a8f00b00215f80c18e6mr66520134pjh.45.1669730549553; Tue, 29 Nov 2022 06:02:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669730549; cv=none; d=google.com; s=arc-20160816; b=YhA9VF5L5hNJi28STq0XHmh76pLb8IJ1Xj87r2CCo4upXcw9K8sLfF7MugX4SxI/J3 de1XJzNUQo41PZPzovhWNPqvCHpGBojQNCkIb98oxaZl0NPnPQ/gMdDq+TKvLOBIx+b5 5VzBCP2NAztr8w+66Ji+zx6UFt89V+5/tQIudHCpc9teFST3MhcB/6Ox+9OVjAog70HK X7N7AGVR+RPe0WAb9zLf6WHzsJ2vUyMU0C3KJa1xR9G7MwA3dBFQc3hkBsgohEu01Pbp 5gt4M7g3KyzxgSCSMLOi0bY0PoAGYI3T4USyT7wIgqPLWTCD+DjyVWwdmUq8tA6Yq6nY esCA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0k5rf78k7+OEY6nBWA1O7f1OJqZ5j+/qpJl/iZqmpyo=; b=cRgZFuoUljPTz4JUAnm9UYbULLQN9KRxV08EKaZU4FMmss3hv+eqrsWKgZxRkWFycf IX4PAYyw0AyE1GHPsL+e3LUXtxPkEAzKqqTigFA+uj6vG4cd/RJGL0CFEHbQhp18Su41 5isZEeDAfVnY+P6xzDOyS05fs/ifcXXJxvvCTo/oxSEEpu24DdUPrXRW38UvqL4dTOjU qNRfe5X1eWr/yHS8bhFtiszUloIVq6s0wrEqrdS7l+oEFUj1n8Y/tWv80ct9ZULaOlVA 9LCiT2seWNOxU7cdHSQTjVzKz3Ppww/8Ta9ujeNFFpuJgTgOC1odCAtfqzZKn1CYsZe1 SP6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XfzWpsAw; 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 j29-20020a63551d000000b0046ef5b3572fsi15106128pgb.562.2022.11.29.06.01.46; Tue, 29 Nov 2022 06:02:29 -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=XfzWpsAw; 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 S229768AbiK2NnN (ORCPT + 83 others); Tue, 29 Nov 2022 08:43:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234170AbiK2Nmx (ORCPT ); Tue, 29 Nov 2022 08:42:53 -0500 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82C80B867; Tue, 29 Nov 2022 05:42:50 -0800 (PST) Received: by mail-pl1-x62f.google.com with SMTP id io19so13424034plb.8; Tue, 29 Nov 2022 05:42:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0k5rf78k7+OEY6nBWA1O7f1OJqZ5j+/qpJl/iZqmpyo=; b=XfzWpsAwrdakVJ6T4hn6JM2PHV+n+hvfFFzsYM/gPTZps22qaFyz6bxZ61VE1jFaXK eKCTmWssI6VPH7OsgeM48JOdxXPTKbNb6LQfpJmzwcyHu/bdMIeuJUqAXyB7G0FCRE14 swdSU5eS9QCuFj3Zg+TIiJkCZuS32UuLxK+hQBPzV5uRDmzm4MaVygkKZFqMVYSbuhDZ +iE/NIkbCct3kp2Th0CNdV2X4h6DIFpQFqk3mzGiJKrXktqPm6kusYG08sjOZKK1GQRM NbnQLuJvkTRut+1y8lmS4+EZP1tOLmfIfVivsFTtTFcJI7dYtW29TJFCQs5yB3et+ySt mE3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0k5rf78k7+OEY6nBWA1O7f1OJqZ5j+/qpJl/iZqmpyo=; b=arNfjwsYkYTSZNJuYtM0qh0bGtTLtx/I0XzAk6KsghBR87IwkLDACitid+6Q2WAn9E 1s5ShgmGo+3Z/Kv0zyCoMvGGvhbi7uazJulDsK1s+dqZze7qve8VNVjTPr5kebnyj+TL iQs72icgQi7aS06th7QsCx3bCGyy4qE6y3PTij6XGAPKH0uezPu1rin+HfXYizRr6fQ9 lZZf4HOVIeOLemD/2QipQ62cXKM7TZXcnTSf+Ikvyqkr2Akc5LCCIWE08HvTWSmtM0Hp 0Qj5afjcQRsTx8Xo8/iyA1d7s5a7xWB6jUe2/7zYnwezqZTCsJJR0OKhvpkAha8uS8xP MulA== X-Gm-Message-State: ANoB5pk+4y06/YfF1rAxxP/EWRmrDhfIjueaHczsIuzWkCjuU00b9p1p o/lQtI79pHH8wFuhtTc/HSA= X-Received: by 2002:a17:90a:1a07:b0:212:fbab:446b with SMTP id 7-20020a17090a1a0700b00212fbab446bmr61121117pjk.146.1669729370013; Tue, 29 Nov 2022 05:42:50 -0800 (PST) Received: from WRT-WX9.. ([103.135.102.183]) by smtp.gmail.com with ESMTPSA id z5-20020aa79f85000000b005636326fdbfsm9977154pfr.78.2022.11.29.05.42.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Nov 2022 05:42:49 -0800 (PST) From: Changbin Du To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Quentin Monnet , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Shuah Khan Cc: Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Rutland , Alexander Shishkin , Namhyung Kim , Mykola Lysenko , linux-perf-users@vger.kernel.org, linux-kselftest@vger.kernel.org, Changbin Du Subject: [PATCH v2 2/2] bpf: makefiles: do not generate empty vmlinux.h Date: Tue, 29 Nov 2022 21:42:17 +0800 Message-Id: <20221129134217.52767-3-changbin.du@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221129134217.52767-1-changbin.du@gmail.com> References: <20221129134217.52767-1-changbin.du@gmail.com> 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 autolearn=ham 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 Remove the empty vmlinux.h if bpftool failed to dump btf info. The emptry vmlinux.h can hide real error when reading output of make. This is done by adding .DELETE_ON_ERROR special target in related makefiles. Signed-off-by: Changbin Du --- tools/bpf/bpftool/Makefile | 3 +++ tools/perf/Makefile.perf | 2 ++ tools/testing/selftests/bpf/Makefile | 3 +++ 3 files changed, 8 insertions(+) diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile index 4a95c017ad4c..f6b1e65085db 100644 --- a/tools/bpf/bpftool/Makefile +++ b/tools/bpf/bpftool/Makefile @@ -265,3 +265,6 @@ FORCE: .PHONY: all FORCE bootstrap clean install-bin install uninstall .PHONY: doc doc-clean doc-install doc-uninstall .DEFAULT_GOAL := all + +# Delete partially updated (corrupted) files on error +.DELETE_ON_ERROR: diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index a432e59afc42..265254fc641a 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -1149,3 +1149,5 @@ FORCE: .PHONY: libtraceevent_plugins archheaders endif # force_fixdep + +.DELETE_ON_ERROR: diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index e6cf21fad69f..f41c4b011221 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -617,3 +617,6 @@ EXTRA_CLEAN := $(TEST_CUSTOM_PROGS) $(SCRATCH_DIR) $(HOST_SCRATCH_DIR) \ liburandom_read.so) .PHONY: docs docs-clean + +# Delete partially updated (corrupted) files on error +.DELETE_ON_ERROR: -- 2.37.2