From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BFCC1C4338F for ; Thu, 5 Aug 2021 21:28:26 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 661B060F42 for ; Thu, 5 Aug 2021 21:28:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 661B060F42 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=busybox.net Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 2801B83A0C; Thu, 5 Aug 2021 21:28:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P1a0PU-Y3voG; Thu, 5 Aug 2021 21:28:25 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 7A182839CD; Thu, 5 Aug 2021 21:28:24 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 074E91BF2BB for ; Thu, 5 Aug 2021 21:27:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id EB2CA402FA for ; Thu, 5 Aug 2021 21:27:47 +0000 (UTC) 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 CXLgv_BKpnvX for ; Thu, 5 Aug 2021 21:27:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by smtp4.osuosl.org (Postfix) with ESMTPS id 30B8640270 for ; Thu, 5 Aug 2021 21:27:46 +0000 (UTC) Received: (Authenticated sender: thomas.petazzoni@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 53D3F240004; Thu, 5 Aug 2021 21:27:45 +0000 (UTC) From: Thomas Petazzoni To: buildroot@buildroot.org Date: Thu, 5 Aug 2021 23:27:35 +0200 Message-Id: <20210805212736.2799576-4-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210805212736.2799576-1-thomas.petazzoni@bootlin.com> References: <20210805212736.2799576-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 4/4] package/freescale-imx/imx-gpu-viv: use make loops instead of shell loops X-BeenThere: buildroot@busybox.net 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: Refik Tuzakli , Thomas Petazzoni , Gary Bisson Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" We generally prefer using make loops instead of shell loops. They bring automatic error handling, as they abort the loop when there is an error, without the need for "|| exit 1". Signed-off-by: Thomas Petazzoni --- package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk index df39d3ddc2..fec19523a3 100644 --- a/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk +++ b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk @@ -52,9 +52,9 @@ define IMX_GPU_VIV_FIXUP_PKGCONFIG endef else ifeq ($(IMX_GPU_VIV_LIB_TARGET),x11) define IMX_GPU_VIV_FIXUP_PKGCONFIG - for lib in egl gbm glesv1_cm glesv2 vg; do \ - ln -sf $${lib}_x11.pc $(@D)/gpu-core/usr/lib/pkgconfig/$${lib}.pc || exit 1; \ - done + $(foreach lib,egl gbm glesv1_cm glesv2 vg, \ + ln -sf $(lib)_x11.pc $(@D)/gpu-core/usr/lib/pkgconfig/$(lib).pc + ) endef endif @@ -63,9 +63,9 @@ endif # Make sure these commands are idempotent. define IMX_GPU_VIV_BUILD_CMDS cp -dpfr $(@D)/gpu-core/usr/lib/$(IMX_GPU_VIV_LIB_TARGET)/* $(@D)/gpu-core/usr/lib/ - for backend in fb x11 wayland; do \ - $(RM) -r $(@D)/gpu-core/usr/lib/$$backend ; \ - done + $(foreach backend,fb x11 wayland, \ + $(RM) -r $(@D)/gpu-core/usr/lib/$(backend) + ) $(IMX_GPU_VIV_FIXUP_PKGCONFIG) endef -- 2.31.1 _______________________________________________ buildroot mailing list buildroot@busybox.net http://lists.busybox.net/mailman/listinfo/buildroot