From patchwork Fri Aug 10 21:51:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 956484 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41nJkG04N7z9s47 for ; Sat, 11 Aug 2018 07:52:05 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 8D29A88126; Fri, 10 Aug 2018 21:52:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jm3n-zH+J2zD; Fri, 10 Aug 2018 21:51:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id D28CE88117; Fri, 10 Aug 2018 21:51:59 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id C32051BFC4A for ; Fri, 10 Aug 2018 21:51:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BF3D188117 for ; Fri, 10 Aug 2018 21:51:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bSCEhqE8GsXu for ; Fri, 10 Aug 2018 21:51:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.bootlin.com (mail.bootlin.com [62.4.15.54]) by whitealder.osuosl.org (Postfix) with ESMTP id 5614F88112 for ; Fri, 10 Aug 2018 21:51:57 +0000 (UTC) Received: by mail.bootlin.com (Postfix, from userid 110) id EF77B20739; Fri, 10 Aug 2018 23:51:54 +0200 (CEST) Received: from localhost (132.230.147.77.rev.sfr.net [77.147.230.132]) by mail.bootlin.com (Postfix) with ESMTPSA id 3A7852069C; Fri, 10 Aug 2018 23:51:54 +0200 (CEST) From: Thomas Petazzoni To: "Arnout Vandecappelle (Essensium/Mind)" , "Yann E. MORIN" , Ricardo Martincoski , Buildroot List Date: Fri, 10 Aug 2018 23:51:53 +0200 Message-Id: <20180810215153.22987-1-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.14.4 Subject: [Buildroot] [PATCH] Makefile: introduce check-package target X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The snippet of code that runs a check-package on all .mk/.hash/Config.in files is currently only available within .gitlab-ci.yml, and isn't immediately and easily usable by Buildroot users. In order to simplify this, this commit introduces a top-level "check-package" make target that implements the same logic. The .gitlab-ci.yml file is changed to use "make check-package". Since this target is oriented towards Buildroot developers, we intentionally do not clutter the already noisy "make help" text with this additional make target. Signed-off-by: Thomas Petazzoni --- I often found myself copy/pasting this find command line from .gitlab-ci.yml to my shell, and got tired of doing this, hence this patch. --- .gitlab-ci.yml | 3 +-- Makefile | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9d4301076f..d4807c5c85 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,8 +43,7 @@ check-flake8: check-package: script: - - find . -type f \( -name '*.mk' -o -name '*.hash' -o -name 'Config.*' \) - -exec ./utils/check-package {} + + - make check-package .defconfig: &defconfig # Running the defconfigs for every push is too much, so limit to diff --git a/Makefile b/Makefile index f79d39fd26..e7fb216442 100644 --- a/Makefile +++ b/Makefile @@ -1125,6 +1125,10 @@ release: print-version: @echo $(BR2_VERSION_FULL) +check-package: + find $(TOPDIR) -type f \( -name '*.mk' -o -name '*.hash' -o -name 'Config.*' \) \ + -exec ./utils/check-package {} + + .PHONY: .gitlab-ci.yml .gitlab-ci.yml: .gitlab-ci.yml.in cp $< $@