From patchwork Sun Oct 13 23:11:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 283130 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 652F92C035F for ; Mon, 14 Oct 2013 10:12:25 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 97CE432D1C; Sun, 13 Oct 2013 23:12:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XagWrk4sEnmT; Sun, 13 Oct 2013 23:12:15 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id E085432CF2; Sun, 13 Oct 2013 23:11:47 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 704AD1BFA58 for ; Sun, 13 Oct 2013 23:11:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6ADE68B49B for ; Sun, 13 Oct 2013 23:11:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v89ykBKJmYEI for ; Sun, 13 Oct 2013 23:11:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by whitealder.osuosl.org (Postfix) with ESMTPS id B46828B45C for ; Sun, 13 Oct 2013 23:11:39 +0000 (UTC) Received: by mail-wg0-f47.google.com with SMTP id c11so1596544wgh.2 for ; Sun, 13 Oct 2013 16:11:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=knxjnvIPyRBmCdRIYVgaIsXz2akhqgo9TIJ8/2xjhSk=; b=NGHaSEQUHCYkMSwfhruFVnnjQMWHYnNZpN4DQZvvMv7qafhwXUhc6jpUWVWJSzOxZt BstevT9RvCrJt7wvEHxAqX8bNol6srLkOa8r/LsRP6gm0e7ukz5CdHlnvrs/5OQLzuLc r/RHa7ZcFfbgtzgO80JPyghMPGqxDxl2/2gZUvO8p2gVQNM8HQ0mNkOcISpJuzC2/Sds E/jx3Rj4jYIHATqOdmuoJDMV19lwnJi38fpXrajObgwfRmeNVTOQu+t/VCJumikNXb3u yDtJKsoGwZHHNEo1Nlod3ra7c/LDMuk32VSQAmdfGuo7UaUMwSi/0r0PxLqoh/ulQvDH hk7w== X-Received: by 10.194.173.163 with SMTP id bl3mr27359800wjc.10.1381705898335; Sun, 13 Oct 2013 16:11:38 -0700 (PDT) Received: from gourin.bzh.lan (ks3095497.kimsufi.com. [94.23.60.27]) by mx.google.com with ESMTPSA id ft19sm28495163wic.5.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 13 Oct 2013 16:11:37 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@busybox.net Date: Mon, 14 Oct 2013 01:11:28 +0200 Message-Id: <3f8ce54570cde2f93d5f61c80a1b28af046b4926.1381705600.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: References: In-Reply-To: References: Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH 4/4] pkg-infra: add user-supplied step-hooks X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net From: "Yann E. MORIN" Allow user to supply their own step-hooks by passing a variable on the make command-line: make BR2_STEP_USER_HOOK=/path/to/my/script This can be usefull to run site-specific actions at each step of the build process, such as logging installed, removed or modified files, do sanity checks on installed files... Signed-off-by: "Yann E. MORIN" --- package/pkg-generic.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 162c9ed..f5c33b2 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -42,6 +42,14 @@ define step_time endef STEP_HOOKS += step_time +# User-supplied script +define step_user + "$(BR2_STEP_USER_HOOK)" "$(1)" "$(2)" "$($(PKG)_NAME)" +endef +ifneq ($(BR2_STEP_USER_HOOK),) +STEP_HOOKS += step_user +endif + ################################################################################ # Implicit targets -- produce a stamp file for each step of a package build ################################################################################