Checkout and Build NSPR
From MDC
Contents |
[edit] Checkout
To checkout NetScape Portable Runtime (NSPR) you need CVS 1.10 set the CVSROOT enviornment variable to:
:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
Issue the command:
cvs checkout [-r TAG] mozilla/nsprpub
You now have NSPR checked out into the current working directory.
[edit] Build
There are two different build procedures for NSPR, depending on which NSPR release you want to build. NSPR releases 4.1.x and earlier use the classic build method. Beginning with NSPR release 4.2 an autoconf based make system is used.
Building NSPR varies a little depending on platform. Building NSPR builds only NSPR libraries, the test cases must be built separately. Building debug and optimized targets requires options on the gmake or configure command line. Read on.
[edit] Unix
[edit] Autoconf
In the directory you have checked NSPR out to, create a directory to contain the build targets; cd to that directory; run configure and make. For example, say:
mkdir target cd target ../mozilla/nsprpub/configure gmake cd pr/tests gmake
The above commands build the debug targets. To build the optimized targets, the configure command should say:
... configure --enable-optimize --disable-debug
For platforms supporting it, to build 64bit targets, add the --enable-64bit option to the configure command.
[edit] Classic
Building debug targets, first NSPR itself, then the test suite:
cd mozilla/nsprpub gmake cd pr/tests gmake
To build the optimized targets, change the gmake commands to:
gmake BUILD_OPT=1
[edit] Windows
[edit] Autoconf
Using the autoconf build method on Windows requires the Cygwin Toolkit.
Open a Cygwin window. Follow the procedure described for building NSPR on Unix.
[edit] Classic
Building Windows targets is similar. There are two builds for Windows: a generic Win32 build and a WinNT build. The difference is that the WinNT build runs only on Windows NT (and Windows 2000); the generic Win32 build runs on any of Win9x, WinME, WinNT, Win2K.
The following assumes MSVC 6.0 with ServicePack 4. The compiler is must be configured to run from the command line.
To build the generic Win32 debug targets:
cd mozilla\nsprpub gmake OS_TARGET=WIN95 cd pr\tests gmake OS_TARGET=WIN95
To build the optimized targets, add BUILD_OPT=1 option to the gmake command.
To build the WinNT debug targets:
cd mozilla\nsprpub gmake cd pr\tests gmake
To build the optimized targets, add BUILD_OPT=1 option to the gmake command.
[edit] Mac
This topic is left as an exercise for a Mac specialist.
[edit] Others
Specialists on mozilla contributed ports are invited to contribute to this section.
[edit] Original Document Information
- Authors: larryh@netscape.com, Wan Teh Chang
- Last Updated Date: November 7, 2001
