From: Bart Van Assche Date: Sat, 28 Jun 2008 10:00:37 +0000 (+0000) Subject: Moved shell statements for building Firefox to a separate file. X-Git-Tag: svn/VALGRIND_3_4_0~421 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ea6042a1d5aa2a2d87bdd258b83d28c335c6b8d;p=thirdparty%2Fvalgrind.git Moved shell statements for building Firefox to a separate file. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8293 --- diff --git a/exp-drd/Testing.txt b/exp-drd/Testing.txt index 84c45254f6..433908157f 100644 --- a/exp-drd/Testing.txt +++ b/exp-drd/Testing.txt @@ -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 <$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 index 0000000000..8eb2138793 --- /dev/null +++ b/exp-drd/scripts/download-and-build-firefox @@ -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 <$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 $?