Tools for Windows (was: Building Haddock on Windows)

Graham Klyne GK at
Mon Oct 25 08:37:17 EDT 2004


I note that you've posted a Windows .exe of Haddock, which I checked out 
and can confirm that it works for me, and that solves my immediate 
problem.  Thanks.


The comments that follow are provided to underscoring how I feel the 
Haskell community is tending to favour Unix-like system users over Windows 
users.  If Haskell is to find more widespread use, I think it's important 
to make life easy for Windows users who don't have Unix-like tools 
installed (or who don't entirely understand the Unix way of doing things).

At 19:03 22/10/04 +0200, Sven Panne wrote:
>The .spec file describes exactly what has to be done to build Haddock, at
>least if you've got a Unix-like environment (e.g. cygwin, MinGW/MSYS). It
>boils down to the the usual:
>    autoreconf
>    ./configure --prefix=<WhereverYouWantItToBeInstalledLater>
>    make
>    make html
>    make install

Unfortunately, this doesn't help a typical Windows user to get 
started.  Even if cygwin or the like is installed, many Windows user's 
(even developers) won't have a clue about the "usual" autoreconf and 
./configure commands or scripts.  I still don't really understand how they 
fit into the overall picture, but I do remember looking at a configure 
script and finding it totally impenetrable.  Maybe this can be fixed by a 
brief description in the distribution, or the URI of one?  It probably 
wouldn't take much.

Maybe more fundamentally, I think that in many cases there should be no 
requirement to have cygwin or a variant installed.  Though I would say that 
for a developer tool like (e.g.) Haddock, I'd say it's OK to require 
something like this be installed, but not to assume that the user knows how 
to steer it.

>Alex and Happy are built in exactly the same way, BTW. But perhaps Sigbjorn
>has some ultra-secret scripts/tools for generating an *.msi... :-]

.msi files are great if possible, especially when installation required 
registry entries to be created (though personally I'd prefer to avoid using 
the Windows registry -- that was IMO a poorly considered design disaster -- 
the old .ini files worked far better).

Based on my own experience and perceptions, I'd suggest that in most cases 
(a) a Windows .exe file + any configuration notes, and/or
(b) a simple batch file to build and/or run the software, which can be 
hand-edited to select the desired directories, etc.
is sufficient to get a Windows developer going fairly quickly.

If building the software depends on running a preprocessor (CPP, etc) then 
I think that supplying a .exe file is preferable.


Rather than just wingeing about this, I offer the following as a possible 
starting point for a WINDOWS-README file that might be included with 
distributions of Haskell developer tools.  I'm sure there are blanks to be 
filled in and errors to be corrected, but I hope it facilitates some 
constructive advance on this topic.

Notes for Windows users about running Haskell developer tools

Many Haskell developer tools are developed and tested on Unix systems, and 
assume that common Unix tools are available (GCC, CPP, Make, 
etc.).  Further, many of the tools are developed using GHC, and are not 
distributed for use with Hugs.  GHC itself includes some but not all of the 
Unix tools needed to build additional software tools.

To build a typical Haskell developer tool for Windows, the following steps 
may help:

1. Install cygwin, MinGW or MSYS, if not already installed.  MinGW or MSYS 
are  smaller and easier to install. (for CygWin  (for MinGW and MSYS)

2. Ensure the default path includes the appropriate directory of binary 
utilities installed in step 1.  (e.g. C:\Program files\MinGW\bin; the 
directory will contain files such as cpp.exe, mingwm10.dll, gcc.exe, etc.)

[[[ I just noticed that my MinGW directory does not include make.exe, just 
mingw32-make.exe ]]]

3. Copy and expand the developer tool kit into a working directory, and 
make that the current directory.

4. [[[Using Haddock 0.6 as an example]]]

    ./configure --prefix=<WhereverYouWantItToBeInstalledLater>
    make html
    make install

[[[Is this right?   Where does the "autoreconf" script come from?  Does the 
make command need to be changed to match the MinGW distribution?  On 
completion of this, is the software installed and ready-to-run?]]]

5. [[[Any more?]]]


Graham Klyne
For email:

More information about the Libraries mailing list