Skip to contentSkip to conversation

pkg-autotools: add support for <pkg>_AUTORECONF_ENV

PATCH New Rick Taylor 3 participants 3 messages Jul 18, 2014 – Jul 23, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pkg-autotools: add support for <pkg>_AUTORECONF_ENV

This commit improves the autotools-package infrastructure to support a <pkg>_AUTORECONF_ENV variable, which allows a package maintainer to pass additional variables in the environment of the autoreconf execution. This is useful in the situation where configure.ac contains shell commands using environment variables that are only executed when autoreconf is run.

---
 docs/manual/adding-packages-autotools.txt | 5 +++++
 package/pkg-autotools.mk                  | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
docs/manual/adding-packages-autotools.txt +5 -0
index 3f40503..4329ca7 100644
@@ -121,6 +121,11 @@ cases, typical packages will therefore only use a few of them.
   automake, libtool, etc.). Valid values are +YES+ and
   +NO+. By default, the value is +NO+
 
+* +LIBFOO_AUTORECONF_ENV+, to specify additional environment
+  variables to pass to the 'autoreconf' program if
+  +LIBFOO_AUTORECONF=YES+. These are passed in the environment of
+  the 'autoreconf' command. By default, empty.
+  
 * +LIBFOO_AUTORECONF_OPT+ to specify additional options
   passed to the 'autoreconf' program if
   +LIBFOO_AUTORECONF=YES+. By default, empty.
package/pkg-autotools.mk +1 -1
index 557413d..255c42d 100644
@@ -228,7 +228,7 @@ endef
 #
 define AUTORECONF_HOOK
 	@$$(call MESSAGE,"Autoreconfiguring")
-	$$(Q)cd $$($$(PKG)_SRCDIR) && $$(AUTORECONF) $$($$(PKG)_AUTORECONF_OPT)
+	$$(Q)cd $$($$(PKG)_SRCDIR) && $$($$(PKG)_AUTORECONF_ENV) $$(AUTORECONF) $$($$(PKG)_AUTORECONF_OPT)
 	$$(Q)if test "$$($$(PKG)_LIBTOOL_PATCH)" = "YES"; then \
 		for i in `find $$($$(PKG)_SRCDIR) -name ltmain.sh`; do \
 			ltmain_version=`sed -n '/^[ 	]*VERSION=/{s/^[ 	]*VERSION=//;p;q;}' $$$$i | \
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 pkg-autotools: add support for <pkg>_AUTORECONF_ENV

Rick, All,

On 2014-07-18 10:12 +0100, Rick Taylor spake thusly:

Quoted 3 lines

This commit improves the autotools-package infrastructure to support a <pkg>_AUTORECONF_ENV variable, which allows a package maintainer to pass additional variables in the environment of the autoreconf execution. This is useful in the situation where configure.ac contains shell commands using environment variables that are only executed when autoreconf is run.

Except for the commit log which should be line-wrapped at ~80 chars:

Regards,
Yann E. MORIN.

Quoted 41 lines
---
 docs/manual/adding-packages-autotools.txt | 5 +++++
 package/pkg-autotools.mk                  | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
docs/manual/adding-packages-autotools.txt +5 -0
index 3f40503..4329ca7 100644
@@ -121,6 +121,11 @@ cases, typical packages will therefore only use a few of them.
   automake, libtool, etc.). Valid values are +YES+ and
   +NO+. By default, the value is +NO+
 
+* +LIBFOO_AUTORECONF_ENV+, to specify additional environment
+  variables to pass to the 'autoreconf' program if
+  +LIBFOO_AUTORECONF=YES+. These are passed in the environment of
+  the 'autoreconf' command. By default, empty.
+  
 * +LIBFOO_AUTORECONF_OPT+ to specify additional options
   passed to the 'autoreconf' program if
   +LIBFOO_AUTORECONF=YES+. By default, empty.
package/pkg-autotools.mk +1 -1
index 557413d..255c42d 100644
@@ -228,7 +228,7 @@ endef
 #
 define AUTORECONF_HOOK
 	@$$(call MESSAGE,"Autoreconfiguring")
-	$$(Q)cd $$($$(PKG)_SRCDIR) && $$(AUTORECONF) $$($$(PKG)_AUTORECONF_OPT)
+	$$(Q)cd $$($$(PKG)_SRCDIR) && $$($$(PKG)_AUTORECONF_ENV) $$(AUTORECONF) $$($$(PKG)_AUTORECONF_OPT)
 	$$(Q)if test "$$($$(PKG)_LIBTOOL_PATCH)" = "YES"; then \
 		for i in `find $$($$(PKG)_SRCDIR) -name ltmain.sh`; do \
 			ltmain_version=`sed -n '/^[ 	]*VERSION=/{s/^[ 	]*VERSION=//;p;q;}' $$$$i | \
Signature · 6 lines
1.9.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 pkg-autotools: add support for <pkg>_AUTORECONF_ENV

In reply to Rick Taylor

Dear Rick Taylor,

Quoted 7 lines · Rick Taylor

This commit improves the autotools-package infrastructure to support a <pkg>_AUTORECONF_ENV variable, which allows a package maintainer to pass additional variables in the environment of the autoreconf execution. This is useful in the situation where configure.ac contains shell commands using environment variables that are only executed when autoreconf is run.

---
 docs/manual/adding-packages-autotools.txt | 5 +++++
 package/pkg-autotools.mk                  | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

Thanks, applied, after wrapping the commit log text.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com