Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: llandwerlin at gmail.com <llandwerlin@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 04/12] autotools: introduce $(PKG_NAME)_AUTORECONF_ENV/$(PKG_NAME)_AUTORECONF_OPT variables
Date: Thu,  4 Nov 2010 03:50:23 +0100	[thread overview]
Message-ID: <1288839031-24277-5-git-send-email-llandwerlin@gmail.com> (raw)
In-Reply-To: <1288839031-24277-1-git-send-email-llandwerlin@gmail.com>

From: Lionel Landwerlin <llandwerlin@gmail.com>

Rather than defining the AUTORECONF variable containing the path to
the autoreconf tool + all its arguments, we split the variable in two.
There is now :
      - AUTORECONF which contains the path to the autoreconf tool,
      - $(PKG_NAME)_AUTORECONF_OPT which contains the autoreconf arguments,

      - and we add $(PKG_NAME)_AUTORECONF_ENV which contains the autoreconf
        environment variables.

This allow us to define a specific setup to run autoreconf for both
target and host as well as per package if needed.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
---
 docs/buildroot.html           |   35 +++++++++++++++++++++++++++--------
 package/Makefile.autotools.in |   19 ++++++++++++++++++-
 package/autoconf/autoconf.mk  |    2 +-
 package/automake/automake.mk  |    5 +++--
 4 files changed, 49 insertions(+), 12 deletions(-)

diff --git a/docs/buildroot.html b/docs/buildroot.html
index 00808ff..814198b 100644
--- a/docs/buildroot.html
+++ b/docs/buildroot.html
@@ -1253,15 +1253,34 @@ LIBFOO_POST_PATCH_HOOKS += LIBFOO_POST_PATCH_FIXUP
       pass to make in the build step. These are passed after the
       <code>make</code> command. By default, empty.</li>
 
-      <li><code>LIBFOO_AUTORECONF</code>, tells whether the package should
-      be autoreconfigured or not (i.e, if the configure script and
-      Makefile.in files should be re-generated by re-running autoconf,
-      automake, libtool, etc.). Valid values are <code>YES</code> and
-      <code>NO</code>. By default, the value is <code>NO</code></li>
-
-      <li><code>LIBFOO_AUTORECONF_OPT</code> to specify additional options
+      <li><code>LIBFOO_AUTORECONF</code>, tells whether the package
+      should be autoreconfigured or not (i.e, if the configure script
+      and Makefile.in files should be re-generated by re-running
+      autoconf, automake, libtool, etc.). Valid values
+      are <code>YES</code> and <code>NO</code>. By default, the value
+      is <code>NO</code></li>
+
+      <li><code>LIBFOO_AUTORECONF_OPT</code> to specify additional
+      options passed to the <i>autoreconf</i> program
+      if <code>LIBFOO_AUTORECONF=YES</code>. By default, empty.</li>
+
+      <li><code>LIBFOO_AUTORECONF_ENV</code>, to specify environment
+      variables to pass to <i>autoreconf</i> program if
+      <code>LIBFOO_AUTORECONF=YES</code>. By default, it depends
+      whether we're building a package for the host or target, but it
+      should always define the following variables :
+      <ul>
+        <li>ACLOCAL</li>
+        <li>AUTOCONF</li>
+        <li>AUTOHEADER</li>
+        <li>AUTOMAKE</li>
+        <li>LIBTOOLIZE</li>
+      </ul></li>
+
+      <li><code>LIBFOO_AUTORECONF_OPT</code>, to specify options
       passed to the <i>autoreconf</i> program if
-      <code>LIBFOO_AUTORECONF=YES</code>. By default, empty.</li>
+      <code>LIBFOO_AUTORECONF=YES</code>. By default, <code>-f -i -I
+      "$(ACLOCAL_DIR)"</code>.</li>
 
       <li><code>LIBFOO_LIBTOOL_PATCH</code> tells whether the Buildroot
       patch to fix libtool cross-compilation issues should be applied or
diff --git a/package/Makefile.autotools.in b/package/Makefile.autotools.in
index b24c2b1..4a992d9 100644
--- a/package/Makefile.autotools.in
+++ b/package/Makefile.autotools.in
@@ -62,8 +62,25 @@ $(2)_CONF_OPT			?=
 $(2)_MAKE			?= $(MAKE)
 $(2)_MAKE_ENV			?=
 $(2)_MAKE_OPT			?=
+ifeq ($(5),host)
 $(2)_AUTORECONF			?= NO
-$(2)_AUTORECONF_OPT		?=
+$(2)_AUTORECONF_OPT		?= -f -i -I "$$(ACLOCAL_HOST_DIR)"
+$(2)_AUTORECONF_ENV		?= $$(HOST_CONFIGURE_OPTS) \
+				ACLOCAL="$$(ACLOCAL)" \
+				AUTOCONF="$$(AUTOCONF)" \
+				AUTOHEADER="$$(AUTOHEADER)" \
+				AUTOMAKE="$$(AUTOMAKE)" \
+				LIBTOOLIZE="$$(LIBTOOLIZE)"
+else
+$(2)_AUTORECONF			?= YES
+$(2)_AUTORECONF_OPT		?= -f -i -I "$$(ACLOCAL_STAGING_DIR)"
+$(2)_AUTORECONF_ENV		?= $$(TARGET_CONFIGURE_OPTS) \
+				ACLOCAL="$$(ACLOCAL)" \
+				AUTOCONF="$$(AUTOCONF)" \
+				AUTOHEADER="$$(AUTOHEADER)" \
+				AUTOMAKE="$$(AUTOMAKE)" \
+				LIBTOOLIZE="$$(LIBTOOLIZE)"
+endif
 $(2)_USE_CONFIG_CACHE           ?= $(if $(BR2_CONFIG_CACHE),YES,NO)
 $(2)_INSTALL_STAGING_OPT	?= DESTDIR=$$(STAGING_DIR) install
 $(2)_INSTALL_TARGET_OPT		?= DESTDIR=$$(TARGET_DIR)  install
