[project @ 2004-11-10 03:20:31 by wolfgang]
[ghc-hetmet.git] / ghc / rts / Makefile
index 718e00f..cf81863 100644 (file)
@@ -225,11 +225,16 @@ endif
 ifneq "$(HaveLibGmp)" "YES"
 ifneq "$(HaveFrameworkHaskellSupport)" "YES"
 boot ::
-       cd gmp && CC=$(WhatGccIsCalled) ./configure --enable-shared=no \
-               --host=`echo $(HOSTPLATFORM) | sed 's/i[567]86/i486/g'`
+       if [ -f gmp/config.status ]; then \
+          cd gmp && CC=$(WhatGccIsCalled) ./config.status; \
+        else \
+          cd gmp && CC=$(WhatGccIsCalled) ./configure --enable-shared=no \
+                       --host=`echo $(HOSTPLATFORM) | sed 's/i[567]86/i486/g'`; \
+       fi
 
 # Slight cheatage here to pass host as target, but x-compilation isn't supported by ghc.
 
+ifeq "$(way)" ""
 all :: gmp/libgmp.a
 
 ifeq "$(DLLized)" "YES"
@@ -239,6 +244,7 @@ $(DLL_PEN)/gmp.dll:
        $(MAKE) -C gmp gmp.dll
        $(MV) gmp/gmp.dll $(DLL_PEN)
 endif
+endif
 
 install :: gmp/libgmp.a
 
@@ -285,6 +291,7 @@ endif
 
 # ToDo: should we really include Rts.h here?  Required for GNU_ATTRIBUTE().
 SRC_HC_OPTS += \
+  -I. \
   -\#include Prelude.h \
   -\#include Rts.h \
   -\#include RtsFlags.h \