Remove ilxGen; part of trac #2243
[ghc-hetmet.git] / gmp / Makefile
index 13faf9f..8f2097c 100644 (file)
@@ -36,7 +36,6 @@ PLATFORM := $(shell echo $(HOSTPLATFORM) | sed 's/i[567]86/i486/g')
 
 GMP_TARBALL := $(firstword $(wildcard gmp*.tar.gz))
 GMP_DIR := $(subst .tar.gz,,$(GMP_TARBALL))
-BMP_BUILD_DIR := build
 
 ifeq "$(findstring dyn, $(GhcRTSWays))" "dyn"
 BUILD_SHARED=yes
@@ -45,26 +44,27 @@ BUILD_SHARED=no
 endif
 
 boot :: stamp.gmp.static
-all :: gmp.h libgmp.a
-install :: gmp.h libgmp.a
+BINDIST_STAMPS = stamp.gmp.static
 INSTALL_HEADERS += gmp.h
 INSTALL_LIBS += libgmp.a
 
 ifeq "$(BUILD_SHARED)" "yes"
 boot :: stamp.gmp.shared
-all :: libgmp-3.dll libgmp.dll.a
-install :: libgmp-3.dll libgmp.dll.a
+BINDIST_STAMPS += stamp.gmp.shared
 INSTALL_LIBS += libgmp.dll.a
 INSTALL_PROGS += libgmp-3.dll
 endif
 
+install all :: $(INSTALL_HEADERS) $(INSTALL_LIBS) $(INSTALL_PROGS)
+
 stamp.gmp.static:
        $(RM) -rf $(GMP_DIR) gmpbuild
        $(TAR) -zxf $(GMP_TARBALL)
        mv $(GMP_DIR) gmpbuild
        chmod +x ln
        (set -o igncr 2>/dev/null) && set -o igncr; export SHELLOPTS; \
-           export PATH=`pwd`:$$PATH; \
+           PATH=`pwd`:$$PATH; \
+           export PATH; \
            cd gmpbuild && \
            CC=$(WhatGccIsCalled) $(SHELL) configure \
                  --enable-shared=no --host=$(PLATFORM) --build=$(PLATFORM)
@@ -76,7 +76,8 @@ stamp.gmp.shared:
        mv $(GMP_DIR) gmpbuild-shared
        chmod +x ln
        (set -o igncr 2>/dev/null) && set -o igncr; export SHELLOPTS; \
-           export PATH=`pwd`:$$PATH; \
+           PATH=`pwd`:$$PATH; \
+           export PATH; \
            cd gmpbuild-shared && \
            CC=$(WhatGccIsCalled) $(SHELL) configure \
                  --enable-shared=yes --disable-static --host=$(PLATFORM) --build=$(PLATFORM)
@@ -116,22 +117,20 @@ endif
 include $(TOP)/mk/target.mk
 
 binary-dist:
-       @:
-ifneq "$(HaveLibGmp)" "YES"
-ifneq "$(HaveFrameworkGMP)" "YES"
        $(INSTALL_DIR)                         $(BIN_DIST_DIR)/gmp
-       touch $(BIN_DIST_DIR)/gmp/$(GMP_TARBALL)
        $(INSTALL_DATA)    Makefile            $(BIN_DIST_DIR)/gmp/
-ifneq "$(INSTALL_PROGS)" ""
+ifneq "$(HaveLibGmp)" "YES"
+ ifneq "$(HaveFrameworkGMP)" "YES"
+       $(INSTALL_DATA)    $(BINDIST_STAMPS)   $(BIN_DIST_DIR)/gmp/
+  ifneq "$(INSTALL_PROGS)" ""
        $(INSTALL_DATA)    $(INSTALL_PROGS)    $(BIN_DIST_DIR)/gmp/
-endif
-ifneq "$(INSTALL_LIBS)" ""
+  endif
+  ifneq "$(INSTALL_LIBS)" ""
        $(INSTALL_DATA)    $(INSTALL_LIBS)     $(BIN_DIST_DIR)/gmp/
-endif
-ifneq "$(INSTALL_HEADERS)" ""
+  endif
+  ifneq "$(INSTALL_HEADERS)" ""
        $(INSTALL_HEADER)  $(INSTALL_HEADERS)  $(BIN_DIST_DIR)/gmp/
-endif
-
-endif
+  endif
+ endif
 endif