diff --git a/mozilla/tools/codesighs/autosummary.linux.bash b/mozilla/tools/codesighs/autosummary.linux.bash index 675b0210355..ea556747ff9 100755 --- a/mozilla/tools/codesighs/autosummary.linux.bash +++ b/mozilla/tools/codesighs/autosummary.linux.bash @@ -87,19 +87,29 @@ COPYSORTTSV="$1" OLDTSVFILE="$2" SUMMARYFILE="$3" +OSTYPE=`uname -s` # # Create our temporary directory. # +if [ $OSTYPE == "Darwin" ]; then +MYTMPDIR=`mktemp ./codesighs.tmp.XXXXXXXX` +rm $MYTMPDIR +mkdir $MYTMPDIR +else MYTMPDIR=`mktemp -d ./codesighs.tmp.XXXXXXXX` - +fi # # Find all relevant files. # ALLFILES="$MYTMPDIR/allfiles.list" -find ./mozilla/dist/bin -not -type d > $ALLFILES +if [ $OSTYPE == "Darwin" ]; then +find ./mozilla/dist/bin > $ALLFILES +else +find ./mozilla/dist/bin -not -type d > $ALLFILES +fi # # Produce the cumulative nm output. @@ -107,7 +117,11 @@ find ./mozilla/dist/bin -not -type d > $ALLFILES # nm --format=bsd --size-sort --print-file-name --demangle # NMRESULTS="$MYTMPDIR/nm.txt" +if [ $OSTYPE == "Darwin" ]; then +xargs -n 1 nm -o < $ALLFILES > $NMRESULTS 2> /dev/null +else xargs -n 1 nm --format=bsd --size-sort --print-file-name --demangle < $ALLFILES > $NMRESULTS 2> /dev/null +fi #