Compare commits

..

6 Commits

Author SHA1 Message Date
andreas.otte%primus-online.de
6a145586f0 incorporating changes from 02-01-2000
git-svn-id: svn://10.0.0.236/branches/ANDREAS_URL2_BRANCH@59419 18797224-902f-48f8-a5cc-f745e15eee43
2000-02-01 22:49:26 +00:00
(no author)
a7b05ca036 This commit was manufactured by cvs2svn to create branch
'ANDREAS_URL2_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/ANDREAS_URL2_BRANCH@59396 18797224-902f-48f8-a5cc-f745e15eee43
2000-02-01 14:26:29 +00:00
andreas.otte%primus-online.de
b35e3f6b98 removing printfs, adding an nsUnescape
git-svn-id: svn://10.0.0.236/branches/ANDREAS_URL2_BRANCH@59296 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-31 23:05:26 +00:00
andreas.otte%primus-online.de
74d1b565a4 added some printfs for debugging
git-svn-id: svn://10.0.0.236/branches/ANDREAS_URL2_BRANCH@59264 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-31 21:16:05 +00:00
andreas.otte%primus-online.de
7c762886f7 my changes for the new urlparser
git-svn-id: svn://10.0.0.236/branches/ANDREAS_URL2_BRANCH@59229 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-30 18:28:27 +00:00
(no author)
ec049443d6 This commit was manufactured by cvs2svn to create branch
'ANDREAS_URL2_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/ANDREAS_URL2_BRANCH@59228 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-30 17:16:55 +00:00
14664 changed files with 520646 additions and 1248557 deletions

View File

@@ -26,33 +26,22 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/build/unix/modules.mk
ifneq ($(BUILD_MODULES),all)
DIRS = $(BUILD_MODULE_DIRS)
ifdef USE_ELF_DYNSTR_GC
DIRS += tools/elf-dynstr-gc
endif
else
DIRS = config build
ifdef USE_ELF_DYNSTR_GC
DIRS += tools/elf-dynstr-gc
endif
#
ifdef MOZ_L10N
DIRS += l10n
endif
ifdef MOZ_JAVA_SUPPLEMENT
DIRS += \
java/util \
java/webclient \
$(NULL)
ifndef MOZ_NATIVE_NSPR
ifdef USE_NSPR_AUTOCONF
DIRS += nsprpub
else
DIRS += $(topsrcdir)/nsprpub
# NSPR does not use Makefile.in
STATIC_MAKEFILES := $(topsrcdir)/nsprpub
endif
endif
# boehm needs to be built before XPCOM
@@ -60,13 +49,7 @@ ifdef GC_LEAK_DETECTOR
DIRS += gc/boehm
endif
DIRS += $(NSPRPUB_DIR)
DIRS += dbm modules/libreg js xpcom js/src/xpconnect
ifdef MOZ_OJI
DIRS += js/src/liveconnect
endif
DIRS += dbm modules/libreg xpcom
ifndef MOZ_NATIVE_ZLIB
DIRS += modules/zlib
@@ -76,33 +59,23 @@ ifndef MOZ_NATIVE_JPEG
DIRS += jpeg
endif
ifdef MOZ_ENABLE_GTK
DIRS += widget/src/gtksuperwin widget/src/gtkxtbin
endif
# Linux and Solaris installer needs standalone libjar, hence standalone zlib
ifneq (,$(filter Linux SunOS,$(OS_ARCH)))
DIRS += modules/zlib/standalone
endif
DIRS += \
widget/timer \
include \
modules/libutil \
netwerk \
modules/appfilelocprovider \
security \
uriloader \
intl \
js \
modules/libpref \
modules/libimg \
modules/oji \
modules/plugin \
modules/libjar \
caps \
expat \
htmlparser \
widget/timer \
gfx \
modules/plugin \
dom \
view \
widget \
@@ -111,18 +84,11 @@ DIRS += \
rdf \
docshell \
webshell \
embedding \
editor \
sun-java \
profile \
themes \
$(NULL)
# This must preceed xpfe
ifdef MOZ_JPROF
DIRS += tools/jprof
endif
ifdef MOZ_BUILD_XPFE
DIRS += xpfe
endif
@@ -141,25 +107,20 @@ ifdef MOZ_LEAKY
DIRS += tools/leaky
endif
ifdef ENABLE_TESTS
DIRS += xpcom/tests
ifdef MOZ_JPROF
DIRS += tools/jprof
endif
ifdef MOZ_LDAP_XPCOM
DIRS += directory/c-sdk/ldap directory/xpcom
endif
DIRS += l10n
endif # BUILD_MODULES == all
STATIC_MAKEFILES := $(NSPRPUB_DIR)
GARBAGE_DIRS += dist
DIST_GARBAGE = config.cache config.log config.status config-defs.h \
dependencies.beos config/autoconf.mk config/myrules.mk config/myconfig.mk \
$(shell cat unallmakefiles) unallmakefiles \
$(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
include $(topsrcdir)/config/rules.mk
real_all: all
real_export: export
real_libs: libs
real_install: install
real_clobber: clobber
real_depend: depend

View File

@@ -1,4 +0,0 @@
For mozilla-the-client build instructions, please read:
http://www.mozilla.org/build

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>

2
mozilla/aclocal.m4 vendored
View File

@@ -6,7 +6,5 @@ dnl
builtin(include, build/autoconf/glib.m4)dnl
builtin(include, build/autoconf/gtk.m4)dnl
builtin(include, build/autoconf/libIDL.m4)dnl
dnl
define(MOZ_TOPSRCDIR,.)dnl MOZ_TOPSRCDIR is used in altoptions.m4
builtin(include, build/autoconf/altoptions.m4)dnl

View File

@@ -25,25 +25,26 @@
# There is no need to rerun autoconf after adding makefiles.
# You only need to run configure.
#
# Please keep the modules in this file in sync with those in
# mozilla/build/unix/modules.mk
#
# Unused makefiles may be commented out with '#'.
# ('#' must be the first character on the line).
MAKEFILES=""
# add_makefiles - Shell function to add makefiles to MAKEFILES
add_makefiles() {
MAKEFILES="$MAKEFILES $*"
while read line; do
case $line in
\#*|dnl*) ;;
*) MAKEFILES="$MAKEFILES $line" ;;
esac
done
}
if [ "$srcdir" = "" ]; then
if [ -z "${srcdir}" ]; then
srcdir=.
fi
#
# Common makefiles used by everyone
#
add_makefiles "
add_makefiles <<END_NGMAKEFILES
Makefile
build/Makefile
build/unix/Makefile
@@ -54,27 +55,16 @@ config/Makefile
config/autoconf.mk
config/mkdepend/Makefile
config/mkdetect/Makefile
include/Makefile
tools/elf-dynstr-gc/Makefile
"
MAKEFILES_db="
db/Makefile
db/mdb/Makefile
db/mdb/public/Makefile
db/mork/Makefile
db/mork/build/Makefile
db/mork/src/Makefile
"
MAKEFILES_dbm="
dbm/Makefile
dbm/include/Makefile
dbm/src/Makefile
dbm/tests/Makefile
"
MAKEFILES_dom="
dom/Makefile
dom/public/Makefile
dom/public/base/Makefile
@@ -101,9 +91,6 @@ dom/src/range/Makefile
dom/src/html/Makefile
dom/src/jsurl/Makefile
dom/tools/Makefile
"
MAKEFILES_editor="
editor/Makefile
editor/base/Makefile
editor/public/Makefile
@@ -119,26 +106,18 @@ editor/txtsvc/src/Makefile
editor/ui/Makefile
editor/ui/composer/Makefile
editor/ui/composer/content/Makefile
editor/ui/composer/content/images/Makefile
editor/ui/composer/skin/Makefile
editor/ui/composer/locale/Makefile
editor/ui/composer/locale/en-US/Makefile
editor/ui/dialogs/Makefile
editor/ui/dialogs/content/Makefile
editor/ui/dialogs/skin/Makefile
editor/ui/dialogs/locale/Makefile
editor/ui/dialogs/locale/en-US/Makefile
"
MAKEFILES_expat="
expat/Makefile
expat/xmlparse/Makefile
expat/xmltok/Makefile
"
MAKEFILES_extensions="
extensions/Makefile
"
MAKEFILES_gfx="
gfx/Makefile
gfx/idl/Makefile
gfx/public/Makefile
@@ -149,15 +128,10 @@ gfx/src/ps/Makefile
gfx/src/motif/Makefile
gfx/src/photon/Makefile
gfx/src/rhapsody/Makefile
gfx/src/mac/Makefile
gfx/src/qt/Makefile
gfx/src/xlib/Makefile
gfx/src/os2/Makefile
gfx/src/xlibrgb/Makefile
gfx/tests/Makefile
"
MAKEFILES_htmlparser="
htmlparser/Makefile
htmlparser/robot/Makefile
htmlparser/robot/test/Makefile
@@ -166,9 +140,7 @@ htmlparser/tests/Makefile
htmlparser/tests/grabpage/Makefile
htmlparser/tests/logparse/Makefile
htmlparser/tests/outsinks/Makefile
"
MAKEFILES_intl="
include/Makefile
intl/Makefile
intl/chardet/Makefile
intl/chardet/public/Makefile
@@ -190,7 +162,6 @@ intl/locale/public/Makefile
intl/locale/idl/Makefile
intl/locale/src/Makefile
intl/locale/src/unix/Makefile
intl/locale/src/os2/Makefile
intl/locale/tests/Makefile
intl/lwbrk/Makefile
intl/lwbrk/src/Makefile
@@ -207,20 +178,15 @@ intl/strres/Makefile
intl/strres/public/Makefile
intl/strres/src/Makefile
intl/strres/tests/Makefile
"
MAKEFILES_js="
jpeg/Makefile
js/Makefile
#js/jsd/Makefile
#js/jsd/classes/Makefile
js/src/Makefile
js/src/fdlibm/Makefile
"
MAKEFILES_liveconnect="
js/src/liveconnect/Makefile
js/src/liveconnect/classes/Makefile
"
MAKEFILES_xpconnect="
# js/src/xpcom/Makefile
js/src/xpconnect/Makefile
js/src/xpconnect/public/Makefile
js/src/xpconnect/idl/Makefile
@@ -231,12 +197,9 @@ js/src/xpconnect/tests/Makefile
js/src/xpconnect/tests/components/Makefile
js/src/xpconnect/tests/idl/Makefile
js/src/xpconnect/shell/Makefile
js/src/xpconnect/tools/Makefile
js/src/xpconnect/tools/idl/Makefile
js/src/xpconnect/tools/idl/Makefile
"
MAKEFILES_layout="
# js/src/xpconnect/md/Makefile
# js/src/xpconnect/md/unix/Makefile
# js/src/xpconnect/test/Makefile
layout/Makefile
layout/base/Makefile
layout/base/public/Makefile
@@ -282,56 +245,48 @@ layout/xul/content/src/Makefile
layout/xbl/Makefile
layout/xbl/public/Makefile
layout/xbl/src/Makefile
"
MAKEFILES_libimg="
# lib/liblayer/Makefile
# lib/liblayer/include/Makefile
# lib/liblayer/src/Makefile
modules/libimg/Makefile
# modules/libimg/classes/Makefile
# modules/libimg/classes/netscape/Makefile
# modules/libimg/classes/netscape/libimg/Makefile
modules/libimg/png/Makefile
modules/libimg/public/Makefile
modules/libimg/public_com/Makefile
modules/libimg/src/Makefile
modules/libimg/gifcom/Makefile
modules/libimg/jpgcom/Makefile
modules/libimg/pngcom/Makefile
"
MAKEFILES_libjar="
modules/libjar/Makefile
"
MAKEFILES_libreg="
modules/libpref/Makefile
modules/libpref/admin/Makefile
modules/libpref/l10n/Makefile
modules/libpref/public/Makefile
modules/libpref/src/Makefile
modules/libreg/Makefile
modules/libreg/include/Makefile
modules/libreg/src/Makefile
"
MAKEFILES_libpref="
modules/libpref/Makefile
modules/libpref/public/Makefile
modules/libpref/src/Makefile
"
MAKEFILES_libutil="
modules/libutil/Makefile
modules/libutil/public/Makefile
modules/libutil/src/Makefile
"
MAKEFILES_oji="
modules/oji/Makefile
modules/oji/public/Makefile
modules/oji/src/Makefile
"
MAKEFILES_plugin="
modules/plugin/Makefile
modules/plugin/nglsrc/Makefile
modules/plugin/public/Makefile
modules/plugin/src/Makefile
modules/plugin/test/Makefile
modules/plugin/SanePlugin/Makefile
"
MAKEFILES_netwerk="
#modules/security/freenav/Makefile
modules/zlib/Makefile
modules/zlib/src/Makefile
#nav-java/Makefile
#nav-java/stubs/Makefile
#nav-java/stubs/include/Makefile
#nav-java/stubs/jri/Makefile
#nav-java/stubs/src/Makefile
netwerk/Makefile
netwerk/base/Makefile
netwerk/base/public/Makefile
@@ -358,8 +313,6 @@ netwerk/protocol/datetime/Makefile
netwerk/protocol/file/Makefile
netwerk/protocol/file/public/Makefile
netwerk/protocol/file/src/Makefile
netwerk/protocol/finger/Makefile
netwerk/protocol/finger/src/Makefile
netwerk/protocol/ftp/Makefile
netwerk/protocol/ftp/public/Makefile
netwerk/protocol/ftp/src/Makefile
@@ -374,6 +327,8 @@ netwerk/protocol/keyword/src/Makefile
netwerk/protocol/res/Makefile
netwerk/protocol/res/public/Makefile
netwerk/protocol/res/src/Makefile
netwerk/protocol/resource/Makefile
netwerk/protocol/resource/src/Makefile
netwerk/mime/Makefile
netwerk/mime/public/Makefile
netwerk/mime/src/Makefile
@@ -386,24 +341,45 @@ netwerk/streamconv/src/Makefile
netwerk/streamconv/test/Makefile
netwerk/test/Makefile
netwerk/testserver/Makefile
"
MAKEFILES_uriloader="
#network/Makefile
#network/cache/Makefile
#network/cache/nu/Makefile
#network/cache/nu/include/Makefile
#network/cache/nu/public/Makefile
#network/cache/nu/src/Makefile
#network/cache/nu/tests/Makefile
#network/cache/nu/tests/fftest/Makefile
#network/client/Makefile
#network/cnvts/Makefile
#network/cstream/Makefile
#network/main/Makefile
#network/mimetype/Makefile
#network/public/Makefile
#network/module/Makefile
#network/module/tests/Makefile
#network/protocol/Makefile
#network/protocol/about/Makefile
#network/protocol/callback/Makefile
#network/protocol/dataurl/Makefile
#network/protocol/file/Makefile
#network/protocol/ftp/Makefile
#network/protocol/gopher/Makefile
#network/protocol/http/Makefile
#network/protocol/js/Makefile
#network/protocol/ldap/Makefile
#network/protocol/marimba/Makefile
#network/protocol/remote/Makefile
#network/protocol/sockstub/Makefile
#network/util/Makefile
uriloader/Makefile
uriloader/base/Makefile
uriloader/build/Makefile
uriloader/extprotocol/Makefile
uriloader/extprotocol/base/Makefile
uriloader/extprotocol/unix/Makefile
uriloader/exthandler/Makefile
"
MAKEFILES_profile="
profile/Makefile
profile/src/Makefile
profile/public/Makefile
profile/resources/Makefile
profile/resources/content/Makefile
profile/resources/skin/Makefile
profile/resources/locale/Makefile
profile/resources/locale/en-US/Makefile
profile/pref-migrator/Makefile
@@ -414,14 +390,15 @@ profile/pref-migrator/resources/content/Makefile
profile/pref-migrator/resources/locale/Makefile
profile/pref-migrator/resources/locale/en-US/Makefile
profile/defaults/Makefile
"
MAKEFILES_rdf="
rdf/Makefile
rdf/base/Makefile
rdf/base/idl/Makefile
rdf/base/public/Makefile
rdf/base/src/Makefile
rdf/brprof/Makefile
rdf/brprof/public/Makefile
rdf/brprof/src/Makefile
rdf/brprof/build/Makefile
rdf/chrome/Makefile
rdf/chrome/build/Makefile
rdf/chrome/public/Makefile
@@ -433,7 +410,6 @@ rdf/resources/Makefile
rdf/build/Makefile
rdf/content/Makefile
rdf/content/public/Makefile
rdf/content/public/idl/Makefile
rdf/content/src/Makefile
rdf/datasource/Makefile
rdf/datasource/public/Makefile
@@ -445,36 +421,22 @@ rdf/tests/localfile/Makefile
rdf/tests/rdfsink/Makefile
rdf/tests/rdfcat/Makefile
rdf/tests/rdfpoll/Makefile
"
MAKEFILES_sun_java="
sun-java/Makefile
sun-java/stubs/Makefile
sun-java/stubs/include/Makefile
sun-java/stubs/jri/Makefile
sun-java/stubs/src/Makefile
"
MAKEFILES_caps="
caps/Makefile
caps/idl/Makefile
caps/include/Makefile
# caps/public/Makefile
caps/src/Makefile
"
MAKEFILES_view="
view/Makefile
view/public/Makefile
view/src/Makefile
"
MAKEFILES_docshell="
docshell/Makefile
docshell/base/Makefile
docshell/build/Makefile
"
MAKEFILES_webshell="
webshell/Makefile
webshell/public/Makefile
webshell/src/Makefile
@@ -487,9 +449,12 @@ webshell/tests/viewer/unix/motif/Makefile
webshell/tests/viewer/unix/qt/Makefile
webshell/tests/viewer/unix/xlib/Makefile
webshell/embed/Makefile
"
MAKEFILES_widget="
webshell/embed/xlib/Makefile
webshell/embed/xlib/gtk/Makefile
webshell/embed/xlib/motif/Makefile
webshell/embed/xlib/qt/Makefile
webshell/embed/xlib/xt/Makefile
webshell/embed/gtk/mozilla_config.mk
widget/Makefile
widget/public/Makefile
widget/src/Makefile
@@ -497,16 +462,13 @@ widget/src/beos/Makefile
widget/src/build/Makefile
widget/src/gtk/Makefile
widget/src/gtksuperwin/Makefile
widget/src/gtkxtbin/Makefile
widget/src/motif/Makefile
widget/src/motif/app_context/Makefile
widget/src/photon/Makefile
widget/src/rhapsody/Makefile
widget/src/mac/Makefile
widget/src/unix_services/Makefile
widget/src/unix_services/toolkit_service/Makefile
widget/src/xlib/Makefile
widget/src/os2/Makefile
widget/src/os2/res/Makefile
widget/src/os2/tests/Makefile
widget/src/qt/Makefile
widget/src/xlib/window_service/Makefile
widget/src/xpwidgets/Makefile
@@ -518,21 +480,22 @@ widget/timer/Makefile
widget/timer/public/Makefile
widget/timer/src/Makefile
widget/timer/src/beos/Makefile
widget/timer/src/photon/Makefile
widget/timer/src/rhapsody/Makefile
widget/timer/src/unix/Makefile
widget/timer/src/unix/gtk/Makefile
widget/timer/src/unix/motif/Makefile
widget/timer/src/unix/photon/Makefile
widget/timer/src/unix/xlib/Makefile
widget/timer/src/unix/qt/Makefile
"
MAKEFILES_xpcom="
#
# New xpcom hiearchy
#
xpcom/Makefile
xpcom/base/Makefile
xpcom/build/Makefile
xpcom/components/Makefile
xpcom/ds/Makefile
# xpcom/idl/Makefile
xpcom/io/Makefile
xpcom/typelib/Makefile
xpcom/reflect/Makefile
@@ -546,7 +509,6 @@ xpcom/reflect/xptcall/Makefile
xpcom/reflect/xptcall/public/Makefile
xpcom/reflect/xptcall/src/Makefile
xpcom/reflect/xptcall/src/md/Makefile
xpcom/reflect/xptcall/src/md/os2/Makefile
xpcom/reflect/xptcall/src/md/test/Makefile
xpcom/reflect/xptcall/src/md/unix/Makefile
xpcom/reflect/xptcall/tests/Makefile
@@ -558,30 +520,35 @@ xpcom/proxy/Makefile
xpcom/proxy/public/Makefile
xpcom/proxy/src/Makefile
xpcom/proxy/tests/Makefile
# xpcom/public/Makefile
xpcom/sample/Makefile
# xpcom/src/Makefile
xpcom/tests/Makefile
xpcom/tests/dynamic/Makefile
xpcom/tests/services/Makefile
xpcom/threads/Makefile
xpcom/tools/Makefile
xpcom/tools/registry/Makefile
"
MAKEFILES_xpinstall="
#
# End of xpcom Makefiles
#
xpinstall/Makefile
xpinstall/notifier/Makefile
xpinstall/packager/Makefile
xpinstall/public/Makefile
xpinstall/res/Makefile
xpinstall/res/content/Makefile
xpinstall/res/locale/Makefile
xpinstall/res/locale/en-US/Makefile
xpinstall/res/skin/Makefile
xpinstall/src/Makefile
xpinstall/stub/Makefile
xpinstall/wizard/unix/src2/Makefile
"
MAKEFILES_xpfe="
xpfe/Makefile
xpfe/AppCores/Makefile
xpfe/AppCores/public/Makefile
xpfe/AppCores/src/Makefile
xpfe/AppCores/xul/Makefile
xpfe/AppCores/idl/Makefile
xpfe/browser/Makefile
xpfe/browser/public/Makefile
xpfe/browser/src/Makefile
@@ -601,34 +568,23 @@ xpfe/components/bookmarks/public/Makefile
xpfe/components/bookmarks/src/Makefile
xpfe/components/bookmarks/resources/Makefile
xpfe/components/directory/Makefile
xpfe/components/timebomb/Makefile
xpfe/components/timebomb/tools/Makefile
xpfe/components/timebomb/resources/Makefile
xpfe/components/timebomb/resources/content/Makefile
xpfe/components/timebomb/resources/locale/Makefile
xpfe/components/timebomb/resources/locale/en-US/Makefile
xpfe/components/regviewer/Makefile
xpfe/components/find/Makefile
xpfe/components/find/public/Makefile
xpfe/components/find/src/Makefile
xpfe/components/find/resources/Makefile
xpfe/components/filepicker/src/Makefile
xpfe/components/filepicker/res/content/Makefile
xpfe/components/filepicker/res/locale/Makefile
xpfe/components/filepicker/res/locale/en-US/Makefile
xpfe/components/filepicker/res/Makefile
xpfe/components/filepicker/Makefile
xpfe/components/history/Makefile
xpfe/components/history/src/Makefile
xpfe/components/history/public/Makefile
xpfe/components/history/resources/Makefile
xpfe/components/prefwindow/Makefile
xpfe/components/prefwindow/src/Makefile
xpfe/components/prefwindow/public/Makefile
xpfe/components/prefwindow/resources/Makefile
xpfe/components/prefwindow/resources/content/Makefile
xpfe/components/prefwindow/resources/content/unix/Makefile
xpfe/components/prefwindow/resources/skin/Makefile
xpfe/components/prefwindow/resources/locale/Makefile
xpfe/components/prefwindow/resources/locale/en-US/Makefile
xpfe/components/prefwindow/resources/locale/en-US/unix/Makefile
xpfe/components/related/Makefile
xpfe/components/related/src/Makefile
xpfe/components/related/public/Makefile
@@ -650,19 +606,6 @@ xpfe/components/ucth/Makefile
xpfe/components/ucth/public/Makefile
xpfe/components/ucth/src/Makefile
xpfe/components/ucth/resources/Makefile
xpfe/components/remote/Makefile
xpfe/components/remote/public/Makefile
xpfe/components/remote/src/Makefile
xpfe/components/autocomplete/Makefile
xpfe/components/autocomplete/public/Makefile
xpfe/components/autocomplete/resources/Makefile
xpfe/components/autocomplete/resources/content/Makefile
xpfe/components/autocomplete/src/Makefile
xpfe/components/console/Makefile
xpfe/components/console/resources/Makefile
xpfe/components/console/resources/content/Makefile
xpfe/components/console/resources/locale/Makefile
xpfe/components/console/resources/locale/en-US/Makefile
xpfe/appshell/Makefile
xpfe/appshell/src/Makefile
xpfe/appshell/public/Makefile
@@ -671,115 +614,40 @@ xpfe/browser/Makefile
xpfe/browser/src/Makefile
xpfe/browser/resources/Makefile
xpfe/browser/resources/content/Makefile
xpfe/browser/resources/content/unix/Makefile
xpfe/browser/resources/skin/Makefile
xpfe/browser/resources/locale/Makefile
xpfe/browser/resources/locale/en-US/Makefile
xpfe/browser/resources/locale/en-US/unix/Makefile
xpfe/appfilelocprovider/Makefile
xpfe/appfilelocprovider/public/Makefile
xpfe/appfilelocprovider/src/Makefile
xpfe/global/Makefile
xpfe/global/resources/Makefile
xpfe/global/resources/skin/Makefile
xpfe/global/resources/skin/unix/Makefile
xpfe/global/resources/content/Makefile
xpfe/global/resources/content/os2/Makefile
xpfe/global/resources/content/unix/Makefile
xpfe/global/resources/locale/Makefile
xpfe/global/resources/locale/en-US/Makefile
xpfe/global/resources/locale/en-US/os2/Makefile
xpfe/global/resources/locale/en-US/unix/Makefile
xpfe/communicator/Makefile
xpfe/communicator/resources/Makefile
xpfe/communicator/resources/locale/Makefile
xpfe/communicator/resources/locale/en-US/Makefile
xpfe/communicator/resources/content/Makefile
"
xpfe/global/resources/locale/unix/Makefile
MAKEFILES_embedding="
embedding/Makefile
embedding/browser/Makefile
embedding/browser/build/Makefile
embedding/browser/webBrowser/Makefile
embedding/browser/gtk/Makefile
embedding/browser/gtk/src/Makefile
embedding/browser/gtk/tests/Makefile
embedding/browser/photon/Makefile
embedding/browser/photon/src/Makefile
embedding/browser/photon/tests/Makefile
embedding/config/Makefile
embedding/tests/gtkEmbed/Makefile
"
MAKEFILES_security="
security/Makefile
security/base/Makefile
security/base/public/Makefile
security/base/res/Makefile
security/base/res/content/Makefile
security/base/res/locale/Makefile
security/base/res/locale/en-US/Makefile
security/psm/Makefile
security/psm/lib/Makefile
security/psm/lib/client/Makefile
security/psm/lib/protocol/Makefile
"
MAKEFILES_transformiix="
extensions/transformiix/source/base/Makefile
extensions/transformiix/source/main/Makefile
extensions/transformiix/source/net/Makefile
extensions/transformiix/source/xml/dom/standalone/Makefile
extensions/transformiix/source/xml/dom/Makefile
extensions/transformiix/source/xml/dom/mozImpl/Makefile
extensions/transformiix/source/xml/parser/Makefile
extensions/transformiix/source/xml/printer/Makefile
extensions/transformiix/source/xml/util/Makefile
extensions/transformiix/source/xml/Makefile
extensions/transformiix/source/xpath/Makefile
extensions/transformiix/source/xslt/functions/Makefile
extensions/transformiix/source/xslt/util/Makefile
extensions/transformiix/source/xslt/Makefile
extensions/transformiix/source/Makefile
extensions/transformiix/Makefile
"
# xpfe/browser/public/Makefile
END_NGMAKEFILES
if [ "$MOZ_MAIL_NEWS" ]; then
MAKEFILES_mailnews=`cat ${srcdir}/mailnews/makefiles`
fi
if [ ! "$SYSTEM_JPEG" ]; then
MAKEFILES_jpeg="jpeg/Makefile"
fi
if [ ! "$SYSTEM_ZLIB" ]; then
MAKEFILES_zlib="
modules/zlib/Makefile
modules/zlib/src/Makefile
"
fi
if [ ! "$SYSTEM_PNG" ]; then
MAKEFILES_libimg="$MAKEFILES_libimg modules/libimg/png/Makefile"
fi
#
# java/
#
if [ "$MOZ_JAVA_SUPPLEMENT" ]; then
MAKEFILES_java_supplement=`cat ${srcdir}/java/makefiles`
add_makefiles < ${srcdir}/mailnews/makefiles
fi
#
# l10n/
#
MAKEFILES_langpacks=`cat ${srcdir}/l10n/makefiles.all`
if [ "$MOZ_L10N" ]; then
MAKEFILES_l10n="l10n/Makefile"
if [ "$MOZ_L10N_LANG" ]; then
MAKEFILES_l10n_lang="
add_makefiles <<END_L10N_MAKEFILES
#
l10n/Makefile
#
END_L10N_MAKEFILES
#
if [ "$MOZ_L10N_LANG" ]; then
add_makefiles <<END_L10N_LANG_MAKEFILES
#
l10n/lang/Makefile
#
l10n/lang/addressbook/Makefile
l10n/lang/bookmarks/Makefile
l10n/lang/directory/Makefile
@@ -792,6 +660,8 @@ if [ "$MOZ_L10N" ]; then
l10n/lang/pref/Makefile
l10n/lang/related/Makefile
l10n/lang/sidebar/Makefile
#
#
l10n/lang/addressbook/locale/Makefile
l10n/lang/bookmarks/locale/Makefile
l10n/lang/directory/locale/Makefile
@@ -804,195 +674,69 @@ if [ "$MOZ_L10N" ]; then
l10n/lang/pref/locale/Makefile
l10n/lang/related/locale/Makefile
l10n/lang/sidebar/locale/Makefile
"
#
END_L10N_LANG_MAKEFILES
#
fi
fi
#
# tools/jprof
if [ "$MOZ_JPROF" ]; then
MAKEFILES_jprof="tools/jprof/Makefile"
add_makefiles <<END_JPROF_MAKEFILES
tools/jprof/Makefile
END_JPROF_MAKEFILES
fi
# tools/leaky
if [ "$MOZ_LEAKY" ]; then
MAKEFILES_leaky="tools/leaky/Makefile"
add_makefiles <<END_LEAKY_MAKEFILES
tools/leaky/Makefile
END_LEAKY_MAKEFILES
fi
# layout/mathml
if [ "$MOZ_MATHML" ]; then
MAKEFILES_layout="$MAKEFILES_layout
layout/mathml/Makefile
layout/mathml/base/Makefile
layout/mathml/base/src/Makefile
layout/mathml/content/Makefile
layout/mathml/content/src/Makefile
"
add_makefiles <<END_MATHML_MAKEFILES
layout/mathml/Makefile
layout/mathml/base/Makefile
layout/mathml/base/src/Makefile
layout/mathml/content/Makefile
layout/mathml/content/src/Makefile
END_MATHML_MAKEFILES
fi
# layout/svg
if [ "$MOZ_SVG" ]; then
MAKEFILES_layout="$MAKEFILES_layout
layout/svg/Makefile
layout/svg/base/Makefile
layout/svg/base/public/Makefile
layout/svg/base/src/Makefile
layout/svg/content/Makefile
layout/svg/content/src/Makefile
"
if [ `echo "$MOZ_EXTENSIONS" | grep -c cookie` != 0 ]; then
add_makefiles <<END_EXTENSIONS_COOKIE_MAKEFILES
extensions/cookie/Makefile
extensions/cookie/tests/Makefile
END_EXTENSIONS_COOKIE_MAKEFILES
fi
# directory/xpcom
if [ "$MOZ_LDAP_XPCOM" ]; then
MAKEFILES_ldap="
directory/xpcom/Makefile
directory/xpcom/base/Makefile
directory/xpcom/base/public/Makefile
directory/xpcom/base/src/Makefile
"
if [ `echo "$MOZ_EXTENSIONS" | grep -c irc` != 0 ]; then
add_makefiles <<END_EXTENSIONS_IRC_MAKEFILES
extensions/irc/Makefile
END_EXTENSIONS_IRC_MAKEFILES
fi
# libimg/mng
if [ "$MOZ_MNG" ]; then
MAKEFILES_libimg="$MAKEFILES_libimg
modules/libimg/mng/Makefile
modules/libimg/mngcom/Makefile
"
if [ `echo "$MOZ_EXTENSIONS" | grep -c wallet` != 0 ]; then
add_makefiles <<END_EXTENSIONS_WALLET_MAKEFILES
extensions/wallet/Makefile
extensions/wallet/public/Makefile
extensions/wallet/src/Makefile
extensions/wallet/editor/Makefile
extensions/wallet/cookieviewer/Makefile
extensions/wallet/signonviewer/Makefile
extensions/wallet/walletpreview/Makefile
extensions/wallet/build/Makefile
END_EXTENSIONS_WALLET_MAKEFILES
fi
for extension in $MOZ_EXTENSIONS; do
case "$extension" in
cookie ) MAKEFILES_extensions="$MAKEFILES_extensions
extensions/cookie/Makefile
extensions/cookie/tests/Makefile
" ;;
psm-glue ) MAKEFILES_extensions="$MAKEFILES_extensions
extensions/psm-glue/public/Makefile
extensions/psm-glue/Makefile
extensions/psm-glue/src/Makefile
" ;;
irc ) MAKEFILES_extensions="$MAKEFILES_extensions
extensions/irc/Makefile
extensions/irc/xul/Makefile
extensions/irc/xul/content/Makefile
extensions/irc/xul/locale/Makefile
extensions/irc/xul/locale/en-US/Makefile
" ;;
transformiix ) MAKEFILES_extensions="$MAKEFILES_extensions
$MAKEFILES_transformiix"
;;
wallet ) MAKEFILES_extensions="$MAKEFILES_extensions
extensions/wallet/Makefile
extensions/wallet/public/Makefile
extensions/wallet/src/Makefile
extensions/wallet/editor/Makefile
extensions/wallet/cookieviewer/Makefile
extensions/wallet/signonviewer/Makefile
extensions/wallet/walletpreview/Makefile
extensions/wallet/build/Makefile
" ;;
xmlextras ) MAKEFILES_extensions="$MAKEFILES_extensions
extensions/xmlextras/Makefile
extensions/xmlextras/base/Makefile
extensions/xmlextras/base/src/Makefile
extensions/xmlextras/base/public/Makefile
extensions/xmlextras/build/Makefile
extensions/xmlextras/build/src/Makefile
extensions/xmlextras/soap/public/Makefile
" ;;
xmlterm ) MAKEFILES_extensions="$MAKEFILES_extensions
extensions/xmlterm/Makefile
extensions/xmlterm/base/Makefile
extensions/xmlterm/geckoterm/Makefile
extensions/xmlterm/linetest/Makefile
extensions/xmlterm/scripts/Makefile
extensions/xmlterm/tests/Makefile
extensions/xmlterm/ui/Makefile
" ;;
xml-rpc ) MAKEFILES_extensions="$MAKEFILES_extensions
extensions/xml-rpc/Makefile
extensions/xml-rpc/idl/Makefile
extensions/xml-rpc/src/Makefile
" ;;
esac
done
#
# Translate from BUILD_MODULES into the proper makefiles list
#
if [ "$BUILD_MODULES" = "all" ]; then
MAKEFILES_themes=`cat ${srcdir}/themes/makefiles`
add_makefiles "
$MAKEFILES_caps
$MAKEFILES_db
$MAKEFILES_dbm
$MAKEFILES_docshell
$MAKEFILES_dom
$MAKEFILES_editor
$MAKEFILES_embedding
$MAKEFILES_expat
$MAKEFILES_extensions
$MAKEFILES_gfx
$MAKEFILES_htmlparser
$MAKEFILES_intl
$MAKEFILES_java_supplement
$MAKEFILES_ldap
$MAKEFILES_leaky
$MAKEFILES_jpeg
$MAKEFILES_jprof
$MAKEFILES_js
$MAKEFILES_l10n
$MAKEFILES_l10n_lang
$MAKEFILES_langpacks
$MAKEFILES_layout
$MAKEFILES_libreg
$MAKEFILES_libimg
$MAKEFILES_libjar
$MAKEFILES_libpref
$MAKEFILES_libutil
$MAKEFILES_liveconnect
$MAKEFILES_mailnews
$MAKEFILES_oji
$MAKEFILES_plugin
$MAKEFILES_netwerk
$MAKEFILES_profile
$MAKEFILES_rdf
$MAKEFILES_security
$MAKEFILES_sun_java
$MAKEFILES_themes
$MAKEFILES_uriloader
$MAKEFILES_view
$MAKEFILES_webshell
$MAKEFILES_widget
$MAKEFILES_xpcom
$MAKEFILES_xpconnect
$MAKEFILES_xpinstall
$MAKEFILES_xpfe
$MAKEFILES_zlib
"
else
# Standalone modules go here
for mod in $BUILD_MODULES; do
case $mod in
dbm) add_makefiles "$MAKEFILES_dbm"
;;
js) add_makefiles "$MAKEFILES_js"
;;
necko) add_makefiles "
$MAKEFILES_netwerk $MAKEFILES_xpcom $MAKEFILES_libreg"
;;
transformiix) add_makefiles "$MAKEFILES_transformiix"
;;
xpcom) add_makefiles "$MAKEFILES_xpcom $MAKEFILES_libreg"
;;
xpconnect) add_makefiles "
$MAKEFILES_xpconnect $MAKEFILES_js $MAKEFILES_xpcom
$MAKEFILES_libreg"
;;
esac
done
if [ `echo "$MOZ_EXTENSIONS" | grep -c pics` != 0 ]; then
add_makefiles <<END_EXTENSIONS_PICS_MAKEFILES
extensions/pics/Makefile
extensions/pics/public/Makefile
extensions/pics/src/Makefile
extensions/pics/tests/Makefile
END_EXTENSIONS_PICS_MAKEFILES
fi

