aboutsummaryrefslogtreecommitdiff
path: root/package/sed
diff options
context:
space:
mode:
authorGravatar Mike Frysinger <vapier@gentoo.org>2006-01-08 09:59:23 +0000
committerGravatar Mike Frysinger <vapier@gentoo.org>2006-01-08 09:59:23 +0000
commitaae52404c7ef88f1d85ff88cf34e8149369ab52d (patch)
treef4d1f60233ada3fda30ce210f0cc3bef8b46516e /package/sed
parent0e1be2d0f3e389abbd0d5aa0fedc3202268f2968 (diff)
downloadbuildroot-aae52404c7ef88f1d85ff88cf34e8149369ab52d.tar.gz
buildroot-aae52404c7ef88f1d85ff88cf34e8149369ab52d.tar.bz2
only generate the symlink to host sed once as reported by petev in bug 628
Diffstat (limited to 'package/sed')
-rw-r--r--package/sed/sed.mk17
1 files changed, 12 insertions, 5 deletions
diff --git a/package/sed/sed.mk b/package/sed/sed.mk
index de15e97dd0..0dee41798c 100644
--- a/package/sed/sed.mk
+++ b/package/sed/sed.mk
@@ -62,11 +62,18 @@ build-sed-host-binary: $(SED_DIR1)/$(SED_BINARY)
$(HOST_SED_DIR)/usr/man $(HOST_SED_DIR)/usr/share/doc; fi
use-sed-host-binary:
- @if [ -x /usr/bin/sed ]; then SED="/usr/bin/sed"; else \
- if [ -x /bin/sed ]; then SED="/bin/sed"; fi; fi; \
- mkdir -p $(HOST_SED_DIR)/bin; \
- rm -f $(HOST_SED_DIR)/$(SED_TARGET_BINARY); \
- ln -s $$SED $(HOST_SED_DIR)/$(SED_TARGET_BINARY)
+ @if [ -x /usr/bin/sed ] ; then \
+ SED="/usr/bin/sed" ; \
+ else \
+ if [ -x /bin/sed ] ; then \
+ SED="/bin/sed" ; \
+ fi \
+ fi ; \
+ if [ ! -e "$(HOST_SED_DIR)/$(SED_TARGET_BINARY)" ] ; then \
+ mkdir -p "$(HOST_SED_DIR)/bin"; \
+ rm -f "$(HOST_SED_DIR)/$(SED_TARGET_BINARY)"; \
+ ln -s "$$SED" "$(HOST_SED_DIR)/$(SED_TARGET_BINARY)"; \
+ fi
host-sed: $(HOST_SED_TARGET)