]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Moved shell statements for building Firefox to a separate file.
authorBart Van Assche <bvanassche@acm.org>
Sat, 28 Jun 2008 10:00:37 +0000 (10:00 +0000)
committerBart Van Assche <bvanassche@acm.org>
Sat, 28 Jun 2008 10:00:37 +0000 (10:00 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8293

exp-drd/Testing.txt
exp-drd/scripts/download-and-build-firefox [new file with mode: 0755]

index 84c45254f6119b291b3c7750e86824c83d65946f..433908157fe859559eacf88297d65dfc5ae7f367 100644 (file)
@@ -20,47 +20,3 @@ How to test DRD
 5. Test DRD with Firefox. First of all, build and install Firefox 3. Next,
    run the following command:
      LD_LIBRARY_PATH=$HOME/software/mozilla-build/dist/lib: ./vg-in-place --trace-children=yes --tool=exp-drd $HOME/software/mozilla-build/dist/bin/firefox-bin
-
-
-
-
-
-
-The Firefox source code can be obtained here:
-ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${version}/source
-
-See also http://developer.mozilla.org/en/docs/Build_Documentation
-
-Firefox can be compiled via the following shell script:
-------------------------------------------------------------
-#!/bin/sh
-
-SRCDIR=$HOME/software
-SRC=$SRCDIR/mozilla
-BUILD=${SRC}-build
-PREFIX=$HOME/firefox3
-MOZCONFIG=$BUILD/mozconfig-firefox
-export MOZCONFIG
-
-rm -rf   ${BUILD}   || exit $?
-rm -rf   ${PREFIX}  || exit $?
-mkdir -p ${BUILD}   || exit $?
-cd       ${BUILD}   || exit $?
-
-cat <<EOF >$MOZCONFIG
-. $SRC/browser/config/mozconfig
-mk_add_options MOZ_OBJDIR="$BUILD"
-ac_add_app_options browser --enable-application=browser
-ac_add_options --disable-optimize
-ac_add_options --disable-tests
-ac_add_options --enable-debug
-ac_add_options --enable-static
-ac_add_options --prefix $PREFIX
-ac_add_options --enable-optimize="-O1 -g -pipe"
-EOF
-
-${SRC}/configure
-
-make -s -j2     || exit $?
-# make -s install || exit $?
-------------------------------------------------------------
diff --git a/exp-drd/scripts/download-and-build-firefox b/exp-drd/scripts/download-and-build-firefox
new file mode 100755 (executable)
index 0000000..8eb2138
--- /dev/null
@@ -0,0 +1,57 @@
+#!/bin/bash
+
+# See also http://developer.mozilla.org/en/docs/Build_Documentation
+SRCURL="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/3.0/source"
+
+SRCDIR="$HOME/software"
+SRC="$SRCDIR/mozilla"
+DOWNLOADS="$SRCDIR/downloads"
+BUILD="${SRC}-build"
+TAR="firefox-3.0-source.tar.bz2"
+PREFIX="$HOME/firefox3"
+MOZCONFIG="$BUILD/mozconfig-firefox"
+export MOZCONFIG
+export LC_ALL=C
+export MAKEFLAGS="-j$(($(grep -c '^processor' /proc/cpuinfo) + 1))"
+
+if [ ! -e /usr/include/dbus-1.0/dbus/dbus-glib.h ]; then
+  echo "Please install the dbus-1-glib-devel package first."
+  exit 1
+fi
+
+if [ ! -e /usr/include/libIDL-2.0/libIDL/IDL.h ]; then
+  echo "Please install the libidl-devel package first."
+  exit 1
+fi
+
+rm -rf   ${BUILD}   || exit $?
+rm -rf   ${PREFIX}  || exit $?
+mkdir -p ${DOWNLOADS} || exit $?
+mkdir -p ${BUILD}   || exit $?
+cd       ${BUILD}   || exit $?
+
+if [ ! -e $DOWNLOADS/$TAR ]; then
+  ( cd $DOWNLOADS && wget -q $SRCURL/$TAR )
+fi
+
+if [ ! -e $SRC ]; then
+  ( cd $SRCDIR && tar -xjf $DOWNLOADS/$TAR )
+fi
+
+cat <<EOF >$MOZCONFIG
+. $SRC/browser/config/mozconfig
+mk_add_options MOZ_OBJDIR="$BUILD"
+ac_add_app_options browser --enable-application=browser
+ac_add_options --disable-optimize
+ac_add_options --disable-tests
+ac_add_options --enable-debug
+ac_add_options --enable-static
+ac_add_options --prefix $PREFIX
+ac_add_options --enable-optimize="-O1 -g -pipe"
+EOF
+
+# Note: apparently Firefox 3.0 doesn't compile with gcc 4.3.
+CC=~/gcc-4.2.4/bin/gcc CXX=~/gcc-4.2.4/bin/g++ ${SRC}/configure
+
+make -s -j2     || exit $?
+# make -s install || exit $?