1.1 --- a/tools/listlibs.sh Sat Aug 25 19:25:20 2018 +0200
1.2 +++ b/tools/listlibs.sh Wed Feb 20 15:30:48 2019 +0100
1.3 @@ -4,7 +4,7 @@
1.4
1.5 if [ ! "$CONF" ] || [ ! -e "$CONF" ] ; then
1.6 cat 1>&2 <<EOF
1.7 -Usage: $0 <module list filename> [ <arch> ] [ <build directory> ]
1.8 +Usage: $0 <module list filename> [ --ignore-missing ] [ <arch> ] [ <build directory> ]
1.9
1.10 List modules required by the given system/payload configuration. These modules
1.11 should be added to the configuration file so that the dynamic linker can find
1.12 @@ -17,24 +17,35 @@
1.13 exit 1
1.14 fi
1.15
1.16 -ARCH=
1.17 +shift 1
1.18 +
1.19 +# Get flag.
1.20 +
1.21 +if [ "$1" ] && [ "$1" = '--ignore-missing' ] ; then
1.22 + IGNORE_MISSING="$1"
1.23 + shift 1
1.24 +else
1.25 + IGNORE_MISSING=
1.26 +fi
1.27 +
1.28 +# Get other options.
1.29 +
1.30 ARCHDIR=
1.31 BUILDDIR=
1.32
1.33 # Look for an architecture or build directory.
1.34
1.35 -if [ "$2" ] ; then
1.36 - if [ -e "$2" ] ; then
1.37 - BUILDDIR="$2"
1.38 - else
1.39 - ARCH="$2"
1.40 - fi
1.41 +if [ "$1" ] && [ ! -e "$1" ] ; then
1.42 + ARCH="$1"
1.43 + shift 1
1.44 +else
1.45 + ARCH=
1.46 fi
1.47
1.48 # Look for any additional build directory.
1.49
1.50 -if [ ! "$BUILDDIR" ] && [ "$3" ] && [ -e "$3" ] ; then
1.51 - BUILDDIR="$3"
1.52 +if [ "$1" ] && [ -e "$1" ] ; then
1.53 + BUILDDIR="$1"
1.54 fi
1.55
1.56 # Use a default build directory if none specified or found.
1.57 @@ -101,7 +112,7 @@
1.58 if [ "$PROG" != "$MODULE" ] ; then
1.59 continue
1.60 fi
1.61 - if [ ! -e "$BIN/$PROG" ] ; then
1.62 + if [ ! -e "$BIN/$PROG" ] && [ ! "$IGNORE_MISSING" ] ; then
1.63 echo "Not found: $PROG" 1>&2
1.64 exit 1
1.65 fi