- small tweaks to the gmp and mpfr -clean targets to uninstall them frmo the target.
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Thu, 14 Dec 2006 08:12:18 +0000 (08:12 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Thu, 14 Dec 2006 08:12:18 +0000 (08:12 -0000)
- minor adjustments.

package/gmp/gmp.mk
package/mpfr/mpfr.mk

index acd9e0ecc78cb09dab3c27584b0106fe6abcc364..ff5015074b01606183e49599d065d6e03df43375 100644 (file)
@@ -88,16 +88,17 @@ libgmp: uclibc $(TARGET_DIR)/lib/libgmp.so.$(GMP_LIBVERSION)
 libgmp-stage: uclibc $(STAGING_DIR)/lib/$(GMP_BINARY)
 
 libgmp-clean:
-       rm -f $(TARGET_DIR)/lib/$(GMP_BINARY)
+       rm -f $(TARGET_DIR)/lib/$(GMP_BINARY) $(TARGET_DIR)/lib/libgmp.so* \
+               $(TARGET_DIR)/usr/include/gmp.h
        -$(MAKE) -C $(GMP_DIR) clean
 
 libgmp-dirclean:
        rm -rf $(GMP_DIR)
 
-GMP_HOST_DIR:=$(TOOL_BUILD_DIR)/gmp-$(GMP_VERSION)
-$(GMP_HOST_DIR)/.configured: $(GMP_DIR)/.unpacked
-       [ -d $(GMP_HOST_DIR) ] || mkdir $(GMP_HOST_DIR)
-       (cd $(GMP_HOST_DIR); \
+GMP_DIR2:=$(TOOL_BUILD_DIR)/gmp-$(GMP_VERSION)
+$(GMP_DIR2)/.configured: $(GMP_DIR)/.unpacked
+       [ -d $(GMP_DIR2) ] || mkdir $(GMP_DIR2)
+       (cd $(GMP_DIR2); \
                CC_FOR_BUILD="$(HOSTCC)" \
                CC="$(HOSTCC)" \
                CFLAGS="$(HOST_CFLAGS)" \
@@ -117,13 +118,17 @@ $(GMP_HOST_DIR)/.configured: $(GMP_DIR)/.unpacked
                --enable-shared \
                --enable-static \
                $(DISABLE_NLS) \
-       ) && \
-       touch $(GMP_HOST_DIR)/.configured
+       );
+       touch $(GMP_DIR2)/.configured
 
-$(GMP_HOST_DIR)/.libs/$(GMP_BINARY): $(GMP_HOST_DIR)/.configured
-       $(MAKE) -C $(GMP_HOST_DIR)
+$(GMP_DIR2)/.libs/$(GMP_BINARY): $(GMP_DIR2)/.configured
+       $(MAKE) -C $(GMP_DIR2)
 
-libgmp-host: $(GMP_HOST_DIR)/.libs/$(GMP_BINARY)
+GMP_HOST_DIR:=$(TOOL_BUILD_DIR)/gmp
+$(GMP_HOST_DIR)/lib/$(GMP_BINARY): $(GMP_DIR2)/.libs/$(GMP_BINARY)
+       mkdir -p $(GMP_HOST_DIR)/lib $(GMP_HOST_DIR)/include
+       cp -a $(GMP_DIR2)/.libs/libgmp.* $(GMP_HOST_DIR)/lib
+       cp -a $(GMP_DIR2)/gmp.h $(GMP_HOST_DIR)/include
 
 #############################################################
 #
index a83346656046c6768013e36a683a622e2d23a2ec..15322d8e1d6f7368e1a6523dc516e06f30558ffd 100644 (file)
@@ -95,16 +95,18 @@ libmpfr: uclibc libgmp $(TARGET_DIR)/lib/libmpfr.so.$(MPFR_LIBVERSION)
 libmpfr-stage: uclibc $(STAGING_DIR)/lib/$(MPFR_BINARY)
 
 libmpfr-clean:
-       rm -f $(TARGET_DIR)/lib/$(MPFR_BINARY)
+       rm -f $(TARGET_DIR)/lib/$(MPFR_BINARY) $(TARGET_DIR)/lib/libmpfr.so* \
+               $(TARGET_DIR)/usr/include/mpfr.h \
+               $(TARGET_DIR)/usr/include/mpf2mpfr.h
        -$(MAKE) -C $(MPFR_DIR) clean
 
 libmpfr-dirclean:
        rm -rf $(MPFR_DIR)
 
-MPFR_HOST_DIR:=$(TOOL_BUILD_DIR)/mpfr-$(MPFR_VERSION)
-$(MPFR_HOST_DIR)/.configured: $(MPFR_DIR)/.unpacked libgmp-host
-       [ -d $(MPFR_HOST_DIR) ] || mkdir $(MPFR_HOST_DIR)
-       (cd $(MPFR_HOST_DIR); \
+MPFR_DIR2:=$(TOOL_BUILD_DIR)/mpfr-$(MPFR_VERSION)
+$(MPFR_DIR2)/.configured: $(MPFR_DIR)/.unpacked $(GMP_HOST_DIR)/lib/$(GMP_BINARY)
+       [ -d $(MPFR_DIR2) ] || mkdir $(MPFR_DIR2)
+       (cd $(MPFR_DIR2); \
                CC="$(HOSTCC)" \
                CXX="$(HOSTCXX)" \
                $(MPFR_DIR)/configure \
@@ -122,15 +124,19 @@ $(MPFR_HOST_DIR)/.configured: $(MPFR_DIR)/.unpacked libgmp-host
                --infodir=/usr/info \
                --enable-shared \
                --enable-static \
-               --with-gmp-build=$(GMP_HOST_DIR) \
+               --with-gmp-build=$(GMP_DIR2) \
                $(DISABLE_NLS) \
-       ) && \
+       );
        touch $@
 
-$(MPFR_HOST_DIR)/.libs/$(MPFR_BINARY): $(MPFR_HOST_DIR)/.configured
-       $(MAKE) -C $(MPFR_HOST_DIR)
+$(MPFR_DIR2)/.libs/$(MPFR_BINARY): $(MPFR_DIR2)/.configured
+       $(MAKE) -C $(MPFR_DIR2)
 
-libmpfr-host: $(MPFR_HOST_DIR)/.libs/$(MPFR_BINARY)
+MPFR_HOST_DIR:=$(TOOL_BUILD_DIR)/mpfr
+$(MPFR_HOST_DIR)/lib/libmpfr.a: $(MPFR_DIR2)/.libs/$(MPFR_BINARY)
+       mkdir -p $(MPFR_HOST_DIR)/lib $(MPFR_HOST_DIR)/include
+       cp -a $(MPFR_DIR2)/.libs/libmpfr.* $(MPFR_HOST_DIR)/lib
+       cp -a $(MPFR_DIR)/mpfr.h $(MPFR_DIR)/mpf2mpfr.h $(MPFR_HOST_DIR)/include
 
 #############################################################
 #