[project @ 2002-07-09 15:57:09 by sof]
[ghc-hetmet.git] / distrib / prep-bin-dist-mingw
1 #!/bin/sh
2 #
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
6 # the tree.
7 #
8 # To use:
9 #
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
14 #
15 export gcc_lib=c:/ghc/ghc-5.02.2/gcc-lib
16 export perl_dir=c:/ghc/ghc-5.02.2
17 export mingw_include=c:/ghc/ghc-5.02.2/include/mingw
18
19 # Play safe
20 if ! [ -d bin/i386-unknown-mingw32 ] ; then
21   echo "Doesn't look as if I'm in the toplevel directory of a mingw tree"
22   echo "Usage: cd ghc-<version> ; ../distrib/prep-bin-dist-mingw"
23   exit 1;
24 fi;
25
26 echo "Removing configure script files...not needed"
27 rm -f config.guess config.sub configure configure.in mkdirhier
28 rm -f Makefile-bin.in Makefile.in aclocal.m4 install-sh
29
30 echo "rejig bin/"
31 mv bin/i386-unknown-mingw32/* bin/
32 rmdir bin/i386-unknown-mingw32
33 strip bin/ghc.exe
34
35 echo "rejig lib/"
36 mv lib/i386-unknown-mingw32/* .
37 rmdir lib/i386-unknown-mingw32
38 rmdir lib
39 mv ghc-asm.prl ghc-asm
40 mv ghc-split.prl ghc-split
41
42 echo "copy in gcc-lib/"
43 cp -Rf $gcc_lib .
44
45 echo "extra header files inside of include/"
46 mkdir include/mingw
47 cp -Rf $mingw_include include/
48
49
50 echo "copy in perl too"
51 cp ${perl_dir}/perl.exe .
52 cp ${perl_dir}/perl56.dll .
53 cp ${perl_dir}/gcc.exe .
54
55 # For reasons unknown, duplicate copies of misc package files in share/
56 # (leave them be for now.)
57
58 echo "formatting documentation"
59 cp README README.txt
60 mv share doc
61 cp ../ghc/docs/users_guide/users_guide.pdf doc/
62 cp ../hslibs/doc/hslibs.pdf doc/
63 #mkdir doc
64 #mkdir doc/user-guide
65 #cp -Rf html/* doc/user-guide/
66 #cp pdf/set.pdf doc/
67 #rm -rf html/
68 #rm -rf pdf/
69