X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/9170cbf26cd990771f7b3ca05d6931b67289ee3f..e9404ac1bea6ce132d4f7baf62ca34226229f37a:/tools/Makefile diff --git a/tools/Makefile b/tools/Makefile index 4fe91f665..87a2940d0 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -101,10 +101,20 @@ $(STAGING_DIR_HOST)/bin/$(1): $(STAGING_DIR)/.prepared endef endif +$(STAGING_DIR_HOST)/bin/stat: $(STAGING_DIR)/.prepared + @rm -f $@ + @if stat --version > /dev/null 2>&1; then \ + ln -s `which stat` $@; \ + elif gstat --version > /dev/null 2>&1; then \ + ln -s `which gstat` $@; \ + else \ + echo "GNU stat not found"; \ + false; \ + fi + $(eval $(call PrepareCommand,find,gfind find)) $(eval $(call PrepareCommand,md5sum,md5sum $(SCRIPT_DIR)/md5sum)) $(eval $(call PrepareCommand,cp,gcp cp)) -$(eval $(call PrepareCommand,stat,gstat stat)) $(eval $(call PrepareCommand,seq,gseq seq)) $(curdir)/cmddeps = $(patsubst %,$(STAGING_DIR_HOST)/bin/%,find md5sum cp stat seq)