From: llandwerlin at gmail.com Date: Thu, 4 Nov 2010 03:50:23 +0100 Subject: [Buildroot] [PATCH 04/12] autotools: introduce $(PKG_NAME)_AUTORECONF_ENV/$(PKG_NAME)_AUTORECONF_OPT variables In-Reply-To: <1288839031-24277-1-git-send-email-llandwerlin@gmail.com> References: <1288839031-24277-1-git-send-email-llandwerlin@gmail.com> Message-ID: <1288839031-24277-5-git-send-email-llandwerlin@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net From: Lionel Landwerlin 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 --- 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 make command. By default, empty. -
  • LIBFOO_AUTORECONF, 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 YES and - NO. By default, the value is NO
  • - -
  • LIBFOO_AUTORECONF_OPT to specify additional options +
  • LIBFOO_AUTORECONF, 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 YES and NO. By default, the value + is NO
  • + +
  • LIBFOO_AUTORECONF_OPT to specify additional + options passed to the autoreconf program + if LIBFOO_AUTORECONF=YES. By default, empty.
  • + +
  • LIBFOO_AUTORECONF_ENV, to specify environment + variables to pass to autoreconf program if + LIBFOO_AUTORECONF=YES. By default, it depends + whether we're building a package for the host or target, but it + should always define the following variables : +
      +
    • ACLOCAL
    • +
    • AUTOCONF
    • +
    • AUTOHEADER
    • +
    • AUTOMAKE
    • +
    • LIBTOOLIZE
    • +
  • + +
  • LIBFOO_AUTORECONF_OPT, to specify options passed to the autoreconf program if - LIBFOO_AUTORECONF=YES. By default, empty.
  • + LIBFOO_AUTORECONF=YES. By default, -f -i -I + "$(ACLOCAL_DIR)".
  • LIBFOO_LIBTOOL_PATCH 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