3 # Running 'binary-dist' gives us a tree which
4 # isn't quite right for the purposes of creating
5 # a mingw/win32 install tree. This script rejigs
10 # foo$ cd <top of fptools build tree>
11 # foo$ make binary-dist Project=Ghc
12 # foo$ cd ghc-<version>
13 # foo$ ../distrib/prep-bin-dist-mingw
15 #export gcc_lib=c:/ghc/ghc-5.02.2/gcc-lib
17 #Directory where a (cygwin-free) perl binary resides.
18 export perl_dir=c:/ghc/ghc-5.04
20 # The gcc-lib directory of the mingw tree you want to
21 # include with the binary dist.
22 export gcc_lib=f:/mingw/lib/gcc-lib/mingw32/2.95.3-6/
25 # The mingw include, lib, and bin directories.
27 export mingw_include=f:/mingw/include
28 export mingw_lib=f:/mingw/lib/
29 export mingw_bin=f:/mingw/bin/
31 export perl_dir=c:/ghc/ghc-5.04
32 #export mingw_include=c:/ghc/ghc-5.02.2/include/mingw
35 if ! [ -d bin/i386-unknown-mingw32 ] ; then
36 echo "Doesn't look as if I'm in the toplevel directory of a mingw tree"
37 echo "Usage: cd ghc-<version> ; ../distrib/prep-bin-dist-mingw"
41 echo "Removing configure script files...not needed"
42 rm -f config.guess config.sub configure configure.in mkdirhier
43 rm -f Makefile-bin.in Makefile.in aclocal.m4 install-sh
46 mv bin/i386-unknown-mingw32/* bin/
47 rmdir bin/i386-unknown-mingw32
51 mv lib/i386-unknown-mingw32/* .
52 rmdir lib/i386-unknown-mingw32
54 mv ghc-asm.prl ghc-asm
55 mv ghc-split.prl ghc-split
57 echo "create gcc-lib/"
59 # A bunch of stuff gets lumped into gcc-lib:
61 # - the gcc-lib/ + gcc-lib/include of the gcc you
62 # intend to ship (normally located as
63 # lib/gcc-lib/mingw/<gcc version>/ in your mingw tree.)
64 # - the contents of mingw/lib/
65 # - ld.exe, as.exe, dlltool.exe, dllwrap.exe from mingw/bin
68 cp $gcc_lib/* gcc-lib/
69 cp $gcc_lib/include/* gcc-lib/
70 cp $mingw_lib/* gcc-lib/
71 cp $mingw_bin/as.exe gcc-lib/
72 cp $mingw_bin/ld.exe gcc-lib/
73 # Note: later versions of dlltool.exe depend on a bfd helper DLL.
74 cp $mingw_bin/dllwrap.exe gcc-lib/
75 cp $mingw_bin/dlltool.exe gcc-lib/
78 echo "extra header files inside of include/"
80 # contains mingw/include
82 cp -Rf $mingw_include/* include/mingw
84 # g++-3/ subdir causes problems with installer tool (+ being a
85 # troublesome character); leave out for now.
86 rm -rf include/mingw/g++-3/ || echo "g++-3/ not there"
89 cp ${mingw_bin}/gcc.exe .
91 echo "copy in perl too"
92 cp ${perl_dir}/perl.exe .
93 cp ${perl_dir}/perl56.dll .
95 # For reasons unknown, duplicate copies of misc package files in share/
96 # (leave them be for now.)
98 echo "formatting documentation"
101 cp ../ghc/docs/users_guide/users_guide.pdf doc/
102 cp ../hslibs/doc/hslibs.pdf doc/
104 #mkdir doc/user-guide
105 #cp -Rf html/* doc/user-guide/