diff options
author | Ian Lynagh <igloo@earth.li> | 2007-07-05 21:52:40 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2007-07-05 21:52:40 +0000 |
commit | fdf1cd0399158308769fcb2ab7e46e215a68d865 (patch) | |
tree | f6681f1e4c419db48133e66e2279255b6d4cb17e /gmp | |
parent | e552cfc427d2734b9a9629f2ab1d22f493e775f6 (diff) | |
download | haskell-fdf1cd0399158308769fcb2ab7e46e215a68d865.tar.gz |
Update the in-tree GMP; fixes trac #832
gmp is now in a top-level directory and we only have the tarball in the
darcs repo. It gets untarred if it is needed.
Diffstat (limited to 'gmp')
-rw-r--r-- | gmp/Makefile | 110 | ||||
-rw-r--r-- | gmp/gmp-4.2.1.tar.gz | bin | 0 -> 2249464 bytes | |||
-rw-r--r-- | gmp/ln | 2 |
3 files changed, 112 insertions, 0 deletions
diff --git a/gmp/Makefile b/gmp/Makefile new file mode 100644 index 0000000000..18d0b75049 --- /dev/null +++ b/gmp/Makefile @@ -0,0 +1,110 @@ + +TOP=.. + +include $(TOP)/mk/boilerplate.mk + +# ----------------------------------------------------------------------------- +# Compile GMP only if we don't have it already +# +# We use GMP's own configuration stuff, because it's all rather hairy +# and not worth re-implementing in our Makefile framework. + +ifneq "$(HaveLibGmp)" "YES" +ifneq "$(HaveFrameworkGMP)" "YES" + +boot :: stamp.gmp + +PLATFORM := $(shell echo $(HOSTPLATFORM) | sed 's/i[567]86/i486/g') + +# 2007-07-05 +# We do +# set -o igncr; export SHELLOPTS +# here as otherwise checking the size of limbs +# makes the build fall over on Cygwin. See the thread +# http://www.cygwin.com/ml/cygwin/2006-12/msg00011.html +# for more details. + +# 2007-07-05 +# Passing +# as_ln_s='cp -p' +# isn't sufficient to stop cygwin using symlinks the mingw gcc can't +# follow, as it isn't used consistently. Instead we put an ln.bat in +# path that always fails. + +GMP_TARBALL := $(firstword $(wildcard gmp*.tar.gz)) +GMP_DIR := $(subst .tar.gz,,$(GMP_TARBALL)) +BMP_BUILD_DIR := build + +stamp.gmp: + $(RM) -rf $(GMP_DIR) gmpbuild + $(TAR) -zxf $(GMP_TARBALL) + mv $(GMP_DIR) gmpbuild + chmod +x ln + set -o igncr; export SHELLOPTS; \ + export PATH=`pwd`:$$PATH; \ + cd gmpbuild && \ + CC=$(WhatGccIsCalled) $(SHELL) configure \ + --enable-shared=no --host=$(PLATFORM) --build=$(PLATFORM) + touch $@ + +all :: gmpbuild/libgmp.a + +ifeq "$(DLLized)" "YES" +all :: $(DLL_PEN)/gmp.dll + +$(DLL_PEN)/gmp.dll: + $(MAKE) -C gmpbuild gmp.dll + $(CP) gmpbuild/gmp.dll $(DLL_PEN) +endif + +install :: gmpbuild/libgmp.a + +INSTALL_LIBS += gmpbuild/libgmp.a + +gmpbuild/libgmp.a :: + $(MAKE) -C gmpbuild MAKEFLAGS= + $(CP) gmpbuild/.libs/libgmp.a gmpbuild + $(RANLIB) gmpbuild/libgmp.a +endif +endif + +clean distclean maintainer-clean :: + $(RM) -f stamp.gmp + $(RM) -rf gmpbuild + $(RM) -rf gmpbuild + +#----------------------------------------------------------------------------- +# +# Files to install +# +# Just libHSrts is installed uniformly across ways +# +ifeq "$(DLLized)" "YES" +INSTALL_PROGS += gmpbuild/gmp.dll +INSTALL_LIBS += gmpbuild/libgmp_imp.a +endif + +#----------------------------------------------------------------------------- +# +# binary-dist + +include $(TOP)/mk/target.mk + +binary-dist: + @: +ifneq "$(HaveLibGmp)" "YES" +ifneq "$(HaveFrameworkGMP)" "YES" + $(INSTALL_DIR) $(BIN_DIST_DIR)/gmp + $(INSTALL_DIR) $(BIN_DIST_DIR)/gmp/gmpbuild + touch $(BIN_DIST_DIR)/gmp/$(GMP_TARBALL) + $(INSTALL_DATA) Makefile $(BIN_DIST_DIR)/gmp/ +ifneq "$(INSTALL_PROGS)" "" + $(INSTALL_DATA) $(INSTALL_PROGS) $(BIN_DIST_DIR)/gmp/gmpbuild/ +endif +ifneq "$(INSTALL_LIBS)" "" + $(INSTALL_DATA) $(INSTALL_LIBS) $(BIN_DIST_DIR)/gmp/gmpbuild/ +endif + +endif +endif + diff --git a/gmp/gmp-4.2.1.tar.gz b/gmp/gmp-4.2.1.tar.gz Binary files differnew file mode 100644 index 0000000000..4ed0e97c2c --- /dev/null +++ b/gmp/gmp-4.2.1.tar.gz diff --git a/gmp/ln b/gmp/ln new file mode 100644 index 0000000000..0040f953c9 --- /dev/null +++ b/gmp/ln @@ -0,0 +1,2 @@ +exit 1 + |