From patchwork Tue Aug 2 12:35:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 1663005 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LxvcV12vDz9s5W for ; Tue, 2 Aug 2022 22:36:25 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 83E854088E; Tue, 2 Aug 2022 12:36:23 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 83E854088E X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id e5HWCf279bjb; Tue, 2 Aug 2022 12:36:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 53A3440867; Tue, 2 Aug 2022 12:36:21 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 53A3440867 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 349141BF366 for ; Tue, 2 Aug 2022 12:36:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 0AD4740867 for ; Tue, 2 Aug 2022 12:36:20 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 0AD4740867 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o5ePdjlqzOVb for ; Tue, 2 Aug 2022 12:36:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org ACC9440861 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by smtp4.osuosl.org (Postfix) with ESMTPS id ACC9440861 for ; Tue, 2 Aug 2022 12:36:18 +0000 (UTC) Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id B6D2910000C; Tue, 2 Aug 2022 12:36:12 +0000 (UTC) From: Quentin Schulz To: buildroot@buildroot.org Date: Tue, 2 Aug 2022 14:35:59 +0200 Message-Id: <20220802123559.2514433-1-foss+buildroot@0leil.net> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] Makefile: error out printvars target when VARS is empty or unset X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Quentin Schulz , Quentin Schulz , yann.morin.1998@free.fr Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" From: Quentin Schulz printvars returns nothing when VARS is not passed or empty. This is done on purpose, see commit fd5bd12379dc ("Makefile: printvars: don't print anything when VARS is not set"). An error message making explicit what is required from the user in order to use printvars is however better than silently doing nothing. This adds a check for a non-empty VARS variable. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index a743e42f91..3cbcfa9196 100644 --- a/Makefile +++ b/Makefile @@ -1058,6 +1058,10 @@ endif # to workaround a bug in make 4.3; see https://savannah.gnu.org/bugs/?59093 .PHONY: printvars printvars: +ifndef VARS + @echo "Please pass a non-empty VARS to 'make printvars'" + @exit 1 +endif @: $(foreach V, \ $(sort $(foreach X, $(.VARIABLES), $(filter $(VARS),$(X)))), \