[PATCH 2/3] rtems: Make prefix configurable
Martin Erik Werner
martinerikwerner.aac at gmail.com
Sat Sep 30 16:31:29 UTC 2017
If the toolchain has been relocated, the configured-with-prefix will not
match the desired install path. Hence enable setting prefix manually in
the install-target.sh script.
Signed-off-by: Martin Erik Werner <martin.werner at aacmicrotec.com>
---
rtems/install-target.sh | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/rtems/install-target.sh b/rtems/install-target.sh
index f6d89f6..df2e5d1 100755
--- a/rtems/install-target.sh
+++ b/rtems/install-target.sh
@@ -3,9 +3,26 @@
target="$1"
CXX="$target-g++"
-if which "$CXX" ; then
- prefix=`"$CXX" --verbose 2>&1 | grep 'Configured with' | sed 's/.*prefix=//' | sed 's/ .*//'`
+case $# in
+ 1)
+ if ! which "$CXX" ; then
+ exit 1
+ fi
+ prefix=`"$CXX" --verbose 2>&1 | grep 'Configured with' | sed 's/.*prefix=//' | sed 's/ .*//'`
+ ;;
+
+ 2)
+ prefix="$2"
+ ;;
+
+ *)
+ echo "usage install-target.sh <target> [<prefix>]"
+ exit 1
+ ;;
+esac
+
+if which "$CXX" ; then
for i in `"$CXX" --print-multi-lib` ; do
multilibdir=`echo $i | sed 's/;.*//'`
CFLAGS=`echo $i | sed 's/.*;//' | sed 's/@/ -/g'`
--
2.11.0
More information about the devel
mailing list