From 6d9a329a8a0f11f4b175e407de59c55924de1ef6 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 8 Aug 2012 14:48:41 -0400 Subject: [PATCH] Adjust a couple source checks --- src/check-internal-symbols.sh | 4 ++-- src/check-static-inits.sh | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/check-internal-symbols.sh b/src/check-internal-symbols.sh index 729b086..bc643da 100755 --- a/src/check-internal-symbols.sh +++ b/src/check-internal-symbols.sh @@ -21,8 +21,8 @@ else fi tested=false -for suffix in so; do - so=.libs/libharfbuzz.$suffix +for suffix in .so -*.dll; do + so=`echo .libs/libharfbuzz$suffix` if test -f "$so"; then echo "Checking that we are not exposing internal symbols" if nm $so | grep ' [TW] ' | $cplusplusfilt | grep -v ' T _fini\>\| T _init\>\| T hb_'; then diff --git a/src/check-static-inits.sh b/src/check-static-inits.sh index eb04a55..1eceb1b 100755 --- a/src/check-static-inits.sh +++ b/src/check-static-inits.sh @@ -14,8 +14,14 @@ else exit 77 fi +OBJS=.libs/*.o +if test "x`echo $OBJS`" = "x$OBJS" 2>/dev/null >/dev/null; then + echo "check-static-inits.sh: object files not found; skipping test" + exit 77 +fi + echo "Checking that no object file has static initializers" -for obj in .libs/*.o; do +for obj in $OBJS; do if objdump -t "$obj" | grep '[.]ctors'; then echo "Ouch, $obj has static initializers" stat=1 @@ -23,7 +29,7 @@ for obj in .libs/*.o; do done echo "Checking that no object file has lazy static C++ constructors/destructors" -for obj in .libs/*.o; do +for obj in $OBJS; do if objdump -t "$obj" | grep '__c'; then echo "Ouch, $obj has lazy static C++ constructors/destructors" stat=1 -- 2.7.4