From 7c6bd4d7ed69424316bff13faa19a967f5eb788a Mon Sep 17 00:00:00 2001 From: mthomas Date: Thu, 12 Dec 2002 03:15:41 +0000 Subject: [PATCH] [project @ 2002-12-12 03:15:41 by mthomas] Towards a MinGW32 binary distribution with all accessories + compiler. --- distrib/prep-bin-dist-mingw | 35 ++++++++++++++++----------------- distrib/prep-bin-dist-mingw-greencard | 34 ++++++++++++++++++++++++++++++++ distrib/prep-bin-dist-mingw-happy | 31 +++++++++++++++++++++++++++++ distrib/prep-bin-dist-mingw-hdirect | 33 +++++++++++++++++++++++++++++++ 4 files changed, 115 insertions(+), 18 deletions(-) create mode 100644 distrib/prep-bin-dist-mingw-greencard create mode 100644 distrib/prep-bin-dist-mingw-happy create mode 100644 distrib/prep-bin-dist-mingw-hdirect diff --git a/distrib/prep-bin-dist-mingw b/distrib/prep-bin-dist-mingw index 58b78ff..d63e145 100644 --- a/distrib/prep-bin-dist-mingw +++ b/distrib/prep-bin-dist-mingw @@ -14,22 +14,24 @@ # #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 @@ -41,6 +43,7 @@ fi; 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/ @@ -83,10 +86,12 @@ cp -Rf $mingw_include/* include/mingw # # 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 . @@ -98,12 +103,6 @@ cp ${perl_dir}/perl56.dll . 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" diff --git a/distrib/prep-bin-dist-mingw-greencard b/distrib/prep-bin-dist-mingw-greencard new file mode 100644 index 0000000..68ff6fd --- /dev/null +++ b/distrib/prep-bin-dist-mingw-greencard @@ -0,0 +1,34 @@ +#!/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 +# foo$ make binary-dist Project=GreenCard +# foo$ cd gc- +# foo$ ../distrib/prep-bin-dist-mingw-greencard +# + +echo "In prep-bin-dist-mingw-greencard $1" +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- ; ../distrib/prep-bin-dist-mingw-greencard " + exit 1; +fi; + +echo "rejig bin/" +cp bin/i386-unknown-mingw32/green-card.exe $binary_dir/bin +strip $binary_dir/bin/green-card.exe + +echo "rejig lib/" +cp lib/i386-unknown-mingw32/* $binary_dir + +echo "rejig share/" +cp share/* $binary_dir diff --git a/distrib/prep-bin-dist-mingw-happy b/distrib/prep-bin-dist-mingw-happy new file mode 100644 index 0000000..9efd277 --- /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 +# foo$ make binary-dist Project=Ghc +# foo$ cd ghc- +# foo$ ../distrib/prep-bin-dist-mingw-happy +# + +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- ; ../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 + diff --git a/distrib/prep-bin-dist-mingw-hdirect b/distrib/prep-bin-dist-mingw-hdirect new file mode 100644 index 0000000..8fe26ed --- /dev/null +++ b/distrib/prep-bin-dist-mingw-hdirect @@ -0,0 +1,33 @@ +#!/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 +# foo$ make binary-dist Project=Ghc +# foo$ cd ghc- +# foo$ ../distrib/prep-bin-dist-mingw-hdirect +# + +echo "In prep-bin-dist-mingw-hdirect $1" +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 - ; ../distrib/prep-bin-dist-mingw-hdirect" + exit 1; +fi; + +echo "rejig bin/" +cp bin/i386-unknown-mingw32/ihc.exe $binary_dir/bin +strip $binary_dir/bin/ihc.exe + +echo "rejig lib/" +cp -r lib/i386-unknown-mingw32/imports/* $binary_dir/imports +cp lib/i386-unknown-mingw32/*.o $binary_dir +cp lib/i386-unknown-mingw32/*.a $binary_dir -- 1.7.10.4