bug 434844: fix basesummary.*.bash to work with differently named srcdirs. r=bsmedberg, patch=me
authorBen Hearsum <bhearsum@mozilla.com>
Wed, 28 May 2008 09:51:16 -0400
changeset 15147 35749543c3d16ebefbbfd37c666ebccfb11791cc
parent 15146 c4fe66076c89b962a3879b3bc37f70ecea70b194
child 15148 b48cd29edac89d7b3d613df2b963fc70f1df7c53
child 15149 d87f575aac597d1ea52bb7b9449df26a5a3a4fee
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs434844
milestone1.9.1a1pre
bug 434844: fix basesummary.*.bash to work with differently named srcdirs. r=bsmedberg, patch=me
tools/codesighs/basesummary.unix.bash
tools/codesighs/basesummary.win.bash
--- a/tools/codesighs/basesummary.unix.bash
+++ b/tools/codesighs/basesummary.unix.bash
@@ -45,22 +45,30 @@
 if [ "$1" = "-o" ]; then 
 OBJROOT="$2"
 shift
 shift
 else
 OBJROOT="./mozilla"
 fi
 
+if [ "$1" = "-s" ]; then
+SRCROOT="$2"
+shift
+shift
+else
+SRCROOT="./mozilla"
+fi
+
 OSTYPE=`uname -s`
 
 if [ $OSTYPE == "Darwin" ]; then
-MANIFEST="./mozilla/embedding/config/basebrowser-mac-macho"
+MANIFEST="$SRCROOT/embedding/config/basebrowser-mac-macho"
 else
-MANIFEST="./mozilla/embedding/config/basebrowser-unix"
+MANIFEST="$SRCROOT/embedding/config/basebrowser-unix"
 fi
 
 #
 #   A little help for my friends.
 #
 if [ "-h" == "$1" ];then 
     SHOWHELP="1"
 fi
@@ -168,30 +176,30 @@ fi
 ALLFILES="$MYTMPDIR/allfiles.list"
 grep -v '[\;\[]' < $MANIFEST | grep -v '^$' | sed "s|^|${OBJROOT}/dist/bin/|" > $ALLFILES
 
 
 RAWTSVFILE="$MYTMPDIR/raw.tsv"
 
 if test "$USE_READELF"; then
 export READELF_PROG
-xargs -n 1 ./mozilla/tools/codesighs/readelf_wrap.pl < $ALLFILES > $RAWTSVFILE
+xargs -n 1 $SRCROOT/tools/codesighs/readelf_wrap.pl < $ALLFILES > $RAWTSVFILE
 else
 
 #
 #   Produce the cumulative nm output.
 #   We are very particular on what switches to use.
 #   nm --format=bsd --size-sort --print-file-name --demangle
 #
 #   Darwin (Mac OS X) has a lame nm that we have to wrap in a perl
 #   script to get decent output.
 #
 NMRESULTS="$MYTMPDIR/nm.txt"
 if [ $OSTYPE == "Darwin" ]; then
-xargs -n 1 ./mozilla/tools/codesighs/nm_wrap_osx.pl < $ALLFILES  > $NMRESULTS 2> /dev/null
+xargs -n 1 $SRCROOT/tools/codesighs/nm_wrap_osx.pl < $ALLFILES  > $NMRESULTS 2> /dev/null
 else
 xargs -n 1 nm --format=bsd --size-sort --print-file-name --demangle < $ALLFILES > $NMRESULTS 2> /dev/null
 fi
 
 #
 #   Produce the TSV output.
 #
 $OBJROOT/dist/bin/nm2tsv --input $NMRESULTS > $RAWTSVFILE
--- a/tools/codesighs/basesummary.win.bash
+++ b/tools/codesighs/basesummary.win.bash
@@ -34,30 +34,37 @@
 # decision by deleting the provisions above and replace them with the notice
 # and other provisions required by the GPL or the LGPL. If you do not delete
 # the provisions above, a recipient may use your version of this file under
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
 
-MANIFEST="./mozilla/embedding/config/basebrowser-win"
-
-
 #
 # Check for optional objdir
 # 
 if [ "$1" = "-o" ]; then 
 OBJROOT="$2"
 shift
 shift
 else
 OBJROOT="./mozilla"
 fi
 
+if [ "$1" = "-s" ]; then 
+SRCROOT="$2"
+shift
+shift
+else
+SRCROOT="./mozilla"
+fi
+
+MANIFEST="$SRCROOT/embedding/config/basebrowser-win"
+
 #
 #   A little help for my friends.
 #
 if [ "-h" == "$1" ];then 
     SHOWHELP="1"
 fi
 if [ "--help" == "$1" ];then 
     SHOWHELP="1"