At 03:34 AM 7/7/2010, Paul Ruizendaal wrote: >.... Building on Windows itself with gcc-mingw >doesn't work for me (just mingw installed, not cygwin or msys).
Building within an MSYS shell worked out of the box for me, once I obtained a suitable packagine of zlib (I used the GnuWin32 port). >I keep finding myself making the following adjustments to >Makefile and src/main.mk: > >- change from slash to backslash in the file paths >- create VERSION.h by hand: even with awk installed, the quoting >involved >doesn't work > >There was an attempt to fix both issues a few weeks back, but is >was a botched attempt and the changes were backed out. The >slash/backslash thing should not be too hard to correct, and I'm >thinking to have a little C program to generate VERSION.h instead >of using awk for that. The source is already heavily >preprocessed, so building one more tool should not upset the >build design. I suspect that with some (nearly) magical environment variable tweakage make could be taught to use the MSYS bash as its shell, and could then happily build from a CMD prompt as well. But it would still require MSYS be installed. It should be possible in principle to make it possible to build with only MinGW32, Gnu Make, and enough ported unix-like core utities from the GnuWin32 project, but I didn't take the time to work out the stumbling blocks. As long as Gnu Make is used, there should be no need to convert between slashes and backslashes. Both are legal and understood by the Windows API. It is just that the DOS heritage of the command prompt (and its CPM heritage before that) tends to tread slash as an option starter. If the Makefile is careful to only use utilities and shell features that are either common between /bin/sh and CMD.EXE or provided in a readily available distribution like MinGW32 (for GCC) and from the GnuWin32 project then it should be possible to make it work on either *nix or Windows without any edits at all. That said, replacing the cryptic AWK invokations with a tiny C program seems like a decent idea. It wouldn't be difficult for it to be generically useful for any project that happens to use fossil, as this is a common need. Useful GnuWin32 packages include: http://gnuwin32.sourceforge.net/packages/make.htm http://gnuwin32.sourceforge.net/packages/coreutils.htm http://gnuwin32.sourceforge.net/packages/sed.htm http://gnuwin32.sourceforge.net/packages/gawk.htm http://gnuwin32.sourceforge.net/packages/zlib.htm http://gnuwin32.sourceforge.net/packages/zip.htm http://gnuwin32.sourceforge.net/packages/unzip.htm http://gnuwin32.sourceforge.net/packages/cygutils.htm http://gnuwin32.sourceforge.net/packages/diffutils.htm http://gnuwin32.sourceforge.net/packages/patch.htm Ross Berteig [email protected] Cheshire Engineering Corp. http://www.CheshireEng.com/ _______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

