merge
[ghc.git] / distrib / prep-bin-dist-mingw-greencard
1 #!/bin/sh\r
2 #\r
3 # Running 'binary-dist' gives us a tree which\r
4 # isn't quite right for the purposes of creating\r
5 # a mingw/win32 install tree.  This script rejigs\r
6 # the tree.\r
7 #\r
8 # To use:\r
9 #\r
10 #   foo$ cd <top of fptools build tree>\r
11 #   foo$ make binary-dist Project=GreenCard \r
12 #   foo$ cd gc-<version>\r
13 #   foo$ ../distrib/prep-bin-dist-mingw-greencard <ghc-dir>\r
14 #\r
15 \r
16 echo "In prep-bin-dist-mingw-greencard $1"\r
17 binary_dir=../$1\r
18 \r
19 # Play safe\r
20 if ! [ -d bin/i386-unknown-mingw32 ] ; then\r
21   echo "Doesn't look as if I'm in the toplevel directory of a mingw tree"\r
22   echo "Usage: cd ghc-<version> ; ../distrib/prep-bin-dist-mingw-greencard <ghc-bin-dist-dir>"\r
23   exit 1;\r
24 fi;\r
25 \r
26 echo "rejig bin/"\r
27 cp lib/i386-unknown-mingw32/greencard-bin.exe $binary_dir/bin/greencard.exe\r
28 strip $binary_dir/bin/greencard.exe\r
29 \r
30 echo "rejig lib/"\r
31 cp -r lib/i386-unknown-mingw32/* $binary_dir\r
32 \r
33 exit 0\r