Skip to content

Commit 6aebbb3

Browse files
committed
buildsystem: Use printf instead of echo, use dollar shell subst instead backtick
1 parent 92a070b commit 6aebbb3

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

scripts/001-binutils.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ if [ "$(uname -s)" = "Darwin" ]; then
4343
if command -v brew &> /dev/null; then
4444
TARG_XTRA_OPTS="--with-system-zlib --with-gmp=$(brew --prefix gmp) --with-mpfr=$(brew --prefix mpfr) --with-mpfr=$(brew --prefix mpfr)"
4545
elif command -v port &> /dev/null; then
46-
MACPORT_BASE=$(dirname `port -q contents gmp|grep gmp.h`|sed s#/include##g)
47-
echo Macport base is $MACPORT_BASE
46+
MACPORT_BASE=$(dirname $(port -q contents gmp|grep gmp.h)|sed s#/include##g)
47+
printf 'Macport base is %s\n' "$MACPORT_BASE"
48+
alias sed='gsed'
4849
TARG_XTRA_OPTS="--with-system-zlib --with-libiconv_prefix=$MACPORT_BASE --with-gmp=$MACPORT_BASE --with-mpfr=$MACPORT_BASE --with-mpc=$MACPORT_BASE"
4950
fi
5051
fi

scripts/002-gcc-stage1.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ if [ "$(uname -s)" = "Darwin" ]; then
4545
TARG_XTRA_OPTS="--with-system-zlib --with-gmp=$(brew --prefix gmp) --with-mpfr=$(brew --prefix mpfr) --with-mpc=$(brew --prefix libmpc)"
4646
elif command -v port &> /dev/null; then
4747
## Check if using MacPorts
48-
MACPORT_BASE=$(dirname `port -q contents gmp|grep gmp.h`|sed s#/include##g)
49-
echo Macport base is $MACPORT_BASE
48+
MACPORT_BASE=$(dirname $(port -q contents gmp|grep gmp.h)|sed s#/include##g)
49+
printf 'Macport base is %s\n' "$MACPORT_BASE"
50+
alias sed='gsed'
5051
TARG_XTRA_OPTS="--with-system-zlib --with-libiconv_prefix=$MACPORT_BASE --with-gmp=$MACPORT_BASE --with-mpfr=$MACPORT_BASE --with-mpc=$MACPORT_BASE"
5152
fi
5253
fi

scripts/006-gcc-stage2.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ if [ "$(uname -s)" = "Darwin" ]; then
4646
TARG_XTRA_OPTS="--with-system-zlib --with-gmp=$(brew --prefix gmp) --with-mpfr=$(brew --prefix mpfr) --with-mpc=$(brew --prefix libmpc)"
4747
elif command -v port &> /dev/null; then
4848
## Check if using MacPorts
49-
MACPORT_BASE=$(dirname `port -q contents gmp|grep gmp.h`|sed s#/include##g)
50-
echo Macport base is $MACPORT_BASE
49+
MACPORT_BASE=$(dirname $(port -q contents gmp|grep gmp.h)|sed s#/include##g)
50+
printf 'Macport base is %s\n' "$MACPORT_BASE"
5151
alias sed='gsed'
5252
TARG_XTRA_OPTS="--with-system-zlib --with-libiconv_prefix=$MACPORT_BASE --with-gmp=$MACPORT_BASE --with-mpfr=$MACPORT_BASE --with-mpc=$MACPORT_BASE"
5353
fi

0 commit comments

Comments
 (0)