View File

@@ -153,17 +153,17 @@ foreach $ac_file (@makefiles) {
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;
#}
if (/\@[_a-zA-Z]*\@.*\@[_a-zA-Z]*\@/) {
#warn "Two defines on a line:$ac_file:$.:$_";
push @unhandled, $ac_file;
last;
}
s/\@srcdir\@/$srcdir/g;
s/\@top_srcdir\@/$top_srcdir/g;
s/\@srcdir\@/$srcdir/;
s/\@top_srcdir\@/$top_srcdir/;
if (/\@[_a-zA-Z]*\@/) {
warn "Unknown variable:$ac_file:$.:$_";
#warn "Unknown variable:$ac_file:$.:$_";
push @unhandled, $ac_file;
last;
}

View File

@@ -99,9 +99,9 @@ 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 mozconfig2configure script for more details.
_AUTOCONF_TOOLS_DIR=`dirname [$]0`/[$1]/build/autoconf
. $_AUTOCONF_TOOLS_DIR/mozconfig2configure])
# 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(MOZ_TOPSRCDIR)
MOZ_READ_MOZCONFIG

View File

@@ -1,7 +1,6 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.
# 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
@@ -23,7 +22,7 @@
# the same distribution terms that you use for the rest of that program.
# Written by Per Bothner <bothner@cygnus.com>.
# Please send patches to <config-patches@gnu.org>.
# 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
@@ -36,20 +35,6 @@
# (but try to keep the structure clean).
#
# Use $HOST_CC if defined. $CC may point to a cross-compiler
if test x"$CC_FOR_BUILD" = x; then
if test x"$HOST_CC" != x; then
CC_FOR_BUILD="$HOST_CC"
else
if test x"$CC" != x; then
CC_FOR_BUILD="$CC"
else
CC_FOR_BUILD=cc
fi
fi
fi
# 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
@@ -61,49 +46,11 @@ 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
dummy=dummy-$$
trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
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
*:NetBSD:*:*)
# Netbsd (nbsd) targets should (where applicable) match one or
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
# compatibility and a consistent mechanism for selecting the
# object file format.
# Determine the machine/vendor (is the vendor relevant).
case "${UNAME_MACHINE}" in
amiga) machine=m68k-cbm ;;
arm32) machine=arm-unknown ;;
atari*) machine=m68k-atari ;;
sun3*) machine=m68k-sun ;;
mac68k) machine=m68k-apple ;;
macppc) machine=powerpc-apple ;;
hp3[0-9][05]) machine=m68k-hp ;;
ibmrt|romp-ibm) machine=romp-ibm ;;
*) machine=${UNAME_MACHINE}-unknown ;;
esac
# The Operating System including object format.
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep __ELF__ >/dev/null
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
os=netbsd
else
os=netbsdelf
fi
# The OS release
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit 0 ;;
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -112,62 +59,46 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# 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
.data
\$Lformat:
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
.text
cat <<EOF >dummy.s
.globl main
.align 4
.ent main
main:
.frame \$30,16,\$26,0
ldgp \$29,0(\$27)
.prologue 1
.long 0x47e03d80 # implver \$0
lda \$2,-1
.long 0x47e20c21 # amask \$2,\$1
lda \$16,\$Lformat
mov \$0,\$17
not \$1,\$18
jsr \$26,printf
ldgp \$29,0(\$26)
mov 0,\$16
jsr \$26,exit
.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_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
${CC-cc} dummy.s -o dummy 2>/dev/null
if test "$?" = 0 ; then
case `./$dummy` in
0-0)
./dummy
case "$?" in
7)
UNAME_MACHINE="alpha"
;;
1-0)
15)
UNAME_MACHINE="alphaev5"
;;
1-1)
14)
UNAME_MACHINE="alphaev56"
;;
1-101)
10)
UNAME_MACHINE="alphapca56"
;;
2-303)
16)
UNAME_MACHINE="alphaev6"
;;
2-307)
UNAME_MACHINE="alphaev67"
;;
esac
fi
rm -f $dummy.s $dummy
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
# of the specific Alpha model?
echo alpha-pc-interix
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
@@ -175,12 +106,12 @@ EOF
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 ;;
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
exit 0 ;;
arc64:OpenBSD:*:*)
echo mips64el-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
@@ -199,16 +130,16 @@ EOF
wgrisc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:OS/390:*:*)
echo i370-ibm-openedition
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*:*:* | MIS*:SMP_DC-OSx*:*:*)
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
@@ -216,12 +147,9 @@ EOF
echo pyramid-pyramid-bsd
fi
exit 0 ;;
NILE*:*:*:dcosx)
NILE:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
@@ -261,38 +189,21 @@ EOF
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 ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
# > m68000). The system name ranges from "MiNT" over "FreeMiNT"
# to the lowercase version "mint" (or "freemint"). Finally
# the system name "TOS" denotes a system which is actually not
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
sun3*:NetBSD:*:*)
echo m68k-sun-netbsd${UNAME_RELEASE}
exit 0 ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit 0 ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit 0 ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE}
exit 0 ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE}
exit 0 ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${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 ;;
@@ -314,17 +225,12 @@ EOF
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
exit 0 ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
2020:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
sed 's/^ //' << EOF >$dummy.c
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
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);
@@ -339,10 +245,10 @@ EOF
exit (-1);
}
EOF
$CC_FOR_BUILD $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
${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:*:*)
@@ -360,18 +266,15 @@ EOF
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110]
then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
[ ${TARGET_BINARY_INTERFACE}x = x ]
then
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}
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
@@ -397,7 +300,7 @@ EOF
exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
sed 's/^ //' << EOF >$dummy.c
sed 's/^ //' << EOF >dummy.c
#include <sys/systemcfg.h>
main()
@@ -408,8 +311,8 @@ EOF
exit(0);
}
EOF
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
${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
@@ -418,8 +321,7 @@ EOF
fi
exit 0 ;;
*:AIX:*:4)
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
@@ -437,7 +339,7 @@ EOF
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
exit 0 ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
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:*:*)
@@ -452,50 +354,18 @@ EOF
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
exit 0 ;;
9000/[34678]??:HP-UX:*:*)
9000/[3478]??:HP-UX:*:*)
case "${UNAME_MACHINE}" in
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
sed 's/^ //' << EOF >$dummy.c
#include <stdlib.h>
#include <unistd.h>
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
#endif
long cpu = sysconf (_SC_CPU_VERSION);
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS)
switch (bits)
{
case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break;
default: puts ("hppa2.0"); break;
} break;
#else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break;
#endif
default: puts ("hppa1.0"); break;
}
exit (0);
}
EOF
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
rm -f $dummy.c $dummy
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
sed 's/^ //' << EOF >dummy.c
#include <unistd.h>
int
main ()
@@ -520,8 +390,8 @@ EOF
exit (0);
}
EOF
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
${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:*:* )
@@ -530,9 +400,6 @@ EOF
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit 0 ;;
*9??*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit 0 ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
exit 0 ;;
@@ -549,9 +416,6 @@ EOF
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit 0 ;;
hppa*:OpenBSD:*:*)
echo hppa-unknown-openbsd
exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit 0 ;;
@@ -582,66 +446,45 @@ EOF
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
exit 0 ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*T3E:*:*:*)
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
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 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
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:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
i?86:BSD/386:*:* | *:BSD/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
sparc*:BSD/OS:*:*)
echo sparc-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
if test -x /usr/bin/objformat; then
if test "elf" = "`/usr/bin/objformat`"; then
echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
exit 0
fi
fi
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-cygwin
echo ${UNAME_MACHINE}-pc-cygwin32
exit 0 ;;
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit 0 ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386?
echo i386-pc-interix
exit 0 ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
exit 0 ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
echo powerpcle-unknown-cygwin32
exit 0 ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@@ -650,11 +493,15 @@ EOF
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. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path.
ld_help_string=`cd /; ld --help 2>&1`
# 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
@@ -662,138 +509,68 @@ EOF
s/ .*//
p'`
case "$ld_supported_emulations" in
*ia64)
echo "${UNAME_MACHINE}-unknown-linux"
exit 0
;;
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
;;
elf32arm*)
echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
exit 0
;;
armelf_linux*)
echo "${UNAME_MACHINE}-unknown-linux-gnu"
exit 0
;;
m68klinux)
echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
exit 0
;;
elf32ppc | elf32ppclinux)
# Determine Lib Version
cat >$dummy.c <<EOF
#include <features.h>
#if defined(__GLIBC__)
extern char __libc_version[];
extern char __libc_release[];
#endif
main(argc, argv)
int argc;
char *argv[];
{
#if defined(__GLIBC__)
printf("%s %s\n", __libc_version, __libc_release);
#else
printf("unkown\n");
#endif
return 0;
}
EOF
LIBC=""
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
if test "$?" = 0 ; then
./$dummy | grep 1\.99 > /dev/null
if test "$?" = 0 ; then
LIBC="libc1"
fi
fi
rm -f $dummy.c $dummy
echo powerpc-unknown-linux-gnu${LIBC}
exit 0
;;
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
cat <<EOF >$dummy.s
.data
\$Lformat:
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
.text
.globl main
.align 4
.ent main
main:
.frame \$30,16,\$26,0
ldgp \$29,0(\$27)
.prologue 1
.long 0x47e03d80 # implver \$0
lda \$2,-1
.long 0x47e20c21 # amask \$2,\$1
lda \$16,\$Lformat
mov \$0,\$17
not \$1,\$18
jsr \$26,printf
ldgp \$29,0(\$26)
mov 0,\$16
jsr \$26,exit
.end main
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_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
${CC-cc} dummy.s -o dummy 2>/dev/null
if test "$?" = 0 ; then
case `./$dummy` in
0-0)
./dummy
case "$?" in
7)
UNAME_MACHINE="alpha"
;;
1-0)
15)
UNAME_MACHINE="alphaev5"
;;
1-1)
14)
UNAME_MACHINE="alphaev56"
;;
1-101)
10)
UNAME_MACHINE="alphapca56"
;;
2-303)
16)
UNAME_MACHINE="alphaev6"
;;
2-307)
UNAME_MACHINE="alphaev67"
;;
esac
esac
objdump --private-headers $dummy | \
objdump --private-headers dummy | \
grep ld.so.1 > /dev/null
if test "$?" = 0 ; then
LIBC="libc1"
fi
fi
rm -f $dummy.s $dummy
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
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
cat >dummy.c <<EOF
main(argc, argv)
int argc;
char *argv[];
{
#ifdef __MIPSEB__
printf ("%s-unknown-linux-gnu\n", argv[1]);
#endif
@@ -803,10 +580,8 @@ EOF
return 0;
}
EOF
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
elif test "${UNAME_MACHINE}" = "s390"; then
echo s390-ibm-linux && exit 0
${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.
@@ -825,14 +600,12 @@ EOF
;;
esac
# Determine whether the default compiler is a.out or elf
cat >$dummy.c <<EOF
cat >dummy.c <<EOF
#include <features.h>
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
main(argc, argv)
int argc;
char *argv[];
{
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
@@ -849,8 +622,8 @@ EOF
return 0;
}
EOF
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
${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.
@@ -865,21 +638,16 @@ EOF
# 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.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
fi
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:*:5:7*)
# Fixed at (any) Pentium or better
UNAME_MACHINE=i586
if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
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}
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
fi
exit 0 ;;
i?86:*:3.2:*)
@@ -891,20 +659,12 @@ EOF
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
&& UNAME_MACHINE=i686
(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
i?86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
exit 0 ;;
pc:*:*:*)
# Left here for compatibility:
# 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
@@ -945,7 +705,7 @@ EOF
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
i?86:LynxOS:2.*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
@@ -957,9 +717,6 @@ EOF
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
exit 0 ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
exit 0 ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
exit 0 ;;
@@ -975,14 +732,6 @@ EOF
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit 0 ;;
*:*OpenVMS*:*:*)
case "${UNAME_SYSTEM}" in
POSIX_for_OpenVMS_AXP) echo alpha-dec-openvmsposix ;;
POSIX_for_OpenVMS_VAX) echo vax-dec-openvmsposix ;;
OpenVMS) echo alpha-dec-openvms ;;
*) echo unknown-dec-openvms ;;
esac
exit 0 ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
@@ -992,71 +741,41 @@ EOF
# 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 ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
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 ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
*:QNX:*:*)
echo i386-pc-qnx`echo ${UNAME_VERSION} | cut -c1-1`
exit 0 ;;
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
echo powerpc-apple-beos
exit 0 ;;
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit 0 ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit 0 ;;
SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE}
exit 0 ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
*:Rhapsody:*:*)
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
Power*:Mac*OS:*:*)
echo powerpc-apple-macos${UNAME_RELEASE}
exit 0 ;;
*:Mac*OS:*:*)
echo ${UNAME_MACHINE}-apple-macos${UNAME_RELEASE}
exit 0 ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
if test "${UNAME_MACHINE}" = "x86pc"; then
UNAME_MACHINE=pc
fi
echo `uname -p`-${UNAME_MACHINE}-nto-qnx
exit 0;;
*:QNX:*:4*)
echo i386-pc-qnx
exit 0 ;;
NSR-W:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
*:OS/2:*:*)
if test "$VACPP" = "yes"; then
echo "i386-pc-os2_vacpp"
else
echo "i386-pc-os2_emx"
fi
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
cat >dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/utsname.h>
@@ -1094,10 +813,7 @@ main ()
#endif
int version;
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
if (version < 4)
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
else
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
exit (0);
#endif
@@ -1157,8 +873,8 @@ main ()
}
EOF
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
${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.

View File

@@ -1,8 +1,6 @@
#! /bin/sh
# Configuration validation subroutine script, version 1.1.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.
#
# 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.
@@ -27,9 +25,6 @@
# 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>.
# Please send patches to <config-patches@gnu.org>.
#
# 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.
@@ -73,7 +68,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu*)
linux-gnu*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -103,21 +98,11 @@ case $os in
os=
basic_machine=$1
;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
;;
-scout)
;;
-wrs)
os=-vxworks
basic_machine=$1
;;
-hiux*)
os=-hiuxwe2
;;
-sco5)
os=-sco3.2v5
os=sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
@@ -136,9 +121,6 @@ case $os in
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-udk*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-isc)
os=-isc2.2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -161,9 +143,17 @@ case $os in
-psos*)
os=-psos
;;
-mint | -mint[0-9]*)
basic_machine=m68k-atari
os=-mint
-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
@@ -171,25 +161,16 @@ esac
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
| 580 | i960 | h8300 \
| x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
| alphaev6[78] \
| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
| mips64vr5000 | miprs64vr5000el | mcore \
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
| thumb | d10v | fr30 | avr)
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
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
@@ -202,47 +183,27 @@ case $basic_machine in
exit 1
;;
# Recognize the basic CPU types with company name.
# FIXME: clean up the formatting here.
vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
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-* | h8500-* | i960-* \
| xmp-* | ymp-* \
| x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
| alphaev6[78]-* \
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
| clipper-* | orion-* \
| 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-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
| mips64el-* | mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
| mipstx39-* | mipstx39el-* | mcore-* \
| f301-* | armv*-* | s390-* | sv1-* | t3e-* \
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* )
| 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.
386bsd)
basic_machine=i386-unknown
os=-bsd
;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
basic_machine=m68000-att
;;
3b*)
basic_machine=we32k-att
;;
a29khif)
basic_machine=a29k-amd
os=-udi
;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
;;
alliant | fx80)
basic_machine=fx80-alliant
;;
@@ -272,10 +233,6 @@ case $basic_machine in
basic_machine=m68k-apollo
os=-sysv
;;
apollo68bsd)
basic_machine=m68k-apollo
os=-bsd
;;
aux)
basic_machine=m68k-apple
os=-aux
@@ -352,10 +309,6 @@ case $basic_machine in
encore | umax | mmax)
basic_machine=ns32k-encore
;;
es1800 | OSE68k | ose68k | ose | OSE)
basic_machine=m68k-ericsson
os=-ose
;;
fx2800)
basic_machine=i860-alliant
;;
@@ -374,14 +327,6 @@ case $basic_machine in
basic_machine=h8300-hitachi
os=-hms
;;
h8300xray)
basic_machine=h8300-hitachi
os=-xray
;;
h8500hms)
basic_machine=h8500-hitachi
os=-hms
;;
harris)
basic_machine=m88k-harris
os=-sysv3
@@ -397,30 +342,13 @@ case $basic_machine in
basic_machine=m68k-hp
os=-hpux
;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hp9k2[0-9][0-9] | hp9k31[0-9])
basic_machine=m68000-hp
;;
hp9k3[2-9][0-9])
basic_machine=m68k-hp
;;
hp9k6[0-9][0-9] | hp6[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hp9k7[0-79][0-9] | hp7[0-79][0-9])
basic_machine=hppa1.1-hp
;;
hp9k78[0-9] | hp78[0-9])
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][13679] | hp8[0-9][13679])
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])
@@ -429,16 +357,9 @@ case $basic_machine in
hppa-next)
os=-nextstep3
;;
hppaosf)
basic_machine=hppa1.1-hp
os=-osf
;;
hppro)
basic_machine=hppa1.1-hp
os=-proelf
;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
os=-mvs
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i[34567]86v32)
@@ -457,22 +378,6 @@ case $basic_machine in
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
i386mach)
basic_machine=i386-mach
os=-mach
;;
i386-vsta | vsta)
basic_machine=i386-unknown
os=-vsta
;;
i386-go32 | go32)
basic_machine=i386-unknown
os=-go32
;;
i386-mingw32 | mingw32)
basic_machine=i386-unknown
os=-mingw32
;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
@@ -501,10 +406,6 @@ case $basic_machine in
miniframe)
basic_machine=m68000-convergent
;;
*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
basic_machine=m68k-atari
os=-mint
;;
mipsel*-linux*)
basic_machine=mipsel-unknown
os=-linux-gnu
@@ -519,34 +420,10 @@ case $basic_machine in
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
mmix*)
basic_machine=mmix-knuth
os=-mmixware
;;
monitor)
basic_machine=m68k-rom68k
os=-coff
;;
msdos)
basic_machine=i386-unknown
os=-msdos
;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
;;
netbsd386)
basic_machine=i386-unknown
os=-netbsd
;;
netwinder)
basic_machine=armv4l-rebel
os=-linux
;;
news | news700 | news800 | news900)
basic_machine=m68k-sony
os=-newsos
@@ -559,10 +436,6 @@ case $basic_machine in
basic_machine=mips-sony
os=-newsos
;;
necv70)
basic_machine=v70-nec
os=-sysv
;;
next | m*-next )
basic_machine=m68k-next
case $os in
@@ -588,28 +461,9 @@ case $basic_machine in
basic_machine=i960-intel
os=-nindy
;;
mon960)
basic_machine=i960-intel
os=-mon960
;;
np1)
basic_machine=np1-gould
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
os=-proelf
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
;;
os68k)
basic_machine=m68k-none
os=-os68k
;;
pa-hitachi)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
@@ -627,19 +481,19 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pentium | p5 | k5 | k6 | nexen)
pentium | p5 | k5 | nexen)
basic_machine=i586-pc
;;
pentiumpro | p6 | 6x86)
pentiumpro | p6 | k6 | 6x86)
basic_machine=i686-pc
;;
pentiumii | pentium2)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexen-*)
pentium-* | p5-* | k5-* | nexen-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-*)
pentiumpro-* | p6-* | k6-* | 6x86-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-*)
@@ -663,9 +517,13 @@ case $basic_machine in
ps2)
basic_machine=i386-ibm
;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
*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
@@ -673,10 +531,6 @@ case $basic_machine in
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
sa29200)
basic_machine=a29k-amd
os=-udi
;;
sequent)
basic_machine=i386-sequent
;;
@@ -684,10 +538,6 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
sparclite-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
sps7)
basic_machine=m68k-bull
os=-sysv2
@@ -695,13 +545,6 @@ case $basic_machine in
spur)
basic_machine=spur-unknown
;;
st2000)
basic_machine=m68k-tandem
;;
stratus)
basic_machine=i860-stratus
os=-sysv4
;;
sun2)
basic_machine=m68000-sun
;;
@@ -742,18 +585,10 @@ case $basic_machine in
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
sv1)
basic_machine=sv1-cray
os=-unicos
;;
symmetry)
basic_machine=i386-sequent
os=-dynix
;;
t3e)
basic_machine=t3e-cray
os=-unicos
;;
tx39)
basic_machine=mipstx39-unknown
;;
@@ -771,10 +606,6 @@ case $basic_machine in
basic_machine=a29k-nyu
os=-sym1
;;
v810 | necv810)
basic_machine=v810-nec
os=-none
;;
vaxv)
basic_machine=vax-dec
os=-sysv
@@ -798,14 +629,6 @@ case $basic_machine in
basic_machine=a29k-wrs
os=-vxworks
;;
w65*)
basic_machine=w65-wdc
os=-none
;;
w89k-*)
basic_machine=hppa1.1-winbond
os=-proelf
;;
xmp)
basic_machine=xmp-cray
os=-unicos
@@ -813,10 +636,6 @@ case $basic_machine in
xps | xps100)
basic_machine=xps100-honeywell
;;
z8k-*-coff)
basic_machine=z8k-unknown
os=-sim
;;
none)
basic_machine=none-none
os=-none
@@ -824,15 +643,6 @@ case $basic_machine in
# 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.
w89k)
basic_machine=hppa1.1-winbond
;;
op50n)
basic_machine=hppa1.1-oki
;;
op60c)
basic_machine=hppa1.1-oki
;;
mips)
if [ x$os = x-linux-gnu ]; then
basic_machine=mips-unknown
@@ -855,7 +665,7 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
sparc | sparcv9)
sparc)
basic_machine=sparc-sun
;;
cydra)
@@ -867,16 +677,6 @@ case $basic_machine in
orion105)
basic_machine=clipper-highlevel
;;
mac | mpw | mac-mpw)
basic_machine=m68k-apple
;;
pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
c4x*)
basic_machine=c4x-none
os=-coff
;;
*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
@@ -918,10 +718,6 @@ case $os in
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
-os2_emx)
;;
-os2_vacpp)
;;
# First accept the basic system types.
# The portable systems comes first.
# Each alternative MUST END IN A *, to match a version number.
@@ -934,32 +730,15 @@ case $os in
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*)
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
case $basic_machine in
x86-* | i[34567]86-*)
;;
*)
os=-nto$os
;;
esac
;;
-nto*)
os=-nto-qnx
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
-beos*)
os=-beos
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
@@ -970,12 +749,6 @@ case $os in
-sunos6*)
os=`echo $os | sed -e 's|sunos6|solaris3|'`
;;
-opened*)
os=-openedition
;;
-wince*)
os=-wince
;;
-osfrose*)
os=-osfrose
;;
@@ -991,18 +764,12 @@ case $os in
-acis*)
os=-aos
;;
-386bsd)
os=-bsd
;;
-ctix* | -uts*)
os=-sysv
;;
-ns2 )
os=-nextstep2
;;
-nsk)
os=-nsk
;;
# Preserve the version number of sinix5.
-sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
@@ -1028,17 +795,14 @@ case $os in
# This must come after -sysvr4.
-sysv*)
;;
-ose*)
os=-ose
;;
-es1800*)
os=-ose
;;
-xenix)
os=-xenix
;;
-*mint | -*MiNT)
os=-mint
-rhapsody*)
;;
-qnx*)
;;
-nto*)
;;
-none)
;;
@@ -1065,9 +829,6 @@ case $basic_machine in
*-acorn)
os=-riscix1.2
;;
arm*-rebel)
os=-linux
;;
arm*-semi)
os=-aout
;;
@@ -1089,36 +850,15 @@ case $basic_machine in
# default.
# os=-sunos4
;;
m68*-cisco)
os=-aout
;;
mips*-cisco)
os=-elf
;;
mips*-*)
os=-elf
;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
sparc-* | *-sun)
os=-sunos4.1.1
;;
*-be)
os=-beos
;;
*-ibm)
os=-aix
;;
*-wec)
os=-proelf
;;
*-winbond)
os=-proelf
;;
*-oki)
os=-proelf
;;
*-hp)
os=-hpux
;;
@@ -1182,18 +922,6 @@ case $basic_machine in
f301-fujitsu)
os=-uxpv
;;
*-rom68k)
os=-coff
;;
*-*bug)
os=-coff
;;
*-apple)
os=-macos
;;
*-atari*)
os=-mint
;;
*)
os=-none
;;
@@ -1215,15 +943,9 @@ case $basic_machine in
-aix*)
vendor=ibm
;;
-beos*)
vendor=be
;;
-hpux*)
vendor=hp
;;
-mpeix*)
vendor=hp
;;
-hiux*)
vendor=hitachi
;;
@@ -1239,7 +961,7 @@ case $basic_machine in
-genix*)
vendor=ns
;;
-mvs* | -opened*)
-mvs*)
vendor=ibm
;;
-ptx*)
@@ -1251,15 +973,6 @@ case $basic_machine in
-aux*)
vendor=apple
;;
-hms*)
vendor=hitachi
;;
-mpw* | -macos*)
vendor=apple
;;
-*mint | -*MiNT)
vendor=atari
;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;

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,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

