Real World Mozilla Makefile Lab

From CDOT Wiki
Revision as of 19:46, 26 February 2007 by David.humphrey (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Dive into Mozilla > Dive into Mozilla Day 2 > Makefile Lab

Overview

This lab is designed to give you first-hand experience creating a simple Makefile and using Make to build software. While the Mozilla build system is much more complex than this example, the ideas learned here will get you started understanding how Mozilla is built.


Instructions

The lab machines have already been set-up to use MSVC 8 and MozillaBuild RC1. You only need to run Mozilla-Build MSVC 8.bat (there is a link on the desktop) to begin (i.e., you shouldn't need to install anything).

  1. Create a directory called C:\ff to hold the source
  2. Make sure the tree is not red on tinderbox
  3. Check-out the Firefox code from CVS into C:\ff (instructions are here). You can use either of the following CVSROOT values:
    •  :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
    •  :pserver:anonymous@hera.senecac.on.ca:/cvsroot
  4. Create a .mozconfig file (instructions are here) in C:\ff\mozilla with the following:
    • Use an Object Directory (OBJDIR) named objdir
    • Disable Optimization
    • Enable Debugging
    • Use Shared libraries instead of Static
  5. Build the source (instructions are here)
  6. wait, wait, wait...NOTE: the build process (a debug build) takes approximately 1 hour to complete in the lab.
  7. Test your new browser:
    1. Set the following environment variables to turn-off assertion dialogs and allow for multiple versions of the browser to be run simultaneously:
      • export XPCOM_DEBUG_BREAK=warn
      • export MOZ_NO_REMOTE=1
    2. Run the browser as follows:C:\ff\mozilla\objdir\dist\bin\firefox -Profilemanager
    3. When prompted, create a new profile called development
    4. In the address bar, enter the following URI and note the build information: about:

Resources