Commit 08132bcb authored by David 'Digit' Turner's avatar David 'Digit' Turner
Browse files

gen-platforms.sh: sort platforms properly

Ensures that the list of platforms is sorted in proper numerical
order, i.e. that android-10 appears after android-9 and not before
android-3

+ Don't make error message is a symbols directory doesn't exist
(e.g. on x86 for API level < 9)

Change-Id: I1fa5b8a43df1de4ee51059065d5c3e24dc90a5e2
parent a666d1c4
......@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# build-platforms.sh
# gen-platforms.sh
#
# This tool is used when packaging a new release, or when developing
# the NDK itself. It will populate DST ($NDK/platforms by default)
......@@ -44,7 +44,7 @@
extract_platforms_from ()
{
if [ -d "$1" ] ; then
(cd "$1/platforms" && ls -d android-*) | sed -e "s!android-!!" | tr '\n' ' '
(cd "$1/platforms" && ls -d android-*) | sed -e "s!android-!!" | sort -g | tr '\n' ' '
else
echo ""
fi
......@@ -288,7 +288,7 @@ gen_shell_lib ()
echo "void $func(void) {}" >> $TMPC
done
for var in $3; do
echo "int $var;" >> $TMPC
echo "int $var = 0;" >> $TMPC
done
# Build it with our cross-compiler. It will complain about conflicting
......@@ -328,6 +328,12 @@ gen_shell_libraries ()
exit 1
fi
# In certain cases, the symbols directory doesn't exist,
# e.g. on x86 for PLATFORM < 9
if [ ! -d "$SYMDIR" ]; then
return
fi
# Let's list the libraries we're going to generate
LIBS=$((cd $SYMDIR && 2>/dev/null ls *.functions.txt) | sort -u | sed -e 's!\.functions\.txt$!!g')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment