On 15 December 2011 11:54, Stefano Lattarini <[email protected]> wrote: >> >> I'm cross-compiling gettext to mingw32-target in linux system. I have >> to regenerate build system (so it's not the one distributed with >> gettext 0.18.1.1). I end with libtool-script that has /bin/bash as >> shebang. Yet when doing the build, it's run through /bin/sh ("/bin/sh >> ../libtool"). This work in one of my systems where /bin/sh is bash, >> and fails in another where /bin/sh is dash. >> > The issue you are experiencing is probably due to the fact that the > automake-generated makefiles use $(LIBTOOL) to issue libtool invocations, > and that explicitly runs the libtool script through the shell given by > $(SHELL).
Yes, everything works when libtool is built with attached patch that makes $(LIBTOOL) to run libtool-script directly instead of feeding it to (possibly wrong) shell. - ML
diff -Nurd libtool-2.4.2/libltdl/m4/libtool.m4 libtool-2.4.2/libltdl/m4/libtool.m4 --- libtool-2.4.2/libltdl/m4/libtool.m4 2011-10-17 13:17:05.000000000 +0300 +++ libtool-2.4.2/libltdl/m4/libtool.m4 2011-12-15 12:30:21.165550162 +0200 @@ -94,7 +94,7 @@ LIBTOOL_DEPS="$ltmain" # Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' +LIBTOOL='$(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP
