
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.
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.
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.
Using the autoconf build method on Windows requires the Cygwin Toolkit.
Open a Cygwin window. Follow the procedure described for building NSPR on Unix.
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.
Page last modified 12:37, 9 Oct 2007 by Jorend