On Oct 15, 2007, at 10:28 PM, Bruno Haible wrote:
Sam Steingold wrote:gnulib-tool --import --source-base=src/gllib --m4-base=src/glm4 \ --aux-dir=src/build-aux --no-changelog \ stdint stdbool ...This will create a Makefile.am in src/gllib; therefore get familiar with automake, and recurse from src into src/gllib before building src itself.how will automake play with your makemake? I will need to pre-generate woe32 Makefiles, right?Ah, right, these old msvc/nmake Makefiles. automake does not support them. Therefore you need to decide: Either drop the support for msvc/ nmake (and rely on mingw and gcc for building the Woe32 port). Or don't use automake, and translate the gnulib-tool generated Makefile.am manually to a Makefile.inand Makefile.msvc or to a piece of makemake.For GNU gettext and GNU libiconv, I got rid of the Makefile.msvc, Makefile.os2,Makefile.vms, at the same time when I started using gnulib-tool.
I'm personally building libraries that are ported to MSVC (for ABI reasons) but I use automake (autoconf/libtool) nevertheless. I simply wrapped the MSVC toolchain with shell scripts that are first in my PATH so I can invoke them from Cygwin (or MSYS). The wrappers simply properly rewrite the arguments (MSYS does this already) and setup proper environment variables (vcvars32.bat) before invoking the actual tool. In order for MSVC to play well with the autotools, I extended a wrapper script around cl.exe/link.exe (cccl [1]) so that it sort of looks like GCC.
This way I can build almost any UNIXy project with MSVC (as long as the code compiles -- the point is, the build system doesn't get in my way). I built many things this way, ranging from Qt to Boost (even though these two specific ones gave me a hard time because of their ... exotic build systems, to say the least).
Oh, and I forgot to mention, you need to patch GNU Make 3.81 (until 3.82 is out):
wget http://ftp.gnu.org/pub/gnu/make/make-3.81.tar.gz tar xfz make-3.81.tar.gz cd make-3.81 wget http://www.tsunanet.net/~tsuna/make-3.81-cygwin.patchwget http://www.tsunanet.net/~tsuna/make-3.81- cygwin_MAKE_expansion.patch
PATH=/usr/local/bin:/usr/bin:/bin ./configure patch -p1 <make-3.81-cygwin.patch patch -p0 <make-3.81-cygwin_MAKE_expansion.patch PATH=/usr/local/bin:/usr/bin:/bin make PATH=/usr/local/bin:/usr/bin:/bin make installIt takes a little bit of time to setup the whole thing properly, but once done it's really convenient because you (almost) no longer have to worry about the fact that you have to compile with MSVC.
Cheers, [1] https://www.tsunanet.net/~tsuna/cccl -- Benoit Sigoure aka Tsuna EPITA Research and Development Laboratory
PGP.sig
Description: This is a digitally signed message part