diff --git a/src/bin/cook.rs b/src/bin/cook.rs index b31c2e4a5107876a895765fac582b29efaac7ee2..4b394b74cfd6ddeca73ea1722c2826ad1718c3db 100644 --- a/src/bin/cook.rs +++ b/src/bin/cook.rs @@ -610,6 +610,28 @@ function cookbook_configure { "${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}" "${COOKBOOK_MAKE}" install DESTDIR="${COOKBOOK_STAGE}" } + +function DYNAMIC_INIT { + echo "WARN: Program is being compiled dynamically." + + COOKBOOK_CONFIGURE_FLAGS=( + --host="${GNU_TARGET}" + --prefix="" + --enable-shared + --disable-static + ) + + # TODO: check paths for spaces + export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib" + + autotools_recursive_regenerate() { + for f in $(find . -name configure.ac -o -name configure.in -type f | sort); do + echo "* autotools regenerate in '$(dirname $f)'..." + ( cd "$(dirname "$f")" && autoreconf -fvi "$@" -I${COOKBOOK_HOST_SYSROOT}/share/aclocal ) + done + } +} + "#; let post_script = r#"# Common post script