From patchwork Mon Feb 3 01:18:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Hadjinlian X-Patchwork-Id: 316050 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 90A102C0097 for ; Mon, 3 Feb 2014 12:18:47 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 447E18B10C; Mon, 3 Feb 2014 01:18:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tt-ASYd9yjJt; Mon, 3 Feb 2014 01:18:45 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 21A758B782; Mon, 3 Feb 2014 01:18:45 +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 6B5A91C245D for ; Mon, 3 Feb 2014 01:18:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6120B8B88F for ; Mon, 3 Feb 2014 01:18:43 +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 kmGhc7IED7Al for ; Mon, 3 Feb 2014 01:18:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ea0-f180.google.com (mail-ea0-f180.google.com [209.85.215.180]) by whitealder.osuosl.org (Postfix) with ESMTPS id 34A558B881 for ; Mon, 3 Feb 2014 01:18:42 +0000 (UTC) Received: by mail-ea0-f180.google.com with SMTP id o10so3365672eaj.25 for ; Sun, 02 Feb 2014 17:18:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=Q/k/Sh9T5nlBW5dNkMHlfrOPsdkfASz3tfRttA8a47w=; b=jBU8Q7XaQb2C2JV30gLPlQQiX5VUKoptj3M3TKYEIYqMrSvjWtwad97cq8rZcTkxBo pKl5ou/+wruuQAgXcZoR7rKaQPDX2qhRnnF4aJBq3dwEIBo5x4EpDuTWgxuAtJ+OJNqA vEuDGG3zGV2C255+oNW8R1v5mwJj/FHTqMLwsQd7oaK8bS2DwqUUANh8+HHgHTohCJu/ aJy/2BswTNWB8F/RA4zyjCa4qLzwZpe26pXFGKVzQcnicnGhij4St7hCzhXiUDnfIc8p ui9pYRwEP2UfaTUQKfsufwW+aC94w8hlPgWAkg79r5GhSIxTKtmGz9w7ECb115bTU7uY MLTw== X-Received: by 10.14.194.2 with SMTP id l2mr1754604een.39.1391390320504; Sun, 02 Feb 2014 17:18:40 -0800 (PST) Received: from localhost ([91.183.82.202]) by mx.google.com with ESMTPSA id 8sm68430049eeq.15.2014.02.02.17.18.39 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 02 Feb 2014 17:18:39 -0800 (PST) From: Maxime Hadjinlian To: buildroot@busybox.net Date: Mon, 3 Feb 2014 02:18:31 +0100 Message-Id: <1391390312-15662-1-git-send-email-maxime.hadjinlian@gmail.com> X-Mailer: git-send-email 1.8.5.3 Subject: [Buildroot] [PATCH 1/2] package: Add PRE_BUILD_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 This hooks, even though it is preceded by the POST_CONFIGURE_HOOKS, this hooks is semantically different and allow for a nice separation. While adding libenca, this step was not present and I needed to build a tool which generates a header files for the build. And I had to add it to the POST_CONFIGURE_HOOKS which make little sense since it has nothing to do with the configure step. Signed-off-by: Maxime Hadjinlian --- docs/manual/adding-packages-hooks.txt | 1 + package/pkg-generic.mk | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/manual/adding-packages-hooks.txt b/docs/manual/adding-packages-hooks.txt index d96c991..ec709ab 100644 --- a/docs/manual/adding-packages-hooks.txt +++ b/docs/manual/adding-packages-hooks.txt @@ -21,6 +21,7 @@ The following hook points are available: * +LIBFOO_POST_PATCH_HOOKS+ * +LIBFOO_PRE_CONFIGURE_HOOKS+ * +LIBFOO_POST_CONFIGURE_HOOKS+ +* +LIBFOO_PRE_BUILD_HOOKS+ * +LIBFOO_POST_BUILD_HOOKS+ * +LIBFOO_POST_INSTALL_HOOKS+ (for host packages only) * +LIBFOO_POST_INSTALL_STAGING_HOOKS+ (for target packages only) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 1b99c2a..b6ed122 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -172,6 +172,7 @@ $(BUILD_DIR)/%/.stamp_configured: # Build $(BUILD_DIR)/%/.stamp_built:: @$(call step_start,build) + $(foreach hook,$($(PKG)_PRE_BUILD_HOOKS),$(call $(hook))$(sep)) @$(call MESSAGE,"Building") $($(PKG)_BUILD_CMDS) $(foreach hook,$($(PKG)_POST_BUILD_HOOKS),$(call $(hook))$(sep))