diff --git a/package/autoconf/autoconf.mk b/package/autoconf/autoconf.mk
index a21192f..4b58986 100644
--- a/package/autoconf/autoconf.mk
+++ b/package/autoconf/autoconf.mk
@@ -23,4 +23,4 @@ $(eval $(call AUTOTARGETS,package,autoconf,host))
 # variables used by other packages
 AUTOCONF:=$(HOST_DIR)/usr/bin/autoconf
 AUTOHEADER:=$(HOST_DIR)/usr/bin/autoheader
-AUTORECONF=$(HOST_CONFIGURE_OPTS) ACLOCAL="$(ACLOCAL)" AUTOCONF="$(AUTOCONF)" AUTOHEADER="$(AUTOHEADER)" AUTOMAKE="$(AUTOMAKE)" $(HOST_DIR)/usr/bin/autoreconf -f -i -I "$(ACLOCAL_DIR)"
+AUTORECONF=$(HOST_DIR)/usr/bin/autoreconf
diff --git a/package/automake/automake.mk b/package/automake/automake.mk
index a33c9f4..1d198f4 100644
--- a/package/automake/automake.mk
+++ b/package/automake/automake.mk
@@ -22,5 +22,6 @@ $(eval $(call AUTOTARGETS,package,automake,host))
 
 # variables used by other packages
 AUTOMAKE = $(HOST_DIR)/usr/bin/automake
-ACLOCAL_DIR = $(STAGING_DIR)/usr/share/aclocal
-ACLOCAL = $(HOST_DIR)/usr/bin/aclocal -I $(ACLOCAL_DIR)
+ACLOCAL_STAGING_DIR = $(STAGING_DIR)/usr/share/aclocal
+ACLOCAL_HOST_DIR = $(HOST_DIR)/usr/share/aclocal
+ACLOCAL = $(HOST_DIR)/usr/bin/aclocal
-- 
1.7.2.3

  parent reply	other threads:[~2010-11-04  2:50 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-04  2:50 [Buildroot] [pull request] Pull request for branch 2010.11-various-bumps llandwerlin at gmail.com
2010-11-04  2:50 ` [Buildroot] [PATCH 01/12] sh: add /dev/ttyASx console devices llandwerlin at gmail.com
2010-11-04 13:33   ` Thomas Petazzoni
2010-11-04 13:38     ` Lionel Landwerlin
2010-11-04  2:50 ` [Buildroot] [PATCH 02/12] rsync: drop special case now managed in Makefile.package.in llandwerlin at gmail.com
2010-11-04 13:38   ` Thomas Petazzoni
2010-11-04  2:50 ` [Buildroot] [PATCH 03/12] autotools: fix MESSAGE calls llandwerlin at gmail.com
2010-11-04 13:39   ` Thomas Petazzoni
2010-11-05  8:48   ` Peter Korsgaard
2010-11-04  2:50 ` llandwerlin at gmail.com [this message]
2010-11-04 13:44   ` [Buildroot] [PATCH 04/12] autotools: introduce $(PKG_NAME)_AUTORECONF_ENV/$(PKG_NAME)_AUTORECONF_OPT variables Thomas Petazzoni
2010-11-04 13:49     ` Lionel Landwerlin
2010-11-04 15:30       ` Thomas Petazzoni
2010-11-04  2:50 ` [Buildroot] [PATCH 05/12] package: move autoreconfigure step to pre configure hook llandwerlin at gmail.com
2010-11-04 13:45   ` Thomas Petazzoni
2010-11-05  9:04   ` Peter Korsgaard
2010-11-04  2:50 ` [Buildroot] [PATCH 06/12] gdk-pixbuf/libgtk2: move gdk-pixbuf loader cache setup script llandwerlin at gmail.com
2010-11-04  8:10   ` Paulius Zaleckas
2010-11-04  8:21     ` Lionel Landwerlin
2010-11-04 13:46   ` Thomas Petazzoni
2010-11-05  9:07   ` Peter Korsgaard
2010-11-04  2:50 ` [Buildroot] [PATCH 07/12] automake: bump to 1.11.1 llandwerlin at gmail.com
2010-11-04 13:48   ` Thomas Petazzoni
2010-11-05  8:49   ` Peter Korsgaard
2010-11-04  2:50 ` [Buildroot] [PATCH 08/12] sysstat: bump to 9.1.5 llandwerlin at gmail.com
2010-11-05  9:09   ` Peter Korsgaard
2010-11-04  2:50 ` [Buildroot] [PATCH 09/12] libpcap: bump to 1.1.1 llandwerlin at gmail.com
2010-11-05  8:52   ` Peter Korsgaard
2010-11-04  2:50 ` [Buildroot] [PATCH 10/12] linux-fusion: bump to 8.1.2 llandwerlin at gmail.com
2010-11-05  9:11   ` Peter Korsgaard
2010-11-04  2:50 ` [Buildroot] [PATCH 11/12] directfb: bump to 1.4.10 llandwerlin at gmail.com
2010-11-05  9:13   ` Peter Korsgaard
2010-11-05 12:52   ` Peter Korsgaard
2010-11-05 13:30     ` Lionel Landwerlin
2010-11-05 14:00       ` Peter Korsgaard
2010-11-04  2:50 ` [Buildroot] [PATCH 12/12] sawman: " llandwerlin at gmail.com
2010-11-05  9:14   ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1288839031-24277-5-git-send-email-llandwerlin@gmail.com \
    --to=llandwerlin@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox