slightly rework the gcc-4.3 checks, thanks {Nico}
[openwrt/openwrt.git] / tools / Makefile
index f21b5a58200c862479f4041b8d944375056b4b74..e24044d1714cf62a4f66a23cdebeab19885f98e9 100644 (file)
@@ -9,7 +9,7 @@
 curdir:=tools
 
 # subdirectories to descend into
-$(curdir)/builddirs := sed sstrip ipkg-utils genext2fs squashfs mtd-utils lzma mkimage firmware-utils patch-cmdline pkg-config automake $(if $(CONFIG_CCACHE),ccache) bison $(if $(CONFIG_powerpc),dtc) lua quilt autoconf
+$(curdir)/builddirs := sed sstrip ipkg-utils genext2fs squashfs mtd-utils lzma mkimage firmware-utils patch-cmdline pkg-config automake $(if $(CONFIG_CCACHE),ccache) bison $(if $(CONFIG_powerpc),dtc) lua quilt autoconf $(if $(CONFIG_GCC_VERSION_4_3),gmp mpfr)
 
 # builddir dependencies
 $(curdir)/squashfs/compile := $(curdir)/lzma/install
@@ -38,7 +38,9 @@ $(STAGING_DIR_HOST)/bin/md5sum: $(STAGING_DIR)/.prepared
        fi
 
 $(STAGING_DIR_HOST)/bin/find: $(STAGING_DIR)/.prepared
-       [ -x "$(FIND)" ] && ln -sf "$(FIND)" $@
+       if [ -x "$(FIND)" -a "$(FIND)" != "$@" ]; then \
+               ln -sf "$(FIND)" $@; \
+       fi
 
 
 $(curdir)/cmddeps = $(patsubst %,$(STAGING_DIR_HOST)/bin/%,find md5sum)