From patchwork Fri Nov 1 16:06:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 287869 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 962E82C008F for ; Sat, 2 Nov 2013 03:10:47 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 6B20132E01; Fri, 1 Nov 2013 16:10:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aFYOz43Q+xwu; Fri, 1 Nov 2013 16:10:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 5DD2432DB7; Fri, 1 Nov 2013 16:10:25 +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 2360A1CE79B for ; Fri, 1 Nov 2013 16:10:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1F2AD8C3E7 for ; Fri, 1 Nov 2013 16:10:20 +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 bKwgFF6tl5fq for ; Fri, 1 Nov 2013 16:10:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ea0-f173.google.com (mail-ea0-f173.google.com [209.85.215.173]) by whitealder.osuosl.org (Postfix) with ESMTPS id 06AAB8C1CE for ; Fri, 1 Nov 2013 16:10:18 +0000 (UTC) Received: by mail-ea0-f173.google.com with SMTP id g10so2163810eak.18 for ; Fri, 01 Nov 2013 09:10:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:content-transfer-encoding:subject :message-id:in-reply-to:references:user-agent:date:from:to:cc; bh=GyPYhnJ9OQ6bM6fZI6LgYcjZADtbuGb3Gba+0IJnAvE=; b=KwzL4tIo8SGdUqrq75pk/V9rReGAuoLiE6f2kZA0bzCJgwSVlgoIzRTLjS2r+HFlKL ojtjgpm8GsX+Yn25ppvza2FgZMC+E4t/iI0ONn+Ka0inqlax+VzdE7KA/DmnbWK2Pb59 5Ss0Olfa0tA3hWT0njrk1Yw2pKmlRTTVEbkyBm3Avd+8iPfyouJj3RyEwHt5ch4aPFEW yMPtk0xuk1i+5n96Myrbs1XeipOUodCK4efWKyowwPO01W5Inr6c1t7FSqArHZefX0rE VWiO9DYc4my0UJUB7p3ssaSdYe5//rbKocpyewaQa+bek500+eFfORxYwe20Zr1FUXEQ gRPw== X-Received: by 10.14.95.137 with SMTP id p9mr63862eef.73.1383322217539; Fri, 01 Nov 2013 09:10:17 -0700 (PDT) Received: from [127.0.1.1] (d54C62EEB.access.telenet.be. [84.198.46.235]) by mx.google.com with ESMTPSA id e13sm9414026eeu.4.2013.11.01.09.10.16 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 01 Nov 2013 09:10:16 -0700 (PDT) MIME-Version: 1.0 X-Mercurial-Node: 5c6b13a01d904a47ea33fe73ccb39c1171fa7067 Message-Id: <5c6b13a01d904a47ea33.1383322008@argentina> In-Reply-To: References: User-Agent: Mercurial-patchbomb/2.2.2 Date: Fri, 01 Nov 2013 17:06:48 +0100 From: Thomas De Schampheleire To: buildroot@busybox.net Cc: tjlee@ambarella.com Subject: [Buildroot] [PATCH 3 of 4] manual: split info on hooks to a separate section/file 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: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Split out the information on hooks to a separate section (and source file). Not only because the hooks are useful for all infrastructures (and thus don't really fit specifically in the generic infrastructure section), but also for clarity when the info on hooks will be expanded in later patches. Signed-off-by: Thomas De Schampheleire --- docs/manual/adding-packages-autotools.txt | 3 +- docs/manual/adding-packages-cmake.txt | 3 +- docs/manual/adding-packages-generic.txt | 40 +------------------------- docs/manual/adding-packages-hooks.txt | 41 +++++++++++++++++++++++++++ docs/manual/adding-packages.txt | 2 + 5 files changed, 46 insertions(+), 43 deletions(-) diff --git a/docs/manual/adding-packages-autotools.txt b/docs/manual/adding-packages-autotools.txt --- a/docs/manual/adding-packages-autotools.txt +++ b/docs/manual/adding-packages-autotools.txt @@ -162,8 +162,7 @@ well for most autotools-based packages. still possible to customize what is done in any particular step: * By adding a post-operation hook (after extract, patch, configure, - build or install). See the reference documentation of the generic - infrastructure for details. + build or install). See xref:hooks[] for details. * By overriding one of the steps. For example, even if the autotools infrastructure is used, if the package +.mk+ file defines its diff --git a/docs/manual/adding-packages-cmake.txt b/docs/manual/adding-packages-cmake.txt --- a/docs/manual/adding-packages-cmake.txt +++ b/docs/manual/adding-packages-cmake.txt @@ -135,8 +135,7 @@ for most CMake-based packages. However, possible to customize what is done in any particular step: * By adding a post-operation hook (after extract, patch, configure, - build or install). See the reference documentation of the generic - infrastructure for details. + build or install). See xref:hooks[] for details. * By overriding one of the steps. For example, even if the CMake infrastructure is used, if the package +.mk+ file defines its own diff --git a/docs/manual/adding-packages-generic.txt b/docs/manual/adding-packages-generic.txt --- a/docs/manual/adding-packages-generic.txt +++ b/docs/manual/adding-packages-generic.txt @@ -451,42 +451,4 @@ In the action definitions, you can use t * Of course the +$(HOST_DIR)+, +$(STAGING_DIR)+ and +$(TARGET_DIR)+ variables to install the packages properly. -The last feature of the generic infrastructure is the ability to add -hooks. These define further actions to perform after existing steps. -Most hooks aren't really useful for generic packages, since the +.mk+ -file already has full control over the actions performed in each step -of the package construction. The hooks are more useful for packages -using the autotools infrastructure described below. However, since -they are provided by the generic infrastructure, they are documented -here. The exception is +LIBFOO_POST_PATCH_HOOKS+. Patching the -package and producing legal info are not user definable, so -+LIBFOO_POST_PATCH_HOOKS+ and +LIBFOO_POST_LEGAL_INFO_HOOKS+ are -useful for generic packages. - -The following hook points are available: - -* +LIBFOO_POST_DOWNLOAD_HOOKS+ -* +LIBFOO_POST_EXTRACT_HOOKS+ -* +LIBFOO_POST_RSYNC_HOOKS+ -* +LIBFOO_PRE_PATCH_HOOKS+ -* +LIBFOO_POST_PATCH_HOOKS+ -* +LIBFOO_PRE_CONFIGURE_HOOKS+ -* +LIBFOO_POST_CONFIGURE_HOOKS+ -* +LIBFOO_POST_BUILD_HOOKS+ -* +LIBFOO_POST_INSTALL_HOOKS+ (for host packages only) -* +LIBFOO_POST_INSTALL_STAGING_HOOKS+ (for target packages only) -* +LIBFOO_POST_INSTALL_TARGET_HOOKS+ (for target packages only) -* +LIBFOO_POST_LEGAL_INFO_HOOKS+ - -These variables are 'lists' of variable names containing actions to be -performed at this hook point. This allows several hooks to be -registered at a given hook point. Here is an example: - ----------------------- -define LIBFOO_POST_PATCH_FIXUP - action1 - action2 -endef - -LIBFOO_POST_PATCH_HOOKS += LIBFOO_POST_PATCH_FIXUP ----------------------- +Finally, you can also use hooks. See xref:hooks[] for more information. diff --git a/docs/manual/adding-packages-hooks.txt b/docs/manual/adding-packages-hooks.txt new file mode 100644 --- /dev/null +++ b/docs/manual/adding-packages-hooks.txt @@ -0,0 +1,41 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +[[hooks]] +Hooks available in the various build steps +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The generic infrastructure (and as a result also the derived autotools +and cmake infrastructures) allow packages to specify hooks. +These define further actions to perform after existing steps. +Most hooks aren't really useful for generic packages, since the +.mk+ +file already has full control over the actions performed in each step +of the package construction. + +The following hook points are available: + +* +LIBFOO_POST_DOWNLOAD_HOOKS+ +* +LIBFOO_POST_EXTRACT_HOOKS+ +* +LIBFOO_POST_RSYNC_HOOKS+ +* +LIBFOO_PRE_PATCH_HOOKS+ +* +LIBFOO_POST_PATCH_HOOKS+ +* +LIBFOO_PRE_CONFIGURE_HOOKS+ +* +LIBFOO_POST_CONFIGURE_HOOKS+ +* +LIBFOO_POST_BUILD_HOOKS+ +* +LIBFOO_POST_INSTALL_HOOKS+ (for host packages only) +* +LIBFOO_POST_INSTALL_STAGING_HOOKS+ (for target packages only) +* +LIBFOO_POST_INSTALL_TARGET_HOOKS+ (for target packages only) +* +LIBFOO_POST_LEGAL_INFO_HOOKS+ + +These variables are 'lists' of variable names containing actions to be +performed at this hook point. This allows several hooks to be +registered at a given hook point. Here is an example: + +---------------------- +define LIBFOO_POST_PATCH_FIXUP + action1 + action2 +endef + +LIBFOO_POST_PATCH_HOOKS += LIBFOO_POST_PATCH_FIXUP +---------------------- diff --git a/docs/manual/adding-packages.txt b/docs/manual/adding-packages.txt --- a/docs/manual/adding-packages.txt +++ b/docs/manual/adding-packages.txt @@ -18,6 +18,8 @@ include::adding-packages-autotools.txt[] include::adding-packages-cmake.txt[] +include::adding-packages-hooks.txt[] + include::adding-packages-gettext.txt[] include::adding-packages-tips.txt[]