@@ -22,7 +22,7 @@
# make-makefiles - Quickly create Makefiles for subdirectories.
# Also, creates any needed subdirectories.
#
# usage: make-makefiles [ -t <topsrcdir> -d <depth> ] [ <subdir> | <subdir>/Makefile ] ...
# usage: make-makefiles [ -d <depth> ] [ <subdir> | <subdir>/Makefile ] ...
# Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
@@ -30,7 +30,7 @@
# Determine various tree path variables
#
($topsrcdir, $depth, @makefiles) = parse_arguments(@ARGV);
($depth, @makefiles) = parse_arguments(@ARGV);
$object_fullpath = `pwd`;
chdir $depth;
@@ -57,7 +57,7 @@ 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($topsrcdir, $depth);
$given_srcdir = find_srcdir($0, $depth);
if ($debug) {
warn "object_fullpath = $object_fullpath\n";
@@ -94,28 +94,13 @@ sub find_depth {
sub parse_arguments {
my @args = @_;
my $depth = '';
my $topsrcdir = '';
my @makefiles = ();
while (1) {
if ($args[0] eq '-d') {
$depth = $args[1];
shift @args;
shift @args;
} elsif ($args[0] eq '-t') {
$topsrcdir = $args[1];
shift @args;
shift @args;
} else {
last;
}
}
if ($topsrcdir eq '') {
$topsrcdir = $0; # Figure out topsrcdir based on program name.
$topsrcdir =~ s|/?build/autoconf/.*$||;
}
if ($depth eq '') {
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");
@@ -142,7 +127,7 @@ sub parse_arguments {
}
@makefiles = "Makefile" unless @args;
return ($topsrcdir, $depth, @makefiles);
return ($depth, @makefiles);
}
@@ -162,7 +147,10 @@ sub create_directories {
# Find the top of the source directory
# (Assuming that the executable is in $top_srcdir/build/autoconf)
sub find_srcdir {
my ($ac_given_srcdir, $depth) = @_;
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";

View File

@@ -1,46 +0,0 @@
#! /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): Stephen Lamm <slamm@netscape.com>
#
# mozconfigfind - 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=$1
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

@@ -1,94 +0,0 @@
#! /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): Stephen Lamm <slamm@netscape.com>
#
# mozconfig2client-mk - Translates .mozconfig into options for client.mk.
# Prints defines to stdout.
#
# See mozconfig2configure for more details
print_header() {
_mozconfig=${MOZCONFIG:-$HOME/.mozconfig}
cat >> $tmp_file <<EOF
# gmake
# This file is automatically generated for client.mk.
# Do not edit. Edit $_mozconfig instead.
# To create a new .mozconfig file, you can visit,
# http://webtools.mozilla.org/build/config.cgi
EOF
}
ac_add_options() {
echo "# $* is used by configure (not client.mk)" >> $tmp_file
}
mk_add_options() {
for _opt
do
# Escape shell characters, space, tab, dollar, quote, backslash,
# and substitute '@<word>@' with '$(<word>)'.
_opt=`echo "$_opt" | sed -e 's/\([\"\\]\)/\\\1/g; s/@\([^@]*\)@/\$(\1)/g;'`
echo $_opt;
opts="${opts:+$opts^}$_opt";
done >> $tmp_file
}
mk_echo_options() {
echo "Adding client.mk options from $MOZCONFIG:"
IFS=^
for _opt in $opts; do
echo " $_opt"
done
}
# Main
#--------------------------------------------------
scriptdir=`dirname $0`
topsrcdir=$1
out_file=$2
tmp_file="$out_file-tmp$$"
opts=""
trap "rm -f $tmp_file; exit 1" 1 2 15
MOZCONFIG=`$scriptdir/mozconfig-find $topsrcdir`
print_header > $tmp_file
# If the path changes, configure should be rerun
echo "# PATH=$PATH" >> $tmp_file
if [ "$MOZCONFIG" ]
then
. $MOZCONFIG
fi
if [ "$opts" ]; then
mk_echo_options
fi
if test -f $out_file && cmp -s $tmp_file $out_file; then
rm $tmp_file
else
mv -f $tmp_file $out_file
fi

View File

@@ -1,70 +0,0 @@
#! /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): Stephen Lamm (slamm@netscape.com)
#
# mozconfig2configurator - Translates .mozconfig into options for
# the online configurator,
#
# http://webtools.mozilla.org/build/config.cgi
#
# This is called by the 'webconfig' target of mozilla/client.mk
#
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
--*-*= ) url="$url$_opt&" ;;
--*-* ) url="$url$_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;'`
url="$url$_opt&"
done
}
#
# main
#
# find-mozconfig.sh
# In params: $MOZCONFIG $HOME ($MOZ_MYCONFIG)
scriptdir=`dirname $0`
MOZCONFIG=`$scriptdir/mozconfig-find $topsrcdir`
if [ "$MOZCONFIG" ]
then
url="http://webtools.mozilla.org/build/config.cgi?"
. $MOZCONFIG
# Drop the last character of $url
echo `expr "$url" : "\(.*\)."`
fi

View File

@@ -1,99 +0,0 @@
#! /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): Stephen Lamm <slamm@netscape.com>
#
# mozconfig2configure - 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.
# Note: $_AUTOCONF_TOOLS_DIR must be defined in the script that includes this.
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 configure options from $MOZCONFIG:"
eval "set -- $mozconfig_ac_options"
for _opt
do
echo " $_opt"
done
}
# Main
#--------------------------------------------------
_topsrcdir=`dirname $0`
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
MOZCONFIG=`$_AUTOCONF_TOOLS_DIR/mozconfig-find $_topsrcdir`
if [ "$MOZCONFIG" ]; then
. $MOZCONFIG
fi
if [ "$mozconfig_ac_options" ]; then
ac_echo_options 1>&2
fi
eval "set -- $mozconfig_ac_options $ac_options"

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

@@ -1,6 +1,3 @@
http://www.mozilla.org
ftp://ftp.mozilla.org
resource:///res/samples/test2.html
resource:///res/samples/test8.html
resource:///res/samples/test6.html
resource:///res/samples/test8.html
res:///res/samples/test2.html
res:///res/samples/test8.html

View File

@@ -1 +1 @@
0000000000
98091517

View File

@@ -1,292 +0,0 @@
#!perl -w
# This script copies modified files from a source CVS tree to a destination
# tree. Modified files are detected by comparing their modification dates
# with the CVS Entries file.
#
# Modified files are copied in their entirety to the destination tree
# (no diffing is done). Files are only copied of the CVS version of the
# file is the same in both trees. If the destination file is modified
# already, it is backed up and replaced.
#
# To use this on your tree/platform, do the following:
#
# 1. Fix the !perl line, if necessary.
# 2. Fix $dirsep to be the directory separator on your platform.
# 3. Uncomment the appropriate $dst_linebreaks file specify what linebreaks
# you want for the copied files. This variable defines the *destination* linebreaks
# that you want your changes to be converted to.
# For example, if you have a linux volume
# mounted (via SAMBA perhaps) to your windows box where you've made changes to
# source files, you'd want $dst_linebreaks to be set for unix. This ensures that
# linebreaks are converted to the appropriate OS linebreak scheme for your *target* tree.
# 4. Set $src_tree and $dest_tree to point to the directories you want
# to sync up. These don't have to point to the root of the tree,
# but should be equivalent directories in the two trees.
#
# First version:
# Simon Fraser <sfraser@netscape.com>
use File::stat;
use Time::Local;
# change for your platform ('\' == windows, ':' == mac, '/' == unix)
$dirsep = "\\";
# Set this to the native OS of the *destination* tree
# $dst_linebreaks = pack("cc", 13); # Mac
#$dst_linebreaks = pack("cc", 13, 10); # DOS
$dst_linebreaks = pack("cc", 10); # UNIX
#change for your src and dest trees
$src_tree = "x:\\mozilla\\xpfe\\components";
$dest_tree = "h:\\builds\\mozilla\\xpfe\\components";
#//--------------------------------------------------------------------------------------------------
#// _copyFile. Copy file from src to dest, converting linebreaks if necessary
#//--------------------------------------------------------------------------------------------------
sub _copyFile($;$;$;$)
{
my($srcdir, $destdir, $file, $backup) = @_;
my($srcfile) = $srcdir.$dirsep.$file;
my($dstfile) = $destdir.$dirsep.$file;
if ($backup)
{
my($counter) = 0;
while (-f $dstfile."-".$counter)
{
$counter ++;
}
rename($dstfile, $dstfile."-".$counter) or die "Failed to rename file\n";
}
print "Copying $file over to dest\n";
my($newdest) = $dstfile."_temp";
open(SRCFILE, "< $srcfile") or die "Can't open source file $srcfile\n";
open(NEWDEST, "> $newdest") or die "Can't open dest file $newdest\n";
while (<SRCFILE>)
{
chomp($_);
print NEWDEST $_.$dst_linebreaks;
}
close(SRCFILE);
close(NEWDEST);
if (!$backup) {
unlink($dstfile) or die "Failed to remove $dstfile\n";
}
rename($newdest, $dstfile) or die "Failed to rename $newdest\n";
}
#//--------------------------------------------------------------------------------------------------
#// _readCVSInfo. Suck in the CVS info from the Entries file
#//--------------------------------------------------------------------------------------------------
sub _readCVSInfo($)
{
my($cvsDir) = @_;
my($entries_file_name) = $cvsDir.$dirsep."CVS".$dirsep."Entries";
# print "Reading $entries_file_name\n";
open(ENTRIES, $entries_file_name) || die "Could not open file $entries_file_name";
my(%cvs_entries);
# Read in the path if available
while (defined ($line = <ENTRIES>))
{
chomp($line);
#parse out the line. Format is:
# files: /filename/version/date/options/tag
# dirs: D/dirname////
# dir? D
# because we might be reading an entries file from another platform, with
# different linebreaks, be anal about cleaning up $line.
if ($line =~ /^?\/(.+)\/(.+)\/(.+)\/(.*)\/(.*)?$/)
{
my($filename) = $1;
my($version) = $2;
my($date) = $3;
my($options) = $4;
my($tag) = $5;
my(%cvs_file) = (
"version" => $version,
"date" => $date,
"options" => $options,
"tag" => $tag
);
# print $filename." ".$version." ".$date." ".$options." ".$tag."\n";
$cvs_entries{$filename} = \%cvs_file;
}
}
close ENTRIES;
return %cvs_entries;
}
#//--------------------------------------------------------------------------------------------------
#// _fileIsModified. compare mod date with CVS entries to see if a file is modified
#//--------------------------------------------------------------------------------------------------
sub _fileIsModified($;$;$)
{
my($entries, $dir, $file) = @_;
my($abs_file) = $dir.$dirsep.$file;
if (exists($entries->{$file}))
{
my($date) = $entries->{$file}->{"date"};
# stat the file to get its date
my($file_data) = stat($abs_file) || die "Could not stat $file\n";
my($mod_string) = scalar(gmtime($file_data->mtime));
return ($mod_string ne $date);
}
else
{
return 0;
}
}
#//--------------------------------------------------------------------------------------------------
#// _processFile. args: entries hash, dir, filename
#//--------------------------------------------------------------------------------------------------
sub _processFile($;$;$;$;$)
{
my($src_entries, $dest_entries, $srcdir, $destdir, $file) = @_;
my($abs_file) = $srcdir.$dirsep.$file;
if (exists($src_entries->{$file}))
{
my($file_entry) = $src_entries->{$file};
my($version) = $file_entry->{"version"};
if (_fileIsModified($src_entries, $srcdir, $file))
{
my($rel_file) = $abs_file;
$rel_file =~ s/^$src_tree//;
# print "¥ÊFile $rel_file is modified\n";
# check CVS version in dest
my($dest_entry) = $dest_entries->{$file};
if ($dest_entry)
{
my($dest_version) = $dest_entry->{"version"};
my($versions_match) = ($version == $dest_version);
my($dest_modified) = _fileIsModified($dest_entries, $destdir, $file);
if ($versions_match)
{
# ok, we can copy the file over now, backing up dest if it is modified
_copyFile($srcdir, $destdir, $file, $dest_modified);
}
else
{
print "File $rel_file is version $version in the src tree, but $dest_version in dest. This file will not be copied.\n";
}
}
else
{
print "No CVS entry found in destination tree for $rel_file\n";
}
}
}
else
{
print "No entry for file $file\n";
}
}
#//--------------------------------------------------------------------------------------------------
#// _traverseDir. Traverse one dir, recurse for each found dir.
#//--------------------------------------------------------------------------------------------------
sub _traverseDir($;$)
{
my($srcdir, $destdir) = @_;
opendir(DIR, $srcdir) or die "Cannot open dir $srcdir\n";
my @files = readdir(DIR);
closedir DIR;
# suck in the CVS info for this dir, if there is a CVS dir
unless (-e $srcdir.$dirsep."CVS".$dirsep."Entries" && -e $destdir.$dirsep."CVS".$dirsep."Entries") {
print "$srcdir is not a CVS directory in both source and dest\n";
return;
}
print " Doing $srcdir\n";
my(%src_entries) = _readCVSInfo($srcdir);
my(%dest_entries) = _readCVSInfo($destdir);
my $file;
foreach $file (@files)
{
my $filepath = $srcdir.$dirsep.$file;
if (-d $filepath)
{
if ($file ne "CVS") # ignore 'CVS' dirs
{
# print "Going into $filepath\n";
_traverseDir($filepath, $destdir.$dirsep.$file);
}
}
else
{
# process this file
_processFile(\%src_entries, \%dest_entries, $srcdir, $destdir, $file);
}
}
}
#//--------------------------------------------------------------------------------------------------
#// MigrateChanges
#//--------------------------------------------------------------------------------------------------
sub MigrateChanges($;$)
{
my($srcdir, $destdir) = @_;
# Check that src and dest exist
if (! -d $srcdir) {
die "Source directory $srcdir does not exist\n";
}
if (! -d $destdir) {
die "Dest directory $destdir does not exist\n";
}
print "---------------------------------------------------------\n";
print "Migrating changes from\n $srcdir\nto\n $destdir\n";
print "---------------------------------------------------------\n";
_traverseDir($srcdir, $destdir);
print "---------------------------------------------------------\n";
}
MigrateChanges($src_tree, $dest_tree);

View File

@@ -34,54 +34,40 @@ use Moz;
#-----------------------------------------------
$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
$INCLUDE_CLASSIC_SKIN = 1;
$pull{all} = 0;
$pull{moz} = 0;
$pull{runtime} = 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{xpidl} = 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{stubs} = 0;
$build{runtime} = 0;
$build{common} = 0;
$build{imglib} = 0;
$build{necko} = 0;
$build{security} = 0;
$build{browserutils} = 0;
$build{intl} = 0;
$build{nglayout} = 0;
$build{editor} = 0;
$build{viewer} = 0;
$build{xpapp} = 0;
$build{extensions} = 1;
$build{plugins} = 0;
$build{mailnews} = 0;
$build{apprunner} = 0;
$build{resources} = 1;
$build{xptlink} = 0;
$options{transformiix} = 0;
$options{mathml} = 0;
$options{svg} = 0;
$options{mng} = 1;
$options{ldap} = 0;
$options{xmlextras} = 0;
$options{jar_manifests} = 1; # use jar.mn files for resources, not MANIFESTs
$options{jars} = 1; # build jar files
$options{chrome_files} = 0; # install files in chrome as well as making jar files.
# Don't change these (where should they go?)
$optiondefines{mathml}{MOZ_MATHML} = 1;
$optiondefines{svg}{MOZ_SVG} = 1;
$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
@@ -127,27 +113,25 @@ if ($build{all})
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{xpidl} = 0;
# $build{idl} = 0;
# $build{stubs} = 0;
# $build{runtime} = 1;
# $build{common} = 1;
# $build{imglib} = 1;
# $build{necko} = 1;
# $build{security} = 1;
# $build{browserutils} = 1;
# $build{intl} = 1;
# $build{nglayout} = 1;
# $build{editor} = 1;
# $build{viewer} = 1;
# $build{xpapp} = 1;
# $build{extensions} = 1;
# $build{plugins} = 1;
# $build{mailnews} = 1;
# $build{apprunner} = 1;
# $build{resources} = 0;
# $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
@@ -156,6 +140,12 @@ if ($build{most})
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!
@@ -174,19 +164,14 @@ else
OpenErrorLog("NGLayoutBuildLog"); # Release build requires that name
#OpenErrorLog("Mozilla.BuildLog"); # Tinderbox requires that name
}
Moz::StopForErrors();
#Moz::DontStopForErrors();
ConfigureBuildSystem();
if ($pull{all}) {
Checkout();
}
Checkout();
my(@gen_files) = (
":mozilla:xpfe:appshell:public:nsBuildID.h",
":mozilla:xpfe:browser:resources:locale:en-US:navigator.dtd"
);
SetBuildNumber(":mozilla:config:build_number", ":mozilla:config:aboutime.pl", \@gen_files);
SetBuildNumber();
chdir($MOZ_SRC);
BuildDist();

View File

@@ -29,57 +29,77 @@ 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
$INCLUDE_CLASSIC_SKIN = 1;
$pull{all} = 0;
$pull{moz} = 0;
$pull{runtime} = 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} = 0;
$build{common} = 0;
$build{imglib} = 0;
$build{necko} = 0;
$build{security} = 0;
$build{browserutils} = 0;
$build{intl} = 0;
$build{nglayout} = 0;
$build{editor} = 0;
$build{viewer} = 0;
$build{xpapp} = 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{plugins} = 0;
$build{mailnews} = 0;
$build{apprunner} = 0;
$build{resources} = 1;
$build{xptlink} = 0;
$options{transformiix} = 0;
$options{mathml} = 0;
$options{svg} = 0;
$options{mng} = 1;
$options{ldap} = 0;
$options{xmlextras} = 0;
$options{jar_manifests} = 1; # use jar.mn files for resources, not MANIFESTs
$options{jars} = 1; # build jar files
$options{chrome_files} = 0; # install files in chrome as well as making jar files.
# Don't change these (where should they go?)
$optiondefines{mathml}{MOZ_MATHML} = 1;
$optiondefines{svg}{MOZ_SVG} = 1;
$build{mailnews} = 1;
$build{apprunner} = 1;
#-----------------------------------------------
# configuration variables that affect the manner
@@ -127,6 +147,7 @@ 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;
@@ -134,7 +155,6 @@ if ($build{most})
$build{common} = 1;
$build{imglib} = 1;
$build{necko} = 1;
$build{security} = 1;
$build{browserutils} = 1;
$build{intl} = 1;
$build{nglayout} = 1;
@@ -142,10 +162,8 @@ if ($build{most})
$build{viewer} = 1;
$build{xpapp} = 1;
$build{extensions} = 1;
$build{plugins} = 1;
$build{mailnews} = 1;
$build{apprunner} = 1;
$build{resources} = 1;
}
# do the work
@@ -154,6 +172,12 @@ if ($build{most})
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!
@@ -176,11 +200,11 @@ else
Moz::StopForErrors();
#Moz::DontStopForErrors();
ConfigureBuildSystem();
if ($pull{all}) {
Checkout();
}
Checkout();
chdir($MOZ_SRC);
BuildDist();
chdir($MOZ_SRC);

View File

@@ -25,7 +25,6 @@ Replaces the AppleScript library I<CodeWarriorLib>.
=cut
use strict;
use Cwd;
use Mac::Types;
use Mac::AppleEvents;
use Mac::AppleEvents::Simple;
@@ -38,7 +37,6 @@ use vars qw($VERSION);
$VERSION = '1.02';
my($app) = 'CWIE';
my($scriptDir) = cwd();
# 0 == don't switch CWIE to front app in do_event(), 1 == do switch
# note: activate() still switches when called
@@ -71,12 +69,12 @@ sub _get_project ($) {
if ($num) { # is a list
foreach (1 .. AECountItems($cps)) {
my($cp) = AEGetNthDesc($cps, $_);
if (lc $full_path eq lc _full_path($cp)) {
if ($full_path eq _full_path($cp)) {
return($cp);
}
}
} else { # is only one, not a list
if (lc $full_path eq lc _full_path($cps)) {
if ($full_path eq _full_path($cps)) {
return($cps);
}
}
@@ -188,16 +186,17 @@ sub activate () {
foreach $psi (values(%Process)) {
if ($psi->processSignature() eq $app) {
$appath = $psi->processAppSpec();
_save_appath($filepath, $appath);
last;
$appath = $psi->processAppSpec(), "\n";
_save_appath($filepath, $appath);
last;
}
}
if (!$appath || !-x $appath) {
$appath = _read_appath($filepath);
if ((!$appath || ! -x $appath) && open(F, $filepath)) {
$appath = <F>;
close(F);
}
if (!$appath || ! -x $appath)
{
# make sure that MacPerl is a front process
@@ -259,23 +258,6 @@ sub activate () {
}
}
=pod
=item quit()
Quits CodeWarrior.
=cut
sub quit() {
$last_project_built = "";
$last_project_was_closed = 0;
my($evt) = do_event(qw/aevt quit/, $app);
}
sub _build ($;$) {
my($evt);
if ($_[1]) {
@@ -370,36 +352,11 @@ sub _get_folder ($$) {
}
sub _save_appath ($$) {
my($cwd) = cwd(); # remember the current working dir
chdir($scriptDir); # change dir to the script dir
open(F, '>' . $_[0]) or die $!;
print F $_[1];
close(F);
chdir($cwd); # restore the cwd
}
sub _read_appath ($) {
my($filepath) = @_;
my($cwd) = cwd(); # remember the current working dir
chdir($scriptDir); # change dir to the script dir
if (! -e $filepath) {
return "";
}
open(F, $filepath);
my($appath) = <F>;
close(F);
chdir($cwd); # restore the cwd
return($appath);
}
sub _test ($) {
activate();
my($path) = $_[0];

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.

View File

@@ -45,8 +45,7 @@
#pragma unsigned_char off
#pragma exceptions on
#pragma bool on
#pragma wchar_type on
#pragma RTTI on
#pragma RTTI on
/* Save as much space as possible with strings... */

View File

@@ -135,8 +135,7 @@ sub print {
# checkout( self, module, revision, date)
# MacCVS checkout command
# returns 1 on failure
sub checkout
{
sub checkout {
my($self, $module, $revision, $date ) = @_;
unless( defined ($module) ) { $module = ""; } # get rid of the pesky undefined warnings
unless( defined ($revision) ) { $revision = ""; }
@@ -144,11 +143,6 @@ sub checkout
$self->assertSessionOpen() || return 1;
my($revstring) = ($revision ne "") ? $revision : "(none)";
my($datestring) = ($date ne "") ? $date : "(none)";
print "Checking out $module with revision $revstring, date $datestring\n";
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

View File

@@ -1,146 +0,0 @@
#!perl -w
# make-jars [-d <destPath>] < <manifest.jr>
package MozJar;
require 5.004;
use strict;
use Cwd;
use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
use Moz;
use vars qw( @ISA @EXPORT );
@ISA = qw(Exporter);
@EXPORT = qw(ProcessJarManifest);
sub _addToJar($$$$$)
{
my($thing, $srcPath, $jarManDir, $zip, $compress) = @_;
#print "_addToJar($thing, $srcPath, $jarManDir, $zip, $compress)\n";
my $existingMember = $zip->memberNamed($thing);
if ($existingMember) {
my $modtime = $existingMember->lastModTime();
print "already have $thing at $modtime\n"; # XXX need to check mod time here!
return 0;
}
my $filepath = "$jarManDir:$srcPath";
$filepath =~ s|/|:|g;
if (!-e $filepath) {
$srcPath =~ /([\w\d.:\-\\\/]+)[:\\\/]([\w\d.\-]+)/;
$filepath = "$jarManDir:$2";
if (!-e $filepath) {
die "$filepath does not exist\n";
}
}
my $member = Archive::Zip::Member->newFromFile($filepath);
die "Failed to create zip file member $filepath\n" unless $member;
$member->fileName($thing);
print "Adding $filepath as $thing\n";
if ($compress) {
$member->desiredCompressionMethod(Archive::Zip::COMPRESSION_DEFLATED);
} else {
$member->desiredCompressionMethod(Archive::Zip::COMPRESSION_STORED);
}
$zip->addMember($member);
}
sub JarIt($$)
{
my ($jarfile, $zip) = @_;
#print "+++ jarring $jarfile\n";
#flush();
#system "zip -u $jarfile $args\n";
my $jarTempFile = $jarfile . ".temp";
$zip->writeToFileNamed($jarTempFile) == AZ_OK
|| die "zip writeToFileNamed $jarTempFile failed";
# set the file type/creator to something reasonable
MacPerl::SetFileInfo("ZIP ", "ZIP ", $jarTempFile);
rename($jarTempFile, $jarfile);
print "+++ finished jarring $jarfile\n";
}
sub ProcessJarManifest($$)
{
my ($jarManPath, $destPath) = @_;
$jarManPath = Moz::full_path_to($jarManPath);
$destPath = Moz::full_path_to($destPath);
#print "ProcessJarManifest($jarManPath, $destPath)\n";
print "+++ jarring $jarManPath\n";
my $jarManDir = "";
my $jarManFile = "";
if ($jarManPath =~ /([\w\d.:\-\\\/]+)[:\\\/]([\w\d.\-]+)/) {
$jarManDir = $1;
$jarManFile = $2;
}
else {
die "bad jar.mn specification";
}
open(FILE, "<$jarManPath") || die "could not open $jarManPath: $!";
while (<FILE>) {
chomp;
start:
if (/^([\w\d.\-\\\/]+)\:\s*$/) {
my $jarfile = "$destPath/$1";
$jarfile =~ s|/|:|g;
#my $args = "";
my $zip = Archive::Zip->new();
#print "new jar $jarfile\n";
if (-e $jarfile) {
#print "=====> $jarfile exists\n";
my $ok = $zip->read($jarfile);
if ($ok != AZ_OK) {
die "zip read $jarfile failed: $ok";
}
}
while (<FILE>) {
if (/^\s+([\w\d.\-\\\/]+)\s*(\([\w\d.\-\\\/]+\))?$\s*/) {
my $dest = $1;
my $srcPath = $2;
if ( $srcPath ) {
$srcPath = substr($srcPath,1,-1);
}
else {
$srcPath = ":" . $dest;
}
$srcPath =~ s|/|:|g;
_addToJar($dest, $srcPath, $jarManDir, $zip, 1);
} elsif (/^\s*$/) {
# end with blank line
last;
} else {
JarIt($jarfile, $zip);
goto start;
}
}
JarIt($jarfile, $zip);
} elsif (/^\s*\#.*$/) {
# skip comments
} elsif (/^\s*$/) {
# skip blank lines
} else {
close;
die "bad jar rule head at: $_";
}
}
close(FILE);
}

View File

@@ -34,10 +34,9 @@ require Exporter;
use Mac::Types;
use Mac::Events;
use Mac::Processes;
use File::Copy;
@ISA = qw(Exporter);
@EXPORT = qw(BuildProject LaunchCodeWarrior BuildProjectClean GetFileModDate OpenErrorLog MakeAlias StopForErrors DontStopForErrors InstallFromManifest InstallResources SetBuildNumber SetAgentString SetTimeBomb Delay ActivateApplication);
@EXPORT = qw(BuildProject BuildProjectClean OpenErrorLog MakeAlias StopForErrors DontStopForErrors InstallFromManifest InstallResources SetBuildNumber SetAgentString SetTimeBomb Delay ActivateApplication);
@EXPORT_OK = qw(CloseErrorLog UseCodeWarriorLib QUIET);
use Cwd;
@@ -85,12 +84,6 @@ sub UseCodeWarriorLib($)
# $CodeWarriorLib = full_path_to($CodeWarriorLib);
}
sub LaunchCodeWarrior()
{
CodeWarriorLib::activate();
}
sub activate_CodeWarrior()
{
#MacPerl::DoAppleScript(<<END_OF_APPLESCRIPT);
@@ -98,6 +91,12 @@ sub activate_CodeWarrior()
#END_OF_APPLESCRIPT
}
BEGIN
{
# UseCodeWarriorLib(":CodeWarriorLib");
# activate_CodeWarrior();
CodeWarriorLib::activate();
}
$logging = 0;
$recent_errors_file = "";
@@ -389,7 +388,6 @@ sub InstallResources($;$;$)
my ($manifest_file, $dest_dir, $copy_files) = @_;
$dest_dir ||= ":";
mkpath($dest_dir) if !-d $dest_dir;
$manifest_file =~ m/(.+):/;
my $source_dir = $1;
@@ -406,7 +404,7 @@ sub InstallResources($;$;$)
if ($copy_files)
{
copy("$source_dir:$file", "$dest_dir:$file");
print "Implement this if you need it";
}
else
{
@@ -416,28 +414,26 @@ sub InstallResources($;$;$)
}
sub SetBuildNumber($$$)
{
my($build_num_file, $build_gen_script, $files_to_touch) = @_;
open (OUTPUT, ">$build_num_file") || die "could not open buildnumber";
sub SetBuildNumber
{
open (BDATE, "perl :mozilla:config:bdate.pl|");
open (OUTPUT, ">:mozilla:config:build_number") || die "could not open buildnumber";
open (BDATE, "perl :mozilla:config:bdate.pl|");
while (<BDATE>) {
print OUTPUT $_;
}
while (<BDATE>) {
print OUTPUT $_;
}
close (BDATE);
close (OUTPUT);
close (BDATE);
close (OUTPUT);
my($file);
foreach $file (@$files_to_touch)
{
print "Writing build number to $file\n";
system ("perl $build_gen_script $file $build_num_file");
}
}
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
{
@@ -496,15 +492,6 @@ sub Delay($)
}
sub GetFileModDate($)
{
my($filePath)=@_;
my($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
$atime,$mtime,$ctime,$blksize,$blocks) = stat($filePath);
return $mtime;
}
sub ActivateApplication($)
{
my ($appSignature) = @_;

View File

@@ -1,172 +0,0 @@
package MozBuildFlags;
require 5.004;
require Exporter;
# Package that attempts to read a file from the Preferences folder,
# and get build settings out of it
use strict;
use Exporter;
use MozPrefs;
use vars qw(@ISA @EXPORT);
@ISA = qw(Exporter);
@EXPORT = qw(SetupBuildParams);
#-------------------------------------------------------------------------------
# These 3 arrays are the 'master lists' to control what gets built.
# We use arrays here, instead of just intializing the hashes directly,
# so that we can start the build at a given stage using a stored key.
#
# Ordering in these arrays is important; it has to reflect the order in
# which the build occurs.
#-------------------------------------------------------------------------------
my(@pull_flags) =
(
["moz", 1], # pull everything needed for mozilla
["runtime", 0] # used to just build runtime libs, up to NSPR
);
my(@build_flags) =
(
["all", 1],
["dist", 0],
["dist_runtime", 0],
["xpidl", 0],
["idl", 0],
["stubs", 0],
["runtime", 0],
["common", 0],
["imglib", 0],
["necko", 0],
["security", 0],
["browserutils", 0],
["intl", 0],
["nglayout", 0],
["editor", 0],
["viewer", 0],
["xpapp", 0],
["extensions", 0],
["plugins", 0],
["mailnews", 0],
["apprunner", 0],
["resources", 0],
["jars", 0]
);
my(@options_flags) =
(
["transformiix", 0],
["mathml", 0],
["svg", 0],
["mng", 1],
["ldap", 0],
["xmlextras", 0],
["mailextras", 1], # mail importers
["xptlink", 0] # xpt linker codewarrior plugin
);
#-------------------------------------------------------------------------------
# End of build flags
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# flagsArrayToHash
#
# Utility routine to migrate flag from a 2D array to a hash, where
# item[n][0] is the hash entry name, and item[n][1] is the hash entry value.
#-------------------------------------------------------------------------------
sub flagsArrayToHash($$)
{
my($src_array, $dest_hash) = @_;
my($item);
foreach $item (@$src_array)
{
$dest_hash->{$item->[0]} = $item->[1];
}
}
#-----------------------------------------------
# printHash
#
# Utility routine to print a hash
#-----------------------------------------------
sub printHash($)
{
my($hash_ref) = @_;
my($key, $value);
while (($key, $value) = each %$hash_ref)
{
print "$key $value\n";
}
}
#-------------------------------------------------------------------------------
# SetPullFlags
#-------------------------------------------------------------------------------
sub SetPullFlags($)
{
my($pull) = @_;
flagsArrayToHash(\@pull_flags, $pull);
}
#-------------------------------------------------------------------------------
# SetBuildFlags
#-------------------------------------------------------------------------------
sub SetBuildFlags($)
{
my($build) = @_;
flagsArrayToHash(\@build_flags, $build);
}
#-------------------------------------------------------------------------------
# SetBuildOptions
#-------------------------------------------------------------------------------
sub SetBuildOptions($)
{
my($options) = @_;
flagsArrayToHash(\@options_flags, $options);
}
#-------------------------------------------------------------------------------
# SetupBuildParams
#-------------------------------------------------------------------------------
sub SetupBuildParams($$$)
{
my($pull, $build, $options) = @_;
SetPullFlags($pull);
SetBuildFlags($build);
SetBuildOptions($options);
print "Build before:\n";
printHash($build);
# read the user pref file, that can change values in the array
ReadMozUserPrefs("Mozilla build prefs", $pull, $build, $options);
print "Build after:\n";
printHash($build);
}
1;

View File

@@ -1,536 +0,0 @@
#!perl -w
package MozJar;
#
# Module for creating jar files, either using a jar manifest, or
# simply jarring up folders on disk.
#
require 5.004;
require Exporter;
use strict;
use Archive::Zip;
use File::Path;
use Mac::Files;
use Moz;
use vars qw( @ISA @EXPORT );
@ISA = qw(Exporter);
@EXPORT = qw(CreateJarFileFromDirectory WriteOutJarFiles);
#-------------------------------------------------------------------------------
# Add the contents of a directory to the zip file
#
#-------------------------------------------------------------------------------
sub _addDirToJar($$$$)
{
my($dir, $jar_root, $zip, $compress) = @_;
opendir(DIR, $dir) or die "Cannot open dir $dir\n";
my @files = readdir(DIR);
closedir DIR;
my $unix_jar_root = $jar_root;
$unix_jar_root =~ s|:|/|g; # colon to slash conversion
my $file;
foreach $file (@files)
{
my $filepath = $dir.":".$file;
if (-d $filepath)
{
print "Adding files to jar from $filepath\n";
_addDirToJar($filepath, $jar_root, $zip, $compress);
}
else
{
my $member = Archive::Zip::Member->newFromFile($filepath);
die "Failed to create zip file member $filepath\n" unless $member;
my $unixName = $filepath;
$unixName =~ s|:|/|g; # colon to slash conversion
$unixName =~ s|^$unix_jar_root||; # relativise
$member->fileName($unixName);
# print "Adding $file as $unixName\n";
if ($compress) {
$member->desiredCompressionMethod(Archive::Zip::COMPRESSION_DEFLATED);
} else {
$member->desiredCompressionMethod(Archive::Zip::COMPRESSION_STORED);
}
$zip->addMember($member);
}
}
}
#-------------------------------------------------------------------------------
# Add the contents of a directory to the zip file
#
#-------------------------------------------------------------------------------
sub CreateJarFileFromDirectory($$$)
{
my($srcdir, $jarpath, $compress) = @_;
my $zip = Archive::Zip->new();
_addDirToJar($srcdir, $srcdir, $zip, $compress);
print "Saving zip file...\n";
my $status = $zip->writeToFileNamed($jarpath);
if ($status == 0) {
print "Zipping completed successfully\n";
} else {
print "Error saving zip file\n";
}
# set the file type/creator to something reasonable
MacPerl::SetFileInfo("ZIP ", "ZIP ", $jarpath);
}
#-------------------------------------------------------------------------------
# printZipContents
#
#-------------------------------------------------------------------------------
sub printZipContents($)
{
my($zip) = @_;
my(@members) = $zip->memberNames();
print "Zip contains:\n";
my($member);
foreach $member (@members)
{
print " $member\n";
}
}
#-------------------------------------------------------------------------------
# safeSaveJarFile
#
# Archive::Zip has a problem where you cannot save a zip file on top of
# an existing zip file that it has open, because it holds references
# into that zip. So we have to save to a temp file, then do a swap.
#
# Note that the zip will become invalid after this operation.
# If you want to do further operations on it, you'll have to reread it.
#-------------------------------------------------------------------------------
sub safeSaveJarFile($$)
{
my($zip, $full_dest_path) = @_;
my($temp_file_name) = $full_dest_path."_temp";
($zip->writeToFileNamed($temp_file_name) == Archive::Zip::AZ_OK) || die "Error writing jar to temp file $temp_file_name\n";
unlink $full_dest_path;
(rename $temp_file_name, $full_dest_path) || die "Failed to rename $temp_file_name\n";
MacPerl::SetFileInfo("ZIP ", "ZIP ", $full_dest_path);
}
#-------------------------------------------------------------------------------
# addToJarFile
#
# Add a file to a jar file
#
# Parameters:
# 1. Jar ID. Unix path of jar file inside chrome.
# 2. Abs path to jar.mn file (i.e. source) (mac breaks)
# 3. File source, relative to jar.mn path (mac breaks)
# 4. Abs path to the resulting .jar file (mac breaks)
# 5. Relative file path within the jar (unix breaks)
# 6. Reference to hash of jar files
#
#-------------------------------------------------------------------------------
sub addToJarFile($$$$$$$)
{
my($jar_id, $jar_man_dir, $file_src, $jar_path, $file_jar_path, $override, $jars) = @_;
# print "addToJarFile with:\n $jar_man_dir\n $file_src\n $jar_path\n $file_jar_path\n";
unless ($jar_path =~ m/(.+:)([^:]+)$/) { die "Bad jar path $jar_path\n"; }
my($target_dir) = $1;
my($jar_name) = $2;
$target_dir =~ s/[^:]+$//;
# print "¥ $target_dir $jar_name\n";
# find the source file
my($src) = $jar_man_dir.":".$file_src;
if ((!-e $src) && ($file_src =~ m/.+:([^:]+)$/)) # src does not exist. Fall back to looking for src in jar.mn dir
{
$file_src = $1;
$src = $jar_man_dir.":".$file_src;
if (!-e $src) {
die "Can't find chrome file $src\n";
}
}
if ($main::options{jars})
{
my($zip) = $jars->{$jar_id};
unless ($zip) { die "Can't find Zip entry for $jar_id\n"; }
# print "Adding $file_src to jar file $jar_path at $file_jar_path\n";
my($member) = Archive::Zip::Member->newFromFile($src);
unless ($member) { die "Failed to create zip file member $src\n"; }
$member->fileName($file_jar_path);
my($compress) = 1;
if ($compress) {
$member->desiredCompressionMethod(Archive::Zip::COMPRESSION_DEFLATED);
$member->desiredCompressionLevel(Archive::Zip::COMPRESSION_LEVEL_DEFAULT); # defaults to 6
} else {
$member->desiredCompressionMethod(Archive::Zip::COMPRESSION_STORED);
}
my($old_member) = $zip->memberNamed($file_jar_path);
if ($override)
{
if ($old_member)
{
# print "Overriding $file_jar_path in jar file $jar_id\n";
# need to compare mod dates or use the + here
$zip->removeMember($old_member);
}
$zip->addMember($member);
}
else
{
if ($old_member)
{
#compare dates here
my($member_moddate) = $old_member->lastModTime();
my($file_moddate) = GetFileModDate($src);
if ($file_moddate > $member_moddate)
{
print "Updating older file $file_jar_path in $jar_id\n";
$zip->removeMember($old_member);
$zip->addMember($member);
}
else
{
print "File $file_jar_path in $jar_id is more recent. Not updating.\n";
}
}
else
{
$zip->addMember($member);
}
}
}
if ($main::options{chrome_files}) # we install raw files too
{
my($rel_path) = $file_jar_path;
$rel_path =~ s|/|:|g; # slash to colons
my($dir_name) = $jar_name;
$dir_name =~ s/\.jar$//;
my($dst) = $target_dir.$dir_name.":".$rel_path;
# print "Aliassing $src\n to\n$dst\n";
MakeAlias($src, $dst); # don't check errors, otherwise we fail on replacement
}
}
#-------------------------------------------------------------------------------
# setupJarFile
#
# setup a zip for writing
#-------------------------------------------------------------------------------
sub setupJarFile($$$)
{
my($jar_id, $dest_path, $jar_hash) = @_;
# print "Creating jar file $jar_id at $jar_path\n";
my($jar_file) = $jar_id;
$jar_file =~ s|/|:|g; # slash to colons
my($full_jar_path) = Moz::full_path_to($dest_path.":".$jar_file);
if ($main::options{jars})
{
my($zip) = $jar_hash->{$jar_id};
if (!$zip) # if we haven't made it already, do so
{
my($zip) = Archive::Zip->new();
$jar_hash->{$jar_id} = $zip;
# does the jar file exist already? If so, read it in
if (-e $full_jar_path)
{
print "Reading in jar file $jar_id\n";
if ($zip->read($full_jar_path) != Archive::Zip::AZ_OK) { die "Failed to re-read $full_jar_path\n"; }
# printZipContents($zip);
}
}
}
else
{
# installing files.
# nothing to do. MakeAlias creates dirs as needed.
# add this jar to the list
$jar_hash->{$jar_id} = 1;
}
}
#-------------------------------------------------------------------------------
# closeJarFile
#
# We're done with this jar file _for this jar.mn_. We may add more entries
# to it later, so keep it open in the hash.
#-------------------------------------------------------------------------------
sub closeJarFile($$)
{
my($jar_path, $jar_hash) = @_;
# print "Closing jar file $jar_path\n";
if ($main::options{jars})
{
}
else
{
# installing files.
# nothing to do
}
}
#-------------------------------------------------------------------------------
# WriteOutJarFiles
#
# Now we dump out the jars
#-------------------------------------------------------------------------------
sub WriteOutJarFiles($$)
{
my($chrome_dir, $jars) = @_;
unless ($main::options{jars}) { return; }
my($full_chrome_path) = Moz::full_path_to($chrome_dir);
my($key);
foreach $key (keys %$jars)
{
my($zip) = $jars->{$key};
my($rel_path) = $key;
$rel_path =~ s/\//:/g;
my($output_path) = $full_chrome_path.":".$rel_path;
print "Writing zip file $key to $output_path\n";
# ensure the target dirs exist
my($path) = $output_path;
$path =~ s/[^:]+$//;
mkpath($path);
# unlink $output_path; # remove any existing jar
safeSaveJarFile($zip, $output_path);
# $zip is invalid after this operation, so nuke it here
$jars->{$key} = 0;
}
}
#-------------------------------------------------------------------------------
# registerChromePackage
#
# Enter a chrome package into the installed-chrome.txt file
#-------------------------------------------------------------------------------
sub registerChromePackage($$$$$$)
{
my($jar_file, $file_path, $chrome_dir, $jar_hash, $chrome_type, $pkg_name) = @_;
my($manifest_subdir) = $jar_file;
$manifest_subdir =~ s/:/\//g;
my($chrome_entry);
if ($main::options{jars}) {
$chrome_entry = "$chrome_type,install,url,jar:resource:/chrome/$manifest_subdir!/$chrome_type/$pkg_name";
} else {
$manifest_subdir =~ s/\.jar$/\//;
$chrome_entry = "$chrome_type,install,url,resource:/chrome/$manifest_subdir/$chrome_type/$pkg_name";
}
# print "Entering $chrome_entry in installed-chrome.txt\n";
# ensure chrome_dir exists
mkpath($chrome_dir);
my($inst_chrome) = ${chrome_dir}.":installed-chrome.txt";
if (open(CHROMEFILE, "<$inst_chrome")) {
while (<CHROMEFILE>) {
chomp;
if ($_ eq $chrome_entry) {
# $chrome_entry already appears in installed-chrome.txt file
# just update the mod date
my $now = time;
utime($now, $now, $inst_chrome) || die "couldn't touch $inst_chrome";
print "+++ updating chrome $inst_chrome\n+++\t\t$chrome_entry\n";
close(CHROMEFILE) || die "error: can't close $inst_chrome: $!";
return 0;
}
}
close(CHROMEFILE) || die "error: can't close $inst_chrome: $!";
}
open(CHROMEFILE, ">>${inst_chrome}") || die "Failed to open $inst_chrome\n";
print(CHROMEFILE "${chrome_entry}\n");
close(CHROMEFILE) || die "Failed to close $inst_chrome\n";
print "+++ adding chrome $inst_chrome\n+++\t\t$chrome_entry\n";
}
#-------------------------------------------------------------------------------
# Create or add to a jar file from a jar.mn file.
# Both arguments are relative to the mozilla root dir.
#
#
#-------------------------------------------------------------------------------
sub CreateJarFromManifest($$$)
{
my($jar_man_path, $dest_path, $jars) = @_;
if ($main::options{jars}) {
print "Jarring from $jar_man_path\n";
} else {
print "Installing files from $jar_man_path\n";
}
$jar_man_path = Moz::full_path_to($jar_man_path);
$dest_path = Moz::full_path_to($dest_path);
# if the jars hash is empty, nuke installed-chrome.txt
if (! scalar(%$jars))
{
print "Nuking installed-chrome.txt\n";
my($installed_chrome) = $dest_path.":installed-chrome.txt";
# unlink $installed_chrome;
}
my $jar_man_dir = "";
my $jar_man_file = "";
if ($jar_man_path =~ /(.+):([^:]+)$/)
{
$jar_man_dir = $1; # no trailing :
$jar_man_file = $2;
}
# Keep a hash of jar files, keyed on relative jar path (e.g. "packages/core.jar")
# Entries are open Archive::Zips (if zipping), and installed-chrome entries.
my($jar_id) = ""; # Current foo/bar.jar from jar.mn file
my($jar_file) = ""; # relative path to jar file (from $dest_path), with mac separators
my($full_jar_path);
open(FILE, "<$jar_man_path") || die "could not open \"$jar_man_path\": $!";
while (<FILE>)
{
my($line) = $_;
chomp($line);
# print "$line\n";
if ($line =~ /^\s*\#.*$/) { # skip comments
next;
}
if ($line =~/^([\w\d.\-\_\\\/]+)\:\s*$/) # line start jar file entries
{
$jar_id = $1;
$jar_file = $jar_id;
$jar_file =~ s|/|:|g; # slash to colons
$full_jar_path = $dest_path.":".$jar_file;
setupJarFile($jar_id, $dest_path, $jars);
}
elsif ($line =~ /^(\+?)\s+([\w\d.\-\_\\\/]+)\s*(\([\w\d.\-\_\\\/]+\))?$\s*/) # jar file entry
{
my($override) = ($1 eq "+");
my($file_dest) = $2;
my($file_src) = $3;
if ($file_src) {
$file_src = substr($file_src, 1, -1); #strip the ()
} else {
$file_src = $file_dest;
}
$file_src =~ s|/|:|g;
if ($jar_file ne "") # if jar is open, add to jar
{
if ($file_dest =~ /([\w\d.\-\_]+)\/([\w\d.\-\_\\\/]+)contents.rdf/)
{
my $chrome_type = $1;
my $pkg_name = $2;
registerChromePackage($jar_file, $file_dest, $dest_path, $jars, $chrome_type, $pkg_name);
}
addToJarFile($jar_id, $jar_man_dir, $file_src, $full_jar_path, $file_dest, $override, $jars);
}
else
{
die "bad jar.mn format at $line\n";
}
}
elsif ($line =~ /^\s*$/ ) # blank line
{
if ($jar_file ne "") #if a jar file is open, close it
{
closeJarFile($full_jar_path, $jars);
$jar_file = "";
$full_jar_path = "";
}
}
}
close(FILE);
if ($jar_file ne "") #if a jar file is open, close it
{
closeJarFile($full_jar_path, $jars);
}
}
1;

View File

@@ -1,146 +0,0 @@
package MozPrefs;
require 5.004;
require Exporter;
# Package that attempts to read a file from the Preferences folder,
# and get build settings out of it
use strict;
use Exporter;
use Mac::Files;
use vars qw(@ISA @EXPORT);
@ISA = qw(Exporter);
@EXPORT = qw(ReadMozUserPrefs);
#-------------------------------------------------------------------------------
#
# GetPrefsFolder
#
#-------------------------------------------------------------------------------
sub GetPrefsFolder()
{
my($prefs_folder) = FindFolder(kOnSystemDisk, kPreferencesFolderType, 1);
return $prefs_folder;
}
#-------------------------------------------------------------------------------
#
# WriteDefaultPrefsFile
#
#-------------------------------------------------------------------------------
sub WriteDefaultPrefsFile($)
{
my($file_path) = @_;
my($file_contents);
$file_contents = <<'EOS';
% You can use this file to customize the Mozilla build system.
% The following kinds of lines are allowable:
% Comment lines, which start with a '%' in the first column
% Lines with modify the default build settings. Examples are:
%
% pull runtime 1 % just pull runtime
% options mng 1 % turn mng on
% build jars 0 % don't build jar files
%
% Note that by default, the scripts have $build{"all"} and $pull{"all"}
% turned on, which overrides other settings. To do partial builds, turn
% these off thus:
% build all 0
%
EOS
$file_contents =~ s/%/#/g;
open(PREFS_FILE, "> $file_path") || die "Could not write default prefs file\n";
print PREFS_FILE ($file_contents);
close(PREFS_FILE);
MacPerl::SetFileInfo("McPL", "TEXT", $file_path);
}
#-------------------------------------------------------------------------------
#
# ReadPrefsFile
#
#-------------------------------------------------------------------------------
sub ReadPrefsFile($$$$)
{
my($file_path, $pull_hash, $build_hash, $options_hash) = @_;
if (open(PREFS_FILE, "< $file_path"))
{
print "Reading build prefs from $file_path\n";
while (<PREFS_FILE>)
{
my($line) = $_;
if ($line =~ /$\#/) { # ignore comments
next;
}
if ($line =~ /$\s*(\w+)\s+(\w+)\s+(\w+)\s*/)
{
my($array_name) = $1;
my($option_name) = $2;
my($option_value) = $3;
if ($array_name eq "pull")
{
$pull_hash->{$option_name} = $option_value;
}
elsif ($array_name eq "build")
{
$build_hash->{$option_name} = $option_value;
}
elsif ($array_name eq "options")
{
$options_hash->{$option_name} = $option_value;
}
else
{
print "Unknown pref option at $line\n";
}
}
}
close(PREFS_FILE);
}
else
{
print "No prefs file found at $file_path; using defaults\n";
WriteDefaultPrefsFile($file_path);
}
}
#-------------------------------------------------------------------------------
#
# ReadMozUserPrefs
#
#-------------------------------------------------------------------------------
sub ReadMozUserPrefs($$$$)
{
my($prefs_file_name, $pull_hash, $build_hash, $options_hash) = @_;
my($prefs_path) = GetPrefsFolder();
$prefs_path .= ":$prefs_file_name";
ReadPrefsFile($prefs_path, $pull_hash, $build_hash, $options_hash);
}
1;

File diff suppressed because it is too large Load Diff

View File

@@ -22,7 +22,7 @@
#
#
# nglayout pull script
# nglayout build script (debug)
#
use Mac::Processes;
use NGLayoutBuildList;
@@ -30,9 +30,14 @@ use Cwd;
use Moz;
# configuration variables
$DEBUG = 1;
$pull{all} = 1;
$pull{moz} = 0;
$pull{runtime} = 0;
$pull{lizard} = 0;
$pull{xpcom} = 0;
$pull{imglib} = 0;
$pull{netlib} = 0;
$pull{nglayout} = 0;
$pull{mac} = 0;
if ($pull{all})
{
@@ -42,6 +47,7 @@ if ($pull{all})
}
}
# do the work
# you should not have to edit anything bellow
chdir("::::");
@@ -49,6 +55,7 @@ chdir("::::");
Moz::StopForErrors();
#Moz::DontStopForErrors();
OpenErrorLog("NGLayoutPullLog");
#OpenErrorLog("::NGLayoutBuildLog");
OpenErrorLog("NGLayoutPullLog"); # Tinderbox requires that name
Checkout();

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

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

Binary file not shown.

Binary file not shown.

View File

@@ -1,12 +0,0 @@
#include <stdio.h>
#include <ConditionalMacros.h>
int main(int argc, char* argv[])
{
FILE* file = fopen("BuildSystemInfo.pm", "w");
if (file != NULL) {
fprintf(file, "$UNIVERSAL_INTERFACES_VERSION=0x%04X;\n", UNIVERSAL_INTERFACES_VERSION);
fclose(file);
}
}

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

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

View File

@@ -1,125 +0,0 @@
#!/bin/sh
# A hack to make mozilla rpms in place.
here=`pwd`
if [ ! -d ./mozilla ]
then
printf "\n\nDude, you have to be on the root of the mozilla cvs tree.\n\n"
exit 1
fi
rpm_place=$here/rpm_on_demand_dir
rm -rf $rpm_place
mkdir -p $rpm_place
mkdir -p $rpm_place/tarball
mkdir -p $rpm_place/home
mkdir -p $rpm_place/topdir
mkdir -p $rpm_place/topdir/BUILD
mkdir -p $rpm_place/topdir/RPMS
mkdir -p $rpm_place/topdir/RPMS/i386
mkdir -p $rpm_place/topdir/RPMS/noarch
mkdir -p $rpm_place/topdir/SOURCES
mkdir -p $rpm_place/topdir/SPECS
mkdir -p $rpm_place/topdir/SRPMS
_top_dir=$rpm_place/topdir
_spec_dir=$_top_dir/SPECS
_sources_dir=$_top_dir/SOURCES
_rpms_dir=$_top_dir/RPMS
_home=$rpm_place/home
_rpm_macros=$_home/.rpmmacros
_tarball_dir=$rpm_place/tarball
#_spec_file=$here/build/package/rpm/mozilla.spec
##
## Setup a phony topdir for the phony rpm macros file
##
echo "%_topdir $_top_dir" >> $_rpm_macros
##
## Make a tarball of the beast
##
cd $_tarball_dir
cvs co mozilla/client.mk
make -f mozilla/client.mk pull_all
tar vzcf mozilla-source.tar.gz mozilla
#XXXX YANK
#cp /tmp/mozilla-source.tar.gz .
#XXXX YANK
tarball=`/bin/ls -1 mozilla*.tar.gz | head -1`
if [ ! -f $tarball ]
then
printf "\n\nDude, failed to make mozilla tarball.\n\n"
exit 1
fi
# Put the tarball in the SOURCES dir
mv -f $tarball $_sources_dir
printf "\n\nMozilla tarball = %s\n\n" $_sources_dir/$tarball
# Find the spec file from the rpm
spec_in_rpm=`tar tzvf $_sources_dir/$tarball |grep -w "mozilla\.spec$" | awk '{ print $6; }'`
printf "\n\nspec_in_rpm=%s\n\n" $spec_in_rpm
# Extract the spec file from the tarball
spec_in_rpm_dir=`echo $spec_in_rpm | awk -F"/" '{ print $1; }'`
printf "\n\nspec_in_rpm_dir=%s\n\n" $spec_in_rpm_dir
tar zvxf $_sources_dir/$tarball $spec_in_rpm
#_spec_file=`/bin/ls -1 $spec_in_rpm_dir | grep "\.spec$" | head -1`
#printf "\n\n_spec_file=%s\n\n" $_spec_file
if [ ! -f $spec_in_rpm ]
then
printf "\n\nFailed to extract spec file from tarball.\n\n"
exit 1
fi
# Put the spec file in SPECS
#cp $spec_in_rpm $_spec_dir
#XXXX YANK
cp /tmp/mozilla.spec $_spec_dir
#XXXX YANK
HOME=$_home rpm -ba $_spec_dir/mozilla.spec # > /dev/null 2>&1
if [ $? -eq 0 ]
then
mkdir -p $rpm_place/RPMS
cp $_rpms_dir/i386/*.rpm $rpm_place/RPMS/
last=`/bin/ls -lt1 $rpm_place/RPMS|head -1`
echo "New RPM written to RPMS/$last"
else
echo "Failed to build the rpm. Check the spec file."
fi
echo
cd $rpm_place
# Cleanup
rm -rf $rpm_place/topdir $rpm_place/home

View File

@@ -1,6 +1,6 @@
Summary: Mozilla and stuff
Name: mozilla
Version: 666
Version: 5.0
Release: 0
Serial: 0
Copyright: NPL/MPL
@@ -241,14 +241,13 @@ then
###
###
rm -f $here/blank
touch $here/blank
MOZCONFIG=blank
export MOZCONFIG
./configure --disable-tests --with-xlib=no --with-motif=no --enable-strip-libs --disable-debug --enable-optimize --disable-gtk-mozilla
./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
@@ -264,7 +263,6 @@ mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/mozilla/plugins
#
################################
here=`pwd`
mkdir -p $here/file-lists
cd build/package/rpm
@@ -370,6 +368,7 @@ rm -rf $RPM_BUILD_ROOT
%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)

View File

@@ -1,69 +0,0 @@
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 build/unix/modules.mk from the Mozilla source tree.
#
# The Initial Developer of the Original Code is Christopher
# Seawood. Portions created by Christopher Seawood are
# Copyright (C) 2000 Christopher Seawood. All Rights Reserved.
#
#
BUILD_MODULE_DIRS := config build include
_BUILD_MODS =
NSPRPUB_DIR =
# client.mk does not have topsrcdir set
ifndef topsrcdir
topsrcdir=$(TOPSRCDIR)
endif
ifndef MOZ_NATIVE_NSPR
# Do not regenerate Makefile for NSPR
ifdef USE_NSPR_AUTOCONF
NSPRPUB_DIR = nsprpub
else
NSPRPUB_DIR = $(topsrcdir)/nsprpub
endif
endif
ifneq ($(BUILD_MODULES),all)
ifdef CROSS_COMPILE
BUILD_MODULE_DIRS_js = $(NSPRPUB_DIR)
endif
BUILD_MODULE_DIRS_dbm = $(NSPRPUB_DIR) dbm
BUILD_MODULE_DIRS_js += js
BUILD_MODULE_DIRS_necko = $(BUILD_MODULE_DIRS_xpcom) netwerk
BUILD_MODULE_DIRS_transformiix = extensions/transformiix
BUILD_MODULE_DIRS_xpcom = $(NSPRPUB_DIR) modules/libreg xpcom
BUILD_MODULE_DIRS_xpconnect = $(BUILD_MODULE_DIRS_xpcom) $(BUILD_MODULE_DIRS_js) js/src/xpconnect
BUILD_MODULE_DIRS += $(foreach mod,$(BUILD_MODULES), $(BUILD_MODULE_DIRS_$(mod)))
# Remove dups from the list to speed up the build
#
ifdef PERL
BUILD_MODULE_DIRS := $(shell $(PERL) -e 'undef @out; \
foreach $$d (@ARGV) { \
push @out, $$d if (!grep(/$$d/, @out)); \
}; \
print "@out\n"; ' $(BUILD_MODULE_DIRS))
else
# Since PERL isn't defined, client.mk must've called us so order doesn't matter
BUILD_MODULE_DIRS := $(sort $(BUILD_MODULE_DIRS))
endif
endif # BUILD_MODULES

View File

@@ -5,4 +5,3 @@ 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@
GC_LEAK_DETECTOR=@MOZ_NSPRENV_GC_LEAK_DETECTOR@

View File

@@ -1,73 +0,0 @@
#!/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):
# jim_nance@yahoo.com
#
#
# 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 jim_nance@yahoo.com
#
# Make sure a Makefile exists
if [ ! -f Makefile ]
then
echo
echo "There ain't no 'Makefile' over here: $pwd, dude."
echo
exit
fi
# awk can be quite primitave. Try enhanced versions first
for AWK in gawk nawk awk; do
if type $AWK 2>/dev/null 1>/dev/null; then
break;
fi
done
$AWK -v PWD=`pwd` '
{
if($1 == "DEPTH") {
DEPTH=$0
}
}
END {
sub("^.*DEPTH.*=[ \t]*", "", DEPTH)
dlen = split(DEPTH, darray, "/")
plen = split(PWD, parray, "/")
fsep=""
for(i=plen-dlen; i<=plen; i++) {
printf("%s%s", fsep, parray[i])
fsep="/"
}
printf("\n")
}' Makefile

View File

@@ -1,21 +0,0 @@
#!/bin/sh
#
# Usage from makefile:
# ELOG = . $(topdir)/build/autoconf/print-failed-commands.sh
# $(ELOG) $(CC) $CFLAGS -o $@ $<
#
# This shell script is used by the build system to print out commands that fail
# to execute properly. It is designed to make the "make -s" command more
# useful.
#
# Note that in the example we are sourcing rather than execing the script.
# Since make already started a shell for us, we might as well use it rather
# than starting a new one.
( exec "$@" ) || {
echo
echo "In the directory " `pwd`
echo "The following command failed to execute properly:"
echo "$@"
exit 1;
}

View File

@@ -1,47 +0,0 @@
#!/bin/sh
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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 test-ending-newline.sh
#
# The Initial Developer of the Original Code is Christopher
# Seawood <cls@seawood.org>. Portions created by Christopher Seawood
# are Copyright (C) 2000 Christopher Seawood. All Rights Reserved.
#
# The purpose of this file is to find the files that do not end with a
# newline. Some compilers fail if the source files do not end with a
# newline.
#
#
test_file=newline_test
test_dummy=newline_testee
inlist="$*"
broken_list=
if test "$inlist" = ""; then
echo "Usage: $0 *.c *.cpp";
exit 0;
fi
echo "" > $test_file
for f in $inlist; do
if test -f $f; then
tail -c 1 $f > $test_dummy
if ! `cmp -s $test_file $test_dummy`; then
broken_list="$broken_list $f"
fi
fi
done
rm -f $test_file $test_dummy
echo $broken_list

View File

@@ -1,13 +0,0 @@
#!/bin/sh
LD_LIBRARY_PATH=.
export LD_LIBRARY_PATH
PROG=mozilla-bin
PLIBS=""
for l in *.so components/*.so; do
PLIBS="$PLIBS -incobj $l"
done
$ECHO /bin/gprof -L. -Lcomponents -all $PLIBS $PROG $PROG.hiout

View File

@@ -1,21 +0,0 @@
#!/bin/sh
LD_LIBRARY_PATH=.
export LD_LIBRARY_PATH
PROG=mozilla-bin
PLIBS="-L."
TOOL=hiprof
for l in ./*.so components/*.so; do
PLIBS="$PLIBS -incobj $l"
done
$ECHO atom $PROG -tool $TOOL -env threads -toolargs="-calltime -systime" -all $PLIBS
cd components && (
for f in lib*.so; do
mv ../$f.$PROG.$TOOL.threads .
done
)

View File

@@ -59,9 +59,9 @@
##
#
cmdname=`basename $0`
MOZ_DIST_BIN=`dirname $0`
MOZ_APPRUNNER_NAME="./mozilla-bin"
MOZ_VIEWER_NAME="./viewer"
MOZ_APPRUNNER_NAME="mozilla-bin"
MOZ_VIEWER_NAME="viewer"
MOZ_DIST_BIN=""
MOZ_PROGRAM=""
#
##
@@ -128,18 +128,12 @@ moz_test_binary()
##########################################################################
moz_get_debugger()
{
debuggers="ddd gdb dbx bdb"
debuggers="ddd gdb dbx"
debugger="notfound"
done="no"
for d in $debuggers
do
moz_test_binary /bin/type
if [ $? -eq 1 ]
then
dpath=`type ${d} | awk '{print $3;}'`
else
dpath=`which ${d}`
fi
dpath=`which ${d}`
if [ -x "$dpath" ]
then
debugger=$dpath
@@ -164,13 +158,7 @@ moz_run_program()
## Use md5sum to crc a core file. If md5sum is not found on the system,
## then dont debug core files.
##
moz_test_binary /bin/type
if [ $? -eq 1 ]
then
crc_prog=`type md5sum | awk '{print $3;}'`
else
crc_prog=`which md5sum`
fi
crc_prog=`which md5sum`
if [ -x "$crc_prog" ]
then
DEBUG_CORE_FILES=1
@@ -231,36 +219,17 @@ moz_debug_program()
fi
if [ -n "$moz_debugger" ]
then
moz_test_binary /bin/type
if [ $? -eq 1 ]
then
debugger=`type $moz_debugger | awk '{print $3;}'`
else
debugger=`which $moz_debugger`
fi
debugger=`which $moz_debugger`
else
debugger=`moz_get_debugger`
fi
if [ -x "$debugger" ]
then
echo "set args ${1+"$@"}" > /tmp/mozargs$$
# If you are not using ddd, gdb and know of a way to convey the arguments
# over to the prog then add that here- Gagan Saksena 03/15/00
case `basename $debugger` in
gdb) echo "$debugger $prog -x /tmp/mozargs$$"
$debugger $prog -x /tmp/mozargs$$
;;
ddd) echo "$debugger --debugger \"gdb -x /tmp/mozargs$$\" $prog"
$debugger --debugger "gdb -x /tmp/mozargs$$" $prog
;;
*) echo "$debugger $prog ${1+"$@"}"
$debugger $prog ${1+"$@"}
;;
esac
/bin/rm /tmp/mozargs$$
else
echo "Could not find a debugger on your system."
fi
if [ -x "$debugger" ]
then
echo "$debugger $prog ${1+"$@"}"
$debugger $prog ${1+"$@"}
else
echo "Could not find a debugger on your system."
fi
}
##########################################################################
##
@@ -275,6 +244,10 @@ moz_debugger=""
while [ $# -gt 0 ]
do
case $1 in
-h | --help)
moz_usage
exit 0
;;
-g | --debug)
moz_debug=1
shift
@@ -321,6 +294,48 @@ then
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
@@ -345,27 +360,19 @@ SHLIB_PATH=${MOZ_DIST_BIN}${SHLIB_PATH+":$SHLIB_PATH"}
## Set LIBPATH for AIX
LIBPATH=${MOZ_DIST_BIN}${LIBPATH+":$LIBPATH"}
#
## Set LIBPATH for BeOS
LIBRARY_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/components${LIBRARY_PATH+":$LIBRARY_PATH"}
#
## Set ADDON_PATH for BeOS
ADDON_PATH=${MOZ_DIST_BIN}${ADDON_PATH+":$ADDON_PATH"}
echo "MOZILLA_FIVE_HOME=$MOZILLA_FIVE_HOME"
echo " LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
echo " LIBRARY_PATH=$LIBRARY_PATH"
echo " SHLIB_PATH=$SHLIB_PATH"
echo " LIBPATH=$LIBPATH"
echo " ADDON_PATH=$ADDON_PATH"
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 LIBRARY_PATH ADDON_PATH
export SHLIB_PATH LIBPATH
if [ $moz_debug -eq 1 ]
if [ "$moz_debug" = "1" ]
then
moz_debug_program ${1+"$@"}
else

View File

@@ -1,21 +0,0 @@
#!/bin/sh
LD_LIBRARY_PATH=.
export LD_LIBRARY_PATH
PROG=mozilla-bin
PLIBS="-L."
TOOL=third
for l in ./*.so components/*.so; do
PLIBS="$PLIBS -incobj $l"
done
$ECHO atom $PROG -tool $TOOL -env threads -g -all $PLIBS -toolargs="-leaks all -before NS_ShutdownXPCOM"
cd components && (
for f in lib*.so; do
mv ../$f.$PROG.$TOOL.threads .
done
)

View File

@@ -2,6 +2,3 @@ nsICertificatePrincipal.idl
nsICodebasePrincipal.idl
nsIPrincipal.idl
nsIScriptSecurityManager.idl
nsISignatureVerifier.idl
nsISecurityCheckedComponent.idl

View File

@@ -33,9 +33,6 @@ XPIDLSRCS = \
nsIPrincipal.idl \
nsICodebasePrincipal.idl \
nsICertificatePrincipal.idl \
nsIAggregatePrincipal.idl \
nsISignatureVerifier.idl \
nsISecurityCheckedComponent.idl \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@@ -28,9 +28,6 @@ XPIDLSRCS= \
.\nsIPrincipal.idl \
.\nsICertificatePrincipal.idl \
.\nsICodebasePrincipal.idl \
.\nsIAggregatePrincipal.idl \
.\nsISignatureVerifier.idl \
.\nsISecurityCheckedComponent.idl \
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@@ -1,40 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Mitch Stoltz <mstoltz@netscape.com>
*/
/* Defines an interface for aggregate principals. */
%{C++
#define NS_AGGREGATEPRINCIPAL_CONTRACTID "@mozilla.org/aggregateprincipal;1"
#define NS_AGGREGATEPRINCIPAL_CLASSNAME "aggregateprincipal"
%}
#include "nsIPrincipal.idl"
[uuid(1c30a682-1dd2-11b2-ba9b-86a86f300cbc)]
interface nsIAggregatePrincipal : nsISupports {
attribute nsIPrincipal certificate;
attribute nsIPrincipal codebase;
readonly attribute nsIPrincipal primaryChild;
void intersect(in nsIPrincipal other);
};

View File

@@ -14,25 +14,24 @@
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999-2000 Netscape Communications Corporation. All
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Mitchell Stoltz <mstoltz@netscape.com>
*/
/* Defines an interface for certificate principals. */
#include "nsIPrincipal.idl"
#include "nsIZipReader.idl"
%{C++
#define NS_CERTIFICATEPRINCIPAL_CONTRACTID "@mozilla.org/certificateprincipal;1"
#define NS_CERTIFICATEPRINCIPAL_PROGID "component://netscape/certificateprincipal"
#define NS_CERTIFICATEPRINCIPAL_CLASSNAME "certificateprincipal"
%}
[uuid(ebfefcd0-25e1-11d2-8160-006008119d7a)]
interface nsICertificatePrincipal : nsISupports {
readonly attribute string certificateID;
attribute string commonName;
//-- The Get functions for these attributes DO NOT COPY.
readonly attribute string issuerName;
readonly attribute string serialNumber;
};

View File

@@ -24,7 +24,7 @@
interface nsIURI;
%{C++
#define NS_CODEBASEPRINCIPAL_CONTRACTID "@mozilla.org/codebaseprincipal;1"
#define NS_CODEBASEPRINCIPAL_PROGID "component://netscape/codebaseprincipal"
#define NS_CODEBASEPRINCIPAL_CLASSNAME "codebaseprincipal"
%}
@@ -34,5 +34,7 @@ interface nsICodebasePrincipal : nsISupports {
readonly attribute nsIURI URI;
readonly attribute string origin;
boolean SameOrigin(in nsIPrincipal other);
};

View File

@@ -14,12 +14,10 @@
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999-2000 Netscape Communications Corporation. All
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Mitch Stoltz
*/
/* Defines the abstract interface for a principal. */
@@ -30,45 +28,37 @@
struct JSPrincipals;
%}
interface nsIPref;
[ptr] native JSPrincipals(JSPrincipals);
[uuid(ff9313d0-25e1-11d2-8160-006008119d7a)]
interface nsIPrincipal : nsISupports {
// Values of capabilities for each principal. Order is
// significant: if an operation is performed on a set
// of capabilities, the minimum is computed.
const short ENABLE_DENIED = 1;
const short ENABLE_UNKNOWN = 2;
const short ENABLE_UNKNOWN = 0;
const short ENABLE_GRANTED = 1;
const short ENABLE_DENIED = 2;
const short ENABLE_WITH_USER_PERMISSION = 3;
const short ENABLE_GRANTED = 4;
string ToString();
void ToString(out string result);
string ToUserVisibleString();
void GetPreferences(out string prefName, out string id,
out string grantedList, out string deniedList);
boolean Equals(in nsIPrincipal other);
void Equals(in nsIPrincipal other, out boolean result);
unsigned long HashValue();
JSPrincipals GetJSPrincipals();
void GetJSPrincipals(out JSPrincipals jsprin);
short CanEnableCapability(in string capability);
void SetCanEnableCapability(in string capability, in short canEnable);
boolean IsCapabilityEnabled(in string capability, in voidPtr annotation);
boolean IsCapabilityEnabled(in string capability, in voidStar annotation);
void EnableCapability(in string capability, inout voidPtr annotation);
void EnableCapability(in string capability, inout voidStar annotation);
void RevertCapability(in string capability, inout voidPtr annotation);
void RevertCapability(in string capability, inout voidStar annotation);
void DisableCapability(in string capability, inout voidPtr annotation);
void DisableCapability(in string capability, inout voidStar annotation);
void CapabilitiesToString(out string result);
};

View File

@@ -33,33 +33,6 @@ interface nsIURI;
[uuid(58df5780-8006-11d2-bd91-00805f8ae3f4)]
interface nsIScriptSecurityManager : nsISupports
{
///////////////// Principals ///////////////////////
/**
* Return the principal of the innermost frame of the currently
* executing script. Will return null if there is no script
* currently executing.
*/
nsIPrincipal GetSubjectPrincipal();
/**
* Return the all-powerful system principal.
*/
nsIPrincipal GetSystemPrincipal();
/**
* Return a principal that can be QI'd to nsICodebasePrincipal and
* has the same origin as aURI.
*/
nsIPrincipal GetCodebasePrincipal(in nsIURI aURI);
/**
* Return a principal that can be QI'd to nsICertificatePrincipal.
*/
nsIPrincipal GetCertificatePrincipal(in string CertID);
///////////////// Security Checks //////////////////
/**
* Checks whether the currently executing script can access the given
* property.
@@ -68,18 +41,16 @@ interface nsIScriptSecurityManager : nsISupports
* @param obj The object that is being accessed
* @param prop The ordinal of the property being accessed (see nsDOMPropEnums.h)
* @param isWrite True if write access is being attempted
* @return True if access is granted
*/
void CheckScriptAccess(in JSContextPtr cx, in voidPtr obj,
in long prop, in boolean isWrite);
boolean CheckScriptAccess(in JSContextPtr cx, in voidStar obj,
in long prop, in boolean isWrite);
/**
* Check that the script with context "cx" can load "uri".
*
* Will return error code NS_ERROR_DOM_BAD_URI if the load request
* should be denied.
*
* @param cx the JSContext of the script causing the load
* @param uri the URI that is being loaded
*/
void CheckLoadURIFromScript(in JSContextPtr cx, in nsIURI uri);
@@ -88,79 +59,36 @@ interface nsIScriptSecurityManager : nsISupports
*
* Will return error code NS_ERROR_DOM_BAD_URI if the load request
* should be denied.
*
* @param from the URI causing the load
* @param uri the URI that is being loaded
* @param disallowFromMail if true, return NS_ERROR_DOM_BAD_URI if 'from'
* is a URI associated with mail or news
*/
void CheckLoadURI(in nsIURI from, in nsIURI uri,
in boolean disallowFromMail);
/**
* Check that the function 'funObj' is allowed to run on 'targetObj'
*
* Will return error code NS_ERROR_DOM_SECURITY_ERR if the function
* should not run
*
* @param cx The current active JavaScript context.
* @param funObj The function trying to run..
* @param targetObj The object the function will run on.
*/
void CheckFunctionAccess(in JSContextPtr cx, in voidPtr funObj,
in voidPtr targetObj);
void CheckLoadURI(in nsIURI from, in nsIURI uri);
/**
* Return true if content from the given principal is allowed to
* execute scripts.
* Return the principal of the innermost frame of the currently
* executing script. Will return null if there is no script
* currently executing.
*/
nsIPrincipal GetSubjectPrincipal();
nsIPrincipal GetSystemPrincipal();
nsIPrincipal GetCodebasePrincipal(in nsIURI aURI);
boolean CanExecuteScripts(in nsIPrincipal principal);
boolean CanExecuteFunction(in voidStar jsFunction);
///////////////// Capabilities /////////////////////
/**
* Request that 'capability' can be enabled by scripts or applets running
* with 'principal'. Will prompt user if necessary. Returns
* nsIPrincipal::ENABLE_GRANTED or nsIPrincipal::ENABLE_DENIED based on user's choice.
*/
void RequestCapability(in nsIPrincipal principal, in string capability, out short result);
/**
* Return true if the currently executing script has 'capability' enabled.
*/
boolean IsCapabilityEnabled(in string capability);
/**
* Enable 'capability' in the innermost frame of the currently executing
* script.
*/
void EnableCapability(in string capability);
/**
* Remove 'capability' from the innermost frame of the currently executing
* script. Any setting of 'capability' from enclosing frames thus comes into
* effect.
*/
void RevertCapability(in string capability);
/**
* Disable 'capability' in the innermost frame of the currently executing
* script.
*/
void DisableCapability(in string capability);
//////////////// Master Certificate Functions ////////////////////
/**
* Allow 'certificateID' to enable 'capability.' Can only be performed
* by code signed by the system certificate.
*/
void SetCanEnableCapability(in string certificateID, in string capability,
in short canEnable);
nsIPrincipal GetCertificatePrincipal(in string aIssuer, in string aSerialNumber);
};
%{C++
#define NS_SCRIPTSECURITYMANAGER_CONTRACTID "@mozilla.org/scriptsecuritymanager;1"
#define NS_SCRIPTSECURITYMANAGER_PROGID "component://netscape/scriptsecuritymanager"
#define NS_SCRIPTSECURITYMANAGER_CLASSNAME "scriptsecuritymanager"
%}

View File

@@ -1,49 +0,0 @@
/* -*- Mode: IDL; tab-width: 4; 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) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/*
* Interface checked by caps to determine the capability needed to
* call methods on a component from potentially untrusted code.
*
* See also foo, which advertises whether untrusted code can get
* services and create instances.
*/
#include "nsISupports.idl"
/**
* Each method of this interface should return a string representing the
* script capability needed to perform the operation on the target component.
*
* Return values of 'AllAccess' or 'NoAccess' unconditionally allow or deny
* access to the operation.
*/
[scriptable, uuid(0dad9e8c-a12d-4dcb-9a6f-7d09839356e1)]
interface nsISecurityCheckedComponent : nsISupports {
string canCreateWrapper(in nsIIDPtr iid);
string canCallMethod(in nsIIDPtr iid, in wstring methodName);
string canGetProperty(in nsIIDPtr iid, in wstring propertyName);
string canSetProperty(in nsIIDPtr iid, in wstring propertyName);
};
// could put %{ block here containing macro'ed implementations of this
// interface for component developers' convenience.

View File

@@ -1,64 +0,0 @@
/* -*- Mode: IDL; tab-width: 4; 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-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Mitchell Stoltz <mstoltz@netscape.com>
*/
/* An interface for calculating secure hashes and verifying signatures*/
#include "nsIPrincipal.idl"
[ptr] native UnsignedCharPtr(unsigned char);
[uuid(7bdbdb36-1dd2-11b2-a44f-e303037f214d)]
interface nsISignatureVerifier : nsISupports
{
/* Sig Verification Error Codes */
const long VERIFY_OK = 0;
const long VERIFY_ERROR_UNKNOWN_CA = -8172; /* -8172 is the error code returned by PSM */
/* Hash Algorithms (based on cmtcmn.h) */
const short MD2 = 1;
const short MD5 = 2;
const short SHA1 = 3;
const unsigned long MD2_LENGTH = 16;
const unsigned long MD5_LENGTH = 16;
const unsigned long SHA1_LENGTH = 20;
const unsigned long MAX_HASH_LENGTH = SHA1_LENGTH;
/* Secure Hashing functions */
void hashBegin(in unsigned long alg, out unsigned long id);
void hashUpdate(in unsigned long id, in string buf, in unsigned long buflen);
[noscript] void hashEnd(in unsigned long id, out UnsignedCharPtr hash,
out unsigned long hashlen, in unsigned long maxLen);
/* Signature Verification functions */
nsIPrincipal createPrincipalFromSignature(in string aSignature,
in unsigned long aSignatureLen);
nsIPrincipal verifySignature(in string aSignature,
in unsigned long aSignatureLen,
in string plaintext,
in unsigned long plaintextLen,
out long errorCode);
};
%{C++
#define SIGNATURE_VERIFIER_CONTRACTID "@mozilla.org/psm;1"
%}

View File

@@ -1,4 +1,3 @@
nsAggregatePrincipal.h
nsBasePrincipal.h
nsCertificatePrincipal.h
nsCodebasePrincipal.h

View File

@@ -33,7 +33,6 @@ EXPORTS = \
nsSystemPrincipal.h \
nsCertificatePrincipal.h \
nsCodebasePrincipal.h \
nsAggregatePrincipal.h \
nsJSPrincipals.h \
nsScriptSecurityManager.h \
$(NULL)

View File

@@ -36,7 +36,6 @@ EXPORTS= \
nsBasePrincipal.h \
nsCertificatePrincipal.h \
nsCodebasePrincipal.h \
nsAggregatePrincipal.h \
nsJSPrincipals.h \
nsScriptSecurityManager.h \
nsSystemPrincipal.h \

View File

@@ -1,97 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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) 1998-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Mitch Stoltz
*/
/* describes aggregate principals which combine the
behavior of one or more other principals */
#ifndef _NS_AGGREGATE_PRINCIPAL_H_
#define _NS_AGGREGATE_PRINCIPAL_H_
#include "nsIAggregatePrincipal.h"
#include "nsICertificatePrincipal.h"
#include "nsICodebasePrincipal.h"
#include "nsBasePrincipal.h"
#include "nsCOMPtr.h"
#define NS_AGGREGATEPRINCIPAL_CID \
{ 0x867cf414, 0x1dd2, 0x11b2, \
{ 0x82, 0x66, 0xca, 0x64, 0x3b, 0xbc, 0x35, 0x64 }}
/* 867cf414-1dd2-11b2-8266-ca643bbc3564 */
class nsAggregatePrincipal : public nsIAggregatePrincipal,
public nsICertificatePrincipal,
public nsICodebasePrincipal,
public nsBasePrincipal
{
public:
NS_DEFINE_STATIC_CID_ACCESSOR(NS_AGGREGATEPRINCIPAL_CID)
NS_DECL_ISUPPORTS
NS_DECL_NSIAGGREGATEPRINCIPAL
NS_DECL_NSICERTIFICATEPRINCIPAL
NS_DECL_NSICODEBASEPRINCIPAL
NS_IMETHOD
ToString(char **result);
NS_IMETHOD
ToUserVisibleString(char **result);
NS_IMETHOD
Equals(nsIPrincipal *other, PRBool *result);
NS_IMETHOD
HashValue(PRUint32 *result);
NS_IMETHOD
CanEnableCapability(const char *capability, PRInt16 *result);
NS_IMETHOD
SetCanEnableCapability(const char *capability, PRInt16 canEnable);
NS_IMETHOD
IsCapabilityEnabled(const char *capability, void *annotation,
PRBool *result);
NS_IMETHOD
EnableCapability(const char *capability, void **annotation);
NS_IMETHOD
RevertCapability(const char *capability, void **annotation);
NS_IMETHOD
DisableCapability(const char *capability, void **annotation);
NS_IMETHOD
GetPreferences(char** aPrefName, char** aID,
char** aGrantedList, char** aDeniedList);
nsAggregatePrincipal();
virtual ~nsAggregatePrincipal(void);
protected:
nsCOMPtr<nsIPrincipal> mCertificate;
nsCOMPtr<nsIPrincipal> mCodebase;
};
#endif // _NS_AGGREGATE_PRINCIPAL_H_

View File

@@ -12,11 +12,8 @@
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999-2000 Netscape Communications Corporation. All Rights
* Copyright (C) 1999 Netscape Communications Corporation. All Rights
* Reserved.
*
* Contributors:
* Norris Boyd
*/
/* Shared implementation code for principals. */
@@ -36,6 +33,9 @@ public:
virtual ~nsBasePrincipal(void);
NS_IMETHOD
CapabilitiesToString(char** aCapString);
NS_IMETHOD
GetJSPrincipals(JSPrincipals **jsprin);
@@ -57,29 +57,20 @@ public:
NS_IMETHOD
DisableCapability(const char *capability, void **annotation);
NS_IMETHOD
GetPreferences(char** aPrefName, char** aID,
char** aGrantedList, char** aDeniedList);
nsresult
InitFromPersistent(const char* aPrefName,const char* aID,
const char* aGrantedList, const char* aDeniedList);
static const char Invalid[];
Init(const char* data);
protected:
enum AnnotationValue { AnnotationEnabled=1, AnnotationDisabled };
NS_IMETHOD
NS_IMETHOD
SetCapability(const char *capability, void **annotation,
AnnotationValue value);
nsJSPrincipals mJSPrincipals;
nsVoidArray mAnnotations;
nsHashtable *mCapabilities;
char *mPrefName;
static int mCapabilitiesOrdinal;
};
// special AddRef/Release to unify reference counts between XPCOM
@@ -91,9 +82,9 @@ className::AddRef(void) \
{ \
NS_PRECONDITION(PRInt32(mRefCnt) == 0, "illegal mRefCnt"); \
NS_PRECONDITION(PRInt32(mJSPrincipals.refcount) >= 0, "illegal refcnt");\
nsrefcnt count = PR_AtomicIncrement((PRInt32 *)&mJSPrincipals.refcount);\
NS_LOG_ADDREF(this, count, #className, sizeof(*this)); \
return count; \
++mJSPrincipals.refcount; \
NS_LOG_ADDREF(this, mJSPrincipals.refcount, #className, sizeof(*this)); \
return mJSPrincipals.refcount; \
}
#define NSBASEPRINCIPALS_RELEASE(className) \
@@ -102,13 +93,13 @@ className::Release(void) \
{ \
NS_PRECONDITION(PRInt32(mRefCnt) == 0, "illegal mRefCnt"); \
NS_PRECONDITION(0 != mJSPrincipals.refcount, "dup release"); \
nsrefcnt count = PR_AtomicDecrement((PRInt32 *)&mJSPrincipals.refcount);\
NS_LOG_RELEASE(this, count, #className); \
if (count == 0) { \
--mJSPrincipals.refcount; \
NS_LOG_RELEASE(this, mJSPrincipals.refcount, #className); \
if (mJSPrincipals.refcount == 0) { \
NS_DELETEXPCOM(this); \
return 0; \
} \
return count; \
return mJSPrincipals.refcount; \
}
#endif // _NS_BASE_PRINCIPAL_H_

View File

@@ -14,12 +14,10 @@
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-2000 Netscape Communications Corporation. All
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Mitch Stoltz
*/
/* describes principals for use with signed scripts */
@@ -30,14 +28,11 @@
#include "nsICertificatePrincipal.h"
#include "nsBasePrincipal.h"
class nsIURI;
#define NS_CERTIFICATEPRINCIPALMANAGER_CID \
{ 0x7ee2a4c0, 0x4b91, 0x11d3, \
{ 0xba, 0x18, 0x00, 0x60, 0xb0, 0xf1, 0x99, 0xa2 }}
class nsCertificatePrincipal : public nsICertificatePrincipal, public nsBasePrincipal
{
class nsCertificatePrincipal : public nsICertificatePrincipal, public nsBasePrincipal {
public:
NS_DEFINE_STATIC_CID_ACCESSOR(NS_CERTIFICATEPRINCIPALMANAGER_CID)
@@ -46,29 +41,23 @@ public:
NS_IMETHOD ToString(char **result);
NS_IMETHOD ToUserVisibleString(char **result);
NS_IMETHOD GetPreferences(char** aPrefName, char** aID,
char** aGrantedList, char** aDeniedList);
NS_IMETHOD Equals(nsIPrincipal *other, PRBool *result);
NS_IMETHOD HashValue(PRUint32 *result);
NS_IMETHOD CanEnableCapability(const char *capability, PRInt16 *result);
NS_IMETHOD Init(const char* aCertificateID);
NS_IMETHOD Init(const char* data);
nsresult InitFromPersistent(const char* aPrefName, const char* aID,
const char* aGrantedList, const char* aDeniedList);
NS_IMETHOD Init(const char* aIssuerName, const char* aSerialNumber);
nsCertificatePrincipal();
virtual ~nsCertificatePrincipal(void);
protected:
char* mCertificateID;
char* mCommonName;
const char* mIssuerName;
const char* mSerialNumber;
};
#endif // _NS_CERTIFICATE_PRINCIPAL_H_

View File

@@ -14,11 +14,10 @@
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-2000 Netscape Communications Corporation. All
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*/
/* describes principals by their orginating URIs */
@@ -30,7 +29,6 @@
#include "nsBasePrincipal.h"
#include "nsICodebasePrincipal.h"
#include "nsIURI.h"
#include "nsCOMPtr.h"
#define NS_CODEBASEPRINCIPAL_CID \
{ 0x7ee2a400, 0x0b91, 0xaad3, \
@@ -46,11 +44,6 @@ public:
NS_IMETHOD ToString(char **result);
NS_IMETHOD ToUserVisibleString(char **result);
NS_IMETHOD GetPreferences(char** aPrefName, char** aID,
char** aGrantedList, char** aDeniedList);
NS_IMETHOD Equals(nsIPrincipal *other, PRBool *result);
NS_IMETHOD HashValue(PRUint32 *result);
@@ -63,13 +56,12 @@ public:
Init(nsIURI *uri);
nsresult
InitFromPersistent(const char* aPrefName, const char* aID,
const char* aGrantedList, const char* aDeniedList);
Init(const char* data);
virtual ~nsCodebasePrincipal(void);
protected:
nsCOMPtr<nsIURI> mURI;
nsIURI *mURI;
};
#endif // _NS_CODEBASE_PRINCIPAL_H_

View File

@@ -14,65 +14,23 @@
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-2000 Netscape Communications Corporation. All
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Mitch Stoltz
* IBM Corporation
*/
#ifndef _NS_SCRIPT_SECURITY_MANAGER_H_
#define _NS_SCRIPT_SECURITY_MANAGER_H_
#include "nsIScriptSecurityManager.h"
#include "nsIPrincipal.h"
#include "jsapi.h"
#include "jsdbgapi.h"
#include "nsIXPCSecurityManager.h"
#include "nsHashtable.h"
#include "nsDOMPropEnums.h"
#include "nsCOMPtr.h"
#include "nsIPref.h"
#include "nsISecurityPref.h"
#include "nsIJSContextStack.h"
/////////////////////
// nsIPrincipalKey //
/////////////////////
class nsIPrincipalKey : public nsHashKey {
public:
nsIPrincipalKey(nsIPrincipal* key) {
mKey = key;
NS_IF_ADDREF(mKey);
}
~nsIPrincipalKey(void) {
NS_IF_RELEASE(mKey);
}
PRUint32 HashCode(void) const {
PRUint32 hash;
mKey->HashValue(&hash);
return hash;
}
PRBool Equals(const nsHashKey *aKey) const {
PRBool eq;
mKey->Equals(((nsIPrincipalKey *) aKey)->mKey, &eq);
return eq;
}
nsHashKey *Clone(void) const {
return new nsIPrincipalKey(mKey);
}
protected:
nsIPrincipal* mKey;
};
class nsIPref;
#define NS_SCRIPTSECURITYMANAGER_CID \
{ 0x7ee2a4c0, 0x4b93, 0x17d3, \
@@ -93,9 +51,10 @@ public:
static nsScriptSecurityManager *
GetScriptSecurityManager();
JSContext * GetCurrentContextQuick();
private:
void
LookupPrincipal(nsCOMPtr<nsIPrincipal>* aPrincipal);
NS_IMETHOD
GetSubjectPrincipal(JSContext *aCx, nsIPrincipal **result);
@@ -104,8 +63,8 @@ private:
GetObjectPrincipal(JSContext *aCx, JSObject *aObj, nsIPrincipal **result);
NS_IMETHOD
CheckPermissions(JSContext *aCx, JSObject *aObj, const char *aCapability);
CheckPermissions(JSContext *aCx, JSObject *aObj, const char *aCapability,
PRBool* result);
PRInt32
GetSecurityLevel(nsIPrincipal *principal, nsDOMProp domProp,
PRBool isWrite, nsCString &capability);
@@ -114,58 +73,29 @@ private:
GetPrefName(nsIPrincipal *principal, nsDOMProp domProp,
nsCString &result);
nsresult
CheckXPCCapability(JSContext *aJSContext, const char *aCapability);
NS_IMETHOD
CheckXPCPermissions(JSContext *cx, nsISupports* aObj);
CheckXPCPermissions(JSContext *cx);
NS_IMETHOD
GetFramePrincipal(JSContext *cx, JSStackFrame *fp, nsIPrincipal **result);
NS_IMETHOD
GetScriptPrincipal(JSContext *cx, JSScript *script, nsIPrincipal **result);
NS_IMETHOD
GetFunctionObjectPrincipal(JSContext *cx, JSObject *obj,
nsIPrincipal **result);
NS_IMETHOD
GetPrincipalAndFrame(JSContext *cx, nsIPrincipal **result,
JSStackFrame **frameResult);
NS_IMETHOD
SavePrincipal(nsIPrincipal* aToSave);
NS_IMETHOD
InitPrefs();
static nsresult
PrincipalPrefNames(const char* pref, char** grantedPref, char** deniedPref);
InitFromPrefs();
static void
EnumeratePolicyCallback(const char *prefName, void *data);
enumeratePolicyCallback(const char *prefName, void *data);
static void
EnumeratePrincipalsCallback(const char *prefName, void *data);
enumeratePrincipalsCallback(const char *prefName, void *data);
static int PR_CALLBACK
static int
JSEnabledPrefChanged(const char *pref, void *data);
static int PR_CALLBACK
PrincipalPrefChanged(const char *pref, void *data);
nsObjectHashtable *mOriginToPolicyMap;
nsCOMPtr<nsIPref> mPrefs;
nsCOMPtr<nsISecurityPref> mSecurityPrefs;
nsIPref *mPrefs;
nsIPrincipal *mSystemPrincipal;
nsCOMPtr<nsIPrincipal> mSystemCertificate;
nsSupportsHashtable *mPrincipals;
PRBool mIsJavaScriptEnabled;
PRBool mIsMailJavaScriptEnabled;
PRBool mIsWritingPrefs;
unsigned char hasPolicyVector[(NS_DOM_PROP_MAX >> 3) + 1];
unsigned char hasDomainPolicyVector[(NS_DOM_PROP_MAX >> 3) + 1];
nsCOMPtr<nsIJSContextStack> mThreadJSContextStack;
};
#endif /*_NS_SCRIPT_SECURITY_MANAGER_H_*/

View File

@@ -14,11 +14,10 @@
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999-2000 Netscape Communications Corporation. All
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*/
/* The privileged system principal. */
@@ -40,8 +39,6 @@ public:
NS_IMETHOD ToString(char **result);
NS_IMETHOD ToUserVisibleString(char **result);
NS_IMETHOD Equals(nsIPrincipal *other, PRBool *result);
NS_IMETHOD HashValue(PRUint32 *result);
@@ -60,13 +57,10 @@ public:
NS_IMETHOD DisableCapability(const char *capability, void * *annotation);
NS_IMETHOD GetPreferences(char** aPrefName, char** aID,
char** aGrantedList, char** aDeniedList);
nsSystemPrincipal();
NS_IMETHOD Init();
nsSystemPrincipal();
virtual ~nsSystemPrincipal(void);
};

Binary file not shown.

Binary file not shown.

View File

@@ -1 +0,0 @@
security.properties

View File

@@ -13,7 +13,7 @@
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
@@ -35,7 +35,6 @@ CPPSRCS = \
nsSystemPrincipal.cpp \
nsCertificatePrincipal.cpp \
nsCodebasePrincipal.cpp \
nsAggregatePrincipal.cpp \
nsJSPrincipals.cpp \
nsScriptSecurityManager.cpp \
nsSecurityManagerFactory.cpp \
@@ -45,19 +44,12 @@ EXTRA_DSO_LDOPTS = \
-L$(DIST)/bin \
-L$(DIST)/lib \
$(ZLIB_LIBS) \
$(XPCOM_LIBS) \
$(MOZ_JS_LIBS) \
-lxpcom \
-lmozjs \
$(NSPR_LIBS) \
$(NULL)
CHROME_DIR = locales/en-US
CHROME_L10N_DIR = communicator/locale/security
CHROME_L10N = \
security.properties \
$(NULL)
include $(topsrcdir)/config/rules.mk
INCLUDES += -I$(srcdir)/../include
INCLUDES += -I$(topsrcdir)/include -I$(srcdir)/../include

View File

@@ -1,2 +0,0 @@
en-US.jar:
locale/en-US/communicator/security/security.properties

View File

@@ -14,7 +14,7 @@
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
@@ -59,7 +59,6 @@ CPP_OBJS= \
.\$(OBJDIR)\nsBasePrincipal.obj \
.\$(OBJDIR)\nsCertificatePrincipal.obj \
.\$(OBJDIR)\nsCodebasePrincipal.obj \
.\$(OBJDIR)\nsAggregatePrincipal.obj \
.\$(OBJDIR)\nsJSPrincipals.obj \
.\$(OBJDIR)\nsScriptSecurityManager.obj \
.\$(OBJDIR)\nsSecurityManagerFactory.obj \

View File

@@ -1,358 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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) 1998-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Mitch Stoltz <mstoltz@netscape.com>
*/
/*describes principals which combine one or more principals*/
#include "nsAggregatePrincipal.h"
#include "nsIURI.h"
static NS_DEFINE_IID(kIAggregatePrincipalIID, NS_IAGGREGATEPRINCIPAL_IID);
NS_IMPL_QUERY_INTERFACE4(nsAggregatePrincipal, nsIAggregatePrincipal,
nsICertificatePrincipal, nsICodebasePrincipal, nsIPrincipal)
NSBASEPRINCIPALS_ADDREF(nsAggregatePrincipal);
NSBASEPRINCIPALS_RELEASE(nsAggregatePrincipal);
//////////////////////////////////////////////////
// Methods implementing nsICertificatePrincipal //
//////////////////////////////////////////////////
NS_IMETHODIMP
nsAggregatePrincipal::GetCertificateID(char** aCertificateID)
{
if (!mCertificate)
{
aCertificateID = nsnull;
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsICertificatePrincipal> certificate = do_QueryInterface(mCertificate);
return certificate->GetCertificateID(aCertificateID);
}
NS_IMETHODIMP
nsAggregatePrincipal::GetCommonName(char** aCommonName)
{
if (!mCertificate)
{
*aCommonName = nsnull;
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsICertificatePrincipal> certificate = do_QueryInterface(mCertificate);
return certificate->GetCommonName(aCommonName);
}
NS_IMETHODIMP
nsAggregatePrincipal::SetCommonName(const char* aCommonName)
{
if (!mCertificate)
return NS_ERROR_FAILURE;
nsCOMPtr<nsICertificatePrincipal> certificate = do_QueryInterface(mCertificate);
return certificate->SetCommonName(aCommonName);
}
///////////////////////////////////////////////
// Methods implementing nsICodebasePrincipal //
///////////////////////////////////////////////
NS_IMETHODIMP
nsAggregatePrincipal::GetURI(nsIURI** aURI)
{
if (!mCodebase)
{
*aURI = nsnull;
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsICodebasePrincipal> codebase = do_QueryInterface(mCodebase);
return codebase->GetURI(aURI);
}
NS_IMETHODIMP
nsAggregatePrincipal::GetOrigin(char** aOrigin)
{
if (!mCodebase)
{
*aOrigin = nsnull;
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsICodebasePrincipal> codebase = do_QueryInterface(mCodebase);
return codebase->GetOrigin(aOrigin);
}
////////////////////////////////////////////////
// Methods implementing nsIAggregatePrincipal //
////////////////////////////////////////////////
NS_IMETHODIMP
nsAggregatePrincipal::GetCertificate(nsIPrincipal** result)
{
*result = mCertificate;
NS_IF_ADDREF(*result);
return NS_OK;
}
NS_IMETHODIMP
nsAggregatePrincipal::GetCodebase(nsIPrincipal** result)
{
*result = mCodebase;
NS_IF_ADDREF(*result);
return NS_OK;
}
NS_IMETHODIMP
nsAggregatePrincipal::SetCertificate(nsIPrincipal* aCertificate)
{
nsresult rv;
//-- Make sure this really is a certificate principal
if (aCertificate)
{
nsCOMPtr<nsICertificatePrincipal> tempCertificate =
do_QueryInterface(aCertificate, &rv);
if (NS_FAILED(rv))
return NS_ERROR_FAILURE;
}
//-- If aCertificate is an aggregate, get its underlying certificate
nsCOMPtr<nsIAggregatePrincipal> agg =
do_QueryInterface(aCertificate, &rv);
if (NS_SUCCEEDED(rv))
{
nsCOMPtr<nsIPrincipal> underlying;
rv = agg->GetCertificate(getter_AddRefs(underlying));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
mCertificate = underlying.get();
}
else
mCertificate = aCertificate;
return NS_OK;
}
NS_IMETHODIMP
nsAggregatePrincipal::SetCodebase(nsIPrincipal* aCodebase)
{
nsresult rv;
//-- Make sure this really is a codebase principal
if (aCodebase)
{
nsCOMPtr<nsICodebasePrincipal> tempCodebase =
do_QueryInterface(aCodebase, &rv);
if (NS_FAILED(rv))
return NS_ERROR_FAILURE;
}
//-- If aCodebase is an aggregate, get its underlying codebase
nsCOMPtr<nsIAggregatePrincipal> agg =
do_QueryInterface(aCodebase, &rv);
if (NS_SUCCEEDED(rv))
{
nsCOMPtr<nsIPrincipal> underlying;
rv = agg->GetCodebase(getter_AddRefs(underlying));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
mCodebase = underlying.get();
}
else
mCodebase = aCodebase;
return NS_OK;
}
NS_IMETHODIMP
nsAggregatePrincipal::GetPrimaryChild(nsIPrincipal** aPrimaryChild)
{
//-- If a certificate is present, then that's the PrimaryChild principal.
// Otherwise we use the codebase.
if (mCertificate)
*aPrimaryChild = mCertificate.get();
else if (mCodebase)
*aPrimaryChild = mCodebase.get();
else
{
*aPrimaryChild = nsnull;
return NS_ERROR_FAILURE;
}
NS_IF_ADDREF(*aPrimaryChild);
return NS_OK;
}
NS_IMETHODIMP
nsAggregatePrincipal::Intersect(nsIPrincipal* other)
{
NS_ASSERTION(mCodebase, "Principal without codebase");
if (mCertificate)
{
PRBool sameCert = PR_FALSE;
if (NS_FAILED(mCertificate->Equals(other, &sameCert)))
return NS_ERROR_FAILURE;
if (!sameCert)
SetCertificate(nsnull);
}
return NS_OK;
}
///////////////////////////////////////
// Methods implementing nsIPrincipal //
///////////////////////////////////////
NS_IMETHODIMP
nsAggregatePrincipal::ToString(char **result)
{
nsCOMPtr<nsIPrincipal> PrimaryChild;
if (NS_FAILED(GetPrimaryChild(getter_AddRefs(PrimaryChild))))
return NS_ERROR_FAILURE;
return PrimaryChild->ToString(result);
}
NS_IMETHODIMP
nsAggregatePrincipal::ToUserVisibleString(char **result)
{
nsCOMPtr<nsIPrincipal> PrimaryChild;
if (NS_FAILED(GetPrimaryChild(getter_AddRefs(PrimaryChild))))
return NS_ERROR_FAILURE;
return PrimaryChild->ToUserVisibleString(result);
}
NS_IMETHODIMP
nsAggregatePrincipal::Equals(nsIPrincipal * other, PRBool * result)
{
*result = PR_FALSE;
if (this == other) {
*result = PR_TRUE;
return NS_OK;
}
if (!other)
return NS_OK;
nsresult rv;
nsCOMPtr<nsIAggregatePrincipal> otherAgg =
do_QueryInterface(other, &rv);
if (NS_FAILED(rv))
return NS_OK;
//-- Two aggregates are equal if both codebase and certificate are equal
PRBool certEqual = PR_TRUE;
if (mCertificate)
{
rv = mCertificate->Equals(other, &certEqual);
if(NS_FAILED(rv)) return rv;
}
PRBool cbEqual = PR_TRUE;
if (mCodebase)
{
rv = mCodebase->Equals(other, &cbEqual);
if(NS_FAILED(rv)) return rv;
}
if (mCertificate || mCodebase) // At least one must be present
*result = certEqual && cbEqual;
return NS_OK;
}
NS_IMETHODIMP
nsAggregatePrincipal::HashValue(PRUint32 *result)
{
nsCOMPtr<nsIPrincipal> PrimaryChild;
if (NS_FAILED(GetPrimaryChild(getter_AddRefs(PrimaryChild))))
return NS_ERROR_FAILURE;
return PrimaryChild->HashValue(result);
}
NS_IMETHODIMP
nsAggregatePrincipal::CanEnableCapability(const char *capability,
PRInt16 *result)
{
nsCOMPtr<nsIPrincipal> PrimaryChild;
if (NS_FAILED(GetPrimaryChild(getter_AddRefs(PrimaryChild))))
return NS_ERROR_FAILURE;
return PrimaryChild->CanEnableCapability(capability, result);
}
NS_IMETHODIMP
nsAggregatePrincipal::SetCanEnableCapability(const char *capability,
PRInt16 canEnable)
{
nsCOMPtr<nsIPrincipal> PrimaryChild;
if (NS_FAILED(GetPrimaryChild(getter_AddRefs(PrimaryChild))))
return NS_ERROR_FAILURE;
return PrimaryChild->SetCanEnableCapability(capability, canEnable);
}
NS_IMETHODIMP
nsAggregatePrincipal::IsCapabilityEnabled(const char *capability, void *annotation,
PRBool *result)
{
nsCOMPtr<nsIPrincipal> PrimaryChild;
if (NS_FAILED(GetPrimaryChild(getter_AddRefs(PrimaryChild))))
return NS_ERROR_FAILURE;
return PrimaryChild->IsCapabilityEnabled(capability, annotation, result);
}
NS_IMETHODIMP
nsAggregatePrincipal::EnableCapability(const char *capability, void **annotation)
{
nsCOMPtr<nsIPrincipal> PrimaryChild;
if (NS_FAILED(GetPrimaryChild(getter_AddRefs(PrimaryChild))))
return NS_ERROR_FAILURE;
return PrimaryChild->EnableCapability(capability, annotation);
}
NS_IMETHODIMP
nsAggregatePrincipal::RevertCapability(const char *capability, void **annotation)
{
nsCOMPtr<nsIPrincipal> PrimaryChild;
if (NS_FAILED(GetPrimaryChild(getter_AddRefs(PrimaryChild))))
return NS_ERROR_FAILURE;
return PrimaryChild->RevertCapability(capability, annotation);
}
NS_IMETHODIMP
nsAggregatePrincipal::DisableCapability(const char *capability, void **annotation)
{
nsCOMPtr<nsIPrincipal> PrimaryChild;
if (NS_FAILED(GetPrimaryChild(getter_AddRefs(PrimaryChild))))
return NS_ERROR_FAILURE;
return PrimaryChild->DisableCapability(capability, annotation);
}
NS_IMETHODIMP
nsAggregatePrincipal::GetPreferences(char** aPrefName, char** aID,
char** aGrantedList, char** aDeniedList)
{
nsCOMPtr<nsIPrincipal> PrimaryChild;
if (NS_FAILED(GetPrimaryChild(getter_AddRefs(PrimaryChild))))
return NS_ERROR_FAILURE;
return PrimaryChild->GetPreferences(aPrefName, aID,
aGrantedList, aDeniedList);
}
/////////////////////////////////////////////
// Constructor, Destructor, initialization //
/////////////////////////////////////////////
nsAggregatePrincipal::nsAggregatePrincipal()
{
NS_INIT_ISUPPORTS();
}
nsAggregatePrincipal::~nsAggregatePrincipal()
{
}

View File

@@ -12,24 +12,19 @@
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999-2000 Netscape Communications Corporation. All Rights
* Copyright (C) 1999 Netscape Communications Corporation. All Rights
* Reserved.
*
* Contributor(s):
* Norris Boyd
* Mitch Stoltz
*/
#include "nsBasePrincipal.h"
#include "nsScriptSecurityManager.h"
#include "nsString.h"
#include "plstr.h"
#include "nsIPref.h"
//////////////////////////
nsBasePrincipal::nsBasePrincipal()
: mCapabilities(nsnull), mPrefName(nsnull)
: mCapabilities(nsnull)
{
}
@@ -45,8 +40,6 @@ nsBasePrincipal::~nsBasePrincipal(void)
{
mAnnotations.EnumerateForwards(deleteElement, nsnull);
delete mCapabilities;
if (mPrefName)
Recycle(mPrefName);
}
NS_IMETHODIMP
@@ -61,9 +54,6 @@ nsBasePrincipal::GetJSPrincipals(JSPrincipals **jsprin)
return NS_OK;
}
const char
nsBasePrincipal::Invalid[] = "Invalid";
NS_IMETHODIMP
nsBasePrincipal::CanEnableCapability(const char *capability, PRInt16 *result)
{
@@ -71,33 +61,10 @@ nsBasePrincipal::CanEnableCapability(const char *capability, PRInt16 *result)
*result = nsIPrincipal::ENABLE_UNKNOWN;
return NS_OK;
}
else // If this principal is marked invalid, can't enable any capabilities
{
nsCStringKey invalidKey(Invalid);
if (mCapabilities->Exists(&invalidKey))
{
*result = nsIPrincipal::ENABLE_DENIED;
return NS_OK;
}
}
const char *start = capability;
*result = nsIPrincipal::ENABLE_GRANTED;
for(;;) {
const char *space = PL_strchr(start, ' ');
int len = space ? space - start : nsCRT::strlen(start);
nsCAutoString capString(start, len);
nsCStringKey key(capString);
PRInt16 value = (PRInt16)(PRInt32)mCapabilities->Get(&key);
if (value == 0)
value = nsIPrincipal::ENABLE_UNKNOWN;
if (value < *result)
*result = value;
if (!space)
return NS_OK;
start = space + 1;
}
/* NOTREACHED */
nsStringKey key(capability);
*result = (PRInt16)(PRInt32)mCapabilities->Get(&key);
if (!*result)
*result = nsIPrincipal::ENABLE_UNKNOWN;
return NS_OK;
}
@@ -110,28 +77,8 @@ nsBasePrincipal::SetCanEnableCapability(const char *capability,
if (!mCapabilities)
return NS_ERROR_OUT_OF_MEMORY;
}
else // If this principal is marked invalid, can't enable any capabilities
{
nsCStringKey invalidKey(Invalid);
if (mCapabilities->Exists(&invalidKey))
return NS_OK;
}
if (PL_strcmp(capability, Invalid) == 0)
mCapabilities->Reset();
const char *start = capability;
for(;;) {
const char *space = PL_strchr(start, ' ');
int len = space ? space - start : nsCRT::strlen(start);
nsCAutoString capString(start, len);
nsCStringKey key(capString);
mCapabilities->Put(&key, (void *) canEnable);
if (!space)
return NS_OK;
start = space + 1;
}
/* NOTREACHED */
nsStringKey key(capability);
mCapabilities->Put(&key, (void *) canEnable);
return NS_OK;
}
@@ -141,24 +88,10 @@ nsBasePrincipal::IsCapabilityEnabled(const char *capability, void *annotation,
{
*result = PR_FALSE;
nsHashtable *ht = (nsHashtable *) annotation;
if (!ht) {
return NS_OK;
}
const char *start = capability;
for(;;) {
const char *space = PL_strchr(start, ' ');
int len = space ? space - start : nsCRT::strlen(start);
nsCAutoString capString(start, len);
nsCStringKey key(capString);
if (ht) {
nsStringKey key(capability);
*result = (ht->Get(&key) == (void *) AnnotationEnabled);
if (!*result) {
// If any single capability is not enabled, then return false.
return NS_OK;
}
if (!space)
return NS_OK;
start = space + 1;
}
}
return NS_OK;
}
@@ -179,20 +112,11 @@ nsBasePrincipal::RevertCapability(const char *capability, void **annotation)
{
if (*annotation) {
nsHashtable *ht = (nsHashtable *) *annotation;
const char *start = capability;
for(;;) {
const char *space = PL_strchr(start, ' ');
int len = space ? space - start : nsCRT::strlen(start);
nsCAutoString capString(start, len);
nsCStringKey key(capString);
ht->Remove(&key);
if (!space)
return NS_OK;
start = space + 1;
}
nsStringKey key(capability);
ht->Remove(&key);
}
return NS_OK;
}
}
NS_IMETHODIMP
nsBasePrincipal::SetCapability(const char *capability, void **annotation,
@@ -201,120 +125,73 @@ nsBasePrincipal::SetCapability(const char *capability, void **annotation,
if (*annotation == nsnull) {
*annotation = new nsHashtable(5);
if (!*annotation)
return NS_ERROR_OUT_OF_MEMORY;
return NS_ERROR_OUT_OF_MEMORY;
// This object owns its annotations. Save them so we can release
// them when we destroy this object.
mAnnotations.AppendElement(*annotation);
}
const char *start = capability;
for(;;) {
const char *space = PL_strchr(start, ' ');
int len = space ? space - start : nsCRT::strlen(start);
nsCAutoString capString(start, len);
nsCStringKey key(capString);
nsHashtable *ht = (nsHashtable *) *annotation;
ht->Put(&key, (void *) value);
if (!space)
return NS_OK;
start = space + 1;
}
/* NOTREACHED */
nsHashtable *ht = (nsHashtable *) *annotation;
nsStringKey key(capability);
ht->Put(&key, (void *) value);
return NS_OK;
}
int nsBasePrincipal::mCapabilitiesOrdinal = 0;
nsresult
nsBasePrincipal::InitFromPersistent(const char* aPrefName, const char* aID,
const char* aGrantedList, const char* aDeniedList)
nsBasePrincipal::Init(const char* data)
{
//-- Empty the capability table
// Parses capabilities strings of the form
// "Capability=value ..."
// ie. "UniversalBrowserRead=0 UniversalBrowserWrite=1"
// where value is from 0 to 3 as defined in nsIPrincipal.idl
if (mCapabilities)
mCapabilities->Reset();
//-- Save the preference name
mPrefName = PL_strdup(aPrefName);
if (!mPrefName)
return NS_ERROR_OUT_OF_MEMORY;
const char* ordinalBegin = PL_strpbrk(aPrefName, "1234567890");
if (ordinalBegin) {
int n = atoi(ordinalBegin);
if (mCapabilitiesOrdinal <= n)
mCapabilitiesOrdinal = n+1;
}
//-- Store the capabilities
if (aGrantedList)
if(NS_FAILED(SetCanEnableCapability(aGrantedList, nsIPrincipal::ENABLE_GRANTED)))
return NS_ERROR_FAILURE;
if (aDeniedList)
if(NS_FAILED(SetCanEnableCapability(aDeniedList, nsIPrincipal::ENABLE_DENIED)))
return NS_ERROR_FAILURE;
for (;;)
{
char* wordEnd = PL_strchr(data, '=');
if (wordEnd == nsnull)
break;
*wordEnd = '\0';
const char* cap = data;
data = wordEnd+1; // data is now pointing at the numeric value
PRInt16 value = (PRInt16)(*data) - (PRInt16)'0';
nsresult rv = SetCanEnableCapability(cap, value);
if (NS_FAILED(rv)) return rv;
if (data[1] == '\0') // End of the data
break;
else
data += 2; // data is now at the beginning of the next capability string
}
return NS_OK;
}
struct CapabilityList
{
nsCString* granted;
nsCString* denied;
};
PR_STATIC_CALLBACK(PRBool)
AppendCapability(nsHashKey *aKey, void *aData, void *capListPtr)
AppendCapability(nsHashKey *aKey, void* aData, void* aStr)
{
CapabilityList* capList = (CapabilityList*)capListPtr;
PRInt16 value = (PRInt16)(PRInt32)aData;
nsCStringKey* key = (nsCStringKey *)aKey;
if (value == nsIPrincipal::ENABLE_GRANTED)
{
capList->granted->Append(key->GetString(), key->GetStringLength());
capList->granted->Append(' ');
}
else if (value == nsIPrincipal::ENABLE_DENIED)
{
capList->denied->Append(key->GetString(), key->GetStringLength());
capList->denied->Append(' ');
}
return PR_TRUE;
}
NS_IMETHODIMP
nsBasePrincipal::GetPreferences(char** aPrefName, char** aID,
char** aGrantedList, char** aDeniedList)
nsAutoString name( ((nsStringKey*)aKey)->GetString() );
char value = (char)((unsigned int)aData) + '0';
nsString* capStr = (nsString*)aStr;
capStr->Append(' ');
capStr->Append(name);
capStr->Append('=');
capStr->Append(value);
return (capStr != nsnull);
}
NS_IMETHODIMP
nsBasePrincipal::CapabilitiesToString(char** aStr)
{
//-- Preference name
*aPrefName = nsCRT::strdup(mPrefName);
if (!aPrefName)
return NS_ERROR_OUT_OF_MEMORY;
if (!mCapabilities || !aStr)
return NS_OK;
//-- ID
if (NS_FAILED(ToString(aID)))
return NS_ERROR_FAILURE;
nsAutoString capStr;
// The following line is a guess at how long the capabilities string
// will be (~15 chars per capability). This will minimize copying.
capStr.SetCapacity(mCapabilities->Count() * 15);
mCapabilities->Enumerate(AppendCapability, (void*)&capStr);
*aStr = capStr.ToNewCString();
if (!(*aStr)) return NS_ERROR_OUT_OF_MEMORY;
//-- Capabilities
*aGrantedList = nsnull;
*aDeniedList = nsnull;
if (mCapabilities) {
nsCAutoString grantedListStr;
nsCAutoString deniedListStr;
CapabilityList* capList = new CapabilityList();
capList->granted = &grantedListStr;
capList->denied = &deniedListStr;
mCapabilities->Enumerate(AppendCapability, (void*)capList);
if (grantedListStr.Length() > 0)
{
grantedListStr.Truncate(grantedListStr.Length()-1);
*aGrantedList = grantedListStr.ToNewCString();
if (!*aGrantedList) return NS_ERROR_OUT_OF_MEMORY;
}
if (deniedListStr.Length() > 0)
{
deniedListStr.Truncate(deniedListStr.Length()-1);
*aDeniedList = deniedListStr.ToNewCString();
if (!*aDeniedList) return NS_ERROR_OUT_OF_MEMORY;
}
}
return NS_OK;
}

View File

@@ -14,17 +14,13 @@
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-2000 Netscape Communications Corporation. All
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Mitch Stoltz <mstoltz@netscape.com>
*/
/*describes principals for use in signed scripts*/
#include "nsCertificatePrincipal.h"
#include "prmem.h"
#include "nsCOMPtr.h"
static NS_DEFINE_IID(kICertificatePrincipalIID, NS_ICERTIFICATEPRINCIPAL_IID);
@@ -34,34 +30,6 @@ NS_IMPL_QUERY_INTERFACE2(nsCertificatePrincipal, nsICertificatePrincipal, nsIPri
NSBASEPRINCIPALS_ADDREF(nsCertificatePrincipal);
NSBASEPRINCIPALS_RELEASE(nsCertificatePrincipal);
//////////////////////////////////////////////////
// Methods implementing nsICertificatePrincipal //
//////////////////////////////////////////////////
NS_IMETHODIMP
nsCertificatePrincipal::GetCertificateID(char** aCertificateID)
{
*aCertificateID = nsCRT::strdup(mCertificateID);
return *mCertificateID ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
NS_IMETHODIMP
nsCertificatePrincipal::GetCommonName(char** aCommonName)
{
*aCommonName = nsCRT::strdup(mCommonName);
return *aCommonName ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
NS_IMETHODIMP
nsCertificatePrincipal::SetCommonName(const char* aCommonName)
{
PR_FREEIF(mCommonName);
mCommonName = nsCRT::strdup(aCommonName);
return * mCommonName ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
///////////////////////////////////////
// Methods implementing nsIPrincipal //
///////////////////////////////////////
NS_IMETHODIMP
nsCertificatePrincipal::CanEnableCapability(const char *capability,
PRInt16 *result)
@@ -73,58 +41,54 @@ nsCertificatePrincipal::CanEnableCapability(const char *capability,
return NS_OK;
}
NS_IMETHODIMP
nsCertificatePrincipal::GetIssuerName(char ** issuerName)
{
*issuerName = (char*)mIssuerName;
return NS_OK;
}
NS_IMETHODIMP
nsCertificatePrincipal::GetSerialNumber(char ** serialNumber)
{
*serialNumber = (char*)mSerialNumber;
return NS_OK;
}
NS_IMETHODIMP
nsCertificatePrincipal::ToString(char **result)
{
return GetCertificateID(result);
}
NS_IMETHODIMP
nsCertificatePrincipal::ToUserVisibleString(char **result)
{
return GetCommonName(result);
}
NS_IMETHODIMP
nsCertificatePrincipal::GetPreferences(char** aPrefName, char** aID,
char** aGrantedList, char** aDeniedList)
{
if (!mPrefName) {
nsCAutoString s;
s.Assign("capability.principal.certificate.p");
s.AppendInt(mCapabilitiesOrdinal++);
s.Append(".id");
mPrefName = s.ToNewCString();
}
return nsBasePrincipal::GetPreferences(aPrefName, aID,
aGrantedList, aDeniedList);
nsAutoString str;
str += "[Certificate ";
str += mIssuerName;
str += ' ';
str += mSerialNumber;
str += ']';
*result = str.ToNewCString();
return (*result) ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
NS_IMETHODIMP
nsCertificatePrincipal::Equals(nsIPrincipal * other, PRBool * result)
{
*result = PR_FALSE;
if (this == other) {
*result = PR_TRUE;
return NS_OK;
}
if (!other)
return NS_OK;
nsresult rv;
nsCOMPtr<nsICertificatePrincipal> otherCertificate =
do_QueryInterface(other, &rv);
if (NS_FAILED(rv))
return NS_OK;
//-- Compare cert ID's
char* otherID;
rv = otherCertificate->GetCertificateID(&otherID);
if (NS_FAILED(rv))
{
PR_FREEIF(otherID);
return rv;
*result = PR_FALSE;
return NS_OK;
}
*result = (PL_strcmp(mCertificateID, otherID) == 0);
PR_FREEIF(otherID);
char* otherIssuer;
otherCertificate->GetIssuerName(&otherIssuer);
char* otherSerial;
otherCertificate->GetSerialNumber(&otherSerial);
*result = ( (PL_strcmp(mIssuerName, otherIssuer) == 0) &&
(PL_strcmp(mSerialNumber, otherSerial) == 0) );
return NS_OK;
}
@@ -133,41 +97,65 @@ nsCertificatePrincipal::HashValue(PRUint32 *result)
{
char* str;
if (NS_FAILED(ToString(&str)) || !str) return NS_ERROR_FAILURE;
*result = nsCRT::HashCode(str, nsnull);
*result = nsCRT::HashValue(str);
nsCRT::free(str);
return NS_OK;
}
/////////////////////////////////////////////
// Constructor, Destructor, initialization //
/////////////////////////////////////////////
nsresult
nsCertificatePrincipal::InitFromPersistent(const char* aPrefName, const char* aCertID,
const char* aGrantedList, const char* aDeniedList)
NS_IMETHODIMP
nsCertificatePrincipal::Init(const char* data)
{
if (NS_FAILED(Init(aCertID)))
return NS_ERROR_FAILURE;
return nsBasePrincipal::InitFromPersistent(aPrefName, aCertID,
aGrantedList, aDeniedList);
}
// Parses preference strings of the form
// "[Certificate Issuer Serial#] capabilities string"
// ie. "[Certificate CertCo 12:34:AB:CD] UniversalBrowserRead=1"
if (!data)
return NS_ERROR_ILLEGAL_VALUE;
data = PL_strchr(data, ' '); // Jump to issuer
NS_ASSERTION(data, "Malformed security.principal preference");
data += 1;
char* wordEnd = PL_strchr(data, ' '); // Find end of issuer
NS_ASSERTION(wordEnd, "Malformed security.principal preference");
*wordEnd = '\0';
const char* issuer = data;
data = wordEnd+1; // Jump to serial#
wordEnd = PL_strchr(data, ']'); // Find end of serial#
NS_ASSERTION(wordEnd, "Malformed security.principal preference");
*wordEnd = '\0';
const char* serial = data;
if(NS_FAILED(Init(issuer, serial))) return NS_ERROR_FAILURE;
if (wordEnd[1] != '\0')
{
data = wordEnd+2; // Jump to beginning of caps data
return nsBasePrincipal::Init(data);
}
else
return NS_OK;
}
NS_IMETHODIMP
nsCertificatePrincipal::Init(const char* aCertificateID)
nsCertificatePrincipal::Init(const char* aIssuerName, const char* aSerialNumber)
{
mCertificateID = nsCRT::strdup(aCertificateID);
if (!mCertificateID) return NS_ERROR_OUT_OF_MEMORY;
mIssuerName = nsCRT::strdup(aIssuerName);
mSerialNumber = nsCRT::strdup(aSerialNumber);
if (!mIssuerName || !mSerialNumber) return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;
}
nsCertificatePrincipal::nsCertificatePrincipal() : mCertificateID(nsnull),
mCommonName(nsnull)
nsCertificatePrincipal::nsCertificatePrincipal()
{
NS_INIT_ISUPPORTS();
}
nsCertificatePrincipal::~nsCertificatePrincipal()
nsCertificatePrincipal::~nsCertificatePrincipal(void)
{
PR_FREEIF(mCertificateID);
PR_FREEIF(mCommonName);
if (mIssuerName)
nsCRT::free((char*)mIssuerName);
if (mSerialNumber)
nsCRT::free((char*)mSerialNumber);
}

View File

@@ -14,12 +14,10 @@
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999-2000 Netscape Communications Corporation. All
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
* Mitch Stoltz
*/
/* Describes principals by their orginating uris */
@@ -41,40 +39,54 @@ NSBASEPRINCIPALS_RELEASE(nsCodebasePrincipal);
///////////////////////////////////////
// Methods implementing nsIPrincipal //
///////////////////////////////////////
NS_IMETHODIMP
nsCodebasePrincipal::ToString(char **result)
{
return GetOrigin(result);
}
NS_IMETHODIMP
nsCodebasePrincipal::ToUserVisibleString(char **result)
{
return GetOrigin(result);
}
NS_IMETHODIMP
nsCodebasePrincipal::GetPreferences(char** aPrefName, char** aID,
char** aGrantedList, char** aDeniedList)
{
if (!mPrefName) {
nsCAutoString s;
s.Assign("capability.principal.codebase.p");
s.AppendInt(mCapabilitiesOrdinal++);
s.Append(".id");
mPrefName = s.ToNewCString();
}
return nsBasePrincipal::GetPreferences(aPrefName, aID,
aGrantedList, aDeniedList);
nsAutoString buf;
buf += "[Codebase ";
nsXPIDLCString spec;
if (NS_FAILED(mURI->GetSpec(getter_Copies(spec))))
return NS_ERROR_FAILURE;
buf += spec;
buf += ']';
*result = buf.ToNewCString();
return *result ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
NS_IMETHODIMP
nsCodebasePrincipal::HashValue(PRUint32 *result)
{
nsXPIDLCString origin;
if (NS_FAILED(GetOrigin(getter_Copies(origin))))
nsXPIDLCString spec;
if (NS_FAILED(mURI->GetSpec(getter_Copies(spec))))
return NS_ERROR_FAILURE;
*result = nsCRT::HashCode(origin, nsnull);
*result = nsCRT::HashValue(spec);
return NS_OK;
}
NS_IMETHODIMP
nsCodebasePrincipal::Equals(nsIPrincipal *other, PRBool *result)
{
*result = PR_FALSE;
if (this == other) {
*result = PR_TRUE;
return NS_OK;
}
nsCOMPtr<nsICodebasePrincipal> otherCodebase;
if (NS_FAILED(other->QueryInterface(
NS_GET_IID(nsICodebasePrincipal),
(void **) getter_AddRefs(otherCodebase))))
{
*result = PR_FALSE;
return NS_OK;
}
nsCOMPtr<nsIURI> otherURI;
if (NS_FAILED(otherCodebase->GetURI(getter_AddRefs(otherURI)))) {
return NS_ERROR_FAILURE;
}
if (!mURI || NS_FAILED(otherURI->Equals(mURI, result))) {
return NS_ERROR_FAILURE;
}
return NS_OK;
}
@@ -85,7 +97,7 @@ nsCodebasePrincipal::CanEnableCapability(const char *capability,
// check to see if the codebase principal pref is enabled.
static char pref[] = "signed.applets.codebase_principal_support";
nsresult rv;
NS_WITH_SERVICE(nsIPref, prefs, "@mozilla.org/preferences;1", &rv);
NS_WITH_SERVICE(nsIPref, prefs, "component://netscape/preferences", &rv);
if (NS_FAILED(rv))
return NS_ERROR_FAILURE;
PRBool enabled;
@@ -124,16 +136,14 @@ nsCodebasePrincipal::GetOrigin(char **origin)
nsXPIDLCString s;
if (NS_FAILED(mURI->GetScheme(getter_Copies(s))))
return NS_ERROR_FAILURE;
nsCAutoString t;
t.Assign(s);
t.Append("://");
nsAutoString t = (const char *) s;
t += "://";
if (NS_SUCCEEDED(mURI->GetHost(getter_Copies(s)))) {
t.Append(s);
t += s;
} else if (NS_SUCCEEDED(mURI->GetSpec(getter_Copies(s)))) {
// Some URIs (e.g., nsSimpleURI) don't support host. Just
// get the full spec.
t.Assign(s);
t = s;
} else {
return NS_ERROR_FAILURE;
}
@@ -142,10 +152,8 @@ nsCodebasePrincipal::GetOrigin(char **origin)
}
NS_IMETHODIMP
nsCodebasePrincipal::Equals(nsIPrincipal *other, PRBool *result)
nsCodebasePrincipal::SameOrigin(nsIPrincipal *other, PRBool *result)
{
//-- Equals is defined as object equality or same origin
*result = PR_FALSE;
if (this == other) {
*result = PR_TRUE;
@@ -220,13 +228,14 @@ nsCodebasePrincipal::Equals(nsIPrincipal *other, PRBool *result)
nsCodebasePrincipal::nsCodebasePrincipal()
{
NS_INIT_ISUPPORTS();
mURI = nsnull;
}
nsresult
nsCodebasePrincipal::Init(nsIURI *uri)
{
char *codebase;
if (uri == nsnull || NS_FAILED(uri->GetSpec(&codebase)))
if (NS_FAILED(uri->GetSpec(&codebase)))
return NS_ERROR_FAILURE;
if (NS_FAILED(mJSPrincipals.Init(codebase))) {
nsCRT::free(codebase);
@@ -234,26 +243,46 @@ nsCodebasePrincipal::Init(nsIURI *uri)
}
// JSPrincipals::Init adopts codebase, so no need to free now
mURI = uri;
NS_ADDREF(mURI);
return NS_OK;
}
// This method overrides nsBasePrincipal::InitFromPersistent
// This one overrides nsBasePrincipal::Init
nsresult
nsCodebasePrincipal::InitFromPersistent(const char* aPrefName, const char* aURLStr,
const char* aGrantedList, const char* aDeniedList)
nsCodebasePrincipal::Init(const char* data)
{
nsresult rv;
nsCOMPtr<nsIURI> uri;
rv = NS_NewURI(getter_AddRefs(uri), aURLStr, nsnull);
NS_ASSERTION(NS_SUCCEEDED(rv), "Malformed URI in security.principal preference.");
if (NS_FAILED(rv)) return rv;
// Parses preference strings of the form
// "[Codebase URL] capabilities string"
// ie. "[Codebase http://www.mozilla.org] UniversalBrowserRead=1"
if (!data)
return NS_ERROR_ILLEGAL_VALUE;
if (NS_FAILED(Init(uri))) return NS_ERROR_FAILURE;
data = PL_strchr(data, ' '); // Jump to URL
if (!data)
return NS_ERROR_FAILURE;
data += 1;
return nsBasePrincipal::InitFromPersistent(aPrefName, aURLStr,
aGrantedList, aDeniedList);
}
char* urlEnd = PL_strchr(data, ']'); // Find end of URL
NS_ASSERTION(urlEnd, "Malformed security.principal preference.");
*urlEnd = '\0';
nsCodebasePrincipal::~nsCodebasePrincipal()
if (NS_FAILED(NS_NewURI(&mURI, data, nsnull)))
{
NS_ASSERTION(PR_FALSE, "Malformed URI in security.principal preference.");
return NS_ERROR_FAILURE;
}
if (urlEnd[1] != 0)
{
data = urlEnd+2; // Jump to beginning of caps data
return nsBasePrincipal::Init(data);
}
else
return NS_OK;
}
nsCodebasePrincipal::~nsCodebasePrincipal(void)
{
if (mURI)
NS_RELEASE(mURI);
}

View File

@@ -41,13 +41,8 @@ nsDestroyJSPrincipals(JSContext *cx, struct JSPrincipals *jsprin) {
nsJSPrincipals *nsjsprin = (nsJSPrincipals *)jsprin;
// We need to destroy the nsIPrincipal. We'll do this by adding
// to the refcount and calling release
// Note that we don't want to use NS_IF_RELEASE because it will try
// to set nsjsprin->nsIPrincipalPtr to nsnull *after* nsjsprin has
// already been destroyed.
nsjsprin->refcount++;
if (nsjsprin->nsIPrincipalPtr)
nsjsprin->nsIPrincipalPtr->Release();
NS_IF_RELEASE(nsjsprin->nsIPrincipalPtr);
// The nsIPrincipal that we release owns the JSPrincipal struct,
// so we don't need to worry about "codebase"
}

File diff suppressed because it is too large Load Diff

View File

@@ -52,13 +52,13 @@ static nsModuleComponentInfo components[] =
{
{ NS_SCRIPTSECURITYMANAGER_CLASSNAME,
NS_SCRIPTSECURITYMANAGER_CID,
NS_SCRIPTSECURITYMANAGER_CONTRACTID,
NS_SCRIPTSECURITYMANAGER_PROGID,
Construct_nsIScriptSecurityManager
},
{ NS_CODEBASEPRINCIPAL_CLASSNAME,
NS_CODEBASEPRINCIPAL_CID,
NS_CODEBASEPRINCIPAL_CONTRACTID,
NS_CODEBASEPRINCIPAL_PROGID,
nsCodebasePrincipalConstructor
}
};

View File

@@ -14,11 +14,10 @@
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999-2000 Netscape Communications Corporation. All
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Norris Boyd
*/
/* The privileged system principal. */
@@ -37,34 +36,18 @@ NSBASEPRINCIPALS_ADDREF(nsSystemPrincipal);
NSBASEPRINCIPALS_RELEASE(nsSystemPrincipal);
///////////////////////////////////////
// Methods implementing nsIPrincipal //
///////////////////////////////////////
////////////////////////////////////
// Methods implementing nsIPrincipal
////////////////////////////////////
NS_IMETHODIMP
nsSystemPrincipal::ToString(char **result)
{
nsAutoString buf;
buf.AssignWithConversion("[System]");
nsAutoString buf("[System]");
*result = buf.ToNewCString();
return *result ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
NS_IMETHODIMP
nsSystemPrincipal::ToUserVisibleString(char **result)
{
return ToString(result);
}
NS_IMETHODIMP
nsSystemPrincipal::GetPreferences(char** aPrefName, char** aID,
char** aGrantedList, char** aDeniedList)
{
// The system principal should never be streamed out
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsSystemPrincipal::Equals(nsIPrincipal *other, PRBool *result)
{
@@ -95,7 +78,6 @@ nsSystemPrincipal::SetCanEnableCapability(const char *capability,
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsSystemPrincipal::IsCapabilityEnabled(const char *capability,
void *annotation,
@@ -125,9 +107,9 @@ nsSystemPrincipal::DisableCapability(const char *capability, void **annotation)
return NS_ERROR_FAILURE;
}
/////////////////////////////////////////////
// Constructor, Destructor, initialization //
/////////////////////////////////////////////
//////////////////////////////////////////
// Constructor, Destructor, initialization
//////////////////////////////////////////
nsSystemPrincipal::nsSystemPrincipal()
{

View File

@@ -1,25 +0,0 @@
# 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) 2000 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
Yes = Yes
No = No
Titleline = Internet Security
CheckMessage = Remember this decision
EnableCapabilityQuery = A script from "%1$s" has requested enhanced privileges. You should grant these privileges only if you are comfortable downloading and executing a program from this source. Do you wish to allow these privileges?

View File

@@ -1,926 +0,0 @@
#!/usr/bin/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 oqr
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is jsDriver.js by Robert Ginda.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1997-2000 Netscape Communications Corporation. All
# Rights Reserved.
#
# Alternatively, the contents of this file may be used under the
# terms of the GNU Public License (the "GPL"), in which case the
# provisions of the GPL are applicable instead of those above.
# If you wish to allow use of your version of this file only
# under the terms of the GPL and not to allow others to use your
# version of this file under the NPL, indicate your decision by
# deleting the provisions above and replace them with the notice
# and other provisions required by the GPL. If you do not delete
# the provisions above, a recipient may use your version of this
# file under either the NPL or the GPL.
#
# Contributers:
# Robert Ginda <rginda@netscape.com>
# John Taylor <jtaylor@netscape.com>
#
# Requires Getopt::Mixed.pm file. If not on system, available from
# http://www.cpan.org
#
# For information about this file, see:
# http://www.mozilla.org/projects/security/components/driver/
#
# Config:
# ------------------
# You may need to change to change the path name for mozilla,
# shown in the function get_seamonkey_engine_command, line 529.
use strict;
use Getopt::Mixed "nextOption";
my $os_type = &get_os_type;
my $unixish = (($os_type ne "WIN") && ($os_type ne "MAC"));
my $path_sep = ($os_type eq "MAC") ? ":" : "/";
my $redirect_command = ($os_type ne "MAC") ? " >& " : "";
# command line option defaults
my $opt_suite_path = "";
my $opt_trace = 0;
my $opt_classpath = "";
my $opt_seamonkey_opt = 0;
my $opt_seamonkey_ms = 0;
my @opt_engine_list;
my $opt_engine_type = "";
my $opt_engine_params = "";
my $opt_user_output_file = 0;
my $opt_output_file = "";
my @opt_test_list_files;
my @opt_neg_list_files;
my $opt_shell_path = "";
my $opt_java_path = "";
my $opt_bug_url = "http://bugzilla.mozilla.org/show_bug.cgi?id=";
my $opt_console_failures = 0;
my $opt_lxr_url = "http://lxr.mozilla.org/mozilla/source/js/tests/";
my $opt_exit_munge = ($os_type ne "MAC") ? 1 : 0;
# command line option definition
my $options = "b=s bugurl>b c=s classpath>c e=s engine>e f=s file>f " .
"h help>h i j=s javapath>j k confail>k l=s list>l L=s neglist>L " .
"o=s opt>o p=s testpath>p s=s shellpath>s t trace>t u=s lxrurl>u " .
"x noexitmunge>x";
#if ($os_type eq "MAC") {
# $opt_suite_path = `directory`;
# $opt_suite_path =~ s/[\n\r]//g;
# $opt_suite_path .= ":";
#} else {
# $opt_suite_path = "file://";
#}
&parse_args;
my $user_exit = 0;
my ($engine_command, $html, $failures_reported, $tests_completed,
$exec_time_string);
my @failed_tests;
my @test_list = &get_test_list;
if ($#test_list == -1) {
die ("Nothing to test.\n");
}
if ($unixish) {
# on unix, ^C pauses the tests, and gives the user a chance to quit but
# report on what has been done, to just quit, or to continue (the
# interrupted test will still be skipped.)
# windows doesn't handle the int handler they way we want it to,
# so don't even pretend to let the user continue.
$SIG{INT} = 'int_handler';
}
&main;
#End.
sub main {
my $start_time;
my $pid;
while ($opt_engine_type = pop (@opt_engine_list)) {
dd ("Testing engine '$opt_engine_type'");
$engine_command = &get_engine_command;
$html = "";
@failed_tests = ();
$failures_reported = 0;
$tests_completed = 0;
$start_time = time;
&execute_tests (@test_list);
my $exec_time = (time - $start_time);
my $exec_hours = int($exec_time / 60 / 60);
$exec_time -= $exec_hours * 60 * 60;
my $exec_mins = int($exec_time / 60);
$exec_time -= $exec_mins * 60;
my $exec_secs = ($exec_time % 60);
if ($exec_hours > 0) {
$exec_time_string = "$exec_hours hours, $exec_mins minutes, " .
"$exec_secs seconds";
} elsif ($exec_mins > 0) {
$exec_time_string = "$exec_mins minutes, $exec_secs seconds";
} else {
$exec_time_string = "$exec_secs seconds";
}
if (!$opt_user_output_file) {
$opt_output_file = &get_tempfile_name;
}
&write_results;
}
$pid=fork;
if($pid == 0) {
exec("netscape file:/u/jtaylor/TestSuite/" . $opt_output_file);
}
if($pid != 0) {
exit(0);
}
exec("netscape file:/u/jtaylor/TestSuite/" . $opt_output_file);
exit(0);
}
sub execute_tests {
my (@test_list) = @_;
my ($test, $shell_command, $line, @output);
my $file_param = "";
my ($last_suite, $last_test_dir);
my $failure_lines;
my $pid;
my $numticks=0;
my $count=1;
&status ("Executing " . ($#test_list + 1) . " test(s).");
foreach $test (@test_list) {
my ($suite, $test_dir, $test_file) = split($path_sep, $test);
# *-n.js is a negative test, expect exit code 3 (runtime error)
my $expected_exit = ($test =~ /\-n\.js$/) ? 3 : 0;
my ($got_exit, $exit_signal);
my $bug_line;
@output = ();
# user selected [Q]uit from ^C handler.
if ($user_exit) {
return;
}
$shell_command=$engine_command;
######################
&dd("Runing test $count of " . ($#test_list + 1));
$count ++;
$pid = fork;
if($pid != 0) {
$numticks = 0;
sleep 1;
open (OUTPUT, "mozilla-output.txt");
while (<OUTPUT> && $numticks<8) {
push(@output, <OUTPUT>);
sleep 10;
$numticks++;
}
if($numticks >= 8) {
@output = ();
push(@output, "\nFailed: Timeout error or infinite loop\n");
}
close(OUTPUT);
kill('KILL', $pid);
&killall ("mozilla");
#exec("kill -9 mozilla-bin");
#&dd ("got output:\n" . join ("", @output) . "\nso far.");
} else {
&dd ("executing: " . $shell_command . $file_param .
$test);
exec($shell_command . $file_param . $test . $redirect_command .
" mozilla-output.txt");
}
waitpid($pid, 0);
#&dd("Test results:\n-----------\n");
#@output = grep(/^&&/, @output);
#&dd(@output);
if ($opt_exit_munge == 1) {
# signal information in the lower 8 bits, exit code above that
$got_exit = ($? >> 8);
$exit_signal = ($? & 255);
} else {
# user says not to munge the exit code
$got_exit = $?;
$exit_signal = 0;
}
$failure_lines = "";
$bug_line = "";
foreach $line (@output) {
# watch for testcase to proclaim what exit code it expects to
# produce (0 by default)
if ($line =~ /expect(ed)?\s*exit\s*code\s*\:?\s*(\n+)/i) {
$expected_exit = $1;
&dd ("Test case expects exit code $expected_exit");
}
# watch for failures
if ($line =~ /error/i && !($line =~ /widget/i) && !($line =~ /Security/i) && !($line =~ /JavaScript/i)&& !($line =~ /ERROR_DOM/i) && !($line =~ /Access/i)) {
$failure_lines .= $line;
}
# and watch for bugnumbers
# XXX This only allows 1 bugnumber per testfile, should be
# XXX modified to allow for multiple.
if ($line =~ /bugnumber\s*\:?\s*(.*)/i) {
$1 =~ /(\n+)/;
$bug_line = "<a href='$opt_bug_url$1' target='other_window'>" .
"Bug Number $1</a>";
}
}
if (!@output) {
@output = ("Testcase produced no output!");
}
if ($got_exit != $expected_exit) {
# full testcase output dumped on mismatched exit codes,
&report_failure ($test, "Expected exit code " .
"$expected_exit, got $got_exit\n" .
"Testcase terminated with signal $exit_signal\n" .
"Complete testcase output was:\n" .
join ("\n",@output), $bug_line);
} elsif ($failure_lines) {
# only offending lines if exit codes matched
&report_failure ($test, "Failure messages were:\n" . $failure_lines,
$bug_line);
}
&dd ("exit code $got_exit, exit signal $exit_signal.");
$tests_completed++;
}
unlink 'mozilla-output.txt';
}
sub write_results {
my ($list_name, $neglist_name);
my $completion_date = localtime;
my $failure_pct = int(($failures_reported / $tests_completed) * 10000) /
100;
&dd ("Writing output to $opt_output_file.");
if ($#opt_test_list_files == -1) {
$list_name = "All tests";
} elsif ($#opt_test_list_files < 10) {
$list_name = join (", ", @opt_test_list_files);
} else {
$list_name = "($#opt_test_list_files test files specified)";
}
if ($#opt_neg_list_files == -1) {
$neglist_name = "(none)";
} elsif ($#opt_test_list_files < 10) {
$neglist_name = join (", ", @opt_neg_list_files);
} else {
$neglist_name = "($#opt_neg_list_files skip files specified)";
}
open (OUTPUT, "> $opt_output_file") ||
die ("Could not create output file $opt_output_file");
print OUTPUT
("<html><head>\n" .
"<title>Test results, $opt_engine_type</title>\n" .
"</head>\n" .
"<body bgcolor='white'>\n" .
"<a name='tippy_top'></a>\n" .
"<h2>Test results, $opt_engine_type</h2><br>\n" .
"<p class='results_summary'>\n" .
"Test List: $list_name<br>\n" .
"Skip List: $neglist_name<br>\n" .
($#test_list + 1) . " test(s) selected, $tests_completed test(s) " .
"completed, $failures_reported failures reported " .
"($failure_pct% failed)<br>\n" .
"Engine command line: $engine_command<br>\n" .
"OS type: $os_type<br>\n");
print OUTPUT
("Testcase execution time: $exec_time_string.<br>\n" .
"Tests completed on $completion_date.<br><br>\n");
if ($failures_reported > 0) {
print OUTPUT
("[ <a href='#fail_detail'>Failure Details</a> | " .
"<a href='#retest_list'>Retest List</a> | " .
"<a href='menu.html'>Test Selection Page</a> ]<br>\n" .
"<hr>\n" .
"<a name='fail_detail'></a>\n" .
"<h2>Failure Details</h2><br>\n<dl>" .
$html .
"</dl>\n[ <a href='#tippy_top'>Top of Page</a> | " .
"<a href='#fail_detail'>Top of Failures</a> ]<br>\n" .
"<hr>\n<pre>\n" .
"<a name='retest_list'></a>\n" .
"<h2>Retest List</h2><br>\n" .
"# Retest List, $opt_engine_type, " .
"generated $completion_date.\n" .
"# Original test base was: $list_name.\n" .
"# $tests_completed of " . ($#test_list + 1) .
" test(s) were completed, " .
"$failures_reported failures reported.\n" .
join ("\n", @failed_tests) .
"</pre>\n" .
"[ <a href='#tippy_top'>Top of Page</a> | " .
"<a href='#retest_list'>Top of Retest List</a> ]<br>\n");
} else {
print OUTPUT
("<h1>Whoop-de-doo, nothing failed!</h1>\n");
}
print OUTPUT "</body>";
close (OUTPUT);
&status ("Wrote results to '$opt_output_file'.");
if ($opt_console_failures) {
&status ("$failures_reported test(s) failed");
}
}
sub parse_args {
my ($option, $value, $lastopt);
&dd ("checking command line options.");
Getopt::Mixed::init ($options);
$Getopt::Mixed::order = $Getopt::Mixed::RETURN_IN_ORDER;
while (($option, $value) = nextOption()) {
if ($option eq "b") {
&dd ("opt: setting bugurl to '$value'.");
$opt_bug_url = $value;
} elsif (($option eq "e") || (($option eq "") && ($lastopt eq "e"))) {
&dd ("opt: adding engine $value.");
push (@opt_engine_list, $value);
} elsif ($option eq "f") {
if (!$value) {
die ("Output file cannot be null.\n");
}
&dd ("opt: setting output file to '$value'.");
$opt_user_output_file = 1;
$opt_output_file = $value;
} elsif ($option eq "h") {
&usage;
} elsif ($option eq "k") {
&dd ("opt: displaying failures on console.");
$opt_console_failures=1;
} elsif ($option eq "l" || (($option eq "") && ($lastopt eq "l"))) {
$option = "l";
&dd ("opt: adding test list '$value'.");
push (@opt_test_list_files, $value);
} elsif ($option eq "L" || (($option eq "") && ($lastopt eq "L"))) {
$option = "L";
&dd ("opt: adding negative list '$value'.");
push (@opt_neg_list_files, $value);
} elsif ($option eq "o") {
$opt_engine_params = $value;
&dd ("opt: setting engine params to '$opt_engine_params'.");
} elsif ($option eq "p") {
$opt_suite_path = $value;
if (!($opt_suite_path =~ /[\/\\]$/)) {
$opt_suite_path .= "/";
}
&dd ("opt: setting suite path to '$opt_suite_path'.");
} elsif ($option eq "s") {
$opt_shell_path = $value;
&dd ("opt: setting shell path to '$opt_shell_path'.");
} elsif ($option eq "t") {
&dd ("opt: tracing output. (console failures at no extra charge.)");
$opt_console_failures = 1;
$opt_trace = 1;
} elsif ($option eq "u") {
&dd ("opt: setting lxr url to '$value'.");
$opt_lxr_url = $value;
} elsif ($option eq "x") {
&dd ("opt: turning off exit munging.");
$opt_exit_munge = 0;
} else {
&usage;
}
$lastopt = $option;
}
Getopt::Mixed::cleanup();
if ($#opt_engine_list == -1) {
die "You must select a shell to test in.\n";
}
}
#
# print the arguments that this script expects
#
sub usage {
print STDERR
("\nusage: $0 [<options>] \n" .
"(-b|--bugurl) Bugzilla URL.\n" .
" (default is $opt_bug_url)\n" .
"(-e|--engine) <type> ... Specify the type of engine(s) to test.\n" .
" <type> is one or more of\n" .
" (seamonkey).\n" .
"(-f|--file) <file> Redirect output to file named <file>.\n" .
" (default is " .
"results-<engine-type>-<date-stamp>.html)\n" .
"(-h|--help) Print this message.\n" .
"(-k|--confail) Log failures to console (also.)\n" .
"(-l|--list) <file> ... List of tests to execute.\n" .
"(-L|--neglist) <file> ... List of tests to skip.\n" .
"(-o|--opt) <options> Options to pass to the JavaScript engine.\n" .
" (Make sure to quote them!)\n" .
"(-p|--testpath) <path> Root of the test suite. (default is ./)\n" .
"(-s|--shellpath) <path> Location of JavaScript shell.\n" .
"(-t|--trace) Trace script execution.\n" .
"(-u|--lxrurl) <url> Complete URL to tests subdirectory on lxr.\n" .
" (default is $opt_lxr_url)\n" .
"(-x|--noexitmunge) Don't do exit code munging (try this if it\n" .
" seems like your exit codes are turning up\n" .
" as exit signals.)\n");
exit (1);
}
#
# get the shell command used to start the (either) engine
#
sub get_engine_command {
my $retval;
if ($opt_engine_type eq "seamonkey") {
&dd ("getting sea monkey engine command.");
$opt_seamonkey_opt = 0;
$opt_seamonkey_ms = 0;
$retval = &get_seamonkey_engine_command;
} else {
die ("Unknown engine type selected, '$opt_engine_type'.\n");
}
$retval .= " $opt_engine_params";
&dd ("got '$retval'");
return $retval;
}
#
# use the seamonkey browser to test
#
sub get_seamonkey_engine_command {
my $retval;
#Modify line for local machine
$retval = "/usr/mozilla/package/mozilla ";
}
sub get_os_type {
if ("\n" eq "\015") {
return "MAC";
}
my $uname = `uname -a`;
if ($uname =~ /WIN/) {
$uname = "WIN";
} else {
chop $uname;
}
&dd ("get_os_type returning '$uname'.");
return $uname;
}
sub get_test_list {
my @test_list;
my @neg_list;
if ($#opt_test_list_files > -1) {
my $list_file;
&dd ("getting test list from user specified source.");
foreach $list_file (@opt_test_list_files) {
push (@test_list, expand_user_test_list($list_file));
}
} else {
&dd ("no list file, groveling in '$opt_suite_path'.");
@test_list = &get_default_test_list($opt_suite_path);
}
if ($#opt_neg_list_files > -1) {
my $list_file;
my $orig_size = $#test_list + 1;
my $actually_skipped;
&dd ("getting negative list from user specified source.");
foreach $list_file (@opt_neg_list_files) {
push (@neg_list, expand_user_test_list($list_file));
}
@test_list = &subtract_arrays (\@test_list, \@neg_list);
$actually_skipped = $orig_size - ($#test_list + 1);
&dd ($actually_skipped . " of " . ($#test_list + 1) .
" tests will be skipped.");
&dd ((($#neg_list + 1) - $actually_skipped) . " skip tests were " .
"not actually part of the test list.");
}
return @test_list;
}
#
# reads $list_file, storing non-comment lines into an array.
# lines in the form suite_dir/[*] or suite_dir/test_dir/[*] are expanded
# to include all test files under the specified directory
#
sub expand_user_test_list {
my ($list_file) = @_;
my @retval = ();
if ($list_file =~ /\.html$/ || -d $list_file) {
push (@retval, &expand_test_list_entry($list_file));
} else {
open (TESTLIST, $list_file) ||
die("Error opening test list file '$list_file': $!\n");
while (<TESTLIST>) {
s/\n$//;
if (!(/\s*\#/)) {
# It's not a comment, so process it
push (@retval, &expand_test_list_entry($_));
}
}
close (TESTLIST);
}
return @retval;
}
sub expand_test_list_entry {
my ($entry) = @_;
my @retval;
if ($entry =~ /\.*$|/) {
# it's a regular entry, add it to the list
push (@retval, $entry);
} else {
die ("Dont know what to do with list entry '$entry'.\n");
}
return @retval;
}
#
# Grovels through $suite_path, searching for *all* test files. Used when the
# user doesn't supply a test list.
#
sub get_default_test_list {
my ($suite_path) = @_;
my @suite_list = &get_subdirs($suite_path);
my $suite;
my @retval;
foreach $suite (@suite_list) {
my @test_dir_list = get_subdirs ($suite_path . $suite);
my $test_dir;
foreach $test_dir (@test_dir_list) {
my @test_list = get_js_files ($suite_path . $suite . $path_sep .
$test_dir);
my $test;
foreach $test (@test_list) {
$retval[$#retval + 1] = $suite . $path_sep . $test_dir . $path_sep . $test;
}
}
}
return @retval;
}
#
# generate an output file name based on the date
#
sub get_tempfile_name {
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
&get_padded_time (localtime);
my $rv;
if ($os_type ne "MAC") {
$rv = "results-" . $year . "-" . $mon . "-" . $mday . "-" . $hour .
$min . $sec . "-" . $opt_engine_type;
} else {
$rv = "res-" . $year . $mon . $mday . $hour . $min . $sec . "-" .
$opt_engine_type
}
return $rv . ".html";
}
sub get_padded_time {
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = @_;
$mon++;
$mon = &zero_pad($mon);
$year += 1900;
$mday= &zero_pad($mday);
$sec = &zero_pad($sec);
$min = &zero_pad($min);
$hour = &zero_pad($hour);
return ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst);
}
sub zero_pad {
my ($string) = @_;
$string = ($string < 10) ? "0" . $string : $string;
return $string;
}
sub subtract_arrays {
my ($whole_ref, $part_ref) = @_;
my @whole = @$whole_ref;
my @part = @$part_ref;
my $line;
foreach $line (@part) {
@whole = grep (!/$line/, @whole);
}
return @whole;
}
#
# Convert unix path to mac style.
#
sub unix_to_mac {
my ($path) = @_;
my @path_elements = split ("/", $path);
my $rv = "";
my $i;
foreach $i (0 .. $#path_elements) {
if ($path_elements[$i] eq ".") {
if (!($rv =~ /\:$/)) {
$rv .= ":";
}
} elsif ($path_elements[$i] eq "..") {
if (!($rv =~ /\:$/)) {
$rv .= "::";
} else {
$rv .= ":";
}
} elsif ($path_elements[$i] ne "") {
$rv .= $path_elements[$i] . ":";
}
}
$rv =~ s/\:$//;
return $rv;
}
#
# Convert unix path to correct style based on platform.
#
sub xp_path {
my ($path) = @_;
if ($os_type eq "MAC") {
return &unix_to_mac($path);
} else {
return $path;
}
}
#
# given a directory, return an array of all subdirectories
#
sub get_subdirs {
my ($dir) = @_;
my @subdirs;
if ($os_type ne "MAC") {
if (!($dir =~ /\/$/)) {
$dir = $dir . "/";
}
} else {
if (!($dir =~ /\:$/)) {
$dir = $dir . ":";
}
}
opendir (DIR, $dir) || die ("couldn't open directory $dir: $!");
my @testdir_contents = readdir(DIR);
closedir(DIR);
foreach (@testdir_contents) {
if ((-d ($dir . $_)) && ($_ ne 'CVS') && ($_ ne '.') && ($_ ne '..')) {
@subdirs[$#subdirs + 1] = $_;
}
}
return @subdirs;
}
#
# given a directory, return an array of all the js files that are in it.
#
sub get_js_files {
my ($test_subdir) = @_;
my (@js_file_array, @subdir_files);
opendir (TEST_SUBDIR, $test_subdir) || die ("couldn't open directory " .
"$test_subdir: $!");
@subdir_files = readdir(TEST_SUBDIR);
closedir( TEST_SUBDIR );
foreach (@subdir_files) {
if ($_ =~ /\.js$/) {
$js_file_array[$#js_file_array+1] = $_;
}
}
return @js_file_array;
}
#
# creats report info for an individual failed report
#
sub report_failure {
my ($test, $message, $bug_line) = @_;
my $id;
my $lft = "/";
$failures_reported++;
$message =~ s/\n+/\n/g;
$id = $test;
$id =~ s/\.\D*$//;
$id =~ s/^\D*//;
if ($opt_console_failures) {
print STDERR ("*-* Testcase $test failed:\n$message\n");
}
$message =~ s/\n/<br>\n/g;
$html .= "<a name='failure$failures_reported'></a>";
if ($opt_lxr_url) {
$html .= "<dd><b>".
"Testcase <a target='other_window' href='$test'>$test</a> " .
"failed</b> | Bugzilla id# <a href='$opt_bug_url$id'>$id</a><br>\n";
} else {
$html .= "<dd><b>".
"Testcase $test failed</b> $bug_line<br>\n";
}
$html .= " [ ";
if ($failures_reported > 1) {
$html .= "<a href='#failure" . ($failures_reported - 1) . "'>" .
"Previous Failure</a> | ";
}
$html .= "<a href='#failure" . ($failures_reported + 1) . "'>" .
"Next Failure</a> | " .
"<a href='#tippy_top'>Top of Page</a> ]<br>\n" .
"<tt>$message</tt><br>\n";
@failed_tests[$#failed_tests + 1] = $test;
}
sub killall {
my ($name) = @_;
open (PIDS, "ps xa | grep $name |");
my @pidlist = <PIDS>;
foreach (@pidlist) {
/(\d+)/;
my $pid = $1;
kill ('KILL', $1)
}
}
sub dd {
if ($opt_trace) {
print ("-*- ", @_ , "\n");
}
}
sub status {
print ("-#- ", @_ , "\n");
}
sub int_handler {
my $resp;
do {
print ("\n*** User Break: Just [Q]uit, Quit and [R]eport, [C]ontinue ?");
$resp = <STDIN>;
} until ($resp =~ /[QqRrCc]/);
if ($resp =~ /[Qq]/) {
print ("User Exit. No results were generated.\n");
exit;
} elsif ($resp =~ /[Rr]/) {
$user_exit = 1;
}
}

View File

@@ -1,95 +0,0 @@
# Testcase list for security regression suite.
#
http://cathyz/bugs/16858.html
http://cathyz/bugs/20682.html
http://cathyz/bugs/23516.html
http://cathyz/bugs/26041.html
http://cathyz/bugs/28387.html
http://cathyz/bugs/29517.html
http://cathyz/bugs/33803.html
http://cathyz/bugs/35859_chrome.html
http://cathyz/bugs/36117.html
http://cathyz/bugs/37905.html
http://cathyz/bugs/37907.html
http://cathyz/bugs/38177.html
http://cathyz/bugs/38959.html
http://cathyz/bugs/39038.html
http://cathyz/bugs/39585.html
http://cathyz/bugs/26845.html
http://cathyz/bugs/28866.html
http://cathyz/bugs/38178.html
http://cathyz/origin/dom/cdoc002.html
http://cathyz/origin/dom/cdoc008.html
http://cathyz/origin/dom/cdoc006.html
http://cathyz/origin/dom/create1.html
http://cathyz/origin/dom/create.html
http://cathyz/origin/dom/cdoc001.html
http://cathyz/origin/dom/cdoc004.html
http://cathyz/origin/layer.html
http://cathyz/origin/dom/gettag.html
http://cathyz/origin/dom/cdoc003.html
http://cathyz/origin/anker.html
http://cathyz/origin/applet.html
http://cathyz/origin/body.html
http://cathyz/origin/cookie.html
http://cathyz/origin/doc_domain.html
http://cathyz/origin/form.html
http://cathyz/origin/name.html
http://cathyz/origin/link.html
http://cathyz/origin/doc_refer.html
http://cathyz/origin/doc_title.html
http://cathyz/origin/doc_URL.html
http://cathyz/origin/alink.html
http://cathyz/origin/bgcolor.html
http://cathyz/origin/event.html
http://cathyz/origin/fgcolor.html
http://cathyz/origin/getselection.html
http://cathyz/origin/doc.html
http://cathyz/origin/linkcolor.html
http://cathyz/origin/nameditem.html
http://cathyz/origin/open.html
http://cathyz/origin/event.html
http://cathyz/origin/event.html
http://cathyz/origin/vlink.html
http://cathyz/origin/write.html
http://cathyz/origin/writeln.html
http://cathyz/origin/dom/getAttr.html
http://cathyz/origin/dom/cele005.html
http://cathyz/origin/dom/cele008.html
http://cathyz/origin/dom/cele004.html
http://cathyz2/sameori/dom/cele007.html
http://cathyz/origin/dom/cdoc011.html
http://cathyz/origin/dom/cele006.html
http://cathyz/origin/dom/cele001.html
http://cathyz/origin/innerhtml.html
http://cathyz/origin/namedform.html
http://cathyz/origin/input.html
http://cathyz/origin/image.html
http://cathyz/origin/image.html
http://cathyz2/sameori/location_http.html
http://cathyz2/sameori/location_http.html
http://cathyz2/sameori/location_http.html
http://cathyz2/sameori/location_http.html
http://cathyz2/sameori/location_http.html
http://cathyz2/sameori/location_http.html
http://cathyz2/sameori/location_http.html
http://cathyz2/sameori/location_http.html
http://cathyz2/sameori/location_http.html
http://cathyz/origin/dom/cnod013.html
http://cathyz/origin/dom/cnod014.html
http://cathyz/origin/dom/cnod003.html
http://cathyz/origin/dom/cnod006.html
http://cathyz/origin/dom/cnod008.html
http://cathyz/origin/dom/cnod004.html
http://cathyz/origin/dom/cnod005.html
http://cathyz/origin/dom/cnod000.html
http://cathyz/origin/dom/cnod002.html
http://cathyz/origin/dom/cnod010.html
http://cathyz/origin/dom/cnod001.html
http://cathyz/origin/dom/cnod007.html
http://cathyz/origin/dom/cnod012.html
http://cathyz/origin/dom/cnod011.html
http://cathyz/origin/status.html
http://cathyz2/sameori/iframe_src1.html
http://cathyz2/sameori/iframe_src3.html
http://cathyz2/sameori/bug2.html

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