X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/914e3a320db488a8f13a63d2a2633564fc2894cf..3d14a11eddc3ed3059d0fd921c4ae9bcaa6b75f3:/tools/Makefile diff --git a/tools/Makefile b/tools/Makefile index 3cfbb8bbd..e15f061a4 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,8 +27,23 @@ $(STAGING_DIR)/.prepared: $(TMP_DIR)/.build $(INSTALL_DATA) $(TOPDIR)/tools/include/*.h $(STAGING_DIR_HOST)/include/ touch $@ -$(curdir)//prepare = $(STAGING_DIR)/.prepared -$(curdir)//compile = $(STAGING_DIR)/.prepared +$(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 + +$(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