aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/classes/autotools-bootstrap.bbclass24
1 files changed, 24 insertions, 0 deletions
diff --git a/meta-oe/classes/autotools-bootstrap.bbclass b/meta-oe/classes/autotools-bootstrap.bbclass
new file mode 100644
index 0000000000..8d7af1b472
--- /dev/null
+++ b/meta-oe/classes/autotools-bootstrap.bbclass
@@ -0,0 +1,24 @@
+# Class to inherit when you want to build with autotools after running bootstrap
+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}
+
+ # --force to avoid errors on reconfigure e.g if recipes changed we depend on
+ # | bootstrap: running: libtoolize --quiet
+ # | libtoolize: error: 'libltdl/COPYING.LIB' exists: use '--force' to overwrite
+ # | ...
+ ./bootstrap --force
+ cd $currdir
+}