
Thanks, your recipe was helpful to get me started. I'm trying to turn this
into a Windows batch file, which I'll post back for your consideration
(work-in-progress copy below).
I notice that the Win32 distribution of GHC does not include ar, so I've
located and downloaded a MinGW kit.
...
Compiling the source kit, I find module:
Text/XML/HaXml/Validate.hs
imports FiniteMap when what is provided by GHC is Data.FiniteMap.
...
Otherwise, the compilation and library build seems to complete OK.
...
Copying the .hi files to the imports directory tree, I find that one
existing file (from the GHC installation) is requested to be overwritten:
Overwrite C:\DEV\ghc\ghc-6.2\imports\Text\PrettyPrint\HughesPJ.hi
For now, I've refused the override and renamed the source file in the HaXml
tree. Is there any reason that the GHC version should be replaced? (The
source codes seem to be quite different, but clearly based on the same
origin: a comment suggests that the HaXml version has been converted to
"Standard Haskell".)
...
Finally, I seem to be having a minor problem installing the resulting package:
[[
C:\DEV\Haskell\lib\HaXml-1.10\src>C:\DEV\ghc\ghc-6.2\bin\ghc-pkg.exe
--add-package 0 You can avoid using 'configure' and 'make' by just following the
recipe in the Makefile by hand. Realising that as a Windows person
you are probably inexperienced in reading a Makefile, here is the
quick version. cd src
ghc --make -cpp -i. -package-name HaXml $(SRCS)
[ Replace $(SRCS) with the cut-and-pasted list of files from the
Makefile ]
ar r libHSHaXml.a $(OBJS)
[ $(OBJS) is the source-file list replacing .hs by .o ]
ld -r --whole-archive -o HSHaXml.o libHSHaXml.a
[ only if you need to play with it in GHCi ]
cp libHSHaXml.a HSHaXml.o $(GHC_LIB_DIR)
[ install the library archive(s) where GHC can find them ]
{ tar cf interfaces.tar `find Text -name *.hi -print`
cp interfaces.tar $(GHC_LIB_DIR)/imports
cd $(GHC_LIB_DIR)/imports
tar xf interfaces.tar
rm interfaces.tar
}
[ install the interface files where GHC can find them ]
ghc-pkg --add-package Obviously I have used some Unix-isms here, but you will know the
Windows equivalents better than I can guess them. ------------
Graham Klyne
For email:
http://www.ninebynine.org/#Contact