summaryrefslogtreecommitdiff
path: root/distrib/prep-bin-dist-mingw-happy
diff options
context:
space:
mode:
Diffstat (limited to 'distrib/prep-bin-dist-mingw-happy')
-rw-r--r--distrib/prep-bin-dist-mingw-happy31
1 files changed, 31 insertions, 0 deletions
diff --git a/distrib/prep-bin-dist-mingw-happy b/distrib/prep-bin-dist-mingw-happy
new file mode 100644
index 0000000000..9efd2774be
--- /dev/null
+++ b/distrib/prep-bin-dist-mingw-happy
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# Running 'binary-dist' gives us a tree which
+# isn't quite right for the purposes of creating
+# a mingw/win32 install tree. This script rejigs
+# the tree.
+#
+# To use:
+#
+# foo$ cd <top of fptools build tree>
+# foo$ make binary-dist Project=Ghc
+# foo$ cd ghc-<version>
+# foo$ ../distrib/prep-bin-dist-mingw-happy <ghc-dir>
+#
+
+ghc_binary_dir=../$1
+
+# Play safe
+if ! [ -d bin/i386-unknown-mingw32 ] ; then
+ echo "Doesn't look as if I'm in the toplevel directory of a mingw tree"
+ echo "Usage: cd ghc-<version> ; ../distrib/prep-bin-dist-mingw"
+ exit 1;
+fi;
+
+echo "rejig bin/"
+mv lib/i386-unknown-mingw32/happy.bin $ghc_binary_dir/bin/happy.exe
+strip $ghc_binary_dir/bin/happy.exe
+
+echo "rejig lib/"
+mv lib/i386-unknown-mingw32/* $ghc_binary_dir
+