isa-l/tools/yasm-filter.sh
Taiju Yamada 998e03bf95 Strip -isysroot and related flags from asm-filter
This helps python-isal compatibility.

Change-Id: I8a2540e330f229f65903bdb2cc47aceeb0724dc5
Signed-off-by: Taiju Yamada <tyamada@bi.a.u-tokyo.ac.jp>
2021-09-13 10:02:38 -07:00

44 lines
799 B
Bash
Executable File

#/bin/sh
# Filter out unnecessary options added by automake
while [ -n "$*" ]; do
case "$1" in
-f | -o | -I | -i | -D )
# Supported options with arg
options="$options $1 $2"
shift
shift
;;
-isysroot | -iframeworkwithsysroot | -iwithsysroot | -framework )
# Unsupported options with arg
shift
shift
;;
-I* | -i* | --prefix* )
# Supported options without arg
options="$options $1"
shift
;;
-D* ) # For defines we need to remove spaces
case "$1" in
*' '* ) ;;
*) options="$options $1" ;;
esac
shift
;;
#-blah )
# Unsupported options with args - none known
-* )
# Unsupported options with no args
shift
;;
* )
args="$args $1"
shift
;;
esac
done
yasm $options $args