projects
/
openwrt
/
svn-archive
/
archive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2a368f7
)
provide a md5sum wrapper for BSDish systems
author
Felix Fietkau
<nbd@openwrt.org>
Tue, 2 Sep 2008 10:58:01 +0000
(10:58 +0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Tue, 2 Sep 2008 10:58:01 +0000
(10:58 +0000)
SVN-Revision: 12495
tools/Makefile
patch
|
blob
|
history
diff --git
a/tools/Makefile
b/tools/Makefile
index d3dc5ad5f5fa768ba6fc2287edb6ff7834a1a2ae..f21b5a58200c862479f4041b8d944375056b4b74 100644
(file)
--- a/
tools/Makefile
+++ b/
tools/Makefile
@@
-27,11
+27,23
@@
$(STAGING_DIR)/.prepared: $(TMP_DIR)/.build
$(INSTALL_DATA) $(TOPDIR)/tools/include/*.h $(STAGING_DIR_HOST)/include/
touch $@
$(INSTALL_DATA) $(TOPDIR)/tools/include/*.h $(STAGING_DIR_HOST)/include/
touch $@
-$(STAGING_DIR_HOST)/bin/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
+
+$(STAGING_DIR_HOST)/bin/find: $(STAGING_DIR)/.prepared
[ -x "$(FIND)" ] && ln -sf "$(FIND)" $@
[ -x "$(FIND)" ] && ln -sf "$(FIND)" $@
-$(curdir)//prepare = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/bin/find
-$(curdir)//compile = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/bin/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
# prerequisites for the individual targets
$(curdir)/ := .config prereq