* config.sub: Rewrite basic_machine 'if' with 'case'.

Signed-off-by: Ben Elliston <bje@gnu.org>
This commit is contained in:
John Ericson 2018-05-01 15:41:39 +10:00 committed by Ben Elliston
parent d23f148145
commit f3e464fb69
2 changed files with 12 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2018-05-01 John Ericson <john.ericson@obsidian.systems>
* config.sub: Rewrite basic_machine 'if' with 'case'.
2018-05-01 Francois H. Theron <francois.theron@netronome.com>
Ben Elliston <bje@gnu.org>

11
config.sub vendored
View File

@ -128,9 +128,14 @@ case $maybe_os in
;;
*)
basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
if [ "$basic_machine" != "$1" ]
then os=`echo "$1" | sed 's/.*-/-/'`
else os=; fi
case $1 in
*-*)
os=`echo "$1" | sed 's/.*-/-/'`
;;
*)
os=
;;
esac
;;
esac