Skip to contentSkip to conversation

autotools.bbclass misc trivia

PATCH In review Bernhard Reutner-Fischer 3 participants 7 messages Jan 12, 2011 – Jul 9, 2013

lore
Share & tools
lore
#0 lore raw

cover autotools.bbclass misc trivia

Hi,

In an isolated test with dash and busybox ash the AC_CONFIG_MACRO_DIR patch works as expected. Testers welcome.

Bernhard Reutner-Fischer (3):
autotools.bbclass: pass distro_imposed_configure_flags autotools.bblass: mkdir also AC_CONFIG_MACRO_DIR autotools.bbclass: use grep -q

 classes/autotools.bbclass |   29 ++++++++++++++++++++++++-----
 1 files changed, 24 insertions(+), 5 deletions(-)
Signature · 1 line
1.7.2.3
#1 lore raw

PATCH 1/3 autotools.bbclass: pass distro_imposed_configure_flags

---
 classes/autotools.bbclass |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
classes/autotools.bbclass +17 -0
index 247e21d..77bd37d 100644
@@ -65,6 +65,22 @@ def append_libtool_sysroot(d):
 			return '--with-libtool-sysroot=${STAGING_DIR_HOST}'
 	return ''
 
+def distro_imposed_configure_flags(d):
+	distro_features = bb.data.getVar('DISTRO_FEATURES', d, True) or ""
+	distro_features = distro_features.split()
+	flags = set()
+	features = (('largefile', 'largefile'),
+		('ipv6'     , 'ipv6'),
+		('nls'      , 'nls'))
+
+	for knob, cfgargs in features:
+		if isinstance(cfgargs, basestring):
+			cfgargs = [cfgargs]
+		en_or_dis = knob in distro_features and "enable" or "disable"
+		for flg in cfgargs:
+			flags.add("--%s-%s" % (en_or_dis, flg))
+	return " ".join(flags)
+
 # EXTRA_OECONF_append = "${@autotools_set_crosscompiling(d)}"
 
 CONFIGUREOPTS = " --build=${BUILD_SYS} \
@@ -85,6 +101,7 @@ CONFIGUREOPTS = " --build=${BUILD_SYS} \
 		  --infodir=${infodir} \
 		  --mandir=${mandir} \
 		  ${@append_libtool_sysroot(d)} \
+		  ${@distro_imposed_configure_flags(d)} \
 		"
 
 oe_runconf () {
Signature · 1 line
1.7.2.3
#2 lore raw

PATCH 2/3 autotools.bblass: mkdir also AC_CONFIG_MACRO_DIR

In reply to Bernhard Reutner-Fischer
---
 classes/autotools.bbclass |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
classes/autotools.bbclass +3 -1
index 77bd37d..45b75df 100644
@@ -176,7 +176,9 @@ autotools_do_configure() {
 			fi
 
 			fi
-			mkdir -p m4
+			for aux in m4 `sed -n -e '/^[[:space:]]*AC_CONFIG_MACRO_DIR/s|[^(]*([[]*\([^])]*\)[]]*)|\1|p' $CONFIGURE_AC`; do
+				mkdir -p ${aux}
+			done
 			oenote Executing autoreconf --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
 			autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || oefatal "autoreconf execution failed."
 			if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
Signature · 1 line
1.7.2.3
#3 lore raw

PATCH 3/3 autotools.bbclass: use grep -q

In reply to Bernhard Reutner-Fischer

-q is a required arg so use it instead of redirecting to /dev/null

---
 classes/autotools.bbclass |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
classes/autotools.bbclass +4 -4
index 45b75df..3850ae9 100644
@@ -160,14 +160,14 @@ autotools_do_configure() {
 			else
 			  CONFIGURE_AC=configure.ac
 			fi
-			if grep "^[[:space:]]*AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
-			  if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then
+			if grep -q "^[[:space:]]*AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC; then
+			  if grep -q "sed.*POTFILES" $CONFIGURE_AC; then
 			    : do nothing -- we still have an old unmodified configure.ac
 			  else
 			    oenote Executing glib-gettextize --force --copy
 			    echo "no" | glib-gettextize --force --copy
 			  fi
-			else if grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
+			else if grep -q "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC; then
 			  if [ -e ${STAGING_DATADIR}/gettext/config.rpath ]; then
 			    cp ${STAGING_DATADIR}/gettext/config.rpath ${S}/
 			  else
@@ -181,7 +181,7 @@ autotools_do_configure() {
 			done
 			oenote Executing autoreconf --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
 			autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || oefatal "autoreconf execution failed."
-			if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
+			if grep -q "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC; then
 			  oenote Executing intltoolize --copy --force --automake
 			  intltoolize --copy --force --automake
 			fi
Signature · 1 line
1.7.2.3
Acked-by on the v1 series
#4 lore raw
In reply to Bernhard Reutner-Fischer
Quoted 5 lines · Bernhard Reutner-Fischer

Hi,

In an isolated test with dash and busybox ash the AC_CONFIG_MACRO_DIR patch works as expected. Testers welcome.

Quoted 8 lines

Bernhard Reutner-Fischer (3):
autotools.bbclass: pass distro_imposed_configure_flags autotools.bblass: mkdir also AC_CONFIG_MACRO_DIR autotools.bbclass: use grep -q

  classes/autotools.bbclass |   29 ++++++++++++++++++++++++-----
  1 files changed, 24 insertions(+), 5 deletions(-)

Whole series

Acked-by
#5 lore raw
Quoted 11 lines · Khem Raj
Quoted 10 lines · Bernhard Reutner-Fischer

Hi,

In an isolated test with dash and busybox ash the AC_CONFIG_MACRO_DIR patch works as expected. Testers welcome.

Bernhard Reutner-Fischer (3):
autotools.bbclass: pass distro_imposed_configure_flags autotools.bblass: mkdir also AC_CONFIG_MACRO_DIR autotools.bbclass: use grep -q

Quoted 6 lines
Quoted 3 lines

classes/autotools.bbclass | 29 ++++++++++++++++++++++++-----

1 files changed, 24 insertions(+), 5 deletions(-)

Whole series

Signature · 2 lines
Tom Rini
Mentor Graphics Corporation
#6 lore raw

It seems to me this was never pushed, or was it reverted in the meantime (if so, why? who takes care of passing these in nowadays?)

Thanks,

Quoted 33 lines · Tom Rini
Quoted 13 lines · Khem Raj
Quoted 11 lines · Bernhard Reutner-Fischer

Hi,

In an isolated test with dash and busybox ash the AC_CONFIG_MACRO_DIR patch works as expected. Testers welcome.

Bernhard Reutner-Fischer (3):
autotools.bbclass: pass distro_imposed_configure_flags autotools.bblass: mkdir also AC_CONFIG_MACRO_DIR autotools.bbclass: use grep -q

Quoted 6 lines
Quoted 3 lines

classes/autotools.bbclass | 29 ++++++++++++++++++++++++-----

1 files changed, 24 insertions(+), 5 deletions(-)

Whole series

--
Tom Rini
Mentor Graphics Corporation

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel