Compare commits

..

3 Commits

Author SHA1 Message Date
dougt%netscape.com
4b278c5150 First commit to branch
git-svn-id: svn://10.0.0.236/branches/NSIFILE_01192000_BRANCH@58298 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-20 08:38:01 +00:00
dougt%netscape.com
1237f4c497 commiting
git-svn-id: svn://10.0.0.236/branches/NSIFILE_01192000_BRANCH@58297 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-20 08:03:41 +00:00
(no author)
2981788fb9 This commit was manufactured by cvs2svn to create branch
'NSIFILE_01192000_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/NSIFILE_01192000_BRANCH@58272 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-19 23:43:44 +00:00
13989 changed files with 3104093 additions and 104275 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,400 @@
<HTML>
<HEAD>
<TITLE>Building Mozilla on the Macintosh PPC platform</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B"
ALINK="#FF0000">
<HR>
<H1>
Building Mozilla on the Macintosh PPC platform</H1>
<H2>
Daniel Nunes, <TT><A HREF="mailto:leaf@netscape.com">leaf@netscape.com</A></TT>
</H2>
v 1.0, June 1998
<P>
<HR><I>How to build Mozilla on a Macintosh PPC System.</I>
<HR>
<H2>1. <A HREF="#s1">Introduction</A></H2>
<H2>2. <A HREF="#s2">Building Mozilla</A></H2>
<UL>
<LI>
<A HREF="#ss2.1">2.1 Get the Code </A></LI>
<LI>
<A HREF="#ss2.2">2.2 Requirements</A></LI>
<LI>
<A HREF="#ss2.3">2.3 Set up the Build Environment</A></LI>
<LI>
<A HREF="#ss2.4">2.4 Build the Lizard </A></LI>
</UL>
<H2>3. <A HREF="#s3"> Common Problems </A></H2>
<H2>4. <A HREF="#s4"> Credits </A></H2>
<HR>
<H2><A NAME="s1">1. Introduction</A></H2>
<P>
What this document is: A guide to building the Mozilla application.
This includes:
<OL>
<LI> A listing of the development tools you will need to build Mozilla. </LI>
<LI> A list of environment variables you will need to set before building. </LI>
</OL>
<P>
If you're looking for documentation on developing features or fixing bugs,
the Mozilla
<A HREF="http://www.mozilla.org/docs/tplist/tplist.html">Technical Documents
</A> or <A HREF="http://www.mozilla.org/library.html"> Library </A>
are probably what you're looking for.
<P>
<HR>
<H2><A NAME="s2">2. Building Mozilla </A></H2>
<P>
<UL>Each of the following subsections describes, or gives references to
descriptions of, the steps necessary to build Mozilla.
<H2><A NAME="ss2.1">2.1 Get the Code</A></H2>
<P>
<UL>
There are two principal ways of getting the code,
<A HREF="http://www.mozilla.org/download.html"> ftp</A> and
<A HREF="http://www.mozilla.org/cvs.html"> CVS</A>.
CVS will provide the most current code for building, but is
slower than ftp (takes longer to download).
</UL>
<P>
<H2><A NAME="ss2.2">2.2 Requirements</A></H2>
The following need to be installed:
<UL>
<LI>CodeWarrior (CW) 2 - obtainable from
<A HREF="http://www.metrowerks.com">Metrowerks</A>.
See <A HREF="#s3">Common Sticking Points</A> if you have a different
version.
</LI>
<LI>PowerPlant 1.8 - obtainable from the CodeWarrior CD.</LI>
<LI>MSL - the Metrowerks Standard Library, obtainable from the
CodeWarrior CD</LI>
<LI><A HREF="ftp://ftp.boingo.com//dan/WASTE/waste-13.hqx">WASTE
1.3</A></LI>
<LI><A HREF="http://www.bact.wisc.edu/CWASTEEdit/CWASTEEdit.sit.hqx">CWASTE
1.6.2</A></LI>
<LI>
<A HREF="ftp://ftp.scripting.com/userland/menuSharingToolkit4.1.sit.hqx">
Menu Sharing Toolkit</A> (from UserLand)</LI>
<LI>
<A HREF="ftp://ftp.digitalalchemy.com/pub/digitalalchemy/mercutio-SDK.sit.bin">
Mercutio 1.5 SDK</A> (only download the SDK, not the entire package, else
the access paths will be wrong)</LI>
<LI>
<A HREF="ftp://ftp.share.com/pub/internet-configuration/ICProgKit1.4.sit">
Internet Config 1.4 SDK</A></LI>
<LI><A HREF="http://www.mooseyard.com/Jens/Software/">AEGizmos
1.4.2</A></LI>
<LI><A HREF="ftp://sunsite.cnlab-switch.ch/software/platform/macos/perl/Mac_Perl_520r4_tool.bin">
MacPerl 5 MPW Tool</A></LI>
<LI>
<A HREF="ftp://sunsite.cnlab-switch.ch/software/platform/macos/perl/Mac_Perl_520r4_appl.bin">MacPerl 5 Application</A></LI>
<LI>MakeStub - MPW (installed with CodeWarrior Heaven option). If
you choose not to install MPW, it is located on the MacOS Tools CD
in "CW Pro 2 Tools:CodeWarrior MPW:MPW:Tools"</LI>
<LI>RunTSScript - in Mozilla source distribution
(mozilla:build:mac:RunTSScript), needs to be installed by hand</LI>
<LI><A HREF="ftp://dev.apple.com/devworld/Tool_Chest/Core_Mac_OS_Tools/MPW_etc./MPW-GM/MPW/ToolServer.sit.hqx">ToolServer</A>
- or in the CW distribution (CW Pro 2 Tools:Apple Development
Tools:ToolServer 3.4.1.sit). <B>We recommend pulling it off the
CD</B> because it comes with configuration files for CodeWarrior
which you would have to create manually were you to pull it off
the net.</LI>
<LI>
<A HREF="http://people.netscape.com/sfraser/software/NewAlias_tool.sit.hqx">
New Alias MPW Tool</A> An MPW tool that creates Finder aliases for files.
</LI>
<LI>StreamEdit MPW Tool - MPW (installed with CodeWarrior Heaven option). If
you choose not to install MPW, it is located on the MacOS Tools CD
in "CW Pro 2 Tools:CodeWarrior MPW:MPW:Tools"</LI>
</LI>
<LI>
<A HREF="ftp://dev.apple.com/devworld/Periodicals/develop/develop25/develop_Issue_25_code/ToolFrontEnd.sit.hqx">ToolFrontEnd</A></LI>
<LI>
<A HREF="http://sunsite.cnlab-switch.ch/ftp/software/platform/macos/src/HTML/MPW_C.html">
patch 2.1</A></LI>
</UL>
<P>
Hardware/OS
<UL>
<LI>To build Navigator, you need a fast PPC Mac. The faster the
better. You can't build with a 68K machine because we have too many
resources, and the build process will crash when trying to generate
resources out of our cross-platform strings. See the discussion below
for a way around this.
</LI>
<LI>You will need about 96 MB of physical RAM to "fast link" the app.
You can still fast link if you give your machine 96 MB of virtual
memory, but then the VM hit is large enough to counteract any
improvement. One of our beta testers had a machine with only 64MB of
physical RAM (VM was off) and it ran out of memory trying to link.
Turning VM on got it to link, but build time increased greatly.
</LI>
<LI>Reports from the net indicate that the optimized version
(MozillaPPC) take much less RAM to build than the 96MB we suggest. If
you are running out of memory, try building that instead of the debug
version (the debug symbols require a lot of RAM come link time).
</LI>
<LI>You should be ok with a 400MB disk partition, even when fully
built. This does not include tools like the IDE, just source.
</LI>
<LI>On an HFS+ volume, a full build takes about 110MB. HFS+ is good,
but utilities are sparse.
</LI>
</UL>
<P>
<H2><A NAME="ss2.3">2.3 Setup the Build Environment</A></H2>
<P>
<OL>
<LI>Install CodeWarrior from the CD. While it is large, installing
the "CodeWarrior Heaven" option will guarantee that you have
everything you need. This will give you PowerPlant, MSL, and MPW.
If you choose to install less, proceed at your own risk.</LI>
<LI>In the Finder, increase the memory partition of the IDE to
15MB (you can get by with 12, if need be).</LI>
<LI>Download ToolFrontEnd. After expanding it, in "ToolFrontEnd
Folder:Drop-Ins" there are three items:
<UL>
<LI><I>#include</I></LI>
<LI><I>ToolFrontEnd</I></LI>
<LI><I>ToolFrontEnd Panel</I></LI>
</UL>
<P>Create a folder named "Include Scanners". Place the file
"#include" into the Include Scanners folder. Move the Include
Scanners folder to the CodeWarrior Plugins folder. Create a folder
named "ToolFrontEnd". Place the files "ToolFrontEnd" and
"ToolFrontEnd Panel" into the ToolFrontEnd folder. Place this
folder in the CodeWarrior Plugins folder.</P></LI>
<LI>Open "ToolFrontEnd Panel" with ResEdit. Change the file type
from <B>'Panl'</B> to <B>'PanL'</B>. Save.</LI>
<LI>Uncompress the StuffIt Archive for ToolServer. The goal is to
let ToolServer and MPW share the same Tools directory so you don't
need to have multiple versions of tools. Do the following:
<OL>
<LI>Open ToolServer's Tools folder. There is one file called
"RMetrowerks". </LI>
<LI>Move RMetrowerks to Tools folder of MPW. MPW folder must be
at "Metrowerks:Codewarrior MPW:MPW" if you installed
Codewarrior Heaven. </LI>
<LI>Remove ToolServer's Tools folder.</LI>
<LI>Now create an alias of Tools folder in "CodeWarrior MPW"
and move it to your ToolServer folder. Rename the alias
(probably called "Tools alias") to "Tools"</LI>
<LI><FONT COLOR="#FF0000"><B>IMPORTANT</B></FONT>: Make sure
you only have one instance of ToolServer on your machine. If
the build script finds the wrong one, the correct tools will
not be found and strange things will happen.</LI>
</OL>
</LI>
<LI>After installing the MacPerl MPW Tool distribution (run the
InstallerVISE application), in the "MacPerl &#131;" folder, there
will be an MPW tool named "perl". Install this in MPW's tools
folder.</LI>
<LI>Install the MacPerl Application (run the
InstallerVISE application). You can install this anywhere, but it is
recommended that you install it inside of your CodeWarrior folder for
easy reference. After installation, you will need to set a preference
to enable double-click launch of the perl scripts. This preference is set
by going under the Edit Menu to Preferences. Click on the "Script" button
and hit the radio button "Run Scripts opened from Finder"</LI>
<LI>Install the "patch", "MakeStub", "NewAlias" and "StreamEdit" Tools in the
tools
folder. Note that "MakeStub" and "StreamEdit" are automatically installed by the
"CodeWarrior Heaven" install option.</LI>
<LI>Install RunTSScript (found in the Mozilla source distribution)
in the compilers folder in your build environment
("Metrowerks:Metrowerks Codewarrior:Codewarrior
Plugins:Compilers")</LI>
<LI>Next, after downloading all the 3rd party software components,
drag WASTE, CWASTE, Menu Sharing, Mercutio, Internet Config, and
the AEGizmo folders (just as they are) into the "MacOS Support"
folder in your build environment.</LI>
<LI>Start ToolServer from within CodeWarrior (or use MPW if you
are brave enough). We're about to patch some files. Make sure the
ToolServer menu is in the CodeWarrior menu bar by turning on the
<A HREF="IDEPrefs.gif">preference</A> under the "Extras" panel in
the IDE Preferences (not the project preferences!). The menu bar
should look like this:
<P><IMG SRC="IDEMenuBar.gif" WIDTH=359 HEIGHT=20 X-CLARIS-USEIMAGEWIDTH X-CLARIS-USEIMAGEHEIGHT ALIGN=bottom></P>
<P>Choose "Start ToolServer" from the ToolServer menu (this is the
icon menu between "Window" and "Help" in the menubar above). You
will now see a window with no close box. This is your ToolServer
Worksheet where you will type (or cut &amp; paste) the commands
for the following steps.</P>
<P>In case you have never used MPW/ToolServer before, the
following is <B>very important</B>. Pressing "return" does not
execute commands like you might think. It just inserts a newline
into the worksheet like a normal text editor. <B>To actually get
ToolServer to execute the command, you must press "Enter" (lower
right of numeric keypad).</B> This executes the line that the
cursor is on, and only that line. If you want to execute multiple
lines at once, select them all and hit Enter.</P></LI>
<LI>Set the shell variables {IDE} and {Source} to the correct
paths for your build environment. {IDE} is where your CodeWarrior
IDE is located. {Source} is the folder containing the toplevel
"ns" folder of the Mozilla source. Mine look like this (don't
forget to keep the quotes if your path includes spaces), yours
will almost certainly be different (<FONT COLOR="#FF0000">to
punctuate this, the things you need to change are in red</FONT>).
<PRE>Set IDE "<FONT COLOR="#FF0000">Develop:Source331 Build Environment:CW Pro 2:Metrowerks CodeWarrior:</FONT>"
Set Source "<FONT COLOR="#FF0000">Source:FreeSource:</FONT>"</PRE>
</LI>
<LI>If you are using CWPro2, execute the following lines to patch
LDropFlag to draw correcly over non-white backgrounds.
<PRE>directory "{IDE}MacOS Support:PowerPlant:_In Progress:_Table Classes:"
patch LDropFlag.cp "{Source}mozilla:lib:mac:patches:LDropFlag.patch"
duplicate -y "{Source}mozilla:lib:mac:patches:DropFlag Icons.rsrc" "{IDE}MacOS Support:PowerPlant:PowerPlant Resources:"</PRE></LI>
<LI>Execute the following lines to patch menusharing.c to allow it
to compile with the new Universal Headers. It references an
obsolete header file (GestaltEqu.h).
<PRE>directory "{IDE}MacOS Support:Menu Sharing Toolkit 4.1:"
patch menusharing.c "{Source}mozilla:lib:mac:patches:menusharing.patch"</PRE></LI>
<LI>If you are using CWPro2 straight off the CD, you need to patch
AppleEvents.r to fix a problem with the Universal Headers (the
definition of the 'aedt' resource was omitted). <B>You do not have
to do this if you have applied the netborne patch to Pro2e
</B> because it has been fixed.
<PRE>directory "{IDE}MacOS Support:Headers:Rez Headers:"
patch AppleEvents.r "{Source}mozilla:lib:mac:patches:AppleEvents.r.patch"</PRE></LI>
<LI>You need to patch stat.mac.h to fix a problem in MSL where
lines were omitted.
<PRE>directory "{IDE}Metrowerks Standard Library:MSL C:MSL Mac:Public Includes"
patch stat.mac.h "{Source}mozilla:lib:mac:patches:stat.mac.h.patch"</PRE></LI>
<LI>Congratulations! Now you are ready to build. Once these steps
are done, you don't have to repeat these setups the next
time!</LI>
</OL>
<P>
<H2><A NAME="ss2.4">2.4 Run the build </A></H2>
<UL>
<P>In the folder mozilla:build:mac:, there are several Perl scripts with
names of the form BuildMozillaXXX.pl, where XXX is "Optimized",
"Debug", "Tinderbox", et al. Each script builds the corresponding
version of Mozilla. If you configured the MacPerl application to
execute scripts that are opened from the finder, all you have to do is
double click on the appropriate one; otherwise, launch MacPerl, and
run the appropriate script from the "Run Script..." menu item.</P>
<P>These `configured build' scripts are simple, and you might want to
make your own to force your build to StopForErrors(), or alternatively
DontStopForErrors(), et al. You can set up certain build-script
variables and (soon) compile-time flags. Compare the supplied scripts
to figure out what you might want. Note that CodeWarriorLib, Moz.pm,
and BuildList.pm, are AppleScript libraries and Perl modules meant to
be used by a `configured build'. Use your favorite POD viewer (Shuck
comes with MacPerl) to view the documentation in the Perl scripts.</P>
<P>If there were any errors in any of the projects along the way, the
script will stop at that point and the IDE will tell you the errors.
You can fix them and make sure they current project builds, but to
continue the automation, you have to start from the beginning by
double-clicking the script again. This isn't quite as bad as it
sounds because the previous projects are already built (unless you
changed some major header file). Please note that stopping the script
once it has started is difficult. We are working to address
this issue.</P>
<P>After the build is complete, you can find aliases to the built libraries
and the final Mozilla application. Debug builds are built to
Mozilla:dist:client_debug, while optimized builds are built to Mozilla:dist:client.
</P>
<P>Don't worry too much about the numerous warnings generated during
the build. We try our best to get the XP teams to use real compilers,
but alas, they continue to write warning-laden code. There is also
some generated code (Java is one example) that has a lot of warnings
that we can't help either. If you write any new code, please help us
in our quest to get zero warnings.</P>
</UL>
</UL>
<HR>
<H2><A NAME="s3">3. Common Sticking Points</A></H2>
<UL>
<LI><B>I have CodeWarrior3, how do i build with it?</B>
<UL> Currently, the answer is, "You don't." Eventually, the distribution
will be modified to allow building using CodeWarrior3, but for now
CodeWarrior2 is the only IDE that is supported.
</UL>
</LI>
</UL>
<HR>
<H2><A NAME="s4">4. Credits</A></H2>
<UL>
The majority of this document is taken from the build document included
in the Mozilla source distribution at README:mozilla:macbuild.htm written
by Mike Pinkerton, <A HREF="mailto:pinkerton@netscape.com">
pinkerton@netscape.com</A>.
</BODY>
</HTML>

View File

@@ -0,0 +1,71 @@
<HTML>
<HEAD>
<TITLE>Mozilla Unix Build Instructions</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B"
ALINK="#FF0000">
<H1>Unix Build Instructions</H1>
See <a href="http://www.mozilla.org/build/unix.html">http://www.mozilla.org/build/unix.html</a> for the lastest version of these instructions.</a><p>
<b>Daniel Nunes,</b>
<TT><A HREF="mailto:leaf@mozilla.org">leaf@mozilla.org</A></TT>
<br>
<!-- hhmts start -->
Last modified: Fri Sep 3 17:00:32 PDT 1999
<!-- hhmts end -->
<p>
For documentation on developing features or
fixing bugs, look at the
<A HREF="http://www.mozilla.org/hacking/">Mozilla Hacking Guidelines</A>.
For general Unix issues,
look at the <A HREF="../unix/">Mozilla Unix</a>.
<P>
<H2>Other Unix Build pages</H2>
<UL>
<li><a href="unix-details.html">Detailed Unix Build
Instructions</a></li>
<LI><A HREF="http://www.mozilla.org/unix/irix.html">Irix build status</A>.
The Irix build is working now!</li>
</ul>
<H2>Requirements</H2>
<ul>
<li>Requirements for building on unix can be found on the
<a href="unix-details.html#s3"> Detailed Unix Build
Instructions</a>.</li>
</ul>
</ul>
<H2>Build the Lizard</H2>
<ol>
<li><code>cvs co -f mozilla/client.mk</code>
<li><code>cd mozilla</code>
<li><code>gmake -f client.mk</code>
</ol>
To rebuild without pulling the tree,
<ul><code>
gmake -f client.mk build
</code></ul>
To pull the tree,
<ul><code>
gmake -f client.mk checkout
</code></ul>
To change build options, use the
<a href="http://cvs-mirror.mozilla.org/webtools/build/config.cgi">
Unix Build Configurator</a>
<H2>After the build </H2>
<UL>
<LI><CODE>cd dist/bin</CODE></LI>
<LI><CODE>./mozilla-apprunner.sh</CODE></LI>
<LI><CODE>./mozilla-viewer.sh</CODE></LI>
</UL>
</UL>
</BODY>
</HTML>

View File

@@ -0,0 +1,216 @@
<HTML>
<HEAD>
<TITLE>Mozilla Detailed Unix Build Instructions</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B"
ALINK="#FF0000">
<H1>Unix Detailed Build Instructions</H1>
See <a href="http://www.mozilla.org/build/unix-details.html">http://www.mozilla.org/build/unix-details.html</a> for the lastest version of these instructions.</a><p>
<b>Daniel Nunes,</b>
<TT><A HREF="mailto:leaf@mozilla.org">leaf@mozilla.org</A></TT>
<br>
<!-- hhmts start -->
Last modified: Fri Sep 3 16:59:34 PDT 1999
<!-- hhmts end -->
<P>
This is a guide to building Mozilla on Unix including,
<uL>
<LI> A list of the required development tools.</LI>
<LI> Commands to build Mozilla using the Autoconf build system. </LI>
</uL>
<P>
For documentation on developing features or fixing bugs,
look at the
<A HREF="http://www.mozilla.org/docs/tplist/tplist.html">Mozilla Technical Documents</A> or
<A HREF="http://www.mozilla.org/library.html">Mozilla Library</A>.
For general Unix issues, look at the
<A HREF="http://www.mozilla.org/unix/">Mozilla Unix</a>.
<P>
<H2><A NAME="s2">Other Unix Build pages</A></H2>
<UL>
<LI><A HREF="http://www.mozilla.org/unix.html">Simple Unix Build Instructions</a></li>
<LI><A HREF="http://www.mozilla.org/making-additions.html">How to add files and not break the
build</a>.</li>
<LI><A HREF="http://www.mozilla.org/configurator-faq.html">Build Configuator FAQ</A>:
FAQ for the
<a href="http://cvs-mirror.mozilla.org/webtools/build/config.cgi">
Unix Build Configurator</a>.</LI>
<LI><A HREF="http://www.mozilla.org/unix/irix.html">Irix build status</A>:
The Irix build is working now!</li>
<li><a href="http://www.mozilla.org/redhat-on-intel.html">Redhat on Intel build instructions (out of date)</a>:
Makes life easy through RPMs.</li>
</ul>
<H2><A NAME="s3">Requirements</A></H2>
Your hardware should be equal to, or better than:
<UL>
32 MB RAM, 128 MB swap (64 MB RAM recommended)
</UL>
<P>
The following software should be installed.
(You can download gcc, gmake and autoconf from
<A HREF="ftp://prep.ai.mit.edu/pub/gnu/">prep.ai.mit.edu</A>.)
<UL>
<LI>If you're using a glibc 2.07 system, you need this
<A HREF=ftp://ftp.mozilla.org/pub/mozilla/libraries/source/glibc-2.0.7-dlopen.patch>patch</A></LI>
<LI><A HREF="http://egcs.cygnus.com"><B>egcs 1.0.3</b></a> (or higher),
or <A HREF="http://www.gnu.org/software/gcc/gcc.html">
<B>gcc 2.7.2.x</B></A> <b>(2.8.x still has some bugs)</b>,<br>
or your platform's native C/C++ compiler.<br>
<b>egcs</b> is recommended, this is the compiler that the Linux tinderboxes and many developers are using.
<LI><b><a href="http://language.perl.com/info/software.html">Perl 5</a></b>
<LI><b><A HREF="ftp://prep.ai.mit.edu/pub/gnu/">GNU make 3.74</a></b>
(or higher except 3.77).<br>
GNU make 3.77 shipped with bug a that breaks the NSPR build.
Revert to 3.76.1 until this is fixed.
<LI><B><A HREF="http://www.mozilla.org/cvs.html">CVS 1.9</a></b> (or higher).
To get started:<BR>
<ol>
<li><CODE>
setenv CVSROOT :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot</CODE>
<li><CODE><b>cvs login</b></CODE>
<font color="green">
(password: <code><b>anonymous</b></code>)
</font>
(You only need to do the login once.)
</ol>
<LI><B><A HREF="http://www.gtk.org/">GTK+ / GLib 1.2.0</a></b> (or higher).
<ul>
<li><b>Debian:</b>
<A HREF="ftp://ftp.gtk.org/pub/gtk/binary/DEBIAN/">ftp://ftp.gtk.org/pub/gtk/binary/DEBIAN/</a>
<li><b>Red Hat:</b> <a href="ftp://ftp.gtk.org/pub/gtk/binary/RPMS/">ftp://ftp.gtk.org/pub/gtk/binary/RPMS/</a><br>
Remove any old glib-devel and gtk+-devel packages already
installed on your machine.
There is no need to remove the gtk+/glib RPMs that came with Redhat.
<UL>
<CODE>rpm -e glib-devel</code><BR>
<code>rpm -e gtk+-devel</CODE>
</UL>
Download new glib, glib-devel, gtk+, and gtk+-devel packages into
the same directory and install them with one commmand.
<UL>
<CODE>rpm -i *.rpm</CODE>
</UL></li>
<LI><A HREF="http://www.gtk.org/download.html">Source tar
balls or CVS</a>
</ul>
<LI><B><A HREF="http://www.rpi.edu/~veliaa/libIDL/">libIDL 6.3</A></B> (or higher).<br>
Source snapshots are available from Mozilla via
<a href="ftp://ftp.mozilla.org/pub/mozilla/libraries">ftp</a>.
If you're running <b>Red Hat</b>, download the libIDL and libIDL-devel RPMs
and install them as above.
<H3>OPTIONAL</H3>
<ul>
<LI><b><A HREF="http://www.mozilla.org/projects/autoconf/">Autoconf 2.12</A></b> (which
requires <A HREF="http://www.seindal.dk/rene/gnu/">GNU m4</A>),
is necessary if you want to hack on configure.in. If you have
no idea what this means, then don't worry about it. It's optional.
</LI>
</ul>
</ul>
<H2><A NAME="s4">Get the Code</A></H2>
<P>
There are two ways to get the code:
<ul>
<li><A HREF="http://www.mozilla.org/download.html"> ftp</A>: Drops are generally produced
at least once per month, and are known to compile and even run on a
few platforms.
<li><A HREF="http://www.mozilla.org/cvs.html"> CVS</A>: Provides the most current code,
but is slower than ftp.
<ul>
<code>setenv CVSROOT :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
</code><br>
<code>cvs co SeaMonkeyAll</code>
</ul>
The <code>SeaMonkeyAll</code> module pulls the right source
for building the viewer and apprunner.
</ul>
<P>
<H2><A NAME="s5">Build the Lizard</A></H2>
<h3>Manually drive the build</h3>
<CODE>
<ol>
<li><code>cd mozilla</code>
<li><code>./configure
<ul>
<font color=green>
Your options may vary.
</font></br>
For configure options, run "<b>./configure --help</b>",<br> or
use the
<a href="http://cvs-mirror.mozilla.org/webtools/build/config.cgi">
Unix Build Configurator</a>.<br>
</ul>
<li><code>gmake</code>
</ol>
<P>
Once you have configured, you only have to run
<b><code>configure</code></b> if you add
or remove Makefile.in files (cvs update can do this. Beware!). The list
of makefiles is in <b><code>mozilla/allmakefiles.sh</code></b>
<P>
For build system hackers: If you change configure.in, cd to mozilla, and
run <b><code>autoconf</code></b>. This generates a new configure
script. (When you checkin configure.in, cvs will run autoconf and check
in a new configure script for you).
<h3>Automated build (client.mk)</h3>
<ol>
<li> Save the script from
<a href="http://cvs-mirror.mozilla.org/webtools/build/config.cgi">
Unix Build Configurator</a> as <code><b>~/.mozconfig</b></code>.
<li><code>cvs co -f mozilla/client.mk</code>
<li><code>cd mozilla</code>
<li><code>gmake -f client.mk</code>
</ol>
<dl>If you want to build without pulling the tree (as in, you already have the
source lying around),
<ul><code>
gmake -f client.mk build
</code></ul>
If you just want to pull the tree,
<ul><code>
gmake -f client.mk checkout
</code></ul>
</dl>
<H2><A NAME="s6">After the build </A></H2>
<UL>
<LI><b><CODE>cd dist/bin</CODE></b> and you should see links to the
scripts to run the executables:
<CODE>mozilla-viewer.sh</CODE> and <CODE>mozilla-apprunner.sh</CODE>.
<LI>If the scripts do not work, set <CODE><b>LD_LIBRARY_PATH</b></CODE>
and run <CODE>viewer</CODE> and <CODE>apprunner</CODE> directly.
Set <CODE><b>LD_LIBRARY_PATH</b></CODE> to include dist/bin, and
the NSPR and GTK libraries. (For example, you might set it to
<CODE>.:../../nspr/lib</CODE>).
<UL>
<LI>On HP-UX, the equivalent environment variable is
<CODE>SHLIB_PATH</CODE>.
<LI>On AIX, the equivalent environment variable is <CODE>LIBPATH</CODE>.
</UL>
<LI>If you run the executables from anywhere other than dist/bin, you
must set the environment variable <CODE><B>MOZILLA_FIVE_HOME</B></CODE> to
point to the <I>absolute path</I> of the dist/bin directory.
<LI>Update your tree by re-checking out the source, e.g. repeating the
initial checkout process.
</UL>
</BODY>
</HTML>

View File

@@ -0,0 +1,209 @@
<HTML>
<HEAD>
<TITLE>Building Mozilla on Microsoft Windows 32-bit platforms</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B"
ALINK="#FF0000">
<HR>
<H1>
Building Mozilla on Microsoft Windows 32-bit platforms</H1>
<H2>
Daniel Nunes, <TT><A HREF="mailto:leaf@netscape.com">leaf@netscape.com</A></TT>
</H2>
v 1.0, June 1998
<P>
<HR><I>How to build Mozilla on a Microsoft Windows 32-bit System.</I>
<HR>
<H2>1. <A HREF="#s1">Introduction</A></H2>
<H2>2. <A HREF="#s2">Building Mozilla</A></H2>
<UL>
<LI>
<A HREF="#ss2.1">2.1 Get the Code </A></LI>
<LI>
<A HREF="#ss2.2">2.2 Requirements</A></LI>
<LI>
<A HREF="#ss2.3">2.3 Set up the Build Environment</A></LI>
<LI>
<A HREF="#ss2.4">2.4 Build the Lizard </A></LI>
</UL>
<H2>3. <A HREF="#s3"> Common Problems </A></H2>
<HR>
<H2><A NAME="s1">1. Introduction</A></H2>
<P>
What this document is: A guide to building the Mozilla application.
<BR>
This includes:
<OL>
<LI> A listing of the development tools you will need to build Mozilla. </LI>
<LI> A list of environment variables you will need to set before building. </LI>
</OL>
<P>
If you're looking for documentation on developing features or fixing bugs,
the Mozilla
<A HREF="http://www.mozilla.org/docs/tplist/tplist.html">Technical Documents
</A> or <A HREF="http://www.mozilla.org/library.html"> Library </A>
are probably what you're looking for.
<P>
<HR>
<H2><A NAME="s2">2. Building Mozilla </A></H2>
<P>
<UL>Each of the following subsections describes, or gives references to
descriptions of, the steps necessary to build Mozilla.
<H2><A NAME="ss2.1">2.1 Get the Code</A></H2>
<P>
<UL>
There are two principal ways of getting the code,
<A HREF="http://www.mozilla.org/download.html"> ftp</A> and
<A HREF="http://www.mozilla.org/cvs.html"> CVS</A>.
CVS will provide the least outdated code for building, but is
slower than ftp.
</UL>
<P>
<H2><A NAME="ss2.2">2.2 Requirements</A></H2>
<UL>
The following need to be installed:
<UL>
<LI>Microsoft Visual C++ version 4.2 or later
<LI>GNU Tools for Microsoft Windows, located:
<UL>
<LI><A HREF="http://www.cygnus.com/misc/gnu-win32">Cygnus</A></LI>
<LI><A HREF="http://www.gnu.org/order/ftp.html">GNU home page</A></LI>
<LI><A HREF="ftp://prep.ai.mit.edu/pub/gnu">MIT</A></LI>
</UL>
Specifically, you'll need:
<UL><CODE>
cp.exe<BR>
rm.exe<BR>
uname.exe<BR>
</CODE>
</UL>
Netscape has internally modified version of gmake, shmsdos and win32gnu
that we use to get around some problems we were having keeping in sync
with the Unix version of gmake. This version of gmake can be found in the
Windows Build Tools package, which can be ftp'd from
<A HREF="http://www.mozilla.org/download-mozilla.html"> the Mozilla
Download page</A>.
The three files you will need are:
<UL><CODE>
gmake.exe<BR>
shmsdos.exe<BR>
uname.exe<BR>
</CODE>
</UL>
</UL>
<P>
Hardware/OS
<UL>
<LI>Pentium 133 MHz or better</LI>
<LI>64 MB RAM, 128 MB recommended</LI>
<LI>250 MB NTFS or 500 MB FAT disk space</LI>
<LI>NT 4.0 is preferred; NT 3.51 will also work.
</LI>
</UL>
</UL>
<P>
<H2><A NAME="ss2.3">2.3 Setup the Build Environment</A></H2>
<P>
<UL>
The following environment variables need to be set:
<UL>
<CODE>
set MOZ_BITS=32
<BR>
set MOZ_DEBUG=1 (set this only if you want to build a debug build)
<BR>
set MOZ_GOLD=1
<BR>
set MOZ_MEDIUM=1
<BR>
set MOZ_NT=351 (if running NT3.51)
<BR>
set MOZ_OUT=(optional: specifies location of resultant executable)
<BR>
set MOZ_SRC=(top of your tree, for example: set MOZ_SRC=d:\mozilla_source
if this is the directory where you checked or unzipped the source into)
<BR>
set MOZ_TOOLS=(location of the bin directory of your GNU tools. The build
looks for MOZ_TOOLS\bin\gmake.exe, so make sure that the gmake.exe from
the Windows Build Tools package resides there.)
<BR>
set NO_SECURITY=1
<BR>
set NSPR20=1
<BR>
set _MSC_VER=1100 (if you are running VC++ 5.0 or higher)
<BR>
</CODE>
</UL>
<BR>
<P>
</UL>
<H2><A NAME="ss2.4">2.4 Run the build </A></H2>
<UL>
Change to the directory you copied the source into (for example,
<CODE>cd d:\mozilla_source</CODE>). If this directory was empty before you
installed the source, there should be two directories here:
<CODE>README</CODE> and <CODE>mozilla</CODE>.
<CODE>
<PRE>
cd mozilla\config
nmake /f makefile.win
cd ..
nmake /f client.mak
</PRE>
</CODE>
</UL>
</UL>
<HR>
<H2><A NAME="s3">3. Common Sticking Points</A></H2>
<UL>
<LI><B>nmake has a 'fatal error', listing one of the GNU commands and a
hexadecimal return code.</B>
<UL>
This will happen as a result of not having the GNU tools and Windows Build
tools in your path. Add the directories with the appropriate binaries to your
path.
</UL>
</LI>
<LI>
<B>It fails with the message "'.\WIN32' unexpected": </B>
<UL>
You didn't properly
set the environment variables -- you must not include a space at the end
of the set statements (be careful if you are cut'n'pasting).
</UL>
</LI>
<LI>
<B>It fails to build, with directory-related errors: </B>
<UL>
The full path
to the source must not include any spaces. Additionally, the source must
be extracted with an intact directory structure by a utility that understands
long filenames. If in doubt, grab Info-Zip at
<A HREF="ftp://ftp.cdrom.com/pub/infozip">ftp://ftp.cdrom.com/pub/infozip</A>
</UL>
</LI>
<LI>
<B>I'm not running a 32-bit windows system, how do i build?</B>
<UL>
Currently, the build process depends on a 32-bit operating system.
Windows NT 4.0 is the recommended windows operating system.
</UL>
</UL>
<HR>
</BODY>
</HTML>

View File

@@ -0,0 +1,53 @@
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Author" CONTENT="Chris Yeh">
<META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en]C-NSCP (WinNT; U) [Netscape]">
<TITLE>Running Mozilla...</TITLE>
</HEAD>
<BODY>
<H2>
<FONT FACE="Arial,Helvetica">Running Mozilla Without Trashing Netscape
Installation</FONT></H2>
This document explains how to run <TT>mozilla.exe</TT> separately from
<TT>netscape.exe</TT> without trashing your regular installation of Netscape
Communicator. This is necessary if, for example, you want to use Communicator's
mail client while you work on Mozilla development.
<BR>
<HR WIDTH="100%">
<OL>
<LI>
Before running <TT>mozilla.exe</TT>, create a new user profile either from
a Netscape 4.0x installation using the "User Profile Manager" shortcut
in the Utilities folder (on Windows) or by using&nbsp; the <TT>-new_account</TT>
option on the command line of either <TT>netscape.exe</TT> or <TT>mozilla.exe</TT>.&nbsp;
We suggest calling the profile "<TT>mozilla</TT>."</LI>
<LI>
Always use that new account when running <TT>mozilla.exe</TT>, and never
run <TT>netscape.exe</TT> using that same account profile.</LI>
</OL>
To make things easier, you can start the application with the user account
on the command line, for example:
<UL><TT>mozilla.exe -P"mozilla"</TT></UL>
This assures that prefs and the cache will not interfere between the two
versions. This will be especially
<BR>important as new prefs are added to the Mozilla product. Note that
you must use quotes around the name and there can be no space between the
"P" and the profile name. Otherwise, the application won't catch the profile
switch, and it will try to load the profile name as the initial URL.
<P>
<HR WIDTH="100%">
<BR>You can copy your <TT>bookmark.htm</TT> file from an existing profile
to your new profile directory if you want to share bookmarks.
<P>After the initial 3/31 release, we will add some code to Mozilla to
prevent running with a profile that is already being used by <TT>netscape.exe</TT>.
<BR>&nbsp;
<HR WIDTH="100%">
<BR><FONT SIZE=-1>Copyright &copy; 1998 <A HREF="http://home.netscape.com/misc/contact_info.html">Netscape
Communications Corporation</A></FONT>
</BODY>
</HTML>

View File

@@ -0,0 +1,388 @@
# Config file for the Apache httpd.
# Configuration.tmpl is the template for Configuration. Configuration should
# be edited to select the modules to be included as well as various flags
# for Makefile.
# The template should only be changed when a new system or module is added,
# or an existing one modified. This will also most likely require some minor
# changes to Configure to recognize those changes.
# There are 5 types of lines here:
# '#' comments, distinguished by having a '#' as the first non-blank character
#
# Makefile options, such as CC=gcc, etc...
#
# Rules, distinguished by having "Rule" at the front. These are used to
# control Configure's behavior as far as how to create Makefile.
#
# Module selection lines, distinguished by having 'AddModule' at the front.
# These list the configured modules, in priority order (highest priority
# last). They're down at the bottom.
#
# Optional module selection lines, distinguished by having `%Module'
# at the front. These specify a module that is to be compiled in (but
# not enabled). The AddModule directive can be used to enable such a
# module. By default no such modules are defined.
################################################################
# Makefile configuration
#
# These are added to the general flags determined by Configure.
# Edit these to work around Configure if needed. The EXTRA_* family
# will be added to the regular Makefile flags. For example, if you
# want to compile with -Wall, then add that to EXTRA_CFLAGS. These
# will be added to whatever flags Configure determines as appropriate
# and needed for your platform.
#
# You can also set the compiler (CC) and optimization (OPTIM) used here as
# well. Settings here have priority; If not set, Configure will attempt to
# guess the C compiler, looking for gcc first, then cc.
#
# Optimization note:
# Be careful when adding optimization flags (like -O3 or -O6) on the OPTIM
# entry, especially when using some GCC variants. Experience showed that using
# these for compiling Apache is risky. If you don't want to see Apache dumping
# core regularly then at most use -O or -O2.
#
EXTRA_CFLAGS=
EXTRA_LDFLAGS=
EXTRA_LIBS=
EXTRA_INCLUDES=
#CC=
#OPTIM=
#RANLIB=
################################################################
# Dynamic Shared Object (DSO) support
#
# There is experimental support for compiling the Apache core and
# the Apache modules into dynamic shared object (DSO) files for
# maximum runtime flexibility.
#
# The Configure script currently has only limited built-in
# knowledge on how to compile these DSO files because this is
# heavily platform-dependent. The current state of supported and
# explicitly unsupported platforms can be found in the file
# "htdocs/manual/sharedobjects.html", under
# "Supported Platforms".
#
# For other platforms where you want to use the DSO mechanism you
# first have to make sure it supports the pragmatic dlopen()
# system call and then you have to provide the appropriate
# compiler and linker flags below to create the DSO files on your
# particular platform.
#
# The placement of the Apache core into a DSO file is triggered
# by the SHARED_CORE rule below while support for building
# individual Apache Modules as DSO files and loading them under
# runtime without recompilation is triggered by `SharedModule'
# commands. To be able to use the latter one first enable the
# module mod_so (see corresponding `AddModule' command below).
# Then enable the DSO feature for particular modules individually
# by replacing their `AddModule' command with `SharedModule' and
# change the filename extension from `.o' to `.so'.
#CFLAGS_SHLIB=
#LD_SHLIB=
#LDFLAGS_SHLIB=
#LDFLAGS_SHLIB_EXPORT=
Rule SHARED_CORE=default
################################################################
# Rules configuration
#
# These are used to let Configure know that we want certain
# functions. The format is: Rule RULE=value
#
# At present, only the following RULES are known: WANTHSREGEX, SOCKS4,
# SOCKS5, STATUS, IRIXNIS, IRIXN32 and PARANOID.
#
# For all Rules, if set to "yes", then Configure knows we want that
# capability and does what is required to add it in. If set to "default"
# then Configure makes a "best guess"; if set to anything else, or not
# present, then nothing is done.
#
# SOCKS4:
# If SOCKS4 is set to 'yes', be sure that you add the socks library
# location to EXTRA_LIBS, otherwise Configure will assume
# "-L/usr/local/lib -lsocks"
#
# SOCKS5:
# If SOCKS5 is set to 'yes', be sure that you add the socks5 library
# location to EXTRA_LIBS, otherwise Configure will assume
# "-L/usr/local/lib -lsocks5"
#
# STATUS:
# If Configure determines that you are using the status_module,
# it will automatically enable full status information if set
# to 'yes'. If the status module is not included, having STATUS
# set to 'yes' has no impact.
#
# IRIXNIS:
# Only takes effect if Configure determines that you are running
# SGI IRIX. If you are using a (ancient) 4.x version of IRIX, you
# need this if you are using NIS and Apache needs access to it for
# things like mod_userdir. This is not required on 5.x and later
# and you should not enable it on such systems.
#
# IRIXN32:
# If you are running a version of IRIX and Configure detects
# n32 libraries, it will use those instead of the o32 ones.
#
# PARANOID:
# New with version 1.3, during Configure modules can run
# pre-programmed shell commands in the same environment that
# Configure runs in. This allows modules to control how Configure
# works. Normally, Configure will simply note that a module
# is performing this function. If PARANOID is set to yes, it will
# actually print-out the code that the modules execute
#
Rule STATUS=yes
Rule SOCKS4=no
Rule SOCKS5=no
Rule IRIXNIS=no
Rule IRIXN32=yes
Rule PARANOID=no
# The following rules should be set automatically by Configure. However, if
# they are not set by Configure (because we don't know the correct value for
# your platform), or are set incorrectly, you may override them here.
# If you have to do this, please let us know what you set and what your
# platform is, by filling out a problem report form at the Apache web site:
# <http://bugs.apache.org/>. If your browser is forms-incapable, you
# can get the information to us by sending mail to apache-bugs@apache.org.
#
# WANTHSREGEX:
# Apache requires a POSIX regex implementation. Henry Spencer's
# excellent regex package is included with Apache and can be used
# if desired. If your OS has a decent regex, you can elect to
# not use this one by setting WANTHSREGEX to 'no' or commenting
# out the Rule. The "default" action is "yes" unless overruled
# by OS specifics
Rule WANTHSREGEX=default
################################################################
# Module configuration
#
# Modules are listed in reverse priority order --- the ones that come
# later can override the behavior of those that come earlier. This
# can have visible effects; for instance, if UserDir followed Alias,
# you couldn't alias out a particular user's home directory.
# The configuration below is what we consider a decent default
# configuration. If you want the functionality provided by a particular
# module, remove the "#" sign at the beginning of the line. But remember,
# the more modules you compile into the server, the larger the executable
# is and the more memory it will take, so if you are unlikely to use the
# functionality of a particular module you might wish to leave it out.
##
## Config manipulation modules
##
## mod_env sets up additional or restricted environment variables to be
## passed to CGI/SSI scripts. It is listed first (lowest priority) since
## it does not do per-request stuff.
AddModule modules/standard/mod_env.o
##
## Request logging modules
##
AddModule modules/standard/mod_log_config.o
## Optional modules for NCSA user-agent/referer logging compatibility
## We recommend, however, that you just use the configurable access_log.
# AddModule modules/standard/mod_log_agent.o
# AddModule modules/standard/mod_log_referer.o
##
## Type checking modules
##
## mod_mime_magic determines the type of a file by examining a few bytes
## of it and testing against a database of filetype signatures. It is
## based on the unix file(1) command.
## mod_mime maps filename extensions to content types, encodings, and
## "magic" type handlers (the latter is obsoleted by mod_actions, and
## don't confuse it with the previous module).
## mod_gzip_content is a specialized type of negotiation to return
## content-encoded: gzip versions of requested files if they
## exist based on the accept-encoding header and a CompressContent
## command in access.conf.
## mod_negotiation allows content selection based on the Accept* headers.
# AddModule modules/standard/mod_mime_magic.o
AddModule modules/standard/mod_mime.o
AddModule modules/do_gzip/mod_gzip_content.o
AddModule modules/standard/mod_negotiation.o
##
## Compressed content modules
##
## mod_gzip_content looks to see if the returned file
## also exists as content-encoded gzip, and if so
## returns that instead (setting the content-encoded header)
##
## Content delivery modules
##
## The status module allows the server to display current details about
## how well it is performing and what it is doing. Consider also enabling
## STATUS=yes (see the Rules section near the start of this file) to allow
## full status information. Check conf/access.conf on how to enable this.
# AddModule modules/standard/mod_status.o
## The Info module displays configuration information for the server and
## all included modules. It's very useful for debugging.
# AddModule modules/standard/mod_info.o
## mod_include translates server-side include (SSI) statements in text files.
## mod_autoindex handles requests for directories which have no index file
## mod_dir handles requests on directories and directory index files.
## mod_cgi handles CGI scripts.
AddModule modules/standard/mod_include.o
AddModule modules/standard/mod_autoindex.o
AddModule modules/standard/mod_dir.o
AddModule modules/standard/mod_cgi.o
## The asis module implements ".asis" file types, which allow the embedding
## of HTTP headers at the beginning of the document. mod_imap handles internal
## imagemaps (no more cgi-bin/imagemap/!). mod_actions is used to specify
## CGI scripts which act as "handlers" for particular files, for example to
## automatically convert every GIF to another file type.
AddModule modules/standard/mod_asis.o
AddModule modules/standard/mod_imap.o
AddModule modules/standard/mod_actions.o
##
## URL translation modules.
##
## The Speling module attempts to correct misspellings of URLs that
## users might have entered, namely by checking capitalizations
## or by allowing up to one misspelling (character insertion / omission /
## transposition/typo). This catches the majority of misspelled requests.
## If it finds a match, a "spelling corrected" redirection is returned.
# AddModule modules/standard/mod_speling.o
## The UserDir module for selecting resource directories by user name
## and a common prefix, e.g., /~<user> , /usr/web/<user> , etc.
AddModule modules/standard/mod_userdir.o
## The proxy module enables the server to act as a proxy for outside
## http and ftp services. It's not as complete as it could be yet.
## NOTE: You do not want this module UNLESS you are running a proxy;
## it is not needed for normal (origin server) operation.
# AddModule modules/proxy/libproxy.a
## The Alias module provides simple URL translation and redirection.
AddModule modules/standard/mod_alias.o
## The URL rewriting module allows for powerful URI-to-URI and
## URI-to-filename mapping using a regular expression based
## rule-controlled rewriting engine.
# AddModule modules/standard/mod_rewrite.o
##
## Access control and authentication modules.
##
AddModule modules/standard/mod_access.o
AddModule modules/standard/mod_auth.o
## The anon_auth module allows for anonymous-FTP-style username/
## password authentication.
# AddModule modules/standard/mod_auth_anon.o
## db_auth and dbm_auth work with Berkeley DB files - make sure there
## is support for DBM files on your system. You may need to grab the GNU
## "gdbm" package if not and possibly adjust EXTRA_LIBS. (This may be
## done by Configure at a later date)
# AddModule modules/standard/mod_auth_dbm.o
# AddModule modules/standard/mod_auth_db.o
## "digest" implements HTTP Digest Authentication rather than the less
## secure Basic Auth used by the other modules.
# AddModule modules/standard/mod_digest.o
## Optional response header manipulation modules.
##
## cern_meta mimics the behavior of the CERN web server with regards to
## metainformation files.
# AddModule modules/standard/mod_cern_meta.o
## The expires module can apply Expires: headers to resources,
## as a function of access time or modification time.
# AddModule modules/standard/mod_expires.o
## The headers module can set arbitrary HTTP response headers,
## as configured in server, vhost, access.conf or .htaccess configs
# AddModule modules/standard/mod_headers.o
## Miscellaneous modules
##
## mod_usertrack is the new name for mod_cookies. This module
## uses Netscape cookies to automatically construct and log
## click-trails from Netscape cookies, or compatible clients who
## aren't coming in via proxy.
##
## You do not need this, or any other module to allow your site
## to use Cookies. This module is for user tracking only
# AddModule modules/standard/mod_usertrack.o
## The example module, which demonstrates the use of the API. See
## the file modules/example/README for details. This module should
## only be used for testing -- DO NOT ENABLE IT on a production server.
# AddModule modules/example/mod_example.o
## mod_unique_id generates unique identifiers for each hit, which are
## available in the environment variable UNIQUE_ID. It may not work on all
## systems, hence it is not included by default.
# AddModule modules/standard/mod_unique_id.o
## mod_so lets you add modules to Apache without recompiling.
## This is an experimental feature at this stage and only supported
## on a subset of the platforms we generally support.
## Don't change this entry to a 'SharedModule' variant (Bootstrapping!)
# AddModule modules/standard/mod_so.o
## mod_mmap_static is an experimental module, you almost certainly
## don't need it. It can make some webservers faster. No further
## documentation is provided here because you'd be foolish
## to use mod_mmap_static without reading the full documentation.
# AddModule modules/experimental/mod_mmap_static.o
## mod_setenvif lets you set environment variables based on the HTTP header
## fields in the request; this is useful for conditional HTML, for example.
## Since it is also used to detect buggy browsers for workarounds, it
## should be the last (highest priority) module.
AddModule modules/standard/mod_setenvif.o

View File

@@ -0,0 +1,13 @@
#Dependencies
$(OBJS) $(OBJS_PIC): Makefile
# DO NOT REMOVE
mod_gzip_content.o: mod_gzip_content.c $(INCDIR)/httpd.h \
$(INCDIR)/conf.h $(OSDIR)/os.h $(INCDIR)/alloc.h \
$(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/util_uri.h \
$(INCDIR)/http_config.h $(INCDIR)/http_core.h \
$(INCDIR)/http_log.h $(INCDIR)/http_main.h \
$(INCDIR)/http_protocol.h $(INCDIR)/util_script.h

View File

@@ -0,0 +1,357 @@
/* ====================================================================
* Copyright (c) 1995-1998 The Apache Group. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the Apache Group
* for use in the Apache HTTP server project (http://www.apache.org/)."
*
* 4. The names "Apache Server" and "Apache Group" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the Apache Group
* for use in the Apache HTTP server project (http://www.apache.org/)."
*
* THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Group and was originally based
* on public domain software written at the National Center for
* Supercomputing Applications, University of Illinois, Urbana-Champaign.
* For more information on the Apache Group and the Apache HTTP server
* project, please see <http://www.apache.org/>.
*
*/
#include "httpd.h"
#include "http_config.h"
#include "http_request.h"
#include "http_log.h"
typedef struct dir_cfg {
int compress_content;
} dir_cfg;
module MODULE_VAR_EXPORT gzip_content_module;
/*
* If a directory has a CompressContent command for it,
* set the dir_cfg member appropriately so we know to try
* and send compressed content from that directory.
*/
static const char *gzip_compress_content_cmd(cmd_parms *cmd, void *mconfig,
char *arg)
{
dir_cfg *cfg = (dir_cfg *) mconfig;
if ((arg == NULL)||(*arg == '\0'))
return NULL;
if (!strcasecmp(arg, "Yes"))
{
cfg->compress_content = 1;
}
else if (!strcasecmp(arg, "No"))
{
cfg->compress_content = 0;
}
return NULL;
}
static const command_rec gzip_cmds[] =
{
{
"CompressContent", /* directive name */
gzip_compress_content_cmd, /* config action routine */
NULL, /* argument to include in call */
OR_OPTIONS, /* where available */
TAKE1, /* arguments */
"CompressContent directive - one argument, YES or NO"
/* directive description */
},
{NULL}
};
static void *create_gzip_dir_config(pool *p, char *dirspec)
{
dir_cfg *cfg;
/*
* Allocate the space for our record from the pool supplied.
*/
cfg = (dir_cfg *) ap_pcalloc(p, sizeof(dir_cfg));
cfg->compress_content = 0;
return (void *) cfg;
}
/*
* Children always inherit from their parents unless
* explicitly set by a CompressContent command.
*/
static void *merge_gzip_dir_config(pool *p, void *parent_conf,
void *newloc_conf)
{
dir_cfg *pconf = (dir_cfg *) parent_conf;
dir_cfg *nconf = (dir_cfg *) newloc_conf;
return (void *)newloc_conf;
}
/*
* I would expect this utility function to already exist
* somewhere in the ap_ functions, but I couldn't find it.
* It searches the passed string (case insensitivly) for
* the presence of the passed substring. Returns a pointer
* to the start of the substring if found, otherwise NULL.
*/
static char *find_sub_str(char *str, char *sub)
{
int indx;
char *ptr;
if (!sub || !str)
return NULL;
if (*sub == '\0' || *str == '\0')
return NULL;
indx = ap_ind(str, *sub);
while (indx >= 0)
{
ptr = &str[indx];
if (strncasecmp(ptr, sub, strlen(sub)) == 0)
{
return ptr;
}
ptr++;
indx = ap_ind(ptr, *sub);
}
return NULL;
}
/*
* If se are supposed to try and send compressed content from
* this directory, generate a subrequest to look for the compressed
* content. If found, slip it in in place of this request.
*/
static int set_gzip_content(request_rec *r)
{
dir_cfg *cfg;
char *accept_enc_hdr;
struct stat finfo;
int ret;
int look_for_gzip = 0;
/*
* Get the configuration information for this directory
* so we know whether to try and send compressed content from
* here or not.
*/
cfg = (dir_cfg *)ap_get_module_config(r->per_dir_config,
&gzip_content_module);
if ((cfg == NULL)||(cfg->compress_content == 0))
{
return DECLINED;
}
/*
* If the original file was not found, there is no need
* to look for a compressed version.
*/
if (r->finfo.st_mode == 0)
{
return DECLINED;
}
/*
* Pass up directory requests, they will later get redirected to
* something like index.html, and we can handle them then.
*/
if (S_ISDIR(r->finfo.st_mode))
{
return DECLINED;
}
/*
* sub-requests are just made to check the existence of
* a certain file and get its type, they never return
* a data stream, so we don't want to request a compressed
* version of them.
*/
if (r->main != NULL)
{
return DECLINED;
}
/*
* No point in redirecting to compressed content if you are
* just requesting a header with no content.
*/
if (r->header_only)
{
return DECLINED;
}
/*
* Even if we are supposed to try and send compressed content
* for this request from this directory, we can still
* only do it is we were sent an Accept-encoding header for
* gzip data.
*/
accept_enc_hdr = ap_table_get(r->headers_in, "Accept-encoding");
if (accept_enc_hdr)
{
/*
* This substring search is rather broad, in that it
* will send gzip data on any header with the gzip
* substring. This is to catch both gzip and x-gzip,
* but it may in fact be the wrong thing to do, I'm
* not sure yet.
*/
if (find_sub_str(accept_enc_hdr, "gzip") != NULL)
{
look_for_gzip = 1;
}
}
/*
* Finally we know if we are looking for a gzipped version of this
* file request.
*/
if (look_for_gzip)
{
/*
* The fastest thing to do here would be to just
* slap a .gz on the end of the r->filename, stat it,
* and if it exists go with it. But this wouldn't cover
* weird cases where the requested has permission to receive
* foo.html, but not foo.html.gz.
*
* So, we generate a new sub-request to see if we have
* permission to access the .gz file (if it even exists).
*/
request_rec *sub_req;
char *new_file;
new_file = ap_pstrcat(r->pool, r->filename, ".gz", NULL);
sub_req = ap_sub_req_lookup_file(new_file, r);
/*
* Either the file doesn't exist or permission was
* refused.
*/
if ((sub_req->status != HTTP_OK)||(sub_req->finfo.st_mode == 0))
{
ap_destroy_sub_req(sub_req);
return DECLINED;
}
/* "fast redirect" code stolen from mod_negotiation.c */
/* now do a "fast redirect" ... promote the sub_req into the main req */
/* We need to tell POOL_DEBUG that we're guaranteeing that sub_req->pool
* will exist as long as r->pool. Otherwise we run into troubles
* because some values in this request will be allocated in r->pool,
* and others in sub_req->pool.
*/
/*
* As far as I can tell we have to do this because
* ap_internal_redirect() cannot be called this early in a request.
* sure would have been nice if there was a comment saying that
* somewhere, and perhaps we need some other ap_redirect function
* that can be called this early, so that if something is changed
* in the request structure later, all this code doesn't break.
*/
ap_pool_join(r->pool, sub_req->pool);
r->filename = sub_req->filename;
r->handler = sub_req->handler;
r->content_type = sub_req->content_type;
r->content_encoding = sub_req->content_encoding;
r->content_languages = sub_req->content_languages;
r->content_language = sub_req->content_language;
r->finfo = sub_req->finfo;
r->per_dir_config = sub_req->per_dir_config;
/* copy output headers from subrequest, but leave negotiation headers */
r->notes = ap_overlay_tables(r->pool, sub_req->notes, r->notes);
r->headers_out = ap_overlay_tables(r->pool, sub_req->headers_out,
r->headers_out);
r->err_headers_out = ap_overlay_tables(r->pool,
sub_req->err_headers_out,
r->err_headers_out);
r->subprocess_env = ap_overlay_tables(r->pool, sub_req->subprocess_env,
r->subprocess_env);
return OK;
}
return DECLINED;
}
module MODULE_VAR_EXPORT gzip_content_module =
{
STANDARD_MODULE_STUFF,
NULL, /* initializer */
create_gzip_dir_config, /* dir config creator */
merge_gzip_dir_config, /* dir config merger */
NULL, /* server config */
NULL, /* merge server config */
gzip_cmds, /* command table */
NULL, /* handlers */
NULL, /* filename translation */
NULL, /* check_user_id */
NULL, /* check auth */
NULL, /* check access */
set_gzip_content, /* type_checker */
NULL, /* fixups */
NULL, /* logger */
NULL, /* header parser */
NULL, /* child_init */
NULL, /* child_exit */
NULL /* post read-request */
};

36
mozilla/build/Makefile.in Normal file
View File

@@ -0,0 +1,36 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is Mozilla Communicator client code,
# released March 31, 1998.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = unix
include $(topsrcdir)/config/rules.mk
# Install bloaturls.txt file for tinderbox Bloaty test.
install:: $(srcdir)/bloaturls.txt
$(INSTALL) $< $(DIST)/bin

View File

@@ -0,0 +1,179 @@
#! /usr/bin/env perl
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
# acoutput-fast.pl - Quickly create makefiles that are in a common format.
#
# Most of the makefiles in mozilla only refer to two configure variables:
# @srcdir@
# @top_srcdir@
# However, configure does not know any better and it runs sed on each file
# with over 150 replacement rules (slow as molasses).
#
# This script takes a list of makefiles as input. For example,
#
# echo $MAKEFILES | acoutput-fast.pl
#
# The script creates each Makefile that only references @srcdir@ and
# @top_srcdir@. For other files, it lists them in a shell command that is
# printed to stdout:
#
# CONFIG_FILES="unhandled_files..."; export CONFIG_FILES
#
# This command can be used to have config.status create the unhandled
# files. For example,
#
# eval "echo $MAKEFILES | acoutput-fast.pl"
# AC_OUTPUT($MAKEFILES)
#
# Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
#use File::Basename;
sub dirname {
my $dir = $_[0];
return '.' if not $dir =~ m%/%;
$dir =~ s%/[^/][^/]*$%%;
return $dir;
}
# Create one directory. Assumes it doesn't already exist.
# Will create parent(s) if needed.
sub create_directory {
my $dir = $_[0];
my $parent = dirname($dir);
create_directory($parent) if not -d $parent;
mkdir "$dir",0777;
}
# Create all the directories at once.
# This can be much faster than calling mkdir() for each one.
sub create_directories {
my @makefiles = @_;
my @dirs = ();
my $ac_file;
foreach $ac_file (@makefiles) {
push @dirs, dirname($ac_file);
}
# Call mkdir with the directories sorted by subdir count (how many /'s)
if (@dirs) {
my $mkdir_command = "mkdir -p ". join(' ', @dirs);
if (system($mkdir_command) != 0) {
print STDERR "Creating dirs all at once failed; trying one at atime\n";
foreach $dir (@dirs) {
if (not -d $dir) {
print STDERR "Creating directory $dir\n";
create_directory($dir);
}
}
}
}
}
if ($ARGV[0] =~ /^--srcdir=/) {
$ac_given_srcdir = (split /=/, shift @ARGV)[1];
} else {
$ac_given_srcdir = $0;
$ac_given_srcdir =~ s|/?build/autoconf/.*$||;
$ac_given_srcdir = '.' if $ac_given_srcdir eq '';
}
# Read list of makefiles from the stdin or,
# from files listed on the command-line.
#
@makefiles=();
push @makefiles, split while (<>);
# Create all the directories at once.
# This can be much faster than calling mkdir() for each one.
create_directories(@makefiles);
# Output the makefiles.
#
@unhandled=();
foreach $ac_file (@makefiles) {
if (not $ac_file =~ /Makefile$/ or $ac_file =~ /:/) {
push @unhandled, $ac_file;
next;
}
$ac_file_in = "$ac_given_srcdir/$ac_file.in";
$ac_dir = dirname($ac_file);
if ($ac_dir eq '.') {
$ac_dir_suffix = '';
$ac_dots = '';
} else {
$ac_dir_suffix = "/$ac_dir";
$ac_dir_suffix =~ s%^/\./%/%;
$ac_dots = $ac_dir_suffix;
$ac_dots =~ s%/[^/]*%../%g;
}
if ($ac_given_srcdir eq '.') {
$srcdir = '.';
if ($ac_dots eq '') {
$top_srcdir = '.'
} else {
$top_srcdir = $ac_dots;
$top_srcdir =~ s%/$%%;
}
} elsif ($ac_given_srcdir =~ m%^/%) {
$srcdir = "$ac_given_srcdir$ac_dir_suffix";
$top_srcdir = "$ac_given_srcdir";
} else {
$srcdir = "$ac_dots$ac_given_srcdir$ac_dir_suffix";
$top_srcdir = "$ac_dots$ac_given_srcdir";
}
if (-e $ac_file) {
next if -M _ < -M $ac_file_in;
print STDERR "updating $ac_file\n";
} else {
print STDERR "creating $ac_file\n";
}
open (INFILE, "<$ac_file_in")
or ( warn "can't read $ac_file_in: No such file or directory\n" and next);
open (OUTFILE, ">$ac_file")
or ( warn "Unable to create $ac_file\n" and next);
while (<INFILE>) {
if (/\@[_a-zA-Z]*\@.*\@[_a-zA-Z]*\@/) {
#warn "Two defines on a line:$ac_file:$.:$_";
push @unhandled, $ac_file;
last;
}
s/\@srcdir\@/$srcdir/;
s/\@top_srcdir\@/$top_srcdir/;
if (/\@[_a-zA-Z]*\@/) {
#warn "Unknown variable:$ac_file:$.:$_";
push @unhandled, $ac_file;
last;
}
print OUTFILE;
}
close INFILE;
close OUTFILE;
}
# Print the shell command to be evaluated by configure.
#
print "CONFIG_FILES=\"".join(' ', @unhandled)."\"; export CONFIG_FILES\n";

View File

@@ -0,0 +1,107 @@
dnl The contents of this file are subject to the Netscape Public
dnl License Version 1.1 (the "License"); you may not use this file
dnl except in compliance with the License. You may obtain a copy of
dnl the License at http://www.mozilla.org/NPL/
dnl
dnl Software distributed under the License is distributed on an "AS
dnl IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
dnl implied. See the License for the specific language governing
dnl rights and limitations under the License.
dnl
dnl The Original Code is mozilla.org code.
dnl
dnl The Initial Developer of the Original Code is Netscape
dnl Communications Corporation. Portions created by Netscape are
dnl Copyright (C) 1999 Netscape Communications Corporation. All
dnl Rights Reserved.
dnl
dnl Contributor(s):
dnl
dnl altoptions.m4 - An alternative way of specifying command-line options.
dnl These macros are needed to support a menu-based configurator.
dnl This file also includes the macro, AM_READ_MYCONFIG, for reading
dnl the 'myconfig.m4' file.
dnl Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
dnl MOZ_ARG_ENABLE_BOOL( NAME, HELP, IF-YES [, IF-NO [, ELSE]])
dnl MOZ_ARG_DISABLE_BOOL( NAME, HELP, IF-NO [, IF-YES [, ELSE]])
dnl MOZ_ARG_ENABLE_STRING( NAME, HELP, IF-SET [, ELSE])
dnl MOZ_ARG_ENABLE_BOOL_OR_STRING( NAME, HELP, IF-YES, IF-NO, IF-SET[, ELSE]]])
dnl MOZ_ARG_WITH_BOOL( NAME, HELP, IF-YES [, IF-NO [, ELSE])
dnl MOZ_ARG_WITHOUT_BOOL( NAME, HELP, IF-NO [, IF-YES [, ELSE])
dnl MOZ_ARG_WITH_STRING( NAME, HELP, IF-SET [, ELSE])
dnl MOZ_ARG_HEADER(Comment)
dnl MOZ_READ_MYCONFIG() - Read in 'myconfig.sh' file
dnl MOZ_TWO_STRING_TEST(NAME, STR1, IF-STR1, STR2, IF-STR2 [, ELSE])
AC_DEFUN(MOZ_TWO_STRING_TEST,
[if test "$enableval" = "[$2]"; then
ifelse([$3], , :, [$3])
elif test "$enableval" = "[$4]"; then
ifelse([$5], , :, [$5])
else
ifelse([$6], ,
[AC_MSG_ERROR([Option, [$1], does not take an argument ($enableval).])],
[$6])
fi])
dnl MOZ_ARG_ENABLE_BOOL(NAME, HELP, IF-YES [, IF-NO [, ELSE]])
AC_DEFUN(MOZ_ARG_ENABLE_BOOL,
[AC_ARG_ENABLE([$1], [$2],
[MOZ_TWO_STRING_TEST([$1], yes, [$3], no, [$4])],
[$5])])
dnl MOZ_ARG_DISABLE_BOOL(NAME, HELP, IF-NO [, IF-YES [, ELSE]])
AC_DEFUN(MOZ_ARG_DISABLE_BOOL,
[AC_ARG_ENABLE([$1], [$2],
[MOZ_TWO_STRING_TEST([$1], no, [$3], yes, [$4])],
[$5])])
dnl MOZ_ARG_ENABLE_STRING(NAME, HELP, IF-SET [, ELSE])
AC_DEFUN(MOZ_ARG_ENABLE_STRING,
[AC_ARG_ENABLE([$1], [$2], [$3], [$4])])
dnl MOZ_ARG_ENABLE_BOOL_OR_STRING(NAME, HELP, IF-YES, IF-NO, IF-SET[, ELSE]]])
AC_DEFUN(MOZ_ARG_ENABLE_BOOL_OR_STRING,
[ifelse([$5], ,
[errprint([Option, $1, needs an "IF-SET" argument.
])
m4exit(1)],
[AC_ARG_ENABLE([$1], [$2],
[MOZ_TWO_STRING_TEST([$1], yes, [$3], no, [$4], [$5])],
[$6])])])
dnl MOZ_ARG_WITH_BOOL(NAME, HELP, IF-YES [, IF-NO [, ELSE])
AC_DEFUN(MOZ_ARG_WITH_BOOL,
[AC_ARG_WITH([$1], [$2],
[MOZ_TWO_STRING_TEST([$1], yes, [$3], no, [$4])],
[$5])])
dnl MOZ_ARG_WITHOUT_BOOL(NAME, HELP, IF-NO [, IF-YES [, ELSE])
AC_DEFUN(MOZ_ARG_WITHOUT_BOOL,
[AC_ARG_WITH([$1], [$2],
[MOZ_TWO_STRING_TEST([$1], no, [$3], yes, [$4])],
[$5])])
dnl MOZ_ARG_WITH_STRING(NAME, HELP, IF-SET [, ELSE])
AC_DEFUN(MOZ_ARG_WITH_STRING,
[AC_ARG_WITH([$1], [$2], [$3], [$4])])
dnl MOZ_ARG_HEADER(Comment)
dnl This is used by webconfig to group options
define(MOZ_ARG_HEADER, [# $1])
dnl MOZ_READ_MYCONFIG() - Read in 'myconfig.sh' file
AC_DEFUN(MOZ_READ_MOZCONFIG,
[AC_REQUIRE([AC_INIT_BINSH])dnl
# Read in '.mozconfig' script to set the initial options.
# See the load-mozconfig.sh script for more details.
_topsrcdir=`dirname [$]0`
. $_topsrcdir/build/autoconf/load-mozconfig.sh])
dnl This gets inserted at the top of the configure script
MOZ_READ_MOZCONFIG

View File

@@ -0,0 +1,54 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
# clean-config.sh - Removes all files generated by mozilla configure.
# Only removes files from the topsrcdir. To clean up an objdir,
# simply remove the directory and start over.
#
# Usage:
# 1. cd <topsrcdir>
# 2. build/autoconf/clean-config.sh
#
# Send comments, improvements, bugs to slamm@netscape.com
topsrcdir=`cd \`dirname $0\`/../..; pwd`
if [ ! -f configure.in ]; then
echo "clean-config.sh only cleans the source tree. To run," 2>&1
echo " cd $topsrcdir; build/autoconf/clean-config.sh" 2>&1
echo " (To clean a separate objdir, simple remove the directory.)" 2>&1
exit 1
fi
if [ -f mailnews/makefiles ]; then
MOZ_MAIL_NEWS=1
export MOZ_MAIL_NEWS
fi
. allmakefiles.sh
rm -fr $MAKEFILES \
config-defs.h \
config.cache \
config.log \
config.status \
$NULL

911
mozilla/build/autoconf/config.guess vendored Executable file
View File

@@ -0,0 +1,911 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Written by Per Bothner <bothner@cygnus.com>.
# The master version of this file is at the FSF in /home/gd/gnu/lib.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
#
# The plan is that this can be called by configure scripts if you
# don't specify an explicit system type (host/target name).
#
# Only a few systems have been added to this list; please add others
# (but try to keep the structure clean).
#
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 8/24/94.)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
PATH=$PATH:/.attbin ; export PATH
fi
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
fi
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
cat <<EOF >dummy.s
.globl main
.ent main
main:
.frame \$30,0,\$26,0
.prologue 0
.long 0x47e03d80 # implver $0
lda \$2,259
.long 0x47e20c21 # amask $2,$1
srl \$1,8,\$2
sll \$2,2,\$2
sll \$0,3,\$0
addl \$1,\$0,\$0
addl \$2,\$0,\$0
ret \$31,(\$26),1
.end main
EOF
${CC-cc} dummy.s -o dummy 2>/dev/null
if test "$?" = 0 ; then
./dummy
case "$?" in
7)
UNAME_MACHINE="alpha"
;;
15)
UNAME_MACHINE="alphaev5"
;;
14)
UNAME_MACHINE="alphaev56"
;;
10)
UNAME_MACHINE="alphapca56"
;;
16)
UNAME_MACHINE="alphaev6"
;;
esac
fi
rm -f dummy.s dummy
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
exit 0 ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
exit 0 ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-cbm-sysv4
exit 0;;
amiga:NetBSD:*:*)
echo m68k-cbm-netbsd${UNAME_RELEASE}
exit 0 ;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc64:OpenBSD:*:*)
echo mips64el-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
hkmips:OpenBSD:*:*)
echo mips-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
pmax:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sgi:OpenBSD:*:*)
echo mips-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
wgrisc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
arm32:NetBSD:*:*)
echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
SR2?01:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
exit 0;;
Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
echo pyramid-pyramid-sysv3
else
echo pyramid-pyramid-bsd
fi
exit 0 ;;
NILE:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
i86pc:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
Series*|S4*)
UNAME_RELEASE=`uname -v`
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
exit 0 ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos${UNAME_RELEASE}
exit 0 ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
echo m68k-sun-sunos${UNAME_RELEASE}
;;
sun4)
echo sparc-sun-sunos${UNAME_RELEASE}
;;
esac
exit 0 ;;
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
exit 0 ;;
atari*:NetBSD:*:*)
echo m68k-atari-netbsd${UNAME_RELEASE}
exit 0 ;;
atari*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sun3*:NetBSD:*:*)
echo m68k-sun-netbsd${UNAME_RELEASE}
exit 0 ;;
sun3*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:NetBSD:*:*)
echo m68k-apple-netbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme88k:OpenBSD:*:*)
echo m88k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit 0 ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix${UNAME_RELEASE}
exit 0 ;;
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
exit 0 ;;
2020:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
sed 's/^ //' << EOF >dummy.c
int main (argc, argv) int argc; char **argv; {
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
}
EOF
${CC-cc} dummy.c -o dummy \
&& ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& rm dummy.c dummy && exit 0
rm -f dummy.c dummy
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
exit 0 ;;
m88k:CX/UX:7*:*)
echo m88k-harris-cxux7
exit 0 ;;
m88k:*:4*:R4*)
echo m88k-motorola-sysv4
exit 0 ;;
m88k:*:3*:R3*)
echo m88k-motorola-sysv3
exit 0 ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
-o ${TARGET_BINARY_INTERFACE}x = x ] ; then
echo m88k-dg-dgux${UNAME_RELEASE}
else
echo m88k-dg-dguxbcs${UNAME_RELEASE}
fi
else echo i586-dg-dgux${UNAME_RELEASE}
fi
exit 0 ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit 0 ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
echo m88k-motorola-sysv3
exit 0 ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
echo m88k-tektronix-sysv3
exit 0 ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
exit 0 ;;
*:IRIX*:*:*)
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
exit 0 ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i?86:AIX:*:*)
echo i386-ibm-aix
exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
sed 's/^ //' << EOF >dummy.c
#include <sys/systemcfg.h>
main()
{
if (!__power_pc())
exit(1);
puts("powerpc-ibm-aix3.2.5");
exit(0);
}
EOF
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
else
echo rs6000-ibm-aix3.2
fi
exit 0 ;;
*:AIX:*:4)
if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
fi
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
IBM_REV=4.${UNAME_RELEASE}
fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
exit 0 ;;
*:AIX:*:*)
echo rs6000-ibm-aix
exit 0 ;;
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
exit 0 ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
exit 0 ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
exit 0 ;;
DPX/2?00:B.O.S.:*:*)
echo m68k-bull-sysv3
exit 0 ;;
9000/[34]??:4.3bsd:1.*:*)
echo m68k-hp-bsd
exit 0 ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
exit 0 ;;
9000/[3478]??:HP-UX:*:*)
case "${UNAME_MACHINE}" in
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
9000/8?? ) HP_ARCH=hppa1.0 ;;
esac
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
3050*:HI-UX:*:*)
sed 's/^ //' << EOF >dummy.c
#include <unistd.h>
int
main ()
{
long cpu = sysconf (_SC_CPU_VERSION);
/* The order matters, because CPU_IS_HP_MC68K erroneously returns
true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
results, however. */
if (CPU_IS_PA_RISC (cpu))
{
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
default: puts ("hppa-hitachi-hiuxwe2"); break;
}
}
else if (CPU_IS_HP_MC68K (cpu))
puts ("m68k-hitachi-hiuxwe2");
else puts ("unknown-hitachi-hiuxwe2");
exit (0);
}
EOF
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
echo unknown-hitachi-hiuxwe2
exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
echo hppa1.1-hp-bsd
exit 0 ;;
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit 0 ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
exit 0 ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
exit 0 ;;
i?86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-unknown-osf1mk
else
echo ${UNAME_MACHINE}-unknown-osf1
fi
exit 0 ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit 0 ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit 0 ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
exit 0 ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
exit 0 ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
exit 0 ;;
CRAY*X-MP:*:*:*)
echo xmp-cray-unicos
exit 0 ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE}
exit 0 ;;
CRAY*[A-Z]90:*:*:*)
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
exit 0 ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE}
exit 0 ;;
CRAY-2:*:*:*)
echo cray2-cray-unicos
exit 0 ;;
F300:UNIX_System_V:*:*)
FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
F301:UNIX_System_V:*:*)
echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
exit 0 ;;
hp3[0-9][05]:NetBSD:*:*)
echo m68k-hp-netbsd${UNAME_RELEASE}
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
i?86:BSD/386:*:* | *:BSD/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
*:NetBSD:*:*)
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin32
exit 0 ;;
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit 0 ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin32
exit 0 ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
*:GNU:*:*)
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
*:Linux:*:*)
# uname on the ARM produces all sorts of strangeness, and we need to
# filter it out.
case "$UNAME_MACHINE" in
arm* | sa110*) UNAME_MACHINE="arm" ;;
esac
# The BFD linker knows what the default object file format is, so
# first see if it will tell us.
ld_help_string=`ld --help 2>&1`
ld_supported_emulations=`echo $ld_help_string \
| sed -ne '/supported emulations:/!d
s/[ ][ ]*/ /g
s/.*supported emulations: *//
s/ .*//
p'`
case "$ld_supported_emulations" in
i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
esac
if test "${UNAME_MACHINE}" = "alpha" ; then
sed 's/^ //' <<EOF >dummy.s
.globl main
.ent main
main:
.frame \$30,0,\$26,0
.prologue 0
.long 0x47e03d80 # implver $0
lda \$2,259
.long 0x47e20c21 # amask $2,$1
srl \$1,8,\$2
sll \$2,2,\$2
sll \$0,3,\$0
addl \$1,\$0,\$0
addl \$2,\$0,\$0
ret \$31,(\$26),1
.end main
EOF
LIBC=""
${CC-cc} dummy.s -o dummy 2>/dev/null
if test "$?" = 0 ; then
./dummy
case "$?" in
7)
UNAME_MACHINE="alpha"
;;
15)
UNAME_MACHINE="alphaev5"
;;
14)
UNAME_MACHINE="alphaev56"
;;
10)
UNAME_MACHINE="alphapca56"
;;
16)
UNAME_MACHINE="alphaev6"
;;
esac
objdump --private-headers dummy | \
grep ld.so.1 > /dev/null
if test "$?" = 0 ; then
LIBC="libc1"
fi
fi
rm -f dummy.s dummy
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
elif test "${UNAME_MACHINE}" = "mips" ; then
cat >dummy.c <<EOF
main(argc, argv)
int argc;
char *argv[];
{
#ifdef __MIPSEB__
printf ("%s-unknown-linux-gnu\n", argv[1]);
#endif
#ifdef __MIPSEL__
printf ("%sel-unknown-linux-gnu\n", argv[1]);
#endif
return 0;
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
else
# Either a pre-BFD a.out linker (linux-gnuoldld)
# or one that does not give us useful --help.
# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
# If ld does not provide *any* "supported emulations:"
# that means it is gnuoldld.
echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
case "${UNAME_MACHINE}" in
i?86)
VENDOR=pc;
;;
*)
VENDOR=unknown;
;;
esac
# Determine whether the default compiler is a.out or elf
cat >dummy.c <<EOF
#include <features.h>
main(argc, argv)
int argc;
char *argv[];
{
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
# else
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
# endif
# else
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
# endif
#else
printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
#endif
return 0;
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
fi ;;
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
# are messed up and put the nodename in both sysname and nodename.
i?86:DYNIX/ptx:4*:*)
echo i386-sequent-sysv4
exit 0 ;;
i?86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;;
i?86:UnixWare:*:*)
# Unixware 7 is the first attempt at a useful OS description.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;;
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
fi
exit 0 ;;
i?86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
elif /bin/uname -X 2>/dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
pc:*:*:*)
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i386.
echo i386-pc-msdosdjgpp
exit 0 ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit 0 ;;
paragon:*:*:*)
echo i860-intel-osf1
exit 0 ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
fi
exit 0 ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
echo m68010-convergent-sysv
exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& echo i486-ncr-sysv4.3${OS_REL} && exit 0
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& echo i486-ncr-sysv4 && exit 0 ;;
m68*:LynxOS:2.*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
i?86:LynxOS:2.*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
exit 0 ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
exit 0 ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
echo ${UNAME_MACHINE}-sni-sysv4
else
echo ns32k-sni-sysv
fi
exit 0 ;;
PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit 0 ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
echo hppa1.1-stratus-sysv4
exit 0 ;;
*:*:*:FTX*)
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
exit 0 ;;
*:Rhapsody:*:*)
test ! -z "`echo ${UNAME_MACHINE} | grep Power`" && echo ppc-apple-rhapsody${UNAME_RELEASE} && exit 0
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
exit 0 ;;
news*:NEWS-OS:*:6*)
echo mips-sony-newsos6
exit 0 ;;
R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
fi
exit 0 ;;
*:QNX:*:*)
echo i386-pc-qnx`echo ${UNAME_VERSION} | cut -c1-1`
exit 0 ;;
BePC:BeOS:*:*)
echo i386-pc-beos${UNAME_RELEASE}
exit 0 ;;
BeMac:BeOS:*:*)
echo ppc-apple-beos${UNAME_RELEASE}
exit 0 ;;
BeBox:BeOS:*:*)
echo ppc-be-beos${UNAME_RELEASE}
exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
cat >dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/utsname.h>
#endif
main ()
{
#if defined (sony)
#if defined (MIPSEB)
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
I don't know.... */
printf ("mips-sony-bsd\n"); exit (0);
#else
#include <sys/param.h>
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
"4"
#else
""
#endif
); exit (0);
#endif
#endif
#if defined (__arm) && defined (__acorn) && defined (__unix)
printf ("arm-acorn-riscix"); exit (0);
#endif
#if defined (hp300) && !defined (hpux)
printf ("m68k-hp-bsd\n"); exit (0);
#endif
#if defined (NeXT)
#if !defined (__ARCHITECTURE__)
#define __ARCHITECTURE__ "m68k"
#endif
int version;
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
exit (0);
#endif
#if defined (MULTIMAX) || defined (n16)
#if defined (UMAXV)
printf ("ns32k-encore-sysv\n"); exit (0);
#else
#if defined (CMU)
printf ("ns32k-encore-mach\n"); exit (0);
#else
printf ("ns32k-encore-bsd\n"); exit (0);
#endif
#endif
#endif
#if defined (__386BSD__)
printf ("i386-pc-bsd\n"); exit (0);
#endif
#if defined (sequent)
#if defined (i386)
printf ("i386-sequent-dynix\n"); exit (0);
#endif
#if defined (ns32000)
printf ("ns32k-sequent-dynix\n"); exit (0);
#endif
#endif
#if defined (_SEQUENT_)
struct utsname un;
uname(&un);
if (strncmp(un.version, "V2", 2) == 0) {
printf ("i386-sequent-ptx2\n"); exit (0);
}
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
printf ("i386-sequent-ptx1\n"); exit (0);
}
printf ("i386-sequent-ptx\n"); exit (0);
#endif
#if defined (vax)
#if !defined (ultrix)
printf ("vax-dec-bsd\n"); exit (0);
#else
printf ("vax-dec-ultrix\n"); exit (0);
#endif
#endif
#if defined (alliant) && defined (i860)
printf ("i860-alliant-bsd\n"); exit (0);
#endif
exit (1);
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
# Apollos put the system type in the environment.
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
# Convex versions that predate uname can use getsysinfo(1)
if [ -x /usr/convex/getsysinfo ]
then
case `getsysinfo -f cpu_type` in
c1*)
echo c1-convex-bsd
exit 0 ;;
c2*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit 0 ;;
c34*)
echo c34-convex-bsd
exit 0 ;;
c38*)
echo c38-convex-bsd
exit 0 ;;
c4*)
echo c4-convex-bsd
exit 0 ;;
esac
fi
#echo '(Unable to guess system type)' 1>&2
exit 1

981
mozilla/build/autoconf/config.sub vendored Executable file
View File

@@ -0,0 +1,981 @@
#! /bin/sh
# Configuration validation subroutine script, version 1.1.
# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
# Each package is responsible for reporting which valid configurations
# it does not support. The user should be able to distinguish
# a failure to support a valid configuration from a meaningless
# configuration.
# The goal of this file is to map all the various variations of a given
# machine specification into a single specification in the form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or in some cases, the newer four-part form:
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
if [ x$1 = x ]
then
echo Configuration name missing. 1>&2
echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
echo "or $0 ALIAS" 1>&2
echo where ALIAS is a recognized configuration type. 1>&2
exit 1
fi
# First pass through any local machine types.
case $1 in
*local*)
echo $1
exit 0
;;
*)
;;
esac
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
linux-gnu*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
then os=`echo $1 | sed 's/.*-/-/'`
else os=; fi
;;
esac
### Let's recognize common machines as not being operating systems so
### that things like config.sub decstation-3100 work. We also
### recognize some manufacturers as not being operating systems, so we
### can provide default operating systems below.
case $os in
-sun*os*)
# Prevent following clause from handling this invalid input.
;;
-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple)
os=
basic_machine=$1
;;
-hiux*)
os=-hiuxwe2
;;
-sco5)
os=sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
os=-sco3.2v4
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2.[4-9]*)
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2v[4-9]*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-isc)
os=-isc2.2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-clix*)
basic_machine=clipper-intergraph
;;
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-lynx*)
os=-lynxos
;;
-ptx*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
;;
-windowsnt*)
os=`echo $os | sed -e 's/windowsnt/winnt/'`
;;
-psos*)
os=-psos
;;
-qnx*)
basic_machine=i386-pc
os=-qnx`uname -v | cut -c1-1`
;;
-nto*)
basic_machine=i386-pc
os=-nto
;;
-rhapsody*)
basic_machine=ppc-apple
os=-rhapsody`uname -r`
;;
esac
# Decode aliases for certain CPU-COMPANY combinations.
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
| arme[lb] | pyramid | mn10200 | mn10300 \
| tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
| alpha | alphaev5 | alphaev56 | alphaev6 | alphapca56 | we32k | ns16k | clipper \
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
| mipstx39 | mipstx39el \
| sparc | sparclet | sparclite | sparc64 | v850)
basic_machine=$basic_machine-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
i[34567]86)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
*-*-*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
# Recognize the basic CPU types with company name.
vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
| xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
| alpha-* | alphaev5-* | alphaev56-* | alphaev6-* | alphapca56-* | we32k-* | cydra-* \
| ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
| sparc64-* | mips64-* | mipsel-* \
| mips64el-* | mips64orion-* | mips64orionel-* \
| mipstx39-* | mipstx39el-* \
| f301-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
basic_machine=m68000-att
;;
3b*)
basic_machine=we32k-att
;;
alliant | fx80)
basic_machine=fx80-alliant
;;
altos | altos3068)
basic_machine=m68k-altos
;;
am29k)
basic_machine=a29k-none
os=-bsd
;;
amdahl)
basic_machine=580-amdahl
os=-sysv
;;
amiga | amiga-*)
basic_machine=m68k-cbm
;;
amigaos | amigados)
basic_machine=m68k-cbm
os=-amigaos
;;
amigaunix | amix)
basic_machine=m68k-cbm
os=-sysv4
;;
apollo68)
basic_machine=m68k-apollo
os=-sysv
;;
aux)
basic_machine=m68k-apple
os=-aux
;;
balance)
basic_machine=ns32k-sequent
os=-dynix
;;
convex-c1)
basic_machine=c1-convex
os=-bsd
;;
convex-c2)
basic_machine=c2-convex
os=-bsd
;;
convex-c32)
basic_machine=c32-convex
os=-bsd
;;
convex-c34)
basic_machine=c34-convex
os=-bsd
;;
convex-c38)
basic_machine=c38-convex
os=-bsd
;;
cray | ymp)
basic_machine=ymp-cray
os=-unicos
;;
cray2)
basic_machine=cray2-cray
os=-unicos
;;
[ctj]90-cray)
basic_machine=c90-cray
os=-unicos
;;
crds | unos)
basic_machine=m68k-crds
;;
da30 | da30-*)
basic_machine=m68k-da30
;;
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
basic_machine=mips-dec
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
basic_machine=m68k-motorola
;;
delta88)
basic_machine=m88k-motorola
os=-sysv3
;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
;;
dpx2* | dpx2*-bull)
basic_machine=m68k-bull
os=-sysv3
;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
;;
elxsi)
basic_machine=elxsi-elxsi
os=-bsd
;;
encore | umax | mmax)
basic_machine=ns32k-encore
;;
fx2800)
basic_machine=i860-alliant
;;
genix)
basic_machine=ns32k-ns
;;
gmicro)
basic_machine=tron-gmicro
os=-sysv
;;
h3050r* | hiux*)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
h8300hms)
basic_machine=h8300-hitachi
os=-hms
;;
harris)
basic_machine=m88k-harris
os=-sysv3
;;
hp300-*)
basic_machine=m68k-hp
;;
hp300bsd)
basic_machine=m68k-hp
os=-bsd
;;
hp300hpux)
basic_machine=m68k-hp
os=-hpux
;;
hp9k2[0-9][0-9] | hp9k31[0-9])
basic_machine=m68000-hp
;;
hp9k3[2-9][0-9])
basic_machine=m68k-hp
;;
hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hppa-next)
os=-nextstep3
;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
os=-mvs
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i[34567]86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
i[34567]86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
i[34567]86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
i[34567]86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
-irix*)
;;
*)
os=-irix4
;;
esac
;;
isi68 | isi)
basic_machine=m68k-isi
os=-sysv
;;
m88k-omron*)
basic_machine=m88k-omron
;;
magnum | m3230)
basic_machine=mips-mips
os=-sysv
;;
merlin)
basic_machine=ns32k-utek
os=-sysv
;;
miniframe)
basic_machine=m68000-convergent
;;
mipsel*-linux*)
basic_machine=mipsel-unknown
os=-linux-gnu
;;
mips*-linux*)
basic_machine=mips-unknown
os=-linux-gnu
;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
;;
news | news700 | news800 | news900)
basic_machine=m68k-sony
os=-newsos
;;
news1000)
basic_machine=m68030-sony
os=-newsos
;;
news-3600 | risc-news)
basic_machine=mips-sony
os=-newsos
;;
next | m*-next )
basic_machine=m68k-next
case $os in
-nextstep* )
;;
-ns2*)
os=-nextstep2
;;
*)
os=-nextstep3
;;
esac
;;
nh3000)
basic_machine=m68k-harris
os=-cxux
;;
nh[45]000)
basic_machine=m88k-harris
os=-cxux
;;
nindy960)
basic_machine=i960-intel
os=-nindy
;;
np1)
basic_machine=np1-gould
;;
pa-hitachi)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
paragon)
basic_machine=i860-intel
os=-osf
;;
pbd)
basic_machine=sparc-tti
;;
pbb)
basic_machine=m68k-tti
;;
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pentium | p5 | k5 | nexen)
basic_machine=i586-pc
;;
pentiumpro | p6 | k6 | 6x86)
basic_machine=i686-pc
;;
pentiumii | pentium2)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | nexen-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | k6-* | 6x86-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
;;
power) basic_machine=rs6000-ibm
;;
ppc) basic_machine=powerpc-unknown
;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ps2)
basic_machine=i386-ibm
;;
*qnx*)
basic_machine=i386-pc
os=-qnx`uname -v | cut -c1-1`
;;
*nto*)
basic_machine=i386-pc
os=-nto
;;
rm[46]00)
basic_machine=mips-siemens
;;
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
sequent)
basic_machine=i386-sequent
;;
sh)
basic_machine=sh-hitachi
os=-hms
;;
sps7)
basic_machine=m68k-bull
os=-sysv2
;;
spur)
basic_machine=spur-unknown
;;
sun2)
basic_machine=m68000-sun
;;
sun2os3)
basic_machine=m68000-sun
os=-sunos3
;;
sun2os4)
basic_machine=m68000-sun
os=-sunos4
;;
sun3os3)
basic_machine=m68k-sun
os=-sunos3
;;
sun3os4)
basic_machine=m68k-sun
os=-sunos4
;;
sun4os3)
basic_machine=sparc-sun
os=-sunos3
;;
sun4os4)
basic_machine=sparc-sun
os=-sunos4
;;
sun4sol2)
basic_machine=sparc-sun
os=-solaris2
;;
sun3 | sun3-*)
basic_machine=m68k-sun
;;
sun4)
basic_machine=sparc-sun
;;
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
symmetry)
basic_machine=i386-sequent
os=-dynix
;;
tx39)
basic_machine=mipstx39-unknown
;;
tx39el)
basic_machine=mipstx39el-unknown
;;
tower | tower-32)
basic_machine=m68k-ncr
;;
udi29k)
basic_machine=a29k-amd
os=-udi
;;
ultra3)
basic_machine=a29k-nyu
os=-sym1
;;
vaxv)
basic_machine=vax-dec
os=-sysv
;;
vms)
basic_machine=vax-dec
os=-vms
;;
vpp*|vx|vx-*)
basic_machine=f301-fujitsu
;;
vxworks960)
basic_machine=i960-wrs
os=-vxworks
;;
vxworks68)
basic_machine=m68k-wrs
os=-vxworks
;;
vxworks29k)
basic_machine=a29k-wrs
os=-vxworks
;;
xmp)
basic_machine=xmp-cray
os=-unicos
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
none)
basic_machine=none-none
os=-none
;;
# Here we handle the default manufacturer of certain CPU types. It is in
# some cases the only manufacturer, in others, it is the most popular.
mips)
if [ x$os = x-linux-gnu ]; then
basic_machine=mips-unknown
else
basic_machine=mips-mips
fi
;;
romp)
basic_machine=romp-ibm
;;
rs6000)
basic_machine=rs6000-ibm
;;
vax)
basic_machine=vax-dec
;;
pdp11)
basic_machine=pdp11-dec
;;
we32k)
basic_machine=we32k-att
;;
sparc)
basic_machine=sparc-sun
;;
cydra)
basic_machine=cydra-cydrome
;;
orion)
basic_machine=orion-highlevel
;;
orion105)
basic_machine=clipper-highlevel
;;
*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
esac
# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
*-digital*)
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
;;
*-commodore*)
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
;;
*)
;;
esac
# Decode manufacturer-specific aliases for certain operating systems.
if [ x"$os" != x"" ]
then
case $os in
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
-solaris)
os=-solaris2
;;
-svr4*)
os=-sysv4
;;
-unixware*)
os=-sysv4.2uw
;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
# First accept the basic system types.
# The portable systems comes first.
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-beos*)
os=-beos
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
-sunos5*)
os=`echo $os | sed -e 's|sunos5|solaris2|'`
;;
-sunos6*)
os=`echo $os | sed -e 's|sunos6|solaris3|'`
;;
-osfrose*)
os=-osfrose
;;
-osf*)
os=-osf
;;
-utek*)
os=-bsd
;;
-dynix*)
os=-bsd
;;
-acis*)
os=-aos
;;
-ctix* | -uts*)
os=-sysv
;;
-ns2 )
os=-nextstep2
;;
# Preserve the version number of sinix5.
-sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
;;
-sinix*)
os=-sysv4
;;
-triton*)
os=-sysv3
;;
-oss*)
os=-sysv3
;;
-svr4)
os=-sysv4
;;
-svr3)
os=-sysv3
;;
-sysvr4)
os=-sysv4
;;
# This must come after -sysvr4.
-sysv*)
;;
-xenix)
os=-xenix
;;
-rhapsody*)
;;
-qnx*)
;;
-nto*)
;;
-none)
;;
*)
# Get rid of the `-' at the beginning of $os.
os=`echo $os | sed 's/[^-]*-//'`
echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
exit 1
;;
esac
else
# Here we handle the default operating systems that come with various machines.
# The value should be what the vendor currently ships out the door with their
# machine or put another way, the most popular os provided with the machine.
# Note that if you're going to try to match "-MANUFACTURER" here (say,
# "-sun"), then you have to tell the case statement up towards the top
# that MANUFACTURER isn't an operating system. Otherwise, code above
# will signal an error saying that MANUFACTURER isn't an operating
# system, and we'll never get to this point.
case $basic_machine in
*-acorn)
os=-riscix1.2
;;
arm*-semi)
os=-aout
;;
pdp11-*)
os=-none
;;
*-dec | vax-*)
os=-ultrix4.2
;;
m68*-apollo)
os=-domain
;;
i386-sun)
os=-sunos4.0.2
;;
m68000-sun)
os=-sunos3
# This also exists in the configure program, but was not the
# default.
# os=-sunos4
;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
sparc-* | *-sun)
os=-sunos4.1.1
;;
*-ibm)
os=-aix
;;
*-hp)
os=-hpux
;;
*-hitachi)
os=-hiux
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
os=-sysv
;;
*-cbm)
os=-amigaos
;;
*-dg)
os=-dgux
;;
*-dolphin)
os=-sysv3
;;
m68k-ccur)
os=-rtu
;;
m88k-omron*)
os=-luna
;;
*-next )
os=-nextstep
;;
*-sequent)
os=-ptx
;;
*-crds)
os=-unos
;;
*-ns)
os=-genix
;;
i370-*)
os=-mvs
;;
*-next)
os=-nextstep3
;;
*-gould)
os=-sysv
;;
*-highlevel)
os=-bsd
;;
*-encore)
os=-bsd
;;
*-sgi)
os=-irix
;;
*-siemens)
os=-sysv4
;;
*-masscomp)
os=-rtu
;;
f301-fujitsu)
os=-uxpv
;;
*)
os=-none
;;
esac
fi
# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer. We pick the logical manufacturer.
vendor=unknown
case $basic_machine in
*-unknown)
case $os in
-riscix*)
vendor=acorn
;;
-sunos*)
vendor=sun
;;
-aix*)
vendor=ibm
;;
-hpux*)
vendor=hp
;;
-hiux*)
vendor=hitachi
;;
-unos*)
vendor=crds
;;
-dgux*)
vendor=dg
;;
-luna*)
vendor=omron
;;
-genix*)
vendor=ns
;;
-mvs*)
vendor=ibm
;;
-ptx*)
vendor=sequent
;;
-vxsim* | -vxworks*)
vendor=wrs
;;
-aux*)
vendor=apple
;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
esac
echo $basic_machine$os

View File

@@ -0,0 +1,46 @@
#! /bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
# find-mozconfig.sh - Loads options from .mozconfig onto configure's
# command-line. The .mozconfig file is searched for in the
# order:
# if $MOZCONFIG is set, use that.
# Otherwise, use $TOPSRCDIR/.mozconfig
# Otherwise, use $HOME/.mozconfig
#
topsrcdir=`cd \`dirname $0\`/../..; pwd`
for _config in $MOZCONFIG \
$MOZ_MYCONFIG \
$topsrcdir/.mozconfig \
$topsrcdir/mozconfig \
$topsrcdir/mozconfig.sh \
$topsrcdir/myconfig.sh \
$HOME/.mozconfig \
$HOME/.mozconfig.sh \
$HOME/.mozmyconfig.sh
do
if test -f $_config; then
echo $_config;
exit 0
fi
done

View File

@@ -0,0 +1,200 @@
# Configure paths for GLIB
# Owen Taylor 97-11-3
dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
dnl gthread is specified in MODULES, pass to glib-config
dnl
AC_DEFUN(AM_PATH_GLIB,
[dnl
dnl Get the cflags and libraries from the glib-config script
dnl
AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
glib_config_prefix="$withval", glib_config_prefix="")
AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX
Exec prefix where GLIB is installed (optional)],
glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
, enable_glibtest=yes)
if test x$glib_config_exec_prefix != x ; then
glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
if test x${GLIB_CONFIG+set} != xset ; then
GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
fi
fi
if test x$glib_config_prefix != x ; then
glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
if test x${GLIB_CONFIG+set} != xset ; then
GLIB_CONFIG=$glib_config_prefix/bin/glib-config
fi
fi
for module in . $4
do
case "$module" in
gmodule)
glib_config_args="$glib_config_args gmodule"
;;
gthread)
glib_config_args="$glib_config_args gthread"
;;
esac
done
dnl Force a version check to keep upgraded versions from being overridden by the cached value.
unset ac_cv_path_GLIB_CONFIG
AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
min_glib_version=ifelse([$1], ,0.99.7,$1)
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
no_glib=""
if test "$GLIB_CONFIG" = "no" ; then
no_glib=yes
else
GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_glibtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$GLIB_LIBS $LIBS"
dnl
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
dnl checks the results of glib-config to some extent
dnl
rm -f conf.glibtest
AC_TRY_RUN([
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.glibtest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_glib_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_glib_version");
exit(1);
}
if ((glib_major_version != $glib_config_major_version) ||
(glib_minor_version != $glib_config_minor_version) ||
(glib_micro_version != $glib_config_micro_version))
{
printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
$glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
glib_major_version, glib_minor_version, glib_micro_version);
printf ("*** was found! If glib-config was correct, then it is best\n");
printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
(glib_minor_version != GLIB_MINOR_VERSION) ||
(glib_micro_version != GLIB_MICRO_VERSION))
{
printf("*** GLIB header files (version %d.%d.%d) do not match\n",
GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
glib_major_version, glib_minor_version, glib_micro_version);
}
else
{
if ((glib_major_version > major) ||
((glib_major_version == major) && (glib_minor_version > minor)) ||
((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
glib_major_version, glib_minor_version, glib_micro_version);
printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the glib-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
printf("*** correct copy of glib-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_glib" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$GLIB_CONFIG" = "no" ; then
echo "*** The glib-config script installed by GLIB could not be found"
echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the GLIB_CONFIG environment variable to the"
echo "*** full path to glib-config."
else
if test -f conf.glibtest ; then
:
else
echo "*** Could not run GLIB test program, checking why..."
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$LIBS $GLIB_LIBS"
AC_TRY_LINK([
#include <glib.h>
#include <stdio.h>
], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GLIB or finding the wrong"
echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
echo "***"
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
echo "*** came with the system with the command"
echo "***"
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GLIB_CFLAGS=""
GLIB_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
rm -f conf.glibtest
])

View File

@@ -0,0 +1,191 @@
# Configure paths for GTK+
# Owen Taylor 97-11-3
# (copy of gtk.m4 (public domain))
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
dnl
AC_DEFUN(AM_PATH_GTK,
[dnl
dnl Get the cflags and libraries from the gtk-config script
dnl
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
gtk_config_prefix="$withval", gtk_config_prefix="")
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX
Exec prefix where GTK is installed (optional)],
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
, enable_gtktest=yes)
if test x$gtk_config_exec_prefix != x ; then
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
if test x${GTK_CONFIG+set} != xset ; then
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
fi
fi
if test x$gtk_config_prefix != x ; then
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
if test x${GTK_CONFIG+set} != xset ; then
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
fi
fi
dnl Force a version check to keep upgraded versions from being overridden by the cached value.
unset ac_cv_path_GTK_CONFIG
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
min_gtk_version=ifelse([$1], ,0.99.7,$1)
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
no_gtk=""
if test "$GTK_CONFIG" = "no" ; then
no_gtk=yes
else
GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_gtktest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
dnl
dnl Now check if the installed GTK is sufficiently new. (Also sanity
dnl checks the results of gtk-config to some extent
dnl
rm -f conf.gtktest
AC_TRY_RUN([
#include <gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.gtktest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_gtk_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_gtk_version");
exit(1);
}
if ((gtk_major_version != $gtk_config_major_version) ||
(gtk_minor_version != $gtk_config_minor_version) ||
(gtk_micro_version != $gtk_config_micro_version))
{
printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
gtk_major_version, gtk_minor_version, gtk_micro_version);
printf ("*** was found! If gtk-config was correct, then it is best\n");
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
(gtk_minor_version != GTK_MINOR_VERSION) ||
(gtk_micro_version != GTK_MICRO_VERSION))
{
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
gtk_major_version, gtk_minor_version, gtk_micro_version);
}
#endif /* defined (GTK_MAJOR_VERSION) ... */
else
{
if ((gtk_major_version > major) ||
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
gtk_major_version, gtk_minor_version, gtk_micro_version);
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
printf("*** correct copy of gtk-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_gtk" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$GTK_CONFIG" = "no" ; then
echo "*** The gtk-config script installed by GTK could not be found."
echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the GTK_CONFIG environment variable to the"
echo "*** full path to gtk-config."
echo "*** GTK+ is available from ftp://ftp.gtk.org/pub/gtk"
else
if test -f conf.gtktest ; then
:
else
echo "*** Could not run GTK test program, checking why..."
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
AC_TRY_LINK([
#include <gtk/gtk.h>
#include <stdio.h>
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GTK or finding the wrong"
echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
echo "***"
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
echo "*** came with the system with the command"
echo "***"
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GTK was incorrectly installed"
echo "*** or that you have moved GTK since it was installed. In the latter case, you"
echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GTK_CFLAGS=""
GTK_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
rm -f conf.gtktest
])

119
mozilla/build/autoconf/install-sh Executable file
View File

@@ -0,0 +1,119 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5; it is not part of GNU.
#
# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
#
# This script is compatible with the BSD install script, but was written
# from scratch.
#
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
instcmd="$mvprog"
chmodcmd=""
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
fi
# Make a temp file name in the proper directory.
dstdir=`dirname $dst`
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp
# and set any options; do chmod last to preserve setuid bits
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
# Now rename the file to the real destination.
$doit $rmcmd $dst
$doit $mvcmd $dsttmp $dst
exit 0

View File

@@ -0,0 +1,198 @@
# Configure paths for LIBIDL
dnl AM_PATH_LIBIDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for LIBIDL, and define LIBIDL_CFLAGS and LIBIDL_LIBS
dnl
AC_DEFUN(AM_PATH_LIBIDL,
[dnl
dnl Get the cflags and libraries from the libIDL-config script
dnl
AC_ARG_WITH(libIDL-prefix,[ --with-libIDL-prefix=PFX
Prefix where libIDL is installed (optional)],
libIDL_config_prefix="$withval", libIDL_config_prefix="")
AC_ARG_WITH(libIDL-exec-prefix,[ --with-libIDL-exec-prefix=PFX
Exec prefix where libIDL is installed (optional)],
libIDL_config_exec_prefix="$withval", libIDL_config_exec_prefix="")
AC_ARG_ENABLE(libIDLtest, [ --disable-libIDLtest Do not try to compile and run a test libIDL program],
, enable_libIDLtest=yes)
if test x$libIDL_config_exec_prefix != x ; then
libIDL_config_args="$libIDL_config_args --exec-prefix=$libIDL_config_exec_prefix"
if test x${LIBIDL_CONFIG+set} != xset ; then
LIBIDL_CONFIG=$libIDL_config_exec_prefix/bin/libIDL-config
fi
fi
if test x$libIDL_config_prefix != x ; then
libIDL_config_args="$libIDL_config_args --prefix=$libIDL_config_prefix"
if test x${LIBIDL_CONFIG+set} != xset ; then
LIBIDL_CONFIG=$libIDL_config_prefix/bin/libIDL-config
fi
fi
AM_PATH_GLIB(1.2.0)
dnl Force a version check to keep upgraded versions from being overridden by the cached value.
unset ac_cv_path_LIBIDL_CONFIG
AC_PATH_PROG(LIBIDL_CONFIG, libIDL-config, no)
min_libIDL_version=ifelse([$1], ,0.6.0,$1)
AC_MSG_CHECKING(for libIDL - version >= $min_libIDL_version)
no_libIDL=""
if test "$LIBIDL_CONFIG" = "no" ; then
no_libIDL=yes
else
LIBIDL_CFLAGS=`$LIBIDL_CONFIG $libIDL_config_args --cflags`
LIBIDL_LIBS=`$LIBIDL_CONFIG $libIDL_config_args --libs`
# hack to allow us to keep using libIDL 0.6.3-0.6.7. Anyone may remove
# this after we start requiring libIDL 0.6.8 or anything higher
LIBIDL_CFLAGS="$GLIB_CFLAGS $LIBIDL_CFLAGS"
LIBIDL_LIBS="$GLIB_LIBS $LIBIDL_LIBS"
libIDL_config_major_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
libIDL_config_minor_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
libIDL_config_micro_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_libIDLtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $LIBIDL_CFLAGS"
LIBS="$LIBIDL_LIBS $LIBS"
dnl
dnl Now check if the installed LIBIDL is sufficiently new.
dnl
rm -f conf.libIDLtest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <libIDL/IDL.h>
int
main ()
{
int major, minor, micro;
int libIDL_major_version;
int libIDL_minor_version;
int libIDL_micro_version;
char *tmp_version;
system ("touch conf.libIDLtest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup ("$min_libIDL_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_libIDL_version");
exit(1);
}
tmp_version = g_strdup (IDL_get_libver_string ());
if (sscanf(tmp_version, "%d.%d.%d",
&libIDL_major_version,
&libIDL_minor_version,
&libIDL_micro_version) != 3) {
printf("%s, bad version string\n", tmp_version);
exit(1);
}
if ((libIDL_major_version != $libIDL_config_major_version) ||
(libIDL_minor_version != $libIDL_config_minor_version) ||
(libIDL_micro_version != $libIDL_config_micro_version))
{
printf("\n*** 'libIDL-config --version' returned %d.%d.%d, but libIDL (%d.%d.%d)\n",
$libIDL_config_major_version, $libIDL_config_minor_version, $libIDL_config_micro_version,
libIDL_major_version, libIDL_minor_version, libIDL_micro_version);
printf ("*** was found! If libIDL-config was correct, then it is best\n");
printf ("*** to remove the old version of LIBIDL. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If libIDL-config was wrong, set the environment variable LIBIDL_CONFIG\n");
printf("*** to point to the correct copy of libIDL-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}
else if ((libIDL_major_version != LIBIDL_MAJOR_VERSION) ||
(libIDL_minor_version != LIBIDL_MINOR_VERSION) ||
(libIDL_micro_version != LIBIDL_MICRO_VERSION))
{
printf("\n*** libIDL header files (version %d.%d.%d) do not match\n",
LIBIDL_MAJOR_VERSION, LIBIDL_MINOR_VERSION, LIBIDL_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
libIDL_major_version, libIDL_minor_version, libIDL_micro_version);
}
else
{
if ((libIDL_major_version > major) ||
((libIDL_major_version == major) && (libIDL_minor_version > minor)) ||
((libIDL_major_version == major) && (libIDL_minor_version == minor) && (libIDL_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of libIDL (%d.%d.%d) was found.\n",
libIDL_major_version, libIDL_minor_version, libIDL_micro_version);
printf("*** You need at least libIDL version %d.%d.%d.\n",
major, minor, micro);
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the libIDL-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of libIDL, but you can also set the LIBIDL_CONFIG environment to point to the\n");
printf("*** correct copy of libIDL-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_libIDL=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_libIDL" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$LIBIDL_CONFIG" = "no" ; then
echo "*** The libIDL-config script installed by libIDL could not be found"
echo "*** If libIDL was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the LIBIDL_CONFIG environment variable to the"
echo "*** full path to libIDL-config."
else
if test -f conf.libIDLtest ; then
:
else
echo "*** Could not run libIDL test program, checking why..."
CFLAGS="$CFLAGS $LIBIDL_CFLAGS"
LIBS="$LIBS $LIBIDL_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <stdlib.h>
#include <libIDL/IDL.h>
], [ return IDL_get_libver_string ? 1 : 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding libIDL or finding the wrong"
echo "*** version of LIBIDL. If it is not finding libIDL, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means libIDL was incorrectly installed"
echo "*** or that you have moved libIDL since it was installed. In the latter case, you"
echo "*** may want to edit the libIDL-config script: $LIBIDL_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
LIBIDL_CFLAGS=""
LIBIDL_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(LIBIDL_CFLAGS)
AC_SUBST(LIBIDL_LIBS)
rm -f conf.libIDLtest
])

View File

@@ -0,0 +1,102 @@
# sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
# load-mozconfig.sh - Loads options from .mozconfig onto configure's
# command-line. See find-mozconfig.sh for how the config file is
# found
#
# The options from .mozconfig are inserted into the command-line
# before the real command-line options. This way the real options
# will override any .mozconfig options.
#
# .mozconfig is a shell script. To add an option to configure's
# command-line use the pre-defined function, ac_add_options,
#
# ac_add_options <configure-option> [<configure-option> ... ]
#
# For example,
#
# ac_add_options --with-pthreads --enable-debug
#
# ac_add_options can be called multiple times in .mozconfig.
# Each call adds more options to configure's command-line.
#
# Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
ac_add_options() {
for _opt
do
# Escape shell characters, space, tab, dollar, quote, backslash.
_opt=`echo $_opt | sed -e 's/\([\ \ \$\"\\]\)/\\\\\1/g;s/@\([^@]*\)@/\$\1/g;'`
_opt=`echo $_opt | sed -e 's/@\([^@]*\)@/\$(\1)/g'`
# Avoid adding duplicates
case "$ac_options" in
*"$_opt"* ) ;;
* ) mozconfig_ac_options="$mozconfig_ac_options $_opt" ;;
esac
done
}
mk_add_options() {
# These options are for client.mk
# configure can safely ignore them.
:
}
ac_echo_options() {
echo "Adding options from $MOZCONFIG:"
eval "set -- $mozconfig_ac_options"
for _opt
do
echo " $_opt"
done
}
#
# Define load the options
#
ac_options=
mozconfig_ac_options=
# Save the real command-line options
for _opt
do
# Escape shell characters, space, tab, dollar, quote, backslash.
_opt=`echo $_opt | sed -e 's/\([\ \ \$\"\\]\)/\\\\\1/g;'`
ac_options="$ac_options \"$_opt\""
done
# Call find-mozconfig.sh
# In params: $MOZCONFIG $HOME (old:$MOZ_MYCONFIG)
_topsrcdir=`dirname $0`
MOZCONFIG=`$_topsrcdir/build/autoconf/find-mozconfig.sh`
if [ "$MOZCONFIG" ]; then
. $MOZCONFIG
ac_echo_options 1>&2
fi
eval "set -- $mozconfig_ac_options $ac_options"

View File

@@ -0,0 +1,267 @@
#! /usr/bin/env perl
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
# make-makefiles - Quickly create Makefiles for subdirectories.
# Also, creates any needed subdirectories.
#
# usage: make-makefiles [ -d <depth> ] [ <subdir> | <subdir>/Makefile ] ...
# Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
#$debug = 1;
# Determine various tree path variables
#
($depth, @makefiles) = parse_arguments(@ARGV);
$object_fullpath = `pwd`;
chdir $depth;
$object_root = `pwd`;
chomp $object_fullpath;
chomp $object_root;
# $source_subdir is the path from the object root to where
# 'make-makefile' was called. For example, if make-makefile was
# called from "mozilla/gfx/src", then $source_subdir would be
# "gfx/src/".
$source_subdir = "$object_fullpath/";
$source_subdir =~ s|^$object_root/||;
# Prefix makefiles with $source_subdir so that paths
# will be relative to the top of the object tree.
#
for $makefile (@makefiles) {
$makefile = "$source_subdir$makefile";
}
create_directories(@makefiles);
# Find the path to the source directory based on how 'make-makefile'
# was invoked. The path is either relative to the object directory
# or an absolute path.
$given_srcdir = find_srcdir($0, $depth);
if ($debug) {
warn "object_fullpath = $object_fullpath\n";
warn "object_root = $object_root\n";
warn "source_subdir = $source_subdir\n";
warn "makefiles = @makefiles\n";
warn "given_srcdir = $given_srcdir\n";
}
@unhandled = update_makefiles($given_srcdir, @makefiles);
run_config_status(@unhandled);
# end of Main
############################################################
sub dirname {
return $_[0] =~ /(.*)\/.*/ ? "$1" : '.';
}
# find_depth: Pull the value of DEPTH out of a Makefile (or Makefile.in)
sub find_depth {
my $depth = '';
open(MAKEFILE, "<$_[0]") || die "Unable to open $_[0]: $!\n";
while (<MAKEFILE>) {
next unless /^DEPTH\s*=\s*(\..*)/;
$depth = $1;
last;
}
close MAKEFILE;
return $depth;
}
sub parse_arguments {
my @args = @_;
my $depth = '';
my @makefiles = ();
if ($args[0] eq '-d') {
$depth = $args[1];
shift @args;
shift @args;
} else {
# Use $(DEPTH) in the Makefile or Makefile.in to determine the depth
if (-e "Makefile.in") {
$depth = find_depth("Makefile.in");
} elsif (-e "Makefile") {
$depth = find_depth("Makefile");
} elsif (-e "../Makefile") {
$depth = "../".find_depth("../Makefile");
$depth =~ s/\/\.$//;
} else {
warn "Unable to determine depth (e.g. ../..) to root of objdir tree.\n";
die "No Makefile(.in) present. Try running with '-d <depth>'\n";
}
}
# Build the list of makefiles to generate
#
@makefiles = ();
my $makefile;
foreach $makefile (@args) {
$makefile =~ s/\.in$//;
$makefile =~ s/\/$//;
$makefile =~ /Makefile$/ or $makefile .= "/Makefile";
push @makefiles, "$makefile";
}
@makefiles = "Makefile" unless @args;
return ($depth, @makefiles);
}
# Create all the directories at once.
# This can be much faster than calling mkdir() for each one.
sub create_directories {
my @makefiles = @_;
my @dirs = ();
my $ac_file;
foreach $ac_file (@makefiles) {
push @dirs, dirname($ac_file);
}
# Call mkdir with the directories sorted by subdir count (how many /'s)
system "mkdir -p ". join(' ', @dirs) if @dirs;
}
# Find the top of the source directory
# (Assuming that the executable is in $top_srcdir/build/autoconf)
sub find_srcdir {
my ($program_name, $depth) = @_;
my $ac_given_srcdir = $program_name;
$ac_given_srcdir =~ s|/?build/autoconf/.*$||;
if ($debug) {
print "ac_given_srcdir = $ac_given_srcdir\n";
print "depth = $depth\n";
}
if ($ac_given_srcdir =~ /^\./ and $depth ne '.') {
my $quoted_depth = quotemeta($depth);
$ac_given_srcdir =~ s|^$quoted_depth/?||;
}
if ($debug) {
print "ac_given_srcdir = $ac_given_srcdir\n";
}
$ac_given_srcdir = '.' if $ac_given_srcdir eq '';
return $ac_given_srcdir;
}
# Output the makefiles.
#
sub update_makefiles {
my ($ac_given_srcdir, @makefiles) = @_;
my @unhandled=();
my $ac_file;
foreach $ac_file (@makefiles) {
my $ac_file_in = "$ac_given_srcdir/${ac_file}.in";
my $ac_dir = dirname($ac_file);
my $ac_dots = '';
my $ac_dir_suffix = '';
my $srcdir = '.';
my $top_srcdir = '.';
# Determine $srcdir and $top_srcdir
#
if ($ac_dir ne '.') {
$ac_dir_suffix = "/$ac_dir";
$ac_dir_suffix =~ s%^/\./%/%;
$ac_dots = $ac_dir_suffix;
$ac_dots =~ s%/[^/]*%../%g;
}
if ($ac_given_srcdir eq '.') {
if ($ac_dots ne '') {
$top_srcdir = $ac_dots;
$top_srcdir =~ s%/$%%;
}
} elsif ($ac_given_srcdir =~ m%^/%) {
$srcdir = "$ac_given_srcdir$ac_dir_suffix";
$top_srcdir = "$ac_given_srcdir";
} else {
$srcdir = "$ac_dots$ac_given_srcdir$ac_dir_suffix";
$top_srcdir = "$ac_dots$ac_given_srcdir";
}
if ($debug) {
print "ac_dir = $ac_dir\n";
print "ac_file = $ac_file\n";
print "ac_file_in = $ac_file_in\n";
print "srcdir = $srcdir\n";
print "top_srcdir = $top_srcdir\n";
print "cwd = " . `pwd` . "\n";
}
# Copy the file and make substitutions.
# @srcdir@ -> value of $srcdir
# @top_srcdir@ -> value of $top_srcdir
#
if (-e $ac_file) {
next if -M _ < -M $ac_file_in; # Next if Makefile is up-to-date.
warn "updating $ac_file\n";
} else {
warn "creating $ac_file\n";
}
open INFILE, "<$ac_file_in" or do {
warn "$0: Cannot read $ac_file_in: No such file or directory\n";
next;
};
open OUTFILE, ">$ac_file" or do {
warn "$0: Unable to create $ac_file\n";
next;
};
while (<INFILE>) {
if (/\@[_a-zA-Z]*\@.*\@[_a-zA-Z]*\@/) {
#warn "Two defines on a line:$ac_file:$.:$_";
push @unhandled, $ac_file;
last;
}
s/\@srcdir\@/$srcdir/;
s/\@top_srcdir\@/$top_srcdir/;
if (/\@[_a-zA-Z]*\@/) {
#warn "Unknown variable:$ac_file:$.:$_";
push @unhandled, $ac_file;
last;
}
print OUTFILE;
}
close INFILE;
close OUTFILE;
}
return @unhandled;
}
sub run_config_status {
my @unhandled = @_;
# Run config.status with any unhandled files.
#
if (@unhandled) {
$ENV{CONFIG_FILES}= join ' ', @unhandled;
system "./config.status";
}
}

View File

@@ -0,0 +1,85 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
#
# This script will match a dir with a set of dirs.
#
# Usage: match-dir.sh match [dir1 dir2 ... dirn]
#
# Send comments, improvements, bugs to ramiro@netscape.com
#
if [ -f Makefile ]; then
MAKEFILE="Makefile"
else
if [ -f Makefile.in ]; then
MAKEFILE="Makefile.in"
else
echo
echo "There ain't no 'Makefile' or 'Makefile.in' over here: $pwd, dude."
echo
exit 1
fi
fi
# Use DEPTH in the Makefile.in to determine the depth
depth=`grep -w DEPTH ${MAKEFILE} | grep "\.\." | awk -F"=" '{ print $2; }'`
cwd=`pwd`
# Determine the depth count
n=`echo $depth | tr '/' ' ' | wc -w`
cd $depth
objdir=`pwd`
path=`echo $cwd | sed "s|^${objdir}/||"`
match=$path
for i in $*
do
# echo "Looking for $match in $i"
echo $i | grep -q -x $match
if [ $? -eq 0 ]
then
echo "1"
exit 0
fi
# echo "Looking for $i in $match"
echo $match | grep -q $i
if [ $? -eq 0 ]
then
echo "1"
exit 0
fi
done
echo "0"
exit 0

View File

@@ -0,0 +1,83 @@
#! /bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
# mozconfig2defs.sh - Translates .mozconfig into options for client.mk.
# Prints defines to stdout.
#
# See load-mozconfig.sh for more details
#
# Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
print_header() {
echo "# gmake"
echo "# This file is automatically generated for client.mk."
echo "# Do not edit. Edit $MOZCONFIG instead."
echo
}
ac_add_options() {
echo "# $* is not used by client.mk"
}
mk_add_options() {
for _opt
do
# Escape shell characters, space, tab, dollar, quote, backslash,
# and substitute '@<word>@' with '$(<word>)'.
echo $_opt | sed -e 's/\([\"\\]\)/\\\1/g; s/@\([^@]*\)@/\$(\1)/g;'
done
}
#
# main
#
out_file=$1
tmp_file="$out_file-tmp$$"
trap "rm -f $tmp_file; exit 1" 1 2 15
# find-mozconfig.sh
# In params: $MOZCONFIG $HOME ($MOZ_MYCONFIG)
scriptdir=`dirname $0`
find_mozconfig="$scriptdir/find-mozconfig.sh"
if [ ! -f $find_mozconfig ]
then
(cd $scriptdir/../../..; cvs co mozilla/build/autoconf/find-mozconfig.sh)
fi
MOZCONFIG=`$find_mozconfig`
print_header > $tmp_file
# If the path changes, configure should be rerun
echo "# PATH=$PATH" >> $tmp_file
if [ "$MOZCONFIG" ]
then
. $MOZCONFIG >> $tmp_file
fi
if cmp -s $tmp_file $out_file; then
rm $tmp_file
else
mv -f $tmp_file $out_file
fi

View File

@@ -0,0 +1,75 @@
#! /bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
# mozconfig2defs.sh - Translates .mozconfig into options for client.mk.
# Prints defines to stdout.
#
# See load-mozconfig.sh for more details
#
# Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
ac_add_options() {
for _opt
do
# Escape special url characters
_opt=`echo $_opt | sed -e 's/%/%25/g;s/ /%20/g;s/&/%26/g;'`
case "$_opt" in
--*-*= ) query_string="$query_string$_opt&" ;;
--*-* ) query_string="$query_string$_opt=yes&" ;;
esac
done
}
mk_add_options() {
for _opt
do
# Escape special url characters
# Escape special url characters
_opt=`echo $_opt | sed -e 's/%/%25/g;s/ /%20/g;s/&/%26/g;'`
query_string="$query_string$_opt&"
done
}
#
# main
#
# find-mozconfig.sh
# In params: $MOZCONFIG $HOME ($MOZ_MYCONFIG)
scriptdir=`dirname $0`
find_mozconfig="$scriptdir/find-mozconfig.sh"
if [ ! -f $find_mozconfig ]
then
(cd $scriptdir/../../..; cvs co mozilla/build/autoconf/find-mozconfig.sh)
fi
MOZCONFIG=`$find_mozconfig`
if [ "$MOZCONFIG" ]
then
query_string="?"
. $MOZCONFIG
# Drop the last character of $query_string
echo `expr "$query_string" : "\(.*\)."`
fi

View File

@@ -0,0 +1,63 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
#
# This script will print the depth path for a mozilla directory based
# on the info in Makefile
#
# Its a hack. Its brute force. Its horrible.
# It dont use Artificial Intelligence. It dont use Virtual Reality.
# Its not perl. Its not python. But it works.
#
# Usage: print-depth-path.sh
#
# Send comments, improvements, bugs to ramiro@netscape.com
#
# Make sure a Makefile exists
if [ ! -f Makefile ]
then
echo
echo "There ain't no 'Makefile' over here: $pwd, dude."
echo
exit
fi
# Use DEPTH in the Makefile to determine the depth
depth=`grep -w DEPTH Makefile | grep "\.\." | awk -F"=" '{ print $2; }'`
# Determine the depth count
n=`echo $depth | tr '/' ' ' | wc -w`
# Determine the path (strip anything before the mozilla/ root)
path=`pwd | awk -v count=$n -F"/" '\
{ for(i=NF-count+0; i <= NF ; i++) \
{ \
if (i!=NF) \
{ printf "%s/", $i } \
else \
{ printf "%s", $i } \
} \
}'`
echo $path

View File

@@ -0,0 +1,102 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
#
# This script will generate a single Makefile from a Makefile.in using
# the config.status script.
#
# The config.status script is generated the first time you run
# ./configure.
#
#
# Usage: update-makefile.sh
#
# Send comments, improvements, bugs to ramiro@netscape.com
#
update_makefile_usage() {
_progname=`expr //$0 : '.*/\(.*\)'`
cat <<END_USAGE 2>&1
Usage: $_progname [-h -u] [<keyword>]
-d <dir> Subdir to update
-h Print usage
END_USAGE
}
# Parse the command-line options
#
subdir=
while getopts d:h OPT; do
case $OPT in
d) # Make sure "subdir" has exactly one ending slash
subdir=`echo $OPTARG | sed 's/\/$//;'`"/" ;;
\?|h) update_makefile_usage
exit 1
;;
esac
done
# find_depth: Pull the value of DEPTH out of Makefile (or Makefile.in)
find_depth() {
egrep '^DEPTH[ ]*=[ ]*\.' $1 | awk -F= '{ print $2; }'
}
# The Makefile to create
target_makefile=`pwd`"/${subdir}Makefile"
# Use $(DEPTH) in the Makefile or Makefile.in to determine the depth
if [ -f Makefile.in ]
then
depth=`find_depth Makefile.in`
elif [ -f Makefile ]
then
depth=`find_depth Makefile`
elif [ -f ../Makefile ]
then
depth="../"`find_depth Makefile`
else
echo
echo "There ain't no 'Makefile' or 'Makefile.in' over here: $pwd"
echo
exit
fi
# 'cd' to the root of the tree to run "config.status" there
cd $depth
# Strip the tree root off the Makefile's path
#
root_path=`pwd`
target_makefile=`expr $target_makefile : $root_path'/\(.*\)'`
# Make sure config.status exists
#
if [ -f config.status ]
then
CONFIG_FILES=$target_makefile ./config.status
else
echo
echo "There ain't no 'config.status' over here: $pwd"
echo
fi

View File

@@ -0,0 +1,3 @@
http://www.mozilla.org
res:///res/samples/test2.html
res:///res/samples/test8.html

View File

@@ -0,0 +1 @@
98091517

29
mozilla/build/genrc.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DATATYPE="$1"
INFILE="$2"
echo "${DATATYPE} RCDATA"
sed 's/"/""/g' ${INFILE} | awk 'BEGIN { printf("BEGIN\n") } { printf("\"%s\\r\\n\",\n", $0) } END { printf("\"\\0\"\nEND\n") }'
exit 0

95
mozilla/build/hcc Executable file
View File

@@ -0,0 +1,95 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
#
# Fix brain-damaged compilers that don't understand -o and -c together
#
CC=`echo $1 | sed -e "s|'||g" -e 's|"||g'`
shift
DASH_C=0
DASH_O=0
DUMMY="XxxXxxX"
GET_OBJECT=0
OBJ="${DUMMY}"
OBJECT="${DUMMY}"
for i in $*
do
[ "${CHECK_O}" = yes ] && {
case $i in
./*/*.o) OBJECT="$i"
OPTS="${OPTS} -o"
DASH_O=1
;;
./*.o) OBJECT="`basename $i`"
i=""
DASH_O=1
;;
*.o) if [ $i = `basename $i` ]
then
OBJECT="$i"
i=""
else
OPTS="${OPTS} -o"
fi
DASH_O=1
;;
*) OPTS="${OPTS} -o $i"
DASH_O=1
i=""
;;
esac
CHECK_O=no
}
case $i in
-c) DASH_C=1
OPTS="${OPTS} -c"
;;
-o) CHECK_O=yes
;;
*.c) C_SRC=$i
OPTS="${OPTS} $i"
# cc always creates the .o from the .c name
OBJ=`basename $C_SRC .c`.o
;;
*.s) S_SRC=$i
OPTS="${OPTS} $i"
# or the .o from the .s name
OBJ=`basename $S_SRC .s`.o
;;
*.o) OBJECT=$i
OPTS="${OPTS} $i"
;;
*) OPTS="${OPTS} $i"
;;
esac
done
${CC} ${OPTS} || exit $?
# if there was no -c and -o we're done
[ $DASH_C = 1 -a $DASH_O = 1 ] || exit 0
# if $OBJ and $OBJECT are the same we're done
[ $OBJ = $OBJECT ] && exit 0
[ -f $OBJ ] && mv -f $OBJ $OBJECT

139
mozilla/build/hcpp Executable file
View File

@@ -0,0 +1,139 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
#
# Wrapper for brain-damaged compilers that don't understand -o and -c together.
#
CXX=`echo $1 | sed -e "s|'||g" -e 's|"||g'`
shift
DUMMY="XxxXxxX"
DASH_C=0
DASH_O=0
GET_OBJECT=0
C_SRC="${DUMMY}"
CC_SRC="${DUMMY}"
CPP_SRC="${DUMMY}"
S_SRC="${DUMMY}"
OBJECT="${DUMMY}"
NEW_i="${DUMMY}"
PLATFORM=`uname -s`
for i in $*
do
[ ${GET_OBJECT} -eq 1 ] && {
case $i in
./*/*.o) OBJECT="$i"
OPTS="${OPTS} -o"
DASH_O=1
;;
./*.o) OBJECT="`basename $i`"
i=""
DASH_O=1
;;
*.o) if [ $i = `basename $i` ]
then
i=""
else
OPTS="${OPTS} -o"
DASH_O=1
fi
;;
*) OPTS="${OPTS} -o $i"
DASH_O=1
i=""
;;
esac
GET_OBJECT=0
}
case $i in
-c)
DASH_C=1
OPTS="${OPTS} -c"
;;
-o)
GET_OBJECT=1
;;
*.c)
C_SRC="$i"
OPTS="${OPTS} $i"
# cc always creates the .o from the .c name
OBJ=`basename ${C_SRC} .c`.o
;;
+.*)
OPTS="${OPTS} $i"
;;
*.cpp)
CPP_SRC="$i"
if [ "${PLATFORM}" = "SCO_SV" ]; then
OPTS="${OPTS} +.cpp $i"
elif [ "${PLATFORM}" = "IRIX" ]; then
NEW_i=`basename ${CPP_SRC} .cpp`.C
rm -f ${NEW_i}
cp $i ${NEW_i}
OPTS="${OPTS} ${NEW_i}"
else
OPTS="${OPTS} $i"
fi
# cc always creates the .o from the .cpp name
OBJ=`basename ${CPP_SRC} .cpp`.o
;;
*.cc)
CC_SRC="$i"
OPTS="${OPTS} $i"
# cc always creates the .o from the .cc name
OBJ=`basename ${CC_SRC} .cc`.o
;;
*.s)
S_SRC="$i"
OPTS="${OPTS} $i"
# cc always creates the .o from the .s name
OBJ=`basename ${S_SRC} .s`.o
;;
*.o) OBJECT=$i
OPTS="${OPTS} $i"
;;
*) OPTS="${OPTS} $i"
;;
esac
done
${CXX} ${OPTS} || exit $?
rm -f ${NEW_i}
# Really only needed for NSPR now.
if [ "${PLATFORM}" = "IRIX" -a "$OBJ" != "$OBJECT" ]; then
OBJ=$OBJECT
fi
# LAME!!!
if [ -f -O ]; then
mv -f -- -O ${OBJECT}
fi
# if there was no -c and -o we're done
[ ${DASH_C} -eq 1 -a ${DASH_O} -eq 1 ] || exit 0
# if $OBJ and $OBJECT are the same we're done
[ $OBJ = $OBJECT ] && exit 0
[ -f $OBJ ] && mv -f $OBJ $OBJECT

View File

@@ -0,0 +1,182 @@
#!perl
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
#
# build script (optimized)
#
use Mac::Processes;
use NGLayoutBuildList;
use Cwd;
use Moz;
#-----------------------------------------------
# configuration variables that globally affect what is built
#-----------------------------------------------
$DEBUG = 0;
$CARBON = 0; # turn on to build with TARGET_CARBON
$NECKO = 1;
$MOZ_FULLCIRCLE = 0;
$PROFILE = 0;
$GC_LEAK_DETECTOR = 0; # turn on to use GC leak detection
$pull{all} = 0;
$pull{lizard} = 0;
$pull{xpcom} = 0;
$pull{imglib} = 0;
$pull{netlib} = 0;
$pull{nglayout} = 0;
$pull{mac} = 0;
$build{all} = 1; # turn off to do individual builds, or to do "most"
$build{most} = 0; # turn off to do individual builds
$build{dist} = 0;
$build{dist_runtime} = 0; # implied by $build{dist}
$build{idl} = 0;
$build{xpidl} = 0;
$build{resources} = 0;
$build{stubs} = 0;
$build{runtime} = 0;
$build{common} = 0;
$build{imglib} = 0;
$build{necko} = 0;
$build{browserutils} = 0;
$build{intl} = 0;
$build{nglayout} = 0;
$build{editor} = 0;
$build{viewer} = 0;
$build{xpapp} = 0;
$build{extensions} = 0;
$build{mailnews} = 0;
$build{apprunner} = 0;
#-----------------------------------------------
# configuration variables that affect the manner
# of building, but possibly affecting
# the outcome.
#-----------------------------------------------
$ALIAS_SYM_FILES = $DEBUG;
$CLOBBER_LIBS = 1; # turn on to clobber existing libs and .xSYM files before
# building each project
# The following two options will delete all dist files (if you have $build{dist} turned on),
# but leave the directory structure intact.
$CLOBBER_DIST_ALL = 1; # turn on to clobber all aliases/files inside dist (headers/xsym/libs)
$CLOBBER_DIST_LIBS = 0; # turn on to clobber only aliases/files for libraries/sym files in dist
$CLOBBER_IDL_PROJECTS = 0; # turn on to clobber all IDL projects.
#-----------------------------------------------
# configuration variables that are preferences for the build style,
# and do not affect what is built.
#-----------------------------------------------
$CodeWarriorLib::CLOSE_PROJECTS_FIRST
= 0;
# 1 = close then make (for development),
# 0 = make then close (for tinderbox).
$USE_TIMESTAMPED_LOGS = 0;
#-----------------------------------------------
# END OF CONFIG SWITCHES
#-----------------------------------------------
if ($pull{all})
{
foreach $k (keys(%pull))
{
$pull{$k} = 1;
}
}
if ($build{all})
{
foreach $k (keys(%build))
{
$build{$k} = 1;
}
}
if ($build{most})
{
### Just uncomment/comment to get the ones you want (if "most" is selected).
# $build{dist} = 0;
# $build{dist_runtime} = 0; # Implied by $build{dist}
# $build{resources} = 0;
# $build{xpidl} = 0;
# $build{idl} = 0;
# $build{stubs} = 0;
# $build{runtime} = 1;
# $build{common} = 1;
# $build{imglib} = 1;
# $build{necko} = 1;
# $build{browserutils} = 1;
# $build{intl} = 1;
# $build{nglayout} = 1;
# $build{editor} = 1;
# $build{viewer} = 1;
# $build{xpapp} = 1;
# $build{extensions} = 1;
# $build{mailnews} = 1;
# $build{apprunner} = 1;
}
# do the work
# you should not have to edit anything below
chdir("::::");
$MOZ_SRC = cwd();
if ($MOZ_FULLCIRCLE)
{
#// Get the Build Number for the Master.ini(Full Circle) n'stuff
$buildnum = Moz::SetBuildNumber();
}
if ($USE_TIMESTAMPED_LOGS)
{
#Use time-stamped names so that you don't clobber your previous log file!
my $now = localtime();
while ($now =~ s@:@.@) {} # replace all colons by periods
my $logdir = ":Build Logs:";
if (!stat($logdir))
{
print "Creating directory $logdir\n";
mkdir $logdir, 0777 || die "Couldn't create directory $logdir";
}
OpenErrorLog("$logdir$now");
}
else
{
OpenErrorLog("NGLayoutBuildLog"); # Release build requires that name
#OpenErrorLog("Mozilla.BuildLog"); # Tinderbox requires that name
}
Moz::StopForErrors();
#Moz::DontStopForErrors();
if ($pull{all}) {
Checkout();
}
SetBuildNumber();
chdir($MOZ_SRC);
BuildDist();
chdir($MOZ_SRC);
BuildProjects();
print "Build complete\n";

View File

@@ -0,0 +1,213 @@
#!perl
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
#
# build script (debug)
#
use Mac::Processes;
use NGLayoutBuildList;
use Cwd;
use Moz;
#-----------------------------------------------
# configuration variables that globally affect what is built
#-----------------------------------------------
$BUILD_ROOT = ":";
# $BUILD_ROOT = ":", the default, with $build{all}
# builds the whole tree. Leaving $BUILD_ROOT undefined
# will also have this effect.
#
# $BUILD_ROOT = ":mozilla:mailnews:" with $build{all}
# will "make everything in the mailnews directory".
#
# This is equivalent to the unix commands:
# cd mozilla/mailnews
# gmake
# or the windows commands:
# cd mozilla\mailnews
# nmake -f makefile.win
#
# In conjunction with build{all}, this will carry out
# all build phases (export, build, install...), but only
# using files inside $BUILD_ROOT. Replace $build{all}
# with specific component flags to build stuff from
# those components that happens to live inside
# $BUILD_ROOT.
#
# ":", and ":mozilla:" both have the same effect, because
# this works by checking that path strings begin with
# $BUILD_ROOT.
#
# $BUILD_ROOT affects only the build phase, not the pull
# phase. There is still no scriptable way to update-and-build
# a specific directory. In particular, $pull{all} will
# still pull the whole tree, irrespective of the
# setting of $BUILD_ROOT. To update and build a particular
# directory, use MacCVS Pro to update the directory,
# then turn off all $pull variables, and set $BUILD_ROOT.
$DEBUG = 1;
$CARBON = 0; # Turn on to build with TARGET_CARBON
$MOZ_FULLCIRCLE = 0;
$PROFILE = 0;
$GC_LEAK_DETECTOR = 0; # turn on to use GC leak detection
$pull{all} = 0;
$pull{lizard} = 0;
$pull{xpcom} = 0;
$pull{imglib} = 0;
$pull{netlib} = 0;
$pull{nglayout} = 0;
$pull{mac} = 0;
$build{all} = 1; # Turn off to do individual builds, or to do "most"
$build{most} = 0; # Turn off to do individual builds
$build{dist} = 0;
$build{dist_runtime} = 0; # Implied by $build{dist}
$build{resources} = 0;
$build{xpidl} = 0;
$build{idl} = 0;
$build{stubs} = 0;
$build{runtime} = 1;
$build{common} = 1;
$build{imglib} = 1;
$build{necko} = 1;
$build{browserutils} = 1;
$build{intl} = 1;
$build{nglayout} = 1;
$build{editor} = 1;
$build{viewer} = 1;
$build{xpapp} = 1;
$build{extensions} = 1;
$build{mailnews} = 1;
$build{apprunner} = 1;
#-----------------------------------------------
# configuration variables that affect the manner
# of building, but possibly affecting
# the outcome.
#-----------------------------------------------
$ALIAS_SYM_FILES = $DEBUG;
$CLOBBER_LIBS = 1; # turn on to clobber existing libs and .xSYM files before
# building each project
# The following two options will delete all dist files (if you have $build{dist} turned on),
# but leave the directory structure intact.
$CLOBBER_DIST_ALL = 1; # turn on to clobber all aliases/files inside dist (headers/xsym/libs)
$CLOBBER_DIST_LIBS = 0; # turn on to clobber only aliases/files for libraries/sym files in dist
$CLOBBER_IDL_PROJECTS = 0; # turn on to clobber all IDL projects.
#-----------------------------------------------
# configuration variables that are preferences for the build style,
# and do not affect what is built.
#-----------------------------------------------
$CodeWarriorLib::CLOSE_PROJECTS_FIRST
= 1;
# 1 = close then make (for development),
# 0 = make then close (for tinderbox).
$USE_TIMESTAMPED_LOGS = 1;
#-----------------------------------------------
# END OF CONFIG SWITCHES
#-----------------------------------------------
if ($pull{all})
{
foreach $k (keys(%pull))
{
$pull{$k} = 1;
}
}
if ($build{all})
{
foreach $k (keys(%build))
{
$build{$k} = 1;
}
}
if ($build{most})
{
### Just uncomment/comment to get the ones you want (if "most" is selected).
# $build{dist} = 1;
# $build{dist_runtime}= 1;
# $build{resources} = 1;
$build{xpidl} = 1; # build idl compiler
$build{idl} = 1;
$build{stubs} = 1;
$build{runtime} = 1;
$build{common} = 1;
$build{imglib} = 1;
$build{necko} = 1;
$build{browserutils} = 1;
$build{intl} = 1;
$build{nglayout} = 1;
$build{editor} = 1;
$build{viewer} = 1;
$build{xpapp} = 1;
$build{extensions} = 1;
$build{mailnews} = 1;
$build{apprunner} = 1;
}
# do the work
# you should not have to edit anything below
chdir("::::");
$MOZ_SRC = cwd();
if ($MOZ_FULLCIRCLE)
{
#// Get the Build Number for the Master.ini(Full Circle) n'stuff
$buildnum = Moz::SetBuildNumber();
}
if ($USE_TIMESTAMPED_LOGS)
{
#Use time-stamped names so that you don't clobber your previous log file!
my $now = localtime();
while ($now =~ s@:@.@) {} # replace all colons by periods
my $logdir = ":Build Logs:";
if (!stat($logdir))
{
print "Creating directory $logdir\n";
mkdir $logdir, 0777 || die "Couldn't create directory $logdir";
}
OpenErrorLog("$logdir$now");
}
else
{
OpenErrorLog("NGLayoutBuildLog"); # Release build
#OpenErrorLog("Mozilla.BuildLog"); # Tinderbox requires that name
}
Moz::StopForErrors();
#Moz::DontStopForErrors();
if ($pull{all}) {
Checkout();
}
BuildDist();
chdir($MOZ_SRC);
BuildProjects();
print "Build complete\n";

View File

@@ -0,0 +1,427 @@
#!perl
package CodeWarriorLib;
=pod
=head1 NAME
CodeWarriorLib - supply interface to CodeWarrior
=head1 SYNOPSIS
#!perl
use CodeWarriorLib;
CodeWarriorLib::activate();
$had_errors = CodeWarriorLib::build_project(
$project_path, $target_name, $recent_errors_file, $clean_build
);
=head1 DESCRIPTION
Replaces the AppleScript library I<CodeWarriorLib>.
=over 4
=cut
use strict;
use Mac::Types;
use Mac::AppleEvents;
use Mac::AppleEvents::Simple;
use Mac::Processes;
use Mac::MoreFiles;
use Mac::StandardFile;
use File::Basename;
use vars qw($VERSION);
$VERSION = '1.02';
my($app) = 'CWIE';
# 0 == don't switch CWIE to front app in do_event(), 1 == do switch
# note: activate() still switches when called
$Mac::AppleEvents::Simple::SWITCH = 0;
# supply your own path to the source here
#_test('PowerPudgeIV:mozilla:mozilla:');
=pod
=item _get_project($full_path)
A private routine returning a reference to the open project with the given name,
or else the empty string (when that project is not open)
full_path is a string identifying the project to be built and is of the form,
e.g., "HD:ProjectFolder:MyProject.mcp". It must be supplied.
=cut
sub _get_project ($) {
my(
$full_path, $candidate_projects
) = @_;
$candidate_projects = _doc_named(basename($full_path, '*'));
if ($candidate_projects) {
my($cps) = _get_dobj($candidate_projects);
my($num) = AECountItems($cps);
if ($num) { # is a list
foreach (1 .. AECountItems($cps)) {
my($cp) = AEGetNthDesc($cps, $_);
if ($full_path eq _full_path($cp)) {
return($cp);
}
}
} else { # is only one, not a list
if ($full_path eq _full_path($cps)) {
return($cps);
}
}
}
return;
}
=pod
=item build_project
Build a selected target of a project, saving any errors to a file, if supplied.
full_path is a string identifying the project to be built and is of the form,
e.g., "HD:ProjectFolder:MyProject.mcp". It must be supplied.
If target_name is the empty string, the current target of the selected project
will be built, else, target_name should be a string matching a target name in
the selected project.
If error_path is the empty string, errors will not be saved to a file,
else, error_path should be the full path of a file to save error messages into.
=cut
$CodeWarriorLib::CLOSE_PROJECTS_FIRST = 0; # If true we close then make. If false, make then close.
my $last_project_built = "";
my $last_project_was_closed = 0;
sub build_project ($;$$$) {
my(
$full_path, $target_name, $error_path,
$remove_object, $p, $project_was_closed, $had_errors
) = @_;
_close_errors_window();
if ($CodeWarriorLib::CLOSE_PROJECTS_FIRST && ($last_project_built ne $full_path))
{
# If we're in "close first" mode, we don't close if the current project
# is the same as the previous one.
if ($last_project_was_closed) {
$p = _get_project($last_project_built);
_close($p);
}
$last_project_built = $full_path;
$last_project_was_closed = 0; # now refers to the new project
}
$project_was_closed = 0;
while (1) {
$p = _get_project($full_path);
if (!$p) {
if ($project_was_closed) {
print "### Error - request for project document failed after opening\n";
die "### possibly CW Pro 4 bug: be sure to close your Find window\n";
}
$project_was_closed = 1;
$last_project_was_closed = 1;
_open_file($full_path);
} else {
last;
}
}
$had_errors = 0;
if ($target_name eq '') {
if ($remove_object) {_remove_object($p)}
_build($p);
} else {
if ($remove_object) {_remove_object($p, $target_name)}
_build($p, $target_name);
}
if ($error_path ne '') {
_save_errors_window($error_path);
}
$had_errors = _close_errors_window();
if (!$CodeWarriorLib::CLOSE_PROJECTS_FIRST)
{
if ($project_was_closed) {
$p = _get_project($full_path);
_close($p);
}
}
return($had_errors);
}
=pod
=item activate()
Launches CodeWarrior and brings it to the front.
Once found, path will be saved in ':idepath.txt' for future reference.
Edit or delete this file to change the location of the IDE. If app is
moved, C<activate()> will prompt for a new location.
First looks for an open CodeWarrior app. Second, tries to open previously
saved location in ':idepath.txt'. Third, tries to find it and allow user
to choose it with Navigation Services (if present). Fourth, uses good old
GUSI routines built-in to MacPerl for a Choose Directory dialog box.
=cut
sub activate () {
local(*F);
my($filepath, $appath, $psi) = (':idepath.txt');
foreach $psi (values(%Process)) {
if ($psi->processSignature() eq $app) {
$appath = $psi->processAppSpec(), "\n";
_save_appath($filepath, $appath);
last;
}
}
if ((!$appath || ! -x $appath) && open(F, $filepath)) {
$appath = <F>;
close(F);
}
if (!$appath || ! -x $appath)
{
# make sure that MacPerl is a front process
#ActivateApplication('McPL');
MacPerl::Answer("Please locate the CodeWarrior application.", "OK");
# prompt user for the file name, and store it
my $macFile = StandardGetFile( 0, "APPL");
if ( $macFile->sfGood() )
{
$appath = $macFile->sfFile();
}
else
{
die "Operation canceled\n";
}
# if (eval {require Mac::Navigation}) {
# my($options, $nav);
# Mac::Navigation->import();
# $options = NavGetDefaultDialogOptions();
# $options->message('Where is CodeWarrior IDE?');
# $options->windowTitle('Find CodeWarrior IDE');
# $nav = NavChooseObject($Application{$app}, $options);
# die "CodeWarrior IDE not found.\n" if (!$nav || !$nav->file(1));
# $appath = $nav->file(1);
# } else {
# local(*D);
# my $cwd = `pwd`;
# $appath = _get_folder(
# 'Where is the CW IDE folder?',
# dirname($Application{$app})
# );
# die "CodeWarrior IDE not found.\n" if !$appath;
# opendir(D, $appath) or die $!;
# chdir($appath);
# foreach my $file (sort readdir (D)) {
# my(@app) = MacPerl::GetFileInfo($file);
# if ($app[0] && $app[1] &&
# $app[1] eq 'APPL' && $app[0] eq $app
# ) {
# $appath .= $file;
# last;
# }
# }
# chomp($cwd);
# chdir($cwd);
# }
_save_appath($filepath, $appath);
}
my($lp) = LaunchParam->new(
launchAppSpec => $appath,
launchControlFlags => launchContinue() + launchNoFileFlags()
);
unless (LaunchApplication($lp)) {
unlink($filepath);
die $^E;
}
}
sub _build ($;$) {
my($evt);
if ($_[1]) {
my($prm) =
q"'----':obj {form:name, want:type(TRGT), seld:TEXT(@), from:" .
AEPrint($_[0]) . '}';
$evt = do_event(qw/CWIE MAKE/, $app, $prm, $_[1]);
} else {
my($prm) = q"'----':" . AEPrint($_[0]);
$evt = do_event(qw/CWIE MAKE/, $app, $prm);
}
}
sub _remove_object ($;$) {
my($evt);
if ($_[1]) {
my($prm) =
q"'----':obj {form:name, want:type(TRGT), seld:TEXT(@), from:" .
AEPrint($_[0]) . '}';
$evt = do_event(qw/CWIE RMOB/, $app, $prm, $_[1]);
} else {
my($prm) = q"'----':" . AEPrint($_[0]);
$evt = do_event(qw/CWIE RMOB/, $app, $prm);
}
}
sub _open_file ($) {
my($prm) =
q"'----':obj {form:name, want:type(alis), " .
q"seld:TEXT(@), from:'null'()}";
do_event(qw/aevt odoc/, $app, $prm, $_[0]);
}
sub _doc_named ($) {
my($prm) =
q"'----':obj {form:test, want:type(docu), from:'null'(), " .
q"seld:cmpd{relo:'= ', 'obj1':obj {form:prop, want:type" .
q"(prop), seld:type(pnam), from:'exmn'()}, 'obj2':TEXT(@)}}";
my($evt) = do_event(qw/core getd/, $app, $prm, $_[0]);
return($evt->{REPLY} eq 'aevt\ansr{}' ? undef : $evt);
}
sub _full_path ($) {
my($obj) = $_[0];
my($prm) =
q"'----':obj {form:prop, want:type(prop), seld:type(FILE), " .
q"from:" . AEPrint($_[0]) . q"}, rtyp:type(TEXT)";
my($evt) = do_event(qw/core getd/, $app, $prm);
return MacPerl::MakePath(
MacUnpack('fss ', (
AEGetParamDesc($evt->{REP}, keyDirectObject()))->data()->get()
)
);
}
sub _save_errors_window ($) {
my($prm) =
q"'----':obj {form:name, want:type(alis), seld:TEXT(@), from:'null'()}";
do_event(qw/MMPR SvMs/, $app, $prm, $_[0]);
}
sub _close_errors_window () {
my($prm) =
q"'----':obj {form:name, want:type(cwin), " .
q"seld:TEXT(@), from:'null'()}";
my($evt) = do_event(qw/core clos/, $app, $prm, 'Errors & Warnings');
return($evt->{REPLY} eq 'aevt\ansr{}' ? 1 : 0);
}
sub _close () {
my($prm) = q"'----':" . AEPrint($_[0]);
do_event(qw/core clos/, $app, $prm);
}
sub _get_dobj ($) {
return(AEGetParamDesc($_[0]->{REP}, keyDirectObject()));
}
sub _get_folder ($$) {
require 'GUSI.ph';
my($prompt, $default) = @_;
MacPerl::Choose(
GUSI::AF_FILE(), 0, $prompt, '',
GUSI::CHOOSE_DIR() + ($default ? &GUSI::CHOOSE_DEFAULT : 0),
$default
);
}
sub _save_appath ($$) {
open(F, '>' . $_[0]) or die $!;
print F $_[1];
close(F);
}
sub _test ($) {
activate();
my($path) = $_[0];
build_project(
"${path}modules:xml:macbuild:XML.mcp", '',
"${path}build:mac:Mozilla.BuildLog.part"
);
}
1;
=pod
=back
=head1 HISTORY
=over 4
=item v1.02, September 23, 1998
Made fixes in finding and saving location of CodeWarrior IDE.
=item v1.01, June 1, 1998
Made fixes to C<chdir()> in C<activate()>, made C<activate()> more robust
in finding CodeWarrior IDE, added global variable to NOT switch to IDE
for each sent event, a few other fixes.
=item v1.00, May 30, 1998
First shot
=back
=head1 AUTHORS
Chris Nandor F<E<lt>pudge@pobox.comE<gt>>, and the author of the
original I<CodeWarriorLib>, Scott Collins F<E<lt>scc@netscape.comE<gt>>.
=head1 SEE ALSO
BuildProject L<Moz>.
=head1 COPYRIGHT
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
=cut

View File

@@ -0,0 +1,4 @@
/* This library only exists to provide a dummy library for the final project */
/* There is nothing to do here. */

Binary file not shown.

BIN
mozilla/build/mac/GenToc Normal file

Binary file not shown.

View File

@@ -0,0 +1,264 @@
(*
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*)
(*
GenToc - Generates a .toc file from the current contents of a project.
by Patrick C. Beard <beard@netscape.com>
*)
on swapDelimiters(newDelimiters)
set oldDelimiters to get AppleScript's text item delimiters
set AppleScript's text item delimiters to newDelimiters
return oldDelimiters
end swapDelimiters
on setDelimiters(newDelimiters)
set AppleScript's text item delimiters to newDelimiters
end setDelimiters
on setExtension(fileName, newExtension)
set oldDelimiters to swapDelimiters(".")
set newFileName to (text item 1 of fileName) & newExtension
setDelimiters(oldDelimiters)
return newFileName
end setExtension
on folderFromPath(filePath)
set folderPath to ((filePath's text items 1 thru ((count of filePath's text items) - 1)) as string) & ":"
return folderPath
end folderFromPath
on fileFromPath(filePath)
return last text item of filePath
end fileFromPath
on openProject(aProjectFile)
tell application "CodeWarrior IDE 3.3"
open aProjectFile
end tell
end openProject
on selectProject(aProjectFile)
set projectName to fileFromPath(aProjectFile as text)
tell application "CodeWarrior IDE 3.3"
if (name of window 1 is not projectName) then
select window projectName
end if
end tell
end selectProject
on getTargets()
set targetList to {}
set nameList to {}
tell application "CodeWarrior IDE 3.3"
set currentProject to project document 1
repeat with targetIndex from 1 to (count of targets of currentProject)
set currentTarget to (target targetIndex of currentProject)
set targetList to targetList & {currentTarget}
set nameList to nameList & {name of currentTarget}
end repeat
return {target:targetList, names:nameList}
end tell
end getTargets
(* uses "sort" scripting addition to sort a list of strings. *)
on sortList(aList)
if (aList ­ {}) then
return sort aList
else
return {}
end if
end sortList
(* uses "info for" scripting addition, to return the file type of a path. *)
on getFileType(aFilePath)
return file type of (info for alias aFilePath)
end getFileType
(* returns all "TEXT" files of the named target. *)
on getTargetFiles(targetKey)
set targetFiles to {}
tell application "CodeWarrior IDE 3.3"
set currentProject to project document 1
set currentTarget to (target targetKey of currentProject)
try
-- workaround for CW IDE 3.X bug, loop until error encountered.
set fileIndex to 1
repeat until false
set targetFile to (target file fileIndex of currentTarget)
-- only consider text files, since other platforms won't be managing binaries.
-- also, only consider if target file is directly linked.
if (linked of targetFile) then
set targetFilePath to (Access Paths of targetFile)
tell me
if (getFileType(targetFilePath) = "TEXT") then
set targetFiles to targetFiles & {targetFilePath}
end if
end tell
end if
set fileIndex to (fileIndex + 1)
end repeat
on error msg
-- display dialog msg & " file count = " & fileIndex
end try
end tell
return sortList(targetFiles)
end getTargetFiles
on addTargetFile(targetFile, targetName)
tell application "CodeWarrior IDE 3.3"
add (project document 1) new target file with data {targetFile} to targets {targetName}
end tell
end addTargetFile
on setCurrentTarget(currentTargetName)
tell application "CodeWarrior IDE 3.3"
Set Current Target currentTargetName
end tell
end setCurrentTarget
on removeTargetFile(targetFile)
tell application "CodeWarrior IDE 3.3"
Remove Files {targetFile}
end tell
end removeTargetFile
on quote(aString)
return "'" & aString & "'"
end quote
on listContains(aList, anItem)
repeat with listItem in aList
if (listItem contains anItem) then
return true
end if
end repeat
return false
end listContains
on showList(listToShow)
choose from list listToShow with prompt "List:" with empty selection allowed
end showList
on replace(aString, oldChar, newChar)
set newString to ""
repeat with aChar in (every character of aString)
if (contents of aChar = oldChar) then
set newString to newString & newChar
else
set newString to newString & aChar
end if
end repeat
return newString
end replace
on substring(aString, anOffset)
set aSubString to ""
repeat with charIndex from anOffset to (count aString)
set aSubString to aSubString & (character charIndex of aString)
end repeat
return aSubString
end substring
on setFileInfo(aFile, aCreator, aType)
tell application "Finder"
set creator type of aFile to aCreator
set file type of aFile to aType
end tell
end setFileInfo
on closeFile(fileRef)
try
-- make sure it's not currently open.
close access fileRef
on error
-- ignore error closing.
end try
end closeFile
on mroFile(aFile)
try
-- make sure it's modifiable.
mro aFile
on error
-- ignore error MROing.
end try
end mroFile
on run
-- so we can easily strip off file names from paths.
set oldDelimiters to swapDelimiters(":")
set theProjectFile to (choose file with prompt "Choose a CW Project file." of type {"MMPr"})
set theManifestFile to (new file with prompt "Create MANIFEST where?" default name setExtension(fileFromPath(theProjectFile as text), ".toc"))
set manifestRef to false
try
-- make sure the file is closed & is modifiable.
closeFile(theManifestFile)
mroFile(theManifestFile)
-- open the new MANIFEST file.
set manifestRef to (open for access theManifestFile with write permission)
set eof manifestRef to 0
-- give it CodeWarrior look and feel.
setFileInfo(theManifestFile, "CWIE", "TEXT")
openProject(theProjectFile)
selectProject(theProjectFile)
set targetsList to getTargets()
set targetNames to names of targetsList
set targetCount to count items of targetNames
set mozillaTreePathOffset to (offset of "mozilla" in (theManifestFile as text))
-- dump all targets into the new MANIFEST file.
repeat with targetName in targetNames
write ("# target: " & targetName & return) to manifestRef
setCurrentTarget(targetName)
set targetFiles to getTargetFiles(contents of targetName)
repeat with targetFile in targetFiles
-- only store the path name relative to the source tree itself.
set targetFilePath to substring(contents of targetFile, mozillaTreePathOffset)
write (replace(targetFilePath, ":", "/") & return) to manifestRef
end repeat
end repeat
on error msg
display dialog msg
end try
if (manifestRef is not false) then
closeFile(manifestRef)
end if
-- shut the project down, and display the result.
tell application "CodeWarrior IDE 3.3"
activate
Close Project
open theManifestFile
end tell
setDelimiters(oldDelimiters)
end run

View File

@@ -0,0 +1,109 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/*
This file overrides all option settings in the IDE. It is an attempt to allow all builds
to have the same options.
Note: We can't use ConditionalMacros.h in this file because it will conflict with
the PowerPlant precompiled headers.
*/
/* warning pragmas */
#pragma warn_hidevirtual on
#pragma warn_emptydecl on
#pragma warn_unusedvar on
#pragma warn_extracomma on
#pragma warn_illpragma on
#pragma warn_possunwant on
#pragma warn_unusedarg off /* turned off to reduce warnings */
#pragma check_header_flags on
/* Language features that must be the same across libraries... */
#pragma enumsalwaysint on
#pragma unsigned_char off
#pragma exceptions on
#pragma bool on
#pragma RTTI on
/* Save as much space as possible with strings... */
#pragma pool_strings on
#pragma dont_reuse_strings off
#pragma options align=native
#pragma sym on /* Takes no memory. OK in non-debug. */
#ifdef powerc /* ...generating PowerPC */
#pragma toc_data on
#pragma fp_contract on
#pragma readonly_strings on
#ifdef DEBUG
#pragma profile off /* Turn this on to profile the application. */
/* Look for more details about profiling in nsMacMessagePump.cpp. */
#pragma traceback on
#pragma global_optimizer off
#pragma scheduling off
#pragma peephole off
#pragma optimize_for_size off
#else
#pragma traceback on /* leave on until the final release, so MacsBug logs are interpretable */
#pragma global_optimizer on
#pragma optimization_level 4
#pragma scheduling 603
#pragma peephole on
#pragma optimize_for_size on
#pragma opt_strength_reduction on
#pragma opt_propagation on
#pragma opt_loop_invariants on
#pragma opt_lifetimes on
#pragma opt_dead_code on
#pragma opt_dead_assignments on
#pragma opt_common_subs on
#endif
#else /* ...generating 68k */
#pragma code68020 on
#pragma code68881 off
/* Far everything... */
#pragma far_code
#pragma far_data on
#pragma far_strings on
#pragma far_vtables on
#pragma fourbyteints on /* 4-byte ints */
#pragma IEEEdoubles on /* 8-byte doubles (as required by Java and NSPR) */
#ifdef DEBUG
#pragma macsbug on
#pragma oldstyle_symbols off
#else
#pragma macsbug off
#endif
#endif

View File

@@ -0,0 +1,5 @@
#
# This is a list of local files which get copied to the mozilla:dist directory
#
IDE_Options.h

View File

@@ -0,0 +1,222 @@
#!perl -w
package MANIFESTO;
require 5.004;
require Exporter;
#use strict;
use vars qw($VERSION @ISA @EXPORT $MANIFESTOLib);
use Mac::StandardFile;
use Moz;
use Cwd;
use Exporter;
use File::Basename;
@ISA = qw(Exporter);
@EXPORT = qw(ReconcileProject);
$VERSION = "1.00";
=head1 NAME
MANIFESTO - drives the Mac Project Reconciliation tool.
=head1 SYNOPSIS
You want to use this script. It will make your life easier.
=head1 COPYRIGHT
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
=cut
#
# globals
# $MANIFESTOLib - location of MANIFESTO applescript library
#
#
# utility routines
#
sub current_directory()
{
my $current_directory = cwd();
chop($current_directory) if ( $current_directory =~ m/:$/ );
return $current_directory;
}
# Uses the "compile script" extension to compile a script.
sub compile_script($;$) {
my($scriptPath, $outputPath) = @_;
#// generate a script to compile a script file.
my $script = <<END_OF_APPLESCRIPT;
store script (compile script (alias "$scriptPath")) in (file "$outputPath") replacing yes
END_OF_APPLESCRIPT
#// run the script.
MacPerl::DoAppleScript($script);
}
# _useMANIFESTOLib()
# returns 1 on success
# Search the include path for the file called MANIFESTOLib
sub _useMANIFESTOLib()
{
unless ( defined($MANIFESTOLib) )
{
my($scriptName) = "MANIFESTOLib.script";
my($libName) = "MANIFESTOLib";
# try the directory we were run from
my($scriptPath) = dirname($0) . ":" . $scriptName;
my($libPath) = dirname($0) . ":" . $libName;
# make sure that the compiled script is up to date with the textual script.
unless (-e $libPath && getModificationDate($libPath) >= getModificationDate($scriptPath)) {
print "# Recompiling MANIFESTOLib.script.\n";
compile_script($scriptPath, $libPath);
}
if ( -e $libPath) {
$MANIFESTOLib = $libPath;
} else {
# now search the include directories
foreach (@INC)
{
unless ( m/^Dev:Pseudo/ ) # This is some bizarre MacPerl special-case directory
{
$libPath = $_ . $libName;
if (-e $libPath)
{
$MANIFESTOLib = $libPath;
last;
}
}
}
}
if (! (-e $MANIFESTOLib)) {
print STDERR "MANIFESTOLib lib could not be found! $MANIFESTOLib";
return 0;
}
}
return 1;
}
sub getModificationDate($) {
my($filePath)=@_;
my($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
$atime,$mtime,$ctime,$blksize,$blocks) = stat($filePath);
return $mtime;
}
sub setExtension($;$;$) {
my($filePath, $oldExtension, $newExtension)=@_;
my($name, $dir, $type) = fileparse($filePath, $oldExtension);
return "$dir$name$newExtension";
}
#
# ReconcileProject(projectPath, manifestoPath)
#
# Uses MANIFESTOLib AppleScript to reconcile the contents (toc?) of a
# CodeWarrior project with an external MANIFEST file.
#
sub ReconcileProject($;$) {
#// turn this feature on by removing the following line.
return 1;
my($projectPath, $manifestoPath) = @_;
my($sourceTree) = current_directory();
my($logPath) = setExtension($manifestoPath, ".toc", ".log");
print STDERR "# Reconciling Project: $projectPath with $manifestoPath\n";
#// compare the modification dates of the .toc and .log files. If .log is newer, do nothing.
if (-e $logPath && getModificationDate($logPath) >= getModificationDate($manifestoPath)) {
print "# Project is up to date.\n";
return 1;
}
_useMANIFESTOLib() || die "Could not load MANIFESTOLib\n";
my $script = <<END_OF_APPLESCRIPT;
tell (load script file "$MANIFESTOLib") to ReconcileProject("$sourceTree:", "$sourceTree$projectPath", "$sourceTree$manifestoPath")
END_OF_APPLESCRIPT
#// run the script, and store the results in a file called "$manifestoPath.log"
my $asresult = substr(MacPerl::DoAppleScript($script), 1, -1); #// chops off leading, trailing quotes.
#// print out to STDOUT to show progress.
print $asresult;
#// store the results in "$manifestoPath.log", which will act as a cache for later checks.
open(OUTPUT, ">$logPath") || die "can't open log file $logPath.";
print OUTPUT $asresult;
close(OUTPUT);
return 1;
}
1;
=pod
=head1 NAME
MANIFESTO - Scripts to process source .toc files.
=head1 SYNOPSIS
use MANIFESTO;
ReconcileProject(<path to Mac project file>, <path to table of contents file>) || die "cannot reconcile project";
=head1 DESCRIPTION
This is a PERL interface for talking to MANIFESTOLib AppleScripts.
=item ReconcileProject
ReconcileProject(<path to Mac project file>, <path to table of contents file>);
Reconciles the contents of a project with an external .toc file.
=cut
=head1 SEE ALSO
=over
=item MacCVS Home Page
http://www.maccvs.org/
=back
=head1 AUTHORS
Patrick Beard beard@netscape.com
based on work by
Aleks Totic atotic@netscape.com
=cut
__END__

Binary file not shown.

View File

@@ -0,0 +1,376 @@
(*
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*)
(*
MANIFESTOLib - Reconciles a CW Project file with an external table of contents file.
Uses merge sort, one pass per target.
by Patrick C. Beard <beard@netscape.com>
*)
(* Global Configuration Properties *)
property pShowReport : true
-- property pSourceTree : "Homeward:Work:Raptor:src:"
property pSourceTree : "Morbeus:Projects:Raptor:src:"
on swapDelimiters(newDelimiters)
set oldDelimiters to get AppleScript's text item delimiters
set AppleScript's text item delimiters to newDelimiters
return oldDelimiters
end swapDelimiters
on setDelimiters(newDelimiters)
set AppleScript's text item delimiters to newDelimiters
end setDelimiters
-- replaces oldChar with newChar in a string.
on replace(aString, oldChar, newChar)
set newString to ""
repeat with aChar in (every character of aString)
if (contents of aChar = oldChar) then
set newString to newString & newChar
else
set newString to newString & aChar
end if
end repeat
return newString
end replace
(* uses "sort" scripting addition to sort a list of strings. *)
on sortList(aList)
if (aList ­ {}) then
return sort aList
else
return {}
end if
end sortList
-- reads .toc file into a list.
on readManifestFile(sourceTree, manifestFile)
set oldDelimiters to swapDelimiters(return)
set fileRef to false
set fileLines to {}
try
set fileRef to (open for access manifestFile without write permission)
-- read entire file into memory, use text items to delimit lines.
set fileContents to (read fileRef)
repeat with lineRef in (every text item of fileContents)
-- ignore lines that start with "#" or are empty.
set fileLine to (contents of lineRef)
if (fileLine ­ "") and not (fileLine starts with "#") then
set fileLines to fileLines & (sourceTree & replace(fileLine, "/", ":"))
end if
end repeat
on error
-- ignore errors.
end try
if (fileRef is not false) then close access fileRef
setDelimiters(oldDelimiters)
return sortList(fileLines)
end readManifestFile
(* both of the following depend on ":" as the delimiter character. *)
on folderFromPath(filePath)
return ((filePath's text items 1 thru ((count of filePath's text items) - 1)) as string) & ":"
end folderFromPath
on fileFromPath(filePath)
return last text item of filePath
end fileFromPath
(* CW Pro IDE Interface Handlers. *)
on openProject(aProjectFile)
tell application "CodeWarrior IDE 3.3"
-- activate
open aProjectFile
end tell
end openProject
(* forces the named project file to be the front window. *)
on selectProject(aProjectFile)
set projectName to fileFromPath(aProjectFile as text)
tell application "CodeWarrior IDE 3.3"
if (name of window 1 is not projectName) then
select window projectName
end if
end tell
end selectProject
on closeProject(aProjectFile)
tell application "CodeWarrior IDE 3.3"
Close Project
end tell
end closeProject
on getTargets()
set targetList to {}
set nameList to {}
tell application "CodeWarrior IDE 3.3"
set currentProject to project document 1
repeat with targetIndex from 1 to (count of targets of currentProject)
set currentTarget to (target targetIndex of currentProject)
set targetList to targetList & {currentTarget}
set nameList to nameList & {name of currentTarget}
end repeat
return {target:targetList, names:nameList}
end tell
end getTargets
(* uses "info for" scripting addition, to return the file type of a path. *)
on getFileType(aFilePath)
return file type of (info for alias aFilePath)
end getFileType
(* returns all "TEXT" files of the named target. *)
on getTargetFiles(targetKey)
set targetFiles to {}
tell application "CodeWarrior IDE 3.3"
set currentProject to project document 1
set currentTarget to (target targetKey of currentProject)
try
-- workaround for CW IDE 3.X bug, loop until error encountered.
set fileIndex to 1
repeat until false
set targetFile to (target file fileIndex of currentTarget)
-- only consider text files, since other platforms won't be managing binaries.
-- also, only consider if target file is directly linked.
if (linked of targetFile) then
set targetFilePath to (Access Paths of targetFile)
tell me
if (getFileType(targetFilePath) = "TEXT") then
set targetFiles to targetFiles & {targetFilePath}
end if
end tell
end if
set fileIndex to (fileIndex + 1)
end repeat
on error msg
-- display dialog msg & " file count = " & fileIndex
end try
end tell
return sortList(targetFiles)
end getTargetFiles
on addTargetFile(targetFile, targetList)
tell application "CodeWarrior IDE 3.3"
add (project document 1) new target file with data {targetFile} to targets targetList
end tell
end addTargetFile
global gCurrentTarget
on setCurrentTarget(currentTargetName)
if (gCurrentTarget ­ currentTargetName) then
set gCurrentTarget to currentTargetName
tell application "CodeWarrior IDE 3.3"
Set Current Target currentTargetName
end tell
end if
end setCurrentTarget
on removeTargetFile(targetFile)
tell application "CodeWarrior IDE 3.3"
Remove Files {targetFile}
end tell
end removeTargetFile
on quote(aString)
return "'" & aString & "'"
end quote
on listContains(aList, anItem)
repeat with listItem in aList
if (contents of listItem = anItem) then
return true
end if
end repeat
return false
end listContains
on showList(aList)
choose from list aList with prompt "List:" with empty selection allowed
end showList
global gProjectModified
on ModifyReadOnly(aProjectFile)
if (not gProjectModified) then
set gProjectModified to true
-- so CodeWarrior will notice, must close the file before MROing it.
closeProject(aProjectFile)
mro aProjectFile
openProject(aProjectFile)
selectProject(aProjectFile)
end if
end ModifyReadOnly
on makeStream(itemList)
return {streamList:itemList, streamCount:count itemList, streamIndex:0}
end makeStream
(* true is used as the end of stream value. *)
property pEOS : true
on advanceStream(stream)
set itemCount to (streamCount of stream)
set itemIndex to (streamIndex of stream)
if (itemIndex < itemCount) then
set itemIndex to (itemIndex + 1)
set (streamIndex of stream) to itemIndex
return (item itemIndex of streamList of stream)
else
return pEOS
end if
end advanceStream
-- returns true if str2 is INFINITELY great, or str1 is less than str2.
on precedes(str1, str2)
return (str2 = pEOS) or ((str1 ­ pEOS) and (str1 < str2))
end precedes
on get_current_application()
return last text item of ((path to current application) as text)
end get_current_application
on get_frontmost_application()
return last text item of ((path to frontmost application) as text)
end get_frontmost_application
on activate_application(applicationName)
tell application "Finder"
set applicationProcess to (application process applicationName)
set frontmost of applicationProcess to true
end tell
end activate_application
on ReconcileProject(sourceTree, projectPath, manifestoPath)
-- so we can easily strip off file names from paths.
set oldDelimiters to swapDelimiters(":")
-- initialize globals.
set gCurrentTarget to ""
set gProjectModified to false
-- convert paths to aliases.
set projectFile to alias projectPath
set manifestFile to alias manifestoPath
-- read the MANIFESTO file into a list of paths.
set manifestContents to readManifestFile(sourceTree, manifestFile)
-- return manifestContents
-- now, start processing the file items, ensuring that the project contains all items.
openProject(projectFile)
selectProject(projectFile)
set targetsList to getTargets()
set targetNames to names of targetsList
if (pShowReport) then
set theReport to ""
set addedFiles to ""
set removedFiles to ""
end if
-- push current application to front for speed.
-- set frontmostApplication to get_frontmost_application()
-- set currentApplication to get_current_application()
-- activate_application(currentApplication)
-- reconcile all targets with the MANIFEST file.
-- this loop should be recoded in PERL for speed.
-- IDEA: with sorted lists, can scan both lists, like a merge sort, and make one pass per target.
repeat with targetNameRef in targetNames
-- switch targets because getTargetFiles now checks to see if file is linked in current target.
set targetName to (contents of targetNameRef)
set targetFiles to getTargetFiles(targetName)
-- hopefully, this list test is fast.
if (targetFiles ­ manifestContents) then
-- return {count targetFiles, count manifestContents, targetFiles, manifestContents}
-- make sure the project file is modifiable.
ModifyReadOnly(projectFile)
setCurrentTarget(targetName)
set targetStream to makeStream(targetFiles)
set targetItem to advanceStream(targetStream)
set manifestStream to makeStream(manifestContents)
set manifestItem to advanceStream(manifestStream)
repeat until (manifestItem is pEOS) and (targetItem is pEOS)
-- display dialog "m: " & manifestItem & ", t: " & targetFileItem
if (manifestItem = targetItem) then
-- items match, advance both.
set manifestItem to advanceStream(manifestStream)
set targetItem to advanceStream(targetStream)
else
-- return {manifestItem, targetItem}
if (precedes(manifestItem, targetItem)) then
-- we have an item in manifest, not in project, so we have to add it to the targets.
-- display dialog "adding " & manifestItem
addTargetFile(manifestItem, targetNames)
if pShowReport then
set addedFiles to addedFiles & ("# " & (last text item of manifestItem) & return)
end if
set manifestItem to advanceStream(manifestStream)
else
-- we have an item not in manifest, but in project, so it must be removed from this target.
-- display dialog "removing " & targetItem
removeTargetFile(targetItem)
if pShowReport then
set removedFiles to removedFiles & ("# " & targetName & " - " & (last text item of targetItem) & return)
end if
set targetItem to advanceStream(targetStream)
end if
end if
end repeat
end if
end repeat
-- activate_application(frontmostApplication)
-- commit the project changes, and optionally display a report.
tell application "CodeWarrior IDE 3.3"
-- leave project open for compilation phase?
Close Project
if pShowReport then
if addedFiles is not "" then set theReport to ("# Added files: " & return & addedFiles)
if removedFiles is not "" then set theReport to theReport & ("# Removed files: " & return & removedFiles)
if (theReport is "") then set theReport to (" # Project is up to date." & return)
-- display dialog theReport buttons {"OK"} default button "OK"
end if
end tell
-- restore AppleScript's delimiters.
setDelimiters(oldDelimiters)
-- return 0 to indicate no error.
return theReport
end ReconcileProject
on run
-- when run interactively,
-- ask user which project/MANIFEST files to use.
set projectPath to (choose file with prompt "Choose a CW Project file." of type {"MMPr"}) as text
set manifestPath to (choose file with prompt "Choose a TOC file to process." of type {"TEXT"}) as text
ReconcileProject(pSourceTree, projectPath, manifestPath)
end run

198
mozilla/build/mac/MacCVS.pm Normal file
View File

@@ -0,0 +1,198 @@
#!perl -w
package MacCVS;
# package Mac::Apps::MacCVS; this should really be the name of the package
# but due to our directory hierarchy in mozilla, I am not doing it
require 5.004;
require Exporter;
use strict;
use vars qw($VERSION @ISA @EXPORT $MacCVSLib);
use Mac::StandardFile;
use Moz;
use Cwd;
use Exporter;
use File::Basename;
@ISA = qw(Exporter);
@EXPORT = qw( new print checkout);
$VERSION = "1.00";
# Architecture:
# cvs session object:
# name - session name
# session_file - session file
#
# globals
# $MacCVSLib - location of MacCVS applescript library
#
#
#
# utility routines
#
# just like Mac::DoAppleScript, 1 is success, 0 is failure
sub _myDoAppleScript($)
{
my($script) = @_;
my $asresult = MacPerl::DoAppleScript($script);
if ($asresult eq "0")
{
return 1;
}
else
{
print STDERR "AppleScript error: $asresult\n";
print STDERR "AppleScript was: \n $script \n";
return 0;
}
}
# _useMacCVSLib
# returns 1 on success
# Search the include path for the file called MacCVSLib
sub _useMacCVSLib()
{
unless ( defined($MacCVSLib) )
{
my($libname) = "MacCVSLib";
# try the directory we were run from
my($c) = dirname($0) . ":" . $libname;
if ( -e $c)
{
$MacCVSLib = $c;
}
else
{
# now search the include directories
foreach (@INC)
{
unless ( m/^Dev:Pseudo/ ) # This is some bizarre MacPerl special-case directory
{
$c = $_ . $libname;
if (-e $c)
{
$MacCVSLib = $c;
last;
}
}
}
}
if (! (-e $MacCVSLib))
{
print STDERR "MacCVS lib could not be found! $MacCVSLib";
return 0;
}
}
return 1;
}
#
# Session object methods
#
sub new {
my ( $proto, $session_file) = @_;
my $class = ref($proto) || $proto;
my $self = {};
if ( defined($session_file) && ( -e $session_file) )
{
$self->{"name"} = basename( $session_file );
$self->{"session_file"} = $session_file;
bless $self, $class;
return $self;
}
else
{
print STDERR "MacCVS->new cvs file < $session_file > does not exist\n";
return;
}
}
# makes sure that the session is open
# assertSessionOpen()
# returns 1 on failure
sub assertSessionOpen() {
my ($self) = shift;
_useMacCVSLib() || die "Could not load MacCVSLib\n";
my $script = <<END_OF_APPLESCRIPT;
tell (load script file "$MacCVSLib") to OpenSession("$self->{session_file}")
END_OF_APPLESCRIPT
return _myDoAppleScript($script);
}
# prints the cvs object, used mostly for debugging
sub print {
my($self) = shift;
print "MacCVS:: name: ", $self->{name}, " session file: ", $self->{session_file}, "\n";
}
# checkout( self, module, revision, date)
# MacCVS checkout command
# returns 1 on failure
sub checkout {
my($self, $module, $revision, $date ) = @_;
unless( defined ($module) ) { $module = ""; } # get rid of the pesky undefined warnings
unless( defined ($revision) ) { $revision = ""; }
unless( defined ($date) ) { $date = ""; }
$self->assertSessionOpen() || return 1;
my $script = <<END_OF_APPLESCRIPT;
tell (load script file "$MacCVSLib") to Checkout given sessionName:"$self->{name}", module:"$module", revision:"$revision", date:"$date"
END_OF_APPLESCRIPT
return _myDoAppleScript($script);
}
1;
=pod
=head1 NAME
MacCVS - Interface to MacCVS
=head1 SYNOPSIS
use MacCVS;
$session = MacCVS->new( <session_file_path>) || die "cannot create session";
$session->checkout([module] [revision] [date]) || die "Could not check out";
=head1 DESCRIPTION
This is a MacCVS interface for talking to MacCVS Pro client.
MacCVSSession is the class used to manipulate the session
=item new
MacCVS->new( <cvs session file path>);
Creates a new session. Returns undef on failure.
=item checkout( <module> [revision] [date] )
cvs checkout command. Revision and date are optional
returns 0 on failure
=cut
=head1 SEE ALSO
=over
=item MacCVS Home Page
http://www.maccvs.org/
=back
=head1 AUTHORS
Aleks Totic atotic@netscape.com
=cut
__END__

BIN
mozilla/build/mac/MacCVSLib Normal file

Binary file not shown.

559
mozilla/build/mac/Moz.pm Normal file
View File

@@ -0,0 +1,559 @@
=head1 NAME
B<Moz> - routines for automating CodeWarrior builds, and some extra-curricular activities related to building Mozilla
=head1 SYNOPSIS
use Moz;
OpenErrorLog(":::BuildLog");
StopForErrors();
$Moz::QUIET = 1;
InstallFromManifest(":projects:MANIFEST", $dist_dir);
BuildProjectClean(":projects:SomeProject.mcp", "SomeTarget");
MakeAlias(":projects:SomeProject.shlb", $dist_dir);
DontStopForErrors();
BuildProject(":projects:SomeOtherProject.mcp", "SomeTarget");
=head1 DESCRIPTION
B<Moz> comprises the routines needed to slap CodeWarrior around, force it to build a sequence of projects, report the results, and a few other things.
=cut
package Moz;
require Exporter;
use Mac::Types;
use Mac::Events;
use Mac::Processes;
@ISA = qw(Exporter);
@EXPORT = qw(BuildProject BuildProjectClean OpenErrorLog MakeAlias StopForErrors DontStopForErrors InstallFromManifest InstallResources SetBuildNumber SetAgentString SetTimeBomb Delay ActivateApplication);
@EXPORT_OK = qw(CloseErrorLog UseCodeWarriorLib QUIET);
use Cwd;
use File::Path;
use ExtUtils::Manifest 'maniread';
use CodeWarriorLib;
sub current_directory()
{
my $current_directory = cwd();
chop($current_directory) if ( $current_directory =~ m/:$/ );
return $current_directory;
}
sub full_path_to($)
{
my ($path) = @_;
if ( $path =~ m/^[^:]+$/ )
{
$path = ":" . $path;
}
if ( $path =~ m/^:/ )
{
$path = current_directory() . $path;
}
return $path;
}
=head2 Setup
Pretty much, everything is taken care of for you.
However, B<Moz> does use a little compiled AppleScript library (the file CodeWarriorLib) for some of its communcication with CodeWarrior.
If this library isn't in the same directory as "Moz.pm", then you need to tell B<Moz> where to find it.
Call C<UseCodeWarriorLib($path_to_CodeWarriorLib)>.
This routine is not exported by default, nor are you likely to need it.
=cut
sub UseCodeWarriorLib($)
{
# ($CodeWarriorLib) = @_;
# $CodeWarriorLib = full_path_to($CodeWarriorLib);
}
sub activate_CodeWarrior()
{
#MacPerl::DoAppleScript(<<END_OF_APPLESCRIPT);
# tell (load script file "$CodeWarriorLib") to ActivateCodeWarrior()
#END_OF_APPLESCRIPT
}
BEGIN
{
# UseCodeWarriorLib(":CodeWarriorLib");
# activate_CodeWarrior();
CodeWarriorLib::activate();
}
$logging = 0;
$recent_errors_file = "";
$stop_on_1st_error = 1;
$QUIET = 0;
=head2 Logging all the errors and warnings - C<OpenErrorLog($log_file)>, C<CloseErrorLog()>
The warnings and errors generated in the course of building projects can be logged to a file.
Tinderbox uses this facility to show why a remote build failed.
Logging is off by default.
Start logging at any point in your build process with C<OpenErrorLog($log_file)>.
Stop with C<CloseErrorLog()>.
You never need to close the log explicitly, unless you want to just log a couple of projects in the middle of a big list.
C<CloseErrorLog()> is not exported by default.
=cut
sub CloseErrorLog()
{
if ( $logging )
{
close(ERROR_LOG);
$logging = 0;
StopForErrors() if $stop_on_1st_error;
}
}
sub OpenErrorLog($)
{
my ($log_file) = @_;
CloseErrorLog();
if ( $log_file )
{
$log_file = full_path_to($log_file);
open(ERROR_LOG, ">$log_file") || die "Can't open logfile, check the file path.\n";
MacPerl::SetFileInfo("CWIE", "TEXT", $log_file);
$log_file =~ m/.+:(.+)/;
$recent_errors_file = full_path_to("$1.part");
$logging = 1;
}
}
=head2 Stopping before it's too late - C<StopForErrors()>, C<DontStopForErrors()>
When building a long list of projects, you decide whether to continue building subsequent projects when one fails.
By default, your build script will C<die> after the first project that generates an error while building.
Change this behavior with C<DontStopForErrors()>.
Re-enable it with C<StopForErrors()>.
=cut
sub StopForErrors()
{
$stop_on_1st_error = 1;
# Can't stop for errors unless we notice them.
# Can't notice them unless we are logging.
# If the user didn't explicitly request logging, log to a temporary file.
if ( ! $recent_errors_file )
{
OpenErrorLog("${TMPDIR}BuildResults");
}
}
sub DontStopForErrors()
{
$stop_on_1st_error = 0;
}
sub log_message($)
{
if ( $logging )
{
my ($message) = @_;
print ERROR_LOG $message;
}
}
sub log_message_with_time($)
{
if ( $logging )
{
my ($message) = @_;
my $time_stamp = localtime();
log_message("$message ($time_stamp)\n");
}
}
sub log_recent_errors($)
{
my ($project_name) = @_;
my $found_errors = 0;
if ( $logging )
{
open(RECENT_ERRORS, "<$recent_errors_file");
while( <RECENT_ERRORS> )
{
if ( /^Error/ || /^CouldnÕt find project file/ || /^Link Error/ )
{
# if (!$found_errors)
# print $_;
$found_errors = 1;
}
print ERROR_LOG $_;
}
close(RECENT_ERRORS);
unlink("$recent_errors_file");
}
if ( $stop_on_1st_error && $found_errors )
{
print ERROR_LOG "### Build failed.\n";
die "### Errors encountered building \"$project_name\".\n";
}
}
sub build_project($$$)
{
my ($project_path, $target_name, $clean_build) = @_;
$project_path = full_path_to($project_path);
# $project_path =~ m/.+:(.+)/;
# my $project_name = $1;
log_message_with_time("### Building \"$project_path\"");
# Check that the given project exists
if (! -e $project_path)
{
print ERROR_LOG "### Build failed.\n";
die "### Can't find project file \"$project_path\".\n";
}
print "Building \"$project_path\[$target_name\]\"\n";
$had_errors = CodeWarriorLib::build_project(
$project_path, $target_name, $recent_errors_file, $clean_build
);
WaitNextEvent();
# $had_errors =
#MacPerl::DoAppleScript(<<END_OF_APPLESCRIPT);
# tell (load script file "$CodeWarriorLib") to BuildProject("$project_path", "$project_name", "$target_name", "$recent_errors_file", $clean_build)
#END_OF_APPLESCRIPT
# Append any errors to the globally accumulated log file
# if ( $had_errors ) # Removed this test, because we want warnings, too. -- jrm
{
log_recent_errors($project_path);
}
}
=head2 Getting CodeWarrior to build projects - C<BuildProject($project, $opt_target)>, C<BuildProjectClean($project, $opt_target)>
C<BuildProject()> and C<BuildProjectClean()> are identical, except that the latter first removes object code.
In both, CodeWarrior opens the project if it wasn't already open; builds the given (or else current) target; and finally closes
the project, if it wasn't already open.
=cut
sub BuildProject($;$)
{
my ($project_path, $target_name) = @_;
build_project($project_path, $target_name, 0);
}
sub BuildProjectClean($;$)
{
my ($project_path, $target_name) = @_;
build_project($project_path, $target_name, 1);
}
=head2 Miscellaneous
C<MakeAlias($old_file, $new_file)> functions like C<symlink()>, except with better argument defaulting and more explicit error messages.
=cut
sub MakeAlias($$)
{
my ($old_file, $new_file) = @_;
# if the directory to hold $new_file doesn't exist, create it
if ( ($new_file =~ m/(.+:)/) && !-d $1 )
{
mkpath($1);
}
# if a leaf name wasn't specified for $new_file, use the leaf from $old_file
if ( ($new_file =~ m/:$/) && ($old_file =~ m/.+:(.+)/) )
{
$new_file .= $1;
}
my $message = "Can't create a Finder alias (at \"$new_file\")\n for \"$old_file\"; because ";
die "$message \"$old_file\" doesn't exist.\n" unless -e $old_file;
die "$message I won't replace an existing (non-alias) file with an alias.\n" if ( -e $new_file && ! -l $new_file );
# now: $old_file exists; $new_file doesn't (or else, is an alias already)
if ( -l $new_file )
{
# ...then see if it already points to $old_file
my $current_target = full_path_to(readlink($new_file));
my $new_target = full_path_to($old_file);
return if ( $current_target eq $new_target );
# if the desired alias already exists and points to the right thing, then we're done
unlink $new_file;
}
symlink($old_file, $new_file) || die "$message symlink returned an unexpected error.\n";
}
=pod
C<InstallFromManifest()>
=cut
sub InstallFromManifest($;$$)
{
my ($manifest_file, $dest_dir, $flat) = @_;
$flat = 0 unless defined($flat); # if $flat, all rel. paths in MANIFEST get aliased to the root of $dest_dir
$dest_dir ||= ":";
$manifest_file =~ m/(.+):/;
my $source_dir = $1;
chop($dest_dir) if $dest_dir =~ m/:$/;
#Mac::Events->import();
WaitNextEvent();
if ($flat)
{
print "Doing manifest on \"$manifest_file\" FLAT\n" unless $QUIET;
}
else
{
print "Doing manifest on \"$manifest_file\"\n" unless $QUIET;
}
my $read = maniread(full_path_to($manifest_file));
foreach $file (keys %$read)
{
next unless $file;
$subdir = ":";
if (!$flat && ($file =~ /:.+:/ ))
{
$subdir = $&;
}
$file = ":$file" unless $file =~ m/^:/;
MakeAlias("$source_dir$file", "$dest_dir$subdir");
}
}
=pod
C<InstallResources()>
=cut
# parameters are path to MANIFEST file, destination dir, true (to make copies) or false (to make aliases)
sub InstallResources($;$;$)
{
my ($manifest_file, $dest_dir, $copy_files) = @_;
$dest_dir ||= ":";
$manifest_file =~ m/(.+):/;
my $source_dir = $1;
chop($dest_dir) if $dest_dir =~ m/:$/;
WaitNextEvent();
print "Installing resources from \"$manifest_file\"\n" unless $QUIET;
my $read = maniread(full_path_to($manifest_file));
foreach $file (keys %$read)
{
next unless $file;
if ($copy_files)
{
print "Implement this if you need it";
}
else
{
MakeAlias("$source_dir:$file", "$dest_dir:$file");
}
}
}
sub SetBuildNumber
{
open (OUTPUT, ">:mozilla:config:build_number") || die "could not open buildnumber";
open (BDATE, "perl :mozilla:config:bdate.pl|");
while (<BDATE>) {
print OUTPUT $_;
}
close (BDATE);
close (OUTPUT);
system ("perl :mozilla:config:aboutime.pl :mozilla:xpfe:appshell:public:nsBuildID.h :mozilla:config:build_number");
system ("perl :mozilla:config:aboutime.pl :mozilla:xpfe:browser:resources:locale:en-US:navigator.dtd :mozilla:config:build_number");
system ("perl :mozilla:config:aboutime.pl :mozilla:xpfe:browser:resources:content:viewSource.xul :mozilla:config:build_number");
}
sub SetAgentString
{
open (BDATE, ":mozilla:config:build_number") || die "could not open buildnumber";
while (<BDATE>) {
$build_number = $_;
}
close (BDATE);
open (ORIGFILE, ":mozilla:cmd:macfe:restext:custom.r") || die "no original file";
open (OUTPUT, ">:mozilla:cmd:macfe:restext:agent.r") || die "no output file";
chop($build_number);
while (<ORIGFILE>) {
$tempstring = $_;
if ($tempstring =~ "\#define VERSION_MAJOR_STR") {
$tempstring = "\#define VERSION_MAJOR_STR \"5.0a1-" . $build_number . " Development\"\n";
}
print OUTPUT $tempstring;
}
close (ORIGFILE);
close (OUTPUT);
unlink (":mozilla:cmd:macfe:restext:custom.r");
rename (":mozilla:cmd:macfe:restext:agent.r", ":mozilla:cmd:macfe:restext:custom.r");
}
sub SetTimeBomb($$)
{
my ($warn_days, $bomb_days) = @_;
system("perl :mozilla:config:mac-set-timebomb.pl $warn_days $bomb_days");
}
sub Delay($)
{
my ($delay_seconds) = @_;
$now = time;
$exit_time = $now + $delay_seconds;
while ($exit_time > $now) {
$now = time;
}
}
sub ActivateApplication($)
{
my ($appSignature) = @_;
my ($psi, $found);
my ($appPSN);
$found = 0;
foreach $psi (values(%Process))
{
if ($psi->processSignature() eq $appSignature)
{
$appPSN = $psi->processNumber();
$found = 1;
last;
}
}
if ($found == 0)
{
return;
}
SetFrontProcess($appPSN);
while (GetFrontProcess() != $appPSN)
{
WaitNextEvent();
}
}
1;
=head1 AUTHORS
Scott Collins <scc@netscape.com>, Simon Fraser <sfraser@netscape.com>, Chris Yeh <cyeh@netscape.com>
=head1 SEE ALSO
BuildMozillaDebug.pl (et al), BuildList.pm, CodeWarriorLib (an AppleScript library)
=head1 COPYRIGHT
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
=cut

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,43 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#error "DonÕt use me!"
#define OLDROUTINELOCATIONS 0
#define XP_MAC 1
#define NSPR20 1
#define _NO_FAST_STRING_INLINES_ 1
#define HAVE_BOOLEAN 1
#define NETSCAPE 1
#define OTUNIXERRORS 1 /* We want OpenTransport error codes */
#define OJI 1
/*
This compiles in heap dumping utilities and other good stuff
for developers -- maybe we only want it in for a special SDK
nspr/java runtime(?):
*/
#define DEVELOPER_DEBUG 1
#define MAX(_a,_b) ((_a) < (_b) ? (_b) : (_a))
#define MIN(_a,_b) ((_a) < (_b) ? (_a) : (_b))

View File

@@ -0,0 +1,61 @@
#!perl
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
#
# nglayout build script (debug)
#
use Mac::Processes;
use NGLayoutBuildList;
use Cwd;
use Moz;
# configuration variables
$DEBUG = 1;
$pull{all} = 1;
$pull{lizard} = 0;
$pull{xpcom} = 0;
$pull{imglib} = 0;
$pull{netlib} = 0;
$pull{nglayout} = 0;
$pull{mac} = 0;
if ($pull{all})
{
foreach $k (keys(%pull))
{
$pull{$k} = 1;
}
}
# do the work
# you should not have to edit anything bellow
chdir("::::");
Moz::StopForErrors();
#Moz::DontStopForErrors();
#OpenErrorLog("::NGLayoutBuildLog");
OpenErrorLog("NGLayoutPullLog"); # Tinderbox requires that name
Checkout();

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,4 @@
This directory is merely here to test the project editor server. It will go away after
it is validated. For more information, see http://camelot.
Testing watchers.

Binary file not shown.

View File

@@ -0,0 +1 @@
// test1.cpp

View File

@@ -0,0 +1 @@
// test2.cpp

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,156 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/*
About this file
---------------
This file contains some handy macros, and a stack-based class that makes
instrumenting functions with Apple's Instrumentation SDK easier.
Instrumentation SDK
-------------------
The Instrumentation SDK allows you to do code performance analysis,
collecting time-based data, and other data by putting instrumentation
points in your code, and running.
You can get the instrumentation SDK from:
ftp://ftp.apple.com/developer/Development_Kits/Instrumentation_SDK.hqx
To find out how to use the Instrumentation Toolkit, read the documentation
that comes with the SDK. I'm not going to explain all that here.
Setting up your tree
--------------------
After a clean build, make aliases to the following files from the SDK
somewhere in dist (I usually throw them into dist:mac):
Instrumentation.h
InstrumentationMacros.h
InstrumentationLib
Make an alias to this file in the same place in dist:
InstrumentationHelpers.h
How to use
----------
In C++ code, the following macros can be used thusly:
NS_IMETHODIMP nsBigThing::SlowFunction()
{
INST_TRACE("SomeLocationDescription"); // Descriptive label. Don't use :: here.
// code that might return anywhere.
...
return NS_OK;
}
Because the INST_TRACE macro makes a stack-based StInstrumentationLog,
exit from the function will be traced wherever it occurs.
You will also need to add the "InstrumentationLib" stub library to the
project.
Such instrumentation points will give you data for the
'Trace Time Line Viewer' in the viewer. There are many other types
of instrumentation data you can collect; see the docs in the SDK
for more information.
Stalking the wild time sink
---------------------------
Your general strategy when using the Instrumentation tools to
track down performance problems should be to start at the high
level, then drill down into subroutines. You want to avoid
instrumenting routines that are called hundreds of thousands
of times, because you'll end up with massive data files. Rather,
instrument their calling routines to get a good sense of where
the time goes.
This kind of performance analysis does not replace the more
traditional profiling tools. Rather, it allows you to analyse
performance problems in terms of behaviour and timing, rather
than a simply overview of % of time spent in different routines.
*/
#include "InstrumentationMacros.h"
#ifdef __cplusplus
/* Stack-based class to do logging */
class StInstrumentationLog
{
public:
StInstrumentationLog(const char* traceName, InstTraceClassRef &ioTraceClassRef)
{
if (ioTraceClassRef == 0)
{
if (InstCreateTraceClass( kInstRootClassRef, traceName, 0, kInstEnableClassMask, &ioTraceClassRef) != noErr)
{
DebugStr("\pFailed to make instrumentation trace class");
return;
}
}
mTraceClassRef = ioTraceClassRef;
mEventTag = InstCreateEventTag();
InstLogTraceEvent(mTraceClassRef, mEventTag, kInstStartEvent);
}
~StInstrumentationLog()
{
InstLogTraceEvent(mTraceClassRef, mEventTag, kInstEndEvent);
}
void LogMiddleEvent()
{
InstLogTraceEvent(mTraceClassRef, mEventTag, kInstMiddleEvent);
}
void LogMiddleEventWithData(const char* inFormatString, void* inEventData)
{
InstDataDescriptorRef dataDesc;
InstCreateDataDescriptor(inFormatString, &dataDesc);
InstLogTraceEventWithData(mTraceClassRef, mEventTag, kInstMiddleEvent, dataDesc, inEventData);
InstDisposeDataDescriptor(dataDesc);
}
protected:
InstTraceClassRef mTraceClassRef;
InstEventTag mEventTag;
};
#define INST_TRACE(n) static InstTraceClassRef __sTrace = 0; StInstrumentationLog traceLog((n), __sTrace)
#define INST_TRACE_MIDDLE do { traceLog.LogMiddleEvent(); } while(0)
#define INST_TRACE_DATA(s, d) do { traceLog.LogMiddleEventWithData((s), (d)); } while (0)
#endif /* __cplusplus */

View File

@@ -0,0 +1,5 @@
- Currently, we do a fairly conservative (--disable a lot) build; find
out what works already.
- More libraries could be put in separate packages, like mailnews and
editor are.

View File

@@ -0,0 +1,279 @@
mozilla (19990716.M8-3) unstable; urgency=low
* Updated with build rules for the new mozilla-provided CVS directory.
* Register as MIME-handler (Close Bug# 42206)
-- Brent A. Fulgham <bfulgham@debian.org> Tue, 3 Aug 1999 09:15:17 -0700
mozilla (19990716.M8-2) unstable; urgency=low
* Added fix for m68k in hashtable function (Res. Bug# 41267)
* More robust /usr/bin/mozilla (Res. Bug# 41912)
* Remove suggestion for obsolete x11amp (Res. Bug# 41181)
-- Brent A. Fulgham <bfulgham@debian.org> Tue, 27 Jul 1999 09:15:17 -0700
mozilla (19990716.M8-1) unstable; urgency=low
* This is SeaMonkey Milestone 8.
-- Brent A. Fulgham <bfulgham@debian.org> Thu, 22 Jul 1999 21:20:10 -0700
mozilla (19990624.M7-1) unstable; urgency=low
* This is SeaMonkey Milestone 7 !
* Removed the so-called upstream changelog (fixes #39307 #39496 #40368).
* Retried building without the static libraries. It actually worked,
after two Makefile.ins backports from M8 :)
-- Josip Rodin <jrodin@jagor.srce.hr> Sat, 3 Jul 1999 14:09:18 +0200
mozilla (19990529.M6-1) unstable; urgency=low
* This is SeaMonkey Milestone 6 !
-- Josip Rodin <jrodin@jagor.srce.hr> Mon, 31 May 1999 20:46:16 +0200
mozilla (19990527-1) unstable; urgency=low
* Another try, the previous one didn't build, stopped in xpidl/build/
* Fresh tarball from the FTP site.
* I'll give up with NO_STATIC_LIB for now, let's just make something.
* First attempt on the editor exclusion (in mozilla-editor package).
-- Josip Rodin <jrodin@jagor.srce.hr> Fri, 28 May 1999 16:08:56 +0200
mozilla (19990526-1) unstable; urgency=low
* New one, this time with .orig.tar.gz cleaned up.
-- Josip Rodin <jrodin@jagor.srce.hr> Thu, 27 May 1999 19:31:13 +0200
mozilla (19990524-1) unstable; urgency=low
* Another new tree, probably the last before M6 releases. Maybe it'll
even build, who knows? ;)
-- Josip Rodin <jrodin@jagor.srce.hr> Tue, 25 May 1999 16:11:57 +0200
mozilla (19990521-1) unstable; urgency=low
* Another try, more testing of --disable-static and some changes to
the rules file. Applied some more recent patches from CVS.
* Build NSPR with pthreads support.
* Building on pandora (fast!), but it'll depend on glibc2.1 :(
-- Josip Rodin <jrodin@jagor.srce.hr> Sun, 23 May 1999 14:10:53 +0200
mozilla (19990518-1) unstable; urgency=low
* Bypassed the dangling symlinks with a "-" :(
* Added some Conflicts/Replaces to libnspr to prevent clashes with the
previous (unreleased) versions of it, 20 and 21.
* Brent decided to split out mailnews from the main package, so it's
now in mozilla-mailnews package. Quite a lot of changes to the rules
and control file. Added appropriate Provides: because of that, so
that's one less TODO item.
-- Josip Rodin <jrodin@jagor.srce.hr> Wed, 19 May 1999 04:10:07 -0700
mozilla (19990515-1) unstable; urgency=low
* Another try. Incorporated some changes as seen in M4's spec file
that was used to build the RPM.
* Fixed debian/control NSPR entries.
-- Josip Rodin <jrodin@jagor.srce.hr> Sun, 16 May 1999 05:30:39 -0700
mozilla (19990513-1) unstable; urgency=low
* Try, try again.
-- Brent A. Fulgham <bfulgham@debian.org> Thu, 13 May 1999 09:50:20 -0700
mozilla (19990510-1) unstable; urgency=low
* A possibly working build from the FTP site, since M5 didn't manage
to build :(
* NSPR renamed to libnspr3{-dev}, as one of the upstream people advised.
-- Josip Rodin <jrodin@jagor.srce.hr> Thu, 13 May 1999 05:08:24 -0700
mozilla (19990505.M5-1) unstable; urgency=low
* This is SeaMonkey Milestone 5 !
* The previous M4 builds didn't work out. This was released on my
birthday, so it could even work ;)
-- Josip Rodin <jrodin@jagor.srce.hr> Mon, 10 May 1999 00:27:47 -0700
mozilla (19990415.M4-2) unstable; urgency=low
* Let's try once again - the previous build was kinda fscked up...
-- Josip Rodin <jrodin@jagor.srce.hr> Sun, 9 May 1999 15:08:39 -0700
mozilla (19990415.M4-1) unstable; urgency=low
* This is SeaMonkey Milestone 4 !
* Massive changes to debian/rules, now it actually works :o)
+ builds in a subdirectory (yipee!)
+ removes unneeded Makefiles
+ installs a proper copyright file
* NSPR renamed to libnspr21{-dev}, thought I'm not sure it is the
real version... we still have to hardcode the dependency :(
-- Josip Rodin <jrodin@jagor.srce.hr> Tue, 4 May 1999 01:41:22 -0700
mozilla (19990410-1) unstable; urgency=low
* Let's try this snapshot from FTP... I modified the debian/rules file
a bit.
-- Josip Rodin <jrodin@jagor.srce.hr> Sat, 10 Apr 1999 19:17:59 -0700
mozilla (19990402-1) unstable; urgency=low
* New CVS pull. First attempt at mail and editor support.
-- Brent A. Fulgham <bfulgham@debian.org> Fri, 2 Apr 1999 09:15:22 -0800
mozilla (19990331-1) unstable; urgency=low
* New build, using automated script to grab the latest stable
branch from CVS.
-- Brent A. Fulgham <bfulgham@debian.org> Wed, 31 Mar 1999 14:58:40 -0800
mozilla (19990326-1) unstable; urgency=low
* Updated to fix library so-name and shlibdepends problem.
* Current CVS pull
* Double-double check that debugging is turned off.
-- Brent A. Fulgham <bfulgham@debian.org> Fri, 26 Mar 1999 09:31:45 -0800
mozilla (19990325-1) unstable; urgency=low
* Updated for fix to (hopefully) stop segfault problem.
-- Brent A. Fulgham <bfulgham@debian.org> Thu, 25 Mar 1999 12:58:18 -0800
mozilla (19990323-1) unstable; urgency=low
* This is a test release using CVS snapshots
* Continuing to use Ray's debian/ dir (thanks again!).
* Change moz-wrapper to use "apprunner" instead of the viewer (viewer is just
a test application.
* Whoo-hoo -- it's running!
-- Brent A. Fulgham <bfulgham@debian.org> Tue, 23 Mar 1999 14:25:07 -0800
mozilla (19990317-1) unstable; urgency=low
* This is a test release done just to get things moving.
* Built on va from a snapshot, using Ray's debian/ dir (thanks!).
-- Josip Rodin <jrodin@jagor.srce.hr> Sun, 21 Mar 1999 15:37:16 -0800
mozilla (19981211-0.1) unstable; urgency=low
* UNRELEASED
* UNFINISHED. TODO:
* Check we're not compiling -DDEVELOPER_DEBUG.
* Ensure nsprpub/config/UNIX.mk doesn't get a hardwired x86 reference.
* Remove the ?widgets/src/gdk/depend.mk? as part of clean.
* Remove the autogenerated files of htmlparser/src.
* ~/.mozilla -> ~/.netscape fixes bug #?????.
* Non-maintainer upload.
* New upstream tarball:
* Includes glibc2.1 patches.
* Configuration dir is now ~/.mozilla rather than ~/.netscape.
* Default widget set has switched from Motif to Gtk. The Gtk version
needed is newer than the one in frozen, so this for unstable only.
* Moved libnspr into packages of its own (as non-mozilla software like
Japhar uses it) and made mozilla depend on the runtime library package.
* Removed YAFHintel (thanks to John Goerzen for reminding me).
* [nsprpub/config/rules.mk] Use standard naming of shared library files
and SONAMEs.
* Make sure mozilla gets linked against the system libjpeg, libpng,
libz and libxmltok1 (Fixes #30306).
-- J.H.M. Dassen (Ray) <jdassen@wi.LeidenUniv.nl> Sun, 10 Jan 1999 20:02:19 +0100
mozilla (19981008-0.1) frozen unstable; urgency=low
* Non-maintainer upload.
* New upstream tarball.
* Adapted build process to it (nspr doesn't use autoconf and needs to be
built before the regular autoconf build).
* Built with fixed libc6 (and other fixed libs), so it works again.
* Updated Standards-Version.
* [config/Linux.mk] Added EXTRA_DSO_LDOPTS = -lc to add dependency
information to the shared libraries generated.
* [nsprlib/config/Linux.mk] Added OS_LIBS = -lc to add dependency
information to the shared libraries generated.
-- J.H.M. Dassen (Ray) <jdassen@wi.LeidenUniv.nl> Sat, 28 Nov 1998 18:29:06 +0100
mozilla (19980904-1) unstable; urgency=low
* Non-maintainer upload: this package has been orphaned.
* Used latest snapshot tarball; as no real mozilla releases have been made
so far, we use the snapshot date for the version number.
* Previous versions were accidentally built as "Debian only" source.
* Updated Standards-Version.
* Adapted to current mozilla source organisation and build process.
* LessTif version, so mozilla can go in main.
* Improved package relationships:
* Added Provides: www-browser .
* Added Recommends: mime-support .
* Added Suggest dependency for postscript-viewer, pdf-viewer, images
formats viewers, video formats viewers and audio formats players.
* Added mozilla(1) -> unknown(7) manpage symlink.
-- J.H.M. Dassen (Ray) <jdassen@wi.LeidenUniv.nl> Thu, 10 Sep 1998 21:58:26 +0200
mozilla (5.0b1-2) unstable; urgency=low
* Made mozilla-smotif and mozilla-dmotif conflict with and replace each
other; both now provide mozilla, so that we can cope with a lesstif
version when there is one.
* Put packages in contrib and added a README.contrib-only file to explain
why.
* Tweaked ns/cmd/xfe/Makefile to force a build of the dynamic Motif version.
My previous change to this had made both versions dynamically linked to
Motif. With no change at all, both versions were statically linked.
-- Oliver Elphick <Oliver.Elphick@lfix.co.uk> Wed, 8 Apr 1998 13:17:10 +0100
mozilla (5.0b1-1) unstable; urgency=low
* Linked with Motif 2.1 and libc6
* Modified ns/cmd/xfe/Makefile to force it to build a version dynamically
linked to Motif.
* Created -smotif and -dmotif packages.
* New Maintainer
-- Oliver Elphick <Oliver.Elphick@lfix.co.uk> Tue, 7 Apr 1998 11:25:16 +0100
mozilla (5.0b1-0.0) unstable; urgency=low
* First release.
* I don't intend to maintain this package becuase:
1. I don't have a libc6 motif (this is built with a libc5 motif, though
the package only depends on libc6 and it works ok). Ideally, the
maintainer should have libc6 motif.
2. I don't have enough disk space, cpu time, bandwidth, or free time to
maintain it.
So this is just a quickie to get the package out. Somebody else should
take it from here.
* Applied some minor fixes to make it work. In particular, cmd/xfe/foo.c
is a nasty hack to define a symbol that my motif libs needed.
-- Joey Hess <joeyh@master.debian.org> Tue, 31 Mar 1998 16:43:55 -0800
Local variables:
mode: debian-changelog
End:

View File

@@ -0,0 +1,101 @@
Source: mozilla
Section: net
Priority: optional
Maintainer: Debian Mozilla maintainers <mozilla@packages.debian.org>
Standards-Version: 2.5.1
Package: mozilla
Architecture: any
Depends: ${shlibs:Depends}, libnspr3
Recommends: mime-support
Suggests: postscript-viewer, pdf-viewer, eeyes | imagemagick | netpbm | xli | xloadimage | xv, xanim | ucbmpeg-play, freeamp | amp | splay | maplay | mpg123 | xmms
Conflicts: mozilla-dmotif, mozilla-smotif
Replaces: mozilla-dmotif, mozilla-smotif
Provides: www-browser
Description: An Open Source WWW browser for X and GTK+
Mozilla is a sophisticated graphical World-Wide-Web browser, with large
number of various browser features like support for HTML 4.0, CSS 2,
JavaScript and Java. Of course, besides the network option, it can also
be used as a standalone HTML viewer.
.
Mozilla is based on part of the codebase of the well known "netscape"
("communicator" or "navigator") browser. It was opened up to the Open
Source (TM) community by Netscape Communications under a new NPL licence.
.
See the website http://www.mozilla.org/ for more information on the
development of mozilla.
Package: mozilla-mailnews
Architecture: any
Depends: mozilla (= ${Source-Version}), libnspr3
Recommends: mime-support
Suggests: mail-transport-agent
Provides: mail-reader, imap-client, news-reader
Description: An Open Source WWW browser for X and GTK+, mail and news files
Mozilla is a sophisticated graphical World-Wide-Web browser, with large
number of various browser features like support for HTML 4.0, CSS 2,
JavaScript and Java. Of course, besides the network option, it can also
be used as a standalone HTML viewer.
.
Mozilla is based on part of the codebase of the well known "netscape"
("communicator" or "navigator") browser. It was opened up to the Open
Source (TM) community by Netscape Communications under a new NPL licence.
.
See the website http://www.mozilla.org/ for more information on the
development of mozilla.
Package: mozilla-editor
Architecture: any
Depends: mozilla (= ${Source-Version}), libnspr3
Suggests: httpd
Description: An Open Source WWW browser for X and GTK+, editor files
Mozilla is a sophisticated graphical World-Wide-Web browser, with large
number of various browser features like support for HTML 4.0, CSS 2,
JavaScript and Java. Of course, besides the network option, it can also
be used as a standalone HTML viewer.
.
Mozilla is based on part of the codebase of the well known "netscape"
("communicator" or "navigator") browser. It was opened up to the Open
Source (TM) community by Netscape Communications under a new NPL licence.
.
See the website http://www.mozilla.org/ for more information on the
development of mozilla.
Package: libnspr3
Section: libs
Architecture: any
Depends: ${shlibs:Depends}
Conflicts: libnspr20, libnspr21
Replaces: libnspr20, libnspr21
Description: Netscape Portable Runtime library
This library provides platform independent non-GUI operating system
facilities including:
* threads,
* thread synchronisation,
* normal file I/O and network I/O,
* interval timing and calender time,
* basic memory management (malloc and free),
* shared library linking.
.
See http://www.mozilla.org/docs/refList/refNSPR/ for more information.
Package: libnspr3-dev
Section: libs
Architecture: any
Depends: libc6-dev, xlib6g-dev, libnspr3 (= ${Source-Version})
Conflicts: libnspr20-dev, libnspr21-dev
Replaces: libnspr20-dev, libnspr21-dev
Description: Netscape Portable Runtime library - development files
NSPR provides platform independence for non-GUI operating system
facilities including:
* threads,
* thread synchronisation,
* normal file I/O and network I/O,
* interval timing and calender time,
* basic memory management (malloc and free),
* shared library linking.
.
See http://www.mozilla.org/docs/refList/refNSPR/ for more information.
.
You need this package to get includes and static libraries for building
programs linked to NSPR.

View File

@@ -0,0 +1,13 @@
This package was originally put together by Joey Hess <joeyh@debian.org>.
People who contributed were: Oliver Elphick, J.H.M. Dassen (Ray),
Josip Rodin, Brent Fulgham.
Today, package is maintained by the maintenance team which consists
of Josip Rodin and Brent Fulgham, at <mozilla@packages.debian.org>.
Original source can be found at:
ftp://ftp.mozilla.org/pub/mozilla/releases/
ftp://ftp.mozilla.org/pub/mozilla/nightly/
The following copyright (from ../LICENCE) applies to this package:

View File

@@ -0,0 +1,5 @@
mozilla_19990716.M8-3_i386.deb net optional
mozilla-mailnews_19990716.M8-3_i386.deb net optional
mozilla-editor_19990716.M8-3_i386.deb net optional
libnspr3_19990716.M8-3_i386.deb libs optional
libnspr3-dev_19990716.M8-3_i386.deb libs optional

View File

@@ -0,0 +1,4 @@
usr/lib
usr/include/nspr
usr/doc

View File

@@ -0,0 +1,2 @@
usr/lib
usr/doc

View File

@@ -0,0 +1,6 @@
#! /bin/sh
set -e
if [ "$1" = "configure" ]; then
ldconfig
fi

View File

@@ -0,0 +1,3 @@
libnspr3 libnspr3
libplc3 libnspr3
libplds3 libnspr3

View File

@@ -0,0 +1 @@
shlibs:Depends=libc6 (>= 2.1)

View File

@@ -0,0 +1,2 @@
?package(mozilla):needs="x11" section="Apps/Net" \
title="Mozilla Navigator" command="mozilla"

View File

@@ -0,0 +1,4 @@
usr/lib/mozilla
usr/lib/mozilla/components
usr/lib/mozilla/chrome/editor
usr/doc

View File

@@ -0,0 +1,2 @@
usr/lib/mozilla/components/libender.so
usr/lib/mozilla/chrome/editor

View File

@@ -0,0 +1 @@
shlibs:Depends=libc6 (>= 2.1), libstdc++2.9-glibc2.1

View File

@@ -0,0 +1,9 @@
usr/lib/mozilla
usr/lib/mozilla/chrome
usr/lib/mozilla/chrome/addressbook
usr/lib/mozilla/chrome/messenger
usr/lib/mozilla/chrome/messengercompose
usr/lib/mozilla/components
usr/lib/mozilla/res
usr/lib/mozilla/res/mailnews
usr/doc

View File

@@ -0,0 +1,15 @@
usr/lib/mozilla/libmsgbaseutil.so
usr/lib/mozilla/chrome/addressbook
usr/lib/mozilla/chrome/messenger
usr/lib/mozilla/chrome/messengercompose
usr/lib/mozilla/components/addrbook.xpt
usr/lib/mozilla/components/libaddrbook.so
usr/lib/mozilla/components/liblocalmail.so
usr/lib/mozilla/components/libmailnews.so
usr/lib/mozilla/components/libmime*.so
usr/lib/mozilla/components/libmork.so
usr/lib/mozilla/components/libmsg*.so
usr/lib/mozilla/components/libvcard.so
usr/lib/mozilla/components/mailnews.xpt
usr/lib/mozilla/components/msg*.xpt
usr/lib/mozilla/res/mailnews

View File

@@ -0,0 +1 @@
shlibs:Depends=libc6 (>= 2.1), libstdc++2.9-glibc2.1

View File

@@ -0,0 +1,6 @@
usr/bin
usr/lib/mozilla
usr/lib/mozilla/chrome
usr/lib/mozilla/components
usr/lib/mozilla/res
usr/doc/mozilla

View File

@@ -0,0 +1,2 @@
text/html; /usr/bin/mozilla %s; description=HTML Text; nametemplate=%s.html; priority=3

View File

@@ -0,0 +1,6 @@
# Automatically added by dh_installmime
if [ -x /usr/sbin/update-mime ]; then update-mime; fi
# End automatically added section
# Automatically added by dh_installmenu
if test -x /usr/bin/update-menus ; then update-menus ; fi
# End automatically added section

View File

@@ -0,0 +1,6 @@
# Automatically added by dh_installmime
if [ -x /usr/sbin/update-mime ]; then update-mime; fi
# End automatically added section
# Automatically added by dh_installmenu
if test -x /usr/bin/update-menus ; then update-menus ; fi
# End automatically added section

View File

@@ -0,0 +1,117 @@
#!/usr/bin/make -f
# Derived from debhelper/dh_make example.
#export DH_VERBOSE=1
# Set by configure (plus USE_AUTOCONF=1), but useful for NSPR
export MOZILLA_CLIENT=1
export BUILD_OPT=1
export NO_STATIC_LIB=1
# untested upstream - export USE_IPV6=$(shell cpp debian/testipv6 | sh -)
export USE_PTHREADS=1
nspr = libnspr3
nsprdev = libnspr3-dev
mailnews = mozilla-mailnews
editor = mozilla-editor
TOP=..
build: build-stamp
build-stamp:
dh_testdir
test -d build-nspr || mkdir build-nspr
test -s build-nspr/lib/$(nspr).so || $(MAKE) -C nsprpub DIST=`pwd`/build-nspr
test -d obj-`./build/autoconf/config.guess` || mkdir obj-`./build/autoconf/config.guess`
cd obj-`./build/autoconf/config.guess` && \
LD_LIBRARY_PATH=`cd ..;pwd`/build-nspr/lib \
$(TOP)/configure --verbose --prefix=/usr \
--disable-debug --disable-profile --disable-crypto \
--disable-netcast --disable-java --disable-oji --disable-static \
--disable-tests --disable-smart-mail --enable-mailnews \
--enable-editor --enable-ldap --enable-optimize --with-pthreads \
--with-jpeg=/usr/include --with-png=/usr/include \
--with-zlib=/usr/include --with-nspr=`cd $(TOP);pwd`/build-nspr
cd obj-`./build/autoconf/config.guess` && LD_LIBRARY_PATH=`cd $(TOP);pwd`/build-nspr/lib $(MAKE)
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp install-stamp
-cd nsprpub ; $(MAKE) realclean
rm -rf build-nspr obj-`./build/autoconf/config.guess`
# find . -type f -name Makefile ! -path '*nsprpub*' | xargs -r rm
dh_clean
install: install-stamp
install-stamp: build-stamp
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs -a
cp -pR build-nspr/lib/*.so* `pwd`/debian/$(nspr)/usr/lib
cd `pwd`/debian/$(nspr)/usr/lib ; /sbin/ldconfig -n .
# cd `pwd`/debian/$(nspr)/usr/lib ; for i in * ; do ln -s $$i $$i.0 ; done
cp -pR build-nspr/include/* `pwd`/debian/$(nsprdev)/usr/include/nspr
cp -pR build-nspr/lib/*.a `pwd`/debian/$(nsprdev)/usr/lib
# this may fail, but who cares
-cp -pR obj-`./build/autoconf/config.guess`/dist/bin/* `pwd`/debian/tmp/usr/lib/mozilla
install -m 755 `pwd`/debian/runner `pwd`/debian/tmp/usr/bin/mozilla
# # Okay, lets move a bunch of mail-news stuff to its own place
# Note: We have to cd and set sourcedir because the debian directory
# now lives in mozilla/build/package and dh_movefiles won't work
# across the symlink.
cd `pwd`/build/package; \
dh_movefiles --sourcedir=debian/tmp -a
touch install-stamp
binary-indep: build
# We have nothing to do by default, no architecture-independent files here.
binary-arch: build install
dh_testdir -a
dh_testroot -a
cd debian/ ; cat copyright.short > copyright
cat LICENSE >> debian/copyright
dh_installdocs -pmozilla LEGAL
dh_installdocs -p$(nspr)
dh_installmime -pmozilla
rm debian/copyright
# dh_installexamples `find -name '*.ad'`
dh_installmenu -pmozilla
# Running this is a baaad idea.
# dh_installmanpages
dh_undocumented -pmozilla mozilla.1
dh_installchangelogs -pmozilla
dh_installchangelogs -p$(nspr)
cd `pwd`/debian/$(nsprdev)/usr/doc ; ln -s /usr/doc/$(nspr) ./$(nsprdev)
cd `pwd`/debian/$(mailnews)/usr/doc ; ln -s /usr/doc/mozilla ./$(mailnews)
cd `pwd`/debian/$(editor)/usr/doc ; ln -s /usr/doc/mozilla ./$(editor)
dh_strip -a
dh_compress -a
dh_fixperms -a
dh_installdeb -a
cd debian ; cat $(nspr).shlibs > shlibs.local
env LD_LIBRARY_PATH=`pwd`/debian/$(nspr)/usr/lib:`pwd`/debian/tmp/usr/lib/mozilla \
dh_shlibdeps -pmozilla -plibnspr3 -p$(mailnews) -p$(editor)
rm -f debian/shlibs.local
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary # quicktest make

View File

@@ -0,0 +1,20 @@
#!/bin/sh
# A simple script to start mozilla.
MOZILLA_DIR=/usr/lib/mozilla
# Check for a $HOME/.mozilla directory. If it doesn't exist, create a GOOD one
if [ ! -d $HOME/.mozilla ]
then
cd $HOME
mkdir .mozilla
for file in $MOZILLA_DIR/*; do
if [ `basename $file` != component.reg ]; then
ln -s $file $HOME/.mozilla
fi
done
fi
export LD_LIBRARY_PATH=$MOZILLA_DIR MOZILLA_FIVE_HOME=$HOME/.mozilla
exec $MOZILLA_DIR/apprunner "$@"

View File

@@ -0,0 +1 @@
shlibs:Depends=libc6 (>= 2.1), libglib1.2 (>= 1.2.0), libgtk1.2 (>= 1.2.3-2), libjpeg62, libpng2, libstdc++2.9-glibc2.1, orbit (>= 0.4.3-1), xlib6g (>= 3.3.3.1-1), zlib1g (>= 1:1.1.3)

View File

@@ -0,0 +1,8 @@
#include <features.h>
#if defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC__ + __GLIBC_MINOR__ >= 3)
/* For IPv6 support, glibc2.1 or newer is required */
echo 1
#else
/* Sorry, no IPv6 support */
echo 0
#endif

View File

@@ -0,0 +1,252 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
#
# The way this thing works:
#
# + A packages file is parsed. This file contains something
# that looks like this (note that spaces are illegal):
#
# +----------------------------------------------
# |nspr:nsprpub
# |core:build,db,xpcom,intl,js,modules/libutil,modules/security/freenav,modules/libpref,modules/libimg,modules/libjar,caps
# |network:netwerk
# |layout:htmlparser,gfx,dom,view,widget/timer,widget,layout,webshell,editor,modules/plugin
# |xpinstall:xpinstall
# |profile:profile
# |xptoolkit:xpfe,rdf
# |cookie:extensions/cookie
# |wallet:extensions/wallet
# |mailnews:mailnews
# +----------------------------------------------
#
# + For each package, a list of modules corresponding to that
# package is parsed. Each modules corresponds to a
# directory somewhere in a mozilla build tree - usually
# the toplevel ones (ie, layout, nsprpub, xpcom) but not
# always (ie, extensions/wallet)
#
# + For each module, print-module-filelist.sh is invoked.
# The output of that is parsed and converted from the
# crazy mozilla install hierarchy to something that
# makes sense on a linux box.
#
# For example:
#
# bin/components/libraptorhtml.so
#
# becomes
#
# %{prefix}/lib/mozilla/components/libraptorhtml.so
#
# + Also, this script determines which files belong in
# a devel package. For example, "include/*" and "idl/*"
name=generate-package-info.sh
if [ $# -lt 4 ]
then
echo
echo "Usage: $name package-list module-list-dir outdir mozdir"
echo
exit 1
fi
package_list=$1
module_list_dir=$2
outdir=$3
mozdir=$4
if [ ! -f $package_list ]
then
echo
echo "$name: Cant access package file $package_list."
echo
exit 1
fi
if [ ! -d $module_list_dir ]
then
echo
echo "$name: Cant access module list dir $package_list."
echo
exit 1
fi
if [ ! -d $outdir ]
then
echo
echo "$name: Cant access outdir $outdir."
echo
exit 1
fi
if [ ! -d $mozdir ]
then
echo
echo "$name: Cant access mozdir $mozdir."
echo
exit 1
fi
rm -rf $outdir/*
packages=`cat $package_list | grep -v -e "^#.*$" | grep -v -e "^[ \t]*$"`
for p in $packages
do
package=`echo $p | awk -F":" '{ print $1; }'`
modules=`echo $p | awk -F":" '{ print $2; }' | tr "," " "`
file_list=$outdir/mozilla-$package-file-list.txt
file_list_devel=$outdir/mozilla-$package-devel-file-list.txt
tmp_raw=/tmp/raw-list.$$.tmp
tmp_file_list=/tmp/file-list.$$.tmp
tmp_file_list_devel=/tmp/file-list-devel.$$.tmp
tmp_dir_list=/tmp/dir-list.$$.tmp
tmp_dir_list_devel=/tmp/dir-list-devel.$$.tmp
# echo "package=$package"
# echo "modules=$modules"
# echo "file_list=$file_list"
# echo "file_list_devel=$file_list_devel"
# echo "#################"
rm -f $tmp_raw $file_list $file_list_devel
rm -f $tmp_file_list $tmp_file_list_devel
rm -f $tmp_dir_list $tmp_dir_list_devel
touch $tmp_raw $file_list $file_list_devel
touch $tmp_file_list $tmp_file_list_devel
touch $tmp_dir_list $tmp_dir_list_devel
print_cmd=$mozdir/build/package/rpm/print-module-filelist.sh
here=`pwd`
# Write the raw file list
for m in $modules
do
cd $mozdir/$m
$print_cmd >> $tmp_raw
done
cd $here
# Munge the raw list into the file list
for i in `cat $tmp_raw`
do
prefix=`echo $i | awk -F"/" '{ print $1; }'`
case "$prefix"
in
# dirs
DIR:*)
dir=`echo $i | cut -b5-`
case "$dir"
in
include*)
echo $dir >> $tmp_dir_list_devel
;;
*)
prefix2=`echo $dir | awk -F"/" '{ print $2; }'`
case "$prefix2"
in
# Cut out the "bin/" from these
res|chrome|defaults)
echo $dir | cut -b5- >> $tmp_dir_list
;;
esac
;;
esac
;;
##
## XXX: This one needs to be smarter and catch more devel only
## stuff. For example, the gecko viewer and all its resources
## should go in the devel package. This would in turn make the
## regular package smaller.
##
# include, idl, lib
include|idl|lib)
echo $i >> $tmp_file_list_devel
;;
# bin the evil
bin)
prefix2=`echo $i | awk -F"/" '{ print $2; }'`
case "$prefix2"
in
# Cut out the "bin/" from these
components|res|chrome|defaults|netscape.cfg)
echo $i | cut -b5- >> $tmp_file_list
;;
# whatever else in "bin/"
*)
# Move special files in "bin/" around
base=`basename $i`
case "$base"
in
# Mozilla brillantly puts .so files in "bin/" bleh
*.so)
echo "lib/$base" >> $tmp_file_list
;;
*)
echo $i >> $tmp_file_list
;;
esac
;;
esac
;;
# whatever else
*)
echo $i >> $tmp_file_list
;;
esac
done
# Spit out sorted file lists
cat $tmp_dir_list | sort | uniq | awk '{ printf("%%dir %%{prefix}/lib/mozilla/%s\n" , $0); }' >> $file_list
cat $tmp_file_list | sort | uniq | awk '{ printf("%%{prefix}/lib/mozilla/%s\n" , $0); }' >> $file_list
cat $tmp_dir_list_devel | sort | uniq | awk '{ printf("%%dir %%{prefix}/lib/mozilla/%s\n" , $0); }' >> $file_list_devel
cat $tmp_file_list_devel | sort | uniq | awk '{ printf("%%{prefix}/lib/mozilla/%s\n" , $0); }' >> $file_list_devel
# Cleanup
rm -f $tmp_raw $tmp_file_list $tmp_file_list_devel $tmp_dir_list $tmp_dir_list_devel
done

View File

@@ -0,0 +1,133 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
##
## Usage:
##
## $ mozilla
##
## This script is meant to run a mozilla program from the mozilla
## rpm installation.
##
## The script will setup all the environment voodoo needed to make
## mozilla work.
##
## Standard shell script disclaimer blurb thing:
##
## This script is a hcak. Its brute force. Its horrible.
## It doesnt use Artificial Intelligence. It doesnt use Virtual Reality.
## Its not perl. Its not python. It probably wont work unchanged on
## the "other" thousands of unices. But it worksforme.
##
## If you have an improvement, patch, idea, whatever, on how to make this
## script better, post it here:
##
## news://news.mozilla.org/netscape.public.mozilla.patches
## news://news.mozilla.org/netscape.public.mozilla.unix
##
##
##
## Potential improvements:
##
## + Run ldd on the program and report missing dlls
## + All the "other" unices/packages
##
cmdname=`basename $0`
##
## location of the apprunner binary.
##
MOZ_APPRUNNER_NAME="/usr/lib/mozilla/bin/apprunner"
##
## Variables
##
MOZ_DIST_BIN=""
MOZ_PROGRAM=""
##
## Functions
##
moz_bail()
{
message=$1
echo
echo "$cmdname: $message"
echo
exit 1
}
moz_test_binary()
{
binary=$1
if [ -f "$binary" ]
then
if [ -x "$binary" ]
then
return 1
fi
fi
return 0
}
moz_test_binary $MOZ_APPRUNNER_NAME
if [ $? -eq 1 ]
then
MOZ_PROGRAM=$MOZ_APPRUNNER_NAME
fi
##
## Make sure the program is executable
##
if [ ! -x $MOZ_PROGRAM ]
then
moz_bail "Cannot execute $MOZ_PROGRAM."
fi
##
## Set MOZILLA_FIVE_HOME
##
MOZILLA_FIVE_HOME="/usr/lib/mozilla"
export MOZILLA_FIVE_HOME
##
## Set LD_LIBRARY_PATH
##
if [ "$LD_LIBRARY_PATH" ]
then
LD_LIBRARY_PATH=/usr/lib/mozilla/lib:$LD_LIBRARY_PATH
else
LD_LIBRARY_PATH=/usr/lib/mozilla/lib
fi
export LD_LIBRARY_PATH
exec $MOZ_PROGRAM ${1+"$@"}

View File

@@ -0,0 +1,10 @@
nspr:nsprpub
core:build,db,xpcom,intl,js,modules/libutil,modules/security/freenav,modules/libpref,modules/libimg,modules/libjar,caps
network:netwerk
layout:htmlparser,gfx,dom,view,widget/timer,widget,layout,webshell,editor,modules/plugin
xpinstall:xpinstall
profile:profile
xptoolkit:xpfe,rdf
cookie:extensions/cookie
wallet:extensions/wallet
mailnews:mailnews

View File

@@ -0,0 +1,115 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
##
## Usage:
##
## $ mozilla
##
## This script is meant to run a mozilla program from the mozilla
## rpm installation.
##
## The script will setup all the environment voodoo needed to make
## mozilla work.
##
## Standard shell script disclaimer blurb thing:
##
## This script is a hcak. Its brute force. Its horrible.
## It doesnt use Artificial Intelligence. It doesnt use Virtual Reality.
## Its not perl. Its not python. It probably wont work unchanged on
## the "other" thousands of unices. But it worksforme.
##
## If you have an improvement, patch, idea, whatever, on how to make this
## script better, post it here:
##
## news://news.mozilla.org/netscape.public.mozilla.patches
## news://news.mozilla.org/netscape.public.mozilla.unix
##
##
##
## Potential improvements:
##
## + Run ldd on the program and report missing dlls
## + All the "other" unices/packages
##
cmdname=`basename $0`
##
## location of the viewer binary.
##
MOZ_VIEWER_NAME="/usr/lib/mozilla/bin/viewer"
##
## Variables
##
MOZ_PROGRAM=""
##
## Functions
##
moz_bail()
{
message=$1
echo
echo "$cmdname: $message"
echo
exit 1
}
moz_test_binary()
{
binary=$1
if [ -f "$binary" ]
then
if [ -x "$binary" ]
then
return 1
fi
fi
return 0
}
MOZ_PROGRAM=$MOZ_APPRUNNER_NAME
moz_test_binary $MOZ_PROGRAM
if [ $? -eq 0 ]
then
moz_bail "Cannot execute $MOZ_PROGRAM."
fi
##
## Set MOZILLA_FIVE_HOME
##
MOZILLA_FIVE_HOME="/usr/lib/mozilla"
export MOZILLA_FIVE_HOME
exec $MOZ_PROGRAM ${1+"$@"}

View File

@@ -0,0 +1,409 @@
Summary: Mozilla and stuff
Name: mozilla
Version: 5.0
Release: 0
Serial: 0
Copyright: NPL/MPL
Group: Mozilla
Source0: ftp://ftp.mozilla.org/pub/mozilla/nightly/latest/mozilla-source.tar.gz
#Source0: ftp://ftp.mozilla.org/pub/mozilla/nightly/latest/mozilla-binary.tar.gz
Buildroot: /var/tmp/mozilla-root
Prefix: /usr
Requires: gtk+ >= 1.2.4
#
# TODO: lots of stuff
#
# + Add nice summary and description entries
#
# + Make sure the requires entries make sense
#
# + Add more packages for other mozilla extensions (for instance: irc)
#
# + Remove and/or combine the current packages that make more sense
#
# + mozilla-xpcom package ?
#
# + should nspr be its own package ?
#
# + it is probably a good idea to have a mozilla-browser package
# instead of mozilla-xptoolkit
#
# + the mozilla-xpinstall package obviously doesnt make sense -
# its there for show
#
# + a lot of stuff is dumped into the default package that
# should really be in the devel package. For example the
# gecko viewer and all its tests.
#
# For the code that determines what goes where, see:
#
# mozilla/build/package/rpm/print-module-filelist.sh
# mozilla/build/package/rpm/generate-package-info.sh
#
#Exclusivearch: i386
%description
Mozilla is the king of all beasts - big badass Beasts.
%package nspr
Summary: mozilla-nspr
Group: Mozilla
%description nspr
mozilla-nspr
%package nspr-devel
Requires: mozilla-nspr
Summary: mozilla-nspr-devel
Group: Mozilla
%description nspr-devel
mozilla-nspr devel
%package core
Summary: mozilla-core
Group: Mozilla
Requires: mozilla-nspr
%description core
mozilla-core
%package core-devel
Requires: mozilla-core
Summary: mozilla-core-devel
Group: Mozilla
Requires: mozilla-nspr-devel
%description core-devel
mozilla-core devel
%package network
Summary: mozilla-network
Group: Mozilla
Requires: mozilla-core
%description network
mozilla-network
%package network-devel
Requires: mozilla-network
Summary: mozilla-network-devel
Group: Mozilla
Requires: mozilla-core-devel
%description network-devel
mozilla-network devel
%package layout
Summary: mozilla-layout
Group: Mozilla
Requires: mozilla-network
%description layout
mozilla-layout
%package layout-devel
Requires: mozilla-layout
Summary: mozilla-layout-devel
Group: Mozilla
Requires: mozilla-network-devel
%description layout-devel
mozilla-layout devel
%package xpinstall
Summary: mozilla-xpinstall
Group: Mozilla
Requires: mozilla-layout
%description xpinstall
mozilla-xpinstall
%package xpinstall-devel
Requires: mozilla-xpinstall
Summary: mozilla-xpinstall-devel
Group: Mozilla
Requires: mozilla-layout-devel
%description xpinstall-devel
mozilla-xpinstall devel
%package profile
Summary: mozilla-profile
Group: Mozilla
Requires: mozilla-layout
%description profile
mozilla-profile
%package profile-devel
Requires: mozilla-profile
Summary: mozilla-profile-devel
Group: Mozilla
Requires: mozilla-layout-devel
%description profile-devel
mozilla-profile devel
%package xptoolkit
Summary: mozilla-xptoolkit
Group: Mozilla
Requires: mozilla-layout
%description xptoolkit
mozilla-xptoolkit
%package xptoolkit-devel
Requires: mozilla-xptoolkit
Summary: mozilla-xptoolkit-devel
Group: Mozilla
Requires: mozilla-layout-devel
%description xptoolkit-devel
mozilla-xptoolkit devel
%package cookie
Summary: mozilla-cookie
Group: Mozilla
Requires: mozilla-layout
%description cookie
mozilla-cookie
%package cookie-devel
Requires: mozilla-cookie
Summary: mozilla-cookie-devel
Group: Mozilla
Requires: mozilla-layout-devel
%description cookie-devel
mozilla-cookie devel
%package wallet
Summary: mozilla-wallet
Group: Mozilla
Requires: mozilla-layout
%description wallet
mozilla-wallet
%package wallet-devel
Requires: mozilla-wallet
Summary: mozilla-wallet-devel
Group: Mozilla
Requires: mozilla-layout-devel
%description wallet-devel
mozilla-wallet devel
%package mailnews
Summary: mozilla-mailnews
Group: Mozilla
Requires: mozilla-layout
%description mailnews
mozilla-mailnews
%package mailnews-devel
Requires: mozilla-mailnews
Summary: mozilla-mailnews-devel
Group: Mozilla
Requires: mozilla-layout-devel
%description mailnews-devel
mozilla-mailnews devel
%prep
%setup -n mozilla
%install
rm -rf $RPM_BUILD_ROOT
################################
#
# Remember where we are
#
################################
here=`pwd`
################################
#
# configure
#
################################
if [ 1 ]
then
###
###
###
rm -f $here/blank
touch $here/blank
MOZCONFIG=blank
export MOZCONFIG
./configure --disable-tests --with-xlib=no --with-motif=no --disable-gtk-mozilla
#./configure --disable-debug --enable-optimize --disable-mailnews --disable-tests --with-xlib=no --with-motif=no --enable-strip-libs --disable-gtk-mozilla
make
fi
################################
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/mozilla
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/mozilla/plugins
################################
#
# Generate the package lists
#
################################
here=`pwd`
mkdir -p $here/file-lists
cd build/package/rpm
./generate-package-info.sh mozilla-package-list.txt . $here/file-lists $here
cd $here
################################
################################
#
# Copy the stuff in dist/* to the rpm stage place
#
################################
cp -r dist/* $RPM_BUILD_ROOT/%{prefix}/lib/mozilla/
cd $RPM_BUILD_ROOT/%{prefix}/lib/mozilla/
/bin/mv -f bin/*.so lib
/bin/mv -f bin/chrome .
/bin/mv -f bin/components .
/bin/mv -f bin/defaults .
/bin/mv -f bin/netscape.cfg .
/bin/mv -f bin/res .
strip lib/*.so
strip components/*.so
cd $here
install -m 755 build/package/rpm/mozilla $RPM_BUILD_ROOT/%{prefix}/lib/mozilla/bin
################################
##
## This function gets called on the %post stage to make sure any
## new components that are installed in the system get
## registered to component.reg
##
%define call_regxpcom here=`pwd` ; cd %{prefix}/lib/mozilla ; LD_LIBRARY_PATH=`pwd`/lib ./bin/regxpcom ; cd $here
%clean
rm -rf $RPM_BUILD_ROOT
%files -f file-lists/mozilla-nspr-file-list.txt nspr
%defattr(-,root,root)
%files -f file-lists/mozilla-nspr-devel-file-list.txt nspr-devel
%defattr(-,root,root)
%files -f file-lists/mozilla-core-file-list.txt core
%defattr(-,root,root)
%dir %{prefix}/lib/mozilla
%dir %{prefix}/lib/mozilla/bin
%dir %{prefix}/lib/mozilla/chrome
%dir %{prefix}/lib/mozilla/components
%dir %{prefix}/lib/mozilla/defaults
%dir %{prefix}/lib/mozilla/defaults/pref
%dir %{prefix}/lib/mozilla/lib
%dir %{prefix}/lib/mozilla/plugins
%dir %{prefix}/lib/mozilla/res
%files -f file-lists/mozilla-core-devel-file-list.txt core-devel
%defattr(-,root,root)
%post core
%{call_regxpcom}
%files -f file-lists/mozilla-network-file-list.txt network
%defattr(-,root,root)
%files -f file-lists/mozilla-network-devel-file-list.txt network-devel
%defattr(-,root,root)
%post network
%{call_regxpcom}
%files -f file-lists/mozilla-layout-file-list.txt layout
%defattr(-,root,root)
%files -f file-lists/mozilla-layout-devel-file-list.txt layout-devel
%defattr(-,root,root)
%post layout
%{call_regxpcom}
%files -f file-lists/mozilla-xpinstall-file-list.txt xpinstall
%defattr(-,root,root)
%files -f file-lists/mozilla-xpinstall-devel-file-list.txt xpinstall-devel
%defattr(-,root,root)
%post xpinstall
%{call_regxpcom}
%files -f file-lists/mozilla-profile-file-list.txt profile
%defattr(-,root,root)
%files -f file-lists/mozilla-profile-devel-file-list.txt profile-devel
%defattr(-,root,root)
%post profile
%{call_regxpcom}
%files -f file-lists/mozilla-xptoolkit-file-list.txt xptoolkit
%defattr(-,root,root)
%{prefix}/lib/mozilla/bin/mozilla
%files -f file-lists/mozilla-xptoolkit-devel-file-list.txt xptoolkit-devel
%defattr(-,root,root)
%post xptoolkit
%{call_regxpcom}
%files -f file-lists/mozilla-cookie-file-list.txt cookie
%defattr(-,root,root)
%files -f file-lists/mozilla-cookie-devel-file-list.txt cookie-devel
%defattr(-,root,root)
%post cookie
%{call_regxpcom}
%files -f file-lists/mozilla-wallet-file-list.txt wallet
%defattr(-,root,root)
%files -f file-lists/mozilla-wallet-devel-file-list.txt wallet-devel
%defattr(-,root,root)
%post wallet
%{call_regxpcom}
%files -f file-lists/mozilla-mailnews-file-list.txt mailnews
%defattr(-,root,root)
%files -f file-lists/mozilla-mailnews-devel-file-list.txt mailnews-devel
%defattr(-,root,root)
%post mailnews
%{call_regxpcom}
%changelog
* Wed Oct 20 1999 Ramiro Estrugo <ramiro@fateware.com>
- First rev.

View File

@@ -0,0 +1,156 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
#
# The way this thing works:
#
# + a phony $(DIST) is created: /tmp/foo
#
# + The module is instaled there so that it can be isolated and
# catalogued.
#
# + A bunch of case statements determine what gets ignored
# and what is otherwise echoed as a file or dir member for
# the module
#
# + Most of this hacks are a result of the totally messed
# way in which mozilla pretentsto do "make install"
here=`pwd`
dist=/tmp/dist-$$.tmp
raw_file_list=/tmp/raw-file-list-$$.txt
file_list=/tmp/file-list-$$.txt
raw_dir_list=/tmp/raw-dir-list-$$.txt
dir_list=/tmp/dir-list-$$.txt
rm -rf $dist $raw_file_list $file_list $raw_dir_list $dir_list
# Need to mkdir include or else "make export" in mozilla gets confused
mkdir -p $dist
mkdir -p $dist/include
make -s DIST=$dist XPDIST=$dist PUBLIC=$dist/include EXTRA_DEPS= >/dev/null 2>&1
cd $dist
find -type l | cut -b3- > $raw_file_list
find -type d | cut -b3- | grep -v -e "^[ \t]*$" > $raw_dir_list
touch $file_list
for i in `cat $raw_file_list`
do
skip="false"
dir=`echo $i | awk -F"/" '{ print $1; }'`
# "lib" voodoo
if [ "$dir" = "lib" ]
then
rest=`echo $i | cut -b5-`
bin_dup="bin/$rest"
# Dont output files in "lib/" that are duplicated in "bin/"
if [ -f "$bin_dup" ]
then
skip="true"
fi
# Test for files that need to be skipped
file=`basename $i`
case "$file"
in
# Dont skip util .a files
*util_s.a)
:
;;
# Dont skip nspr .a files
libnspr*.a|libplc*|libplds*)
:
;;
# Skip all .a files
*.a)
skip="true"
;;
# Skip .so files
*.so)
skip="true"
;;
esac
fi
if [ "$skip" != "true" ]
then
echo $i >> $file_list
# else
# echo "skipping $i"
fi
done
touch $dir_list
for i in `cat $raw_dir_list`
do
skip="false"
# Skip directories that are shared across all of mozilla's components
case $i in
# level 1
include|idl|lib|bin)
skip="true"
;;
# level 2
lib/components|bin/components|bin/chrome|bin/res|bin/defaults|bin/plugins)
skip="true"
;;
# level 3
bin/defaults/pref)
skip="true"
;;
esac
if [ "$skip" != "true" ]
then
echo DIR:$i >> $dir_list
# else
# echo "skipping $i"
fi
done
cat $file_list
cat $dir_list
rm -rf $dist $raw_file_list $file_list $raw_dir_list $dir_list
cd $here

View File

@@ -0,0 +1,26 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
#
module=`make -s echo-depth-path | cut -b9-`
echo $module

View File

@@ -0,0 +1,37 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is Mozilla Communicator client code,
# released March 31, 1998.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
export::
chmod 755 mozilla-config
$(INSTALL) -m 755 mozilla-config $(DIST)/bin
install:: $(srcdir)/run-mozilla.sh
$(INSTALL) $< $(DIST)/bin

View File

@@ -0,0 +1,8 @@
EXPORTED {
global:
NSGetFactory;
NSGetModule;
NSRegisterSelf;
NSUnregisterSelf;
local: *;
};

View File

@@ -0,0 +1,80 @@
#!/bin/sh
prefix=@prefix@
exec_prefix=@exec_prefix@
exec_prefix_set=no
usage()
{
cat <<EOF
Usage: mozilla-config [OPTIONS] [LIBRARIES]
Options:
[--prefix[=DIR]]
[--exec-prefix[=DIR]]
[--version]
[--libs]
[--cflags]
EOF
exit $1
}
if test $# -eq 0; then
usage 1 1>&2
fi
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--prefix=*)
prefix=$optarg
if test $exec_prefix_set = no ; then
exec_prefix=$optarg
fi
;;
--prefix)
echo_prefix=yes
;;
--exec-prefix=*)
exec_prefix=$optarg
exec_prefix_set=yes
;;
--exec-prefix)
echo_exec_prefix=yes
;;
--version)
echo -1
exit 0
;;
--cflags)
if test "@includedir@" != /usr/include ; then
includes="-I@includedir@"
fi
echo_cflags=yes
;;
--libs)
echo_libs=yes
;;
*)
usage 1 1>&2
;;
esac
shift
done
if test "$echo_prefix" = "yes"; then
echo $prefix
fi
if test "$echo_exec_prefix" = "yes"; then
echo $exec_prefix
fi
if test "$echo_cflags" = "yes"; then
cflags="@DEFS@"
echo $includes $cflags
fi
if test "$echo_libs" = "yes"; then
echo -L@libdir@ -lxpcom
fi

View File

@@ -0,0 +1,7 @@
USE_PTHREADS=@MOZ_NSPRENV_USE_PTHREADS@
BUILD_OPT=@MOZ_NSPRENV_BUILD_OPT@
NS_USE_GCC=@MOZ_NSPRENV_NS_USE_GCC@
NO_MDUPDATE=@MOZ_NSPRENV_NO_MDUPDATE@
NS_USE_NATIVE=@MOZ_NSPRENV_NS_USE_NATIVE@
MOZILLA_CLIENT=@MOZ_NSPRENV_MOZILLA_CLIENT@
CLASSIC_NSPR=@MOZ_NSPRENV_CLASSIC_NSPR@

View File

@@ -0,0 +1,7 @@
DIST=@MOZ_NSPRENV_DIST@
MOZ_NSPRENV_OVERRIDE_MAKE=@MOZ_NSPRENV_OVERRIDE_MAKE@
ifdef MOZ_NSPRENV_OVERRIDE_MAKE
MAKE=$(MOZ_NSPRENV_OVERRIDE_MAKE)
endif

380
mozilla/build/unix/run-mozilla.sh Executable file
View File

@@ -0,0 +1,380 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
#
##
## Usage:
##
## $ run-mozilla.sh [options] [program] [program arguments]
##
## This script is meant to run a mozilla program from the mozilla
## source tree. This is mostly useful to folks hacking on mozilla.
##
## A mozilla program is currently either viewer or mozilla-bin. The
## default is viewer.
##
## The script will setup all the environment voodoo needed to make
## mozilla work.
#
##
## Standard shell script disclaimer blurb thing:
##
## This script is a hack. It's brute force. It's horrible.
## It doesn't use Artificial Intelligence. It doesn't use Virtual Reality.
## It's not perl. It's not python. It probably won't work unchanged on
## the "other" thousands of unices. But it worksforme. --ramiro
##
## If you have an improvement, patch, idea, whatever, on how to make this
## script better, post it here:
##
## news://news.mozilla.org/netscape.public.mozilla.patches
## news://news.mozilla.org/netscape.public.mozilla.unix
##
#
##
## Potential improvements:
##
## + Run from anywhere in the tree.
## + Run ldd on the program and report missing dlls
## + Deal with NSPR in the tree
## + All the other unices
##
#
cmdname=`basename $0`
MOZ_APPRUNNER_NAME="mozilla-bin"
MOZ_VIEWER_NAME="viewer"
MOZ_DIST_BIN=""
MOZ_PROGRAM=""
#
##
## Functions
##
##########################################################################
moz_usage()
{
cat << EOF
Usage: ${cmdname} [options] [program]
options:
-g Run in debugger.
--debug
-d debugger Debugger to use.
--debugger debugger
Examples:
Run the viewer
${cmdname} viewer
Run the mozilla-bin binary
${cmdname} mozilla-bin
Debug the viewer in a debugger
${cmdname} -g viewer
Debug the mozilla-bin binary in gdb
${cmdname} -g mozilla-bin -d gdb
EOF
return 0
}
##########################################################################
moz_bail()
{
message=$1
echo
echo "$cmdname: $message"
echo
exit 1
}
##########################################################################
moz_test_binary()
{
binary=$1
if [ -f "$binary" ]
then
if [ -x "$binary" ]
then
return 1
fi
fi
return 0
}
##########################################################################
moz_get_debugger()
{
debuggers="ddd gdb dbx"
debugger="notfound"
done="no"
for d in $debuggers
do
dpath=`which ${d}`
if [ -x "$dpath" ]
then
debugger=$dpath
break
fi
done
echo $debugger
return 0
}
##########################################################################
moz_run_program()
{
prog=$MOZ_PROGRAM
##
## Make sure the program is executable
##
if [ ! -x "$prog" ]
then
moz_bail "Cannot execute $prog."
fi
##
## Use md5sum to crc a core file. If md5sum is not found on the system,
## then dont debug core files.
##
crc_prog=`which md5sum`
if [ -x "$crc_prog" ]
then
DEBUG_CORE_FILES=1
fi
if [ "$DEBUG_CORE_FILES" ]
then
crc_old=
if [ -f core ]
then
crc_old=`$crc_prog core | awk '{print $1;}' `
fi
fi
##
## Run the program
##
$prog ${1+"$@"}
if [ "$DEBUG_CORE_FILES" ]
then
if [ -f core ]
then
crc_new=`$crc_prog core | awk '{print $1;}' `
fi
fi
if [ "$crc_old" != "$crc_new" ]
then
printf "\n\nOh no! %s just dumped a core file.\n\n" $prog
printf "Do you want to debug this ? "
printf "You need a lot of memory for this, so watch out ? [y/n] "
read ans
if [ "$ans" = "y" ]
then
debugger=`moz_get_debugger`
if [ -x "$debugger" ]
then
echo "$debugger $prog core"
# See http://www.mozilla.org/unix/debugging-faq.html
# For why LD_BIND_NOW is needed
LD_BIND_NOW=1; export LD_BIND_NOW
$debugger $prog core
else
echo "Could not find a debugger on your system."
fi
fi
fi
}
##########################################################################
moz_debug_program()
{
prog=$MOZ_PROGRAM
##
## Make sure the program is executable
##
if [ ! -x "$prog" ]
then
moz_bail "Cannot execute $prog."
fi
if [ -n "$moz_debugger" ]
then
debugger=`which $moz_debugger`
else
debugger=`moz_get_debugger`
fi
if [ -x "$debugger" ]
then
echo "$debugger $prog ${1+"$@"}"
$debugger $prog ${1+"$@"}
else
echo "Could not find a debugger on your system."
fi
}
##########################################################################
##
## Command line arg defaults
##
moz_debug=0
moz_debugger=""
#
##
## Parse the command line
##
while [ $# -gt 0 ]
do
case $1 in
-h | --help)
moz_usage
exit 0
;;
-g | --debug)
moz_debug=1
shift
;;
-d | --debugger)
moz_debugger=$2;
shift 2
;;
*)
break;
;;
esac
done
#
##
## Program name given in $1
##
if [ $# -gt 0 ]
then
MOZ_PROGRAM=$1
shift
fi
##
## Program not given, try to guess a default
##
if [ -z "$MOZ_PROGRAM" ]
then
##
## Try viewer
##
moz_test_binary $MOZ_VIEWER_NAME
if [ $? -eq 1 ]
then
MOZ_PROGRAM=$MOZ_VIEWER_NAME
##
## Try mozilla-bin
##
else
moz_test_binary $MOZ_APPRUNNER_NAME
if [ $? -eq 1 ]
then
MOZ_PROGRAM=$MOZ_APPRUNNER_NAME
fi
fi
fi
#
##
## Running the program from its source dir
##
if [ -f Makefile.in ]
then
# Use DEPTH in the Makefile.in to determine the depth
depth=`grep -w DEPTH Makefile.in | grep -e "\.\." | awk -F"=" '{ print $2; }'`
##
## Make sure dist/bin exists
##
if [ ! -d $depth/dist/bin ]
then
moz_bail "$depth/dist/bin does not exist."
fi
# push
here=`pwd`
cd $depth/dist/bin
MOZ_DIST_BIN=`pwd`
# pop
cd $here
else
##
## Running the program from dist/bin
##
if [ -d components -a -d res ]
then
MOZ_DIST_BIN=`pwd`
fi
fi
#
##
## Make sure dist/bin is ok
##
if [ -z "$MOZ_DIST_BIN" ]
then
moz_bail "Cannot access dir dist/bin directory."
fi
#
if [ ! -d $MOZ_DIST_BIN ]
then
moz_bail "Cannot access dir dist/bin directory."
fi
#
##
## Make sure the program is executable
##
if [ ! -x "$MOZ_PROGRAM" ]
then
moz_bail "Cannot execute $MOZ_PROGRAM."
fi
#
##
## Set MOZILLA_FIVE_HOME
##
MOZILLA_FIVE_HOME=$MOZ_DIST_BIN
#
##
## Set LD_LIBRARY_PATH
LD_LIBRARY_PATH=${MOZ_DIST_BIN}${LD_LIBRARY_PATH+":$LD_LIBRARY_PATH"}
#
## Set SHLIB_PATH for HPUX
SHLIB_PATH=${MOZ_DIST_BIN}${SHLIB_PATH+":$SHLIB_PATH"}
#
## Set LIBPATH for AIX
LIBPATH=${MOZ_DIST_BIN}${LIBPATH+":$LIBPATH"}
#
echo "MOZILLA_FIVE_HOME=$MOZILLA_FIVE_HOME"
echo " LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
echo " SHLIB_PATH=$SHLIB_PATH"
echo " LIBPATH=$LIBPATH"
echo " MOZ_PROGRAM=$MOZ_PROGRAM"
echo " MOZ_TOOLKIT=$MOZ_TOOLKIT"
echo " moz_debug=$moz_debug"
echo " moz_debugger=$moz_debugger"
#
export MOZILLA_FIVE_HOME LD_LIBRARY_PATH
export SHLIB_PATH LIBPATH
if [ "$moz_debug" = "1" ]
then
moz_debug_program ${1+"$@"}
else
moz_run_program ${1+"$@"}
fi

Some files were not shown because too many files have changed in this diff Show More