[oe] [PATCH 08/13] bootstrap.bbclass: initial add

Andreas Müller schnitzeltony at googlemail.com
Fri Oct 30 12:13:40 UTC 2015


bootstrap is another magic script which is intended run before autotools. The
class created runs this script at the right time and ensures that sources of
gnulib are not cloned during configure.

Signed-off-by: Andreas Müller <schnitzeltony at googlemail.com>
---
 meta-oe/classes/bootstrap.bbclass | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 meta-oe/classes/bootstrap.bbclass

diff --git a/meta-oe/classes/bootstrap.bbclass b/meta-oe/classes/bootstrap.bbclass
new file mode 100644
index 0000000..2acd6d8
--- /dev/null
+++ b/meta-oe/classes/bootstrap.bbclass
@@ -0,0 +1,20 @@
+# Inherit this class if you want to build with bootstrap/autotools
+inherit autotools
+
+DEPENDS += "gnulib"
+
+do_configure_prepend() {
+    currdir=`pwd`
+    cd ${S}
+
+    # avoid bootstrap cloning gnulib on every configure
+    cat >.gitmodules <<EOF
+[submodule "gnulib"]
+	path = gnulib
+	url = git://git.sv.gnu.org/gnulib
+EOF
+    cp -rf ${STAGING_DATADIR}/gnulib ${S}
+
+    ./bootstrap
+    cd $currdir
+}
-- 
2.1.0




More information about the Openembedded-devel mailing list