From patchwork Thu May 29 05:24:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vomlehn@canopus-us.com X-Patchwork-Id: 353654 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 B0E861400AD for ; Thu, 29 May 2014 15:37:14 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 546A331BBB; Thu, 29 May 2014 05:37:13 +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 IQ0KqkTtp5Nx; Thu, 29 May 2014 05:37:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 818F7315EF; Thu, 29 May 2014 05:37:10 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 826221BFA18 for ; Thu, 29 May 2014 05:37:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7EDA28B793 for ; Thu, 29 May 2014 05:37:08 +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 mIIIc3p2A6ll for ; Thu, 29 May 2014 05:37:07 +0000 (UTC) X-Greylist: delayed 00:12:30 by SQLgrey-1.7.6 Received: from milter.aus.datafoundry.com (barracuda5.aus.datafoundry.com [209.99.124.136]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2CADA8B67E for ; Thu, 29 May 2014 05:37:07 +0000 (UTC) X-ASG-Debug-ID: 1401341080-04aa1c0f735ca650001-rUBnyj Received: from texasnet.proxy3.mail.aus.datafoundry.com (texasnet.proxy3.mail.aus.datafoundry.com [209.99.125.98]) by milter.aus.datafoundry.com with ESMTP id bWd1wkj5OHl8e8AB; Thu, 29 May 2014 00:24:40 -0500 (CDT) X-Barracuda-Envelope-From: vomlehn@texas.net X-Barracuda-Apparent-Source-IP: 209.99.125.98 Received: from milter (localhost [127.0.0.1]) by texasnet.proxy3.mail.aus.datafoundry.com (Postfix) with SMTP id A14D92174F; Thu, 29 May 2014 00:24:39 -0500 (CDT) Received: from canopus-us.com (unknown [199.189.101.142]) by texasnet.proxy3.mail.aus.datafoundry.com (Postfix) with ESMTPSA id 1B10220FAE; Thu, 29 May 2014 00:24:36 -0500 (CDT) From: vomlehn@canopus-us.com To: buildroot@buildroot.org Date: Wed, 28 May 2014 22:24:13 -0700 X-ASG-Orig-Subj: [PATCH 2/3] Allow specification of values for --prefix and --exec-prefix in autotools. Message-Id: <1401341054-16705-3-git-send-email-vomlehn@canopus-us.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1401341054-16705-1-git-send-email-vomlehn@canopus-us.com> References: <1401341054-16705-1-git-send-email-vomlehn@canopus-us.com> X-Barracuda-Connect: texasnet.proxy3.mail.aus.datafoundry.com[209.99.125.98] X-Barracuda-Start-Time: 1401341080 X-Barracuda-URL: http://209.99.124.136:8000/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Virus-Scanned: by bsmtpd at datafoundry.com X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.0 tests=BSF_RULE7568M, BSF_SC0_MISMATCH_TO, NO_REAL_NAME X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.6202 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 NO_REAL_NAME From: does not include a real name 0.00 BSF_SC0_MISMATCH_TO Envelope rcpt doesn't match header 0.50 BSF_RULE7568M Custom Rule 7568M Cc: David VomLehn Subject: [Buildroot] [PATCH 2/3] Allow specification of values for --prefix and --exec-prefix in autotools. 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: David VomLehn The --prefix and --exec-prefix arguments to autotools configuration files allow the installation location to be specified. This is particularly useful when a package must be located in another directory so that it can be split into a separate filesystem image. Signed-off-by: David VomLehn --- docs/manual/adding-packages-autotools.txt | 8 ++++++++ package/pkg-autotools.mk | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/manual/adding-packages-autotools.txt b/docs/manual/adding-packages-autotools.txt index c7e797f..7cac94e 100644 --- a/docs/manual/adding-packages-autotools.txt +++ b/docs/manual/adding-packages-autotools.txt @@ -99,6 +99,14 @@ cases, typical packages will therefore only use a few of them. * +LIBFOO_CONF_OPT+, to specify additional configure options to pass to the configure script. By default, empty. +* +LIBFOO_CONF_PREFIX+, to specify the installation directory for + architecture-independent files, i.e. the argument to --prefix. + By default, /usr. + +* +LIBFOO_CONF_EXEC_PREFIX+, to specify the installation directory for + architecture-dependent files, i.e. the argument to --exec-prefix. + By default, the value given for +LIBFOO_CONF_PREFIX+. + * +LIBFOO_MAKE+, to specify an alternate +make+ command. This is typically useful when parallel make is enabled in the configuration (using +BR2_JLEVEL+) but that this diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk index a646612..5cb0f20 100644 --- a/package/pkg-autotools.mk +++ b/package/pkg-autotools.mk @@ -95,7 +95,8 @@ $(2)_AUTORECONF_OPT ?= $($(3)_AUTORECONF_OPT) $(2)_INSTALL_OPT ?= install $(2)_INSTALL_STAGING_OPT ?= DESTDIR=$$(STAGING_DIR) install $(2)_INSTALL_TARGET_OPT ?= DESTDIR=$$(TARGET_DIR) install - +$(2)_CONF_PREFIX ?= /usr +$(2)_CONF_EXEC_PREFIX ?= $$($(2)_CONF_PREFIX) # # Configure step. Only define it if not already defined by the package @@ -115,8 +116,8 @@ define $(2)_CONFIGURE_CMDS --target=$$(GNU_TARGET_NAME) \ --host=$$(GNU_TARGET_NAME) \ --build=$$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ + --prefix=$$($$(PKG)_CONF_PREFIX) \ + --exec-prefix=$$($$(PKG)_CONF_EXEC_PREFIX) \ --sysconfdir=/etc \ --program-prefix="" \ --disable-gtk-doc \