
I think this has come up before, but I can't find an answer. How can I build Haddock under Windows? I've got the Haddock distribution, and it has a 'building.sgml' file, but I can't find a processed version (e.g. HTML or PDF) of this document. I also can't find any online documentation for building Haddock. If I simply try to use GHC to compile Main.hd in the Haddock source directory, I get missing file errors (not surprising). I've looked at the makefile, and can't tell what is actually needed to actually compile it. If Haddock is to be the standard tool for documenting Haskell libraries, I think it's really important that it be easy to get it running under Windows. Even if this is achieved by simply posting a Windows executable somewhere. Can someone please point me to the quickest/easiest way to get Haddock running under windows? #g ------------ Graham Klyne For email: http://www.ninebynine.org/#Contact

Graham Klyne wrote:
I think this has come up before, but I can't find an answer. How can I build Haddock under Windows? I've got the Haddock distribution, and it has a 'building.sgml' file, but I can't find a processed version (e.g. HTML or PDF) of this document.
Well, there is a processed version on haskell.org: http://haskell.org/ghc/docs/latest/html/building/building-guide.html But that's probably not exactly what you're looking for. It only describes in very general terms how to build the fptools suite.
I also can't find any online documentation for building Haddock. [...]
This is not exactly "documentation", but at least it's online: :-) http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/haddock/haddock.spec?rev=1... 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 Alex and Happy are built in exactly the same way, BTW. But perhaps Sigbjorn has some ultra-secret scripts/tools for generating an *.msi... :-] Cheers, S.

Sven, 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 either: (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. http://www.cygwin.com/ (for CygWin http://www.mingw.org/ (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]]] autoreconf ./configure --prefix=<WhereverYouWantItToBeInstalledLater> make 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?]]] ]] #g ------------ Graham Klyne For email: http://www.ninebynine.org/#Contact
participants (3)
-
Graham Klyne
-
Graham Klyne
-
Sven Panne