summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2003-12-07 21:43:38 +0000
committerRobert Schwebel <r.schwebel@pengutronix.de>2003-12-07 21:43:38 +0000
commitaf5b91acb3319115176fdef9010f2761de983d4d (patch)
tree40b773da206bbb273f7c039470251ab99123d4fe
parent7001541e776e96713897453066786d83a8087271 (diff)
downloadptxdist-af5b91acb3319115176fdef9010f2761de983d4d.tar.gz
ptxdist-af5b91acb3319115176fdef9010f2761de983d4d.tar.xz
take care not to make links in case short names are identical to long names
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunk@874 33e552b5-05e3-0310-8538-816dae2090ed
-rw-r--r--rules/xchain-binutils.make8
-rw-r--r--rules/xchain-gccstage2.make11
2 files changed, 14 insertions, 5 deletions
diff --git a/rules/xchain-binutils.make b/rules/xchain-binutils.make
index 0ca6b9463..b629df726 100644
--- a/rules/xchain-binutils.make
+++ b/rules/xchain-binutils.make
@@ -1,5 +1,5 @@
# -*-makefile-*-
-# $Id: xchain-binutils.make,v 1.13 2003/11/24 01:14:52 mkl Exp $
+# $Id: xchain-binutils.make,v 1.14 2003/12/07 21:42:25 robert Exp $
#
# Copyright (C) 2002, 2003 by Pengutronix e.K., Hildesheim, Germany
#
@@ -127,10 +127,14 @@ $(STATEDIR)/xchain-binutils.install: $(STATEDIR)/xchain-binutils.compile
#
# make short-name links to long-name programms
# e.g.: arm-linux-gcc -> arm-unknown-linux-gnu-gcc
+# take care not to make liks in case the short names are identical to
+# the long names
#
cd $(PTXCONF_PREFIX)/bin && \
for FILE in addr2line ar as ld nm objcompy objdump ranlib readelf size strings strip; do \
- ln -sf $(PTXCONF_GNU_TARGET)-$$FILE $(SHORT_TARGET)-linux-$$FILE; \
+ if [ ! -e $(SHORT_TARGET)-linux-$$FILE ]; then \
+ ln -sf $(PTXCONF_GNU_TARGET)-$$FILE $(SHORT_TARGET)-linux-$$FILE; \
+ fi; \
done
#
diff --git a/rules/xchain-gccstage2.make b/rules/xchain-gccstage2.make
index 0683e86dc..0d2117e5e 100644
--- a/rules/xchain-gccstage2.make
+++ b/rules/xchain-gccstage2.make
@@ -1,5 +1,5 @@
# -*-makefile-*-
-# $Id: xchain-gccstage2.make,v 1.22 2003/11/17 18:36:49 mkl Exp $
+# $Id: xchain-gccstage2.make,v 1.23 2003/12/07 21:43:38 robert Exp $
#
# Copyright (C) 2002, 2003 by Pengutronix e.K., Hildesheim, Germany
#
@@ -167,15 +167,20 @@ $(STATEDIR)/xchain-gccstage2.install: $(STATEDIR)/xchain-gccstage2.compile
#
# make short-name links to long-name programms
# e.g.: arm-linux-gcc -> arm-unknown-linux-gnu-gcc
+# don't link if short-name == long-name.
#
cd $(PTXCONF_PREFIX)/bin && \
for FILE in gcc gccbug cpp gcov; do \
- ln -sf $(PTXCONF_GNU_TARGET)-$$FILE $(SHORT_TARGET)-linux-$$FILE; \
+ if [ ! -e $(SHORT_TARGET)-linux-$$FILE ]; then \
+ ln -sf $(PTXCONF_GNU_TARGET)-$$FILE $(SHORT_TARGET)-linux-$$FILE;\
+ fi; \
done
ifdef PTXCONF_CXX
cd $(PTXCONF_PREFIX)/bin && \
for FILE in c++ g++ c++flit; do \
- ln -sf $(PTXCONF_GNU_TARGET)-$$FILE $(SHORT_TARGET)-linux-$$FILE; \
+ if [ ! -e $(SHORT_TARGET)-linux-$$FILE ]; then \
+ ln -sf $(PTXCONF_GNU_TARGET)-$$FILE $(SHORT_TARGET)-linux-$$FILE;\
+ fi; \
done
endif
touch $@