X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=tools%2FMakefile;h=e15f061a4d35d2f8590e89b9100caf9828dceac6;hb=4e99d40b7bd00c3130b7e6150d0868f8a57e229b;hp=989f3f09759dbb123af5189f3f941c93583d386c;hpb=4eb9d46e80e28ea4cb64efb66ecc40ed5406c30d;p=openwrt%2Fsvn-archive%2Farchive.git diff --git a/tools/Makefile b/tools/Makefile index 989f3f0975..e15f061a4d 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -13,6 +13,7 @@ $(curdir)/builddirs := sed sstrip ipkg-utils genext2fs squashfs mtd-utils lzma m # builddir dependencies $(curdir)/squashfs/compile := $(curdir)/lzma/install +$(curdir)/quilt/compile := $(curdir)/sed/install # preparatory work $(STAGING_DIR)/.prepared: $(TMP_DIR)/.build @@ -26,11 +27,23 @@ $(STAGING_DIR)/.prepared: $(TMP_DIR)/.build $(INSTALL_DATA) $(TOPDIR)/tools/include/*.h $(STAGING_DIR_HOST)/include/ touch $@ -$(STAGING_DIR_HOST)/bin/find: - [ -x "$(FIND)" ] && ln -sf "$(FIND)" $@ +$(STAGING_DIR_HOST)/bin/md5sum: $(STAGING_DIR)/.prepared + @MD5SUM=`which md5sum 2>/dev/null`; \ + if [ "$@" != "$$MD5SUM" ]; then \ + if [ -x "$$MD5SUM" ]; then \ + ln -sf "$$MD5SUM" "$@"; \ + else \ + cp $(SCRIPT_DIR)/md5sum $(STAGING_DIR_HOST)/bin/; \ + fi; \ + fi -$(curdir)//prepare = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/bin/find -$(curdir)//compile = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/bin/find +$(STAGING_DIR_HOST)/bin/find: $(STAGING_DIR)/.prepared + [ -x "$(FIND)" -a "$(FIND)" != "$@" ] && ln -sf "$(FIND)" $@ + + +$(curdir)/cmddeps = $(patsubst %,$(STAGING_DIR_HOST)/bin/%,find md5sum) +$(curdir)//prepare = $(STAGING_DIR)/.prepared $($(curdir)/cmddeps) +$(curdir)//compile = $(STAGING_DIR)/.prepared $($(curdir)/cmddeps) # prerequisites for the individual targets $(curdir)/ := .config prereq