Towards a MinGW32 binary distribution with all accessories + compiler.
#
#export gcc_lib=c:/ghc/ghc-5.02.2/gcc-lib
+export old_ghc_top=c:/lang/ghc-5.04.1
+export mingw_top=c:/lang/MinGW32
+
#Directory where a (cygwin-free) perl binary resides.
-export perl_dir=c:/ghc/ghc-5.04
+# export perl_dir=c:/ghc/ghc-5.04
+export perl_dir=$old_ghc_top
# The gcc-lib directory of the mingw tree you want to
# include with the binary dist.
-export gcc_lib=f:/mingw/lib/gcc-lib/mingw32/2.95.3-6/
+# export gcc_lib=f:/mingw/lib/gcc-lib/mingw32/2.95.3-6/
+export gcc_lib=$mingw_top/lib/gcc-lib/mingw32/2.95.3-8
#
# The mingw include, lib, and bin directories.
#
-export mingw_include=f:/mingw/include
-export mingw_lib=f:/mingw/lib/
-export mingw_bin=f:/mingw/bin/
-
-export perl_dir=c:/ghc/ghc-5.04
-#export mingw_include=c:/ghc/ghc-5.02.2/include/mingw
+export mingw_include=$mingw_top/include
+export mingw_lib=$mingw_top/lib
+export mingw_bin=$mingw_top/bin
# Play safe
if ! [ -d bin/i386-unknown-mingw32 ] ; then
echo "Removing configure script files...not needed"
rm -f config.guess config.sub configure configure.in mkdirhier
rm -f Makefile-bin.in Makefile.in aclocal.m4 install-sh
+rm -rf autom4te.cache
echo "rejig bin/"
mv bin/i386-unknown-mingw32/* bin/
#
# g++-3/ subdir causes problems with installer tool (+ being a
# troublesome character); leave out for now.
-rm -rf include/mingw/g++-3/ || echo "g++-3/ not there"
+#rm -rf include/mingw/g++-3/ || echo "g++-3/ not there"
+rm -rf include/mingw/c++ || echo "c++/ not there"
echo "add gcc"
-cp ${mingw_bin}/gcc.exe .
+# cp ${mingw_bin}/gcc.exe .
+cp ${mingw_bin}/gcc-2.exe gcc.exe
echo "copy in perl too"
cp ${perl_dir}/perl.exe .
echo "formatting documentation"
cp README README.txt
mv share doc
-cp ../ghc/docs/users_guide/users_guide.pdf doc/
-cp ../hslibs/doc/hslibs.pdf doc/
-#mkdir doc
-#mkdir doc/user-guide
-#cp -Rf html/* doc/user-guide/
-#cp pdf/set.pdf doc/
-#rm -rf html/
-#rm -rf pdf/
+cp ../ghc/docs/users_guide/users_guide.pdf doc/ || echo "No User Guide PDF doc found"
+cp ../hslibs/doc/hslibs.pdf doc/ || echo "No HSLIBS PDF doc found"
--- /dev/null
+#!/bin/sh\r
+#\r
+# Running 'binary-dist' gives us a tree which\r
+# isn't quite right for the purposes of creating\r
+# a mingw/win32 install tree. This script rejigs\r
+# the tree.\r
+#\r
+# To use:\r
+#\r
+# foo$ cd <top of fptools build tree>\r
+# foo$ make binary-dist Project=GreenCard \r
+# foo$ cd gc-<version>\r
+# foo$ ../distrib/prep-bin-dist-mingw-greencard <ghc-dir>\r
+#\r
+\r
+echo "In prep-bin-dist-mingw-greencard $1"\r
+binary_dir=../$1\r
+\r
+# Play safe\r
+if ! [ -d bin/i386-unknown-mingw32 ] ; then\r
+ echo "Doesn't look as if I'm in the toplevel directory of a mingw tree"\r
+ echo "Usage: cd ghc-<version> ; ../distrib/prep-bin-dist-mingw-greencard <ghc-bin-dist-dir>"\r
+ exit 1;\r
+fi;\r
+\r
+echo "rejig bin/"\r
+cp bin/i386-unknown-mingw32/green-card.exe $binary_dir/bin\r
+strip $binary_dir/bin/green-card.exe\r
+\r
+echo "rejig lib/"\r
+cp lib/i386-unknown-mingw32/* $binary_dir\r
+\r
+echo "rejig share/"\r
+cp share/* $binary_dir\r
--- /dev/null
+#!/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
+
--- /dev/null
+#!/bin/sh\r
+#\r
+# Running 'binary-dist' gives us a tree which\r
+# isn't quite right for the purposes of creating\r
+# a mingw/win32 install tree. This script rejigs\r
+# the tree.\r
+#\r
+# To use:\r
+#\r
+# foo$ cd <top of fptools build tree>\r
+# foo$ make binary-dist Project=Ghc \r
+# foo$ cd ghc-<version>\r
+# foo$ ../distrib/prep-bin-dist-mingw-hdirect <ghc-bin-dist-dir>\r
+#\r
+\r
+echo "In prep-bin-dist-mingw-hdirect $1"\r
+binary_dir=../$1\r
+\r
+# Play safe\r
+if ! [ -d bin/i386-unknown-mingw32 ] ; then\r
+ echo "Doesn't look as if I'm in the toplevel directory of a mingw tree"\r
+ echo "Usage: cd <project>-<version> ; ../distrib/prep-bin-dist-mingw-hdirect"\r
+ exit 1;\r
+fi;\r
+\r
+echo "rejig bin/"\r
+cp bin/i386-unknown-mingw32/ihc.exe $binary_dir/bin\r
+strip $binary_dir/bin/ihc.exe\r
+\r
+echo "rejig lib/"\r
+cp -r lib/i386-unknown-mingw32/imports/* $binary_dir/imports\r
+cp lib/i386-unknown-mingw32/*.o $binary_dir\r
+cp lib/i386-unknown-mingw32/*.a $binary_dir\r