Compare commits
9 Commits
Bugzilla_P
...
SeaMonkey_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6965987e90 | ||
|
|
6d279f7794 | ||
|
|
23dc53a061 | ||
|
|
65bc491c69 | ||
|
|
e8efc6da99 | ||
|
|
41f042a212 | ||
|
|
126b8b853a | ||
|
|
4e4cbd7a22 | ||
|
|
e29529bdf8 |
43
mozilla/LEGAL
Normal file
43
mozilla/LEGAL
Normal file
@@ -0,0 +1,43 @@
|
||||
Please be apprised of the following Legal Notices:
|
||||
|
||||
A) The U.S. District Court for the Eastern District of Virginia has
|
||||
ruled that the Netscape Navigator code does not infringe Wang's U.S.
|
||||
Patent No. 4,751,669 ("the '669 Patent") because: 1) HTML is not
|
||||
Videotex as defined by the '669 patent; 2) web servers are not central
|
||||
suppliers; and 3) Navigator does not "connect," as defined by the '669
|
||||
Patent, to web servers on the Internet. Wang may appeal this decision to
|
||||
the Federal Circuit. Wang contended that its Patent disclosing a
|
||||
"Videotext" system, is infringed by the following functionality in the
|
||||
Netscape Navigator code: 1) the animated logo and status line indicators
|
||||
--See Claims 1,8 and 9; 2) the "File Save As" function --See Claims
|
||||
23-27; 3) Bookmarks and Rename Bookmarks in the Properties window --See
|
||||
Claims 20-22; 4) storing HTML, GIF, and JPEG files and adding filename
|
||||
extensions --See Claim 38
|
||||
|
||||
B) Intermind owns pending U.S. patent applications on communications
|
||||
systems which employ metadata ("channel objects") to define a control
|
||||
structure for information transfer. The Netscape code does not infringe
|
||||
as released; however, modifications which utilize channel objects as
|
||||
described by Intermind should be considered carefully. The following is
|
||||
a statement from Intermind: "Intermind's claims fundamentally involve
|
||||
the use of a control structure to automate communications. ...The
|
||||
essence of Intermind's top claim is that two devices sender and
|
||||
receiver have persistent storage, communicate over a network,
|
||||
and exchange a control structure including metadata which describes: 1)
|
||||
what information is to be updated, 2) when to update this information,
|
||||
and 3) how to transfer the updated information. In addition, at least
|
||||
the receiving device must be able to process the metadata in order to
|
||||
perform the update determination and transfer. Any digital
|
||||
communications system which incorporates all of these elements will be
|
||||
covered by Intermind's patents." See Intermind.com.
|
||||
|
||||
C) Stac, Inc., and its licensing agent Hi/fn, own several patents which
|
||||
disclose data compression methods implementing an LZS compression
|
||||
algorithm, including U.S. Patent Nos. 4,701,745 and 5,016, 009 ("the
|
||||
Stac Patents"). The Netscape Communicator code does not perform
|
||||
compression. If you modify the Netscape source code to perform
|
||||
compression, please take notice of the Stac Patents.
|
||||
|
||||
D) Netscape Communications Corporation ("Netscape") does not guarantee
|
||||
that any source code or executable code available from the mozilla.org
|
||||
domain is Year 2000 compliant.
|
||||
421
mozilla/LICENSE
Normal file
421
mozilla/LICENSE
Normal file
@@ -0,0 +1,421 @@
|
||||
NETSCAPE PUBLIC LICENSE
|
||||
Version 1.0
|
||||
|
||||
----------------
|
||||
|
||||
1. Definitions.
|
||||
|
||||
1.1. ``Contributor'' means each entity that creates or contributes to
|
||||
the creation of Modifications.
|
||||
|
||||
1.2. ``Contributor Version'' means the combination of the Original
|
||||
Code, prior Modifications used by a Contributor, and the Modifications
|
||||
made by that particular Contributor.
|
||||
|
||||
1.3. ``Covered Code'' means the Original Code or Modifications or the
|
||||
combination of the Original Code and Modifications, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.4. ``Electronic Distribution Mechanism'' means a mechanism generally
|
||||
accepted in the software development community for the electronic
|
||||
transfer of data.
|
||||
|
||||
1.5. ``Executable'' means Covered Code in any form other than Source
|
||||
Code.
|
||||
|
||||
1.6. ``Initial Developer'' means the individual or entity identified as
|
||||
the Initial Developer in the Source Code notice required by Exhibit A.
|
||||
|
||||
1.7. ``Larger Work'' means a work which combines Covered Code or
|
||||
portions thereof with code not governed by the terms of this License.
|
||||
|
||||
1.8. ``License'' means this document.
|
||||
|
||||
1.9. ``Modifications'' means any addition to or deletion from the
|
||||
substance or structure of either the Original Code or any previous
|
||||
Modifications. When Covered Code is released as a series of files, a
|
||||
Modification is:
|
||||
|
||||
A. Any addition to or deletion from the contents of a file
|
||||
containing Original Code or previous Modifications.
|
||||
|
||||
B. Any new file that contains any part of the Original Code or
|
||||
previous Modifications.
|
||||
|
||||
1.10. ``Original Code'' means Source Code of computer software code
|
||||
which is described in the Source Code notice required by Exhibit A as
|
||||
Original Code, and which, at the time of its release under this License
|
||||
is not already Covered Code governed by this License.
|
||||
|
||||
1.11. ``Source Code'' means the preferred form of the Covered Code for
|
||||
making modifications to it, including all modules it contains, plus any
|
||||
associated interface definition files, scripts used to control
|
||||
compilation and installation of an Executable, or a list of source code
|
||||
differential comparisons against either the Original Code or another
|
||||
well known, available Covered Code of the Contributor's choice. The
|
||||
Source Code can be in a compressed or archival form, provided the
|
||||
appropriate decompression or de-archiving software is widely available
|
||||
for no charge.
|
||||
|
||||
1.12. ``You'' means an individual or a legal entity exercising rights
|
||||
under, and complying with all of the terms of, this License or a future
|
||||
version of this License issued under Section 6.1. For legal entities,
|
||||
``You'' includes any entity which controls, is controlled by, or is
|
||||
under common control with You. For purposes of this definition,
|
||||
``control'' means (a) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (b) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares or beneficial ownership of such entity.
|
||||
|
||||
2. Source Code License.
|
||||
|
||||
2.1. The Initial Developer Grant.
|
||||
The Initial Developer hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license, subject to third party intellectual property
|
||||
claims:
|
||||
|
||||
(a) to use, reproduce, modify, display, perform, sublicense and
|
||||
distribute the Original Code (or portions thereof) with or without
|
||||
Modifications, or as part of a Larger Work; and
|
||||
|
||||
(b) under patents now or hereafter owned or controlled by Initial
|
||||
Developer, to make, have made, use and sell (``Utilize'') the
|
||||
Original Code (or portions thereof), but solely to the extent that
|
||||
any such patent is reasonably necessary to enable You to Utilize
|
||||
the Original Code (or portions thereof) and not to any greater
|
||||
extent that may be necessary to Utilize further Modifications or
|
||||
combinations.
|
||||
|
||||
2.2. Contributor Grant.
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license, subject to third party intellectual property
|
||||
claims:
|
||||
|
||||
(a) to use, reproduce, modify, display, perform, sublicense and
|
||||
distribute the Modifications created by such Contributor (or
|
||||
portions thereof) either on an unmodified basis, with other
|
||||
Modifications, as Covered Code or as part of a Larger Work; and
|
||||
|
||||
(b) under patents now or hereafter owned or controlled by
|
||||
Contributor, to Utilize the Contributor Version (or portions
|
||||
thereof), but solely to the extent that any such patent is
|
||||
reasonably necessary to enable You to Utilize the Contributor
|
||||
Version (or portions thereof), and not to any greater extent that
|
||||
may be necessary to Utilize further Modifications or combinations.
|
||||
|
||||
3. Distribution Obligations.
|
||||
|
||||
3.1. Application of License.
|
||||
The Modifications which You create or to which You contribute are
|
||||
governed by the terms of this License, including without limitation
|
||||
Section 2.2. The Source Code version of Covered Code may be distributed
|
||||
only under the terms of this License or a future version of this
|
||||
License released under Section 6.1, and You must include a copy of this
|
||||
License with every copy of the Source Code You distribute. You may not
|
||||
offer or impose any terms on any Source Code version that alters or
|
||||
restricts the applicable version of this License or the recipients'
|
||||
rights hereunder. However, You may include an additional document
|
||||
offering the additional rights described in Section 3.5.
|
||||
|
||||
3.2. Availability of Source Code.
|
||||
Any Modification which You create or to which You contribute must be
|
||||
made available in Source Code form under the terms of this License
|
||||
either on the same media as an Executable version or via an accepted
|
||||
Electronic Distribution Mechanism to anyone to whom you made an
|
||||
Executable version available; and if made available via Electronic
|
||||
Distribution Mechanism, must remain available for at least twelve (12)
|
||||
months after the date it initially became available, or at least six
|
||||
(6) months after a subsequent version of that particular Modification
|
||||
has been made available to such recipients. You are responsible for
|
||||
ensuring that the Source Code version remains available even if the
|
||||
Electronic Distribution Mechanism is maintained by a third party.
|
||||
|
||||
3.3. Description of Modifications.
|
||||
You must cause all Covered Code to which you contribute to contain a
|
||||
file documenting the changes You made to create that Covered Code and
|
||||
the date of any change. You must include a prominent statement that the
|
||||
Modification is derived, directly or indirectly, from Original Code
|
||||
provided by the Initial Developer and including the name of the Initial
|
||||
Developer in (a) the Source Code, and (b) in any notice in an
|
||||
Executable version or related documentation in which You describe the
|
||||
origin or ownership of the Covered Code.
|
||||
|
||||
3.4. Intellectual Property Matters
|
||||
|
||||
(a) Third Party Claims.
|
||||
If You have knowledge that a party claims an intellectual property
|
||||
right in particular functionality or code (or its utilization
|
||||
under this License), you must include a text file with the source
|
||||
code distribution titled ``LEGAL'' which describes the claim and
|
||||
the party making the claim in sufficient detail that a recipient
|
||||
will know whom to contact. If you obtain such knowledge after You
|
||||
make Your Modification available as described in Section 3.2, You
|
||||
shall promptly modify the LEGAL file in all copies You make
|
||||
available thereafter and shall take other steps (such as notifying
|
||||
appropriate mailing lists or newsgroups) reasonably calculated to
|
||||
inform those who received the Covered Code that new knowledge has
|
||||
been obtained.
|
||||
|
||||
(b) Contributor APIs.
|
||||
If Your Modification is an application programming interface and
|
||||
You own or control patents which are reasonably necessary to
|
||||
implement that API, you must also include this information in the
|
||||
LEGAL file.
|
||||
|
||||
3.5. Required Notices.
|
||||
You must duplicate the notice in Exhibit A in each file of the Source
|
||||
Code, and this License in any documentation for the Source Code, where
|
||||
You describe recipients' rights relating to Covered Code. If You
|
||||
created one or more Modification(s), You may add your name as a
|
||||
Contributor to the notice described in Exhibit A. If it is not possible
|
||||
to put such notice in a particular Source Code file due to its
|
||||
structure, then you must include such notice in a location (such as a
|
||||
relevant directory file) where a user would be likely to look for such
|
||||
a notice. You may choose to offer, and to charge a fee for, warranty,
|
||||
support, indemnity or liability obligations to one or more recipients
|
||||
of Covered Code. However, You may do so only on Your own behalf, and
|
||||
not on behalf of the Initial Developer or any Contributor. You must
|
||||
make it absolutely clear than any such warranty, support, indemnity or
|
||||
liability obligation is offered by You alone, and You hereby agree to
|
||||
indemnify the Initial Developer and every Contributor for any liability
|
||||
incurred by the Initial Developer or such Contributor as a result of
|
||||
warranty, support, indemnity or liability terms You offer.
|
||||
|
||||
3.6. Distribution of Executable Versions.
|
||||
You may distribute Covered Code in Executable form only if the
|
||||
requirements of Section 3.1-3.5 have been met for that Covered Code,
|
||||
and if You include a notice stating that the Source Code version of the
|
||||
Covered Code is available under the terms of this License, including a
|
||||
description of how and where You have fulfilled the obligations of
|
||||
Section 3.2. The notice must be conspicuously included in any notice in
|
||||
an Executable version, related documentation or collateral in which You
|
||||
describe recipients' rights relating to the Covered Code. You may
|
||||
distribute the Executable version of Covered Code under a license of
|
||||
Your choice, which may contain terms different from this License,
|
||||
provided that You are in compliance with the terms of this License and
|
||||
that the license for the Executable version does not attempt to limit
|
||||
or alter the recipient's rights in the Source Code version from the
|
||||
rights set forth in this License. If You distribute the Executable
|
||||
version under a different license You must make it absolutely clear
|
||||
that any terms which differ from this License are offered by You alone,
|
||||
not by the Initial Developer or any Contributor. You hereby agree to
|
||||
indemnify the Initial Developer and every Contributor for any liability
|
||||
incurred by the Initial Developer or such Contributor as a result of
|
||||
any such terms You offer.
|
||||
|
||||
3.7. Larger Works.
|
||||
You may create a Larger Work by combining Covered Code with other code
|
||||
not governed by the terms of this License and distribute the Larger
|
||||
Work as a single product. In such a case, You must make sure the
|
||||
requirements of this License are fulfilled for the Covered Code.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation.
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Code due to statute
|
||||
or regulation then You must: (a) comply with the terms of this License
|
||||
to the maximum extent possible; and (b) describe the limitations and
|
||||
the code they affect. Such description must be included in the LEGAL
|
||||
file described in Section 3.4 and must be included with all
|
||||
distributions of the Source Code. Except to the extent prohibited by
|
||||
statute or regulation, such description must be sufficiently detailed
|
||||
for a recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Application of this License.
|
||||
|
||||
This License applies to code to which the Initial Developer has
|
||||
attached the notice in Exhibit A, and to related Covered Code.
|
||||
|
||||
6. Versions of the License.
|
||||
|
||||
6.1. New Versions.
|
||||
Netscape Communications Corporation (``Netscape'') may publish revised
|
||||
and/or new versions of the License from time to time. Each version will
|
||||
be given a distinguishing version number.
|
||||
|
||||
6.2. Effect of New Versions.
|
||||
Once Covered Code has been published under a particular version of the
|
||||
License, You may always continue to use it under the terms of that
|
||||
version. You may also choose to use such Covered Code under the terms
|
||||
of any subsequent version of the License published by Netscape. No one
|
||||
other than Netscape has the right to modify the terms applicable to
|
||||
Covered Code created under this License.
|
||||
|
||||
6.3. Derivative Works.
|
||||
If you create or use a modified version of this License (which you may
|
||||
only do in order to apply it to code which is not already Covered Code
|
||||
governed by this License), you must (a) rename Your license so that the
|
||||
phrases ``Mozilla'', ``MOZILLAPL'', ``MOZPL'', ``Netscape'', ``NPL'' or
|
||||
any confusingly similar phrase do not appear anywhere in your license
|
||||
and (b) otherwise make it clear that your version of the license
|
||||
contains terms which differ from the Mozilla Public License and
|
||||
Netscape Public License. (Filling in the name of the Initial Developer,
|
||||
Original Code or Contributor in the notice described in Exhibit A shall
|
||||
not of themselves be deemed to be modifications of this License.)
|
||||
|
||||
7. DISCLAIMER OF WARRANTY.
|
||||
|
||||
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN ``AS IS'' BASIS,
|
||||
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
|
||||
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
|
||||
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
|
||||
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
|
||||
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
|
||||
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
|
||||
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
|
||||
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
|
||||
|
||||
8. TERMINATION.
|
||||
|
||||
This License and the rights granted hereunder will terminate
|
||||
automatically if You fail to comply with terms herein and fail to cure
|
||||
such breach within 30 days of becoming aware of the breach. All
|
||||
sublicenses to the Covered Code which are properly granted shall
|
||||
survive any termination of this License. Provisions which, by their
|
||||
nature, must remain in effect beyond the termination of this License
|
||||
shall survive.
|
||||
|
||||
9. LIMITATION OF LIABILITY.
|
||||
|
||||
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
|
||||
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL
|
||||
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
|
||||
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER
|
||||
PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
||||
OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF
|
||||
GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND
|
||||
ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE
|
||||
BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
|
||||
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
|
||||
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
|
||||
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
|
||||
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT
|
||||
EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
10. U.S. GOVERNMENT END USERS.
|
||||
|
||||
The Covered Code is a ``commercial item,'' as that term is defined in
|
||||
48 C.F.R. 2.101 (Oct. 1995), consisting of ``commercial computer
|
||||
software'' and ``commercial computer software documentation,'' as such
|
||||
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
|
||||
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
|
||||
all U.S. Government End Users acquire Covered Code with only those
|
||||
rights set forth herein.
|
||||
|
||||
11. MISCELLANEOUS.
|
||||
|
||||
This License represents the complete agreement concerning subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. This License shall be governed by
|
||||
California law provisions (except to the extent applicable law, if any,
|
||||
provides otherwise), excluding its conflict-of-law provisions. With
|
||||
respect to disputes in which at least one party is a citizen of, or an
|
||||
entity chartered or registered to do business in, the United States of
|
||||
America: (a) unless otherwise agreed in writing, all disputes relating
|
||||
to this License (excepting any dispute relating to intellectual
|
||||
property rights) shall be subject to final and binding arbitration,
|
||||
with the losing party paying all costs of arbitration; (b) any
|
||||
arbitration relating to this Agreement shall be held in Santa Clara
|
||||
County, California, under the auspices of JAMS/EndDispute; and (c) any
|
||||
litigation relating to this Agreement shall be subject to the
|
||||
jurisdiction of the Federal Courts of the Northern District of
|
||||
California, with venue lying in Santa Clara County, California, with
|
||||
the losing party responsible for costs, including without limitation,
|
||||
court costs and reasonable attorneys fees and expenses. The application
|
||||
of the United Nations Convention on Contracts for the International
|
||||
Sale of Goods is expressly excluded. Any law or regulation which
|
||||
provides that the language of a contract shall be construed against the
|
||||
drafter shall not apply to this License.
|
||||
|
||||
12. RESPONSIBILITY FOR CLAIMS.
|
||||
|
||||
Except in cases where another Contributor has failed to comply with
|
||||
Section 3.4, You are responsible for damages arising, directly or
|
||||
indirectly, out of Your utilization of rights under this License, based
|
||||
on the number of copies of Covered Code you made available, the
|
||||
revenues you received from utilizing such rights, and other relevant
|
||||
factors. You agree to work with affected parties to distribute
|
||||
responsibility on an equitable basis.
|
||||
|
||||
AMENDMENTS
|
||||
Additional Terms applicable to the Netscape Public License.
|
||||
|
||||
I. Effect.
|
||||
These additional terms described in this Netscape Public License --
|
||||
Amendments shall apply to the Mozilla Communicator client code and to
|
||||
all Covered Code under this License.
|
||||
|
||||
II. ``Netscape's Branded Code'' means Covered Code that Netscape
|
||||
distributes and/or permits others to distribute under one or more
|
||||
trademark(s) which are controlled by Netscape but which are not
|
||||
licensed for use under this License.
|
||||
|
||||
III. Netscape and logo.
|
||||
This License does not grant any rights to use the trademark
|
||||
``Netscape'', the ``Netscape N and horizon'' logo or the Netscape
|
||||
lighthouse logo, even if such marks are included in the Original Code.
|
||||
|
||||
IV. Inability to Comply Due to Contractual Obligation.
|
||||
Prior to licensing the Original Code under this License, Netscape has
|
||||
licensed third party code for use in Netscape's Branded Code. To the
|
||||
extent that Netscape is limited contractually from making such third
|
||||
party code available under this License, Netscape may choose to
|
||||
reintegrate such code into Covered Code without being required to
|
||||
distribute such code in Source Code form, even if such code would
|
||||
otherwise be considered ``Modifications'' under this License.
|
||||
|
||||
V. Use of Modifications and Covered Code by Initial Developer.
|
||||
|
||||
V.1. In General.
|
||||
The obligations of Section 3 apply to Netscape, except to the
|
||||
extent specified in this Amendment, Section V.2 and V.3.
|
||||
|
||||
V.2. Other Products.
|
||||
Netscape may include Covered Code in products other than the
|
||||
Netscape's Branded Code which are released by Netscape during the
|
||||
two (2) years following the release date of the Original Code,
|
||||
without such additional products becoming subject to the terms of
|
||||
this License, and may license such additional products on
|
||||
different terms from those contained in this License.
|
||||
|
||||
V.3. Alternative Licensing.
|
||||
Netscape may license the Source Code of Netscape's Branded Code,
|
||||
including Modifications incorporated therein, without such
|
||||
additional products becoming subject to the terms of this License,
|
||||
and may license such additional products on different terms from
|
||||
those contained in this License.
|
||||
|
||||
VI. Arbitration and Litigation.
|
||||
Notwithstanding the limitations of Section 11 above, the provisions
|
||||
regarding arbitration and litigation in Section 11(a), (b) and (c) of
|
||||
the License shall apply to all disputes relating to this License.
|
||||
|
||||
EXHIBIT A.
|
||||
|
||||
``The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "License"); you may not use this file except in
|
||||
compliance with the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS"
|
||||
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
License for the specific language governing rights and limitations
|
||||
under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released March
|
||||
31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape Communications
|
||||
Corporation. Portions created by Netscape are Copyright (C) 1998
|
||||
Netscape Communications Corporation. All Rights Reserved.
|
||||
|
||||
Contributor(s): ______________________________________.''
|
||||
|
||||
[NOTE: The text of this Exhibit A may differ slightly from the text of
|
||||
the notices in the Source Code files of the Original Code. This is due
|
||||
to time constraints encountered in simultaneously finalizing the
|
||||
License and in preparing the Original Code for release. You should use
|
||||
the text of this Exhibit A rather than the text found in the Original
|
||||
Code Source Code for Your Modifications.]
|
||||
107
mozilla/Makefile.in
Normal file
107
mozilla/Makefile.in
Normal file
@@ -0,0 +1,107 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = .
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
# The list of directories that need to be built to build the standalone
|
||||
# nglayout test program. The order is important.
|
||||
DIRS = \
|
||||
config \
|
||||
build \
|
||||
$(NULL)
|
||||
|
||||
ifndef MOZ_NATIVE_NSPR
|
||||
DIRS += $(topsrcdir)/nsprpub
|
||||
endif
|
||||
|
||||
DIRS += \
|
||||
dbm \
|
||||
modules/libreg \
|
||||
xpcom \
|
||||
$(NULL)
|
||||
|
||||
ifndef MOZ_NATIVE_ZLIB
|
||||
DIRS += modules/zlib
|
||||
endif
|
||||
|
||||
ifndef MOZ_NATIVE_JPEG
|
||||
DIRS += jpeg
|
||||
endif
|
||||
|
||||
ifdef NECKO
|
||||
DIRS += netwerk
|
||||
else
|
||||
DIRS += network
|
||||
endif
|
||||
|
||||
DIRS += \
|
||||
modules/libutil \
|
||||
intl \
|
||||
js \
|
||||
modules/security/freenav \
|
||||
modules/libpref \
|
||||
modules/libimg \
|
||||
modules/oji \
|
||||
modules/plugin \
|
||||
modules/libjar \
|
||||
caps \
|
||||
lib/xp \
|
||||
lib/libpwcac \
|
||||
htmlparser \
|
||||
expat \
|
||||
gfx \
|
||||
dom \
|
||||
view \
|
||||
widget \
|
||||
layout \
|
||||
rdf \
|
||||
webshell \
|
||||
editor \
|
||||
silentdl \
|
||||
xpinstall \
|
||||
sun-java \
|
||||
profile \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_BUILD_XPFE
|
||||
DIRS += xpfe extensions
|
||||
endif
|
||||
|
||||
ifdef MOZ_MAIL_NEWS
|
||||
ifndef NECKO
|
||||
DIRS += mailnews
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
real_all: all
|
||||
|
||||
real_export: export
|
||||
|
||||
real_libs: libs
|
||||
|
||||
real_install: install
|
||||
|
||||
real_clobber: clobber
|
||||
|
||||
real_depend: depend
|
||||
BIN
mozilla/README/mozilla/IDEMenuBar.gif
Normal file
BIN
mozilla/README/mozilla/IDEMenuBar.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
mozilla/README/mozilla/IDEPrefs.gif
Normal file
BIN
mozilla/README/mozilla/IDEPrefs.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
443
mozilla/README/mozilla/classic-mac.html
Normal file
443
mozilla/README/mozilla/classic-mac.html
Normal file
@@ -0,0 +1,443 @@
|
||||
|
||||
<HEAD>
|
||||
<TITLE>Building Mozilla on the Macintosh PPC platform</TITLE>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B">
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
</P>
|
||||
|
||||
<H1>Building Mozilla on the Macintosh PPC platform</H1>
|
||||
|
||||
<H2>Daniel Nunes, <A HREF="mailto:leaf@netscape.com"><TT>leaf@netscape.com</TT></A></H2>
|
||||
|
||||
<P>v 1.1, 1998-9-29<BR>
|
||||
updated for the Pro4 IDE</P>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<I>How to build Mozilla on a Macintosh PPC System.</I>
|
||||
|
||||
<HR>
|
||||
|
||||
</P>
|
||||
|
||||
<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>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
</P>
|
||||
|
||||
<H2><A NAME=s1></A>1. Introduction</H2>
|
||||
|
||||
<P>What this document is: A guide to building the Mozilla
|
||||
application. This includes:</P>
|
||||
|
||||
<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>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
</P>
|
||||
|
||||
<H2><A NAME=s2></A>2. Building Mozilla</H2>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<UL>
|
||||
<LI>Each of the following subsections describes, or gives
|
||||
references to descriptions of, the steps necessary to build
|
||||
Mozilla.
|
||||
|
||||
<H2><A NAME="ss2.1"></A>2.1 Get the Code</H2>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<UL>
|
||||
<LI>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. Ftp drops are generally produced once per
|
||||
month, and are known to compile.</LI>
|
||||
</UL>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<H2><A NAME="ss2.2"></A>2.2 Requirements</H2>
|
||||
|
||||
<P>The following need to be installed:</P>
|
||||
|
||||
<UL>
|
||||
<LI>CodeWarrior (CW) Pro4 - obtainable from <A HREF="http://www.metrowerks.com">Metrowerks</A>.
|
||||
See <A HREF="#s3">Common Sticking Points</A> if you have a
|
||||
different version. Mozilla will no longer build with anything
|
||||
earlier.</LI>
|
||||
|
||||
<LI>PowerPlant - 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.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>The module Mac:AppleEvents:Simple, which should be stored
|
||||
in your Perl library folder under :Mac:AppleEvents:Simple.pm,
|
||||
may be downloaded <A HREF="http://www.perl.com/CPAN-local/modules/by-module/Mac/Mac-AppleEvents-Simple-0.10.tgz">here</A>.</LI>
|
||||
|
||||
<LI>The module Mac:Apps:Launch, which should be stored in your
|
||||
Perl library folder under :Mac:Apps:Launch.pm, may be
|
||||
downloaded <A HREF="http://www.perl.com/CPAN-local/modules/by-module/Mac/Mac-Apps-Launch-1.30.tar.gz">here</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 4 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 4 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://sunsite.cnlab-switch.ch/ftp/software/platform/macos/src/HTML/MPW_C.html">patch
|
||||
2.1</A></LI>
|
||||
</UL>
|
||||
|
||||
<P>Hardware/OS</P>
|
||||
|
||||
<UL>
|
||||
<LI>To build Navigator, you need a fast PPC Mac. The faster the
|
||||
better.</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> </P>
|
||||
|
||||
<H2><A NAME="ss2.3"></A>2.3 Setup the Build Environment</H2>
|
||||
|
||||
<P> </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>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 ƒ" 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" and "MakeStub" Tools in the tools
|
||||
folder. Note that "MakeStub" is 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, Internet Config,
|
||||
and the AEGizmo folders (just as they are) into the "MacOS
|
||||
Support" folder in your build environment.</LI>
|
||||
|
||||
<LI>Create a folder inside the PowerPlant folder
|
||||
(Metrowerks:Metrowerks CodeWarrior:MacOS Support:PowerPlant)
|
||||
called "_Will Be Obsolete" Make sure you include the leading
|
||||
underscore.</LI>
|
||||
|
||||
<LI>Unstuff the obsolete LGA classes (located on the Reference
|
||||
CD in "CodeWarrior Examples:MacOS Examples:PowerPlant
|
||||
Examples:Obsolete PP Items:Old GA Classes.sit) and place the
|
||||
resulting folder into the "_Will Be Obsolete" folder you
|
||||
created in the previous step.</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 &
|
||||
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:CW Pro 4:Metrowerks CodeWarrior:</FONT>"
|
||||
Set Source "<FONT COLOR="#FF0000">Source:FreeSource:</FONT>"</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>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> </P>
|
||||
|
||||
<H2><A NAME="ss2.4"></A>2.4 Run the build</H2>
|
||||
|
||||
<UL>
|
||||
<LI>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>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></LI>
|
||||
</UL>
|
||||
</LI>
|
||||
</UL>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
</P>
|
||||
|
||||
<H2><A NAME=s3></A>3. Common Sticking Points</H2>
|
||||
|
||||
<UL>
|
||||
<LI><B>I only have CodeWarrior Pro3 or Pro2. How do i build with
|
||||
it?</B>
|
||||
|
||||
<UL>
|
||||
<LI>Currently, the answer is, "You don't." We make use of
|
||||
several classes in PowerPlant which recently appeared in Pro4.
|
||||
Time to upgrade, I'm afraid. Don't even try opening the
|
||||
projects with Pro2 because you will get data loss and have to
|
||||
throw the project away (it won't even prompt you!)</LI>
|
||||
</UL>
|
||||
</LI>
|
||||
|
||||
<LI><B>I'm having problems building. MacPerl tells me it can't
|
||||
fine MemAllocatorStubs</B>
|
||||
|
||||
<UL>
|
||||
<LI>It sounds like your ToolServer environment is not setup
|
||||
correctly. Make sure you follow the directions to the letter.
|
||||
You could also be seeing this if you have multiple versions of
|
||||
ToolServer on your computer and the Finder lauches the wrong
|
||||
one. This is very common, as the <I>Carbon Dater</I> app from
|
||||
Apple DTS contains a copy of ToolServer. Either remove all the
|
||||
other versions of ToolServer or make sure you launch the
|
||||
appropriate version before you start building.</LI>
|
||||
</UL>
|
||||
</LI>
|
||||
|
||||
<LI><B>The IDE runs out of memory building jsinterp.c. What do I
|
||||
do?</B>
|
||||
|
||||
<UL>
|
||||
<LI>We have seen this every now and then, and it only appears
|
||||
to show up when building optimized (non-debug) builds. You can
|
||||
normally get around this by building that file by itself
|
||||
(select it and choose "Compile") and then continuing the make.
|
||||
We're not sure why this is happening, so if you have any
|
||||
answers or solutions, please let us know!</LI>
|
||||
</UL>
|
||||
</LI>
|
||||
</UL>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
</P>
|
||||
|
||||
<H2><A NAME=s4></A>4. Credits</H2>
|
||||
|
||||
<UL>
|
||||
<LI>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>.</LI>
|
||||
</UL>
|
||||
</BODY>
|
||||
</HTML>
|
||||
158
mozilla/README/mozilla/classic-unix.html
Normal file
158
mozilla/README/mozilla/classic-unix.html
Normal file
@@ -0,0 +1,158 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Building Mozilla on unix platforms</TITLE>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B"
|
||||
ALINK="#FF0000">
|
||||
<HR>
|
||||
<H1>
|
||||
Building Mozilla on Unix platforms</H1>
|
||||
|
||||
<H2>
|
||||
Daniel Nunes, <TT><A HREF="mailto:leaf@netscape.com">leaf@netscape.com</A></TT></H2>
|
||||
v 1.1, June 1998
|
||||
|
||||
<P>
|
||||
<HR><I>How to build Mozilla on a Unix 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>
|
||||
|
||||
<LI>
|
||||
<A HREF="#ss2.5">2.5 Run 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.
|
||||
</UL>
|
||||
<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. Ftp drops are generally produced once per month,
|
||||
and are known to compile.
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="ss2.2">2.2 Requirements</A></H2>
|
||||
<UL>
|
||||
The following should be installed:
|
||||
<UL>
|
||||
<LI>Motif 1.2
|
||||
<LI>The native C/C++ compiler (or GNU C/C++ compiler 2.7.2 in lieu of the
|
||||
native compiler)
|
||||
<LI>GNU make 3.74 or better
|
||||
<LI>Perl (or, if you have no Perl, then set <CODE>PERL=/bin/echo</CODE>)
|
||||
</UL>
|
||||
<P>
|
||||
Your hardware should be equal to, or better than:
|
||||
<UL>
|
||||
32 MB RAM, 128 MB swap (64 MB RAM recommended)
|
||||
</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:
|
||||
<CODE>
|
||||
<PRE>
|
||||
MOZILLA_CLIENT=1
|
||||
MOZ_MEDIUM=1
|
||||
NO_MDUPDATE=1
|
||||
</PRE>
|
||||
</CODE>
|
||||
Optionally, you can set <CODE>BUILD_OPT=1</CODE> if you don't want a debug
|
||||
build.
|
||||
<P>
|
||||
If your Motif libraries are installed in a non-standard place, you can tell
|
||||
the Mozilla makefiles where to look by setting
|
||||
<CODE>MOZILLA_MOTIF_SEARCH_PATH</CODE> to point to the directory in which
|
||||
your Motif installation resides.
|
||||
<P>
|
||||
Environment variables are set by the shell, and there are two common ways
|
||||
of setting them. <BR>
|
||||
Type <CODE>setenv VARIABLE value</CODE> or <CODE>export VARIABLE=value</CODE>.
|
||||
<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 /builds</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
|
||||
gmake
|
||||
</PRE>
|
||||
</CODE>
|
||||
</UL>
|
||||
<H2><A NAME="ss2.5">2.5 After the build </A></H2>
|
||||
<UL>
|
||||
You may notice that if you try running mozilla-export right after the build,
|
||||
you'll run into a problem. You need to set <CODE>LD_LIBRARY_PATH</CODE> to
|
||||
<CODE>
|
||||
${LD_LIBRARY_PATH}:/PATH_TO_SOURCE/mozilla/dist/Linux2.0.32_x86_OPT.OBJ/bin
|
||||
</CODE> (where <CODE>PATH_TO_SOURCE</CODE> is the full path to your source
|
||||
tree) before the dynamically linked binary will run. <BR><BR>
|
||||
This varies by platform:<br>
|
||||
<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>
|
||||
</UL>
|
||||
|
||||
<HR>
|
||||
<H2><A NAME="s3">3. Common Sticking Points</A></H2>
|
||||
<LI>My linker dies with this error: undefined reference to `_Xsetlocale'
|
||||
<UL>If this error occurs, you might have to recompile libX11.so
|
||||
with the -DX_LOCALE flag (thanks to Scott Lampert,
|
||||
<A HREF="mailto:fortunato@heavymetal.org">fortunato@heavymetal.org</A>).
|
||||
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
217
mozilla/README/mozilla/classic-win.html
Normal file
217
mozilla/README/mozilla/classic-win.html
Normal file
@@ -0,0 +1,217 @@
|
||||
<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 most current code for building, but is
|
||||
slower than ftp. Ftp drops are generally produced once per month,
|
||||
and are known to compile.
|
||||
|
||||
</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_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=(the parent directory of the GNU tools 'bin' directory. 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 NSPR20=1
|
||||
<BR>
|
||||
set _MSC_VER=1100 (if you are running VC++ 5.0) or 1200
|
||||
(if you are running VC++ 6.0)
|
||||
<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>It fails immediately with the message "Cannot find specified directory":
|
||||
</B>
|
||||
<UL>
|
||||
You didn't properly set the environment variable MOZ_TOOLS;
|
||||
this needs to be set to the path up to, but not including, the final \bin
|
||||
directory in the path to the gnu tools. So, the path to the tool executables
|
||||
is '%MOZ_TOOLS%\bin\<executable>'.
|
||||
</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>
|
||||
400
mozilla/README/mozilla/mac-build.html
Normal file
400
mozilla/README/mozilla/mac-build.html
Normal 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 ƒ" 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 & 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>
|
||||
163
mozilla/README/mozilla/unix-build.html
Normal file
163
mozilla/README/mozilla/unix-build.html
Normal file
@@ -0,0 +1,163 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Building the Mozilla client on unix platforms</TITLE>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B"
|
||||
ALINK="#FF0000">
|
||||
<HR>
|
||||
<H1>Building the Mozilla client on Unix platforms</H1>
|
||||
|
||||
<H2>
|
||||
Daniel Nunes, <TT><A HREF="mailto:leaf@mozilla.org">leaf@mozilla.org</A></TT></H2>
|
||||
v 1.2, 1998-11-02
|
||||
|
||||
<P>
|
||||
<HR><I>How to build Mozilla on a Unix 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 Build the Lizard</A></LI>
|
||||
|
||||
<LI>
|
||||
<A HREF="#ss2.4">2.4 After the Build</A></LI>
|
||||
</UL>
|
||||
|
||||
<H2>3. <A HREF="#s3"> Common Problems </A></H2>
|
||||
|
||||
<HR>
|
||||
<H2><A NAME="s1">1. Introduction</A></H2>
|
||||
|
||||
<P>
|
||||
Perhaps you are interested in building classic Mozilla, before the
|
||||
fall of the old layout engine, and the rise of the new. If so, the
|
||||
<B><A HREF="classic-unix.html">Classic Mozilla Build document</A></B>
|
||||
is what you're looking for.
|
||||
|
||||
<P>
|
||||
|
||||
<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 sample set of commands to build Mozilla using the Autoconf
|
||||
build system. </LI>
|
||||
</OL>
|
||||
<P>
|
||||
If you're looking for documentation on developing features or fixing bugs,
|
||||
the Mozilla
|
||||
<A HREF="../tplist.html">Technical Documents</A> or
|
||||
<A HREF="../../../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.
|
||||
</UL>
|
||||
<UL>
|
||||
<H2><A NAME="ss2.1">2.1 Get the Code</A></H2>
|
||||
<P>
|
||||
<UL>
|
||||
|
||||
Eventually, there will be two principal ways of getting the code,
|
||||
<A HREF="../../../download.html"> ftp</A> and
|
||||
<A HREF="../../../cvs.html"> CVS</A>.
|
||||
CVS will provide the most current code for building, but is
|
||||
slower than ftp. Ftp drops are generally produced once per month,
|
||||
and are known to compile on some machine, somewhere.
|
||||
|
||||
<B>For now</B>, however, you must do the following to obtain the newest
|
||||
browser source:
|
||||
<BR>
|
||||
<CODE>
|
||||
cvs co mozilla/nglayout.mk<BR>
|
||||
cd mozilla<BR>
|
||||
gmake -f nglayout.mk pull_all<BR>
|
||||
</CODE>
|
||||
<BR>
|
||||
This should pull all the right source.
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="ss2.2">2.2 Requirements</A></H2>
|
||||
<UL>
|
||||
The following should be installed:
|
||||
<UL>
|
||||
<LI>Motif 1.2
|
||||
<LI>The native C/C++ compiler (or GNU C/C++ compiler 2.7.2 in lieu of the
|
||||
native compiler)
|
||||
<LI>GNU make 3.74 or better
|
||||
<LI>Perl5
|
||||
<LI><A HREF="../../../projects/autoconf/">Autconf</A> requirements,
|
||||
including NSPR.
|
||||
<LI><CODE>LD_LIBRARY_PATH</CODE> must include the path to the NSPR
|
||||
shared objects.<BR>
|
||||
For most people, this means adding <CODE>/usr/local/nspr/lib</CODE>
|
||||
to <CODE>LD_LIBRARY_PATH</CODE>
|
||||
(either:
|
||||
<BR>
|
||||
<CODE>setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/usr/local/nspr/lib</CODE>
|
||||
<BR>
|
||||
or
|
||||
<BR>
|
||||
<CODE>export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/nspr/lib</CODE>
|
||||
.<BR>
|
||||
If you get an error like "No such variable" then omit the
|
||||
<CODE>${LD_LIBRARY_PATH}:</CODE> part
|
||||
)
|
||||
</UL>
|
||||
<P>
|
||||
Your hardware should be equal to, or better than:
|
||||
<UL>
|
||||
32 MB RAM, 128 MB swap (64 MB RAM recommended)
|
||||
</UL>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="ss2.3">2.3 Build the Lizard</A></H2>
|
||||
<P>
|
||||
<UL>
|
||||
<CODE>
|
||||
autoconf<BR>
|
||||
mkdir obj-`./build/autoconf/config.guess`<BR>
|
||||
cd obj-`./build/autoconf/config.guess`<BR>
|
||||
../configure --with-nspr=/usr/local/nspr --enable-toolkit=motif<BR>
|
||||
gmake depend<BR>
|
||||
gmake<BR>
|
||||
</CODE>
|
||||
</UL>
|
||||
<H2><A NAME="ss2.4">2.4 After the build </A></H2>
|
||||
<UL>
|
||||
|
||||
<LI> <CODE>cd dist/bin</CODE> and you should see links to the objects you
|
||||
need to run <CODE>main</CODE>.
|
||||
|
||||
<LI>On most unixen LD_LIBRARY_PATH must be set to wherever the necessary
|
||||
libraries are.
|
||||
|
||||
<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>
|
||||
</UL>
|
||||
</UL>
|
||||
<HR>
|
||||
<H2><A NAME="s3">3. Common Sticking Points</A></H2>
|
||||
<LI>I'm sure there are bound to be some. Send
|
||||
<A HREF="mailto:leaf@mozilla.org"> me</A> mail.
|
||||
<HR>
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
209
mozilla/README/mozilla/win-build.html
Normal file
209
mozilla/README/mozilla/win-build.html
Normal 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>
|
||||
53
mozilla/README/mozilla/wininstall.htm
Normal file
53
mozilla/README/mozilla/wininstall.htm
Normal 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 the <TT>-new_account</TT>
|
||||
option on the command line of either <TT>netscape.exe</TT> or <TT>mozilla.exe</TT>.
|
||||
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>
|
||||
<HR WIDTH="100%">
|
||||
<BR><FONT SIZE=-1>Copyright © 1998 <A HREF="http://home.netscape.com/misc/contact_info.html">Netscape
|
||||
Communications Corporation</A></FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
184
mozilla/README/nglayout/winbuild.html
Normal file
184
mozilla/README/nglayout/winbuild.html
Normal file
@@ -0,0 +1,184 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=x-mac-roman">
|
||||
<META NAME="GENERATOR" CONTENT="Mozilla/4.04 [en] (WinNT; I) [Netscape]">
|
||||
<META NAME="KeyWords" CONTENT="client, source, documentation">
|
||||
<META NAME="Author" CONTENT="Kipp E.B. Hickman">
|
||||
<TITLE>NGLayout Windows Build Instructions</TITLE>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
|
||||
<H2>
|
||||
<FONT FACE="Arial,Helvetica">NGLayout Windows Build Instructions</FONT></H2>
|
||||
This document explains how to build NGLayout for the Windows platform.
|
||||
<HR><B><FONT SIZE=+1>Required Tools:</FONT></B>
|
||||
<UL>
|
||||
<LI>
|
||||
<B>Microsoft Visual C++ version 4.2 or later</B></LI>
|
||||
|
||||
<LI>
|
||||
<B>The same set of tools for building <A HREF="http://www.mozilla.org/docs/tplist/catBuild/winbuild.htm">Mozilla</A></B></LI>
|
||||
</UL>
|
||||
<B><FONT SIZE=+1>Setting up:</FONT></B>
|
||||
<UL>
|
||||
<LI>
|
||||
You need a Pentium with at least a 133 MHz processor and at least 250 megs
|
||||
(NTFS partition) or 500 megs (FAT partition) of hard drive space. You need
|
||||
to have a minimum of 64 megs of memory in order to build this tree. These
|
||||
numbers are approximations.</LI>
|
||||
|
||||
<LI>
|
||||
The preferred platform is NT 4.0. NT 3.51 will also work, and Win95 might
|
||||
work if you're lucky. Maybe.</LI>
|
||||
|
||||
<LI>
|
||||
Install MSVC. If you don't choose to have the MSVC install modify your
|
||||
environment variables for PATH, INCLUDE, and LIB information, be sure to
|
||||
run VCVARS32.BAT out of the MSVC bin directory prior to attempting to build.</LI>
|
||||
|
||||
<LI>
|
||||
Download and install GNU tools. Put them in your path.</LI>
|
||||
|
||||
<LI>
|
||||
Install NGLayout source.</LI>
|
||||
|
||||
<UL>
|
||||
<LI>
|
||||
cd <your-source-area></LI>
|
||||
|
||||
<LI>
|
||||
unzip -o -q win-19980415.zip</LI>
|
||||
</UL>
|
||||
|
||||
<LI>
|
||||
There are several environment variables you will need to set, either manually
|
||||
or via a script within a command session, or by setting them in your system
|
||||
environment located through the Control Panel | System icon.</LI>
|
||||
|
||||
|
||||
<P> <B>Note: There is an additional variable for building NGLayout!
|
||||
Use this list carefully!</B>
|
||||
|
||||
<P> The variables are:
|
||||
<UL>
|
||||
<LI>
|
||||
set MOZ_BITS=32</LI>
|
||||
|
||||
<LI>
|
||||
set MOZ_DEBUG=1 (don't set this if you want to build an optimized release
|
||||
build)</LI>
|
||||
|
||||
<LI>
|
||||
set MOZ_GOLD=1</LI>
|
||||
|
||||
<LI>
|
||||
set MOZ_MEDIUM=1</LI>
|
||||
|
||||
<LI>
|
||||
set MOZ_NT=351 (if running NT 3.51, don't set otherwise)</LI>
|
||||
|
||||
<LI>
|
||||
set MOZ_OUT=(location of resulting executable and totally optional, see
|
||||
Notes for more details)</LI>
|
||||
|
||||
<LI>
|
||||
set MOZ_SRC=(top of your tree, drive letter and path, i.e. set MOZ_SRC=d:\mozilla_src.
|
||||
The topmost directory under this should be mozilla)</LI>
|
||||
|
||||
<LI>
|
||||
set MOZ_TOOLS=(location of the bin directory containing your GNU tools.
|
||||
The build looks for MOZ_TOOLS\bin\gmake.exe, so make sure your MOZ_TOOLS
|
||||
is figured appropriately)</LI>
|
||||
|
||||
<LI>
|
||||
set NO_SECURITY=1</LI>
|
||||
|
||||
<LI>
|
||||
set NSPR20=1</LI>
|
||||
|
||||
<LI>
|
||||
if you are running VC++ 5.0 or higher: set _MSC_VER=1100; if you are running
|
||||
VC++ 4.2 then set MOZ_VCVER=42</LI>
|
||||
|
||||
<LI>
|
||||
<B>set STANDALONE_IMAGE_LIB=1</B></LI>
|
||||
|
||||
<LI>
|
||||
<B>set MODULAR_NETLIB=1</B></LI>
|
||||
</UL>
|
||||
</UL>
|
||||
<B><FONT SIZE=+1>Building:</FONT></B>
|
||||
<UL>
|
||||
<LI>
|
||||
You need to be running a vanilla command prompt. Other shells may work,
|
||||
but you might have to tweak makefiles.</LI>
|
||||
|
||||
<LI>
|
||||
<B>Build the tools:</B> This generates several tools that handle things
|
||||
like dependency generation</LI>
|
||||
|
||||
<UL>
|
||||
<LI>
|
||||
cd mozilla\config</LI>
|
||||
|
||||
<LI>
|
||||
nmake /f makefile.win</LI>
|
||||
</UL>
|
||||
|
||||
<LI>
|
||||
<B>Build the NGLayout:</B> This will do a complete build of the source
|
||||
tree. You will end up with a viewer.exe at the end. The viewer.exe will
|
||||
be in your dist\win32_[OD].obj\bin directory (O will be used when you don't
|
||||
set MOZ_DEBUG; D will be used when you set MOZ_DEBUG).</LI>
|
||||
|
||||
<UL>
|
||||
<LI>
|
||||
cd mozilla</LI>
|
||||
|
||||
<LI>
|
||||
nmake /f nglayout.mak</LI>
|
||||
</UL>
|
||||
</UL>
|
||||
<B><FONT SIZE=+1>Running:</FONT></B>
|
||||
<UL>
|
||||
<LI>
|
||||
Once you have built the system, do this to run the viewer program (the
|
||||
viewer program is a simple test program that uses the nsIWebWidget API
|
||||
to embed a web widget object). The viewer program has a few basic menu
|
||||
items, include "Samples" which load sample tests.</LI>
|
||||
|
||||
<UL>
|
||||
<LI>
|
||||
cd mozilla\dist\win32_[OD].obj\bin</LI>
|
||||
|
||||
<LI>
|
||||
.\viewer.exe</LI>
|
||||
</UL>
|
||||
</UL>
|
||||
<B><FONT SIZE=+1>Notes:</FONT></B>
|
||||
<UL>
|
||||
<LI>
|
||||
This build process does not use Visual C++ generated project files for
|
||||
several reasons having to do with (among other things) size, maintainability,
|
||||
and the long term desire to start using more of tools like gmake, or plug
|
||||
and play developer tools. This does not preclude you from using the Visual
|
||||
C++ IDE, or it's debugger. Once you have built a viewer.exe do this to
|
||||
run it under the debugger:</LI>
|
||||
</UL>
|
||||
|
||||
<UL>
|
||||
<UL>
|
||||
<LI>
|
||||
cd mozilla\dist\win32_[OD].obj\bin</LI>
|
||||
|
||||
<LI>
|
||||
msdev viewer.exe</LI>
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
<HR WIDTH="100%">
|
||||
<CENTER><FONT SIZE=-1>Copyright © 1998 <A HREF="http://home.netscape.com/misc/contact_info.html">Netscape
|
||||
Communications Corporation</A></FONT></CENTER>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
10
mozilla/aclocal.m4
vendored
Normal file
10
mozilla/aclocal.m4
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
dnl
|
||||
dnl Local autoconf macros used with mozilla
|
||||
dnl The contents of this file are under the Public Domain.
|
||||
dnl
|
||||
|
||||
builtin(include, build/autoconf/glib.m4)dnl
|
||||
builtin(include, build/autoconf/gtk.m4)dnl
|
||||
builtin(include, build/autoconf/libIDL.m4)dnl
|
||||
builtin(include, build/autoconf/altoptions.m4)dnl
|
||||
|
||||
493
mozilla/allmakefiles.sh
Executable file
493
mozilla/allmakefiles.sh
Executable file
@@ -0,0 +1,493 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1999 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
# allmakefiles.sh - List of all makefiles.
|
||||
# Appends the list of makefiles to the variable, MAKEFILES.
|
||||
# There is no need to rerun autoconf after adding makefiles.
|
||||
# You only need to run configure.
|
||||
#
|
||||
# Unused makefiles may be commented out with '#'.
|
||||
# ('#' must be the first character on the line).
|
||||
|
||||
# add_makefiles - Shell function to add makefiles to MAKEFILES
|
||||
add_makefiles() {
|
||||
while read line; do
|
||||
case $line in
|
||||
\#*|dnl*) ;;
|
||||
*) MAKEFILES="$MAKEFILES $line" ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
if [ -z "${srcdir}" ]; then
|
||||
srcdir=.
|
||||
fi
|
||||
|
||||
add_makefiles <<END_NGMAKEFILES
|
||||
Makefile
|
||||
build/Makefile
|
||||
build/unix/Makefile
|
||||
build/unix/nspr_my_config.mk
|
||||
build/unix/nspr_my_overrides.mk
|
||||
build/package/rpm/mozilla.spec
|
||||
build/package/rpm/nspr-pthreads.spec
|
||||
config/Makefile
|
||||
config/autoconf.mk
|
||||
config/mkdepend/Makefile
|
||||
config/mkdetect/Makefile
|
||||
dbm/Makefile
|
||||
dbm/include/Makefile
|
||||
dbm/src/Makefile
|
||||
dbm/tests/Makefile
|
||||
dom/Makefile
|
||||
dom/public/Makefile
|
||||
dom/public/base/Makefile
|
||||
dom/public/coreDom/Makefile
|
||||
dom/public/coreEvents/Makefile
|
||||
dom/public/css/Makefile
|
||||
dom/public/events/Makefile
|
||||
dom/public/range/Makefile
|
||||
dom/public/html/Makefile
|
||||
dom/src/Makefile
|
||||
dom/src/base/Makefile
|
||||
dom/src/build/Makefile
|
||||
dom/src/coreDOM/Makefile
|
||||
dom/src/css/Makefile
|
||||
dom/src/events/Makefile
|
||||
dom/src/range/Makefile
|
||||
dom/src/html/Makefile
|
||||
dom/src/jsurl/Makefile
|
||||
dom/tools/Makefile
|
||||
editor/Makefile
|
||||
editor/public/Makefile
|
||||
editor/idl/Makefile
|
||||
editor/txmgr/Makefile
|
||||
editor/txmgr/public/Makefile
|
||||
editor/txmgr/src/Makefile
|
||||
editor/txmgr/tests/Makefile
|
||||
editor/txtsvc/Makefile
|
||||
editor/txtsvc/public/Makefile
|
||||
editor/txtsvc/src/Makefile
|
||||
expat/Makefile
|
||||
expat/xmlparse/Makefile
|
||||
expat/xmltok/Makefile
|
||||
extensions/Makefile
|
||||
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
|
||||
extensions/pics/Makefile
|
||||
extensions/pics/public/Makefile
|
||||
extensions/pics/src/Makefile
|
||||
extensions/pics/tests/Makefile
|
||||
gfx/Makefile
|
||||
gfx/public/Makefile
|
||||
gfx/src/Makefile
|
||||
gfx/src/beos/Makefile
|
||||
gfx/src/gtk/Makefile
|
||||
gfx/src/ps/Makefile
|
||||
gfx/src/motif/Makefile
|
||||
gfx/src/photon/Makefile
|
||||
gfx/src/rhapsody/Makefile
|
||||
gfx/src/xlib/Makefile
|
||||
gfx/src/xlibrgb/Makefile
|
||||
gfx/tests/Makefile
|
||||
htmlparser/Makefile
|
||||
htmlparser/robot/Makefile
|
||||
htmlparser/src/Makefile
|
||||
htmlparser/tests/Makefile
|
||||
htmlparser/tests/grabpage/Makefile
|
||||
htmlparser/tests/logparse/Makefile
|
||||
include/Makefile
|
||||
intl/Makefile
|
||||
intl/chardet/Makefile
|
||||
intl/chardet/public/Makefile
|
||||
intl/chardet/src/Makefile
|
||||
intl/uconv/Makefile
|
||||
intl/uconv/public/Makefile
|
||||
intl/uconv/src/Makefile
|
||||
intl/uconv/tests/Makefile
|
||||
intl/uconv/ucvja/Makefile
|
||||
intl/uconv/ucvlatin/Makefile
|
||||
intl/uconv/ucvja2/Makefile
|
||||
intl/uconv/ucvcn/Makefile
|
||||
intl/uconv/ucvtw/Makefile
|
||||
intl/uconv/ucvtw2/Makefile
|
||||
intl/uconv/ucvko/Makefile
|
||||
intl/locale/Makefile
|
||||
intl/locale/public/Makefile
|
||||
intl/locale/src/Makefile
|
||||
intl/locale/src/unix/Makefile
|
||||
intl/locale/tests/Makefile
|
||||
intl/lwbrk/Makefile
|
||||
intl/lwbrk/src/Makefile
|
||||
intl/lwbrk/public/Makefile
|
||||
intl/lwbrk/tests/Makefile
|
||||
intl/unicharutil/Makefile
|
||||
intl/unicharutil/src/Makefile
|
||||
intl/unicharutil/public/Makefile
|
||||
intl/unicharutil/tests/Makefile
|
||||
intl/unicharutil/tools/Makefile
|
||||
intl/strres/Makefile
|
||||
intl/strres/public/Makefile
|
||||
intl/strres/src/Makefile
|
||||
intl/strres/tests/Makefile
|
||||
jpeg/Makefile
|
||||
js/Makefile
|
||||
#js/jsd/Makefile
|
||||
#js/jsd/classes/Makefile
|
||||
js/src/Makefile
|
||||
js/src/fdlibm/Makefile
|
||||
js/src/liveconnect/Makefile
|
||||
js/src/liveconnect/classes/Makefile
|
||||
# js/src/xpcom/Makefile
|
||||
js/src/xpconnect/Makefile
|
||||
js/src/xpconnect/public/Makefile
|
||||
js/src/xpconnect/idl/Makefile
|
||||
js/src/xpconnect/shell/Makefile
|
||||
js/src/xpconnect/src/Makefile
|
||||
js/src/xpconnect/tests/Makefile
|
||||
js/src/xpconnect/tests/components/Makefile
|
||||
js/src/xpconnect/shell/Makefile
|
||||
# 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
|
||||
layout/base/src/Makefile
|
||||
layout/base/tests/Makefile
|
||||
layout/build/Makefile
|
||||
layout/events/Makefile
|
||||
layout/events/public/Makefile
|
||||
layout/events/src/Makefile
|
||||
layout/html/Makefile
|
||||
layout/html/base/Makefile
|
||||
layout/html/base/src/Makefile
|
||||
layout/html/content/Makefile
|
||||
layout/html/content/public/Makefile
|
||||
layout/html/content/src/Makefile
|
||||
layout/html/document/Makefile
|
||||
layout/html/document/public/Makefile
|
||||
layout/html/document/src/Makefile
|
||||
layout/html/forms/Makefile
|
||||
layout/html/forms/public/Makefile
|
||||
layout/html/forms/src/Makefile
|
||||
layout/html/style/Makefile
|
||||
layout/html/style/public/Makefile
|
||||
layout/html/style/src/Makefile
|
||||
layout/html/table/Makefile
|
||||
layout/html/table/public/Makefile
|
||||
layout/html/table/src/Makefile
|
||||
layout/html/tests/Makefile
|
||||
layout/tools/Makefile
|
||||
layout/xml/Makefile
|
||||
layout/xml/content/Makefile
|
||||
layout/xml/content/public/Makefile
|
||||
layout/xml/content/src/Makefile
|
||||
layout/xml/document/Makefile
|
||||
layout/xml/document/public/Makefile
|
||||
layout/xml/document/src/Makefile
|
||||
layout/xul/Makefile
|
||||
layout/xul/base/Makefile
|
||||
layout/xul/base/src/Makefile
|
||||
layout/xul/content/Makefile
|
||||
layout/xul/content/src/Makefile
|
||||
# lib/liblayer/Makefile
|
||||
# lib/liblayer/include/Makefile
|
||||
# lib/liblayer/src/Makefile
|
||||
lib/libpwcac/Makefile
|
||||
lib/xp/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
|
||||
modules/libjar/Makefile
|
||||
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
|
||||
modules/libutil/Makefile
|
||||
modules/libutil/public/Makefile
|
||||
modules/libutil/src/Makefile
|
||||
modules/oji/Makefile
|
||||
modules/oji/public/Makefile
|
||||
modules/oji/src/Makefile
|
||||
modules/plugin/Makefile
|
||||
modules/plugin/nglsrc/Makefile
|
||||
modules/plugin/public/Makefile
|
||||
modules/plugin/src/Makefile
|
||||
modules/plugin/test/Makefile
|
||||
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
|
||||
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
|
||||
profile/Makefile
|
||||
profile/src/Makefile
|
||||
profile/public/Makefile
|
||||
profile/resources/Makefile
|
||||
profile/defaults/Makefile
|
||||
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
|
||||
rdf/chrome/src/Makefile
|
||||
rdf/util/Makefile
|
||||
rdf/util/public/Makefile
|
||||
rdf/util/src/Makefile
|
||||
rdf/resources/Makefile
|
||||
rdf/build/Makefile
|
||||
rdf/content/Makefile
|
||||
rdf/content/public/Makefile
|
||||
rdf/content/src/Makefile
|
||||
rdf/datasource/Makefile
|
||||
rdf/datasource/public/Makefile
|
||||
rdf/datasource/src/Makefile
|
||||
rdf/tests/Makefile
|
||||
rdf/tests/domds/Makefile
|
||||
rdf/tests/domds/resources/Makefile
|
||||
rdf/tests/localfile/Makefile
|
||||
rdf/tests/rdfsink/Makefile
|
||||
rdf/tests/rdfcat/Makefile
|
||||
rdf/tests/rdfpoll/Makefile
|
||||
sun-java/Makefile
|
||||
sun-java/stubs/Makefile
|
||||
sun-java/stubs/include/Makefile
|
||||
sun-java/stubs/jri/Makefile
|
||||
sun-java/stubs/src/Makefile
|
||||
caps/Makefile
|
||||
caps/include/Makefile
|
||||
caps/public/Makefile
|
||||
caps/src/Makefile
|
||||
view/Makefile
|
||||
view/public/Makefile
|
||||
view/src/Makefile
|
||||
webshell/Makefile
|
||||
webshell/public/Makefile
|
||||
webshell/src/Makefile
|
||||
webshell/tests/Makefile
|
||||
webshell/tests/viewer/Makefile
|
||||
webshell/tests/viewer/public/Makefile
|
||||
webshell/embed/Makefile
|
||||
widget/Makefile
|
||||
widget/public/Makefile
|
||||
widget/src/Makefile
|
||||
widget/src/beos/Makefile
|
||||
widget/src/build/Makefile
|
||||
widget/src/gtk/Makefile
|
||||
widget/src/motif/Makefile
|
||||
widget/src/photon/Makefile
|
||||
widget/src/rhapsody/Makefile
|
||||
widget/src/xlib/Makefile
|
||||
widget/src/xpwidgets/Makefile
|
||||
widget/tests/Makefile
|
||||
widget/tests/scribble/Makefile
|
||||
widget/tests/widget/Makefile
|
||||
#
|
||||
# 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
|
||||
xpcom/typelib/xpt/Makefile
|
||||
xpcom/typelib/xpt/public/Makefile
|
||||
xpcom/typelib/xpt/src/Makefile
|
||||
xpcom/typelib/xpt/tests/Makefile
|
||||
xpcom/typelib/xpt/tools/Makefile
|
||||
xpcom/typelib/xpidl/Makefile
|
||||
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/test/Makefile
|
||||
xpcom/reflect/xptcall/src/md/unix/Makefile
|
||||
xpcom/reflect/xptcall/tests/Makefile
|
||||
xpcom/reflect/xptinfo/Makefile
|
||||
xpcom/reflect/xptinfo/public/Makefile
|
||||
xpcom/reflect/xptinfo/src/Makefile
|
||||
xpcom/reflect/xptinfo/tests/Makefile
|
||||
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
|
||||
#
|
||||
# End of xpcom Makefiles
|
||||
#
|
||||
silentdl/Makefile
|
||||
xpinstall/Makefile
|
||||
xpinstall/public/Makefile
|
||||
xpinstall/res/Makefile
|
||||
xpinstall/src/Makefile
|
||||
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
|
||||
xpfe/browser/samples/Makefile
|
||||
xpfe/browser/samples/sampleimages/Makefile
|
||||
xpfe/components/Makefile
|
||||
xpfe/components/public/Makefile
|
||||
xpfe/components/sample/Makefile
|
||||
xpfe/components/sample/public/Makefile
|
||||
xpfe/components/sample/src/Makefile
|
||||
xpfe/components/sample/resources/Makefile
|
||||
xpfe/components/bookmarks/Makefile
|
||||
xpfe/components/bookmarks/public/Makefile
|
||||
xpfe/components/bookmarks/src/Makefile
|
||||
xpfe/components/bookmarks/resources/Makefile
|
||||
xpfe/components/find/Makefile
|
||||
xpfe/components/find/public/Makefile
|
||||
xpfe/components/find/src/Makefile
|
||||
xpfe/components/find/resources/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/skin/Makefile
|
||||
xpfe/components/related/Makefile
|
||||
xpfe/components/related/src/Makefile
|
||||
xpfe/components/related/public/Makefile
|
||||
xpfe/components/related/resources/Makefile
|
||||
xpfe/components/xfer/Makefile
|
||||
xpfe/components/xfer/public/Makefile
|
||||
xpfe/components/xfer/src/Makefile
|
||||
xpfe/components/xfer/resources/Makefile
|
||||
xpfe/components/ucth/Makefile
|
||||
xpfe/components/ucth/public/Makefile
|
||||
xpfe/components/ucth/src/Makefile
|
||||
xpfe/components/ucth/resources/Makefile
|
||||
xpfe/appshell/Makefile
|
||||
xpfe/appshell/src/Makefile
|
||||
xpfe/appshell/public/Makefile
|
||||
xpfe/bootstrap/Makefile
|
||||
xpfe/browser/Makefile
|
||||
xpfe/browser/src/Makefile
|
||||
xpfe/browser/resources/Makefile
|
||||
xpfe/browser/resources/content/Makefile
|
||||
xpfe/browser/resources/skin/Makefile
|
||||
|
||||
# xpfe/browser/public/Makefile
|
||||
END_NGMAKEFILES
|
||||
|
||||
if [ "$MOZ_EDITOR" ]; then
|
||||
add_makefiles <<END_EDITOR_MAKEFILES
|
||||
editor/base/Makefile
|
||||
editor/ui/Makefile
|
||||
editor/ui/composer/Makefile
|
||||
editor/ui/composer/content/Makefile
|
||||
editor/ui/composer/skin/Makefile
|
||||
editor/ui/dialogs/Makefile
|
||||
editor/ui/dialogs/content/Makefile
|
||||
editor/ui/dialogs/skin/Makefile
|
||||
|
||||
END_EDITOR_MAKEFILES
|
||||
fi
|
||||
|
||||
if [ "$MOZ_MAIL_NEWS" ]; then
|
||||
add_makefiles < ${srcdir}/mailnews/makefiles
|
||||
fi
|
||||
|
||||
if [ "$NECKO" ]; then
|
||||
add_makefiles < ${srcdir}/netwerk/makefiles
|
||||
add_makefiles <<END_NECKO_MAKEFILES
|
||||
extensions/cookie/Makefile
|
||||
extensions/cookie/tests/Makefile
|
||||
htmlparser/robot/test/Makefile
|
||||
END_NECKO_MAKEFILES
|
||||
fi
|
||||
34
mozilla/build/Makefile.in
Normal file
34
mozilla/build/Makefile.in
Normal file
@@ -0,0 +1,34 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "License"); you may not use this file except in
|
||||
# compliance with the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Mozilla Communicator client code,
|
||||
# released March 31, 1998.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape Communications
|
||||
# Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = ..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = unix
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
||||
144
mozilla/build/autoconf/acoutput-fast.pl
Executable file
144
mozilla/build/autoconf/acoutput-fast.pl
Executable file
@@ -0,0 +1,144 @@
|
||||
#! /usr/bin/env perl
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1999 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
# acoutput-fast.pl - Quickly create makefiles that are in a common format.
|
||||
#
|
||||
# Most of the makefiles in mozilla only refer to two configure variables:
|
||||
# @srcdir@
|
||||
# @top_srcdir@
|
||||
# However, configure does not know any better and it runs sed on each file
|
||||
# with over 150 replacement rules (slow as molasses).
|
||||
#
|
||||
# This script takes a list of makefiles as input. For example,
|
||||
#
|
||||
# echo $MAKEFILES | acoutput-fast.pl
|
||||
#
|
||||
# The script creates each Makefile that only references @srcdir@ and
|
||||
# @top_srcdir@. For other files, it lists them in a shell command that is
|
||||
# printed to stdout:
|
||||
#
|
||||
# CONFIG_FILES="unhandled_files..."; export CONFIG_FILES
|
||||
#
|
||||
# This command can be used to have config.status create the unhandled
|
||||
# files. For example,
|
||||
#
|
||||
# eval "echo $MAKEFILES | acoutput-fast.pl"
|
||||
# AC_OUTPUT($MAKEFILES)
|
||||
#
|
||||
# Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
|
||||
|
||||
#use File::Basename;
|
||||
sub dirname {
|
||||
my $dir = $_[0];
|
||||
return '.' if not $dir =~ m%/%;
|
||||
$dir =~ s%/[^/][^/]*$%%;
|
||||
return $dir;
|
||||
}
|
||||
|
||||
$ac_given_srcdir = $0;
|
||||
$ac_given_srcdir =~ s|/?build/autoconf/.*$||;
|
||||
$ac_given_srcdir = '.' if $ac_given_srcdir eq '';
|
||||
|
||||
# Read list of makefiles from the stdin or,
|
||||
# from files listed on the command-line.
|
||||
#
|
||||
@makefiles=();
|
||||
push @makefiles, split while (<>);
|
||||
|
||||
# Create all the directories at once.
|
||||
# This can be much faster than calling mkdir() for each one.
|
||||
@dirs_to_create = ();
|
||||
%have_seen = ();
|
||||
foreach $ac_file (@makefiles) {
|
||||
next if $ac_file =~ /:/;
|
||||
$ac_dir = dirname($ac_file);
|
||||
next if defined($have_seen{$ac_dir});
|
||||
push @dirs_to_create, $ac_dir if not -d $ac_dir;
|
||||
$have_seen{$ac_dir} = 1;
|
||||
}
|
||||
system "mkdir ".join(' ',@dirs_to_create) if $#dirs_to_create >= 0;
|
||||
|
||||
# Output the makefiles.
|
||||
#
|
||||
@unhandled=();
|
||||
foreach $ac_file (@makefiles) {
|
||||
if (not $ac_file =~ /Makefile$/ or $ac_file =~ /:/) {
|
||||
push @unhandled, $ac_file;
|
||||
next;
|
||||
}
|
||||
$ac_file_in = "$ac_given_srcdir/$ac_file.in";
|
||||
$ac_dir = dirname($ac_file);
|
||||
if ($ac_dir eq '.') {
|
||||
$ac_dir_suffix = '';
|
||||
$ac_dots = '';
|
||||
} else {
|
||||
$ac_dir_suffix = "/$ac_dir";
|
||||
$ac_dir_suffix =~ s%^/\./%/%;
|
||||
$ac_dots = $ac_dir_suffix;
|
||||
$ac_dots =~ s%/[^/]*%../%g;
|
||||
}
|
||||
if ($ac_given_srcdir eq '.') {
|
||||
$srcdir = '.';
|
||||
if ($ac_dots eq '') {
|
||||
$top_srcdir = '.'
|
||||
} else {
|
||||
$top_srcdir = $ac_dots;
|
||||
$top_srcdir =~ s%/$%%;
|
||||
}
|
||||
} elsif ($ac_given_srcdir =~ m%^/%) {
|
||||
$srcdir = "$ac_given_srcdir$ac_dir_suffix";
|
||||
$top_srcdir = "$ac_given_srcdir";
|
||||
} else {
|
||||
$srcdir = "$ac_dots$ac_given_srcdir$ac_dir_suffix";
|
||||
$top_srcdir = "$ac_dots$ac_given_srcdir";
|
||||
}
|
||||
|
||||
# mkdir $subdir, 0777 if not -d $subdir;
|
||||
|
||||
print STDERR "creating $ac_file\n";
|
||||
|
||||
open (INFILE, "<$ac_file_in")
|
||||
or ( warn "can't read $ac_file_in: No such file or directory\n" and next);
|
||||
open (OUTFILE, ">$ac_file")
|
||||
or ( warn "Unable to create $ac_file\n" and next);
|
||||
|
||||
while (<INFILE>) {
|
||||
if (/\@[_a-zA-Z]*\@.*\@[_a-zA-Z]*\@/) {
|
||||
#warn "Two defines on a line:$ac_file:$.:$_";
|
||||
push @unhandled, $ac_file;
|
||||
last;
|
||||
}
|
||||
|
||||
s/\@srcdir\@/$srcdir/;
|
||||
s/\@top_srcdir\@/$top_srcdir/;
|
||||
|
||||
if (/\@[_a-zA-Z]*\@/) {
|
||||
#warn "Unknown variable:$ac_file:$.:$_";
|
||||
push @unhandled, $ac_file;
|
||||
last;
|
||||
}
|
||||
print OUTFILE;
|
||||
}
|
||||
close INFILE;
|
||||
close OUTFILE;
|
||||
}
|
||||
|
||||
# Print the shell command to be evaluated by configure.
|
||||
#
|
||||
print "CONFIG_FILES=\"".join(' ', @unhandled)."\"; export CONFIG_FILES\n";
|
||||
|
||||
103
mozilla/build/autoconf/altoptions.m4
Normal file
103
mozilla/build/autoconf/altoptions.m4
Normal file
@@ -0,0 +1,103 @@
|
||||
dnl The contents of this file are subject to the Netscape Public License
|
||||
dnl Version 1.0 (the "NPL"); you may not use this file except in
|
||||
dnl compliance with the NPL. You may obtain a copy of the NPL at
|
||||
dnl http://www.mozilla.org/NPL/
|
||||
dnl
|
||||
dnl Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
dnl WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
dnl for the specific language governing rights and limitations under the
|
||||
dnl NPL.
|
||||
dnl
|
||||
dnl The Initial Developer of this code under the NPL is Netscape
|
||||
dnl Communications Corporation. Portions created by Netscape are
|
||||
dnl Copyright (C) 1999 Netscape Communications Corporation. All Rights
|
||||
dnl Reserved.
|
||||
dnl
|
||||
|
||||
dnl altoptions.m4 - An alternative way of specifying command-line options.
|
||||
dnl These macros are needed to support a menu-based configurator.
|
||||
dnl This file also includes the macro, AM_READ_MYCONFIG, for reading
|
||||
dnl the 'myconfig.m4' file.
|
||||
|
||||
dnl Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
|
||||
|
||||
|
||||
dnl MOZ_ARG_ENABLE_BOOL( NAME, HELP, IF-YES [, IF-NO [, ELSE]])
|
||||
dnl MOZ_ARG_DISABLE_BOOL( NAME, HELP, IF-NO [, IF-YES [, ELSE]])
|
||||
dnl MOZ_ARG_ENABLE_STRING( NAME, HELP, IF-SET [, ELSE])
|
||||
dnl MOZ_ARG_ENABLE_BOOL_OR_STRING( NAME, HELP, IF-YES, IF-NO, IF-SET[, ELSE]]])
|
||||
dnl MOZ_ARG_WITH_BOOL( NAME, HELP, IF-YES [, IF-NO [, ELSE])
|
||||
dnl MOZ_ARG_WITHOUT_BOOL( NAME, HELP, IF-NO [, IF-YES [, ELSE])
|
||||
dnl MOZ_ARG_WITH_STRING( NAME, HELP, IF-SET [, ELSE])
|
||||
dnl MOZ_ARG_HEADER(Comment)
|
||||
dnl MOZ_READ_MYCONFIG() - Read in 'myconfig.sh' file
|
||||
|
||||
|
||||
dnl MOZ_TWO_STRING_TEST(NAME, STR1, IF-STR1, STR2, IF-STR2 [, ELSE])
|
||||
AC_DEFUN(MOZ_TWO_STRING_TEST,
|
||||
[if test "$enableval" = "[$2]"; then
|
||||
ifelse([$3], , :, [$3])
|
||||
elif test "$enableval" = "[$4]"; then
|
||||
ifelse([$5], , :, [$5])
|
||||
else
|
||||
ifelse([$6], ,
|
||||
[AC_MSG_ERROR([Option, [$1], does not take an argument ($enableval).])],
|
||||
[$6])
|
||||
fi])
|
||||
|
||||
dnl MOZ_ARG_ENABLE_BOOL(NAME, HELP, IF-YES [, IF-NO [, ELSE]])
|
||||
AC_DEFUN(MOZ_ARG_ENABLE_BOOL,
|
||||
[AC_ARG_ENABLE([$1], [$2],
|
||||
[MOZ_TWO_STRING_TEST([$1], yes, [$3], no, [$4])],
|
||||
[$5])])
|
||||
|
||||
dnl MOZ_ARG_DISABLE_BOOL(NAME, HELP, IF-NO [, IF-YES [, ELSE]])
|
||||
AC_DEFUN(MOZ_ARG_DISABLE_BOOL,
|
||||
[AC_ARG_ENABLE([$1], [$2],
|
||||
[MOZ_TWO_STRING_TEST([$1], no, [$3], yes, [$4])],
|
||||
[$5])])
|
||||
|
||||
dnl MOZ_ARG_ENABLE_STRING(NAME, HELP, IF-SET [, ELSE])
|
||||
AC_DEFUN(MOZ_ARG_ENABLE_STRING,
|
||||
[AC_ARG_ENABLE([$1], [$2], [$3], [$4])])
|
||||
|
||||
dnl MOZ_ARG_ENABLE_BOOL_OR_STRING(NAME, HELP, IF-YES, IF-NO, IF-SET[, ELSE]]])
|
||||
AC_DEFUN(MOZ_ARG_ENABLE_BOOL_OR_STRING,
|
||||
[ifelse([$5], ,
|
||||
[errprint([Option, $1, needs an "IF-SET" argument.
|
||||
])
|
||||
m4exit(1)],
|
||||
[AC_ARG_ENABLE([$1], [$2],
|
||||
[MOZ_TWO_STRING_TEST([$1], yes, [$3], no, [$4], [$5])],
|
||||
[$6])])])
|
||||
|
||||
dnl MOZ_ARG_WITH_BOOL(NAME, HELP, IF-YES [, IF-NO [, ELSE])
|
||||
AC_DEFUN(MOZ_ARG_WITH_BOOL,
|
||||
[AC_ARG_WITH([$1], [$2],
|
||||
[MOZ_TWO_STRING_TEST([$1], yes, [$3], no, [$4])],
|
||||
[$5])])
|
||||
|
||||
dnl MOZ_ARG_WITHOUT_BOOL(NAME, HELP, IF-NO [, IF-YES [, ELSE])
|
||||
AC_DEFUN(MOZ_ARG_WITHOUT_BOOL,
|
||||
[AC_ARG_WITH([$1], [$2],
|
||||
[MOZ_TWO_STRING_TEST([$1], no, [$3], yes, [$4])],
|
||||
[$5])])
|
||||
|
||||
dnl MOZ_ARG_WITH_STRING(NAME, HELP, IF-SET [, ELSE])
|
||||
AC_DEFUN(MOZ_ARG_WITH_STRING,
|
||||
[AC_ARG_WITH([$1], [$2], [$3], [$4])])
|
||||
|
||||
dnl MOZ_ARG_HEADER(Comment)
|
||||
dnl This is used by webconfig to group options
|
||||
define(MOZ_ARG_HEADER, [# $1])
|
||||
|
||||
dnl MOZ_READ_MYCONFIG() - Read in 'myconfig.sh' file
|
||||
AC_DEFUN(MOZ_READ_MOZCONFIG,
|
||||
[AC_REQUIRE([AC_INIT_BINSH])dnl
|
||||
# Read in '.mozconfig' script to set the initial options.
|
||||
# See the load-mozconfig.sh script for more details.
|
||||
_topsrcdir=`dirname [$]0`
|
||||
. $_topsrcdir/build/autoconf/load-mozconfig.sh])
|
||||
|
||||
dnl This gets inserted at the top of the configure script
|
||||
MOZ_READ_MOZCONFIG
|
||||
55
mozilla/build/autoconf/clean-config.sh
Executable file
55
mozilla/build/autoconf/clean-config.sh
Executable file
@@ -0,0 +1,55 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
# clean-config.sh - Removes all files generated by mozilla configure.
|
||||
# Only removes files from the topsrcdir. To clean up an objdir,
|
||||
# simply remove the directory and start over.
|
||||
#
|
||||
# Usage:
|
||||
# 1. cd <topsrcdir>
|
||||
# 2. build/autoconf/clean-config.sh
|
||||
#
|
||||
# Send comments, improvements, bugs to slamm@netscape.com
|
||||
|
||||
topsrcdir=`cd \`dirname $0\`/../..; pwd`
|
||||
|
||||
if [ ! -f configure.in ]; then
|
||||
echo "clean-config.sh only cleans the source tree. To run," 2>&1
|
||||
echo " cd $topsrcdir; build/autoconf/clean-config.sh" 2>&1
|
||||
echo " (To clean a separate objdir, simple remove the directory.)" 2>&1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f mailnews/makefiles ]; then
|
||||
MOZ_MAIL_NEWS=1
|
||||
export MOZ_MAIL_NEWS
|
||||
fi
|
||||
|
||||
if [ -d editor ]; then
|
||||
MOZ_EDITOR=1
|
||||
export MOZ_EDITOR
|
||||
fi
|
||||
|
||||
. allmakefiles.sh
|
||||
|
||||
rm -fr $MAKEFILES \
|
||||
config-defs.h \
|
||||
config.cache \
|
||||
config.log \
|
||||
config.status \
|
||||
$NULL
|
||||
906
mozilla/build/autoconf/config.guess
vendored
Executable file
906
mozilla/build/autoconf/config.guess
vendored
Executable file
@@ -0,0 +1,906 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Written by Per Bothner <bothner@cygnus.com>.
|
||||
# The master version of this file is at the FSF in /home/gd/gnu/lib.
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
# exits with 0. Otherwise, it exits with 1.
|
||||
#
|
||||
# The plan is that this can be called by configure scripts if you
|
||||
# don't specify an explicit system type (host/target name).
|
||||
#
|
||||
# Only a few systems have been added to this list; please add others
|
||||
# (but try to keep the structure clean).
|
||||
#
|
||||
|
||||
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
||||
# (ghazi@noc.rutgers.edu 8/24/94.)
|
||||
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
|
||||
PATH=$PATH:/.attbin ; export PATH
|
||||
fi
|
||||
|
||||
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
|
||||
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
||||
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||||
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
||||
|
||||
trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
|
||||
|
||||
# Note: order is significant - the case branches are not exclusive.
|
||||
|
||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
alpha:OSF1:*:*)
|
||||
if test $UNAME_RELEASE = "V4.0"; then
|
||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
||||
fi
|
||||
# A Vn.n version is a released version.
|
||||
# A Tn.n version is a released field test version.
|
||||
# A Xn.n version is an unreleased experimental baselevel.
|
||||
# 1.2 uses "1.2" for uname -r.
|
||||
cat <<EOF >dummy.s
|
||||
.globl main
|
||||
.ent main
|
||||
main:
|
||||
.frame \$30,0,\$26,0
|
||||
.prologue 0
|
||||
.long 0x47e03d80 # implver $0
|
||||
lda \$2,259
|
||||
.long 0x47e20c21 # amask $2,$1
|
||||
srl \$1,8,\$2
|
||||
sll \$2,2,\$2
|
||||
sll \$0,3,\$0
|
||||
addl \$1,\$0,\$0
|
||||
addl \$2,\$0,\$0
|
||||
ret \$31,(\$26),1
|
||||
.end main
|
||||
EOF
|
||||
${CC-cc} dummy.s -o dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
./dummy
|
||||
case "$?" in
|
||||
7)
|
||||
UNAME_MACHINE="alpha"
|
||||
;;
|
||||
15)
|
||||
UNAME_MACHINE="alphaev5"
|
||||
;;
|
||||
14)
|
||||
UNAME_MACHINE="alphaev56"
|
||||
;;
|
||||
10)
|
||||
UNAME_MACHINE="alphapca56"
|
||||
;;
|
||||
16)
|
||||
UNAME_MACHINE="alphaev6"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -f dummy.s dummy
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
|
||||
exit 0 ;;
|
||||
21064:Windows_NT:50:3)
|
||||
echo alpha-dec-winnt3.5
|
||||
exit 0 ;;
|
||||
Amiga*:UNIX_System_V:4.0:*)
|
||||
echo m68k-cbm-sysv4
|
||||
exit 0;;
|
||||
amiga:NetBSD:*:*)
|
||||
echo m68k-cbm-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
amiga:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arc64:OpenBSD:*:*)
|
||||
echo mips64el-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hkmips:OpenBSD:*:*)
|
||||
echo mips-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
pmax:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sgi:OpenBSD:*:*)
|
||||
echo mips-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
wgrisc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
exit 0;;
|
||||
arm32:NetBSD:*:*)
|
||||
echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
SR2?01:HI-UX/MPP:*:*)
|
||||
echo hppa1.1-hitachi-hiuxmpp
|
||||
exit 0;;
|
||||
Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
|
||||
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
|
||||
if test "`(/bin/universe) 2>/dev/null`" = att ; then
|
||||
echo pyramid-pyramid-sysv3
|
||||
else
|
||||
echo pyramid-pyramid-bsd
|
||||
fi
|
||||
exit 0 ;;
|
||||
NILE:*:*:dcosx)
|
||||
echo pyramid-pyramid-svr4
|
||||
exit 0 ;;
|
||||
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
|
||||
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
i86pc:SunOS:5.*:*)
|
||||
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
sun4*:SunOS:6*:*)
|
||||
# According to config.sub, this is the proper way to canonicalize
|
||||
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
|
||||
# it's likely to be more like Solaris than SunOS4.
|
||||
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
sun4*:SunOS:*:*)
|
||||
case "`/usr/bin/arch -k`" in
|
||||
Series*|S4*)
|
||||
UNAME_RELEASE=`uname -v`
|
||||
;;
|
||||
esac
|
||||
# Japanese Language versions have a version number like `4.1.3-JL'.
|
||||
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
|
||||
exit 0 ;;
|
||||
sun3*:SunOS:*:*)
|
||||
echo m68k-sun-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun*:*:4.2BSD:*)
|
||||
UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
||||
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
|
||||
case "`/bin/arch`" in
|
||||
sun3)
|
||||
echo m68k-sun-sunos${UNAME_RELEASE}
|
||||
;;
|
||||
sun4)
|
||||
echo sparc-sun-sunos${UNAME_RELEASE}
|
||||
;;
|
||||
esac
|
||||
exit 0 ;;
|
||||
aushp:SunOS:*:*)
|
||||
echo sparc-auspex-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:NetBSD:*:*)
|
||||
echo m68k-atari-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:NetBSD:*:*)
|
||||
echo m68k-sun-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:NetBSD:*:*)
|
||||
echo m68k-apple-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme88k:OpenBSD:*:*)
|
||||
echo m88k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
powerpc:machten:*:*)
|
||||
echo powerpc-apple-machten${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
RISC*:Mach:*:*)
|
||||
echo mips-dec-mach_bsd4.3
|
||||
exit 0 ;;
|
||||
RISC*:ULTRIX:*:*)
|
||||
echo mips-dec-ultrix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
VAX*:ULTRIX*:*:*)
|
||||
echo vax-dec-ultrix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
2020:CLIX:*:*)
|
||||
echo clipper-intergraph-clix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mips:*:*:UMIPS | mips:*:*:RISCos)
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
int main (argc, argv) int argc; char **argv; {
|
||||
#if defined (host_mips) && defined (MIPSEB)
|
||||
#if defined (SYSTYPE_SYSV)
|
||||
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
|
||||
#endif
|
||||
#if defined (SYSTYPE_SVR4)
|
||||
printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
|
||||
#endif
|
||||
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
|
||||
printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
exit (-1);
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy \
|
||||
&& ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||
&& rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
echo mips-mips-riscos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Night_Hawk:Power_UNIX:*:*)
|
||||
echo powerpc-harris-powerunix
|
||||
exit 0 ;;
|
||||
m88k:CX/UX:7*:*)
|
||||
echo m88k-harris-cxux7
|
||||
exit 0 ;;
|
||||
m88k:*:4*:R4*)
|
||||
echo m88k-motorola-sysv4
|
||||
exit 0 ;;
|
||||
m88k:*:3*:R3*)
|
||||
echo m88k-motorola-sysv3
|
||||
exit 0 ;;
|
||||
AViiON:dgux:*:*)
|
||||
# DG/UX returns AViiON for all architectures
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
|
||||
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
|
||||
-o ${TARGET_BINARY_INTERFACE}x = x ] ; then
|
||||
echo m88k-dg-dgux${UNAME_RELEASE}
|
||||
else
|
||||
echo m88k-dg-dguxbcs${UNAME_RELEASE}
|
||||
fi
|
||||
else echo i586-dg-dgux${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
|
||||
echo m88k-dolphin-sysv3
|
||||
exit 0 ;;
|
||||
M88*:*:R3*:*)
|
||||
# Delta 88k system running SVR3
|
||||
echo m88k-motorola-sysv3
|
||||
exit 0 ;;
|
||||
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
|
||||
echo m88k-tektronix-sysv3
|
||||
exit 0 ;;
|
||||
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
|
||||
echo m68k-tektronix-bsd
|
||||
exit 0 ;;
|
||||
*:IRIX*:*:*)
|
||||
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
|
||||
exit 0 ;;
|
||||
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
|
||||
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
|
||||
exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
|
||||
i?86:AIX:*:*)
|
||||
echo i386-ibm-aix
|
||||
exit 0 ;;
|
||||
*:AIX:2:3)
|
||||
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
#include <sys/systemcfg.h>
|
||||
|
||||
main()
|
||||
{
|
||||
if (!__power_pc())
|
||||
exit(1);
|
||||
puts("powerpc-ibm-aix3.2.5");
|
||||
exit(0);
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
echo rs6000-ibm-aix3.2.5
|
||||
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
echo rs6000-ibm-aix3.2.4
|
||||
else
|
||||
echo rs6000-ibm-aix3.2
|
||||
fi
|
||||
exit 0 ;;
|
||||
*:AIX:*:4)
|
||||
if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
|
||||
IBM_ARCH=rs6000
|
||||
else
|
||||
IBM_ARCH=powerpc
|
||||
fi
|
||||
if [ -x /usr/bin/oslevel ] ; then
|
||||
IBM_REV=`/usr/bin/oslevel`
|
||||
else
|
||||
IBM_REV=4.${UNAME_RELEASE}
|
||||
fi
|
||||
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
|
||||
exit 0 ;;
|
||||
*:AIX:*:*)
|
||||
echo rs6000-ibm-aix
|
||||
exit 0 ;;
|
||||
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
|
||||
echo romp-ibm-bsd4.4
|
||||
exit 0 ;;
|
||||
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
|
||||
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
|
||||
exit 0 ;; # report: romp-ibm BSD 4.3
|
||||
*:BOSX:*:*)
|
||||
echo rs6000-bull-bosx
|
||||
exit 0 ;;
|
||||
DPX/2?00:B.O.S.:*:*)
|
||||
echo m68k-bull-sysv3
|
||||
exit 0 ;;
|
||||
9000/[34]??:4.3bsd:1.*:*)
|
||||
echo m68k-hp-bsd
|
||||
exit 0 ;;
|
||||
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
|
||||
echo m68k-hp-bsd4.4
|
||||
exit 0 ;;
|
||||
9000/[3478]??:HP-UX:*:*)
|
||||
case "${UNAME_MACHINE}" in
|
||||
9000/31? ) HP_ARCH=m68000 ;;
|
||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||
9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
|
||||
9000/8?? ) HP_ARCH=hppa1.0 ;;
|
||||
esac
|
||||
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
|
||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
3050*:HI-UX:*:*)
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
#include <unistd.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
long cpu = sysconf (_SC_CPU_VERSION);
|
||||
/* The order matters, because CPU_IS_HP_MC68K erroneously returns
|
||||
true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
|
||||
results, however. */
|
||||
if (CPU_IS_PA_RISC (cpu))
|
||||
{
|
||||
switch (cpu)
|
||||
{
|
||||
case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
|
||||
case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
|
||||
case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
|
||||
default: puts ("hppa-hitachi-hiuxwe2"); break;
|
||||
}
|
||||
}
|
||||
else if (CPU_IS_HP_MC68K (cpu))
|
||||
puts ("m68k-hitachi-hiuxwe2");
|
||||
else puts ("unknown-hitachi-hiuxwe2");
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
echo unknown-hitachi-hiuxwe2
|
||||
exit 0 ;;
|
||||
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
|
||||
echo hppa1.1-hp-bsd
|
||||
exit 0 ;;
|
||||
9000/8??:4.3bsd:*:*)
|
||||
echo hppa1.0-hp-bsd
|
||||
exit 0 ;;
|
||||
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
|
||||
echo hppa1.1-hp-osf
|
||||
exit 0 ;;
|
||||
hp8??:OSF1:*:*)
|
||||
echo hppa1.0-hp-osf
|
||||
exit 0 ;;
|
||||
i?86:OSF1:*:*)
|
||||
if [ -x /usr/sbin/sysversion ] ; then
|
||||
echo ${UNAME_MACHINE}-unknown-osf1mk
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-osf1
|
||||
fi
|
||||
exit 0 ;;
|
||||
parisc*:Lites*:*:*)
|
||||
echo hppa1.1-hp-lites
|
||||
exit 0 ;;
|
||||
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
|
||||
echo c1-convex-bsd
|
||||
exit 0 ;;
|
||||
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
|
||||
if getsysinfo -f scalar_acc
|
||||
then echo c32-convex-bsd
|
||||
else echo c2-convex-bsd
|
||||
fi
|
||||
exit 0 ;;
|
||||
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
|
||||
echo c34-convex-bsd
|
||||
exit 0 ;;
|
||||
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
|
||||
echo c38-convex-bsd
|
||||
exit 0 ;;
|
||||
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
|
||||
echo c4-convex-bsd
|
||||
exit 0 ;;
|
||||
CRAY*X-MP:*:*:*)
|
||||
echo xmp-cray-unicos
|
||||
exit 0 ;;
|
||||
CRAY*Y-MP:*:*:*)
|
||||
echo ymp-cray-unicos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
CRAY*[A-Z]90:*:*:*)
|
||||
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
|
||||
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
|
||||
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
|
||||
exit 0 ;;
|
||||
CRAY*TS:*:*:*)
|
||||
echo t90-cray-unicos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
CRAY-2:*:*:*)
|
||||
echo cray2-cray-unicos
|
||||
exit 0 ;;
|
||||
F300:UNIX_System_V:*:*)
|
||||
FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||
echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit 0 ;;
|
||||
F301:UNIX_System_V:*:*)
|
||||
echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
|
||||
exit 0 ;;
|
||||
hp3[0-9][05]:NetBSD:*:*)
|
||||
echo m68k-hp-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hp300:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i?86:BSD/386:*:* | *:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:FreeBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
exit 0 ;;
|
||||
*:NetBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
*:OpenBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin32
|
||||
exit 0 ;;
|
||||
i*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit 0 ;;
|
||||
p*:CYGWIN*:*)
|
||||
echo powerpcle-unknown-cygwin32
|
||||
exit 0 ;;
|
||||
prep*:SunOS:5.*:*)
|
||||
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
*:GNU:*:*)
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
exit 0 ;;
|
||||
*:Linux:*:*)
|
||||
# uname on the ARM produces all sorts of strangeness, and we need to
|
||||
# filter it out.
|
||||
case "$UNAME_MACHINE" in
|
||||
arm* | sa110*) UNAME_MACHINE="arm" ;;
|
||||
esac
|
||||
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us.
|
||||
ld_help_string=`ld --help 2>&1`
|
||||
ld_supported_emulations=`echo $ld_help_string \
|
||||
| sed -ne '/supported emulations:/!d
|
||||
s/[ ][ ]*/ /g
|
||||
s/.*supported emulations: *//
|
||||
s/ .*//
|
||||
p'`
|
||||
case "$ld_supported_emulations" in
|
||||
i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
|
||||
i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
|
||||
sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
|
||||
armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
|
||||
m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
|
||||
elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
|
||||
esac
|
||||
|
||||
if test "${UNAME_MACHINE}" = "alpha" ; then
|
||||
sed 's/^ //' <<EOF >dummy.s
|
||||
.globl main
|
||||
.ent main
|
||||
main:
|
||||
.frame \$30,0,\$26,0
|
||||
.prologue 0
|
||||
.long 0x47e03d80 # implver $0
|
||||
lda \$2,259
|
||||
.long 0x47e20c21 # amask $2,$1
|
||||
srl \$1,8,\$2
|
||||
sll \$2,2,\$2
|
||||
sll \$0,3,\$0
|
||||
addl \$1,\$0,\$0
|
||||
addl \$2,\$0,\$0
|
||||
ret \$31,(\$26),1
|
||||
.end main
|
||||
EOF
|
||||
LIBC=""
|
||||
${CC-cc} dummy.s -o dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
./dummy
|
||||
case "$?" in
|
||||
7)
|
||||
UNAME_MACHINE="alpha"
|
||||
;;
|
||||
15)
|
||||
UNAME_MACHINE="alphaev5"
|
||||
;;
|
||||
14)
|
||||
UNAME_MACHINE="alphaev56"
|
||||
;;
|
||||
10)
|
||||
UNAME_MACHINE="alphapca56"
|
||||
;;
|
||||
16)
|
||||
UNAME_MACHINE="alphaev6"
|
||||
;;
|
||||
esac
|
||||
|
||||
objdump --private-headers dummy | \
|
||||
grep ld.so.1 > /dev/null
|
||||
if test "$?" = 0 ; then
|
||||
LIBC="libc1"
|
||||
fi
|
||||
fi
|
||||
rm -f dummy.s dummy
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
|
||||
elif test "${UNAME_MACHINE}" = "mips" ; then
|
||||
cat >dummy.c <<EOF
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
#ifdef __MIPSEB__
|
||||
printf ("%s-unknown-linux-gnu\n", argv[1]);
|
||||
#endif
|
||||
#ifdef __MIPSEL__
|
||||
printf ("%sel-unknown-linux-gnu\n", argv[1]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
else
|
||||
# Either a pre-BFD a.out linker (linux-gnuoldld)
|
||||
# or one that does not give us useful --help.
|
||||
# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
|
||||
# If ld does not provide *any* "supported emulations:"
|
||||
# that means it is gnuoldld.
|
||||
echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
|
||||
test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
|
||||
|
||||
case "${UNAME_MACHINE}" in
|
||||
i?86)
|
||||
VENDOR=pc;
|
||||
;;
|
||||
*)
|
||||
VENDOR=unknown;
|
||||
;;
|
||||
esac
|
||||
# Determine whether the default compiler is a.out or elf
|
||||
cat >dummy.c <<EOF
|
||||
#include <features.h>
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
#ifdef __ELF__
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
|
||||
# else
|
||||
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
|
||||
# endif
|
||||
# else
|
||||
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
|
||||
# endif
|
||||
#else
|
||||
printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
fi ;;
|
||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
|
||||
# are messed up and put the nodename in both sysname and nodename.
|
||||
i?86:DYNIX/ptx:4*:*)
|
||||
echo i386-sequent-sysv4
|
||||
exit 0 ;;
|
||||
i?86:UNIX_SV:4.2MP:2.*)
|
||||
# Unixware is an offshoot of SVR4, but it has its own version
|
||||
# number series starting with 2...
|
||||
# I am not positive that other SVR4 systems won't match this,
|
||||
# I just have to hope. -- rms.
|
||||
# Use sysv4.2uw... so that sysv4* matches it.
|
||||
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
|
||||
exit 0 ;;
|
||||
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
|
||||
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
||||
echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
|
||||
else
|
||||
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
i?86:*:3.2:*)
|
||||
if test -f /usr/options/cb.name; then
|
||||
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
|
||||
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
|
||||
elif /bin/uname -X 2>/dev/null >/dev/null ; then
|
||||
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
|
||||
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
|
||||
&& UNAME_MACHINE=i586
|
||||
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
|
||||
else
|
||||
echo ${UNAME_MACHINE}-pc-sysv32
|
||||
fi
|
||||
exit 0 ;;
|
||||
pc:*:*:*)
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
# the processor, so we play safe by assuming i386.
|
||||
echo i386-pc-msdosdjgpp
|
||||
exit 0 ;;
|
||||
Intel:Mach:3*:*)
|
||||
echo i386-pc-mach3
|
||||
exit 0 ;;
|
||||
paragon:*:*:*)
|
||||
echo i860-intel-osf1
|
||||
exit 0 ;;
|
||||
i860:*:4.*:*) # i860-SVR4
|
||||
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
|
||||
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
|
||||
else # Add other i860-SVR4 vendors below as they are discovered.
|
||||
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
|
||||
fi
|
||||
exit 0 ;;
|
||||
mini*:CTIX:SYS*5:*)
|
||||
# "miniframe"
|
||||
echo m68010-convergent-sysv
|
||||
exit 0 ;;
|
||||
M68*:*:R3V[567]*:*)
|
||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||
3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
|
||||
OS_REL=''
|
||||
test -r /etc/.relid \
|
||||
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
||||
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& echo i486-ncr-sysv4.3${OS_REL} && exit 0
|
||||
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
|
||||
&& echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
|
||||
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
|
||||
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& echo i486-ncr-sysv4 && exit 0 ;;
|
||||
m68*:LynxOS:2.*:*)
|
||||
echo m68k-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mc68030:UNIX_System_V:4.*:*)
|
||||
echo m68k-atari-sysv4
|
||||
exit 0 ;;
|
||||
i?86:LynxOS:2.*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
TSUNAMI:LynxOS:2.*:*)
|
||||
echo sparc-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
|
||||
echo rs6000-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
SM[BE]S:UNIX_SV:*:*)
|
||||
echo mips-dde-sysv${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
RM*:SINIX-*:*:*)
|
||||
echo mips-sni-sysv4
|
||||
exit 0 ;;
|
||||
*:SINIX-*:*:*)
|
||||
if uname -p 2>/dev/null >/dev/null ; then
|
||||
UNAME_MACHINE=`(uname -p) 2>/dev/null`
|
||||
echo ${UNAME_MACHINE}-sni-sysv4
|
||||
else
|
||||
echo ns32k-sni-sysv
|
||||
fi
|
||||
exit 0 ;;
|
||||
PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||
echo i586-unisys-sysv4
|
||||
exit 0 ;;
|
||||
*:UNIX_System_V:4*:FTX*)
|
||||
# From Gerald Hewes <hewes@openmarket.com>.
|
||||
# How about differentiating between stratus architectures? -djm
|
||||
echo hppa1.1-stratus-sysv4
|
||||
exit 0 ;;
|
||||
*:*:*:FTX*)
|
||||
# From seanf@swdc.stratus.com.
|
||||
echo i860-stratus-sysv4
|
||||
exit 0 ;;
|
||||
*:Rhapsody:*:*)
|
||||
test ! -z "`echo ${UNAME_MACHINE} | grep Power`" && echo ppc-apple-rhapsody${UNAME_RELEASE} && exit 0
|
||||
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mc68*:A/UX:*:*)
|
||||
echo m68k-apple-aux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
news*:NEWS-OS:*:6*)
|
||||
echo mips-sony-newsos6
|
||||
exit 0 ;;
|
||||
R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
|
||||
if [ -d /usr/nec ]; then
|
||||
echo mips-nec-sysv${UNAME_RELEASE}
|
||||
else
|
||||
echo mips-unknown-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
*:QNX:*:*)
|
||||
echo i386-pc-qnx`${UNAME_VERSION} | cut -c1-1`
|
||||
exit 0 ;;
|
||||
BePC:BeOS:*:*)
|
||||
echo i386-pc-beos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
BeMac:BeOS:*:*)
|
||||
echo ppc-apple-beos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
BeBox:BeOS:*:*)
|
||||
echo ppc-be-beos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
|
||||
|
||||
cat >dummy.c <<EOF
|
||||
#ifdef _SEQUENT_
|
||||
# include <sys/types.h>
|
||||
# include <sys/utsname.h>
|
||||
#endif
|
||||
main ()
|
||||
{
|
||||
#if defined (sony)
|
||||
#if defined (MIPSEB)
|
||||
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
|
||||
I don't know.... */
|
||||
printf ("mips-sony-bsd\n"); exit (0);
|
||||
#else
|
||||
#include <sys/param.h>
|
||||
printf ("m68k-sony-newsos%s\n",
|
||||
#ifdef NEWSOS4
|
||||
"4"
|
||||
#else
|
||||
""
|
||||
#endif
|
||||
); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (__arm) && defined (__acorn) && defined (__unix)
|
||||
printf ("arm-acorn-riscix"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (hp300) && !defined (hpux)
|
||||
printf ("m68k-hp-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (NeXT)
|
||||
#if !defined (__ARCHITECTURE__)
|
||||
#define __ARCHITECTURE__ "m68k"
|
||||
#endif
|
||||
int version;
|
||||
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
|
||||
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
|
||||
exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (MULTIMAX) || defined (n16)
|
||||
#if defined (UMAXV)
|
||||
printf ("ns32k-encore-sysv\n"); exit (0);
|
||||
#else
|
||||
#if defined (CMU)
|
||||
printf ("ns32k-encore-mach\n"); exit (0);
|
||||
#else
|
||||
printf ("ns32k-encore-bsd\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (__386BSD__)
|
||||
printf ("i386-pc-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (sequent)
|
||||
#if defined (i386)
|
||||
printf ("i386-sequent-dynix\n"); exit (0);
|
||||
#endif
|
||||
#if defined (ns32000)
|
||||
printf ("ns32k-sequent-dynix\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (_SEQUENT_)
|
||||
struct utsname un;
|
||||
|
||||
uname(&un);
|
||||
|
||||
if (strncmp(un.version, "V2", 2) == 0) {
|
||||
printf ("i386-sequent-ptx2\n"); exit (0);
|
||||
}
|
||||
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
|
||||
printf ("i386-sequent-ptx1\n"); exit (0);
|
||||
}
|
||||
printf ("i386-sequent-ptx\n"); exit (0);
|
||||
|
||||
#endif
|
||||
|
||||
#if defined (vax)
|
||||
#if !defined (ultrix)
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
#else
|
||||
printf ("vax-dec-ultrix\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (alliant) && defined (i860)
|
||||
printf ("i860-alliant-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
exit (1);
|
||||
}
|
||||
EOF
|
||||
|
||||
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
|
||||
# Apollos put the system type in the environment.
|
||||
|
||||
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
|
||||
|
||||
# Convex versions that predate uname can use getsysinfo(1)
|
||||
|
||||
if [ -x /usr/convex/getsysinfo ]
|
||||
then
|
||||
case `getsysinfo -f cpu_type` in
|
||||
c1*)
|
||||
echo c1-convex-bsd
|
||||
exit 0 ;;
|
||||
c2*)
|
||||
if getsysinfo -f scalar_acc
|
||||
then echo c32-convex-bsd
|
||||
else echo c2-convex-bsd
|
||||
fi
|
||||
exit 0 ;;
|
||||
c34*)
|
||||
echo c34-convex-bsd
|
||||
exit 0 ;;
|
||||
c38*)
|
||||
echo c38-convex-bsd
|
||||
exit 0 ;;
|
||||
c4*)
|
||||
echo c4-convex-bsd
|
||||
exit 0 ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
#echo '(Unable to guess system type)' 1>&2
|
||||
|
||||
exit 1
|
||||
981
mozilla/build/autoconf/config.sub
vendored
Executable file
981
mozilla/build/autoconf/config.sub
vendored
Executable file
@@ -0,0 +1,981 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script, version 1.1.
|
||||
# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
# can handle that machine. It does not imply ALL GNU software can.
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||
# Supply the specified configuration type as an argument.
|
||||
# If it is invalid, we print an error message on stderr and exit with code 1.
|
||||
# Otherwise, we print the canonical config type on stdout and succeed.
|
||||
|
||||
# This file is supposed to be the same for all GNU packages
|
||||
# and recognize all the CPU types, system types and aliases
|
||||
# that are meaningful with *any* GNU software.
|
||||
# Each package is responsible for reporting which valid configurations
|
||||
# it does not support. The user should be able to distinguish
|
||||
# a failure to support a valid configuration from a meaningless
|
||||
# configuration.
|
||||
|
||||
# The goal of this file is to map all the various variations of a given
|
||||
# machine specification into a single specification in the form:
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
# or in some cases, the newer four-part form:
|
||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||
# It is wrong to echo any other type of specification.
|
||||
|
||||
if [ x$1 = x ]
|
||||
then
|
||||
echo Configuration name missing. 1>&2
|
||||
echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
|
||||
echo "or $0 ALIAS" 1>&2
|
||||
echo where ALIAS is a recognized configuration type. 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# First pass through any local machine types.
|
||||
case $1 in
|
||||
*local*)
|
||||
echo $1
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
|
||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
linux-gnu*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
*)
|
||||
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
|
||||
if [ $basic_machine != $1 ]
|
||||
then os=`echo $1 | sed 's/.*-/-/'`
|
||||
else os=; fi
|
||||
;;
|
||||
esac
|
||||
|
||||
### Let's recognize common machines as not being operating systems so
|
||||
### that things like config.sub decstation-3100 work. We also
|
||||
### recognize some manufacturers as not being operating systems, so we
|
||||
### can provide default operating systems below.
|
||||
case $os in
|
||||
-sun*os*)
|
||||
# Prevent following clause from handling this invalid input.
|
||||
;;
|
||||
-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
|
||||
-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
|
||||
-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
|
||||
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
||||
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
||||
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
||||
-apple)
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
-hiux*)
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
-sco5)
|
||||
os=sco3.2v5
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco4)
|
||||
os=-sco3.2v4
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco3.2.[4-9]*)
|
||||
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco3.2v[4-9]*)
|
||||
# Don't forget version if it is 3.2v4 or newer.
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco*)
|
||||
os=-sco3.2v2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-isc)
|
||||
os=-isc2.2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-clix*)
|
||||
basic_machine=clipper-intergraph
|
||||
;;
|
||||
-isc*)
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-lynx*)
|
||||
os=-lynxos
|
||||
;;
|
||||
-ptx*)
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
|
||||
;;
|
||||
-windowsnt*)
|
||||
os=`echo $os | sed -e 's/windowsnt/winnt/'`
|
||||
;;
|
||||
-psos*)
|
||||
os=-psos
|
||||
;;
|
||||
-qnx*)
|
||||
basic_machine=i386-pc
|
||||
os=-qnx`uname -v | cut -c1-1`
|
||||
;;
|
||||
-nto*)
|
||||
basic_machine=i386-pc
|
||||
os=-nto
|
||||
;;
|
||||
-rhapsody*)
|
||||
basic_machine=ppc-apple
|
||||
os=-rhapsody`uname -r`
|
||||
;;
|
||||
esac
|
||||
|
||||
# Decode aliases for certain CPU-COMPANY combinations.
|
||||
case $basic_machine in
|
||||
# Recognize the basic CPU types without company name.
|
||||
# Some are omitted here because they have special meanings below.
|
||||
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
|
||||
| arme[lb] | pyramid | mn10200 | mn10300 \
|
||||
| tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
|
||||
| alpha | alphaev5 | alphaev56 | alphapca56 | we32k | ns16k | clipper \
|
||||
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
|
||||
| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
|
||||
| mipstx39 | mipstx39el \
|
||||
| sparc | sparclet | sparclite | sparc64 | v850)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
# (2) the word "unknown" tends to confuse beginning users.
|
||||
i[34567]86)
|
||||
basic_machine=$basic_machine-pc
|
||||
;;
|
||||
# Object if more than one company name word.
|
||||
*-*-*)
|
||||
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
||||
exit 1
|
||||
;;
|
||||
# Recognize the basic CPU types with company name.
|
||||
vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
|
||||
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
|
||||
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
|
||||
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
|
||||
| xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
|
||||
| alpha-* | alphaev5-* | alphaev56-* | alphapca56-* | we32k-* | cydra-* \
|
||||
| ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
|
||||
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
|
||||
| sparc64-* | mips64-* | mipsel-* \
|
||||
| mips64el-* | mips64orion-* | mips64orionel-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| f301-*)
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
|
||||
basic_machine=m68000-att
|
||||
;;
|
||||
3b*)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
alliant | fx80)
|
||||
basic_machine=fx80-alliant
|
||||
;;
|
||||
altos | altos3068)
|
||||
basic_machine=m68k-altos
|
||||
;;
|
||||
am29k)
|
||||
basic_machine=a29k-none
|
||||
os=-bsd
|
||||
;;
|
||||
amdahl)
|
||||
basic_machine=580-amdahl
|
||||
os=-sysv
|
||||
;;
|
||||
amiga | amiga-*)
|
||||
basic_machine=m68k-cbm
|
||||
;;
|
||||
amigaos | amigados)
|
||||
basic_machine=m68k-cbm
|
||||
os=-amigaos
|
||||
;;
|
||||
amigaunix | amix)
|
||||
basic_machine=m68k-cbm
|
||||
os=-sysv4
|
||||
;;
|
||||
apollo68)
|
||||
basic_machine=m68k-apollo
|
||||
os=-sysv
|
||||
;;
|
||||
aux)
|
||||
basic_machine=m68k-apple
|
||||
os=-aux
|
||||
;;
|
||||
balance)
|
||||
basic_machine=ns32k-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
convex-c1)
|
||||
basic_machine=c1-convex
|
||||
os=-bsd
|
||||
;;
|
||||
convex-c2)
|
||||
basic_machine=c2-convex
|
||||
os=-bsd
|
||||
;;
|
||||
convex-c32)
|
||||
basic_machine=c32-convex
|
||||
os=-bsd
|
||||
;;
|
||||
convex-c34)
|
||||
basic_machine=c34-convex
|
||||
os=-bsd
|
||||
;;
|
||||
convex-c38)
|
||||
basic_machine=c38-convex
|
||||
os=-bsd
|
||||
;;
|
||||
cray | ymp)
|
||||
basic_machine=ymp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
cray2)
|
||||
basic_machine=cray2-cray
|
||||
os=-unicos
|
||||
;;
|
||||
[ctj]90-cray)
|
||||
basic_machine=c90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
crds | unos)
|
||||
basic_machine=m68k-crds
|
||||
;;
|
||||
da30 | da30-*)
|
||||
basic_machine=m68k-da30
|
||||
;;
|
||||
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
|
||||
basic_machine=mips-dec
|
||||
;;
|
||||
delta | 3300 | motorola-3300 | motorola-delta \
|
||||
| 3300-motorola | delta-motorola)
|
||||
basic_machine=m68k-motorola
|
||||
;;
|
||||
delta88)
|
||||
basic_machine=m88k-motorola
|
||||
os=-sysv3
|
||||
;;
|
||||
dpx20 | dpx20-*)
|
||||
basic_machine=rs6000-bull
|
||||
os=-bosx
|
||||
;;
|
||||
dpx2* | dpx2*-bull)
|
||||
basic_machine=m68k-bull
|
||||
os=-sysv3
|
||||
;;
|
||||
ebmon29k)
|
||||
basic_machine=a29k-amd
|
||||
os=-ebmon
|
||||
;;
|
||||
elxsi)
|
||||
basic_machine=elxsi-elxsi
|
||||
os=-bsd
|
||||
;;
|
||||
encore | umax | mmax)
|
||||
basic_machine=ns32k-encore
|
||||
;;
|
||||
fx2800)
|
||||
basic_machine=i860-alliant
|
||||
;;
|
||||
genix)
|
||||
basic_machine=ns32k-ns
|
||||
;;
|
||||
gmicro)
|
||||
basic_machine=tron-gmicro
|
||||
os=-sysv
|
||||
;;
|
||||
h3050r* | hiux*)
|
||||
basic_machine=hppa1.1-hitachi
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
h8300hms)
|
||||
basic_machine=h8300-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
harris)
|
||||
basic_machine=m88k-harris
|
||||
os=-sysv3
|
||||
;;
|
||||
hp300-*)
|
||||
basic_machine=m68k-hp
|
||||
;;
|
||||
hp300bsd)
|
||||
basic_machine=m68k-hp
|
||||
os=-bsd
|
||||
;;
|
||||
hp300hpux)
|
||||
basic_machine=m68k-hp
|
||||
os=-hpux
|
||||
;;
|
||||
hp9k2[0-9][0-9] | hp9k31[0-9])
|
||||
basic_machine=m68000-hp
|
||||
;;
|
||||
hp9k3[2-9][0-9])
|
||||
basic_machine=m68k-hp
|
||||
;;
|
||||
hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
|
||||
basic_machine=hppa1.1-hp
|
||||
;;
|
||||
hp9k8[0-9][0-9] | hp8[0-9][0-9])
|
||||
basic_machine=hppa1.0-hp
|
||||
;;
|
||||
hppa-next)
|
||||
os=-nextstep3
|
||||
;;
|
||||
i370-ibm* | ibm*)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
;;
|
||||
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
|
||||
i[34567]86v32)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv32
|
||||
;;
|
||||
i[34567]86v4*)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv4
|
||||
;;
|
||||
i[34567]86v)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv
|
||||
;;
|
||||
i[34567]86sol2)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-solaris2
|
||||
;;
|
||||
iris | iris4d)
|
||||
basic_machine=mips-sgi
|
||||
case $os in
|
||||
-irix*)
|
||||
;;
|
||||
*)
|
||||
os=-irix4
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
isi68 | isi)
|
||||
basic_machine=m68k-isi
|
||||
os=-sysv
|
||||
;;
|
||||
m88k-omron*)
|
||||
basic_machine=m88k-omron
|
||||
;;
|
||||
magnum | m3230)
|
||||
basic_machine=mips-mips
|
||||
os=-sysv
|
||||
;;
|
||||
merlin)
|
||||
basic_machine=ns32k-utek
|
||||
os=-sysv
|
||||
;;
|
||||
miniframe)
|
||||
basic_machine=m68000-convergent
|
||||
;;
|
||||
mipsel*-linux*)
|
||||
basic_machine=mipsel-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
mips*-linux*)
|
||||
basic_machine=mips-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
mips3*-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
||||
;;
|
||||
mips3*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
|
||||
;;
|
||||
ncr3000)
|
||||
basic_machine=i486-ncr
|
||||
os=-sysv4
|
||||
;;
|
||||
news | news700 | news800 | news900)
|
||||
basic_machine=m68k-sony
|
||||
os=-newsos
|
||||
;;
|
||||
news1000)
|
||||
basic_machine=m68030-sony
|
||||
os=-newsos
|
||||
;;
|
||||
news-3600 | risc-news)
|
||||
basic_machine=mips-sony
|
||||
os=-newsos
|
||||
;;
|
||||
next | m*-next )
|
||||
basic_machine=m68k-next
|
||||
case $os in
|
||||
-nextstep* )
|
||||
;;
|
||||
-ns2*)
|
||||
os=-nextstep2
|
||||
;;
|
||||
*)
|
||||
os=-nextstep3
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
nh3000)
|
||||
basic_machine=m68k-harris
|
||||
os=-cxux
|
||||
;;
|
||||
nh[45]000)
|
||||
basic_machine=m88k-harris
|
||||
os=-cxux
|
||||
;;
|
||||
nindy960)
|
||||
basic_machine=i960-intel
|
||||
os=-nindy
|
||||
;;
|
||||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
pa-hitachi)
|
||||
basic_machine=hppa1.1-hitachi
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
paragon)
|
||||
basic_machine=i860-intel
|
||||
os=-osf
|
||||
;;
|
||||
pbd)
|
||||
basic_machine=sparc-tti
|
||||
;;
|
||||
pbb)
|
||||
basic_machine=m68k-tti
|
||||
;;
|
||||
pc532 | pc532-*)
|
||||
basic_machine=ns32k-pc532
|
||||
;;
|
||||
pentium | p5 | k5 | nexen)
|
||||
basic_machine=i586-pc
|
||||
;;
|
||||
pentiumpro | p6 | k6 | 6x86)
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentiumii | pentium2)
|
||||
basic_machine=i786-pc
|
||||
;;
|
||||
pentium-* | p5-* | k5-* | nexen-*)
|
||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumpro-* | p6-* | k6-* | 6x86-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumii-* | pentium2-*)
|
||||
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pn)
|
||||
basic_machine=pn-gould
|
||||
;;
|
||||
power) basic_machine=rs6000-ibm
|
||||
;;
|
||||
ppc) basic_machine=powerpc-unknown
|
||||
;;
|
||||
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppcle | powerpclittle | ppc-le | powerpc-little)
|
||||
basic_machine=powerpcle-unknown
|
||||
;;
|
||||
ppcle-* | powerpclittle-*)
|
||||
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ps2)
|
||||
basic_machine=i386-ibm
|
||||
;;
|
||||
*qnx*)
|
||||
basic_machine=i386-pc
|
||||
os=-qnx`uname -v | cut -c1-1`
|
||||
;;
|
||||
*nto*)
|
||||
basic_machine=i386-pc
|
||||
os=-nto
|
||||
;;
|
||||
rm[46]00)
|
||||
basic_machine=mips-siemens
|
||||
;;
|
||||
rtpc | rtpc-*)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
sequent)
|
||||
basic_machine=i386-sequent
|
||||
;;
|
||||
sh)
|
||||
basic_machine=sh-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
sps7)
|
||||
basic_machine=m68k-bull
|
||||
os=-sysv2
|
||||
;;
|
||||
spur)
|
||||
basic_machine=spur-unknown
|
||||
;;
|
||||
sun2)
|
||||
basic_machine=m68000-sun
|
||||
;;
|
||||
sun2os3)
|
||||
basic_machine=m68000-sun
|
||||
os=-sunos3
|
||||
;;
|
||||
sun2os4)
|
||||
basic_machine=m68000-sun
|
||||
os=-sunos4
|
||||
;;
|
||||
sun3os3)
|
||||
basic_machine=m68k-sun
|
||||
os=-sunos3
|
||||
;;
|
||||
sun3os4)
|
||||
basic_machine=m68k-sun
|
||||
os=-sunos4
|
||||
;;
|
||||
sun4os3)
|
||||
basic_machine=sparc-sun
|
||||
os=-sunos3
|
||||
;;
|
||||
sun4os4)
|
||||
basic_machine=sparc-sun
|
||||
os=-sunos4
|
||||
;;
|
||||
sun4sol2)
|
||||
basic_machine=sparc-sun
|
||||
os=-solaris2
|
||||
;;
|
||||
sun3 | sun3-*)
|
||||
basic_machine=m68k-sun
|
||||
;;
|
||||
sun4)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
sun386 | sun386i | roadrunner)
|
||||
basic_machine=i386-sun
|
||||
;;
|
||||
symmetry)
|
||||
basic_machine=i386-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
tx39)
|
||||
basic_machine=mipstx39-unknown
|
||||
;;
|
||||
tx39el)
|
||||
basic_machine=mipstx39el-unknown
|
||||
;;
|
||||
tower | tower-32)
|
||||
basic_machine=m68k-ncr
|
||||
;;
|
||||
udi29k)
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
;;
|
||||
ultra3)
|
||||
basic_machine=a29k-nyu
|
||||
os=-sym1
|
||||
;;
|
||||
vaxv)
|
||||
basic_machine=vax-dec
|
||||
os=-sysv
|
||||
;;
|
||||
vms)
|
||||
basic_machine=vax-dec
|
||||
os=-vms
|
||||
;;
|
||||
vpp*|vx|vx-*)
|
||||
basic_machine=f301-fujitsu
|
||||
;;
|
||||
vxworks960)
|
||||
basic_machine=i960-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
vxworks68)
|
||||
basic_machine=m68k-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
vxworks29k)
|
||||
basic_machine=a29k-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
xmp)
|
||||
basic_machine=xmp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
none)
|
||||
basic_machine=none-none
|
||||
os=-none
|
||||
;;
|
||||
|
||||
# Here we handle the default manufacturer of certain CPU types. It is in
|
||||
# some cases the only manufacturer, in others, it is the most popular.
|
||||
mips)
|
||||
if [ x$os = x-linux-gnu ]; then
|
||||
basic_machine=mips-unknown
|
||||
else
|
||||
basic_machine=mips-mips
|
||||
fi
|
||||
;;
|
||||
romp)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
rs6000)
|
||||
basic_machine=rs6000-ibm
|
||||
;;
|
||||
vax)
|
||||
basic_machine=vax-dec
|
||||
;;
|
||||
pdp11)
|
||||
basic_machine=pdp11-dec
|
||||
;;
|
||||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sparc)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
basic_machine=cydra-cydrome
|
||||
;;
|
||||
orion)
|
||||
basic_machine=orion-highlevel
|
||||
;;
|
||||
orion105)
|
||||
basic_machine=clipper-highlevel
|
||||
;;
|
||||
*)
|
||||
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Here we canonicalize certain aliases for manufacturers.
|
||||
case $basic_machine in
|
||||
*-digital*)
|
||||
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
|
||||
;;
|
||||
*-commodore*)
|
||||
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Decode manufacturer-specific aliases for certain operating systems.
|
||||
|
||||
if [ x"$os" != x"" ]
|
||||
then
|
||||
case $os in
|
||||
# First match some system type aliases
|
||||
# that might get confused with valid system types.
|
||||
# -solaris* is a basic system type, with this one exception.
|
||||
-solaris1 | -solaris1.*)
|
||||
os=`echo $os | sed -e 's|solaris1|sunos4|'`
|
||||
;;
|
||||
-solaris)
|
||||
os=-solaris2
|
||||
;;
|
||||
-svr4*)
|
||||
os=-sysv4
|
||||
;;
|
||||
-unixware*)
|
||||
os=-sysv4.2uw
|
||||
;;
|
||||
-gnu/linux*)
|
||||
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
|
||||
;;
|
||||
# First accept the basic system types.
|
||||
# The portable systems comes first.
|
||||
# Each alternative MUST END IN A *, to match a version number.
|
||||
# -sysv* is not here because it comes later, after sysvr4.
|
||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
|
||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||
| -aos* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
|
||||
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-beos*)
|
||||
os=-beos
|
||||
;;
|
||||
-linux*)
|
||||
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
||||
;;
|
||||
-sunos5*)
|
||||
os=`echo $os | sed -e 's|sunos5|solaris2|'`
|
||||
;;
|
||||
-sunos6*)
|
||||
os=`echo $os | sed -e 's|sunos6|solaris3|'`
|
||||
;;
|
||||
-osfrose*)
|
||||
os=-osfrose
|
||||
;;
|
||||
-osf*)
|
||||
os=-osf
|
||||
;;
|
||||
-utek*)
|
||||
os=-bsd
|
||||
;;
|
||||
-dynix*)
|
||||
os=-bsd
|
||||
;;
|
||||
-acis*)
|
||||
os=-aos
|
||||
;;
|
||||
-ctix* | -uts*)
|
||||
os=-sysv
|
||||
;;
|
||||
-ns2 )
|
||||
os=-nextstep2
|
||||
;;
|
||||
# Preserve the version number of sinix5.
|
||||
-sinix5.*)
|
||||
os=`echo $os | sed -e 's|sinix|sysv|'`
|
||||
;;
|
||||
-sinix*)
|
||||
os=-sysv4
|
||||
;;
|
||||
-triton*)
|
||||
os=-sysv3
|
||||
;;
|
||||
-oss*)
|
||||
os=-sysv3
|
||||
;;
|
||||
-svr4)
|
||||
os=-sysv4
|
||||
;;
|
||||
-svr3)
|
||||
os=-sysv3
|
||||
;;
|
||||
-sysvr4)
|
||||
os=-sysv4
|
||||
;;
|
||||
# This must come after -sysvr4.
|
||||
-sysv*)
|
||||
;;
|
||||
-xenix)
|
||||
os=-xenix
|
||||
;;
|
||||
-rhapsody*)
|
||||
;;
|
||||
-qnx*)
|
||||
;;
|
||||
-nto*)
|
||||
;;
|
||||
-none)
|
||||
;;
|
||||
*)
|
||||
# Get rid of the `-' at the beginning of $os.
|
||||
os=`echo $os | sed 's/[^-]*-//'`
|
||||
echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
else
|
||||
|
||||
# Here we handle the default operating systems that come with various machines.
|
||||
# The value should be what the vendor currently ships out the door with their
|
||||
# machine or put another way, the most popular os provided with the machine.
|
||||
|
||||
# Note that if you're going to try to match "-MANUFACTURER" here (say,
|
||||
# "-sun"), then you have to tell the case statement up towards the top
|
||||
# that MANUFACTURER isn't an operating system. Otherwise, code above
|
||||
# will signal an error saying that MANUFACTURER isn't an operating
|
||||
# system, and we'll never get to this point.
|
||||
|
||||
case $basic_machine in
|
||||
*-acorn)
|
||||
os=-riscix1.2
|
||||
;;
|
||||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
pdp11-*)
|
||||
os=-none
|
||||
;;
|
||||
*-dec | vax-*)
|
||||
os=-ultrix4.2
|
||||
;;
|
||||
m68*-apollo)
|
||||
os=-domain
|
||||
;;
|
||||
i386-sun)
|
||||
os=-sunos4.0.2
|
||||
;;
|
||||
m68000-sun)
|
||||
os=-sunos3
|
||||
# This also exists in the configure program, but was not the
|
||||
# default.
|
||||
# os=-sunos4
|
||||
;;
|
||||
*-tti) # must be before sparc entry or we get the wrong os.
|
||||
os=-sysv3
|
||||
;;
|
||||
sparc-* | *-sun)
|
||||
os=-sunos4.1.1
|
||||
;;
|
||||
*-ibm)
|
||||
os=-aix
|
||||
;;
|
||||
*-hp)
|
||||
os=-hpux
|
||||
;;
|
||||
*-hitachi)
|
||||
os=-hiux
|
||||
;;
|
||||
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
|
||||
os=-sysv
|
||||
;;
|
||||
*-cbm)
|
||||
os=-amigaos
|
||||
;;
|
||||
*-dg)
|
||||
os=-dgux
|
||||
;;
|
||||
*-dolphin)
|
||||
os=-sysv3
|
||||
;;
|
||||
m68k-ccur)
|
||||
os=-rtu
|
||||
;;
|
||||
m88k-omron*)
|
||||
os=-luna
|
||||
;;
|
||||
*-next )
|
||||
os=-nextstep
|
||||
;;
|
||||
*-sequent)
|
||||
os=-ptx
|
||||
;;
|
||||
*-crds)
|
||||
os=-unos
|
||||
;;
|
||||
*-ns)
|
||||
os=-genix
|
||||
;;
|
||||
i370-*)
|
||||
os=-mvs
|
||||
;;
|
||||
*-next)
|
||||
os=-nextstep3
|
||||
;;
|
||||
*-gould)
|
||||
os=-sysv
|
||||
;;
|
||||
*-highlevel)
|
||||
os=-bsd
|
||||
;;
|
||||
*-encore)
|
||||
os=-bsd
|
||||
;;
|
||||
*-sgi)
|
||||
os=-irix
|
||||
;;
|
||||
*-siemens)
|
||||
os=-sysv4
|
||||
;;
|
||||
*-masscomp)
|
||||
os=-rtu
|
||||
;;
|
||||
f301-fujitsu)
|
||||
os=-uxpv
|
||||
;;
|
||||
*)
|
||||
os=-none
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Here we handle the case where we know the os, and the CPU type, but not the
|
||||
# manufacturer. We pick the logical manufacturer.
|
||||
vendor=unknown
|
||||
case $basic_machine in
|
||||
*-unknown)
|
||||
case $os in
|
||||
-riscix*)
|
||||
vendor=acorn
|
||||
;;
|
||||
-sunos*)
|
||||
vendor=sun
|
||||
;;
|
||||
-aix*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-hpux*)
|
||||
vendor=hp
|
||||
;;
|
||||
-hiux*)
|
||||
vendor=hitachi
|
||||
;;
|
||||
-unos*)
|
||||
vendor=crds
|
||||
;;
|
||||
-dgux*)
|
||||
vendor=dg
|
||||
;;
|
||||
-luna*)
|
||||
vendor=omron
|
||||
;;
|
||||
-genix*)
|
||||
vendor=ns
|
||||
;;
|
||||
-mvs*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-ptx*)
|
||||
vendor=sequent
|
||||
;;
|
||||
-vxsim* | -vxworks*)
|
||||
vendor=wrs
|
||||
;;
|
||||
-aux*)
|
||||
vendor=apple
|
||||
;;
|
||||
esac
|
||||
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
|
||||
;;
|
||||
esac
|
||||
|
||||
echo $basic_machine$os
|
||||
42
mozilla/build/autoconf/find-mozconfig.sh
Executable file
42
mozilla/build/autoconf/find-mozconfig.sh
Executable file
@@ -0,0 +1,42 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1999 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
# 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
|
||||
199
mozilla/build/autoconf/glib.m4
Normal file
199
mozilla/build/autoconf/glib.m4
Normal file
@@ -0,0 +1,199 @@
|
||||
# Configure paths for GLIB
|
||||
# Owen Taylor 97-11-3
|
||||
|
||||
dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
||||
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
|
||||
dnl gthread is specified in MODULES, pass to glib-config
|
||||
dnl
|
||||
AC_DEFUN(AM_PATH_GLIB,
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the glib-config script
|
||||
dnl
|
||||
AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
|
||||
glib_config_prefix="$withval", glib_config_prefix="")
|
||||
AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
|
||||
glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
|
||||
AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
|
||||
, enable_glibtest=yes)
|
||||
|
||||
if test x$glib_config_exec_prefix != x ; then
|
||||
glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
|
||||
if test x${GLIB_CONFIG+set} != xset ; then
|
||||
GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
|
||||
fi
|
||||
fi
|
||||
if test x$glib_config_prefix != x ; then
|
||||
glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
|
||||
if test x${GLIB_CONFIG+set} != xset ; then
|
||||
GLIB_CONFIG=$glib_config_prefix/bin/glib-config
|
||||
fi
|
||||
fi
|
||||
|
||||
for module in . $4
|
||||
do
|
||||
case "$module" in
|
||||
gmodule)
|
||||
glib_config_args="$glib_config_args gmodule"
|
||||
;;
|
||||
gthread)
|
||||
glib_config_args="$glib_config_args gthread"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
dnl Force a version check to keep upgraded versions from being overridden by the cached value.
|
||||
unset ac_cv_path_GLIB_CONFIG
|
||||
|
||||
AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
|
||||
min_glib_version=ifelse([$1], ,0.99.7,$1)
|
||||
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
|
||||
no_glib=""
|
||||
if test "$GLIB_CONFIG" = "no" ; then
|
||||
no_glib=yes
|
||||
else
|
||||
GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
|
||||
GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
|
||||
glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
if test "x$enable_glibtest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $GLIB_CFLAGS"
|
||||
LIBS="$GLIB_LIBS $LIBS"
|
||||
dnl
|
||||
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
|
||||
dnl checks the results of glib-config to some extent
|
||||
dnl
|
||||
rm -f conf.glibtest
|
||||
AC_TRY_RUN([
|
||||
#include <glib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int major, minor, micro;
|
||||
char *tmp_version;
|
||||
|
||||
system ("touch conf.glibtest");
|
||||
|
||||
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||
tmp_version = g_strdup("$min_glib_version");
|
||||
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||
printf("%s, bad version string\n", "$min_glib_version");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ((glib_major_version != $glib_config_major_version) ||
|
||||
(glib_minor_version != $glib_config_minor_version) ||
|
||||
(glib_micro_version != $glib_config_micro_version))
|
||||
{
|
||||
printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
|
||||
$glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
|
||||
glib_major_version, glib_minor_version, glib_micro_version);
|
||||
printf ("*** was found! If glib-config was correct, then it is best\n");
|
||||
printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
|
||||
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
|
||||
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
|
||||
printf("*** required on your system.\n");
|
||||
printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
|
||||
printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
|
||||
printf("*** before re-running configure\n");
|
||||
}
|
||||
else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
|
||||
(glib_minor_version != GLIB_MINOR_VERSION) ||
|
||||
(glib_micro_version != GLIB_MICRO_VERSION))
|
||||
{
|
||||
printf("*** GLIB header files (version %d.%d.%d) do not match\n",
|
||||
GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
|
||||
printf("*** library (version %d.%d.%d)\n",
|
||||
glib_major_version, glib_minor_version, glib_micro_version);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((glib_major_version > major) ||
|
||||
((glib_major_version == major) && (glib_minor_version > minor)) ||
|
||||
((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
|
||||
glib_major_version, glib_minor_version, glib_micro_version);
|
||||
printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
|
||||
major, minor, micro);
|
||||
printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
|
||||
printf("***\n");
|
||||
printf("*** If you have already installed a sufficiently new version, this error\n");
|
||||
printf("*** probably means that the wrong copy of the glib-config shell script is\n");
|
||||
printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
||||
printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
|
||||
printf("*** correct copy of glib-config. (In this case, you will have to\n");
|
||||
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
|
||||
printf("*** so that the correct libraries are found at run-time))\n");
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
if test "x$no_glib" = x ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test "$GLIB_CONFIG" = "no" ; then
|
||||
echo "*** The glib-config script installed by GLIB could not be found"
|
||||
echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
|
||||
echo "*** your path, or set the GLIB_CONFIG environment variable to the"
|
||||
echo "*** full path to glib-config."
|
||||
else
|
||||
if test -f conf.glibtest ; then
|
||||
:
|
||||
else
|
||||
echo "*** Could not run GLIB test program, checking why..."
|
||||
CFLAGS="$CFLAGS $GLIB_CFLAGS"
|
||||
LIBS="$LIBS $GLIB_LIBS"
|
||||
AC_TRY_LINK([
|
||||
#include <glib.h>
|
||||
#include <stdio.h>
|
||||
], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
|
||||
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||
echo "*** that the run-time linker is not finding GLIB or finding the wrong"
|
||||
echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
|
||||
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||
echo "*** is required on your system"
|
||||
echo "***"
|
||||
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
|
||||
echo "***"
|
||||
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
|
||||
echo "*** came with the system with the command"
|
||||
echo "***"
|
||||
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
|
||||
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||
echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
|
||||
echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
|
||||
echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
GLIB_CFLAGS=""
|
||||
GLIB_LIBS=""
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(GLIB_CFLAGS)
|
||||
AC_SUBST(GLIB_LIBS)
|
||||
rm -f conf.glibtest
|
||||
])
|
||||
190
mozilla/build/autoconf/gtk.m4
Normal file
190
mozilla/build/autoconf/gtk.m4
Normal file
@@ -0,0 +1,190 @@
|
||||
# Configure paths for GTK+
|
||||
# Owen Taylor 97-11-3
|
||||
# (copy of gtk.m4 (public domain))
|
||||
|
||||
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
|
||||
dnl
|
||||
AC_DEFUN(AM_PATH_GTK,
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the gtk-config script
|
||||
dnl
|
||||
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
|
||||
gtk_config_prefix="$withval", gtk_config_prefix="")
|
||||
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
|
||||
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
|
||||
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
|
||||
, enable_gtktest=yes)
|
||||
|
||||
if test x$gtk_config_exec_prefix != x ; then
|
||||
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
|
||||
if test x${GTK_CONFIG+set} != xset ; then
|
||||
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
|
||||
fi
|
||||
fi
|
||||
if test x$gtk_config_prefix != x ; then
|
||||
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
|
||||
if test x${GTK_CONFIG+set} != xset ; then
|
||||
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Force a version check to keep upgraded versions from being overridden by the cached value.
|
||||
unset ac_cv_path_GTK_CONFIG
|
||||
|
||||
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
|
||||
min_gtk_version=ifelse([$1], ,0.99.7,$1)
|
||||
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
|
||||
no_gtk=""
|
||||
if test "$GTK_CONFIG" = "no" ; then
|
||||
no_gtk=yes
|
||||
else
|
||||
GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
|
||||
GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
|
||||
gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
if test "x$enable_gtktest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
||||
LIBS="$LIBS $GTK_LIBS"
|
||||
dnl
|
||||
dnl Now check if the installed GTK is sufficiently new. (Also sanity
|
||||
dnl checks the results of gtk-config to some extent
|
||||
dnl
|
||||
rm -f conf.gtktest
|
||||
AC_TRY_RUN([
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int major, minor, micro;
|
||||
char *tmp_version;
|
||||
|
||||
system ("touch conf.gtktest");
|
||||
|
||||
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||
tmp_version = g_strdup("$min_gtk_version");
|
||||
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||
printf("%s, bad version string\n", "$min_gtk_version");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ((gtk_major_version != $gtk_config_major_version) ||
|
||||
(gtk_minor_version != $gtk_config_minor_version) ||
|
||||
(gtk_micro_version != $gtk_config_micro_version))
|
||||
{
|
||||
printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
|
||||
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
|
||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
printf ("*** was found! If gtk-config was correct, then it is best\n");
|
||||
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
|
||||
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
|
||||
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
|
||||
printf("*** required on your system.\n");
|
||||
printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
|
||||
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
|
||||
printf("*** before re-running configure\n");
|
||||
}
|
||||
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
|
||||
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
|
||||
(gtk_minor_version != GTK_MINOR_VERSION) ||
|
||||
(gtk_micro_version != GTK_MICRO_VERSION))
|
||||
{
|
||||
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
|
||||
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
|
||||
printf("*** library (version %d.%d.%d)\n",
|
||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
}
|
||||
#endif /* defined (GTK_MAJOR_VERSION) ... */
|
||||
else
|
||||
{
|
||||
if ((gtk_major_version > major) ||
|
||||
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
|
||||
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
|
||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
|
||||
major, minor, micro);
|
||||
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
|
||||
printf("***\n");
|
||||
printf("*** If you have already installed a sufficiently new version, this error\n");
|
||||
printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
|
||||
printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
||||
printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
|
||||
printf("*** correct copy of gtk-config. (In this case, you will have to\n");
|
||||
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
|
||||
printf("*** so that the correct libraries are found at run-time))\n");
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
if test "x$no_gtk" = x ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test "$GTK_CONFIG" = "no" ; then
|
||||
echo "*** The gtk-config script installed by GTK could not be found."
|
||||
echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
|
||||
echo "*** your path, or set the GTK_CONFIG environment variable to the"
|
||||
echo "*** full path to gtk-config."
|
||||
echo "*** GTK+ is available from ftp://ftp.gtk.org/pub/gtk"
|
||||
else
|
||||
if test -f conf.gtktest ; then
|
||||
:
|
||||
else
|
||||
echo "*** Could not run GTK test program, checking why..."
|
||||
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
||||
LIBS="$LIBS $GTK_LIBS"
|
||||
AC_TRY_LINK([
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdio.h>
|
||||
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
|
||||
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||
echo "*** that the run-time linker is not finding GTK or finding the wrong"
|
||||
echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
|
||||
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||
echo "*** is required on your system"
|
||||
echo "***"
|
||||
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
|
||||
echo "***"
|
||||
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
|
||||
echo "*** came with the system with the command"
|
||||
echo "***"
|
||||
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
|
||||
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||
echo "*** exact error that occured. This usually means GTK was incorrectly installed"
|
||||
echo "*** or that you have moved GTK since it was installed. In the latter case, you"
|
||||
echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
GTK_CFLAGS=""
|
||||
GTK_LIBS=""
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(GTK_CFLAGS)
|
||||
AC_SUBST(GTK_LIBS)
|
||||
rm -f conf.gtktest
|
||||
])
|
||||
119
mozilla/build/autoconf/install-sh
Executable file
119
mozilla/build/autoconf/install-sh
Executable file
@@ -0,0 +1,119 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5; it is not part of GNU.
|
||||
#
|
||||
# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
#
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
|
||||
instcmd="$mvprog"
|
||||
chmodcmd=""
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dstdir=`dirname $dst`
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd $dst
|
||||
$doit $mvcmd $dsttmp $dst
|
||||
|
||||
|
||||
exit 0
|
||||
196
mozilla/build/autoconf/libIDL.m4
Normal file
196
mozilla/build/autoconf/libIDL.m4
Normal file
@@ -0,0 +1,196 @@
|
||||
# Configure paths for LIBIDL
|
||||
|
||||
dnl AM_PATH_LIBIDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
||||
dnl Test for LIBIDL, and define LIBIDL_CFLAGS and LIBIDL_LIBS
|
||||
dnl
|
||||
AC_DEFUN(AM_PATH_LIBIDL,
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the libIDL-config script
|
||||
dnl
|
||||
AC_ARG_WITH(libIDL-prefix,[ --with-libIDL-prefix=PFX Prefix where libIDL is installed (optional)],
|
||||
libIDL_config_prefix="$withval", libIDL_config_prefix="")
|
||||
AC_ARG_WITH(libIDL-exec-prefix,[ --with-libIDL-exec-prefix=PFX Exec prefix where libIDL is installed (optional)],
|
||||
libIDL_config_exec_prefix="$withval", libIDL_config_exec_prefix="")
|
||||
AC_ARG_ENABLE(libIDLtest, [ --disable-libIDLtest Do not try to compile and run a test libIDL program],
|
||||
, enable_libIDLtest=yes)
|
||||
|
||||
if test x$libIDL_config_exec_prefix != x ; then
|
||||
libIDL_config_args="$libIDL_config_args --exec-prefix=$libIDL_config_exec_prefix"
|
||||
if test x${LIBIDL_CONFIG+set} != xset ; then
|
||||
LIBIDL_CONFIG=$libIDL_config_exec_prefix/bin/libIDL-config
|
||||
fi
|
||||
fi
|
||||
if test x$libIDL_config_prefix != x ; then
|
||||
libIDL_config_args="$libIDL_config_args --prefix=$libIDL_config_prefix"
|
||||
if test x${LIBIDL_CONFIG+set} != xset ; then
|
||||
LIBIDL_CONFIG=$libIDL_config_prefix/bin/libIDL-config
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_PATH_GLIB(1.2.0)
|
||||
|
||||
dnl Force a version check to keep upgraded versions from being overridden by the cached value.
|
||||
unset ac_cv_path_LIBIDL_CONFIG
|
||||
|
||||
AC_PATH_PROG(LIBIDL_CONFIG, libIDL-config, no)
|
||||
min_libIDL_version=ifelse([$1], ,0.6.0,$1)
|
||||
AC_MSG_CHECKING(for libIDL - version >= $min_libIDL_version)
|
||||
no_libIDL=""
|
||||
if test "$LIBIDL_CONFIG" = "no" ; then
|
||||
no_libIDL=yes
|
||||
else
|
||||
LIBIDL_CFLAGS=`$LIBIDL_CONFIG $libIDL_config_args --cflags`
|
||||
LIBIDL_LIBS=`$LIBIDL_CONFIG $libIDL_config_args --libs`
|
||||
# hack to allow us to keep using libIDL 0.6.3-0.6.7. Anyone may remove
|
||||
# this after we start requiring libIDL 0.6.8 or anything higher
|
||||
LIBIDL_CFLAGS="$GLIB_CFLAGS $LIBIDL_CFLAGS"
|
||||
LIBIDL_LIBS="$GLIB_LIBS $LIBIDL_LIBS"
|
||||
libIDL_config_major_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
libIDL_config_minor_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
libIDL_config_micro_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
if test "x$enable_libIDLtest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $LIBIDL_CFLAGS"
|
||||
LIBS="$LIBIDL_LIBS $LIBS"
|
||||
dnl
|
||||
dnl Now check if the installed LIBIDL is sufficiently new.
|
||||
dnl
|
||||
rm -f conf.libIDLtest
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <libIDL/IDL.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int major, minor, micro;
|
||||
int libIDL_major_version;
|
||||
int libIDL_minor_version;
|
||||
int libIDL_micro_version;
|
||||
char *tmp_version;
|
||||
|
||||
system ("touch conf.libIDLtest");
|
||||
|
||||
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||
tmp_version = g_strdup ("$min_libIDL_version");
|
||||
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||
printf("%s, bad version string\n", "$min_libIDL_version");
|
||||
exit(1);
|
||||
}
|
||||
tmp_version = g_strdup (IDL_get_libver_string ());
|
||||
if (sscanf(tmp_version, "%d.%d.%d",
|
||||
&libIDL_major_version,
|
||||
&libIDL_minor_version,
|
||||
&libIDL_micro_version) != 3) {
|
||||
printf("%s, bad version string\n", tmp_version);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ((libIDL_major_version != $libIDL_config_major_version) ||
|
||||
(libIDL_minor_version != $libIDL_config_minor_version) ||
|
||||
(libIDL_micro_version != $libIDL_config_micro_version))
|
||||
{
|
||||
printf("\n*** 'libIDL-config --version' returned %d.%d.%d, but libIDL (%d.%d.%d)\n",
|
||||
$libIDL_config_major_version, $libIDL_config_minor_version, $libIDL_config_micro_version,
|
||||
libIDL_major_version, libIDL_minor_version, libIDL_micro_version);
|
||||
printf ("*** was found! If libIDL-config was correct, then it is best\n");
|
||||
printf ("*** to remove the old version of LIBIDL. You may also be able to fix the error\n");
|
||||
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
|
||||
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
|
||||
printf("*** required on your system.\n");
|
||||
printf("*** If libIDL-config was wrong, set the environment variable LIBIDL_CONFIG\n");
|
||||
printf("*** to point to the correct copy of libIDL-config, and remove the file config.cache\n");
|
||||
printf("*** before re-running configure\n");
|
||||
}
|
||||
else if ((libIDL_major_version != LIBIDL_MAJOR_VERSION) ||
|
||||
(libIDL_minor_version != LIBIDL_MINOR_VERSION) ||
|
||||
(libIDL_micro_version != LIBIDL_MICRO_VERSION))
|
||||
{
|
||||
printf("\n*** libIDL header files (version %d.%d.%d) do not match\n",
|
||||
LIBIDL_MAJOR_VERSION, LIBIDL_MINOR_VERSION, LIBIDL_MICRO_VERSION);
|
||||
printf("*** library (version %d.%d.%d)\n",
|
||||
libIDL_major_version, libIDL_minor_version, libIDL_micro_version);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((libIDL_major_version > major) ||
|
||||
((libIDL_major_version == major) && (libIDL_minor_version > minor)) ||
|
||||
((libIDL_major_version == major) && (libIDL_minor_version == minor) && (libIDL_micro_version >= micro)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\n*** An old version of libIDL (%d.%d.%d) was found.\n",
|
||||
libIDL_major_version, libIDL_minor_version, libIDL_micro_version);
|
||||
printf("*** You need at least libIDL version %d.%d.%d.\n",
|
||||
major, minor, micro);
|
||||
printf("***\n");
|
||||
printf("*** If you have already installed a sufficiently new version, this error\n");
|
||||
printf("*** probably means that the wrong copy of the libIDL-config shell script is\n");
|
||||
printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
||||
printf("*** of libIDL, but you can also set the LIBIDL_CONFIG environment to point to the\n");
|
||||
printf("*** correct copy of libIDL-config. (In this case, you will have to\n");
|
||||
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
|
||||
printf("*** so that the correct libraries are found at run-time))\n");
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
],, no_libIDL=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
if test "x$no_libIDL" = x ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test "$LIBIDL_CONFIG" = "no" ; then
|
||||
echo "*** The libIDL-config script installed by libIDL could not be found"
|
||||
echo "*** If libIDL was installed in PREFIX, make sure PREFIX/bin is in"
|
||||
echo "*** your path, or set the LIBIDL_CONFIG environment variable to the"
|
||||
echo "*** full path to libIDL-config."
|
||||
else
|
||||
if test -f conf.libIDLtest ; then
|
||||
:
|
||||
else
|
||||
echo "*** Could not run libIDL test program, checking why..."
|
||||
CFLAGS="$CFLAGS $LIBIDL_CFLAGS"
|
||||
LIBS="$LIBS $LIBIDL_LIBS"
|
||||
AC_TRY_LINK([
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <libIDL/IDL.h>
|
||||
], [ return IDL_get_libver_string ? 1 : 0; ],
|
||||
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||
echo "*** that the run-time linker is not finding libIDL or finding the wrong"
|
||||
echo "*** version of LIBIDL. If it is not finding libIDL, you'll need to set your"
|
||||
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||
echo "*** is required on your system"
|
||||
echo "***"
|
||||
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
|
||||
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||
echo "*** exact error that occured. This usually means libIDL was incorrectly installed"
|
||||
echo "*** or that you have moved libIDL since it was installed. In the latter case, you"
|
||||
echo "*** may want to edit the libIDL-config script: $LIBIDL_CONFIG" ])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
LIBIDL_CFLAGS=""
|
||||
LIBIDL_LIBS=""
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(LIBIDL_CFLAGS)
|
||||
AC_SUBST(LIBIDL_LIBS)
|
||||
rm -f conf.libIDLtest
|
||||
])
|
||||
98
mozilla/build/autoconf/load-mozconfig.sh
Normal file
98
mozilla/build/autoconf/load-mozconfig.sh
Normal file
@@ -0,0 +1,98 @@
|
||||
# sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1999 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
# 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"
|
||||
|
||||
96
mozilla/build/autoconf/match-dir.sh
Executable file
96
mozilla/build/autoconf/match-dir.sh
Executable file
@@ -0,0 +1,96 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
#
|
||||
# This script will match a dir with a set of dirs.
|
||||
#
|
||||
# Usage: match-dir.sh match [dir1 dir2 ... dirn]
|
||||
#
|
||||
# Send comments, improvements, bugs to ramiro@netscape.com
|
||||
#
|
||||
|
||||
if [ -f Makefile ]; then
|
||||
MAKEFILE="Makefile"
|
||||
else
|
||||
if [ -f Makefile.in ]; then
|
||||
MAKEFILE="Makefile.in"
|
||||
else
|
||||
echo
|
||||
echo "There ain't no 'Makefile' or 'Makefile.in' over here: $pwd, dude."
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Use DEPTH in the Makefile.in to determine the depth
|
||||
depth=`grep -w DEPTH ${MAKEFILE} | grep -e "\.\." | awk -F"=" '{ print $2; }'`
|
||||
|
||||
# Determine the depth count
|
||||
n=`echo $depth | tr '/' ' ' | wc -w`
|
||||
|
||||
# Determine the path (strip anything before the mozilla/ root)
|
||||
# If we are building in the source directory then the Makefile will have
|
||||
# srcdir set to '.' and we have to get the path from the pwd command.
|
||||
# If we are building outside of the source tree then we can get the information
|
||||
# we need from the srcdir statement in the Makefile.
|
||||
|
||||
tpth=`grep '^srcdir.*/mozilla/' ${MAKEFILE}`
|
||||
if [ "$tpth" = "" ]; then
|
||||
tpth=`pwd`
|
||||
fi
|
||||
|
||||
path=`echo $tpth | awk -v count=$n -F"/" '\
|
||||
{ for(i=NF-count+0; i <= NF ; i++) \
|
||||
{ \
|
||||
if (i!=NF) \
|
||||
{ printf "%s/", $i } \
|
||||
else \
|
||||
{ printf "%s", $i } \
|
||||
} \
|
||||
}'`
|
||||
|
||||
match=$path
|
||||
|
||||
for i in $*
|
||||
do
|
||||
# echo "Looking for $match in $i"
|
||||
|
||||
echo $i | grep -q -x $match
|
||||
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo "1"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# echo "Looking for $i in $match"
|
||||
|
||||
echo $match | grep -q $i
|
||||
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo "1"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
echo "0"
|
||||
|
||||
exit 0
|
||||
79
mozilla/build/autoconf/mozconfig2defs.sh
Executable file
79
mozilla/build/autoconf/mozconfig2defs.sh
Executable file
@@ -0,0 +1,79 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1999 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
# 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`
|
||||
|
||||
|
||||
if [ "$MOZCONFIG" ]
|
||||
then
|
||||
print_header >$tmp_file
|
||||
. $MOZCONFIG >> $tmp_file
|
||||
|
||||
if cmp -s $tmp_file $out_file; then
|
||||
rm $tmp_file
|
||||
else
|
||||
mv -f $tmp_file $out_file
|
||||
fi
|
||||
else
|
||||
echo "# This file is automatically generated for client.mk." > $out_file
|
||||
fi
|
||||
|
||||
71
mozilla/build/autoconf/mozconfig2url.sh
Executable file
71
mozilla/build/autoconf/mozconfig2url.sh
Executable file
@@ -0,0 +1,71 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1999 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
# 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
|
||||
|
||||
59
mozilla/build/autoconf/print-depth-path.sh
Executable file
59
mozilla/build/autoconf/print-depth-path.sh
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
#
|
||||
# This script will print the depth path for a mozilla directory based
|
||||
# on the info in Makefile.in
|
||||
#
|
||||
# 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.in exists
|
||||
if [ ! -f Makefile.in ]
|
||||
then
|
||||
echo
|
||||
echo "There ain't no 'Makefile.in' over here: $pwd, dude."
|
||||
echo
|
||||
|
||||
exit
|
||||
fi
|
||||
|
||||
# Use DEPTH in the Makefile.in to determine the depth
|
||||
depth=`grep -w DEPTH Makefile.in | grep -e "\.\." | 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
|
||||
69
mozilla/build/autoconf/update-makefile.sh
Executable file
69
mozilla/build/autoconf/update-makefile.sh
Executable file
@@ -0,0 +1,69 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
#
|
||||
# This script will generate a single Makefile from a Makefile.in using
|
||||
# the config.status script.
|
||||
#
|
||||
# The config.status script is generated the first time you run
|
||||
# ./configure.
|
||||
#
|
||||
#
|
||||
# Usage: update-makefile.sh
|
||||
#
|
||||
# Send comments, improvements, bugs to ramiro@netscape.com
|
||||
#
|
||||
|
||||
root_path=`pwd`
|
||||
|
||||
# Make sure a Makefile exists
|
||||
basemakefile=$root_path/Makefile
|
||||
|
||||
if [ -f $basemakefile ]
|
||||
then
|
||||
makefile=$basemakefile
|
||||
elif [ -f $root_path/Makefile.in ]
|
||||
then
|
||||
makefile=$root_path/Makefile.in
|
||||
else
|
||||
echo
|
||||
echo "There ain't no 'Makefile' or 'Makefile.in' over here: $pwd"
|
||||
echo
|
||||
|
||||
exit
|
||||
fi
|
||||
|
||||
# Use DEPTH in the Makefile to determine the depth
|
||||
depth=`egrep '^DEPTH[ ]*=[ ]*\.' $makefile | awk -F= '{ print $2; }'`
|
||||
|
||||
# 'cd' to the root of the tree
|
||||
cd $depth
|
||||
|
||||
root_path=`pwd`
|
||||
# Strip the tree root off the Makefile's path
|
||||
basemakefile=`expr $basemakefile : $root_path'/\(.*\)'`
|
||||
|
||||
# Make sure config.status exists
|
||||
if [ -f config.status ]
|
||||
then
|
||||
CONFIG_FILES=$basemakefile ./config.status
|
||||
else
|
||||
echo
|
||||
echo "There ain't no 'config.status' over here: $pwd"
|
||||
echo
|
||||
fi
|
||||
1
mozilla/build/build_number
Normal file
1
mozilla/build/build_number
Normal file
@@ -0,0 +1 @@
|
||||
98091517
|
||||
25
mozilla/build/genrc.sh
Executable file
25
mozilla/build/genrc.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DATATYPE="$1"
|
||||
INFILE="$2"
|
||||
|
||||
echo "${DATATYPE} RCDATA"
|
||||
sed 's/"/""/g' ${INFILE} | awk 'BEGIN { printf("BEGIN\n") } { printf("\"%s\\r\\n\",\n", $0) } END { printf("\"\\0\"\nEND\n") }'
|
||||
|
||||
exit 0
|
||||
91
mozilla/build/hcc
Executable file
91
mozilla/build/hcc
Executable file
@@ -0,0 +1,91 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
#
|
||||
# Fix brain-damaged compilers that don't understand -o and -c together
|
||||
#
|
||||
CC=`echo $1 | sed -e "s|'||g" -e 's|"||g'`
|
||||
shift
|
||||
DASH_C=0
|
||||
DASH_O=0
|
||||
DUMMY="XxxXxxX"
|
||||
GET_OBJECT=0
|
||||
OBJ="${DUMMY}"
|
||||
OBJECT="${DUMMY}"
|
||||
|
||||
for i in $*
|
||||
do
|
||||
[ "${CHECK_O}" = yes ] && {
|
||||
case $i in
|
||||
./*/*.o) OBJECT="$i"
|
||||
OPTS="${OPTS} -o"
|
||||
DASH_O=1
|
||||
;;
|
||||
./*.o) OBJECT="`basename $i`"
|
||||
i=""
|
||||
DASH_O=1
|
||||
;;
|
||||
*.o) if [ $i = `basename $i` ]
|
||||
then
|
||||
OBJECT="$i"
|
||||
i=""
|
||||
else
|
||||
OPTS="${OPTS} -o"
|
||||
fi
|
||||
DASH_O=1
|
||||
;;
|
||||
*) OPTS="${OPTS} -o $i"
|
||||
DASH_O=1
|
||||
i=""
|
||||
;;
|
||||
esac
|
||||
CHECK_O=no
|
||||
}
|
||||
case $i in
|
||||
-c) DASH_C=1
|
||||
OPTS="${OPTS} -c"
|
||||
;;
|
||||
-o) CHECK_O=yes
|
||||
;;
|
||||
*.c) C_SRC=$i
|
||||
OPTS="${OPTS} $i"
|
||||
# cc always creates the .o from the .c name
|
||||
OBJ=`basename $C_SRC .c`.o
|
||||
;;
|
||||
*.s) S_SRC=$i
|
||||
OPTS="${OPTS} $i"
|
||||
# or the .o from the .s name
|
||||
OBJ=`basename $S_SRC .s`.o
|
||||
;;
|
||||
*.o) OBJECT=$i
|
||||
OPTS="${OPTS} $i"
|
||||
;;
|
||||
*) OPTS="${OPTS} $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
${CC} ${OPTS} || exit $?
|
||||
|
||||
# if there was no -c and -o we're done
|
||||
[ $DASH_C = 1 -a $DASH_O = 1 ] || exit 0
|
||||
|
||||
# if $OBJ and $OBJECT are the same we're done
|
||||
[ $OBJ = $OBJECT ] && exit 0
|
||||
|
||||
[ -f $OBJ ] && mv -f $OBJ $OBJECT
|
||||
135
mozilla/build/hcpp
Executable file
135
mozilla/build/hcpp
Executable file
@@ -0,0 +1,135 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
#
|
||||
# Wrapper for brain-damaged compilers that don't understand -o and -c together.
|
||||
#
|
||||
CXX=`echo $1 | sed -e "s|'||g" -e 's|"||g'`
|
||||
shift
|
||||
DUMMY="XxxXxxX"
|
||||
DASH_C=0
|
||||
DASH_O=0
|
||||
GET_OBJECT=0
|
||||
C_SRC="${DUMMY}"
|
||||
CC_SRC="${DUMMY}"
|
||||
CPP_SRC="${DUMMY}"
|
||||
S_SRC="${DUMMY}"
|
||||
OBJECT="${DUMMY}"
|
||||
NEW_i="${DUMMY}"
|
||||
PLATFORM=`uname -s`
|
||||
|
||||
for i in $*
|
||||
do
|
||||
[ ${GET_OBJECT} -eq 1 ] && {
|
||||
case $i in
|
||||
./*/*.o) OBJECT="$i"
|
||||
OPTS="${OPTS} -o"
|
||||
DASH_O=1
|
||||
;;
|
||||
./*.o) OBJECT="`basename $i`"
|
||||
i=""
|
||||
DASH_O=1
|
||||
;;
|
||||
*.o) if [ $i = `basename $i` ]
|
||||
then
|
||||
i=""
|
||||
else
|
||||
OPTS="${OPTS} -o"
|
||||
DASH_O=1
|
||||
fi
|
||||
;;
|
||||
*) OPTS="${OPTS} -o $i"
|
||||
DASH_O=1
|
||||
i=""
|
||||
;;
|
||||
esac
|
||||
GET_OBJECT=0
|
||||
}
|
||||
case $i in
|
||||
-c)
|
||||
DASH_C=1
|
||||
OPTS="${OPTS} -c"
|
||||
;;
|
||||
-o)
|
||||
GET_OBJECT=1
|
||||
;;
|
||||
*.c)
|
||||
C_SRC="$i"
|
||||
OPTS="${OPTS} $i"
|
||||
# cc always creates the .o from the .c name
|
||||
OBJ=`basename ${C_SRC} .c`.o
|
||||
;;
|
||||
+.*)
|
||||
OPTS="${OPTS} $i"
|
||||
;;
|
||||
*.cpp)
|
||||
CPP_SRC="$i"
|
||||
if [ "${PLATFORM}" = "SCO_SV" ]; then
|
||||
OPTS="${OPTS} +.cpp $i"
|
||||
elif [ "${PLATFORM}" = "IRIX" ]; then
|
||||
NEW_i=`basename ${CPP_SRC} .cpp`.C
|
||||
rm -f ${NEW_i}
|
||||
cp $i ${NEW_i}
|
||||
OPTS="${OPTS} ${NEW_i}"
|
||||
else
|
||||
OPTS="${OPTS} $i"
|
||||
fi
|
||||
# cc always creates the .o from the .cpp name
|
||||
OBJ=`basename ${CPP_SRC} .cpp`.o
|
||||
;;
|
||||
*.cc)
|
||||
CC_SRC="$i"
|
||||
OPTS="${OPTS} $i"
|
||||
# cc always creates the .o from the .cc name
|
||||
OBJ=`basename ${CC_SRC} .cc`.o
|
||||
;;
|
||||
*.s)
|
||||
S_SRC="$i"
|
||||
OPTS="${OPTS} $i"
|
||||
# cc always creates the .o from the .s name
|
||||
OBJ=`basename ${S_SRC} .s`.o
|
||||
;;
|
||||
*.o) OBJECT=$i
|
||||
OPTS="${OPTS} $i"
|
||||
;;
|
||||
*) OPTS="${OPTS} $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
${CXX} ${OPTS} || exit $?
|
||||
rm -f ${NEW_i}
|
||||
|
||||
# Really only needed for NSPR now.
|
||||
if [ "${PLATFORM}" = "IRIX" -a "$OBJ" != "$OBJECT" ]; then
|
||||
OBJ=$OBJECT
|
||||
fi
|
||||
|
||||
# LAME!!!
|
||||
if [ -f -O ]; then
|
||||
mv -f -- -O ${OBJECT}
|
||||
fi
|
||||
|
||||
# if there was no -c and -o we're done
|
||||
[ ${DASH_C} -eq 1 -a ${DASH_O} -eq 1 ] || exit 0
|
||||
|
||||
# if $OBJ and $OBJECT are the same we're done
|
||||
[ $OBJ = $OBJECT ] && exit 0
|
||||
|
||||
[ -f $OBJ ] && mv -f $OBJ $OBJECT
|
||||
|
||||
357
mozilla/build/mac/BuildList.pm
Normal file
357
mozilla/build/mac/BuildList.pm
Normal file
@@ -0,0 +1,357 @@
|
||||
#!perl
|
||||
|
||||
package BuildList;
|
||||
require Exporter;
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(BuildMozilla DistMozilla);
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BuildList - build the [ordered] set of projects needed to construct Mozilla
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
...
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
|
||||
=cut
|
||||
|
||||
use Moz;
|
||||
use File::Path;
|
||||
|
||||
sub BuildMozilla()
|
||||
{
|
||||
if ( $main::DEBUG )
|
||||
{
|
||||
$D = "Debug";
|
||||
$dist_dir = ":mozilla:dist:client_debug:";
|
||||
}
|
||||
else
|
||||
{
|
||||
$D = "";
|
||||
$dist_dir = ":mozilla:dist:client:";
|
||||
}
|
||||
|
||||
#
|
||||
# Build the appropriate target of each project
|
||||
#
|
||||
|
||||
BuildProjectClean(":mozilla:lib:mac:NSStdLib:NSStdLib.mcp", "Stubs");
|
||||
BuildProjectClean(":mozilla:lib:mac:NSRuntime:NSRuntime.mcp", "Stubs");
|
||||
BuildProjectClean(":mozilla:lib:mac:MacMemoryAllocator:MemAllocator.mcp", "Stubs");
|
||||
# BuildProjectClean(":mozilla:cmd:macfe:projects:client:Client.mcp", "Stubs");
|
||||
|
||||
if ( $main::CARBON )
|
||||
{
|
||||
BuildProject(":mozilla:cmd:macfe:projects:interfaceLib:Interface.mcp", "Carbon Interfaces");
|
||||
}
|
||||
else
|
||||
{
|
||||
BuildProject(":mozilla:cmd:macfe:projects:interfaceLib:Interface.mcp", "MacOS Interfaces");
|
||||
}
|
||||
|
||||
BuildProject(":mozilla:lib:mac:NSRuntime:NSRuntime.mcp", "NSRuntime$D.shlb");
|
||||
MakeAlias(":mozilla:lib:mac:NSRuntime:NSRuntime$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:cmd:macfe:restext:StringLib.mcp", "Strings$D.shlb");
|
||||
MakeAlias(":mozilla:cmd:macfe:restext:Strings$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:lib:mac:MoreFiles:build:MoreFilesPPC.mcp", "MoreFiles$D.shlb");
|
||||
MakeAlias(":mozilla:lib:mac:MoreFiles:build:MoreFiles$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:nsprpub:macbuild:NSPR20PPC.mcp", "NSPR20$D.shlb");
|
||||
MakeAlias(":mozilla:nsprpub:macbuild:NSPR20$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:dbm:macbuild:DBMPPC.mcp", "DBM$D.shlb");
|
||||
MakeAlias(":mozilla:dbm:macbuild:DBM$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:lib:mac:MacMemoryAllocator:MemAllocator.mcp", "MemAllocator$D.shlb");
|
||||
MakeAlias(":mozilla:lib:mac:MacMemoryAllocator:MemAllocator$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:lib:mac:NSStdLib:NSStdLib.mcp", "NSStdLib$D.shlb");
|
||||
MakeAlias(":mozilla:lib:mac:NSStdLib:NSStdLib$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:modules:libreg:macbuild:libreg.mcp", "libreg$D.shlb");
|
||||
MakeAlias(":mozilla:modules:libreg:macbuild:libreg$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:xpcom:macbuild:xpcomPPC.mcp", "xpcom$D.shlb");
|
||||
MakeAlias(":mozilla:xpcom:macbuild:xpcom$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:lib:mac:PowerPlant:PowerPlant.mcp", "PowerPlant$D.shlb");
|
||||
MakeAlias(":mozilla:lib:mac:PowerPlant:PowerPlant$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:modules:progress:macbuild:ProgressPPC.mcp", "Progress$D.shlb");
|
||||
MakeAlias(":mozilla:modules:progress:macbuild:Progress$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:modules:zlib:macbuild:zlib.mcp", "zlib$D.shlb");
|
||||
MakeAlias(":mozilla:modules:zlib:macbuild:zlib$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:jpeg:macbuild:JPEG.mcp", "JPEG$D.shlb");
|
||||
MakeAlias(":mozilla:jpeg:macbuild:JPEG$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:sun-java:stubs:macbuild:JavaStubs.mcp", "JavaRuntime$D.shlb");
|
||||
MakeAlias(":mozilla:sun-java:stubs:macbuild:JavaRuntime$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:js:macbuild:JavaScriptPPC.mcp", "JavaScript$D.shlb");
|
||||
MakeAlias(":mozilla:js:macbuild:JavaScript$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:js:macbuild:LiveConnect.mcp", "LiveConnect$D.shlb");
|
||||
MakeAlias(":mozilla:js:macbuild:LiveConnect$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:nav-java:stubs:macbuild:NavJavaStubs.mcp", "NavJava$D.shlb");
|
||||
MakeAlias(":mozilla:nav-java:stubs:macbuild:NavJava$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:modules:rdf:macbuild:RDF.mcp", "RDF$D.shlb");
|
||||
MakeAlias(":mozilla:modules:rdf:macbuild:RDF$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:modules:xml:macbuild:XML.mcp", "XML$D.shlb");
|
||||
MakeAlias(":mozilla:modules:xml:macbuild:XML$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:modules:schedulr:macbuild:Schedulr.mcp", "Scheduler$D.shlb");
|
||||
MakeAlias(":mozilla:modules:schedulr:macbuild:Scheduler$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:build:mac:CustomLib:CustomLib.mcp", "CustomLib$D.shlb");
|
||||
MakeAlias(":mozilla:build:mac:CustomLib:CustomLib$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:modules:security:freenav:macbuild:NoSecurity.mcp", "Security.o");
|
||||
BuildProject(":mozilla:modules:libfont:macbuild:FontBroker.mcp", "FontBroker$D.o");
|
||||
BuildProject(":mozilla:modules:oji:macbuild:oji.mcp", "oji$D.o");
|
||||
BuildProject(":mozilla:lib:libmocha:macbuild:LibMocha.mcp", "LibMocha$D.o");
|
||||
|
||||
if ( $main::MOZ_DARK == 1 )
|
||||
{
|
||||
BuildProject(":mozilla:network:macbuild:network.mcp", "Network$D.o (mailnews)");
|
||||
}
|
||||
else
|
||||
{
|
||||
BuildProject(":mozilla:network:macbuild:network.mcp", "Network$D.o");
|
||||
}
|
||||
BuildProject(":mozilla:caps:macbuild:Caps.mcp", "Caps$D.o");
|
||||
|
||||
BuildProject(":mozilla:modules:libimg:macbuild:png.mcp", "png$D.o");
|
||||
BuildProject(":mozilla:modules:libimg:macbuild:libimg.mcp", "libimg$D.o");
|
||||
|
||||
BuildProject(":mozilla:build:mac:CustomLib:CustomLib.mcp", "CustomStaticLib$D.o");
|
||||
|
||||
if ( $main::MOZ_LITE == 1 )
|
||||
{
|
||||
BuildProject(":mozilla:cmd:macfe:projects:dummies:MakeDummies.mcp", "MailNews$D.o");
|
||||
BuildProject(":mozilla:cmd:macfe:projects:dummies:MakeDummies.mcp", "Composer$D.o");
|
||||
BuildProject(":mozilla:cmd:macfe:projects:client:Client.mcp", "Nav_Resources");
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $main::MOZ_MEDIUM == 1 )
|
||||
{
|
||||
BuildProject(":mozilla:cmd:macfe:projects:dummies:MakeDummies.mcp", "MailNews$D.o");
|
||||
BuildProject(":mozilla:cmd:macfe:Composer:build:Composer.mcp", "Composer$D.o");
|
||||
BuildProject(":mozilla:cmd:macfe:projects:client:Client.mcp", "Moz_Resources");
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $main::MOZ_DARK == 1 )
|
||||
{
|
||||
BuildProject(":ns:lib:libneo:mac:macbuild:NeoLib.mcp", "NeoLib$D.o");
|
||||
MakeAlias( ":ns:lib:libneo:mac:macbuild:NeoLib$D.o", "$dist_dir");
|
||||
BuildProject(":mozilla:lib:libmsg:macbuild:MsgLib.mcp", "MsgLib$D.o (secure)");
|
||||
MakeAlias( ":mozilla:lib:libmsg:macbuild:MsgLib$D.o", "$dist_dir");
|
||||
BuildProject(":mozilla:directory:c-sdk:ldap:libraries:macintosh:LDAPClient.mcp","LDAPClient$D.o");
|
||||
MakeAlias( ":mozilla:directory:c-sdk:ldap:libraries:macintosh:LDAPClient$D.o", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:cmd:macfe:MailNews:build:MailNews.mcp", "MailNews$D.o");
|
||||
BuildProject(":mozilla:cmd:macfe:Composer:build:Composer.mcp", "Composer$D.o");
|
||||
BuildProject(":mozilla:cmd:macfe:projects:client:Client.mcp", "MozDark_Resources");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# BuildProject(":mozilla:cmd:macfe:projects:client:Client.mcp", "Client$D");
|
||||
}
|
||||
|
||||
|
||||
sub DistMozilla()
|
||||
{
|
||||
mkpath([ ":mozilla:dist:", ":mozilla:dist:client:", ":mozilla:dist:client_debug:", ":mozilla:dist:client_stubs:" ]);
|
||||
|
||||
#CONFIG
|
||||
InstallFromManifest(":mozilla:config:mac:MANIFEST", ":mozilla:dist:config:");
|
||||
InstallFromManifest(":mozilla:config:mac:MANIFEST_config", ":mozilla:dist:config:");
|
||||
|
||||
#INCLUDE
|
||||
InstallFromManifest(":mozilla:include:MANIFEST", ":mozilla:dist:include:");
|
||||
InstallFromManifest(":mozilla:cmd:macfe:pch:MANIFEST", ":mozilla:dist:include:");
|
||||
|
||||
#MAC_COMMON
|
||||
InstallFromManifest(":mozilla:build:mac:MANIFEST", ":mozilla:dist:mac:common:");
|
||||
InstallFromManifest(":mozilla:lib:mac:NSStdLib:include:MANIFEST", ":mozilla:dist:mac:common:");
|
||||
InstallFromManifest(":mozilla:lib:mac:MacMemoryAllocator:include:MANIFEST", ":mozilla:dist:mac:common:");
|
||||
InstallFromManifest(":mozilla:lib:mac:Misc:MANIFEST", ":mozilla:dist:mac:common:");
|
||||
InstallFromManifest(":mozilla:lib:mac:MoreFiles:MANIFEST", ":mozilla:dist:mac:common:morefiles:");
|
||||
InstallFromManifest(":mozilla:cmd:macfe:MANIFEST", ":mozilla:dist:mac:macfe:");
|
||||
|
||||
#NSPR
|
||||
InstallFromManifest(":mozilla:nsprpub:pr:include:MANIFEST", ":mozilla:dist:nspr:");
|
||||
InstallFromManifest(":mozilla:nsprpub:pr:src:md:mac:MANIFEST", ":mozilla:dist:nspr:mac:");
|
||||
InstallFromManifest(":mozilla:nsprpub:lib:ds:MANIFEST", ":mozilla:dist:nspr:");
|
||||
InstallFromManifest(":mozilla:nsprpub:lib:libc:include:MANIFEST", ":mozilla:dist:nspr:");
|
||||
InstallFromManifest(":mozilla:nsprpub:lib:msgc:include:MANIFEST", ":mozilla:dist:nspr:");
|
||||
|
||||
#DBM
|
||||
InstallFromManifest(":mozilla:dbm:include:MANIFEST", ":mozilla:dist:dbm:");
|
||||
|
||||
#LIBIMAGE
|
||||
InstallFromManifest(":mozilla:modules:libimg:png:MANIFEST", ":mozilla:dist:libimg:");
|
||||
InstallFromManifest(":mozilla:modules:libimg:src:MANIFEST", ":mozilla:dist:libimg:");
|
||||
InstallFromManifest(":mozilla:modules:libimg:public:MANIFEST", ":mozilla:dist:libimg:");
|
||||
|
||||
#SECURITY_freenav
|
||||
InstallFromManifest(":mozilla:modules:security:freenav:MANIFEST", ":mozilla:dist:security:");
|
||||
|
||||
#XPCOM
|
||||
InstallFromManifest(":mozilla:xpcom:public:MANIFEST", ":mozilla:dist:xpcom:");
|
||||
|
||||
#ZLIB
|
||||
InstallFromManifest(":mozilla:modules:zlib:src:MANIFEST", ":mozilla:dist:zlib:");
|
||||
|
||||
#JPEG
|
||||
InstallFromManifest(":mozilla:jpeg:MANIFEST", ":mozilla:dist:jpeg:");
|
||||
|
||||
#JSJ
|
||||
# beard: this conflicts with LiveConnect's jsjava.h.
|
||||
#InstallFromManifest(":mozilla:js:jsj:MANIFEST", ":mozilla:dist:jsj:");
|
||||
|
||||
#JSDEBUG
|
||||
InstallFromManifest(":mozilla:js:jsd:MANIFEST", ":mozilla:dist:jsdebug:");
|
||||
|
||||
#JS
|
||||
InstallFromManifest(":mozilla:js:src:MANIFEST", ":mozilla:dist:js:");
|
||||
|
||||
#LIVECONNECT
|
||||
InstallFromManifest(":mozilla:js:src:liveconnect:MANIFEST", ":mozilla:dist:liveconnect:");
|
||||
|
||||
#RDF
|
||||
InstallFromManifest(":mozilla:modules:rdf:include:MANIFEST", ":mozilla:dist:rdf:");
|
||||
|
||||
#XML
|
||||
InstallFromManifest(":mozilla:modules:xml:glue:MANIFEST", ":mozilla:dist:xml:");
|
||||
InstallFromManifest(":mozilla:modules:xml:expat:xmlparse:MANIFEST", ":mozilla:dist:xml:");
|
||||
|
||||
#LIBFONT
|
||||
InstallFromManifest(":mozilla:modules:libfont:MANIFEST", ":mozilla:dist:libfont:");
|
||||
InstallFromManifest(":mozilla:modules:libfont:src:MANIFEST", ":mozilla:dist:libfont:");
|
||||
|
||||
#LDAP
|
||||
if ( $main::MOZ_LDAP || $main::MOZ_DARK )
|
||||
{
|
||||
InstallFromManifest(":mozilla:directory:c-sdk:ldap:include:MANIFEST", ":mozilla:dist:ldap:");
|
||||
}
|
||||
|
||||
#PRIVACY
|
||||
InstallFromManifest(":mozilla:privacy:public:MANIFEST", ":mozilla:dist:privacy:");
|
||||
|
||||
#SCHEDULER
|
||||
InstallFromManifest(":mozilla:modules:schedulr:public:MANIFEST", ":mozilla:dist:schedulr:");
|
||||
|
||||
#NETWORK
|
||||
InstallFromManifest(":mozilla:network:cache:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:client:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:cnvts:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:cstream:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:main:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:mimetype:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:util:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:about:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:certld:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:dataurl:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:file:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:ftp:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:gopher:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:http:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:imap4:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:js:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:ldap:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:mailbox:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:marimba:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:nntp:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:pop3:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:remote:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:smtp:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:sockstub:MANIFEST", ":mozilla:dist:network:");
|
||||
|
||||
#HTML_DIALOGS
|
||||
InstallFromManifest(":mozilla:lib:htmldlgs:MANIFEST", ":mozilla:dist:htmldlgs:");
|
||||
|
||||
#LAYOUT
|
||||
InstallFromManifest(":mozilla:lib:layout:MANIFEST", ":mozilla:dist:layout:");
|
||||
|
||||
#LAYERS
|
||||
InstallFromManifest(":mozilla:lib:liblayer:include:MANIFEST", ":mozilla:dist:layers:");
|
||||
|
||||
#PARSE
|
||||
InstallFromManifest(":mozilla:lib:libparse:MANIFEST", ":mozilla:dist:libparse:");
|
||||
|
||||
#STYLE
|
||||
InstallFromManifest(":mozilla:lib:libstyle:MANIFEST", ":mozilla:dist:libstyle:");
|
||||
|
||||
#PLUGIN
|
||||
InstallFromManifest(":mozilla:modules:plugin:public:MANIFEST", ":mozilla:dist:plugin:");
|
||||
InstallFromManifest(":mozilla:modules:plugin:src:MANIFEST", ":mozilla:dist:plugin:");
|
||||
|
||||
#LIBHOOK
|
||||
InstallFromManifest(":mozilla:modules:libhook:public:MANIFEST", ":mozilla:dist:libhook:");
|
||||
|
||||
#LIBPREF
|
||||
InstallFromManifest(":mozilla:modules:libpref:public:MANIFEST", ":mozilla:dist:libpref:");
|
||||
|
||||
#LIBREG
|
||||
InstallFromManifest(":mozilla:modules:libreg:include:MANIFEST", ":mozilla:dist:libreg:");
|
||||
|
||||
#LIBUTIL
|
||||
InstallFromManifest(":mozilla:modules:libutil:public:MANIFEST", ":mozilla:dist:libutil:");
|
||||
|
||||
#PROGRESS
|
||||
InstallFromManifest(":mozilla:modules:progress:public:MANIFEST", ":mozilla:dist:progress:");
|
||||
|
||||
#EDTPLUG
|
||||
InstallFromManifest(":mozilla:modules:edtplug:include:MANIFEST", ":mozilla:dist:edtplug:");
|
||||
|
||||
#NAV_JAVA
|
||||
InstallFromManifest(":mozilla:nav-java:stubs:include:MANIFEST", ":mozilla:dist:nav-java:");
|
||||
InstallFromManifest(":mozilla:nav-java:stubs:macjri:MANIFEST", ":mozilla:dist:nav-java:");
|
||||
|
||||
#SUN_JAVA
|
||||
InstallFromManifest(":mozilla:sun-java:stubs:include:MANIFEST", ":mozilla:dist:sun-java:");
|
||||
InstallFromManifest(":mozilla:sun-java:stubs:macjri:MANIFEST", ":mozilla:dist:sun-java:");
|
||||
|
||||
#OJI
|
||||
InstallFromManifest(":mozilla:modules:oji:public:MANIFEST", ":mozilla:dist:oji:");
|
||||
InstallFromManifest(":mozilla:modules:oji:src:MANIFEST", ":mozilla:dist:oji:");
|
||||
|
||||
#CAPS
|
||||
InstallFromManifest(":mozilla:caps:include:MANIFEST", ":mozilla:dist:caps:");
|
||||
InstallFromManifest(":mozilla:caps:public:MANIFEST", ":mozilla:dist:caps:");
|
||||
|
||||
#BASE
|
||||
InstallFromManifest(":mozilla:base:public:MANIFEST", ":mozilla:dist:base:");
|
||||
InstallFromManifest(":mozilla:base:src:MANIFEST", ":mozilla:dist:base:");
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
40
mozilla/build/mac/BuildMozilla.pl
Normal file
40
mozilla/build/mac/BuildMozilla.pl
Normal file
@@ -0,0 +1,40 @@
|
||||
#!perl
|
||||
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
use Moz;
|
||||
use BuildList;
|
||||
|
||||
$DEBUG = 0;
|
||||
|
||||
# One of them should be 1. This will come from a config file at some stage.
|
||||
# In the meanwhile, it should match mozilla/config/mac/MacConfig.h
|
||||
$MOZ_LITE = 0;
|
||||
$MOZ_MEDIUM = 1;
|
||||
$MOZ_DARK = 0;
|
||||
|
||||
Moz::OpenErrorLog(":::Mozilla.BuildLog");
|
||||
Moz::StopForErrors();
|
||||
|
||||
chdir("::::");
|
||||
|
||||
# Make and popuplate the dist directory
|
||||
DistMozilla();
|
||||
|
||||
# Now build the projects
|
||||
BuildMozilla();
|
||||
44
mozilla/build/mac/BuildMozillaDebug.pl
Normal file
44
mozilla/build/mac/BuildMozillaDebug.pl
Normal file
@@ -0,0 +1,44 @@
|
||||
#!perl
|
||||
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
use Moz;
|
||||
use BuildList;
|
||||
|
||||
$DEBUG = 1;
|
||||
|
||||
# One of them should be 1. This will come from a config file at some stage.
|
||||
# In the meanwhile, it should match mozilla/config/mac/MacConfig.h
|
||||
$MOZ_LITE = 0;
|
||||
$MOZ_MEDIUM = 1;
|
||||
$MOZ_DARK = 0;
|
||||
|
||||
Moz::OpenErrorLog(":::Mozilla.BuildLog");
|
||||
Moz::StopForErrors();
|
||||
|
||||
chdir("::::");
|
||||
|
||||
# Make and popuplate the dist directory
|
||||
DistMozilla();
|
||||
|
||||
# Set the build number in about-all.html. Commented out for now
|
||||
# until ckid/mcvs resource problem is resolved.
|
||||
# SetBuildNumber();
|
||||
|
||||
# Now build the projects
|
||||
BuildMozilla();
|
||||
51
mozilla/build/mac/BuildMozillaOfficialDebug.pl
Normal file
51
mozilla/build/mac/BuildMozillaOfficialDebug.pl
Normal file
@@ -0,0 +1,51 @@
|
||||
#!perl
|
||||
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
use Moz;
|
||||
use BuildList;
|
||||
|
||||
$DEBUG = 1;
|
||||
|
||||
# One of them should be 1. This will come from a config file at some stage.
|
||||
# In the meanwhile, it should match mozilla/config/mac/MacConfig.h
|
||||
$MOZ_LITE = 0;
|
||||
$MOZ_MEDIUM = 1;
|
||||
$MOZ_DARK = 0;
|
||||
|
||||
Moz::OpenErrorLog(":::Mozilla.BuildLog");
|
||||
Moz::StopForErrors();
|
||||
|
||||
chdir("::::");
|
||||
|
||||
SetBuildNumber();
|
||||
|
||||
SetTimeBomb(0, 30);
|
||||
|
||||
# Make and popuplate the dist directory
|
||||
DistMozilla();
|
||||
|
||||
Delay(10);
|
||||
|
||||
# Set the build number in about-all.html. Commented out for now
|
||||
# until ckid/mcvs resource problem is resolved.
|
||||
|
||||
# SetAgentString();
|
||||
|
||||
# Now build the projects
|
||||
BuildMozilla();
|
||||
164
mozilla/build/mac/BuildNGLayout.pl
Normal file
164
mozilla/build/mac/BuildNGLayout.pl
Normal file
@@ -0,0 +1,164 @@
|
||||
#!perl
|
||||
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
#
|
||||
# build script (optimized)
|
||||
#
|
||||
use Mac::Processes;
|
||||
use NGLayoutBuildList;
|
||||
use Cwd;
|
||||
use Moz;
|
||||
|
||||
#-----------------------------------------------
|
||||
# configuration variables that globally affect what is built
|
||||
#-----------------------------------------------
|
||||
$DEBUG = 0;
|
||||
$CARBON = 0; # turn on to build with TARGET_CARBON
|
||||
$MOZ_FULLCIRCLE = 0;
|
||||
$PROFILE = 0;
|
||||
|
||||
$pull{all} = 0;
|
||||
$pull{lizard} = 0;
|
||||
$pull{xpcom} = 0;
|
||||
$pull{imglib} = 0;
|
||||
$pull{netlib} = 0;
|
||||
$pull{nglayout} = 0;
|
||||
$pull{mac} = 0;
|
||||
|
||||
$build{all} = 1; # turn off to do individual builds, or to do "most"
|
||||
$build{most} = 0; # turn off to do individual builds
|
||||
$build{dist} = 0;
|
||||
$build{dist_runtime} = 0; # implied by $build{dist}
|
||||
$build{idl} = 0;
|
||||
$build{resources} = 0;
|
||||
$build{stubs} = 0;
|
||||
$build{runtime} = 0;
|
||||
$build{common} = 0;
|
||||
$build{intl} = 0;
|
||||
$build{nglayout} = 0;
|
||||
$build{editor} = 0;
|
||||
$build{viewer} = 0;
|
||||
$build{xpapp} = 0;
|
||||
$build{mailnews} = 0;
|
||||
$build{apprunner} = 0;
|
||||
|
||||
#-----------------------------------------------
|
||||
# configuration variables that affect the manner
|
||||
# of building, but possibly affecting
|
||||
# the outcome.
|
||||
#-----------------------------------------------
|
||||
$ALIAS_SYM_FILES = $DEBUG;
|
||||
$CLOBBER_LIBS = 1; # turn on to clobber existing libs and .xSYM files before
|
||||
# building each project
|
||||
# The following two options will delete all dist files (if you have $build{dist} turned on),
|
||||
# but leave the directory structure intact.
|
||||
$CLOBBER_DIST_ALL = 1; # turn on to clobber all aliases/files inside dist (headers/xsym/libs)
|
||||
$CLOBBER_DIST_LIBS = 0; # turn on to clobber only aliases/files for libraries/sym files in dist
|
||||
|
||||
#-----------------------------------------------
|
||||
# configuration variables that are preferences for the build style,
|
||||
# and do not affect what is built.
|
||||
#-----------------------------------------------
|
||||
$CodeWarriorLib::CLOSE_PROJECTS_FIRST
|
||||
= 0;
|
||||
# 1 = close then make (for development),
|
||||
# 0 = make then close (for tinderbox).
|
||||
$USE_TIMESTAMPED_LOGS = 0;
|
||||
#-----------------------------------------------
|
||||
# END OF CONFIG SWITCHES
|
||||
#-----------------------------------------------
|
||||
|
||||
if ($pull{all})
|
||||
{
|
||||
foreach $k (keys(%pull))
|
||||
{
|
||||
$pull{$k} = 1;
|
||||
}
|
||||
}
|
||||
if ($build{all})
|
||||
{
|
||||
foreach $k (keys(%build))
|
||||
{
|
||||
$build{$k} = 1;
|
||||
}
|
||||
}
|
||||
if ($build{most})
|
||||
{
|
||||
### Just uncomment/comment to get the ones you want (if "most" is selected).
|
||||
# $build{dist} = 1;
|
||||
# $build{dist_runtime}= 1;
|
||||
# $build{resources} = 1;
|
||||
# $build{stubs} = 1;
|
||||
# $build{runtime} = 1;
|
||||
# $build{common} = 1; # Requires intl
|
||||
# $build{intl} = 1;
|
||||
# $build{nglayout} = 1;
|
||||
# $build{editor} = 1;
|
||||
# $build{viewer} = 1;
|
||||
# $build{xpapp} = 1;
|
||||
# $build{mailnews} = 1;
|
||||
$build{apprunner} = 1;
|
||||
}
|
||||
|
||||
# do the work
|
||||
# you should not have to edit anything below
|
||||
|
||||
chdir("::::");
|
||||
$MOZ_SRC = cwd();
|
||||
|
||||
if ($MOZ_FULLCIRCLE)
|
||||
{
|
||||
#// Get the Build Number for the Master.ini(Full Circle) n'stuff
|
||||
$buildnum = Moz::SetBuildNumber();
|
||||
}
|
||||
|
||||
if ($USE_TIMESTAMPED_LOGS)
|
||||
{
|
||||
#Use time-stamped names so that you don't clobber your previous log file!
|
||||
my $now = localtime();
|
||||
while ($now =~ s@:@.@) {} # replace all colons by periods
|
||||
my $logdir = ":Build Logs:";
|
||||
if (!stat($logdir))
|
||||
{
|
||||
print "Creating directory $logdir\n";
|
||||
mkdir $logdir, 0777 || die "Couldn't create directory $logdir";
|
||||
}
|
||||
OpenErrorLog("$logdir$now");
|
||||
}
|
||||
else
|
||||
{
|
||||
OpenErrorLog("NGLayoutBuildLog"); # Release build requires that name
|
||||
#OpenErrorLog("Mozilla.BuildLog"); # Tinderbox requires that name
|
||||
}
|
||||
Moz::StopForErrors();
|
||||
#Moz::DontStopForErrors();
|
||||
|
||||
if ($pull{all}) {
|
||||
Checkout();
|
||||
}
|
||||
|
||||
SetBuildNumber();
|
||||
|
||||
chdir($MOZ_SRC);
|
||||
BuildDist();
|
||||
|
||||
chdir($MOZ_SRC);
|
||||
BuildProjects();
|
||||
|
||||
print "Build complete\n";
|
||||
196
mozilla/build/mac/BuildNGLayoutDebug.pl
Normal file
196
mozilla/build/mac/BuildNGLayoutDebug.pl
Normal file
@@ -0,0 +1,196 @@
|
||||
#!perl
|
||||
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
#
|
||||
# build script (debug)
|
||||
#
|
||||
use Mac::Processes;
|
||||
use NGLayoutBuildList;
|
||||
use Cwd;
|
||||
use Moz;
|
||||
|
||||
#-----------------------------------------------
|
||||
# configuration variables that globally affect what is built
|
||||
#-----------------------------------------------
|
||||
$BUILD_ROOT = ":";
|
||||
# $BUILD_ROOT = ":", the default, with $build{all}
|
||||
# builds the whole tree. Leaving $BUILD_ROOT undefined
|
||||
# will also have this effect.
|
||||
#
|
||||
# $BUILD_ROOT = ":mozilla:mailnews:" with $build{all}
|
||||
# will "make everything in the mailnews directory".
|
||||
#
|
||||
# This is equivalent to the unix commands:
|
||||
# cd mozilla/mailnews
|
||||
# gmake
|
||||
# or the windows commands:
|
||||
# cd mozilla\mailnews
|
||||
# nmake -f makefile.win
|
||||
#
|
||||
# In conjunction with build{all}, this will carry out
|
||||
# all build phases (export, build, install...), but only
|
||||
# using files inside $BUILD_ROOT. Replace $build{all}
|
||||
# with specific component flags to build stuff from
|
||||
# those components that happens to live inside
|
||||
# $BUILD_ROOT.
|
||||
#
|
||||
# ":", and ":mozilla:" both have the same effect, because
|
||||
# this works by checking that path strings begin with
|
||||
# $BUILD_ROOT.
|
||||
#
|
||||
# $BUILD_ROOT affects only the build phase, not the pull
|
||||
# phase. There is still no scriptable way to update-and-build
|
||||
# a specific directory. In particular, $pull{all} will
|
||||
# still pull the whole tree, irrespective of the
|
||||
# setting of $BUILD_ROOT. To update and build a particular
|
||||
# directory, use MacCVS Pro to update the directory,
|
||||
# then turn off all $pull variables, and set $BUILD_ROOT.
|
||||
$DEBUG = 1;
|
||||
$CARBON = 0; # Turn on to build with TARGET_CARBON
|
||||
$MOZ_FULLCIRCLE = 0;
|
||||
$PROFILE = 0;
|
||||
|
||||
$pull{all} = 0;
|
||||
$pull{lizard} = 0;
|
||||
$pull{xpcom} = 0;
|
||||
$pull{imglib} = 0;
|
||||
$pull{netlib} = 0;
|
||||
$pull{nglayout} = 0;
|
||||
$pull{mac} = 0;
|
||||
|
||||
$build{all} = 1; # Turn off to do individual builds, or to do "most"
|
||||
$build{most} = 1; # Turn off to do individual builds
|
||||
$build{dist} = 0;
|
||||
$build{dist_runtime} = 0; # Implied by $build{dist}
|
||||
$build{resources} = 0;
|
||||
$build{idl} = 0;
|
||||
$build{stubs} = 0;
|
||||
$build{runtime} = 0;
|
||||
$build{common} = 0;
|
||||
$build{intl} = 0;
|
||||
$build{nglayout} = 0;
|
||||
$build{editor} = 0;
|
||||
$build{viewer} = 0;
|
||||
$build{xpapp} = 0;
|
||||
$build{mailnews} = 0;
|
||||
$build{apprunner} = 0;
|
||||
|
||||
#-----------------------------------------------
|
||||
# configuration variables that affect the manner
|
||||
# of building, but possibly affecting
|
||||
# the outcome.
|
||||
#-----------------------------------------------
|
||||
$ALIAS_SYM_FILES = $DEBUG;
|
||||
$CLOBBER_LIBS = 1; # turn on to clobber existing libs and .xSYM files before
|
||||
# building each project
|
||||
# The following two options will delete all dist files (if you have $build{dist} turned on),
|
||||
# but leave the directory structure intact.
|
||||
$CLOBBER_DIST_ALL = 1; # turn on to clobber all aliases/files inside dist (headers/xsym/libs)
|
||||
$CLOBBER_DIST_LIBS = 0; # turn on to clobber only aliases/files for libraries/sym files in dist
|
||||
|
||||
#-----------------------------------------------
|
||||
# configuration variables that are preferences for the build style,
|
||||
# and do not affect what is built.
|
||||
#-----------------------------------------------
|
||||
$CodeWarriorLib::CLOSE_PROJECTS_FIRST
|
||||
= 1;
|
||||
# 1 = close then make (for development),
|
||||
# 0 = make then close (for tinderbox).
|
||||
$USE_TIMESTAMPED_LOGS = 1;
|
||||
#-----------------------------------------------
|
||||
# END OF CONFIG SWITCHES
|
||||
#-----------------------------------------------
|
||||
|
||||
if ($pull{all})
|
||||
{
|
||||
foreach $k (keys(%pull))
|
||||
{
|
||||
$pull{$k} = 1;
|
||||
}
|
||||
}
|
||||
if ($build{all})
|
||||
{
|
||||
foreach $k (keys(%build))
|
||||
{
|
||||
$build{$k} = 1;
|
||||
}
|
||||
}
|
||||
if ($build{most})
|
||||
{
|
||||
### Just uncomment/comment to get the ones you want (if "most" is selected).
|
||||
# $build{dist} = 1;
|
||||
# $build{dist_runtime}= 1;
|
||||
# $build{resources} = 1;
|
||||
$build{idl} = 1;
|
||||
$build{stubs} = 1;
|
||||
$build{runtime} = 1;
|
||||
$build{common} = 1; # Requires intl
|
||||
$build{intl} = 1;
|
||||
$build{nglayout} = 1;
|
||||
$build{editor} = 1;
|
||||
$build{viewer} = 1;
|
||||
$build{xpapp} = 1;
|
||||
$build{mailnews} = 1;
|
||||
$build{apprunner} = 1;
|
||||
}
|
||||
|
||||
# do the work
|
||||
# you should not have to edit anything below
|
||||
|
||||
chdir("::::");
|
||||
$MOZ_SRC = cwd();
|
||||
|
||||
if ($MOZ_FULLCIRCLE)
|
||||
{
|
||||
#// Get the Build Number for the Master.ini(Full Circle) n'stuff
|
||||
$buildnum = Moz::SetBuildNumber();
|
||||
}
|
||||
|
||||
if ($USE_TIMESTAMPED_LOGS)
|
||||
{
|
||||
#Use time-stamped names so that you don't clobber your previous log file!
|
||||
my $now = localtime();
|
||||
while ($now =~ s@:@.@) {} # replace all colons by periods
|
||||
my $logdir = ":Build Logs:";
|
||||
if (!stat($logdir))
|
||||
{
|
||||
print "Creating directory $logdir\n";
|
||||
mkdir $logdir, 0777 || die "Couldn't create directory $logdir";
|
||||
}
|
||||
OpenErrorLog("$logdir$now");
|
||||
}
|
||||
else
|
||||
{
|
||||
OpenErrorLog("NGLayoutBuildLog"); # Release build
|
||||
#OpenErrorLog("Mozilla.BuildLog"); # Tinderbox requires that name
|
||||
}
|
||||
|
||||
Moz::StopForErrors();
|
||||
#Moz::DontStopForErrors();
|
||||
|
||||
if ($pull{all}) {
|
||||
Checkout();
|
||||
}
|
||||
|
||||
BuildDist();
|
||||
|
||||
chdir($MOZ_SRC);
|
||||
BuildProjects();
|
||||
|
||||
print "Build complete\n";
|
||||
422
mozilla/build/mac/CodeWarriorLib.pm
Normal file
422
mozilla/build/mac/CodeWarriorLib.pm
Normal file
@@ -0,0 +1,422 @@
|
||||
#!perl
|
||||
package CodeWarriorLib;
|
||||
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
CodeWarriorLib - supply interface to CodeWarrior
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#!perl
|
||||
use CodeWarriorLib;
|
||||
CodeWarriorLib::activate();
|
||||
$had_errors = CodeWarriorLib::build_project(
|
||||
$project_path, $target_name, $recent_errors_file, $clean_build
|
||||
);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Replaces the AppleScript library I<CodeWarriorLib>.
|
||||
|
||||
=over 4
|
||||
|
||||
=cut
|
||||
|
||||
use strict;
|
||||
use Mac::Types;
|
||||
use Mac::AppleEvents;
|
||||
use Mac::AppleEvents::Simple;
|
||||
use Mac::Processes;
|
||||
use Mac::MoreFiles;
|
||||
use Mac::StandardFile;
|
||||
use File::Basename;
|
||||
|
||||
use vars qw($VERSION);
|
||||
$VERSION = '1.02';
|
||||
|
||||
my($app) = 'CWIE';
|
||||
|
||||
# 0 == don't switch CWIE to front app in do_event(), 1 == do switch
|
||||
# note: activate() still switches when called
|
||||
$Mac::AppleEvents::Simple::SWITCH = 0;
|
||||
|
||||
# supply your own path to the source here
|
||||
#_test('PowerPudgeIV:mozilla:mozilla:');
|
||||
|
||||
|
||||
=pod
|
||||
|
||||
=item _get_project($full_path)
|
||||
|
||||
A private routine returning a reference to the open project with the given name,
|
||||
or else the empty string (when that project is not open)
|
||||
|
||||
full_path is a string identifying the project to be built and is of the form,
|
||||
e.g., "HD:ProjectFolder:MyProject.mcp". It must be supplied.
|
||||
|
||||
=cut
|
||||
|
||||
sub _get_project ($) {
|
||||
my(
|
||||
$full_path, $candidate_projects
|
||||
) = @_;
|
||||
$candidate_projects = _doc_named(basename($full_path, '*'));
|
||||
if ($candidate_projects) {
|
||||
my($cps) = _get_dobj($candidate_projects);
|
||||
my($num) = AECountItems($cps);
|
||||
if ($num) { # is a list
|
||||
foreach (1 .. AECountItems($cps)) {
|
||||
my($cp) = AEGetNthDesc($cps, $_);
|
||||
if ($full_path eq _full_path($cp)) {
|
||||
return($cp);
|
||||
}
|
||||
}
|
||||
} else { # is only one, not a list
|
||||
if ($full_path eq _full_path($cps)) {
|
||||
return($cps);
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
=pod
|
||||
|
||||
=item build_project
|
||||
|
||||
Build a selected target of a project, saving any errors to a file, if supplied.
|
||||
|
||||
full_path is a string identifying the project to be built and is of the form,
|
||||
e.g., "HD:ProjectFolder:MyProject.mcp". It must be supplied.
|
||||
|
||||
If target_name is the empty string, the current target of the selected project
|
||||
will be built, else, target_name should be a string matching a target name in
|
||||
the selected project.
|
||||
|
||||
If error_path is the empty string, errors will not be saved to a file,
|
||||
else, error_path should be the full path of a file to save error messages into.
|
||||
|
||||
=cut
|
||||
|
||||
$CodeWarriorLib::CLOSE_PROJECTS_FIRST = 0; # If true we close then make. If false, make then close.
|
||||
my $last_project_built = "";
|
||||
my $last_project_was_closed = 0;
|
||||
|
||||
sub build_project ($;$$$) {
|
||||
my(
|
||||
$full_path, $target_name, $error_path,
|
||||
$remove_object, $p, $project_was_closed, $had_errors
|
||||
) = @_;
|
||||
_close_errors_window();
|
||||
|
||||
if ($CodeWarriorLib::CLOSE_PROJECTS_FIRST && ($last_project_built ne $full_path))
|
||||
{
|
||||
# If we're in "close first" mode, we don't close if the current project
|
||||
# is the same as the previous one.
|
||||
if ($last_project_was_closed) {
|
||||
$p = _get_project($last_project_built);
|
||||
_close($p);
|
||||
}
|
||||
$last_project_built = $full_path;
|
||||
$last_project_was_closed = 0; # now refers to the new project
|
||||
}
|
||||
$project_was_closed = 0;
|
||||
while (1) {
|
||||
$p = _get_project($full_path);
|
||||
if (!$p) {
|
||||
if ($project_was_closed) {
|
||||
print "### Error - request for project document failed after opening\n";
|
||||
die "### possibly CW Pro 4 bug: be sure to close your Find window\n";
|
||||
}
|
||||
$project_was_closed = 1;
|
||||
$last_project_was_closed = 1;
|
||||
_open_file($full_path);
|
||||
} else {
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
$had_errors = 0;
|
||||
if ($target_name eq '') {
|
||||
if ($remove_object) {_remove_object($p)}
|
||||
_build($p);
|
||||
} else {
|
||||
if ($remove_object) {_remove_object($p, $target_name)}
|
||||
_build($p, $target_name);
|
||||
}
|
||||
|
||||
if ($error_path ne '') {
|
||||
_save_errors_window($error_path);
|
||||
}
|
||||
$had_errors = _close_errors_window();
|
||||
|
||||
if (!$CodeWarriorLib::CLOSE_PROJECTS_FIRST)
|
||||
{
|
||||
if ($project_was_closed) {
|
||||
$p = _get_project($full_path);
|
||||
_close($p);
|
||||
}
|
||||
}
|
||||
|
||||
return($had_errors);
|
||||
}
|
||||
|
||||
=pod
|
||||
|
||||
=item activate()
|
||||
|
||||
Launches CodeWarrior and brings it to the front.
|
||||
|
||||
Once found, path will be saved in ':idepath.txt' for future reference.
|
||||
Edit or delete this file to change the location of the IDE. If app is
|
||||
moved, C<activate()> will prompt for a new location.
|
||||
|
||||
First looks for an open CodeWarrior app. Second, tries to open previously
|
||||
saved location in ':idepath.txt'. Third, tries to find it and allow user
|
||||
to choose it with Navigation Services (if present). Fourth, uses good old
|
||||
GUSI routines built-in to MacPerl for a Choose Directory dialog box.
|
||||
|
||||
=cut
|
||||
|
||||
sub activate () {
|
||||
local(*F);
|
||||
my($filepath, $appath, $psi) = (':idepath.txt');
|
||||
|
||||
foreach $psi (values(%Process)) {
|
||||
if ($psi->processSignature() eq $app) {
|
||||
$appath = $psi->processAppSpec(), "\n";
|
||||
_save_appath($filepath, $appath);
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
if ((!$appath || ! -x $appath) && open(F, $filepath)) {
|
||||
$appath = <F>;
|
||||
close(F);
|
||||
}
|
||||
|
||||
if (!$appath || ! -x $appath)
|
||||
{
|
||||
# make sure that MacPerl is a front process
|
||||
#ActivateApplication('McPL');
|
||||
MacPerl::Answer("Please locate the CodeWarrior application.", "OK");
|
||||
|
||||
# prompt user for the file name, and store it
|
||||
my $macFile = StandardGetFile( 0, "APPL");
|
||||
if ( $macFile->sfGood() )
|
||||
{
|
||||
$appath = $macFile->sfFile();
|
||||
}
|
||||
else
|
||||
{
|
||||
die "Operation canceled\n";
|
||||
}
|
||||
|
||||
# if (eval {require Mac::Navigation}) {
|
||||
# my($options, $nav);
|
||||
# Mac::Navigation->import();
|
||||
# $options = NavGetDefaultDialogOptions();
|
||||
# $options->message('Where is CodeWarrior IDE?');
|
||||
# $options->windowTitle('Find CodeWarrior IDE');
|
||||
# $nav = NavChooseObject($Application{$app}, $options);
|
||||
# die "CodeWarrior IDE not found.\n" if (!$nav || !$nav->file(1));
|
||||
# $appath = $nav->file(1);
|
||||
# } else {
|
||||
# local(*D);
|
||||
# my $cwd = `pwd`;
|
||||
# $appath = _get_folder(
|
||||
# 'Where is the CW IDE folder?',
|
||||
# dirname($Application{$app})
|
||||
# );
|
||||
# die "CodeWarrior IDE not found.\n" if !$appath;
|
||||
# opendir(D, $appath) or die $!;
|
||||
# chdir($appath);
|
||||
# foreach my $file (sort readdir (D)) {
|
||||
# my(@app) = MacPerl::GetFileInfo($file);
|
||||
# if ($app[0] && $app[1] &&
|
||||
# $app[1] eq 'APPL' && $app[0] eq $app
|
||||
# ) {
|
||||
# $appath .= $file;
|
||||
# last;
|
||||
# }
|
||||
# }
|
||||
# chomp($cwd);
|
||||
# chdir($cwd);
|
||||
# }
|
||||
_save_appath($filepath, $appath);
|
||||
}
|
||||
|
||||
my($lp) = LaunchParam->new(
|
||||
launchAppSpec => $appath,
|
||||
launchControlFlags => launchContinue() + launchNoFileFlags()
|
||||
);
|
||||
unless (LaunchApplication($lp)) {
|
||||
unlink($filepath);
|
||||
die $^E;
|
||||
}
|
||||
}
|
||||
|
||||
sub _build ($;$) {
|
||||
my($evt);
|
||||
if ($_[1]) {
|
||||
my($prm) =
|
||||
q"'----':obj {form:name, want:type(TRGT), seld:TEXT(@), from:" .
|
||||
AEPrint($_[0]) . '}';
|
||||
$evt = do_event(qw/CWIE MAKE/, $app, $prm, $_[1]);
|
||||
} else {
|
||||
my($prm) = q"'----':" . AEPrint($_[0]);
|
||||
$evt = do_event(qw/CWIE MAKE/, $app, $prm);
|
||||
}
|
||||
}
|
||||
|
||||
sub _remove_object ($;$) {
|
||||
my($evt);
|
||||
if ($_[1]) {
|
||||
my($prm) =
|
||||
q"'----':obj {form:name, want:type(TRGT), seld:TEXT(@), from:" .
|
||||
AEPrint($_[0]) . '}';
|
||||
$evt = do_event(qw/CWIE RMOB/, $app, $prm, $_[1]);
|
||||
} else {
|
||||
my($prm) = q"'----':" . AEPrint($_[0]);
|
||||
$evt = do_event(qw/CWIE RMOB/, $app, $prm);
|
||||
}
|
||||
}
|
||||
|
||||
sub _open_file ($) {
|
||||
my($prm) =
|
||||
q"'----':obj {form:name, want:type(alis), " .
|
||||
q"seld:TEXT(@), from:'null'()}";
|
||||
|
||||
do_event(qw/aevt odoc/, $app, $prm, $_[0]);
|
||||
}
|
||||
|
||||
sub _doc_named ($) {
|
||||
my($prm) =
|
||||
q"'----':obj {form:test, want:type(docu), from:'null'(), " .
|
||||
q"seld:cmpd{relo:'= ', 'obj1':obj {form:prop, want:type" .
|
||||
q"(prop), seld:type(pnam), from:'exmn'()}, 'obj2':TEXT(@)}}";
|
||||
|
||||
my($evt) = do_event(qw/core getd/, $app, $prm, $_[0]);
|
||||
return($evt->{REPLY} eq 'aevt\ansr{}' ? undef : $evt);
|
||||
}
|
||||
|
||||
sub _full_path ($) {
|
||||
my($obj) = $_[0];
|
||||
my($prm) =
|
||||
q"'----':obj {form:prop, want:type(prop), seld:type(FILE), " .
|
||||
q"from:" . AEPrint($_[0]) . q"}, rtyp:type(TEXT)";
|
||||
my($evt) = do_event(qw/core getd/, $app, $prm);
|
||||
|
||||
return MacPerl::MakePath(
|
||||
MacUnpack('fss ', (
|
||||
AEGetParamDesc($evt->{REP}, keyDirectObject()))->data()->get()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
sub _save_errors_window ($) {
|
||||
my($prm) =
|
||||
q"'----':obj {form:name, want:type(alis), seld:TEXT(@), from:'null'()}";
|
||||
do_event(qw/MMPR SvMs/, $app, $prm, $_[0]);
|
||||
}
|
||||
|
||||
|
||||
sub _close_errors_window () {
|
||||
my($prm) =
|
||||
q"'----':obj {form:name, want:type(cwin), " .
|
||||
q"seld:TEXT(@), from:'null'()}";
|
||||
|
||||
my($evt) = do_event(qw/core clos/, $app, $prm, 'Errors & Warnings');
|
||||
return($evt->{REPLY} eq 'aevt\ansr{}' ? 1 : 0);
|
||||
}
|
||||
|
||||
sub _close () {
|
||||
my($prm) = q"'----':" . AEPrint($_[0]);
|
||||
do_event(qw/core clos/, $app, $prm);
|
||||
}
|
||||
|
||||
sub _get_dobj ($) {
|
||||
return(AEGetParamDesc($_[0]->{REP}, keyDirectObject()));
|
||||
}
|
||||
|
||||
sub _get_folder ($$) {
|
||||
require 'GUSI.ph';
|
||||
my($prompt, $default) = @_;
|
||||
MacPerl::Choose(
|
||||
GUSI::AF_FILE(), 0, $prompt, '',
|
||||
GUSI::CHOOSE_DIR() + ($default ? &GUSI::CHOOSE_DEFAULT : 0),
|
||||
$default
|
||||
);
|
||||
}
|
||||
|
||||
sub _save_appath ($$) {
|
||||
open(F, '>' . $_[0]) or die $!;
|
||||
print F $_[1];
|
||||
close(F);
|
||||
}
|
||||
|
||||
sub _test ($) {
|
||||
activate();
|
||||
my($path) = $_[0];
|
||||
build_project(
|
||||
"${path}modules:xml:macbuild:XML.mcp", '',
|
||||
"${path}build:mac:Mozilla.BuildLog.part"
|
||||
);
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
=pod
|
||||
|
||||
=back
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
=over 4
|
||||
|
||||
=item v1.02, September 23, 1998
|
||||
|
||||
Made fixes in finding and saving location of CodeWarrior IDE.
|
||||
|
||||
=item v1.01, June 1, 1998
|
||||
|
||||
Made fixes to C<chdir()> in C<activate()>, made C<activate()> more robust
|
||||
in finding CodeWarrior IDE, added global variable to NOT switch to IDE
|
||||
for each sent event, a few other fixes.
|
||||
|
||||
=item v1.00, May 30, 1998
|
||||
|
||||
First shot
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 AUTHORS
|
||||
|
||||
Chris Nandor F<E<lt>pudge@pobox.comE<gt>>, and the author of the
|
||||
original I<CodeWarriorLib>, Scott Collins F<E<lt>scc@netscape.comE<gt>>.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
BuildProject L<Moz>.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
|
||||
=cut
|
||||
4
mozilla/build/mac/CustomLib/CustomLib.c
Normal file
4
mozilla/build/mac/CustomLib/CustomLib.c
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
/* This library only exists to provide a dummy library for the final project */
|
||||
|
||||
/* There is nothing to do here. */
|
||||
BIN
mozilla/build/mac/CustomLib/CustomLib.mcp
Normal file
BIN
mozilla/build/mac/CustomLib/CustomLib.mcp
Normal file
Binary file not shown.
BIN
mozilla/build/mac/GenToc
Normal file
BIN
mozilla/build/mac/GenToc
Normal file
Binary file not shown.
260
mozilla/build/mac/GenToc.script
Normal file
260
mozilla/build/mac/GenToc.script
Normal file
@@ -0,0 +1,260 @@
|
||||
(*
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*)
|
||||
|
||||
(*
|
||||
GenToc - Generates a .toc file from the current contents of a project.
|
||||
|
||||
by Patrick C. Beard <beard@netscape.com>
|
||||
*)
|
||||
|
||||
on swapDelimiters(newDelimiters)
|
||||
set oldDelimiters to get AppleScript's text item delimiters
|
||||
set AppleScript's text item delimiters to newDelimiters
|
||||
return oldDelimiters
|
||||
end swapDelimiters
|
||||
|
||||
on setDelimiters(newDelimiters)
|
||||
set AppleScript's text item delimiters to newDelimiters
|
||||
end setDelimiters
|
||||
|
||||
on setExtension(fileName, newExtension)
|
||||
set oldDelimiters to swapDelimiters(".")
|
||||
set newFileName to (text item 1 of fileName) & newExtension
|
||||
setDelimiters(oldDelimiters)
|
||||
return newFileName
|
||||
end setExtension
|
||||
|
||||
on folderFromPath(filePath)
|
||||
set folderPath to ((filePath's text items 1 thru ((count of filePath's text items) - 1)) as string) & ":"
|
||||
return folderPath
|
||||
end folderFromPath
|
||||
|
||||
on fileFromPath(filePath)
|
||||
return last text item of filePath
|
||||
end fileFromPath
|
||||
|
||||
on openProject(aProjectFile)
|
||||
tell application "CodeWarrior IDE 3.3"
|
||||
open aProjectFile
|
||||
end tell
|
||||
end openProject
|
||||
|
||||
on selectProject(aProjectFile)
|
||||
set projectName to fileFromPath(aProjectFile as text)
|
||||
tell application "CodeWarrior IDE 3.3"
|
||||
if (name of window 1 is not projectName) then
|
||||
select window projectName
|
||||
end if
|
||||
end tell
|
||||
end selectProject
|
||||
|
||||
on getTargets()
|
||||
set targetList to {}
|
||||
set nameList to {}
|
||||
tell application "CodeWarrior IDE 3.3"
|
||||
set currentProject to project document 1
|
||||
repeat with targetIndex from 1 to (count of targets of currentProject)
|
||||
set currentTarget to (target targetIndex of currentProject)
|
||||
set targetList to targetList & {currentTarget}
|
||||
set nameList to nameList & {name of currentTarget}
|
||||
end repeat
|
||||
return {target:targetList, names:nameList}
|
||||
end tell
|
||||
end getTargets
|
||||
|
||||
(* uses "sort" scripting addition to sort a list of strings. *)
|
||||
on sortList(aList)
|
||||
if (aList {}) then
|
||||
return sort aList
|
||||
else
|
||||
return {}
|
||||
end if
|
||||
end sortList
|
||||
|
||||
(* uses "info for" scripting addition, to return the file type of a path. *)
|
||||
on getFileType(aFilePath)
|
||||
return file type of (info for alias aFilePath)
|
||||
end getFileType
|
||||
|
||||
(* returns all "TEXT" files of the named target. *)
|
||||
on getTargetFiles(targetKey)
|
||||
set targetFiles to {}
|
||||
tell application "CodeWarrior IDE 3.3"
|
||||
set currentProject to project document 1
|
||||
set currentTarget to (target targetKey of currentProject)
|
||||
try
|
||||
-- workaround for CW IDE 3.X bug, loop until error encountered.
|
||||
set fileIndex to 1
|
||||
repeat until false
|
||||
set targetFile to (target file fileIndex of currentTarget)
|
||||
-- only consider text files, since other platforms won't be managing binaries.
|
||||
-- also, only consider if target file is directly linked.
|
||||
if (linked of targetFile) then
|
||||
set targetFilePath to (Access Paths of targetFile)
|
||||
tell me
|
||||
if (getFileType(targetFilePath) = "TEXT") then
|
||||
set targetFiles to targetFiles & {targetFilePath}
|
||||
end if
|
||||
end tell
|
||||
end if
|
||||
set fileIndex to (fileIndex + 1)
|
||||
end repeat
|
||||
on error msg
|
||||
-- display dialog msg & " file count = " & fileIndex
|
||||
end try
|
||||
end tell
|
||||
return sortList(targetFiles)
|
||||
end getTargetFiles
|
||||
|
||||
on addTargetFile(targetFile, targetName)
|
||||
tell application "CodeWarrior IDE 3.3"
|
||||
add (project document 1) new target file with data {targetFile} to targets {targetName}
|
||||
end tell
|
||||
end addTargetFile
|
||||
|
||||
on setCurrentTarget(currentTargetName)
|
||||
tell application "CodeWarrior IDE 3.3"
|
||||
Set Current Target currentTargetName
|
||||
end tell
|
||||
end setCurrentTarget
|
||||
|
||||
on removeTargetFile(targetFile)
|
||||
tell application "CodeWarrior IDE 3.3"
|
||||
Remove Files {targetFile}
|
||||
end tell
|
||||
end removeTargetFile
|
||||
|
||||
on quote(aString)
|
||||
return "'" & aString & "'"
|
||||
end quote
|
||||
|
||||
on listContains(aList, anItem)
|
||||
repeat with listItem in aList
|
||||
if (listItem contains anItem) then
|
||||
return true
|
||||
end if
|
||||
end repeat
|
||||
return false
|
||||
end listContains
|
||||
|
||||
on showList(listToShow)
|
||||
choose from list listToShow with prompt "List:" with empty selection allowed
|
||||
end showList
|
||||
|
||||
on replace(aString, oldChar, newChar)
|
||||
set newString to ""
|
||||
repeat with aChar in (every character of aString)
|
||||
if (contents of aChar = oldChar) then
|
||||
set newString to newString & newChar
|
||||
else
|
||||
set newString to newString & aChar
|
||||
end if
|
||||
end repeat
|
||||
return newString
|
||||
end replace
|
||||
|
||||
on substring(aString, anOffset)
|
||||
set aSubString to ""
|
||||
repeat with charIndex from anOffset to (count aString)
|
||||
set aSubString to aSubString & (character charIndex of aString)
|
||||
end repeat
|
||||
return aSubString
|
||||
end substring
|
||||
|
||||
on setFileInfo(aFile, aCreator, aType)
|
||||
tell application "Finder"
|
||||
set creator type of aFile to aCreator
|
||||
set file type of aFile to aType
|
||||
end tell
|
||||
end setFileInfo
|
||||
|
||||
on closeFile(fileRef)
|
||||
try
|
||||
-- make sure it's not currently open.
|
||||
close access fileRef
|
||||
on error
|
||||
-- ignore error closing.
|
||||
end try
|
||||
end closeFile
|
||||
|
||||
on mroFile(aFile)
|
||||
try
|
||||
-- make sure it's modifiable.
|
||||
mro aFile
|
||||
on error
|
||||
-- ignore error MROing.
|
||||
end try
|
||||
end mroFile
|
||||
|
||||
on run
|
||||
-- so we can easily strip off file names from paths.
|
||||
set oldDelimiters to swapDelimiters(":")
|
||||
|
||||
set theProjectFile to (choose file with prompt "Choose a CW Project file." of type {"MMPr"})
|
||||
set theManifestFile to (new file with prompt "Create MANIFEST where?" default name setExtension(fileFromPath(theProjectFile as text), ".toc"))
|
||||
|
||||
set manifestRef to false
|
||||
|
||||
try
|
||||
-- make sure the file is closed & is modifiable.
|
||||
closeFile(theManifestFile)
|
||||
mroFile(theManifestFile)
|
||||
|
||||
-- open the new MANIFEST file.
|
||||
set manifestRef to (open for access theManifestFile with write permission)
|
||||
set eof manifestRef to 0
|
||||
|
||||
-- give it CodeWarrior look and feel.
|
||||
setFileInfo(theManifestFile, "CWIE", "TEXT")
|
||||
|
||||
openProject(theProjectFile)
|
||||
selectProject(theProjectFile)
|
||||
|
||||
set targetsList to getTargets()
|
||||
set targetNames to names of targetsList
|
||||
set targetCount to count items of targetNames
|
||||
|
||||
set mozillaTreePathOffset to (offset of "mozilla" in (theManifestFile as text))
|
||||
|
||||
-- dump all targets into the new MANIFEST file.
|
||||
repeat with targetName in targetNames
|
||||
write ("# target: " & targetName & return) to manifestRef
|
||||
setCurrentTarget(targetName)
|
||||
set targetFiles to getTargetFiles(contents of targetName)
|
||||
repeat with targetFile in targetFiles
|
||||
-- only store the path name relative to the source tree itself.
|
||||
set targetFilePath to substring(contents of targetFile, mozillaTreePathOffset)
|
||||
write (replace(targetFilePath, ":", "/") & return) to manifestRef
|
||||
end repeat
|
||||
end repeat
|
||||
on error msg
|
||||
display dialog msg
|
||||
end try
|
||||
if (manifestRef is not false) then
|
||||
closeFile(manifestRef)
|
||||
end if
|
||||
|
||||
-- shut the project down, and display the result.
|
||||
tell application "CodeWarrior IDE 3.3"
|
||||
activate
|
||||
Close Project
|
||||
open theManifestFile
|
||||
end tell
|
||||
|
||||
setDelimiters(oldDelimiters)
|
||||
end run
|
||||
105
mozilla/build/mac/IDE_Options.h
Normal file
105
mozilla/build/mac/IDE_Options.h
Normal file
@@ -0,0 +1,105 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
/*
|
||||
|
||||
This file overrides all option settings in the IDE. It is an attempt to allow all builds
|
||||
to have the same options.
|
||||
|
||||
Note: We can't use ConditionalMacros.h in this file because it will conflict with
|
||||
the PowerPlant precompiled headers.
|
||||
|
||||
*/
|
||||
|
||||
/* warning pragmas */
|
||||
#pragma warn_hidevirtual on
|
||||
#pragma warn_emptydecl on
|
||||
#pragma warn_unusedvar on
|
||||
#pragma warn_extracomma on
|
||||
#pragma warn_illpragma on
|
||||
#pragma warn_possunwant on
|
||||
#pragma warn_unusedarg off /* turned off to reduce warnings */
|
||||
|
||||
#pragma check_header_flags on
|
||||
|
||||
/* Language features that must be the same across libraries... */
|
||||
#pragma enumsalwaysint on
|
||||
#pragma unsigned_char off
|
||||
#pragma exceptions on
|
||||
#pragma bool on
|
||||
#pragma RTTI on
|
||||
|
||||
|
||||
/* Save as much space as possible with strings... */
|
||||
#pragma pool_strings on
|
||||
#pragma dont_reuse_strings off
|
||||
|
||||
#pragma options align=native
|
||||
#pragma sym on /* Takes no memory. OK in non-debug. */
|
||||
|
||||
|
||||
|
||||
#ifdef powerc /* ...generating PowerPC */
|
||||
#pragma toc_data on
|
||||
#pragma fp_contract on
|
||||
#pragma readonly_strings on
|
||||
|
||||
#ifdef DEBUG
|
||||
#pragma profile off /* Turn this on to profile the application. */
|
||||
/* Look for more details about profiling in nsMacMessagePump.cpp. */
|
||||
#pragma traceback on
|
||||
#pragma global_optimizer off
|
||||
#pragma scheduling off
|
||||
#pragma peephole off
|
||||
#pragma optimize_for_size off
|
||||
#else
|
||||
#pragma traceback on /* leave on until the final release, so MacsBug logs are interpretable */
|
||||
#pragma global_optimizer on
|
||||
#pragma optimization_level 4
|
||||
#pragma scheduling 603
|
||||
#pragma peephole on
|
||||
#pragma optimize_for_size on
|
||||
|
||||
#pragma opt_strength_reduction on
|
||||
#pragma opt_propagation on
|
||||
#pragma opt_loop_invariants on
|
||||
#pragma opt_lifetimes on
|
||||
#pragma opt_dead_code on
|
||||
#pragma opt_dead_assignments on
|
||||
#pragma opt_common_subs on
|
||||
#endif
|
||||
|
||||
#else /* ...generating 68k */
|
||||
#pragma code68020 on
|
||||
#pragma code68881 off
|
||||
|
||||
/* Far everything... */
|
||||
#pragma far_code
|
||||
#pragma far_data on
|
||||
#pragma far_strings on
|
||||
#pragma far_vtables on
|
||||
|
||||
#pragma fourbyteints on /* 4-byte ints */
|
||||
#pragma IEEEdoubles on /* 8-byte doubles (as required by Java and NSPR) */
|
||||
|
||||
#ifdef DEBUG
|
||||
#pragma macsbug on
|
||||
#pragma oldstyle_symbols off
|
||||
#else
|
||||
#pragma macsbug off
|
||||
#endif
|
||||
#endif
|
||||
5
mozilla/build/mac/MANIFEST
Normal file
5
mozilla/build/mac/MANIFEST
Normal file
@@ -0,0 +1,5 @@
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
IDE_Options.h
|
||||
217
mozilla/build/mac/MANIFESTO.pm
Normal file
217
mozilla/build/mac/MANIFESTO.pm
Normal file
@@ -0,0 +1,217 @@
|
||||
#!perl -w
|
||||
package MANIFESTO;
|
||||
|
||||
require 5.004;
|
||||
require Exporter;
|
||||
|
||||
#use strict;
|
||||
|
||||
use vars qw($VERSION @ISA @EXPORT $MANIFESTOLib);
|
||||
use Mac::StandardFile;
|
||||
use Moz;
|
||||
use Cwd;
|
||||
use Exporter;
|
||||
use File::Basename;
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(ReconcileProject);
|
||||
$VERSION = "1.00";
|
||||
|
||||
=head1 NAME
|
||||
|
||||
MANIFESTO - drives the Mac Project Reconciliation tool.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
You want to use this script. It will make your life easier.
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
|
||||
=cut
|
||||
|
||||
#
|
||||
# globals
|
||||
# $MANIFESTOLib - location of MANIFESTO applescript library
|
||||
#
|
||||
|
||||
#
|
||||
# utility routines
|
||||
#
|
||||
|
||||
sub current_directory()
|
||||
{
|
||||
my $current_directory = cwd();
|
||||
chop($current_directory) if ( $current_directory =~ m/:$/ );
|
||||
return $current_directory;
|
||||
}
|
||||
|
||||
# Uses the "compile script" extension to compile a script.
|
||||
sub compile_script($;$) {
|
||||
my($scriptPath, $outputPath) = @_;
|
||||
|
||||
#// generate a script to compile a script file.
|
||||
my $script = <<END_OF_APPLESCRIPT;
|
||||
store script (compile script (alias "$scriptPath")) in (file "$outputPath") replacing yes
|
||||
END_OF_APPLESCRIPT
|
||||
|
||||
#// run the script.
|
||||
MacPerl::DoAppleScript($script);
|
||||
}
|
||||
|
||||
# _useMANIFESTOLib()
|
||||
# returns 1 on success
|
||||
# Search the include path for the file called MANIFESTOLib
|
||||
sub _useMANIFESTOLib()
|
||||
{
|
||||
unless ( defined($MANIFESTOLib) )
|
||||
{
|
||||
my($scriptName) = "MANIFESTOLib.script";
|
||||
my($libName) = "MANIFESTOLib";
|
||||
# try the directory we were run from
|
||||
my($scriptPath) = dirname($0) . ":" . $scriptName;
|
||||
my($libPath) = dirname($0) . ":" . $libName;
|
||||
# make sure that the compiled script is up to date with the textual script.
|
||||
unless (-e $libPath && getModificationDate($libPath) >= getModificationDate($scriptPath)) {
|
||||
print "# Recompiling MANIFESTOLib.script.\n";
|
||||
compile_script($scriptPath, $libPath);
|
||||
}
|
||||
if ( -e $libPath) {
|
||||
$MANIFESTOLib = $libPath;
|
||||
} else {
|
||||
# now search the include directories
|
||||
foreach (@INC)
|
||||
{
|
||||
unless ( m/^Dev:Pseudo/ ) # This is some bizarre MacPerl special-case directory
|
||||
{
|
||||
$libPath = $_ . $libName;
|
||||
if (-e $libPath)
|
||||
{
|
||||
$MANIFESTOLib = $libPath;
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (! (-e $MANIFESTOLib)) {
|
||||
print STDERR "MANIFESTOLib lib could not be found! $MANIFESTOLib";
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
sub getModificationDate($) {
|
||||
my($filePath)=@_;
|
||||
my($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
|
||||
$atime,$mtime,$ctime,$blksize,$blocks) = stat($filePath);
|
||||
return $mtime;
|
||||
}
|
||||
|
||||
sub setExtension($;$;$) {
|
||||
my($filePath, $oldExtension, $newExtension)=@_;
|
||||
my($name, $dir, $type) = fileparse($filePath, $oldExtension);
|
||||
return "$dir$name$newExtension";
|
||||
}
|
||||
|
||||
#
|
||||
# ReconcileProject(projectPath, manifestoPath)
|
||||
#
|
||||
# Uses MANIFESTOLib AppleScript to reconcile the contents (toc?) of a
|
||||
# CodeWarrior project with an external MANIFEST file.
|
||||
#
|
||||
|
||||
sub ReconcileProject($;$) {
|
||||
#// turn this feature on by removing the following line.
|
||||
return 1;
|
||||
|
||||
my($projectPath, $manifestoPath) = @_;
|
||||
my($sourceTree) = current_directory();
|
||||
my($logPath) = setExtension($manifestoPath, ".toc", ".log");
|
||||
|
||||
print STDERR "# Reconciling Project: $projectPath with $manifestoPath\n";
|
||||
|
||||
#// compare the modification dates of the .toc and .log files. If .log is newer, do nothing.
|
||||
if (-e $logPath && getModificationDate($logPath) >= getModificationDate($manifestoPath)) {
|
||||
print "# Project is up to date.\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
_useMANIFESTOLib() || die "Could not load MANIFESTOLib\n";
|
||||
|
||||
my $script = <<END_OF_APPLESCRIPT;
|
||||
tell (load script file "$MANIFESTOLib") to ReconcileProject("$sourceTree:", "$sourceTree$projectPath", "$sourceTree$manifestoPath")
|
||||
END_OF_APPLESCRIPT
|
||||
|
||||
#// run the script, and store the results in a file called "$manifestoPath.log"
|
||||
my $asresult = substr(MacPerl::DoAppleScript($script), 1, -1); #// chops off leading, trailing quotes.
|
||||
|
||||
#// print out to STDOUT to show progress.
|
||||
print $asresult;
|
||||
|
||||
#// store the results in "$manifestoPath.log", which will act as a cache for later checks.
|
||||
open(OUTPUT, ">$logPath") || die "can't open log file $logPath.";
|
||||
print OUTPUT $asresult;
|
||||
close(OUTPUT);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
1;
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
MANIFESTO - Scripts to process source .toc files.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use MANIFESTO;
|
||||
ReconcileProject(<path to Mac project file>, <path to table of contents file>) || die "cannot reconcile project";
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This is a PERL interface for talking to MANIFESTOLib AppleScripts.
|
||||
|
||||
=item ReconcileProject
|
||||
ReconcileProject(<path to Mac project file>, <path to table of contents file>);
|
||||
|
||||
Reconciles the contents of a project with an external .toc file.
|
||||
|
||||
=cut
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
=over
|
||||
|
||||
=item MacCVS Home Page
|
||||
|
||||
http://www.maccvs.org/
|
||||
|
||||
=back
|
||||
|
||||
=head1 AUTHORS
|
||||
|
||||
Patrick Beard beard@netscape.com
|
||||
|
||||
based on work by
|
||||
|
||||
Aleks Totic atotic@netscape.com
|
||||
|
||||
=cut
|
||||
|
||||
__END__
|
||||
BIN
mozilla/build/mac/MANIFESTOLib
Normal file
BIN
mozilla/build/mac/MANIFESTOLib
Normal file
Binary file not shown.
372
mozilla/build/mac/MANIFESTOLib.script
Normal file
372
mozilla/build/mac/MANIFESTOLib.script
Normal file
@@ -0,0 +1,372 @@
|
||||
(*
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*)
|
||||
|
||||
(*
|
||||
MANIFESTOLib - Reconciles a CW Project file with an external table of contents file.
|
||||
|
||||
Uses merge sort, one pass per target.
|
||||
|
||||
by Patrick C. Beard <beard@netscape.com>
|
||||
*)
|
||||
|
||||
(* Global Configuration Properties *)
|
||||
|
||||
property pShowReport : true
|
||||
-- property pSourceTree : "Homeward:Work:Raptor:src:"
|
||||
property pSourceTree : "Morbeus:Projects:Raptor:src:"
|
||||
|
||||
on swapDelimiters(newDelimiters)
|
||||
set oldDelimiters to get AppleScript's text item delimiters
|
||||
set AppleScript's text item delimiters to newDelimiters
|
||||
return oldDelimiters
|
||||
end swapDelimiters
|
||||
|
||||
on setDelimiters(newDelimiters)
|
||||
set AppleScript's text item delimiters to newDelimiters
|
||||
end setDelimiters
|
||||
|
||||
-- replaces oldChar with newChar in a string.
|
||||
on replace(aString, oldChar, newChar)
|
||||
set newString to ""
|
||||
repeat with aChar in (every character of aString)
|
||||
if (contents of aChar = oldChar) then
|
||||
set newString to newString & newChar
|
||||
else
|
||||
set newString to newString & aChar
|
||||
end if
|
||||
end repeat
|
||||
return newString
|
||||
end replace
|
||||
|
||||
(* uses "sort" scripting addition to sort a list of strings. *)
|
||||
on sortList(aList)
|
||||
if (aList {}) then
|
||||
return sort aList
|
||||
else
|
||||
return {}
|
||||
end if
|
||||
end sortList
|
||||
|
||||
-- reads .toc file into a list.
|
||||
on readManifestFile(sourceTree, manifestFile)
|
||||
set oldDelimiters to swapDelimiters(return)
|
||||
set fileRef to false
|
||||
set fileLines to {}
|
||||
try
|
||||
set fileRef to (open for access manifestFile without write permission)
|
||||
-- read entire file into memory, use text items to delimit lines.
|
||||
set fileContents to (read fileRef)
|
||||
repeat with lineRef in (every text item of fileContents)
|
||||
-- ignore lines that start with "#" or are empty.
|
||||
set fileLine to (contents of lineRef)
|
||||
if (fileLine "") and not (fileLine starts with "#") then
|
||||
set fileLines to fileLines & (sourceTree & replace(fileLine, "/", ":"))
|
||||
end if
|
||||
end repeat
|
||||
on error
|
||||
-- ignore errors.
|
||||
end try
|
||||
if (fileRef is not false) then close access fileRef
|
||||
setDelimiters(oldDelimiters)
|
||||
return sortList(fileLines)
|
||||
end readManifestFile
|
||||
|
||||
(* both of the following depend on ":" as the delimiter character. *)
|
||||
|
||||
on folderFromPath(filePath)
|
||||
return ((filePath's text items 1 thru ((count of filePath's text items) - 1)) as string) & ":"
|
||||
end folderFromPath
|
||||
|
||||
on fileFromPath(filePath)
|
||||
return last text item of filePath
|
||||
end fileFromPath
|
||||
|
||||
(* CW Pro IDE Interface Handlers. *)
|
||||
|
||||
on openProject(aProjectFile)
|
||||
tell application "CodeWarrior IDE 3.3"
|
||||
-- activate
|
||||
open aProjectFile
|
||||
end tell
|
||||
end openProject
|
||||
|
||||
(* forces the named project file to be the front window. *)
|
||||
on selectProject(aProjectFile)
|
||||
set projectName to fileFromPath(aProjectFile as text)
|
||||
tell application "CodeWarrior IDE 3.3"
|
||||
if (name of window 1 is not projectName) then
|
||||
select window projectName
|
||||
end if
|
||||
end tell
|
||||
end selectProject
|
||||
|
||||
on closeProject(aProjectFile)
|
||||
tell application "CodeWarrior IDE 3.3"
|
||||
Close Project
|
||||
end tell
|
||||
end closeProject
|
||||
|
||||
on getTargets()
|
||||
set targetList to {}
|
||||
set nameList to {}
|
||||
tell application "CodeWarrior IDE 3.3"
|
||||
set currentProject to project document 1
|
||||
repeat with targetIndex from 1 to (count of targets of currentProject)
|
||||
set currentTarget to (target targetIndex of currentProject)
|
||||
set targetList to targetList & {currentTarget}
|
||||
set nameList to nameList & {name of currentTarget}
|
||||
end repeat
|
||||
return {target:targetList, names:nameList}
|
||||
end tell
|
||||
end getTargets
|
||||
|
||||
(* uses "info for" scripting addition, to return the file type of a path. *)
|
||||
on getFileType(aFilePath)
|
||||
return file type of (info for alias aFilePath)
|
||||
end getFileType
|
||||
|
||||
(* returns all "TEXT" files of the named target. *)
|
||||
on getTargetFiles(targetKey)
|
||||
set targetFiles to {}
|
||||
tell application "CodeWarrior IDE 3.3"
|
||||
set currentProject to project document 1
|
||||
set currentTarget to (target targetKey of currentProject)
|
||||
try
|
||||
-- workaround for CW IDE 3.X bug, loop until error encountered.
|
||||
set fileIndex to 1
|
||||
repeat until false
|
||||
set targetFile to (target file fileIndex of currentTarget)
|
||||
-- only consider text files, since other platforms won't be managing binaries.
|
||||
-- also, only consider if target file is directly linked.
|
||||
if (linked of targetFile) then
|
||||
set targetFilePath to (Access Paths of targetFile)
|
||||
tell me
|
||||
if (getFileType(targetFilePath) = "TEXT") then
|
||||
set targetFiles to targetFiles & {targetFilePath}
|
||||
end if
|
||||
end tell
|
||||
end if
|
||||
set fileIndex to (fileIndex + 1)
|
||||
end repeat
|
||||
on error msg
|
||||
-- display dialog msg & " file count = " & fileIndex
|
||||
end try
|
||||
end tell
|
||||
return sortList(targetFiles)
|
||||
end getTargetFiles
|
||||
|
||||
on addTargetFile(targetFile, targetList)
|
||||
tell application "CodeWarrior IDE 3.3"
|
||||
add (project document 1) new target file with data {targetFile} to targets targetList
|
||||
end tell
|
||||
end addTargetFile
|
||||
|
||||
global gCurrentTarget
|
||||
|
||||
on setCurrentTarget(currentTargetName)
|
||||
if (gCurrentTarget currentTargetName) then
|
||||
set gCurrentTarget to currentTargetName
|
||||
tell application "CodeWarrior IDE 3.3"
|
||||
Set Current Target currentTargetName
|
||||
end tell
|
||||
end if
|
||||
end setCurrentTarget
|
||||
|
||||
on removeTargetFile(targetFile)
|
||||
tell application "CodeWarrior IDE 3.3"
|
||||
Remove Files {targetFile}
|
||||
end tell
|
||||
end removeTargetFile
|
||||
|
||||
on quote(aString)
|
||||
return "'" & aString & "'"
|
||||
end quote
|
||||
|
||||
on listContains(aList, anItem)
|
||||
repeat with listItem in aList
|
||||
if (contents of listItem = anItem) then
|
||||
return true
|
||||
end if
|
||||
end repeat
|
||||
return false
|
||||
end listContains
|
||||
|
||||
on showList(aList)
|
||||
choose from list aList with prompt "List:" with empty selection allowed
|
||||
end showList
|
||||
|
||||
global gProjectModified
|
||||
|
||||
on ModifyReadOnly(aProjectFile)
|
||||
if (not gProjectModified) then
|
||||
set gProjectModified to true
|
||||
-- so CodeWarrior will notice, must close the file before MROing it.
|
||||
closeProject(aProjectFile)
|
||||
mro aProjectFile
|
||||
openProject(aProjectFile)
|
||||
selectProject(aProjectFile)
|
||||
end if
|
||||
end ModifyReadOnly
|
||||
|
||||
on makeStream(itemList)
|
||||
return {streamList:itemList, streamCount:count itemList, streamIndex:0}
|
||||
end makeStream
|
||||
|
||||
(* true is used as the end of stream value. *)
|
||||
property pEOS : true
|
||||
|
||||
on advanceStream(stream)
|
||||
set itemCount to (streamCount of stream)
|
||||
set itemIndex to (streamIndex of stream)
|
||||
if (itemIndex < itemCount) then
|
||||
set itemIndex to (itemIndex + 1)
|
||||
set (streamIndex of stream) to itemIndex
|
||||
return (item itemIndex of streamList of stream)
|
||||
else
|
||||
return pEOS
|
||||
end if
|
||||
end advanceStream
|
||||
|
||||
-- returns true if str2 is INFINITELY great, or str1 is less than str2.
|
||||
on precedes(str1, str2)
|
||||
return (str2 = pEOS) or ((str1 pEOS) and (str1 < str2))
|
||||
end precedes
|
||||
|
||||
on get_current_application()
|
||||
return last text item of ((path to current application) as text)
|
||||
end get_current_application
|
||||
|
||||
on get_frontmost_application()
|
||||
return last text item of ((path to frontmost application) as text)
|
||||
end get_frontmost_application
|
||||
|
||||
on activate_application(applicationName)
|
||||
tell application "Finder"
|
||||
set applicationProcess to (application process applicationName)
|
||||
set frontmost of applicationProcess to true
|
||||
end tell
|
||||
end activate_application
|
||||
|
||||
on ReconcileProject(sourceTree, projectPath, manifestoPath)
|
||||
-- so we can easily strip off file names from paths.
|
||||
set oldDelimiters to swapDelimiters(":")
|
||||
|
||||
-- initialize globals.
|
||||
set gCurrentTarget to ""
|
||||
set gProjectModified to false
|
||||
|
||||
-- convert paths to aliases.
|
||||
set projectFile to alias projectPath
|
||||
set manifestFile to alias manifestoPath
|
||||
|
||||
-- read the MANIFESTO file into a list of paths.
|
||||
set manifestContents to readManifestFile(sourceTree, manifestFile)
|
||||
-- return manifestContents
|
||||
|
||||
-- now, start processing the file items, ensuring that the project contains all items.
|
||||
openProject(projectFile)
|
||||
selectProject(projectFile)
|
||||
set targetsList to getTargets()
|
||||
set targetNames to names of targetsList
|
||||
|
||||
if (pShowReport) then
|
||||
set theReport to ""
|
||||
set addedFiles to ""
|
||||
set removedFiles to ""
|
||||
end if
|
||||
|
||||
-- push current application to front for speed.
|
||||
-- set frontmostApplication to get_frontmost_application()
|
||||
-- set currentApplication to get_current_application()
|
||||
-- activate_application(currentApplication)
|
||||
|
||||
-- reconcile all targets with the MANIFEST file.
|
||||
-- this loop should be recoded in PERL for speed.
|
||||
-- IDEA: with sorted lists, can scan both lists, like a merge sort, and make one pass per target.
|
||||
repeat with targetNameRef in targetNames
|
||||
-- switch targets because getTargetFiles now checks to see if file is linked in current target.
|
||||
set targetName to (contents of targetNameRef)
|
||||
set targetFiles to getTargetFiles(targetName)
|
||||
-- hopefully, this list test is fast.
|
||||
if (targetFiles manifestContents) then
|
||||
-- return {count targetFiles, count manifestContents, targetFiles, manifestContents}
|
||||
-- make sure the project file is modifiable.
|
||||
ModifyReadOnly(projectFile)
|
||||
setCurrentTarget(targetName)
|
||||
set targetStream to makeStream(targetFiles)
|
||||
set targetItem to advanceStream(targetStream)
|
||||
set manifestStream to makeStream(manifestContents)
|
||||
set manifestItem to advanceStream(manifestStream)
|
||||
repeat until (manifestItem is pEOS) and (targetItem is pEOS)
|
||||
-- display dialog "m: " & manifestItem & ", t: " & targetFileItem
|
||||
if (manifestItem = targetItem) then
|
||||
-- items match, advance both.
|
||||
set manifestItem to advanceStream(manifestStream)
|
||||
set targetItem to advanceStream(targetStream)
|
||||
else
|
||||
-- return {manifestItem, targetItem}
|
||||
if (precedes(manifestItem, targetItem)) then
|
||||
-- we have an item in manifest, not in project, so we have to add it to the targets.
|
||||
-- display dialog "adding " & manifestItem
|
||||
addTargetFile(manifestItem, targetNames)
|
||||
if pShowReport then
|
||||
set addedFiles to addedFiles & ("# " & (last text item of manifestItem) & return)
|
||||
end if
|
||||
set manifestItem to advanceStream(manifestStream)
|
||||
else
|
||||
-- we have an item not in manifest, but in project, so it must be removed from this target.
|
||||
-- display dialog "removing " & targetItem
|
||||
removeTargetFile(targetItem)
|
||||
if pShowReport then
|
||||
set removedFiles to removedFiles & ("# " & targetName & " - " & (last text item of targetItem) & return)
|
||||
end if
|
||||
set targetItem to advanceStream(targetStream)
|
||||
end if
|
||||
end if
|
||||
end repeat
|
||||
end if
|
||||
end repeat
|
||||
|
||||
-- activate_application(frontmostApplication)
|
||||
|
||||
-- commit the project changes, and optionally display a report.
|
||||
tell application "CodeWarrior IDE 3.3"
|
||||
-- leave project open for compilation phase?
|
||||
Close Project
|
||||
if pShowReport then
|
||||
if addedFiles is not "" then set theReport to ("# Added files: " & return & addedFiles)
|
||||
if removedFiles is not "" then set theReport to theReport & ("# Removed files: " & return & removedFiles)
|
||||
if (theReport is "") then set theReport to (" # Project is up to date." & return)
|
||||
-- display dialog theReport buttons {"OK"} default button "OK"
|
||||
end if
|
||||
end tell
|
||||
|
||||
-- restore AppleScript's delimiters.
|
||||
setDelimiters(oldDelimiters)
|
||||
|
||||
-- return 0 to indicate no error.
|
||||
return theReport
|
||||
end ReconcileProject
|
||||
|
||||
on run
|
||||
-- when run interactively,
|
||||
-- ask user which project/MANIFEST files to use.
|
||||
set projectPath to (choose file with prompt "Choose a CW Project file." of type {"MMPr"}) as text
|
||||
set manifestPath to (choose file with prompt "Choose a TOC file to process." of type {"TEXT"}) as text
|
||||
ReconcileProject(pSourceTree, projectPath, manifestPath)
|
||||
end run
|
||||
198
mozilla/build/mac/MacCVS.pm
Normal file
198
mozilla/build/mac/MacCVS.pm
Normal file
@@ -0,0 +1,198 @@
|
||||
#!perl -w
|
||||
package MacCVS;
|
||||
|
||||
# package Mac::Apps::MacCVS; this should really be the name of the package
|
||||
# but due to our directory hierarchy in mozilla, I am not doing it
|
||||
|
||||
require 5.004;
|
||||
require Exporter;
|
||||
|
||||
use strict;
|
||||
|
||||
use vars qw($VERSION @ISA @EXPORT $MacCVSLib);
|
||||
use Mac::StandardFile;
|
||||
use Moz;
|
||||
use Cwd;
|
||||
use Exporter;
|
||||
use File::Basename;
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw( new print checkout);
|
||||
$VERSION = "1.00";
|
||||
|
||||
# Architecture:
|
||||
# cvs session object:
|
||||
# name - session name
|
||||
# session_file - session file
|
||||
#
|
||||
# globals
|
||||
# $MacCVSLib - location of MacCVS applescript library
|
||||
#
|
||||
#
|
||||
|
||||
#
|
||||
# utility routines
|
||||
#
|
||||
|
||||
# just like Mac::DoAppleScript, 1 is success, 0 is failure
|
||||
sub _myDoAppleScript($)
|
||||
{
|
||||
my($script) = @_;
|
||||
my $asresult = MacPerl::DoAppleScript($script);
|
||||
if ($asresult eq "0")
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
print STDERR "AppleScript error: $asresult\n";
|
||||
print STDERR "AppleScript was: \n $script \n";
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
# _useMacCVSLib
|
||||
# returns 1 on success
|
||||
# Search the include path for the file called MacCVSLib
|
||||
sub _useMacCVSLib()
|
||||
{
|
||||
unless ( defined($MacCVSLib) )
|
||||
{
|
||||
my($libname) = "MacCVSLib";
|
||||
# try the directory we were run from
|
||||
my($c) = dirname($0) . ":" . $libname;
|
||||
if ( -e $c)
|
||||
{
|
||||
$MacCVSLib = $c;
|
||||
}
|
||||
else
|
||||
{
|
||||
# now search the include directories
|
||||
foreach (@INC)
|
||||
{
|
||||
unless ( m/^Dev:Pseudo/ ) # This is some bizarre MacPerl special-case directory
|
||||
{
|
||||
$c = $_ . $libname;
|
||||
if (-e $c)
|
||||
{
|
||||
$MacCVSLib = $c;
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (! (-e $MacCVSLib))
|
||||
{
|
||||
print STDERR "MacCVS lib could not be found! $MacCVSLib";
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Session object methods
|
||||
#
|
||||
|
||||
sub new {
|
||||
my ( $proto, $session_file) = @_;
|
||||
my $class = ref($proto) || $proto;
|
||||
my $self = {};
|
||||
|
||||
if ( defined($session_file) && ( -e $session_file) )
|
||||
{
|
||||
$self->{"name"} = basename( $session_file );
|
||||
$self->{"session_file"} = $session_file;
|
||||
bless $self, $class;
|
||||
return $self;
|
||||
}
|
||||
else
|
||||
{
|
||||
print STDERR "MacCVS->new cvs file < $session_file > does not exist\n";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
# makes sure that the session is open
|
||||
# assertSessionOpen()
|
||||
# returns 1 on failure
|
||||
sub assertSessionOpen() {
|
||||
my ($self) = shift;
|
||||
_useMacCVSLib() || die "Could not load MacCVSLib\n";
|
||||
my $script = <<END_OF_APPLESCRIPT;
|
||||
tell (load script file "$MacCVSLib") to OpenSession("$self->{session_file}")
|
||||
END_OF_APPLESCRIPT
|
||||
return _myDoAppleScript($script);
|
||||
}
|
||||
|
||||
# prints the cvs object, used mostly for debugging
|
||||
sub print {
|
||||
my($self) = shift;
|
||||
print "MacCVS:: name: ", $self->{name}, " session file: ", $self->{session_file}, "\n";
|
||||
}
|
||||
|
||||
# checkout( self, module, revision, date)
|
||||
# MacCVS checkout command
|
||||
# returns 1 on failure
|
||||
sub checkout {
|
||||
my($self, $module, $revision, $date ) = @_;
|
||||
unless( defined ($module) ) { $module = ""; } # get rid of the pesky undefined warnings
|
||||
unless( defined ($revision) ) { $revision = ""; }
|
||||
unless( defined ($date) ) { $date = ""; }
|
||||
|
||||
$self->assertSessionOpen() || return 1;
|
||||
|
||||
my $script = <<END_OF_APPLESCRIPT;
|
||||
tell (load script file "$MacCVSLib") to Checkout given sessionName:"$self->{name}", module:"$module", revision:"$revision", date:"$date"
|
||||
END_OF_APPLESCRIPT
|
||||
return _myDoAppleScript($script);
|
||||
}
|
||||
|
||||
1;
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
MacCVS - Interface to MacCVS
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use MacCVS;
|
||||
$session = MacCVS->new( <session_file_path>) || die "cannot create session";
|
||||
$session->checkout([module] [revision] [date]) || die "Could not check out";
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This is a MacCVS interface for talking to MacCVS Pro client.
|
||||
MacCVSSession is the class used to manipulate the session
|
||||
|
||||
=item new
|
||||
MacCVS->new( <cvs session file path>);
|
||||
|
||||
Creates a new session. Returns undef on failure.
|
||||
|
||||
=item checkout( <module> [revision] [date] )
|
||||
|
||||
cvs checkout command. Revision and date are optional
|
||||
returns 0 on failure
|
||||
|
||||
=cut
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
=over
|
||||
|
||||
=item MacCVS Home Page
|
||||
|
||||
http://www.maccvs.org/
|
||||
|
||||
=back
|
||||
|
||||
=head1 AUTHORS
|
||||
|
||||
Aleks Totic atotic@netscape.com
|
||||
|
||||
=cut
|
||||
|
||||
__END__
|
||||
BIN
mozilla/build/mac/MacCVSLib
Normal file
BIN
mozilla/build/mac/MacCVSLib
Normal file
Binary file not shown.
551
mozilla/build/mac/Moz.pm
Normal file
551
mozilla/build/mac/Moz.pm
Normal file
@@ -0,0 +1,551 @@
|
||||
=head1 NAME
|
||||
|
||||
B<Moz> - routines for automating CodeWarrior builds, and some extra-curricular activities related to building Mozilla
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use Moz;
|
||||
|
||||
OpenErrorLog(":::BuildLog");
|
||||
StopForErrors();
|
||||
|
||||
$Moz::QUIET = 1;
|
||||
InstallFromManifest(":projects:MANIFEST", $dist_dir);
|
||||
|
||||
BuildProjectClean(":projects:SomeProject.mcp", "SomeTarget");
|
||||
MakeAlias(":projects:SomeProject.shlb", $dist_dir);
|
||||
|
||||
DontStopForErrors();
|
||||
|
||||
BuildProject(":projects:SomeOtherProject.mcp", "SomeTarget");
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
B<Moz> comprises the routines needed to slap CodeWarrior around, force it to build a sequence of projects, report the results, and a few other things.
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
|
||||
|
||||
package Moz;
|
||||
require Exporter;
|
||||
|
||||
use Mac::Types;
|
||||
use Mac::Events;
|
||||
use Mac::Processes;
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(BuildProject BuildProjectClean OpenErrorLog MakeAlias StopForErrors DontStopForErrors InstallFromManifest InstallResources SetBuildNumber SetAgentString SetTimeBomb Delay ActivateApplication);
|
||||
@EXPORT_OK = qw(CloseErrorLog UseCodeWarriorLib QUIET);
|
||||
|
||||
use Cwd;
|
||||
use File::Path;
|
||||
use ExtUtils::Manifest 'maniread';
|
||||
|
||||
use CodeWarriorLib;
|
||||
|
||||
sub current_directory()
|
||||
{
|
||||
my $current_directory = cwd();
|
||||
chop($current_directory) if ( $current_directory =~ m/:$/ );
|
||||
return $current_directory;
|
||||
}
|
||||
|
||||
sub full_path_to($)
|
||||
{
|
||||
my ($path) = @_;
|
||||
if ( $path =~ m/^[^:]+$/ )
|
||||
{
|
||||
$path = ":" . $path;
|
||||
}
|
||||
|
||||
if ( $path =~ m/^:/ )
|
||||
{
|
||||
$path = current_directory() . $path;
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
=head2 Setup
|
||||
|
||||
Pretty much, everything is taken care of for you.
|
||||
However, B<Moz> does use a little compiled AppleScript library (the file CodeWarriorLib) for some of its communcication with CodeWarrior.
|
||||
If this library isn't in the same directory as "Moz.pm", then you need to tell B<Moz> where to find it.
|
||||
Call C<UseCodeWarriorLib($path_to_CodeWarriorLib)>.
|
||||
This routine is not exported by default, nor are you likely to need it.
|
||||
|
||||
=cut
|
||||
|
||||
sub UseCodeWarriorLib($)
|
||||
{
|
||||
# ($CodeWarriorLib) = @_;
|
||||
# $CodeWarriorLib = full_path_to($CodeWarriorLib);
|
||||
}
|
||||
|
||||
sub activate_CodeWarrior()
|
||||
{
|
||||
#MacPerl::DoAppleScript(<<END_OF_APPLESCRIPT);
|
||||
# tell (load script file "$CodeWarriorLib") to ActivateCodeWarrior()
|
||||
#END_OF_APPLESCRIPT
|
||||
}
|
||||
|
||||
BEGIN
|
||||
{
|
||||
# UseCodeWarriorLib(":CodeWarriorLib");
|
||||
# activate_CodeWarrior();
|
||||
CodeWarriorLib::activate();
|
||||
}
|
||||
|
||||
$logging = 0;
|
||||
$recent_errors_file = "";
|
||||
$stop_on_1st_error = 1;
|
||||
$QUIET = 0;
|
||||
|
||||
|
||||
|
||||
=head2 Logging all the errors and warnings - C<OpenErrorLog($log_file)>, C<CloseErrorLog()>
|
||||
|
||||
The warnings and errors generated in the course of building projects can be logged to a file.
|
||||
Tinderbox uses this facility to show why a remote build failed.
|
||||
|
||||
Logging is off by default.
|
||||
Start logging at any point in your build process with C<OpenErrorLog($log_file)>.
|
||||
Stop with C<CloseErrorLog()>.
|
||||
You never need to close the log explicitly, unless you want to just log a couple of projects in the middle of a big list.
|
||||
C<CloseErrorLog()> is not exported by default.
|
||||
|
||||
=cut
|
||||
|
||||
sub CloseErrorLog()
|
||||
{
|
||||
if ( $logging )
|
||||
{
|
||||
close(ERROR_LOG);
|
||||
$logging = 0;
|
||||
StopForErrors() if $stop_on_1st_error;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
sub OpenErrorLog($)
|
||||
{
|
||||
my ($log_file) = @_;
|
||||
|
||||
CloseErrorLog();
|
||||
if ( $log_file )
|
||||
{
|
||||
$log_file = full_path_to($log_file);
|
||||
|
||||
open(ERROR_LOG, ">$log_file") || die "Can't open logfile, check the file path.\n";
|
||||
MacPerl::SetFileInfo("CWIE", "TEXT", $log_file);
|
||||
|
||||
$log_file =~ m/.+:(.+)/;
|
||||
$recent_errors_file = full_path_to("$1.part");
|
||||
$logging = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
=head2 Stopping before it's too late - C<StopForErrors()>, C<DontStopForErrors()>
|
||||
|
||||
When building a long list of projects, you decide whether to continue building subsequent projects when one fails.
|
||||
By default, your build script will C<die> after the first project that generates an error while building.
|
||||
Change this behavior with C<DontStopForErrors()>.
|
||||
Re-enable it with C<StopForErrors()>.
|
||||
|
||||
=cut
|
||||
|
||||
sub StopForErrors()
|
||||
{
|
||||
$stop_on_1st_error = 1;
|
||||
|
||||
# Can't stop for errors unless we notice them.
|
||||
# Can't notice them unless we are logging.
|
||||
# If the user didn't explicitly request logging, log to a temporary file.
|
||||
|
||||
if ( ! $recent_errors_file )
|
||||
{
|
||||
OpenErrorLog("${TMPDIR}BuildResults");
|
||||
}
|
||||
}
|
||||
|
||||
sub DontStopForErrors()
|
||||
{
|
||||
$stop_on_1st_error = 0;
|
||||
}
|
||||
|
||||
sub log_message($)
|
||||
{
|
||||
if ( $logging )
|
||||
{
|
||||
my ($message) = @_;
|
||||
print ERROR_LOG $message;
|
||||
}
|
||||
}
|
||||
|
||||
sub log_message_with_time($)
|
||||
{
|
||||
if ( $logging )
|
||||
{
|
||||
my ($message) = @_;
|
||||
my $time_stamp = localtime();
|
||||
log_message("$message ($time_stamp)\n");
|
||||
}
|
||||
}
|
||||
|
||||
sub log_recent_errors($)
|
||||
{
|
||||
my ($project_name) = @_;
|
||||
my $found_errors = 0;
|
||||
|
||||
if ( $logging )
|
||||
{
|
||||
open(RECENT_ERRORS, "<$recent_errors_file");
|
||||
|
||||
while( <RECENT_ERRORS> )
|
||||
{
|
||||
if ( /^Error/ || /^CouldnÕt find project file/ || /^Link Error/ )
|
||||
{
|
||||
# if (!$found_errors)
|
||||
# print $_;
|
||||
$found_errors = 1;
|
||||
}
|
||||
print ERROR_LOG $_;
|
||||
}
|
||||
|
||||
close(RECENT_ERRORS);
|
||||
unlink("$recent_errors_file");
|
||||
}
|
||||
|
||||
if ( $stop_on_1st_error && $found_errors )
|
||||
{
|
||||
print ERROR_LOG "### Build failed.\n";
|
||||
die "### Errors encountered building \"$project_name\".\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub build_project($$$)
|
||||
{
|
||||
my ($project_path, $target_name, $clean_build) = @_;
|
||||
$project_path = full_path_to($project_path);
|
||||
|
||||
# $project_path =~ m/.+:(.+)/;
|
||||
# my $project_name = $1;
|
||||
|
||||
log_message_with_time("### Building \"$project_path\"");
|
||||
|
||||
# Check that the given project exists
|
||||
if (! -e $project_path)
|
||||
{
|
||||
print ERROR_LOG "### Build failed.\n";
|
||||
die "### Can't find project file \"$project_path\".\n";
|
||||
}
|
||||
|
||||
print "Building \"$project_path\[$target_name\]\"\n";
|
||||
|
||||
$had_errors = CodeWarriorLib::build_project(
|
||||
$project_path, $target_name, $recent_errors_file, $clean_build
|
||||
);
|
||||
WaitNextEvent();
|
||||
|
||||
# $had_errors =
|
||||
#MacPerl::DoAppleScript(<<END_OF_APPLESCRIPT);
|
||||
# tell (load script file "$CodeWarriorLib") to BuildProject("$project_path", "$project_name", "$target_name", "$recent_errors_file", $clean_build)
|
||||
#END_OF_APPLESCRIPT
|
||||
|
||||
# Append any errors to the globally accumulated log file
|
||||
# if ( $had_errors ) # Removed this test, because we want warnings, too. -- jrm
|
||||
{
|
||||
log_recent_errors($project_path);
|
||||
}
|
||||
}
|
||||
|
||||
=head2 Getting CodeWarrior to build projects - C<BuildProject($project, $opt_target)>, C<BuildProjectClean($project, $opt_target)>
|
||||
|
||||
C<BuildProject()> and C<BuildProjectClean()> are identical, except that the latter first removes object code.
|
||||
In both, CodeWarrior opens the project if it wasn't already open; builds the given (or else current) target; and finally closes
|
||||
the project, if it wasn't already open.
|
||||
|
||||
=cut
|
||||
|
||||
sub BuildProject($;$)
|
||||
{
|
||||
my ($project_path, $target_name) = @_;
|
||||
build_project($project_path, $target_name, 0);
|
||||
}
|
||||
|
||||
sub BuildProjectClean($;$)
|
||||
{
|
||||
my ($project_path, $target_name) = @_;
|
||||
build_project($project_path, $target_name, 1);
|
||||
}
|
||||
|
||||
|
||||
=head2 Miscellaneous
|
||||
|
||||
C<MakeAlias($old_file, $new_file)> functions like C<symlink()>, except with better argument defaulting and more explicit error messages.
|
||||
|
||||
=cut
|
||||
|
||||
sub MakeAlias($$)
|
||||
{
|
||||
my ($old_file, $new_file) = @_;
|
||||
|
||||
# if the directory to hold $new_file doesn't exist, create it
|
||||
if ( ($new_file =~ m/(.+:)/) && !-d $1 )
|
||||
{
|
||||
mkpath($1);
|
||||
}
|
||||
|
||||
# if a leaf name wasn't specified for $new_file, use the leaf from $old_file
|
||||
if ( ($new_file =~ m/:$/) && ($old_file =~ m/.+:(.+)/) )
|
||||
{
|
||||
$new_file .= $1;
|
||||
}
|
||||
|
||||
my $message = "Can't create a Finder alias (at \"$new_file\")\n for \"$old_file\"; because ";
|
||||
|
||||
die "$message \"$old_file\" doesn't exist.\n" unless -e $old_file;
|
||||
die "$message I won't replace an existing (non-alias) file with an alias.\n" if ( -e $new_file && ! -l $new_file );
|
||||
|
||||
# now: $old_file exists; $new_file doesn't (or else, is an alias already)
|
||||
|
||||
if ( -l $new_file )
|
||||
{
|
||||
# ...then see if it already points to $old_file
|
||||
my $current_target = full_path_to(readlink($new_file));
|
||||
my $new_target = full_path_to($old_file);
|
||||
|
||||
return if ( $current_target eq $new_target );
|
||||
# if the desired alias already exists and points to the right thing, then we're done
|
||||
|
||||
unlink $new_file;
|
||||
}
|
||||
|
||||
symlink($old_file, $new_file) || die "$message symlink returned an unexpected error.\n";
|
||||
}
|
||||
|
||||
|
||||
=pod
|
||||
|
||||
C<InstallFromManifest()>
|
||||
|
||||
=cut
|
||||
|
||||
sub InstallFromManifest($;$$)
|
||||
{
|
||||
my ($manifest_file, $dest_dir, $flat) = @_;
|
||||
|
||||
$flat = 0 unless defined($flat); # if $flat, all rel. paths in MANIFEST get aliased to the root of $dest_dir
|
||||
|
||||
$dest_dir ||= ":";
|
||||
|
||||
$manifest_file =~ m/(.+):/;
|
||||
my $source_dir = $1;
|
||||
|
||||
chop($dest_dir) if $dest_dir =~ m/:$/;
|
||||
|
||||
#Mac::Events->import();
|
||||
WaitNextEvent();
|
||||
if ($flat)
|
||||
{
|
||||
print "Doing manifest on \"$manifest_file\" FLAT\n" unless $QUIET;
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Doing manifest on \"$manifest_file\"\n" unless $QUIET;
|
||||
}
|
||||
|
||||
my $read = maniread(full_path_to($manifest_file));
|
||||
foreach $file (keys %$read)
|
||||
{
|
||||
next unless $file;
|
||||
|
||||
$subdir = ":";
|
||||
if (!$flat && ($file =~ /:.+:/ ))
|
||||
{
|
||||
$subdir = $&;
|
||||
}
|
||||
|
||||
$file = ":$file" unless $file =~ m/^:/;
|
||||
MakeAlias("$source_dir$file", "$dest_dir$subdir");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
=pod
|
||||
|
||||
C<InstallResources()>
|
||||
|
||||
=cut
|
||||
|
||||
# parameters are path to MANIFEST file, destination dir, true (to make copies) or false (to make aliases)
|
||||
sub InstallResources($;$;$)
|
||||
{
|
||||
my ($manifest_file, $dest_dir, $copy_files) = @_;
|
||||
|
||||
$dest_dir ||= ":";
|
||||
|
||||
$manifest_file =~ m/(.+):/;
|
||||
my $source_dir = $1;
|
||||
|
||||
chop($dest_dir) if $dest_dir =~ m/:$/;
|
||||
|
||||
WaitNextEvent();
|
||||
print "Installing resources from \"$manifest_file\"\n" unless $QUIET;
|
||||
|
||||
my $read = maniread(full_path_to($manifest_file));
|
||||
foreach $file (keys %$read)
|
||||
{
|
||||
next unless $file;
|
||||
|
||||
if ($copy_files)
|
||||
{
|
||||
print "Implement this if you need it";
|
||||
}
|
||||
else
|
||||
{
|
||||
MakeAlias("$source_dir:$file", "$dest_dir:$file");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sub SetBuildNumber
|
||||
{
|
||||
|
||||
open (OUTPUT, ">:mozilla:config:build_number") || die "could not open buildnumber";
|
||||
|
||||
open (BDATE, "perl :mozilla:config:bdate.pl|");
|
||||
|
||||
while (<BDATE>) {
|
||||
print OUTPUT $_;
|
||||
}
|
||||
|
||||
close (BDATE);
|
||||
close (OUTPUT);
|
||||
|
||||
system ("perl :mozilla:config:aboutime.pl :mozilla:xpfe:browser:src:navigator.xul :mozilla:config:build_number");
|
||||
|
||||
}
|
||||
|
||||
sub SetAgentString
|
||||
{
|
||||
|
||||
open (BDATE, ":mozilla:config:build_number") || die "could not open buildnumber";
|
||||
|
||||
while (<BDATE>) {
|
||||
$build_number = $_;
|
||||
}
|
||||
|
||||
close (BDATE);
|
||||
|
||||
open (ORIGFILE, ":mozilla:cmd:macfe:restext:custom.r") || die "no original file";
|
||||
open (OUTPUT, ">:mozilla:cmd:macfe:restext:agent.r") || die "no output file";
|
||||
|
||||
chop($build_number);
|
||||
|
||||
while (<ORIGFILE>) {
|
||||
|
||||
$tempstring = $_;
|
||||
if ($tempstring =~ "\#define VERSION_MAJOR_STR") {
|
||||
$tempstring = "\#define VERSION_MAJOR_STR \"5.0a1-" . $build_number . " Development\"\n";
|
||||
}
|
||||
print OUTPUT $tempstring;
|
||||
}
|
||||
|
||||
close (ORIGFILE);
|
||||
close (OUTPUT);
|
||||
|
||||
unlink (":mozilla:cmd:macfe:restext:custom.r");
|
||||
rename (":mozilla:cmd:macfe:restext:agent.r", ":mozilla:cmd:macfe:restext:custom.r");
|
||||
}
|
||||
|
||||
sub SetTimeBomb($$)
|
||||
|
||||
{
|
||||
my ($warn_days, $bomb_days) = @_;
|
||||
|
||||
system("perl :mozilla:config:mac-set-timebomb.pl $warn_days $bomb_days");
|
||||
|
||||
}
|
||||
|
||||
sub Delay($)
|
||||
|
||||
{
|
||||
my ($delay_seconds) = @_;
|
||||
|
||||
$now = time;
|
||||
|
||||
$exit_time = $now + $delay_seconds;
|
||||
|
||||
while ($exit_time > $now) {
|
||||
$now = time;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
sub ActivateApplication($)
|
||||
{
|
||||
my ($appSignature) = @_;
|
||||
my ($psi, $found);
|
||||
my ($appPSN);
|
||||
|
||||
$found = 0;
|
||||
|
||||
foreach $psi (values(%Process))
|
||||
{
|
||||
if ($psi->processSignature() eq $appSignature)
|
||||
{
|
||||
$appPSN = $psi->processNumber();
|
||||
$found = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
if ($found == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SetFrontProcess($appPSN);
|
||||
|
||||
while (GetFrontProcess() != $appPSN)
|
||||
{
|
||||
WaitNextEvent();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
=head1 AUTHORS
|
||||
|
||||
Scott Collins <scc@netscape.com>, Simon Fraser <sfraser@netscape.com>, Chris Yeh <cyeh@netscape.com>
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
BuildMozillaDebug.pl (et al), BuildList.pm, CodeWarriorLib (an AppleScript library)
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
The contents of this file are subject to the Netscape Public License
|
||||
Version 1.0 (the "NPL"); you may not use this file except in
|
||||
compliance with the NPL. You may obtain a copy of the NPL at
|
||||
http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
for the specific language governing rights and limitations under the
|
||||
NPL.
|
||||
|
||||
The Initial Developer of this code under the NPL is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
|
||||
=cut
|
||||
1379
mozilla/build/mac/NGLayoutBuildList.pm
Normal file
1379
mozilla/build/mac/NGLayoutBuildList.pm
Normal file
File diff suppressed because it is too large
Load Diff
39
mozilla/build/mac/NSCrossProductDefines.h
Normal file
39
mozilla/build/mac/NSCrossProductDefines.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#error "DonÕt use me!"
|
||||
|
||||
#define OLDROUTINELOCATIONS 0
|
||||
#define XP_MAC 1
|
||||
#define NSPR20 1
|
||||
#define _NO_FAST_STRING_INLINES_ 1
|
||||
#define HAVE_BOOLEAN 1
|
||||
#define NETSCAPE 1
|
||||
#define OTUNIXERRORS 1 /* We want OpenTransport error codes */
|
||||
|
||||
#define OJI 1
|
||||
|
||||
/*
|
||||
This compiles in heap dumping utilities and other good stuff
|
||||
for developers -- maybe we only want it in for a special SDK
|
||||
nspr/java runtime(?):
|
||||
*/
|
||||
#define DEVELOPER_DEBUG 1
|
||||
|
||||
#define MAX(_a,_b) ((_a) < (_b) ? (_b) : (_a))
|
||||
#define MIN(_a,_b) ((_a) < (_b) ? (_a) : (_b))
|
||||
57
mozilla/build/mac/PullNGlayout.pl
Normal file
57
mozilla/build/mac/PullNGlayout.pl
Normal file
@@ -0,0 +1,57 @@
|
||||
#!perl
|
||||
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
#
|
||||
# nglayout build script (debug)
|
||||
#
|
||||
use Mac::Processes;
|
||||
use NGLayoutBuildList;
|
||||
use Cwd;
|
||||
use Moz;
|
||||
|
||||
# configuration variables
|
||||
$DEBUG = 1;
|
||||
$pull{all} = 1;
|
||||
$pull{lizard} = 0;
|
||||
$pull{xpcom} = 0;
|
||||
$pull{imglib} = 0;
|
||||
$pull{netlib} = 0;
|
||||
$pull{nglayout} = 0;
|
||||
$pull{mac} = 0;
|
||||
|
||||
if ($pull{all})
|
||||
{
|
||||
foreach $k (keys(%pull))
|
||||
{
|
||||
$pull{$k} = 1;
|
||||
}
|
||||
}
|
||||
|
||||
# do the work
|
||||
# you should not have to edit anything bellow
|
||||
|
||||
chdir("::::");
|
||||
|
||||
Moz::StopForErrors();
|
||||
#Moz::DontStopForErrors();
|
||||
|
||||
#OpenErrorLog("::NGLayoutBuildLog");
|
||||
OpenErrorLog("NGLayoutPullLog"); # Tinderbox requires that name
|
||||
|
||||
Checkout();
|
||||
BIN
mozilla/build/mac/RunTSScript
Normal file
BIN
mozilla/build/mac/RunTSScript
Normal file
Binary file not shown.
908
mozilla/build/mac/TinderboxAppleScript.txt
Normal file
908
mozilla/build/mac/TinderboxAppleScript.txt
Normal file
@@ -0,0 +1,908 @@
|
||||
global PPCPROJECTFAILED
|
||||
global CVSSESSIONFILE
|
||||
global CVSSESSIONNAME
|
||||
global BUILDLIST
|
||||
global BUILDNAME
|
||||
global FOLDERTIME
|
||||
global SOURCEPATH
|
||||
global CHECKOUTTIME
|
||||
global TINDERBOXTREE
|
||||
global MACHINEADMIN
|
||||
global CLOBBERBUILD
|
||||
global STARTUPDISK
|
||||
global BINARYPATH
|
||||
property CONFIGFILENAME : "Tinderbox Config"
|
||||
|
||||
-------------------------
|
||||
on CreateLogFile(logFilePath)
|
||||
-- creates a "build log" file
|
||||
-------------------------
|
||||
global logFileID
|
||||
set logFileID to 0
|
||||
try
|
||||
set logFileID to open for access file logFilePath with write permission
|
||||
--set the type of alias logFilePath to "CWIE"
|
||||
on error errMsg2 number errNum
|
||||
if (errNum is not -49) then
|
||||
-- nothing to do about such errors
|
||||
error errMsg2 & " error = " & errNum
|
||||
end if
|
||||
end try
|
||||
end CreateLogFile
|
||||
|
||||
-------------------------
|
||||
on CloseLogFile()
|
||||
-- close log file
|
||||
-------------------------
|
||||
global logFileID
|
||||
if logFileID is not 0 then close access logFileID
|
||||
end CloseLogFile
|
||||
|
||||
-------------------------
|
||||
on logMessage(m)
|
||||
-- logs a message to the log file
|
||||
-------------------------
|
||||
global logFileID
|
||||
try
|
||||
if logFileID is not 0 then write (m as string) & (ASCII character 13) to logFileID
|
||||
--display dialog m
|
||||
on error
|
||||
-- hmmm??
|
||||
end try
|
||||
end logMessage
|
||||
|
||||
-------------------------
|
||||
on trim(q)
|
||||
-- strip leading and trailing white space.
|
||||
-------------------------
|
||||
set realLast to length of q
|
||||
repeat
|
||||
if realLast is 0 then exit repeat
|
||||
set c to character realLast of q
|
||||
if c is not space and c is not tab then exit repeat
|
||||
set realLast to realLast - 1
|
||||
end repeat
|
||||
if (realLast is 0) then return ""
|
||||
set realFirst to 1
|
||||
repeat
|
||||
if realFirst > realLast then exit repeat
|
||||
set c to character realFirst of q
|
||||
if c is not space and c is not tab then exit repeat
|
||||
set realFirst to realFirst + 1
|
||||
end repeat
|
||||
if (realFirst > realLast) then return ""
|
||||
return text realFirst through realLast of q
|
||||
end trim
|
||||
|
||||
-------------------------
|
||||
on Token(aString, tokenRequested)
|
||||
-- Return the string up to the first space. Input must be trimmed.
|
||||
-------------------------
|
||||
set tokenFirst to 0 -- offset of first char of current token
|
||||
set tokenCount to 0 -- which token we are examining
|
||||
set tokenScan to 0 -- offset of next character being examined
|
||||
set stringLength to length of aString
|
||||
if (tokenRequested = 0) then return ""
|
||||
repeat
|
||||
set tokenFirst to tokenFirst + 1
|
||||
set tokenCount to tokenCount + 1
|
||||
-- check for inital whitespace
|
||||
repeat
|
||||
set c to character tokenFirst of aString
|
||||
if c is not space and c is not tab then exit repeat
|
||||
set tokenFirst to tokenFirst + 1
|
||||
end repeat
|
||||
-- check for inital quote
|
||||
set isQuotedString to false
|
||||
if c is "\"" then
|
||||
set isQuotedString to true
|
||||
set tokenFirst to tokenFirst + 1
|
||||
end if
|
||||
-- scan for the next white space or the end of string
|
||||
set tokenScan to tokenFirst - 1
|
||||
repeat
|
||||
set tokenScan to tokenScan + 1
|
||||
if tokenScan > stringLength then exit repeat
|
||||
set c to character tokenScan of aString
|
||||
if (isQuotedString) then
|
||||
if c is "\"" then exit repeat
|
||||
else
|
||||
if c is space or c is tab then exit repeat -- whitespace
|
||||
end if
|
||||
end repeat
|
||||
-- Got a token
|
||||
if (tokenCount = tokenRequested) then
|
||||
return trim(text tokenFirst through (tokenScan - 1) of aString)
|
||||
end if
|
||||
if (tokenScan > stringLength) then return ""
|
||||
set tokenFirst to tokenScan
|
||||
end repeat
|
||||
end Token
|
||||
|
||||
-------------------------
|
||||
on monthNumber(dateObj)
|
||||
-------------------------
|
||||
set monthList to {January, February, March, April, May, Â
|
||||
June, July, August, September, October, November, December}
|
||||
set m to month of dateObj
|
||||
repeat with i from 1 to number of items of monthList
|
||||
if m = item i of monthList then
|
||||
return i
|
||||
end if
|
||||
end repeat
|
||||
end monthNumber
|
||||
|
||||
-------------------------
|
||||
on ExtractTimeString(d)
|
||||
-- given a date object, extract hh.mm
|
||||
-------------------------
|
||||
set tstring to ""
|
||||
set t to (time of d as integer)
|
||||
set m to (t div 60 as integer)
|
||||
set h to m div 60
|
||||
set m to (m - h * 60)
|
||||
if (h < 10) then set tstring to tstring & "0"
|
||||
set tstring to tstring & h
|
||||
if (m < 10) then set tstring to tstring & "0"
|
||||
set tstring to tstring & m
|
||||
return tstring
|
||||
end ExtractTimeString
|
||||
|
||||
-------------------------
|
||||
on ExtractDateString(d)
|
||||
-- given a date object, extract yy/mm/dd
|
||||
-------------------------
|
||||
set dstring to (year of d) & "."
|
||||
set m to monthNumber(d)
|
||||
if (m < 10) then set dstring to dstring & "0"
|
||||
set dstring to dstring & m & "."
|
||||
set d to (day of d)
|
||||
if (d < 10) then set dstring to dstring & "0"
|
||||
set dstring to dstring & d
|
||||
return dstring
|
||||
end ExtractDateString
|
||||
|
||||
-------------------------
|
||||
on GetCVSTimeStamp(d)
|
||||
-- turns AppleScript date object into a text CVS type time stamp
|
||||
-- suitable for passing into MacCVS
|
||||
-------------------------
|
||||
set dstring to ""
|
||||
set m to monthNumber(d)
|
||||
if (m < 10) then set dstring to "0"
|
||||
set dstring to m & "/"
|
||||
set dayNum to (day of d)
|
||||
if (dayNum < 10) then set dstring to dstring & "0"
|
||||
set dstring to dstring & dayNum & "/"
|
||||
set theYear to ((year of d) as string)
|
||||
set dstring to dstring & {characters 3 thru 4 of theYear}
|
||||
|
||||
set tstring to ""
|
||||
set t to (time of d as integer)
|
||||
set m to (t div 60 as integer)
|
||||
set h to m div 60
|
||||
set m to (m - h * 60)
|
||||
if (h < 10) then set tstring to tstring & "0"
|
||||
set tstring to tstring & h & ":"
|
||||
if (m < 10) then set tstring to tstring & "0"
|
||||
set tstring to tstring & m & ":"
|
||||
set s to (t mod 60)
|
||||
if (s < 10) then set tstring to tstring & 0
|
||||
set tstring to tstring & s
|
||||
|
||||
set theresult to ((dstring & " " & tstring & " PST") as string)
|
||||
return theresult
|
||||
end GetCVSTimeStamp
|
||||
|
||||
-------------------------
|
||||
on GetTimeStamp()
|
||||
-- returns a numeric string given for a date object
|
||||
-------------------------
|
||||
set d to current date
|
||||
set dstring to ExtractDateString(d) & "." & ExtractTimeString(d)
|
||||
set dstring to dstring as string
|
||||
return dstring
|
||||
end GetTimeStamp
|
||||
|
||||
-------------------------
|
||||
-- given a full path, return the name of the last object
|
||||
on GetCVSSessionName(path)
|
||||
-- given a mac style path, return the string name of the
|
||||
-- last object in a path
|
||||
-------------------------
|
||||
set going to true
|
||||
set i to the length of path
|
||||
|
||||
repeat while going is true
|
||||
set theChar to character i of path
|
||||
if theChar is ":" then
|
||||
set going to false
|
||||
end if
|
||||
set i to i - 1
|
||||
end repeat
|
||||
set sessionName to (characters {i + 2} thru length of path)
|
||||
return sessionName as string
|
||||
end GetCVSSessionName
|
||||
|
||||
-------------------------
|
||||
on doOnePPCProject(projpath, targetName)
|
||||
-- process one PPC project, given path to project and the target
|
||||
-- if target is "" build frontmost target (the default)
|
||||
-------------------------
|
||||
global gDoAliases
|
||||
set noError to false
|
||||
with timeout of 3600 seconds (* one hour*)
|
||||
|
||||
try
|
||||
tell application "CodeWarrior IDE 3.2"
|
||||
open {projpath}
|
||||
end tell
|
||||
on error errMsg number errNum
|
||||
logMessage("Error : Can't open project " & projpath)
|
||||
set PPCPROJECTFAILED to true
|
||||
error
|
||||
end try
|
||||
|
||||
if targetName is not "" then
|
||||
tell application "CodeWarrior IDE 3.2"
|
||||
Set Current Target (targetName as string)
|
||||
end tell
|
||||
end if
|
||||
|
||||
try
|
||||
tell application "CodeWarrior IDE 3.2"
|
||||
set myErrors to Make Project
|
||||
end tell
|
||||
on error number errNum
|
||||
if errNum < 0 then
|
||||
set noError to true
|
||||
end if
|
||||
end try
|
||||
if noError is false then
|
||||
tell application "CodeWarrior IDE 3.2"
|
||||
set theProjectName to my GetProjectName(projpath)
|
||||
Save Error Window As {STARTUPDISK & ":" & FOLDERTIME & ":" & theProjectName & ".txt"}
|
||||
end tell
|
||||
set PPCPROJECTFAILED to true
|
||||
end if
|
||||
tell application "CodeWarrior IDE 3.2"
|
||||
Close Project
|
||||
end tell
|
||||
end timeout
|
||||
return (noError)
|
||||
end doOnePPCProject
|
||||
|
||||
|
||||
-------------------------
|
||||
on ReadLn(fileRefNum)
|
||||
-- strip empty lines and strip terminal comments
|
||||
-------------------------
|
||||
try
|
||||
repeat
|
||||
set q to read fileRefNum before return
|
||||
if q is not "" then
|
||||
set hashOffset to offset of "#" in q
|
||||
if (hashOffset is 0) then set hashOffset to offset of "//" in q
|
||||
if (hashOffset > 1) then
|
||||
set q to text 1 thru (hashOffset - 1) of q
|
||||
end if
|
||||
if hashOffset is not 1 and q is not "" then
|
||||
-- strip trailing white space.
|
||||
set q to trim(q)
|
||||
if q is not "" then return q
|
||||
end if
|
||||
end if
|
||||
end repeat
|
||||
on error errString number errNum
|
||||
if errNum is -39 then -- no more lines (eof)
|
||||
return ""
|
||||
end if
|
||||
ErrorMessage(errString)
|
||||
error errString
|
||||
return errString
|
||||
end try
|
||||
end ReadLn
|
||||
|
||||
on ProcessList(theListFile)
|
||||
try
|
||||
with timeout of 14400 seconds -- four hours
|
||||
tell application "MacPerl"
|
||||
Do Script {theListFile as alias}
|
||||
end tell
|
||||
end timeout
|
||||
on error
|
||||
end try
|
||||
|
||||
end ProcessList
|
||||
|
||||
(* Initialize script. Read Config file. Get source directory *)
|
||||
on Initialize()
|
||||
|
||||
try
|
||||
-- find the config file at the same level as this applescript
|
||||
-- if you're running this in script debugger, uncomment lines below
|
||||
set oldDelimiters to AppleScript's text item delimiters
|
||||
set myPath to (path to me) as text
|
||||
set AppleScript's text item delimiters to {":"}
|
||||
set pl to (every text item of myPath)
|
||||
set configPath to (items 1 thru ((count of pl) - 1) of pl) as string
|
||||
set configPath to configPath & ":" & CONFIGFILENAME
|
||||
set AppleScript's text item delimiters to oldDelimiters
|
||||
|
||||
set f to 0
|
||||
|
||||
-- DEBUG
|
||||
-- uncomment this for debugging
|
||||
-- set configPath to "Forge:Tinderbox:cm:client:mac:contbuild:Tinderbox Config"
|
||||
set f to open for access {configPath as alias}
|
||||
|
||||
set MACHINEADMIN to ReadLn(f)
|
||||
set TINDERBOXTREE to ReadLn(f)
|
||||
set BUILDNAME to ReadLn(f)
|
||||
|
||||
set clobberstring to ReadLn(f)
|
||||
if clobberstring is "Clobber" then
|
||||
set CLOBBERBUILD to true
|
||||
else
|
||||
set CLOBBERBUILD to false
|
||||
end if
|
||||
|
||||
set CVSSESSIONFILE to ReadLn(f)
|
||||
set BUILDLIST to ReadLn(f)
|
||||
set BINARYPATH to ReadLn(f)
|
||||
|
||||
if f is not 0 then
|
||||
close access f
|
||||
end if
|
||||
on error
|
||||
display dialog "Failed to read config file!"
|
||||
end try
|
||||
|
||||
set CHECKOUTTIME to GetCVSTimeStamp(current date)
|
||||
|
||||
set SOURCEPATH to getLocalCVSRoot(CVSSESSIONFILE)
|
||||
|
||||
tell application "Finder"
|
||||
set STARTUPDISK to name of startup disk
|
||||
end tell
|
||||
|
||||
createLogDirectory(STARTUPDISK & ":")
|
||||
CreateLogFile(STARTUPDISK & ":" & FOLDERTIME & ":" & "Tinderbox Script Log")
|
||||
|
||||
logMessage("Machine Administrator: " & MACHINEADMIN)
|
||||
logMessage("Building to Tinderbox Tree: " & TINDERBOXTREE)
|
||||
logMessage("Building: " & BUILDNAME)
|
||||
|
||||
if (CLOBBERBUILD) then
|
||||
logMessage("Building Clobber")
|
||||
else
|
||||
logMessage("Building Depend")
|
||||
end if
|
||||
logMessage("CVS Session file at: " & CVSSESSIONFILE)
|
||||
logMessage("BuildList at: " & BUILDLIST)
|
||||
logMessage("Binary file at: " & BINARYPATH)
|
||||
return true
|
||||
|
||||
end Initialize
|
||||
|
||||
-- given a full path, return the name of the last object
|
||||
on GetProjectName(path)
|
||||
set going to true
|
||||
set i to the length of path
|
||||
repeat while going is true
|
||||
set theChar to character i of path
|
||||
if theChar is ":" then
|
||||
set going to false
|
||||
end if
|
||||
set i to i - 1
|
||||
end repeat
|
||||
return (characters {i + 2} thru length of path)
|
||||
end GetProjectName
|
||||
|
||||
|
||||
on notifyHook(result)
|
||||
if result is true then
|
||||
tell application "Eudora Pro 3.1"
|
||||
activate
|
||||
set newMsg to make new message at end of mailbox "Out" of mail folder ""
|
||||
set field "Subject:" of newMsg to "Mac Continous Build FAILED"
|
||||
set body of newMsg to "
|
||||
The last Mac Continous Build Failed at: " & " " & {CHECKOUTTIME as text} & "
|
||||
Since you are on the hook, you might be responsible for the breakage.
|
||||
|
||||
Please check the logs at: http://warp/tinderbox/showbuilds.cgi?tree=" & TINDERBOXTREE & "
|
||||
|
||||
to see if you busted the build."
|
||||
set field "To:" of newMsg to "bonsai-hook"
|
||||
activate
|
||||
queue message newMsg
|
||||
connect with sending without checking
|
||||
end tell
|
||||
end if
|
||||
end notifyHook
|
||||
|
||||
on notifyTinderBoxStart()
|
||||
try
|
||||
tell application "Eudora Pro 3.1"
|
||||
activate
|
||||
set newMsg to make new message at end of mailbox "Out" of mail folder ""
|
||||
set body of newMsg to "
|
||||
|
||||
tinderbox: tree: " & TINDERBOXTREE & "
|
||||
tinderbox: builddate: " & CHECKOUTTIME & "
|
||||
tinderbox: status: building
|
||||
tinderbox: build: " & BUILDNAME & "
|
||||
tinderbox: errorparser: mac
|
||||
"
|
||||
set field "To:" of newMsg to "tinderbox-daemon@warp"
|
||||
activate
|
||||
queue message newMsg
|
||||
connect with sending without checking
|
||||
quit
|
||||
end tell
|
||||
on error
|
||||
CloseLogFile()
|
||||
display dialog "MAIL SERVER ERROR: CAN'T SEND COMPLETION E-MAIL. SCRIPT HALTED"
|
||||
error number -128
|
||||
end try
|
||||
|
||||
end notifyTinderBoxStart
|
||||
|
||||
on notifyTinderBox(result)
|
||||
try
|
||||
if result is true then
|
||||
|
||||
tell application "Finder"
|
||||
set thelist to (every file of folder (STARTUPDISK & ":" & FOLDERTIME & ":"))
|
||||
end tell
|
||||
|
||||
set numFiles to count of thelist
|
||||
set i to 1
|
||||
set aliasList to {}
|
||||
|
||||
repeat numFiles times
|
||||
set aliasList to aliasList & (item i of thelist as alias)
|
||||
set i to i + 1
|
||||
end repeat
|
||||
|
||||
tell application "Eudora Pro 3.1"
|
||||
activate
|
||||
set newMsg to make new message at end of mailbox "Out" of mail folder ""
|
||||
attach to newMsg documents aliasList
|
||||
set field "Subject:" of newMsg to "Mac Continous Build FAILED"
|
||||
set body of newMsg to "
|
||||
|
||||
tinderbox: tree: " & TINDERBOXTREE & "
|
||||
tinderbox: builddate: " & CHECKOUTTIME & "
|
||||
tinderbox: status: busted
|
||||
tinderbox: build: " & BUILDNAME & "
|
||||
tinderbox: errorparser: mac
|
||||
"
|
||||
set field "To:" of newMsg to "tinderbox-daemon@warp"
|
||||
activate
|
||||
queue message newMsg
|
||||
connect with sending without checking
|
||||
quit
|
||||
end tell
|
||||
end if
|
||||
|
||||
if result is false then
|
||||
|
||||
tell application "Finder"
|
||||
set thelist to (every file of folder (STARTUPDISK & ":" & FOLDERTIME & ":"))
|
||||
end tell
|
||||
|
||||
set numFiles to count of thelist
|
||||
set i to 1
|
||||
set aliasList to {}
|
||||
|
||||
repeat numFiles times
|
||||
set aliasList to aliasList & (item i of thelist as alias)
|
||||
set i to i + 1
|
||||
end repeat
|
||||
|
||||
tell application "Eudora Pro 3.1"
|
||||
activate
|
||||
set newMsg to make new message at end of mailbox "Out" of mail folder ""
|
||||
set field "Subject:" of newMsg to "Mac Continous Build SUCCEEDED"
|
||||
set body of newMsg to "
|
||||
|
||||
tinderbox: tree: " & TINDERBOXTREE & "
|
||||
tinderbox: builddate: " & CHECKOUTTIME & "
|
||||
tinderbox: status: success
|
||||
tinderbox: build: " & BUILDNAME & "
|
||||
tinderbox: errorparser: mac
|
||||
"
|
||||
set field "To:" of newMsg to "tinderbox-daemon@warp"
|
||||
activate
|
||||
queue message newMsg
|
||||
connect with sending without checking
|
||||
quit
|
||||
end tell
|
||||
end if
|
||||
on error
|
||||
CloseLogFile()
|
||||
display dialog "MAIL SERVER ERROR: CAN'T SEND COMPLETION E-MAIL. SCRIPT HALTED"
|
||||
error number -128
|
||||
end try
|
||||
|
||||
end notifyTinderBox
|
||||
|
||||
on PageAdmin(pageMesg)
|
||||
tell application "Eudora Pro 3.1"
|
||||
activate
|
||||
set newMsg to make new message at end of mailbox "Out" of mail folder ""
|
||||
set field "To:" of newMsg to MACHINEADMIN
|
||||
set field "Subject:" of newMsg to TINDERBOXTREE & " " & BUILDNAME & " Continous Build failed"
|
||||
if pageMesg is not "" then
|
||||
set body of newMsg to pageMesg
|
||||
end if
|
||||
activate
|
||||
queue message newMsg
|
||||
connect with sending without checking
|
||||
quit
|
||||
end tell
|
||||
end PageAdmin
|
||||
|
||||
-- remove all directories from the local root, removing the old tree
|
||||
on removeOldTree()
|
||||
|
||||
try
|
||||
tell application "Finder"
|
||||
open folder (SOURCEPATH as string)
|
||||
select every item of item of container window of folder (SOURCEPATH as string)
|
||||
delete selection
|
||||
close container window of folder (SOURCEPATH as string)
|
||||
empty trash
|
||||
end tell
|
||||
on error
|
||||
CloseLogFile()
|
||||
set PPCPROJECTFAILED to true
|
||||
logMessage("Error : Couldn't delete the old tree.")
|
||||
PageAdmin("Couldn't nuke old tree!")
|
||||
display dialog ("Couldn't nuke old tree! SCRIPT HALTED")
|
||||
error number -128
|
||||
end try
|
||||
|
||||
end removeOldTree
|
||||
|
||||
-- remove the 'dist' directory from the local root
|
||||
on removeOldDist() --¥
|
||||
|
||||
try
|
||||
tell application "Finder"
|
||||
set distPath to SOURCEPATH & ":mozilla:dist"
|
||||
open folder (distPath as string)
|
||||
select every item of item of container window of folder (distPath as string)
|
||||
delete selection
|
||||
close container window of folder (distPath as string)
|
||||
empty trash
|
||||
end tell
|
||||
on error
|
||||
CloseLogFile()
|
||||
set PPCPROJECTFAILED to true
|
||||
logMessage("Error : Couldn't delete the old 'dist' directory.")
|
||||
PageAdmin("Couldn't nuke old 'dist' directory!")
|
||||
display dialog ("Couldn't nuke old 'dist' directory! SCRIPT HALTED")
|
||||
error number -128
|
||||
end try
|
||||
|
||||
end removeOldDist
|
||||
|
||||
on checkoutModule(cvsmodule, cvsRevision)
|
||||
|
||||
try
|
||||
with timeout of 1800 seconds (* 30 minutes *)
|
||||
if cvsRevision is "" then
|
||||
tell application "MacCVS Pro 2.1b2r1 PPC"
|
||||
tell session CVSSESSIONNAME
|
||||
activate
|
||||
checkout module cvsmodule
|
||||
end tell
|
||||
end tell
|
||||
else
|
||||
tell application "MacCVS Pro 2.1b2r1 PPC"
|
||||
tell session CVSSESSIONNAME
|
||||
activate
|
||||
checkout module cvsmodule revision cvsRevision
|
||||
end tell
|
||||
end tell
|
||||
end if
|
||||
end timeout
|
||||
if cvsRevision is "" then
|
||||
logMessage("Check-out of " & cvsmodule & "successful!")
|
||||
else
|
||||
logMessage("Check-out of " & cvsmodule & "at revision: " & cvsRevision & " successful!")
|
||||
end if
|
||||
on error errMsg number errNum
|
||||
if cvsRevision is "" then
|
||||
set PPCPROJECTFAILED to true
|
||||
logMessage("Error : Can't check out module: " & cvsmodule & " revision: Tip")
|
||||
logMessage("Error : " & errMsg)
|
||||
error "Can't check out module"
|
||||
else
|
||||
set PPCPROJECTFAILED to true
|
||||
logMessage("Error : Can't check out module: " & cvsmodule & " revision: " & cvsRevision)
|
||||
logMessage("Error : " & errMsg)
|
||||
error "Can't check out module"
|
||||
end if
|
||||
end try
|
||||
|
||||
end checkoutModule
|
||||
|
||||
on checkOutTree(pathToCVSSession)
|
||||
|
||||
try
|
||||
set oldDelimiters to AppleScript's text item delimiters
|
||||
set myPath to (path to me) as text
|
||||
set AppleScript's text item delimiters to {":"}
|
||||
set pl to (every text item of myPath)
|
||||
set configPath to (items 1 thru ((count of pl) - 1) of pl) as string
|
||||
set configPath to configPath & ":" & CONFIGFILENAME
|
||||
set AppleScript's text item delimiters to oldDelimiters
|
||||
|
||||
set f to 0
|
||||
|
||||
-- set configPath to "Forge:Tinderbox:cm:client:mac:contbuild:Tinderbox Config"
|
||||
set f to open for access {configPath as alias}
|
||||
(* read past the cruft of the config file *)
|
||||
ReadLn(f)
|
||||
ReadLn(f)
|
||||
ReadLn(f)
|
||||
ReadLn(f)
|
||||
ReadLn(f)
|
||||
ReadLn(f)
|
||||
ReadLn(f)
|
||||
on error
|
||||
CloseLogFile()
|
||||
set PPCPROJECTFAILED to true
|
||||
logMessage("Couldn't check-out the tree: couldn't read modules" & return)
|
||||
logMessage(errMsg)
|
||||
PageAdmin("Couldn't check-out the tree: couldn't read modules")
|
||||
display dialog "Couldn't read modules from config file: SCRIPT HALTED"
|
||||
error number -128
|
||||
end try
|
||||
|
||||
-- open the session
|
||||
tell application "MacCVS Pro 2.1b2r1 PPC"
|
||||
activate
|
||||
open {pathToCVSSession as alias}
|
||||
end tell
|
||||
|
||||
try
|
||||
repeat
|
||||
set cvsmodule to ReadLn(f)
|
||||
if cvsmodule is "" then exit repeat
|
||||
if cvsmodule = "CVS Session" then
|
||||
switchCVSSession(f)
|
||||
else
|
||||
set revision to Token(cvsmodule, 2)
|
||||
set cvsmodule to Token(cvsmodule, 1)
|
||||
checkoutModule(cvsmodule, revision)
|
||||
end if
|
||||
end repeat
|
||||
logMessage("### Checked-out all required modules")
|
||||
on error
|
||||
--¥tell application "MacCVS Pro 2.1b2r1 PPC"
|
||||
--¥quit
|
||||
--¥end tell
|
||||
-- toss something up to run()
|
||||
error
|
||||
end try
|
||||
|
||||
--¥tell application "MacCVS Pro 2.1b2r1 PPC"
|
||||
--¥quit
|
||||
--¥end tell
|
||||
|
||||
end checkOutTree
|
||||
|
||||
on switchCVSSession(f)
|
||||
|
||||
tell application "MacCVS Pro 2.1b2r1 PPC"
|
||||
close session CVSSESSIONNAME
|
||||
end tell
|
||||
|
||||
set newSessionPath to ReadLn(f)
|
||||
set newSessionName to GetCVSSessionName(newSessionPath)
|
||||
|
||||
set CVSSESSIONNAME to newSessionName
|
||||
|
||||
tell application "MacCVS Pro 2.1b2r1 PPC"
|
||||
activate
|
||||
open {newSessionPath as alias}
|
||||
end tell
|
||||
|
||||
end switchCVSSession
|
||||
|
||||
on getLocalCVSRoot(pathToCVSSession)
|
||||
|
||||
set CVSSESSIONNAME to GetCVSSessionName(pathToCVSSession)
|
||||
try
|
||||
tell application "MacCVS Pro 2.1b2r1 PPC"
|
||||
open {pathToCVSSession as alias}
|
||||
tell session CVSSESSIONNAME
|
||||
set theLocalRoot to local root
|
||||
end tell
|
||||
--¥quit
|
||||
end tell
|
||||
set pathLength to {(get the length of (theLocalRoot as text)) as text}
|
||||
return (characters 1 thru {pathLength - 1} of (theLocalRoot as text))
|
||||
on error
|
||||
display dialog "Error : CVS Session path wrong, or doesn't have a local root. SCRIPT HALTED!"
|
||||
error number -128
|
||||
end try
|
||||
|
||||
end getLocalCVSRoot
|
||||
|
||||
on createLogDirectory(destFolder)
|
||||
|
||||
tell application "Finder"
|
||||
set FOLDERTIME to my GetTimeStamp()
|
||||
make new folder at folder (destFolder)
|
||||
set the name of the result to FOLDERTIME
|
||||
end tell
|
||||
|
||||
end createLogDirectory
|
||||
|
||||
on mozillaLives(filePath)
|
||||
|
||||
try
|
||||
tell application "Finder"
|
||||
set fileTest to file filePath
|
||||
set creatorType to get the creator type of fileTest
|
||||
set fileTest to application file filePath
|
||||
set partitionSize to get the partition size of fileTest
|
||||
if (creatorType is "????" and partitionSize > 0) then
|
||||
return false
|
||||
else
|
||||
return true
|
||||
end if
|
||||
end tell
|
||||
on error
|
||||
return true
|
||||
end try
|
||||
|
||||
end mozillaLives
|
||||
|
||||
on copyFile(srcPath, destFolder)
|
||||
|
||||
try
|
||||
tell application "Finder"
|
||||
copy file (srcPath as alias) to folder (destFolder as alias)
|
||||
-- set the name of the result to destName
|
||||
end tell
|
||||
on error msgErr
|
||||
logMessage("Error: Could not copy - " & srcPath & msgErr)
|
||||
end try
|
||||
|
||||
end copyFile
|
||||
|
||||
on getDriveName(path)
|
||||
|
||||
set going to true
|
||||
set i to 1
|
||||
|
||||
repeat while going is true
|
||||
set theChar to character i of path
|
||||
if theChar is ":" then
|
||||
set going to false
|
||||
end if
|
||||
set i to i + 1
|
||||
end repeat
|
||||
set driveName to (characters 1 thru {i - 1} of path)
|
||||
return driveName as string
|
||||
|
||||
end getDriveName
|
||||
|
||||
on trashItem(filePath)
|
||||
|
||||
try
|
||||
tell application "Finder"
|
||||
select item (filePath as string)
|
||||
delete selection
|
||||
empty trash
|
||||
end tell
|
||||
on error
|
||||
logMessage("Error : Couldn't delete the old binary.")
|
||||
PageAdmin("Couldn't nuke old binary!")
|
||||
display dialog "Couldn't nuke old binary: SCRIPT HALTED"
|
||||
error number -128
|
||||
end try
|
||||
|
||||
end trashItem
|
||||
|
||||
on run
|
||||
|
||||
-- if we are executing first time, skip time delay check
|
||||
set firstRun to true
|
||||
|
||||
--¥repeat
|
||||
|
||||
-- if we're cycling around, make sure we don't cycle faster than 10 minutes
|
||||
if firstRun is false then
|
||||
if endTime - startTime is less than 600 then
|
||||
repeat while endTime - startTime is less than 600
|
||||
set endTime to current date
|
||||
end repeat
|
||||
end if
|
||||
end if
|
||||
|
||||
set firstRun to false
|
||||
|
||||
set startTime to current date
|
||||
|
||||
-- 2 hour timeout
|
||||
with timeout of 7200 seconds
|
||||
|
||||
set PPCPROJECTFAILED to false
|
||||
|
||||
-- read config file and create log directories
|
||||
Initialize()
|
||||
|
||||
notifyTinderBoxStart()
|
||||
|
||||
if (CLOBBERBUILD) then
|
||||
removeOldTree()
|
||||
else
|
||||
removeOldDist() --¥
|
||||
end if
|
||||
|
||||
(*
|
||||
else
|
||||
trashItem("")
|
||||
end
|
||||
*)
|
||||
|
||||
try
|
||||
checkOutTree(CVSSESSIONFILE)
|
||||
on error
|
||||
PageAdmin("Can't check out tree!")
|
||||
end try
|
||||
|
||||
if PPCPROJECTFAILED is false then
|
||||
set SOURCEPATH to getLocalCVSRoot(CVSSESSIONFILE)
|
||||
set SOURCEPATH to SOURCEPATH as string
|
||||
|
||||
ProcessList(SOURCEPATH & BUILDLIST)
|
||||
|
||||
tell application "CodeWarrior IDE 3.2"
|
||||
quit
|
||||
end tell
|
||||
|
||||
tell application "MacCVS Pro 2.1b2r1 PPC"
|
||||
quit
|
||||
end tell
|
||||
|
||||
tell application "ToolServer"
|
||||
quit
|
||||
end tell
|
||||
|
||||
end if
|
||||
|
||||
-- set builddrive to getDriveName(SOURCEPATH)
|
||||
|
||||
copyFile(SOURCEPATH & ":Mozilla.BuildLog", STARTUPDISK & ":" & FOLDERTIME & ":")
|
||||
set PPCPROJECTFAILED to mozillaLives(SOURCEPATH & BINARYPATH)
|
||||
|
||||
CloseLogFile()
|
||||
|
||||
try
|
||||
notifyTinderBox(PPCPROJECTFAILED)
|
||||
on error
|
||||
PageAdmin("Couldn't send Tinderbox completion message!")
|
||||
end try
|
||||
|
||||
tell application "Finder"
|
||||
select folder FOLDERTIME of startup disk
|
||||
delete selection
|
||||
--¥empty trash
|
||||
restart --¥
|
||||
end tell
|
||||
|
||||
end timeout
|
||||
|
||||
set endTime to current date
|
||||
|
||||
--¥end repeat
|
||||
|
||||
end run
|
||||
40
mozilla/build/mac/TinderboxMozilla.pl
Normal file
40
mozilla/build/mac/TinderboxMozilla.pl
Normal file
@@ -0,0 +1,40 @@
|
||||
#!perl
|
||||
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
use Moz;
|
||||
use BuildList;
|
||||
|
||||
$DEBUG = 1;
|
||||
|
||||
# One of them should be 1. This will come from a config file at some stage.
|
||||
# In the meanwhile, it should match mozilla/config/mac/MacConfig.h
|
||||
$MOZ_LITE = 0;
|
||||
$MOZ_MEDIUM = 1;
|
||||
$MOZ_DARK = 0;
|
||||
|
||||
Moz::OpenErrorLog("::::Mozilla.BuildLog");
|
||||
#Moz::StopForErrors();
|
||||
|
||||
chdir("::::");
|
||||
|
||||
# Make and popuplate the dist directory
|
||||
DistMozilla();
|
||||
|
||||
# Now build the projects
|
||||
BuildMozilla();
|
||||
97
mozilla/build/mac/TinderboxNGLayout.pl
Normal file
97
mozilla/build/mac/TinderboxNGLayout.pl
Normal file
@@ -0,0 +1,97 @@
|
||||
#!perl
|
||||
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
#
|
||||
# nglayout build script (debug)
|
||||
#
|
||||
use NGLayoutBuildList;
|
||||
use Cwd;
|
||||
use Moz;
|
||||
|
||||
|
||||
# configuration variables
|
||||
|
||||
$DEBUG = 1;
|
||||
$ALIAS_SYM_FILES = 0;
|
||||
$CLOBBER_LIBS = 1;
|
||||
$MOZ_FULLCIRCLE = 0;
|
||||
|
||||
# The following two options will delete all files, but leave the directory structure intact.
|
||||
$CLOBBER_DIST_ALL = 0; # turn on to clobber all files inside dist (headers, xsym and libs)
|
||||
$CLOBBER_DIST_LIBS = 0; # turn on to clobber the aliases to libraries and sym files in dist
|
||||
|
||||
$pull{all} = 0;
|
||||
$pull{lizard} = 0;
|
||||
$pull{xpcom} = 0;
|
||||
$pull{imglib} = 0;
|
||||
$pull{netlib} = 0;
|
||||
$pull{nglayout} = 0;
|
||||
$pull{mac} = 0;
|
||||
|
||||
$build{all} = 1; # turn off to do individual builds, or to do "most"
|
||||
$build{most} = 0; # turn off to do individual builds
|
||||
$build{dist} = 0;
|
||||
$build{dist_runtime} = 0; # implied by $build{dist}
|
||||
$build{idl} = 0;
|
||||
$build{resources} = 0;
|
||||
$build{stubs} = 0;
|
||||
$build{runtime} = 0;
|
||||
$build{common} = 0;
|
||||
$build{intl} = 0;
|
||||
$build{nglayout} = 0;
|
||||
$build{editor} = 0;
|
||||
$build{viewer} = 0;
|
||||
$build{xpapp} = 0;
|
||||
$build{mailnews} = 0;
|
||||
$build{apprunner} = 0;
|
||||
|
||||
|
||||
# script
|
||||
|
||||
$pull{all} = 1;
|
||||
$build{all} = 1;
|
||||
|
||||
if ($pull{all})
|
||||
{
|
||||
foreach $k (keys(%pull))
|
||||
{
|
||||
$pull{$k} = 1;
|
||||
}
|
||||
}
|
||||
if ($build{all})
|
||||
{
|
||||
foreach $k (keys(%build))
|
||||
{
|
||||
$build{$k} = 1;
|
||||
}
|
||||
}
|
||||
|
||||
# do the work
|
||||
|
||||
OpenErrorLog("::::Mozilla.BuildLog"); # Tinderbox requires that name
|
||||
|
||||
chdir("::::");
|
||||
|
||||
Checkout();
|
||||
|
||||
BuildDist();
|
||||
|
||||
BuildProjects();
|
||||
|
||||
print "Build complete\n";
|
||||
94
mozilla/build/mac/TinderboxNGLayoutOpt.pl
Normal file
94
mozilla/build/mac/TinderboxNGLayoutOpt.pl
Normal file
@@ -0,0 +1,94 @@
|
||||
#!perl
|
||||
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
#
|
||||
# nglayout build script (debug)
|
||||
#
|
||||
use NGLayoutBuildList;
|
||||
use Cwd;
|
||||
use Moz;
|
||||
|
||||
|
||||
# configuration variables
|
||||
|
||||
$DEBUG = 0;
|
||||
$ALIAS_SYM_FILES = 0;
|
||||
$CLOBBER_LIBS = 1;
|
||||
$MOZ_FULLCIRCLE = 0;
|
||||
|
||||
# The following two options will delete all files, but leave the directory structure intact.
|
||||
$CLOBBER_DIST_ALL = 0; # turn on to clobber all files inside dist (headers, xsym and libs)
|
||||
$CLOBBER_DIST_LIBS = 0; # turn on to clobber the aliases to libraries and sym files in dist
|
||||
|
||||
$pull{all} = 1;
|
||||
$pull{lizard} = 0;
|
||||
$pull{xpcom} = 0;
|
||||
$pull{imglib} = 0;
|
||||
$pull{netlib} = 0;
|
||||
$pull{nglayout} = 0;
|
||||
$pull{mac} = 0;
|
||||
|
||||
$build{all} = 1; # turn off to do individual builds, or to do "most"
|
||||
$build{most} = 0; # turn off to do individual builds
|
||||
$build{dist} = 0;
|
||||
$build{dist_runtime} = 0; # implied by $build{dist}
|
||||
$build{idl} = 0;
|
||||
$build{resources} = 0;
|
||||
$build{stubs} = 0;
|
||||
$build{runtime} = 0;
|
||||
$build{common} = 0;
|
||||
$build{intl} = 0;
|
||||
$build{nglayout} = 0;
|
||||
$build{editor} = 0;
|
||||
$build{viewer} = 0;
|
||||
$build{xpapp} = 0;
|
||||
$build{mailnews} = 0;
|
||||
$build{apprunner} = 0;
|
||||
|
||||
# script
|
||||
|
||||
|
||||
if ($pull{all})
|
||||
{
|
||||
foreach $k (keys(%pull))
|
||||
{
|
||||
$pull{$k} = 1;
|
||||
}
|
||||
}
|
||||
if ($build{all})
|
||||
{
|
||||
foreach $k (keys(%build))
|
||||
{
|
||||
$build{$k} = 1;
|
||||
}
|
||||
}
|
||||
|
||||
# do the work
|
||||
|
||||
OpenErrorLog("::::Mozilla.BuildLog"); # Tinderbox requires that name
|
||||
|
||||
chdir("::::");
|
||||
|
||||
Checkout();
|
||||
|
||||
BuildDist();
|
||||
|
||||
BuildProjects();
|
||||
|
||||
print "Build complete\n";
|
||||
4
mozilla/build/mac/test/README
Normal file
4
mozilla/build/mac/test/README
Normal file
@@ -0,0 +1,4 @@
|
||||
This directory is merely here to test the project editor server. It will go away after
|
||||
it is validated. For more information, see http://camelot.
|
||||
|
||||
Testing watchers.
|
||||
BIN
mozilla/build/mac/test/test.mcp
Normal file
BIN
mozilla/build/mac/test/test.mcp
Normal file
Binary file not shown.
1
mozilla/build/mac/test/test1.cpp
Normal file
1
mozilla/build/mac/test/test1.cpp
Normal file
@@ -0,0 +1 @@
|
||||
// test1.cpp
|
||||
1
mozilla/build/mac/test/test2.cpp
Normal file
1
mozilla/build/mac/test/test2.cpp
Normal file
@@ -0,0 +1 @@
|
||||
// test2.cpp
|
||||
BIN
mozilla/build/mac/test/test2.mcp
Normal file
BIN
mozilla/build/mac/test/test2.mcp
Normal file
Binary file not shown.
BIN
mozilla/build/mac/test/test3.mcp
Normal file
BIN
mozilla/build/mac/test/test3.mcp
Normal file
Binary file not shown.
BIN
mozilla/build/mac/test/test4.mcp
Normal file
BIN
mozilla/build/mac/test/test4.mcp
Normal file
Binary file not shown.
117
mozilla/build/package/rpm/mozilla
Normal file
117
mozilla/build/package/rpm/mozilla
Normal file
@@ -0,0 +1,117 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
##
|
||||
## Usage:
|
||||
##
|
||||
## $ mozilla
|
||||
##
|
||||
## This script is meant to run a mozilla program from the mozilla
|
||||
## rpm installation.
|
||||
##
|
||||
## The script will setup all the environment voodoo needed to make
|
||||
## mozilla work.
|
||||
|
||||
##
|
||||
## Standard shell script disclaimer blurb thing:
|
||||
##
|
||||
## This script is a hcak. Its brute force. Its horrible.
|
||||
## It doesnt use Artificial Intelligence. It doesnt use Virtual Reality.
|
||||
## Its not perl. Its not python. It probably wont work unchanged on
|
||||
## the "other" thousands of unices. But it worksforme.
|
||||
##
|
||||
## If you have an improvement, patch, idea, whatever, on how to make this
|
||||
## script better, post it here:
|
||||
##
|
||||
## news://news.mozilla.org/netscape.public.mozilla.patches
|
||||
## news://news.mozilla.org/netscape.public.mozilla.unix
|
||||
##
|
||||
##
|
||||
|
||||
##
|
||||
## Potential improvements:
|
||||
##
|
||||
## + Run ldd on the program and report missing dlls
|
||||
## + All the "other" unices/packages
|
||||
##
|
||||
|
||||
cmdname=`basename $0`
|
||||
|
||||
##
|
||||
## location of the apprunner binary.
|
||||
##
|
||||
MOZ_APPRUNNER_NAME="/usr/lib/mozilla/bin/apprunner"
|
||||
|
||||
##
|
||||
## Variables
|
||||
##
|
||||
MOZ_DIST_BIN=""
|
||||
MOZ_PROGRAM=""
|
||||
|
||||
##
|
||||
## Functions
|
||||
##
|
||||
moz_bail()
|
||||
{
|
||||
message=$1
|
||||
|
||||
echo
|
||||
echo "$cmdname: $message"
|
||||
echo
|
||||
|
||||
exit 1
|
||||
}
|
||||
|
||||
moz_test_binary()
|
||||
{
|
||||
binary=$1
|
||||
|
||||
if [ -f "$binary" ]
|
||||
then
|
||||
if [ -x "$binary" ]
|
||||
then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
moz_test_binary $MOZ_APPRUNNER_NAME
|
||||
|
||||
if [ $? -eq 1 ]
|
||||
then
|
||||
MOZ_PROGRAM=$MOZ_APPRUNNER_NAME
|
||||
fi
|
||||
|
||||
##
|
||||
## Make sure the program is executable
|
||||
##
|
||||
if [ ! -x $MOZ_PROGRAM ]
|
||||
then
|
||||
moz_bail "Cannot execute $MOZ_PROGRAM."
|
||||
fi
|
||||
|
||||
##
|
||||
## Set MOZILLA_FIVE_HOME
|
||||
##
|
||||
MOZILLA_FIVE_HOME="/usr/lib/mozilla"
|
||||
|
||||
export MOZILLA_FIVE_HOME
|
||||
|
||||
exec ./$MOZ_PROGRAM ${1+"$@"}
|
||||
111
mozilla/build/package/rpm/mozilla-viewer
Normal file
111
mozilla/build/package/rpm/mozilla-viewer
Normal file
@@ -0,0 +1,111 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
##
|
||||
## Usage:
|
||||
##
|
||||
## $ mozilla
|
||||
##
|
||||
## This script is meant to run a mozilla program from the mozilla
|
||||
## rpm installation.
|
||||
##
|
||||
## The script will setup all the environment voodoo needed to make
|
||||
## mozilla work.
|
||||
|
||||
##
|
||||
## Standard shell script disclaimer blurb thing:
|
||||
##
|
||||
## This script is a hcak. Its brute force. Its horrible.
|
||||
## It doesnt use Artificial Intelligence. It doesnt use Virtual Reality.
|
||||
## Its not perl. Its not python. It probably wont work unchanged on
|
||||
## the "other" thousands of unices. But it worksforme.
|
||||
##
|
||||
## If you have an improvement, patch, idea, whatever, on how to make this
|
||||
## script better, post it here:
|
||||
##
|
||||
## news://news.mozilla.org/netscape.public.mozilla.patches
|
||||
## news://news.mozilla.org/netscape.public.mozilla.unix
|
||||
##
|
||||
##
|
||||
|
||||
##
|
||||
## Potential improvements:
|
||||
##
|
||||
## + Run ldd on the program and report missing dlls
|
||||
## + All the "other" unices/packages
|
||||
##
|
||||
|
||||
cmdname=`basename $0`
|
||||
|
||||
##
|
||||
## location of the viewer binary.
|
||||
##
|
||||
MOZ_VIEWER_NAME="/usr/lib/mozilla/bin/viewer"
|
||||
|
||||
##
|
||||
## Variables
|
||||
##
|
||||
MOZ_PROGRAM=""
|
||||
|
||||
##
|
||||
## Functions
|
||||
##
|
||||
moz_bail()
|
||||
{
|
||||
message=$1
|
||||
|
||||
echo
|
||||
echo "$cmdname: $message"
|
||||
echo
|
||||
|
||||
exit 1
|
||||
}
|
||||
|
||||
moz_test_binary()
|
||||
{
|
||||
binary=$1
|
||||
|
||||
if [ -f "$binary" ]
|
||||
then
|
||||
if [ -x "$binary" ]
|
||||
then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
MOZ_PROGRAM=$MOZ_APPRUNNER_NAME
|
||||
|
||||
moz_test_binary $MOZ_PROGRAM
|
||||
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
moz_bail "Cannot execute $MOZ_PROGRAM."
|
||||
fi
|
||||
|
||||
##
|
||||
## Set MOZILLA_FIVE_HOME
|
||||
##
|
||||
MOZILLA_FIVE_HOME="/usr/lib/mozilla"
|
||||
|
||||
export MOZILLA_FIVE_HOME
|
||||
|
||||
exec $MOZ_PROGRAM ${1+"$@"}
|
||||
98
mozilla/build/package/rpm/mozilla.spec.in
Normal file
98
mozilla/build/package/rpm/mozilla.spec.in
Normal file
@@ -0,0 +1,98 @@
|
||||
%define ver @MOZ_RPM_VERSION@
|
||||
%define rel @MOZ_RPM_RELEASE@
|
||||
%define prefix @MOZ_RPM_PREFIX@
|
||||
%define tmp @MOZ_RPM_TMP@
|
||||
|
||||
Summary: Mozilla / ButtMonkey / Gecko / Whatever
|
||||
Name: mozilla
|
||||
Version: %ver
|
||||
Release: %rel
|
||||
Copyright: NPL
|
||||
Group: Mozilla
|
||||
Source: mozilla-%{ver}-%{rel}.tar.gz
|
||||
BuildRoot: %{tmp}/%{name}-root
|
||||
Packager: Ramiro Estrugo <ramiro@netscape.com>
|
||||
URL: http://www.mozilla.org/
|
||||
Provides: mozilla
|
||||
Requires: glib >= 1.2.1 gtk+ >= 1.2.1 nspr-pthreads >= 3.1
|
||||
|
||||
%description
|
||||
Mozilla
|
||||
|
||||
%package devel
|
||||
Summary: Mozilla development crap
|
||||
Group: Mozilla
|
||||
#Requires: mozilla nspr-devel
|
||||
|
||||
#Obsoletes: libnspr-devel
|
||||
#Conflicts: libnspr-userthreads-devel
|
||||
|
||||
%description devel
|
||||
Mozilla development libs and headers
|
||||
|
||||
%prep
|
||||
%setup -n mozilla
|
||||
|
||||
%build
|
||||
./configure \
|
||||
--with-pthreads \
|
||||
--enable-toolkit=gtk \
|
||||
--disable-build-nspr \
|
||||
@MOZ_RPM_SEAMONKEY_OPTIMIZE@
|
||||
|
||||
make
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT%{prefix}/lib/mozilla/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{prefix}/include/mozilla
|
||||
mkdir -p $RPM_BUILD_ROOT%{prefix}/lib
|
||||
mkdir -p $RPM_BUILD_ROOT%{prefix}/lib/mozilla/idl
|
||||
mkdir -p $RPM_BUILD_ROOT%{prefix}/lib/mozilla/components
|
||||
mkdir -p $RPM_BUILD_ROOT%{prefix}/lib/mozilla/res
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/bin
|
||||
|
||||
cp -rpv dist/bin/components/*.so $RPM_BUILD_ROOT%{prefix}/lib/mozilla/components
|
||||
cp -rpv dist/bin/res/* $RPM_BUILD_ROOT%{prefix}/lib/mozilla/res
|
||||
cp -rpv dist/bin/*.so $RPM_BUILD_ROOT%{prefix}/lib
|
||||
cp -rpv dist/include/* $RPM_BUILD_ROOT%{prefix}/include/mozilla
|
||||
cp -rpv dist/idl/* $RPM_BUILD_ROOT%{prefix}/lib/mozilla/idl
|
||||
cp -rpv dist/lib/*.a $RPM_BUILD_ROOT%{prefix}/lib
|
||||
cp -rpv dist/bin/apprunner $RPM_BUILD_ROOT%{prefix}/lib/mozilla/bin
|
||||
cp -rpv dist/bin/viewer $RPM_BUILD_ROOT%{prefix}/lib/mozilla/bin
|
||||
cp -rpv dist/bin/vreg $RPM_BUILD_ROOT%{prefix}/lib/mozilla/bin
|
||||
|
||||
cp -rpv build/mozilla-viewer.sh $RPM_BUILD_ROOT/usr/bin/mozilla-viewer
|
||||
cp -rpv build/mozilla-apprunner.sh $RPM_BUILD_ROOT/usr/bin/mozilla-apprunner
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
|
||||
#if grep "/usr/mozilla/lib" /etc/ld.so.conf > /dev/null 2>&1
|
||||
#then
|
||||
# :
|
||||
#else
|
||||
# echo "/usr/mozilla/lib" >> /etc/ld.so.conf
|
||||
#fi
|
||||
#
|
||||
#/sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%attr(-, root, root)
|
||||
|
||||
%{prefix}/lib/mozilla/components/*
|
||||
%{prefix}/lib/*.so
|
||||
%{prefix}/lib/mozilla/bin/*
|
||||
%{prefix}/lib/mozilla/res/*
|
||||
%attr(755, root, root)/usr/bin/mozilla-viewer
|
||||
%attr(755, root, root)/usr/bin/mozilla-apprunner
|
||||
|
||||
%files devel
|
||||
%attr(-, root, root)
|
||||
|
||||
%{prefix}/lib/*.a
|
||||
%{prefix}/include/mozilla/*
|
||||
%{prefix}/lib/mozilla/idl/*
|
||||
76
mozilla/build/package/rpm/nspr-pthreads.spec.in
Normal file
76
mozilla/build/package/rpm/nspr-pthreads.spec.in
Normal file
@@ -0,0 +1,76 @@
|
||||
%define ver @MOZILLA_RPM_VERSION@
|
||||
%define rel @MOZILLA_RPM_RELEASE@
|
||||
%define prefix @MOZILLA_RPM_PREFIX@
|
||||
%define tmp @MOZILLA_RPM_TMP@
|
||||
|
||||
Summary: Netscape Portable Runtime (NSPR)
|
||||
Name: nspr-pthreads
|
||||
Version: %ver
|
||||
Release: %rel
|
||||
Copyright: NPL
|
||||
Group: Development/Libraries
|
||||
Source: nspr-pthreads-%{ver}-%{rel}.tar.gz
|
||||
BuildRoot: %{tmp}/%{name}-root
|
||||
Packager: Ramiro Estrugo <ramiro@netscape.com>
|
||||
URL: http://www.mozilla.org/docs/tplist/catCode/nsprdesc.htm
|
||||
Provides: nspr
|
||||
|
||||
%description
|
||||
Libraries that implement cross-platform runtime services from Netscape.
|
||||
|
||||
%package devel
|
||||
Summary: NSPR library header files for development
|
||||
Group: Development/Libraries
|
||||
Requires: nspr
|
||||
#Obsoletes: libnspr-devel
|
||||
#Conflicts: libnspr-userthreads-devel
|
||||
|
||||
%description devel
|
||||
Header files for the NSPR library from Netscape
|
||||
|
||||
%prep
|
||||
%setup -n nspr-pthreads
|
||||
|
||||
%build
|
||||
make \
|
||||
DIST=$RPM_BUILD_ROOT%{prefix} \
|
||||
NSDISTMODE=copy \
|
||||
USE_PTHREADS=1 \
|
||||
@MOZILLA_RPM_NSPR_OPTIMIZE@ \
|
||||
export
|
||||
|
||||
%install
|
||||
make \
|
||||
DIST=$RPM_BUILD_ROOT%{prefix} \
|
||||
NSDISTMODE=copy \
|
||||
USE_PTHREADS=1 \
|
||||
@MOZILLA_RPM_NSPR_OPTIMIZE@ \
|
||||
install
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
|
||||
#if grep "/usr/mozilla/lib" /etc/ld.so.conf > /dev/null 2>&1
|
||||
#then
|
||||
# :
|
||||
#else
|
||||
# echo "/usr/mozilla/lib" >> /etc/ld.so.conf
|
||||
#fi
|
||||
#
|
||||
#/sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%attr(-, root, root)
|
||||
|
||||
%{prefix}/lib/*.so
|
||||
|
||||
%files devel
|
||||
%attr(-, root, root)
|
||||
|
||||
%{prefix}/include/*
|
||||
%{prefix}/lib/*.a
|
||||
|
||||
36
mozilla/build/unix/Makefile.in
Normal file
36
mozilla/build/unix/Makefile.in
Normal file
@@ -0,0 +1,36 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "License"); you may not use this file except in
|
||||
# compliance with the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Mozilla Communicator client code,
|
||||
# released March 31, 1998.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape Communications
|
||||
# Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
RUN_MOZILLA_SCRIPT= $(srcdir)/run-mozilla.sh
|
||||
|
||||
install:: $(PROGRAM) $(RUN_MOZILLA_SCRIPT)
|
||||
$(INSTALL) $(RUN_MOZILLA_SCRIPT) $(DIST)/bin
|
||||
|
||||
7
mozilla/build/unix/nspr_my_config.mk.in
Normal file
7
mozilla/build/unix/nspr_my_config.mk.in
Normal file
@@ -0,0 +1,7 @@
|
||||
USE_PTHREADS=@MOZ_NSPRENV_USE_PTHREADS@
|
||||
BUILD_OPT=@MOZ_NSPRENV_BUILD_OPT@
|
||||
NS_USE_GCC=@MOZ_NSPRENV_NS_USE_GCC@
|
||||
NO_MDUPDATE=@MOZ_NSPRENV_NO_MDUPDATE@
|
||||
NS_USE_NATIVE=@MOZ_NSPRENV_NS_USE_NATIVE@
|
||||
MOZILLA_CLIENT=@MOZ_NSPRENV_MOZILLA_CLIENT@
|
||||
CLASSIC_NSPR=@MOZ_NSPRENV_CLASSIC_NSPR@
|
||||
7
mozilla/build/unix/nspr_my_overrides.mk.in
Normal file
7
mozilla/build/unix/nspr_my_overrides.mk.in
Normal file
@@ -0,0 +1,7 @@
|
||||
DIST=@MOZ_NSPRENV_DIST@
|
||||
MOZ_NSPRENV_OVERRIDE_MAKE=@MOZ_NSPRENV_OVERRIDE_MAKE@
|
||||
|
||||
ifdef MOZ_NSPRENV_OVERRIDE_MAKE
|
||||
MAKE=$(MOZ_NSPRENV_OVERRIDE_MAKE)
|
||||
endif
|
||||
|
||||
366
mozilla/build/unix/run-mozilla.sh
Executable file
366
mozilla/build/unix/run-mozilla.sh
Executable file
@@ -0,0 +1,366 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
#
|
||||
##
|
||||
## Usage:
|
||||
##
|
||||
## $ run-mozilla.sh [options] [program] [program arguments]
|
||||
##
|
||||
## This script is meant to run a mozilla program from the mozilla
|
||||
## source tree. This is mostly useful to folks hacking on mozilla.
|
||||
##
|
||||
## A mozilla program is currently either viewer or apprunner. The
|
||||
## default is viewer.
|
||||
##
|
||||
## The script will setup all the environment voodoo needed to make
|
||||
## mozilla work.
|
||||
#
|
||||
##
|
||||
## Standard shell script disclaimer blurb thing:
|
||||
##
|
||||
## This script is a hack. It's brute force. It's horrible.
|
||||
## It doesn't use Artificial Intelligence. It doesn't use Virtual Reality.
|
||||
## It's not perl. It's not python. It probably won't work unchanged on
|
||||
## the "other" thousands of unices. But it worksforme. --ramiro
|
||||
##
|
||||
## If you have an improvement, patch, idea, whatever, on how to make this
|
||||
## script better, post it here:
|
||||
##
|
||||
## news://news.mozilla.org/netscape.public.mozilla.patches
|
||||
## news://news.mozilla.org/netscape.public.mozilla.unix
|
||||
##
|
||||
#
|
||||
##
|
||||
## Potential improvements:
|
||||
##
|
||||
## + Run from anywhere in the tree.
|
||||
## + Run ldd on the program and report missing dlls
|
||||
## + Deal with NSPR in the tree
|
||||
## + All the other unices
|
||||
##
|
||||
#
|
||||
cmdname=`basename $0`
|
||||
MOZ_APPRUNNER_NAME="apprunner"
|
||||
MOZ_VIEWER_NAME="viewer"
|
||||
MOZ_DIST_BIN=""
|
||||
MOZ_PROGRAM=""
|
||||
#
|
||||
##
|
||||
## Functions
|
||||
##
|
||||
##########################################################################
|
||||
moz_usage()
|
||||
{
|
||||
cat << EOF
|
||||
|
||||
Usage: ${cmdname} [options] [program]
|
||||
|
||||
options:
|
||||
|
||||
-g Run in debugger.
|
||||
--debug
|
||||
|
||||
-d debugger Debugger to use.
|
||||
--debugger debugger
|
||||
|
||||
Examples:
|
||||
|
||||
Run the viewer
|
||||
|
||||
${cmdname} viewer
|
||||
|
||||
Run the apprunner
|
||||
|
||||
${cmdname} apprunner
|
||||
|
||||
Debug the viewer in a debbuger
|
||||
|
||||
${cmdname} -g viewer
|
||||
|
||||
Debug the apprunner in gdb
|
||||
|
||||
${cmdname} -g viewer -d gdb
|
||||
|
||||
EOF
|
||||
return 0
|
||||
}
|
||||
##########################################################################
|
||||
moz_bail()
|
||||
{
|
||||
message=$1
|
||||
echo
|
||||
echo "$cmdname: $message"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
##########################################################################
|
||||
moz_test_binary()
|
||||
{
|
||||
binary=$1
|
||||
if [ -f "$binary" ]
|
||||
then
|
||||
if [ -x "$binary" ]
|
||||
then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
##########################################################################
|
||||
moz_get_debugger()
|
||||
{
|
||||
debuggers="ddd gdb dbx"
|
||||
debugger="notfound"
|
||||
done="no"
|
||||
for d in $debuggers
|
||||
do
|
||||
dpath=`which ${d}`
|
||||
if [ -x "$dpath" ]
|
||||
then
|
||||
debugger=$dpath
|
||||
break
|
||||
fi
|
||||
done
|
||||
echo $debugger
|
||||
return 0
|
||||
}
|
||||
##########################################################################
|
||||
moz_run_program()
|
||||
{
|
||||
prog=$MOZ_PROGRAM
|
||||
##
|
||||
## Make sure the program is executable
|
||||
##
|
||||
if [ ! -x "$prog" ]
|
||||
then
|
||||
moz_bail "Cannot execute $prog."
|
||||
fi
|
||||
##
|
||||
## Use md5sum to crc a core file. If md5sum is not found on the system,
|
||||
## then dont debug core files.
|
||||
##
|
||||
crc_prog=`which md5sum`
|
||||
if [ -x "$crc_prog" ]
|
||||
then
|
||||
DEBUG_CORE_FILES=1
|
||||
fi
|
||||
if [ "$DEBUG_CORE_FILES" ]
|
||||
then
|
||||
crc_old=
|
||||
if [ -f core ]
|
||||
then
|
||||
crc_old=`$crc_prog core | awk '{print $1;}' `
|
||||
fi
|
||||
fi
|
||||
##
|
||||
## Run the program
|
||||
##
|
||||
$prog ${1+"$@"}
|
||||
if [ "$DEBUG_CORE_FILES" ]
|
||||
then
|
||||
if [ -f core ]
|
||||
then
|
||||
crc_new=`$crc_prog core | awk '{print $1;}' `
|
||||
fi
|
||||
fi
|
||||
if [ "$crc_old" != "$crc_new" ]
|
||||
then
|
||||
printf "\n\nOh no! %s just dumped a core file.\n\n" $prog
|
||||
printf "Do you want to debug this ? [y/n] "
|
||||
read ans
|
||||
if [ "$ans" = "y" ]
|
||||
then
|
||||
debugger=`moz_get_debugger`
|
||||
if [ -x "$debugger" ]
|
||||
then
|
||||
echo "$debugger $prog core"
|
||||
$debugger $prog core
|
||||
else
|
||||
echo "Could not find a debugger on your system."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
##########################################################################
|
||||
moz_debug_program()
|
||||
{
|
||||
prog=$MOZ_PROGRAM
|
||||
##
|
||||
## Make sure the program is executable
|
||||
##
|
||||
if [ ! -x "$prog" ]
|
||||
then
|
||||
moz_bail "Cannot execute $prog."
|
||||
fi
|
||||
if [ -n "$moz_debugger" ]
|
||||
then
|
||||
debugger=`which $moz_debugger`
|
||||
else
|
||||
debugger=`moz_get_debugger`
|
||||
fi
|
||||
if [ -x "$debugger" ]
|
||||
then
|
||||
echo "$debugger $prog ${1+"$@"}"
|
||||
$debugger $prog ${1+"$@"}
|
||||
else
|
||||
echo "Could not find a debugger on your system."
|
||||
fi
|
||||
}
|
||||
##########################################################################
|
||||
##
|
||||
## Command line arg defaults
|
||||
##
|
||||
moz_debug=0
|
||||
moz_debugger=""
|
||||
#
|
||||
##
|
||||
## Parse the command line
|
||||
##
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case $1 in
|
||||
-h | --help)
|
||||
moz_usage
|
||||
exit 0
|
||||
;;
|
||||
-g | --debug)
|
||||
moz_debug=1
|
||||
shift
|
||||
;;
|
||||
-d | --debugger)
|
||||
moz_debugger=$2;
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
break;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
#
|
||||
##
|
||||
## Program name given in $1
|
||||
##
|
||||
if [ $# -gt 0 ]
|
||||
then
|
||||
MOZ_PROGRAM=$1
|
||||
shift
|
||||
fi
|
||||
##
|
||||
## Program not given, try to guess a default
|
||||
##
|
||||
if [ -z "$MOZ_PROGRAM" ]
|
||||
then
|
||||
##
|
||||
## Try viewer
|
||||
##
|
||||
moz_test_binary $MOZ_VIEWER_NAME
|
||||
if [ $? -eq 1 ]
|
||||
then
|
||||
MOZ_PROGRAM=$MOZ_VIEWER_NAME
|
||||
##
|
||||
## Try apprunner
|
||||
##
|
||||
else
|
||||
moz_test_binary $MOZ_APPRUNNER_NAME
|
||||
if [ $? -eq 1 ]
|
||||
then
|
||||
MOZ_PROGRAM=$MOZ_APPRUNNER_NAME
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
#
|
||||
##
|
||||
## Running the program from its source dir
|
||||
##
|
||||
if [ -f Makefile.in ]
|
||||
then
|
||||
# Use DEPTH in the Makefile.in to determine the depth
|
||||
depth=`grep -w DEPTH Makefile.in | grep -e "\.\." | awk -F"=" '{ print $2; }'`
|
||||
##
|
||||
## Make sure dist/bin exists
|
||||
##
|
||||
if [ ! -d $depth/dist/bin ]
|
||||
then
|
||||
moz_bail "$depth/dist/bin does not exist."
|
||||
fi
|
||||
# push
|
||||
here=`pwd`
|
||||
cd $depth/dist/bin
|
||||
MOZ_DIST_BIN=`pwd`
|
||||
# pop
|
||||
cd $here
|
||||
else
|
||||
##
|
||||
## Running the program from dist/bin
|
||||
##
|
||||
if [ -d components -a -d res ]
|
||||
then
|
||||
MOZ_DIST_BIN=`pwd`
|
||||
fi
|
||||
fi
|
||||
#
|
||||
##
|
||||
## Make sure dist/bin is ok
|
||||
##
|
||||
if [ -z "$MOZ_DIST_BIN" ]
|
||||
then
|
||||
moz_bail "Cannot access dir dist/bin directory."
|
||||
fi
|
||||
#
|
||||
if [ ! -d $MOZ_DIST_BIN ]
|
||||
then
|
||||
moz_bail "Cannot access dir dist/bin directory."
|
||||
fi
|
||||
#
|
||||
##
|
||||
## Make sure the program is executable
|
||||
##
|
||||
if [ ! -x "$MOZ_PROGRAM" ]
|
||||
then
|
||||
moz_bail "Cannot execute $MOZ_PROGRAM."
|
||||
fi
|
||||
#
|
||||
##
|
||||
## Set MOZILLA_FIVE_HOME
|
||||
##
|
||||
MOZILLA_FIVE_HOME=$MOZ_DIST_BIN
|
||||
#
|
||||
##
|
||||
## Set LD_LIBRARY_PATH
|
||||
##
|
||||
if [ -n "$LD_LIBRARY_PATH" ]
|
||||
then
|
||||
LD_LIBRARY_PATH=${MOZ_DIST_BIN}${LD_LIBRARY_PATH+":$LD_LIBRARY_PATH"}
|
||||
else
|
||||
LD_LIBRARY_PATH=${MOZ_DIST_BIN}
|
||||
fi
|
||||
#
|
||||
echo "MOZILLA_FIVE_HOME=$MOZILLA_FIVE_HOME"
|
||||
echo " LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
|
||||
echo " MOZ_PROGRAM=$MOZ_PROGRAM"
|
||||
echo " moz_debug=$moz_debug"
|
||||
echo " moz_debugger=$moz_debugger"
|
||||
#
|
||||
export MOZILLA_FIVE_HOME LD_LIBRARY_PATH
|
||||
#
|
||||
if [ "$moz_debug" = "1" ]
|
||||
then
|
||||
moz_debug_program ${1+"$@"}
|
||||
else
|
||||
moz_run_program ${1+"$@"}
|
||||
fi
|
||||
26
mozilla/caps/Makefile.in
Normal file
26
mozilla/caps/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
#!gmake
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH = ..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = public include src
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
20
mozilla/caps/include/MANIFEST
Normal file
20
mozilla/caps/include/MANIFEST
Normal file
@@ -0,0 +1,20 @@
|
||||
nsZig.h
|
||||
nsPrincipal.h
|
||||
nsPrivilege.h
|
||||
nsPrivilegeManager.h
|
||||
nsPrivilegeTable.h
|
||||
nsSystemPrivilegeTable.h
|
||||
nsTarget.h
|
||||
nsUserTarget.h
|
||||
jpermission.h
|
||||
nsUserDialogHelper.h
|
||||
nsZip.h
|
||||
nsLoadZig.h
|
||||
admin.h
|
||||
nsCaps.h
|
||||
nsCapsEnums.h
|
||||
nsCCapsManager.h
|
||||
nsCCapsManagerFactory.h
|
||||
nsCCertPrincipal.h
|
||||
nsCCodebasePrincipal.h
|
||||
nsCCodeSourcePrincipal.h
|
||||
34
mozilla/caps/include/Makefile.in
Normal file
34
mozilla/caps/include/Makefile.in
Normal file
@@ -0,0 +1,34 @@
|
||||
#!gmake
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
MODULE = caps
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
EXPORTS = nsZip.h nsZig.h nsLoadZig.h nsPrincipal.h nsPrivilege.h nsPrivilegeManager.h nsPrivilegeTable.h nsSystemPrivilegeTable.h nsTarget.h nsUserTarget.h jpermission.h nsUserDialogHelper.h admin.h nsCaps.h nsCapsEnums.h nsCCapsManagerFactory.h nsCCapsManager.h \
|
||||
nsCCertPrincipal.h \
|
||||
nsCCodebasePrincipal.h \
|
||||
nsCCodeSourcePrincipal.h
|
||||
|
||||
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
42
mozilla/caps/include/admin.h
Normal file
42
mozilla/caps/include/admin.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef _ADMIN_H_
|
||||
#define _ADMIN_H_
|
||||
|
||||
PR_BEGIN_EXTERN_C
|
||||
|
||||
PR_PUBLIC_API(const char *)
|
||||
java_netscape_security_getPrincipals(const char *charSetName);
|
||||
|
||||
PR_PUBLIC_API(PRBool)
|
||||
java_netscape_security_removePrincipal(const char *charSetName, char *prinName);
|
||||
|
||||
|
||||
PR_PUBLIC_API(void)
|
||||
java_netscape_security_getPrivilegeDescs(const char *charSetName, char *prinName,
|
||||
char** forever, char** session,
|
||||
char **denied);
|
||||
|
||||
PR_PUBLIC_API(PRBool)
|
||||
java_netscape_security_removePrivilege(const char *charSetName, char *prinName,
|
||||
char *targetName);
|
||||
|
||||
PR_END_EXTERN_C
|
||||
|
||||
#endif /* _ADMIN_H_ */
|
||||
42
mozilla/caps/include/jpermission.h
Normal file
42
mozilla/caps/include/jpermission.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef _JPERMISSION_H_
|
||||
#define _JPERMISSION_H_
|
||||
|
||||
typedef enum nsPermState {
|
||||
nsPermState_NotSet,
|
||||
nsPermState_AllowedForever,
|
||||
nsPermState_AllowedSession,
|
||||
nsPermState_ForbiddenForever,
|
||||
nsPermState_BlankSession
|
||||
} nsPermState;
|
||||
|
||||
PR_PUBLIC_API(void)
|
||||
java_netscape_security_savePrivilege(nsPermState permState);
|
||||
|
||||
PR_PUBLIC_API(nsPermState)
|
||||
nsJSJavaDisplayDialog(char *prinStr, char *targetStr, char *rsikStr, PRBool isCert, void*cert);
|
||||
|
||||
PR_PUBLIC_API(void)
|
||||
java_netscape_security_getTargetDetails(const char *charSetName,
|
||||
char* targetName,
|
||||
char** details,
|
||||
char **risk);
|
||||
|
||||
#endif /* _JPERMISSION_H_ */
|
||||
40
mozilla/caps/include/makefile.win
Executable file
40
mozilla/caps/include/makefile.win
Executable file
@@ -0,0 +1,40 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
|
||||
IGNORE_MANIFEST=1
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Makefile to install CAPS/INCLUDE header files into the distribution
|
||||
#// directory.
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
|
||||
MODULE=caps
|
||||
DEPTH=..\..
|
||||
EXPORTS=nsZip.h nsZig.h nsLoadZig.h nsPrincipal.h nsPrivilege.h nsPrivilegeManager.h nsPrivilegeTable.h nsSystemPrivilegeTable.h nsTarget.h nsUserTarget.h jpermission.h nsUserDialogHelper.h admin.h nsCaps.h nsCapsEnums.h \
|
||||
nsCCapsManager.h \
|
||||
nsCCertPrincipal.h \
|
||||
nsCCodebasePrincipal.h \
|
||||
nsCCapsManagerFactory.h \
|
||||
nsCCodeSourcePrincipal.h
|
||||
|
||||
|
||||
include <$(DEPTH)/config/rules.mak>
|
||||
|
||||
274
mozilla/caps/include/nsCCapsManager.h
Normal file
274
mozilla/caps/include/nsCCapsManager.h
Normal file
@@ -0,0 +1,274 @@
|
||||
/* -*- 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.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef nsCCapsManager_h___
|
||||
#define nsCCapsManager_h___
|
||||
|
||||
#include "nsIPrincipal.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsICapsManager.h"
|
||||
#include "nsAgg.h"
|
||||
|
||||
#include "nsPrincipal.h"
|
||||
#include "nsPrivilegeManager.h"
|
||||
|
||||
/**
|
||||
* nsCCapsManager implements the nsICapsManager
|
||||
* interface for navigator. This is used to create new principals and get and
|
||||
* set permissions for each of the principals created.
|
||||
* nsCCapsManager registers itself as the factory object and it will always return
|
||||
* a pointer to itself as in the createInstance. This is because there should be only
|
||||
* one nsCCapsManager in navigator.
|
||||
*/
|
||||
class nsCCapsManager : public nsICapsManager {
|
||||
public:
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsISupports and AggregatedQueryInterface:
|
||||
|
||||
NS_DECL_AGGREGATED
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsICapsManager:
|
||||
|
||||
NS_IMETHOD
|
||||
CreateCodebasePrincipal(const char *codebaseURL, nsIPrincipal** prin);
|
||||
|
||||
NS_IMETHOD
|
||||
CreateCertPrincipal(const unsigned char **certChain, PRUint32 *certChainLengths, PRUint32 noOfCerts, nsIPrincipal** prin);
|
||||
|
||||
/**
|
||||
* Creates a CodeSourcePrincipal, which has both nsICodebasePrincipal
|
||||
* and nsICertPrincipal
|
||||
*
|
||||
* @param certByteData - The ceritificate's byte array data including the chain.
|
||||
* @param certByteDataSize - the length of certificate byte array.
|
||||
* @param codebaseURL - the codebase URL
|
||||
*/
|
||||
NS_IMETHOD
|
||||
CreateCodeSourcePrincipal(const unsigned char **certChain, PRUint32 *certChainLengths, PRUint32 noOfCerts, const char *codebaseURL, nsIPrincipal** prin);
|
||||
|
||||
|
||||
/**
|
||||
* Returns the permission for given principal and target
|
||||
*
|
||||
* @param prin - is either certificate principal or codebase principal
|
||||
* @param target - is NS_ALL_PRIVILEGES.
|
||||
* @param state - the return value is passed in this parameter.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetPermission(nsIPrincipal* prin, nsITarget* target, nsPermission *state);
|
||||
|
||||
/**
|
||||
* Set the permission state for given principal and target. This wouldn't
|
||||
* prompt the end user with UI.
|
||||
*
|
||||
* @param prin - is either certificate principal or codebase principal
|
||||
* @param target - is NS_ALL_PRIVILEGES.
|
||||
* @param state - is permisson state that should be set for the given prin
|
||||
* and target parameters.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
SetPermission(nsIPrincipal* prin, nsITarget* target, nsPermission state);
|
||||
|
||||
/**
|
||||
* Prompts the user if they want to grant permission for the given principal and
|
||||
* for the given target.
|
||||
*
|
||||
* @param prin - is either certificate principal or codebase principal
|
||||
* @param target - is NS_ALL_PRIVILEGES.
|
||||
* @param result - is the permission user has given for the given principal and
|
||||
* target
|
||||
*/
|
||||
NS_IMETHOD
|
||||
AskPermission(nsIPrincipal* prin, nsITarget* target, nsPermission *result);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* All of the following methods are used by JS (the code located
|
||||
* in lib/libmocha area).
|
||||
*/
|
||||
|
||||
/**
|
||||
* Initializes the capabilities subsytem (ie setting the system principal, initializing
|
||||
* privilege Manager, creating the capsManager factory etc
|
||||
*
|
||||
* @param result - is true if principal was successfully registered with the system
|
||||
*/
|
||||
NS_IMETHOD
|
||||
Initialize(PRBool *result);
|
||||
|
||||
NS_IMETHOD
|
||||
InitializeFrameWalker(nsICapsSecurityCallbacks* aInterface);
|
||||
|
||||
/**
|
||||
* Registers the given Principal with the system.
|
||||
*
|
||||
* @param prin - is either certificate principal or codebase principal
|
||||
* @param result - is true if principal was successfully registered with the system
|
||||
*/
|
||||
NS_IMETHOD
|
||||
RegisterPrincipal(nsIPrincipal* prin, PRBool *result);
|
||||
|
||||
/**
|
||||
* Prompts the user if they want to grant permission for the principal located
|
||||
* at the given stack depth for the given target.
|
||||
*
|
||||
* @param context - is the parameter JS needs to determinte the principal
|
||||
* @param targetName - is the name of the target.
|
||||
* @param callerDepth - is the depth of JS stack frame, which JS uses to determinte the
|
||||
* principal
|
||||
* @param result - is true if user has given permission for the given principal and
|
||||
* target
|
||||
*/
|
||||
NS_IMETHOD
|
||||
EnablePrivilege(void* context, const char* targetName, PRInt32 callerDepth, PRBool *result);
|
||||
|
||||
/**
|
||||
* Returns if the user granted permission for the principal located at the given
|
||||
* stack depth for the given target.
|
||||
*
|
||||
* @param context - is the parameter JS needs to determinte the principal
|
||||
* @param targetName - is the name of the target.
|
||||
* @param callerDepth - is the depth of JS stack frame, which JS uses to determinte the
|
||||
* principal
|
||||
* @param result - is true if user has given permission for the given principal and
|
||||
* target
|
||||
*/
|
||||
NS_IMETHOD
|
||||
IsPrivilegeEnabled(void* context, const char* targetName, PRInt32 callerDepth, PRBool *result);
|
||||
|
||||
/**
|
||||
* Reverts the permission (granted/denied) user gave for the principal located
|
||||
* at the given stack depth for the given target.
|
||||
*
|
||||
* @param context - is the parameter JS needs to determinte the principal
|
||||
* @param targetName - is the name of the target.
|
||||
* @param callerDepth - is the depth of JS stack frame, which JS uses to determinte the
|
||||
* principal
|
||||
* @param result - is true if user has given permission for the given principal and
|
||||
* target
|
||||
*/
|
||||
NS_IMETHOD
|
||||
RevertPrivilege(void* context, const char* targetName, PRInt32 callerDepth, PRBool *result);
|
||||
|
||||
/**
|
||||
* Disable permissions for the principal located at the given stack depth for the
|
||||
* given target.
|
||||
*
|
||||
* @param context - is the parameter JS needs to determinte the principal
|
||||
* @param targetName - is the name of the target.
|
||||
* @param callerDepth - is the depth of JS stack frame, which JS uses to determinte the
|
||||
* principal
|
||||
* @param result - is true if user has given permission for the given principal and
|
||||
* target
|
||||
*/
|
||||
NS_IMETHOD
|
||||
DisablePrivilege(void* context, const char* targetName, PRInt32 callerDepth, PRBool *result);
|
||||
|
||||
|
||||
/* XXX: Some of the arguments for the following interfaces may change.
|
||||
* This is a first cut. I need to talk to joki. We should get rid of void* parameters.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
ComparePrincipalArray(void* prin1Array, void* prin2Array, nsSetComparisonType *result);
|
||||
|
||||
NS_IMETHOD
|
||||
IntersectPrincipalArray(void* prin1Array, void* prin2Array, void* *result);
|
||||
|
||||
NS_IMETHOD
|
||||
CanExtendTrust(void* fromPrinArray, void* toPrinArray, PRBool *result);
|
||||
|
||||
|
||||
/* interfaces for nsIPrincipal object, may be we should move some of them to nsIprincipal */
|
||||
|
||||
NS_IMETHOD
|
||||
NewPrincipal(nsPrincipalType type, void* key, PRUint32 key_len, void *zig, nsIPrincipal* *result);
|
||||
|
||||
NS_IMETHOD
|
||||
IsCodebaseExact(nsIPrincipal* principal, PRBool *result);
|
||||
|
||||
NS_IMETHOD
|
||||
ToString(nsIPrincipal* principal, char* *result);
|
||||
|
||||
NS_IMETHOD
|
||||
GetVendor(nsIPrincipal* principal, char* *result);
|
||||
|
||||
NS_IMETHOD
|
||||
CreateMixedPrincipalArray(void *zig, char* name, const char* codebase, void** result);
|
||||
|
||||
NS_IMETHOD
|
||||
NewPrincipalArray(PRUint32 count, void* *result);
|
||||
|
||||
NS_IMETHOD
|
||||
FreePrincipalArray(void *prinArray);
|
||||
|
||||
NS_IMETHOD
|
||||
GetPrincipalArrayElement(void *prinArrayArg, PRUint32 index, nsIPrincipal* *result);
|
||||
|
||||
NS_IMETHOD
|
||||
SetPrincipalArrayElement(void *prinArrayArg, PRUint32 index, nsIPrincipal* principal);
|
||||
|
||||
NS_IMETHOD
|
||||
GetPrincipalArraySize(void *prinArrayArg, PRUint32 *result);
|
||||
|
||||
/* The following interfaces will replace all of the following old calls.
|
||||
*
|
||||
* nsCapsGetPermission(struct nsPrivilege *privilege)
|
||||
* nsCapsGetPrivilege(struct nsPrivilegeTable *annotation, struct nsTarget *target)
|
||||
*
|
||||
*/
|
||||
NS_IMETHOD
|
||||
IsAllowed(void *annotation, char* target, PRBool *result);
|
||||
|
||||
/* XXX: TODO: We need to set up the JS frame walking callbacks */
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsCCapsManager:
|
||||
|
||||
nsCCapsManager(nsISupports *aOuter);
|
||||
virtual ~nsCCapsManager(void);
|
||||
|
||||
void
|
||||
CreateNSPrincipalArray(nsPrincipalArray* prinArray,
|
||||
nsPrincipalArray* *pPrincipalArray);
|
||||
|
||||
NS_METHOD
|
||||
GetNSPrincipal(nsIPrincipal* pNSIPrincipal, nsPrincipal **ppNSPRincipal);
|
||||
|
||||
NS_METHOD
|
||||
GetNSPrincipalArray(nsPrincipalArray* prinArray,
|
||||
nsPrincipalArray* *pPrincipalArray);
|
||||
|
||||
nsPermission
|
||||
ConvertPrivilegeToPermission(nsPrivilege *pNSPrivilege);
|
||||
|
||||
nsPrivilege *
|
||||
ConvertPermissionToPrivilege(nsPermission state);
|
||||
|
||||
void
|
||||
SetSystemPrivilegeManager();
|
||||
|
||||
|
||||
protected:
|
||||
nsPrivilegeManager *m_pNSPrivilegeManager;
|
||||
};
|
||||
|
||||
#endif // nsCCapsManager_h___
|
||||
52
mozilla/caps/include/nsCCapsManagerFactory.h
Normal file
52
mozilla/caps/include/nsCCapsManagerFactory.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/* -*- 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.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef nsCCapsManagerFactory_h___
|
||||
#define nsCCapsManagerFactory_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsIFactory.h"
|
||||
|
||||
class nsCCapsManagerFactory : public nsIFactory {
|
||||
public:
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsISupports and AggregatedQueryInterface:
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsIFactory:
|
||||
|
||||
NS_IMETHOD
|
||||
CreateInstance(nsISupports *aOuter, REFNSIID aIID, void **aResult);
|
||||
|
||||
NS_IMETHOD
|
||||
LockFactory(PRBool aLock);
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsCCapsManagerFactory:
|
||||
|
||||
nsCCapsManagerFactory(void);
|
||||
virtual ~nsCCapsManagerFactory(void);
|
||||
|
||||
protected:
|
||||
static nsIFactory *m_pNSIFactory;
|
||||
};
|
||||
|
||||
#endif // nsCCapsManagerFactory_h___
|
||||
117
mozilla/caps/include/nsCCertPrincipal.h
Normal file
117
mozilla/caps/include/nsCCertPrincipal.h
Normal file
@@ -0,0 +1,117 @@
|
||||
/* -*- 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.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef nsCCertPrincipal_h___
|
||||
#define nsCCertPrincipal_h___
|
||||
|
||||
#include "nsICertPrincipal.h"
|
||||
#include "nsPrincipal.h"
|
||||
|
||||
class nsCCertPrincipal : public nsICertPrincipal {
|
||||
public:
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsISupports:
|
||||
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsIPrincipal:
|
||||
|
||||
NS_IMETHOD
|
||||
IsTrusted(char* scope, PRBool *pbIsTrusted);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsICertPrincipal:
|
||||
|
||||
/**
|
||||
* returns the certificate's data that is passes in via Initialize method.
|
||||
*
|
||||
* @param certChain - An array of pointers, with each pointer
|
||||
* pointing to a certificate data.
|
||||
* @param certChainLengths - An array of intergers. Each integer indicates
|
||||
* the length of the cert that is in CertChain
|
||||
* parametr.
|
||||
* @param noOfCerts - the number of certifcates that are in the certChain array
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetCertData(const unsigned char ***certChain, PRUint32 **certChainLengths, PRUint32 *noOfCerts);
|
||||
|
||||
/**
|
||||
* Returns the public key of the certificate.
|
||||
*
|
||||
* @param publicKey - the Public Key data will be returned in this field.
|
||||
* @param publicKeySize - the length of public key data is returned in this
|
||||
* parameter.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetPublicKey(unsigned char **publicKey, PRUint32 *publicKeySize);
|
||||
|
||||
/**
|
||||
* Returns the company name of the ceritificate (OU etc parameters of certificate)
|
||||
*
|
||||
* @param result - the certificate details about the signer.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetCompanyName(const char **ppCompanyName);
|
||||
|
||||
/**
|
||||
* Returns the certificate issuer's data (OU etc parameters of certificate)
|
||||
*
|
||||
* @param result - the details about the issuer
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetCertificateAuthority(const char **ppCertAuthority);
|
||||
|
||||
/**
|
||||
* Returns the serial number of certificate
|
||||
*
|
||||
* @param result - Returns the serial number of certificate
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetSerialNumber(const char **ppSerialNumber);
|
||||
|
||||
/**
|
||||
* Returns the expiration date of certificate
|
||||
*
|
||||
* @param result - Returns the expiration date of certificate
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetExpirationDate(const char **ppExpDate);
|
||||
|
||||
/**
|
||||
* Returns the finger print of certificate
|
||||
*
|
||||
* @param result - Returns the finger print of certificate
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetFingerPrint(const char **ppFingerPrint);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsCCertPrincipal:
|
||||
nsCCertPrincipal(const unsigned char **certChain, PRUint32 *certChainLengths, PRUint32 noOfCerts, nsresult *result);
|
||||
nsCCertPrincipal(nsPrincipal *pNSPrincipal);
|
||||
|
||||
virtual ~nsCCertPrincipal(void);
|
||||
nsPrincipal *GetPeer(void);
|
||||
|
||||
protected:
|
||||
nsPrincipal *m_pNSPrincipal;
|
||||
};
|
||||
|
||||
#endif // nsCCertPrincipal_h___
|
||||
125
mozilla/caps/include/nsCCodeSourcePrincipal.h
Normal file
125
mozilla/caps/include/nsCCodeSourcePrincipal.h
Normal file
@@ -0,0 +1,125 @@
|
||||
/* -*- 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.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef nsCCodeSourcePrincipal_h___
|
||||
#define nsCCodeSourcePrincipal_h___
|
||||
|
||||
#include "nsICodeSourcePrincipal.h"
|
||||
#include "nsPrincipal.h"
|
||||
|
||||
class nsCCodeSourcePrincipal : public nsICodeSourcePrincipal {
|
||||
public:
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsISupports:
|
||||
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsIPrincipal:
|
||||
|
||||
NS_IMETHOD
|
||||
IsTrusted(char* scope, PRBool *pbIsTrusted);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsICodeSourcePrincipal:
|
||||
|
||||
/**
|
||||
* returns the certificate's data that is passes in via Initialize method.
|
||||
*
|
||||
* @param certChain - An array of pointers, with each pointer
|
||||
* pointing to a certificate data.
|
||||
* @param certChainLengths - An array of intergers. Each integer indicates
|
||||
* the length of the cert that is in CertChain
|
||||
* parametr.
|
||||
* @param noOfCerts - the number of certifcates that are in the certChain array
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetCertData(const unsigned char ***certChain, PRUint32 **certChainLengths, PRUint32 *noOfCerts);
|
||||
|
||||
/**
|
||||
* Returns the public key of the certificate.
|
||||
*
|
||||
* @param publicKey - the Public Key data will be returned in this field.
|
||||
* @param publicKeySize - the length of public key data is returned in this
|
||||
* parameter.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetPublicKey(unsigned char **publicKey, PRUint32 *publicKeySize);
|
||||
|
||||
/**
|
||||
* Returns the company name of the ceritificate (OU etc parameters of certificate)
|
||||
*
|
||||
* @param result - the certificate details about the signer.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetCompanyName(const char **ppCompanyName);
|
||||
|
||||
/**
|
||||
* Returns the certificate issuer's data (OU etc parameters of certificate)
|
||||
*
|
||||
* @param result - the details about the issuer
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetCertificateAuthority(const char **ppCertAuthority);
|
||||
|
||||
/**
|
||||
* Returns the serial number of certificate
|
||||
*
|
||||
* @param result - Returns the serial number of certificate
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetSerialNumber(const char **ppSerialNumber);
|
||||
|
||||
/**
|
||||
* Returns the expiration date of certificate
|
||||
*
|
||||
* @param result - Returns the expiration date of certificate
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetExpirationDate(const char **ppExpDate);
|
||||
|
||||
/**
|
||||
* Returns the finger print of certificate
|
||||
*
|
||||
* @param result - Returns the finger print of certificate
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetFingerPrint(const char **ppFingerPrint);
|
||||
|
||||
/**
|
||||
* Returns the codebase URL of the principal.
|
||||
*
|
||||
* @param result - the resulting codebase URL
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetURL(const char **ppCodeBaseURL);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsCCodeSourcePrincipal:
|
||||
nsCCodeSourcePrincipal(const unsigned char **certChain, PRUint32 *certChainLengths, PRUint32 noOfCerts, const char *codebaseURL, nsresult *result);
|
||||
virtual ~nsCCodeSourcePrincipal(void);
|
||||
nsICertPrincipal *GetCertPrincipal() { return m_pNSICertPrincipal;}
|
||||
nsICodebasePrincipal *GetCodebasePrincipal() { return m_pNSICodebasePrincipal; }
|
||||
|
||||
protected:
|
||||
nsICertPrincipal *m_pNSICertPrincipal;
|
||||
nsICodebasePrincipal *m_pNSICodebasePrincipal;
|
||||
};
|
||||
|
||||
#endif // nsCCodeSourcePrincipal_h___
|
||||
63
mozilla/caps/include/nsCCodebasePrincipal.h
Normal file
63
mozilla/caps/include/nsCCodebasePrincipal.h
Normal file
@@ -0,0 +1,63 @@
|
||||
/* -*- 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.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef nsCCodebasePrincipal_h___
|
||||
#define nsCCodebasePrincipal_h___
|
||||
|
||||
#include "nsICodebasePrincipal.h"
|
||||
#include "nsPrincipal.h"
|
||||
|
||||
class nsCCodebasePrincipal : public nsICodebasePrincipal {
|
||||
public:
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsISupports:
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsIPrincipal:
|
||||
|
||||
NS_IMETHOD
|
||||
IsTrusted(char* scope, PRBool *pbIsTrusted);
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// from nsICodebasePrincipal:
|
||||
|
||||
/**
|
||||
* Returns the codebase URL of the principal.
|
||||
*
|
||||
* @param result - the resulting codebase URL
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetURL(const char **ppCodeBaseURL);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// from nsCCodebasePrincipal:
|
||||
|
||||
nsCCodebasePrincipal(const char *codebaseURL, nsresult *result);
|
||||
nsCCodebasePrincipal(nsPrincipal *pNSPrincipal);
|
||||
|
||||
virtual ~nsCCodebasePrincipal(void);
|
||||
nsPrincipal *GetPeer(void);
|
||||
|
||||
protected:
|
||||
nsPrincipal *m_pNSPrincipal;
|
||||
};
|
||||
|
||||
#endif // nsCCodebasePrincipal_h___
|
||||
166
mozilla/caps/include/nsCaps.h
Normal file
166
mozilla/caps/include/nsCaps.h
Normal file
@@ -0,0 +1,166 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef _NS_CAPS_H_
|
||||
#define _NS_CAPS_H_
|
||||
|
||||
#include "prtypes.h"
|
||||
#include "nsCapsEnums.h"
|
||||
|
||||
PR_BEGIN_EXTERN_C
|
||||
|
||||
struct nsPrincipal;
|
||||
struct nsTarget;
|
||||
struct nsPrivilegeManager;
|
||||
struct nsPrivilege;
|
||||
struct nsPrivilegeTable;
|
||||
struct NSJSJavaFrameWrapper;
|
||||
|
||||
/* wrappers for nsPrivilegeManager object */
|
||||
PR_IMPLEMENT(PRBool)
|
||||
nsCapsInitialize();
|
||||
|
||||
PR_EXTERN(PRBool)
|
||||
nsCapsRegisterPrincipal(struct nsPrincipal *principal);
|
||||
|
||||
PR_EXTERN(PRBool)
|
||||
nsCapsEnablePrivilege(void* context, struct nsTarget *target, PRInt32 callerDepth);
|
||||
|
||||
PR_EXTERN(PRBool)
|
||||
nsCapsIsPrivilegeEnabled(void* context, struct nsTarget *target, PRInt32 callerDepth);
|
||||
|
||||
PR_EXTERN(PRBool)
|
||||
nsCapsRevertPrivilege(void* context, struct nsTarget *target, PRInt32 callerDepth);
|
||||
|
||||
PR_EXTERN(PRBool)
|
||||
nsCapsDisablePrivilege(void* context, struct nsTarget *target, PRInt32 callerDepth);
|
||||
|
||||
PR_EXTERN(void*)
|
||||
nsCapsGetClassPrincipalsFromStack(void* context, PRInt32 callerDepth);
|
||||
|
||||
PR_EXTERN(nsSetComparisonType)
|
||||
nsCapsComparePrincipalArray(void* prin1Array, void* prin2Array);
|
||||
|
||||
PR_EXTERN(void*)
|
||||
nsCapsIntersectPrincipalArray(void* prin1Array, void* prin2Array);
|
||||
|
||||
PR_EXTERN(PRBool)
|
||||
nsCapsCanExtendTrust(void* from, void* to);
|
||||
|
||||
|
||||
/* wrappers for nsPrincipal object */
|
||||
PR_EXTERN(struct nsPrincipal *)
|
||||
nsCapsNewPrincipal(nsPrincipalType type, void * key,
|
||||
PRUint32 key_len, void *zig);
|
||||
|
||||
PR_EXTERN(const char *)
|
||||
nsCapsPrincipalToString(struct nsPrincipal *principal);
|
||||
|
||||
PR_EXTERN(PRBool)
|
||||
nsCapsIsCodebaseExact(struct nsPrincipal *principal);
|
||||
|
||||
PR_EXTERN(const char *)
|
||||
nsCapsPrincipalGetVendor(struct nsPrincipal *principal);
|
||||
|
||||
PR_EXTERN(void *)
|
||||
nsCapsNewPrincipalArray(PRUint32 count);
|
||||
|
||||
PR_EXTERN(void)
|
||||
nsCapsFreePrincipalArray(void *prinArray);
|
||||
|
||||
PR_EXTERN(void *)
|
||||
nsCapsGetPrincipalArrayElement(void *prinArray, PRUint32 index);
|
||||
|
||||
PR_EXTERN(void)
|
||||
nsCapsSetPrincipalArrayElement(void *prinArray, PRUint32 index, void *element);
|
||||
|
||||
PR_EXTERN(PRUint32)
|
||||
nsCapsGetPrincipalArraySize(void *prinArray);
|
||||
|
||||
|
||||
/* wrappers for nsTarget object */
|
||||
PR_EXTERN(struct nsTarget *)
|
||||
nsCapsFindTarget(char *name);
|
||||
|
||||
|
||||
/* wrappers for nsPrivilege object */
|
||||
PR_EXTERN(nsPermissionState)
|
||||
nsCapsGetPermission(struct nsPrivilege *privilege);
|
||||
|
||||
|
||||
/* wrappers for nsPrivilegeTable object */
|
||||
PR_EXTERN(struct nsPrivilege *)
|
||||
nsCapsGetPrivilege(struct nsPrivilegeTable *annotation, struct nsTarget *target);
|
||||
|
||||
/* Methods for stack walking */
|
||||
|
||||
extern struct NSJSJavaFrameWrapper * (*nsCapsNewNSJSJavaFrameWrapperCallback)(void *);
|
||||
PR_EXTERN(void)
|
||||
setNewNSJSJavaFrameWrapperCallback(struct NSJSJavaFrameWrapper * (*fp)(void *));
|
||||
|
||||
extern void (*nsCapsFreeNSJSJavaFrameWrapperCallback)(struct NSJSJavaFrameWrapper *);
|
||||
PR_EXTERN(void)
|
||||
setFreeNSJSJavaFrameWrapperCallback(void (*fp)(struct NSJSJavaFrameWrapper *));
|
||||
|
||||
extern void (*nsCapsGetStartFrameCallback)(struct NSJSJavaFrameWrapper *);
|
||||
PR_EXTERN(void)
|
||||
setGetStartFrameCallback(void (*fp)(struct NSJSJavaFrameWrapper *));
|
||||
|
||||
extern PRBool (*nsCapsIsEndOfFrameCallback)(struct NSJSJavaFrameWrapper *);
|
||||
PR_EXTERN(void)
|
||||
setIsEndOfFrameCallback(PRBool (*fp)(struct NSJSJavaFrameWrapper *));
|
||||
|
||||
extern PRBool (*nsCapsIsValidFrameCallback)(struct NSJSJavaFrameWrapper *);
|
||||
PR_EXTERN(void)
|
||||
setIsValidFrameCallback(PRBool (*fp)(struct NSJSJavaFrameWrapper *));
|
||||
|
||||
extern void * (*nsCapsGetNextFrameCallback)(struct NSJSJavaFrameWrapper *, int *);
|
||||
PR_EXTERN(void)
|
||||
setGetNextFrameCallback(void * (*fp)(struct NSJSJavaFrameWrapper *, int *));
|
||||
|
||||
extern void * (*nsCapsGetPrincipalArrayCallback)(struct NSJSJavaFrameWrapper *);
|
||||
PR_EXTERN(void)
|
||||
setOJIGetPrincipalArrayCallback(void * (*fp)(struct NSJSJavaFrameWrapper *));
|
||||
|
||||
extern void * (*nsCapsGetAnnotationCallback)(struct NSJSJavaFrameWrapper *);
|
||||
PR_EXTERN(void)
|
||||
setOJIGetAnnotationCallback(void * (*fp)(struct NSJSJavaFrameWrapper *));
|
||||
|
||||
extern void * (*nsCapsSetAnnotationCallback)(struct NSJSJavaFrameWrapper *, void *);
|
||||
PR_EXTERN(void)
|
||||
setOJISetAnnotationCallback(void * (*fp)(struct NSJSJavaFrameWrapper *, void *));
|
||||
|
||||
/*
|
||||
* Registration flag is set when the communicator
|
||||
* starts with argument '-reg_mode'. The following
|
||||
* functions provide API to enable and disable the flag.
|
||||
* Current state of the flag can be obtained using
|
||||
* nsGetRegistrationModeFlag().
|
||||
*/
|
||||
void
|
||||
nsCapsEnableRegistrationModeFlag(void);
|
||||
|
||||
void
|
||||
nsCapsDisableRegistrationModeFlag(void);
|
||||
|
||||
PRBool
|
||||
nsCapsGetRegistrationModeFlag(void);
|
||||
|
||||
PR_END_EXTERN_C
|
||||
|
||||
#endif /* _NS_CAPS_H_ */
|
||||
24
mozilla/caps/include/nsCapsEnums.h
Normal file
24
mozilla/caps/include/nsCapsEnums.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef _NS_CAPS_ENUMS_H_
|
||||
#define _NS_CAPS_ENUMS_H_
|
||||
|
||||
#include "nsCapsPublicEnums.h"
|
||||
|
||||
#endif /* _NS_CAPS_ENUMS_H_ */
|
||||
36
mozilla/caps/include/nsLoadZig.h
Normal file
36
mozilla/caps/include/nsLoadZig.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef _NS_LOAD_ZIG_H_
|
||||
#define _NS_LOAD_ZIG_H_
|
||||
|
||||
#include "prtypes.h"
|
||||
|
||||
PR_BEGIN_EXTERN_C
|
||||
|
||||
#include "zig.h"
|
||||
#include "nsZip.h"
|
||||
|
||||
PR_PUBLIC_API(void *)
|
||||
nsInitializeZig(ns_zip_t *zip,
|
||||
int (*callbackFnName) (int status, ZIG *zig,
|
||||
const char *metafile,
|
||||
char *pathname, char *errortext));
|
||||
PR_END_EXTERN_C
|
||||
|
||||
#endif /* _NS_LOAD_ZIG_H_ */
|
||||
167
mozilla/caps/include/nsPrincipal.h
Executable file
167
mozilla/caps/include/nsPrincipal.h
Executable file
@@ -0,0 +1,167 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef _NS_PRINCIPAL_H_
|
||||
#define _NS_PRINCIPAL_H_
|
||||
|
||||
#include "prtypes.h"
|
||||
#include "nsHashtable.h"
|
||||
#include "nsVector.h"
|
||||
#include "nsCaps.h"
|
||||
#include "nsCapsEnums.h"
|
||||
|
||||
|
||||
typedef nsVector nsPrincipalArray;
|
||||
|
||||
struct nsPrincipal {
|
||||
|
||||
public:
|
||||
|
||||
/* Public Field Accessors */
|
||||
/* Public Methods */
|
||||
|
||||
nsPrincipal(nsPrincipalType type, const void * key, PRUint32 key_len);
|
||||
nsPrincipal(nsPrincipalType type, const void * key, PRUint32 key_len, char *stringRep);
|
||||
virtual ~nsPrincipal();
|
||||
nsPrincipal(nsPrincipalType type, const void * key, PRUint32 key_len, void *zigObject);
|
||||
|
||||
nsPrincipal(nsPrincipalType type, const unsigned char **certChain,
|
||||
PRUint32 *certChainLengths,
|
||||
PRUint32 noOfCerts);
|
||||
|
||||
PRBool equals(nsPrincipal *principal);
|
||||
|
||||
char * getVendor(void);
|
||||
|
||||
char * getCompanyName(void);
|
||||
|
||||
char * getSecAuth(void);
|
||||
|
||||
char * getSerialNo(void);
|
||||
|
||||
char * getExpDate(void);
|
||||
|
||||
char * getFingerPrint(void);
|
||||
|
||||
char * getNickname(void);
|
||||
|
||||
nsPrincipalType getType();
|
||||
|
||||
void *getCertificate();
|
||||
|
||||
char *getKey();
|
||||
|
||||
PRUint32 getKeyLength();
|
||||
|
||||
PRInt32 hashCode(void);
|
||||
|
||||
PRBool isCodebase(void);
|
||||
|
||||
PRBool isCodebaseExact(void);
|
||||
|
||||
PRBool isCodebaseRegexp(void);
|
||||
|
||||
PRBool isSecurePrincipal(void);
|
||||
|
||||
/* The following method is used by Javasoft JVM to verify their
|
||||
* code signing certificates against our security DB files
|
||||
*/
|
||||
PRBool isTrustedCertChainPrincipal(void);
|
||||
|
||||
PRBool isFileCodeBase(void);
|
||||
|
||||
PRBool isCert(void);
|
||||
|
||||
PRBool isCertFingerprint(void);
|
||||
|
||||
char * toString(void);
|
||||
|
||||
char * toVerboseString(void);
|
||||
|
||||
char * savePrincipalPermanently(void);
|
||||
|
||||
/* Caller should free the principals and the Principal array */
|
||||
static nsPrincipalArray* getSigners(void* zigPtr, char* pathname);
|
||||
|
||||
|
||||
private:
|
||||
/* Private Field Accessors */
|
||||
nsPrincipalType itsType;
|
||||
|
||||
void* itsZig;
|
||||
|
||||
char* itsKey;
|
||||
PRUint32 itsKeyLen;
|
||||
|
||||
nsVector* itsCertArray;
|
||||
|
||||
PRInt32 itsHashCode;
|
||||
|
||||
char* itsCompanyName;
|
||||
char* itsCertAuth;
|
||||
char* itsSerialNo;
|
||||
char* itsExpDate;
|
||||
char* itsAsciiFingerPrint;
|
||||
char* itsNickname;
|
||||
char* itsString;
|
||||
|
||||
/* Private Methods */
|
||||
void init(nsPrincipalType type, const void * key, PRUint32 key_len);
|
||||
|
||||
PRInt32 computeHashCode(const void * key, PRUint32 key_len);
|
||||
|
||||
PRInt32 computeHashCode(void);
|
||||
|
||||
char * saveCert(void);
|
||||
|
||||
char * getCertAttribute(int attrib);
|
||||
};
|
||||
|
||||
|
||||
class PrincipalKey: public nsHashKey {
|
||||
public:
|
||||
nsPrincipal *itsPrincipal;
|
||||
PrincipalKey(nsPrincipal *prin) {
|
||||
itsPrincipal = prin;
|
||||
}
|
||||
|
||||
PRUint32 HashValue(void) const {
|
||||
return itsPrincipal->hashCode();
|
||||
}
|
||||
|
||||
PRBool Equals(const nsHashKey *aKey) const {
|
||||
return (itsPrincipal->equals(((const PrincipalKey *) aKey)->itsPrincipal));
|
||||
}
|
||||
|
||||
nsHashKey *Clone(void) const {
|
||||
return new PrincipalKey(itsPrincipal);
|
||||
}
|
||||
};
|
||||
|
||||
/* XXX: Hack to determine the system principal */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
nsPrincipal * CreateSystemPrincipal(char* zip_file_name, char *pathname);
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif /* __cplusplus */
|
||||
/* XXX: end of hack to determine the system principal */
|
||||
|
||||
#endif /* _NS_PRINCIPAL_H_ */
|
||||
121
mozilla/caps/include/nsPrivilege.h
Executable file
121
mozilla/caps/include/nsPrivilege.h
Executable file
@@ -0,0 +1,121 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef _NS_PRIVILEGE_H_
|
||||
#define _NS_PRIVILEGE_H_
|
||||
|
||||
#include "prtypes.h"
|
||||
#include "nsCaps.h"
|
||||
#include "nsCapsEnums.h"
|
||||
|
||||
PRBool nsPrivilegeInitialize(void);
|
||||
|
||||
struct nsPrivilege {
|
||||
|
||||
public:
|
||||
/* Public Field Accessors */
|
||||
nsPermissionState itsPerm;
|
||||
|
||||
nsDurationState itsDuration;
|
||||
|
||||
/* Public Methods */
|
||||
nsPrivilege(nsPermissionState perm, nsDurationState duration);
|
||||
|
||||
virtual ~nsPrivilege(void);
|
||||
|
||||
static nsPrivilege * findPrivilege(nsPermissionState permission, nsDurationState duration);
|
||||
|
||||
static nsPermissionState add(nsPermissionState perm1, nsPermissionState perm2);
|
||||
|
||||
static nsPrivilege * add(nsPrivilege *privilege1, nsPrivilege *privilege2);
|
||||
|
||||
PRBool samePermission(nsPrivilege *privilege);
|
||||
|
||||
PRBool samePermission(nsPermissionState perm);
|
||||
|
||||
PRBool sameDuration(nsPrivilege *privilege);
|
||||
|
||||
PRBool sameDuration(nsDurationState duration);
|
||||
|
||||
PRBool isAllowed(void);
|
||||
|
||||
PRBool isAllowedForever(void);
|
||||
|
||||
PRBool isForbidden(void);
|
||||
|
||||
PRBool isForbiddenForever(void);
|
||||
|
||||
PRBool isBlank(void);
|
||||
|
||||
nsPermissionState getPermission(void);
|
||||
|
||||
nsDurationState getDuration(void);
|
||||
|
||||
static nsPrivilege * findPrivilege(char *privStr);
|
||||
|
||||
char * toString(void);
|
||||
|
||||
private:
|
||||
|
||||
/* Private Field Accessors */
|
||||
char *itsString;
|
||||
|
||||
static PRBool theInited;
|
||||
|
||||
/* Private Methods */
|
||||
};
|
||||
|
||||
/**
|
||||
* add() method takes two permissions and returns a new permission.
|
||||
* Permission addition follows these rules:
|
||||
* <pre>
|
||||
* ALLOWED + ALLOWED = ALLOWED 1 + 1 = 1
|
||||
* ALLOWED + BLANK = ALLOWED 1 + 2 = 1
|
||||
* BLANK + BLANK = BLANK 2 + 2 = 2
|
||||
* ALLOWED + FORBIDDEN = FORBIDDEN 1 + 0 = 0
|
||||
* BLANK + FORBIDDEN = FORBIDDEN 2 + 0 = 0
|
||||
* FORBIDDEN + FORBIDDEN = FORBIDDEN 0 + 0 = 0
|
||||
* </pre>
|
||||
*
|
||||
* @return the permission that results from the above rules
|
||||
* <p>
|
||||
* Note: there are two versions of add(). One adds two Privilege
|
||||
* objects. The other just adds permissions (as returned by
|
||||
* <a href="#getPermission">getPermission()</a>).
|
||||
*/
|
||||
/* XXX: Whenever you change the value of FORBIDDEN, ALLOWED and BLANK
|
||||
* make sure they obey the laws mentioned in add() method.
|
||||
*/
|
||||
inline nsPermissionState nsPrivilege::add(nsPermissionState p1, nsPermissionState p2)
|
||||
{
|
||||
if (p1 < p2)
|
||||
return p1;
|
||||
else
|
||||
return p2;
|
||||
}
|
||||
|
||||
inline nsPrivilege * nsPrivilege::add(nsPrivilege *p1, nsPrivilege *p2)
|
||||
{
|
||||
if (p1->itsPerm < p2->itsPerm)
|
||||
return p1;
|
||||
else
|
||||
return p2;
|
||||
}
|
||||
|
||||
|
||||
#endif /* _NS_PRIVILEGE_H_ */
|
||||
236
mozilla/caps/include/nsPrivilegeManager.h
Executable file
236
mozilla/caps/include/nsPrivilegeManager.h
Executable file
@@ -0,0 +1,236 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef _NS_PRIVILEGE_MANAGER_H_
|
||||
#define _NS_PRIVILEGE_MANAGER_H_
|
||||
|
||||
#include "prtypes.h"
|
||||
#include "prio.h"
|
||||
#include "prmon.h"
|
||||
#include "nsHashtable.h"
|
||||
|
||||
#include "nsVector.h"
|
||||
#include "nsCaps.h"
|
||||
#include "nsTarget.h"
|
||||
#include "nsPrincipal.h"
|
||||
#include "nsPrivilege.h"
|
||||
#include "nsPrivilegeTable.h"
|
||||
#include "nsSystemPrivilegeTable.h"
|
||||
#include "nsCapsEnums.h"
|
||||
|
||||
extern PRBool nsCaps_lock(void);
|
||||
extern void nsCaps_unlock(void);
|
||||
|
||||
PR_BEGIN_EXTERN_C
|
||||
PRBool CMGetBoolPref(char * pref_name);
|
||||
PR_END_EXTERN_C
|
||||
|
||||
PRBool nsPrivilegeManagerInitialize(void);
|
||||
|
||||
struct nsPrivilegeManager {
|
||||
|
||||
public:
|
||||
/* Public Methods */
|
||||
|
||||
nsPrivilegeManager(void);
|
||||
virtual ~nsPrivilegeManager(void);
|
||||
|
||||
void registerSystemPrincipal(nsPrincipal *principal);
|
||||
|
||||
void registerPrincipal(nsPrincipal *principal);
|
||||
|
||||
PRBool unregisterPrincipal(nsPrincipal *principal);
|
||||
|
||||
PRBool isPrivilegeEnabled(nsTarget *target, PRInt32 callerDepth);
|
||||
|
||||
PRBool isPrivilegeEnabled(void* context, nsTarget *target,
|
||||
PRInt32 callerDepth);
|
||||
|
||||
PRBool enablePrivilege(nsTarget *target, PRInt32 callerDepth);
|
||||
|
||||
PRBool enablePrivilege(void* context, nsTarget *target, PRInt32 callerDepth);
|
||||
|
||||
PRBool enablePrivilege(nsTarget *target, nsPrincipal *preferredPrincipal,
|
||||
PRInt32 callerDepth);
|
||||
|
||||
PRBool enablePrivilege(void* context, nsTarget *target,
|
||||
nsPrincipal *preferredPrincipal,
|
||||
PRInt32 callerDepth);
|
||||
|
||||
PRBool revertPrivilege(nsTarget *target, PRInt32 callerDepth);
|
||||
|
||||
PRBool revertPrivilege(void* context, nsTarget *target, PRInt32 callerDepth);
|
||||
|
||||
PRBool disablePrivilege(nsTarget *target, PRInt32 callerDepth);
|
||||
|
||||
PRBool disablePrivilege(void* context, nsTarget *target, PRInt32 callerDepth);
|
||||
|
||||
PRBool enablePrincipalPrivilegeHelper(nsTarget *target, PRInt32 callerDepth,
|
||||
nsPrincipal *preferredPrin, void * data,
|
||||
nsTarget *impersonator);
|
||||
|
||||
PRBool enablePrincipalPrivilegeHelper(void* context, nsTarget *target,
|
||||
PRInt32 callerDepth,
|
||||
nsPrincipal *preferredPrin,
|
||||
void * data,
|
||||
nsTarget *impersonator);
|
||||
|
||||
nsPrivilegeTable *enableScopePrivilegeHelper(nsTarget *target,
|
||||
PRInt32 callerDepth,
|
||||
void *data,
|
||||
PRBool helpingSetScopePrivilege,
|
||||
nsPrincipal *prefPrin);
|
||||
|
||||
nsPrivilegeTable *enableScopePrivilegeHelper(void* context, nsTarget *target,
|
||||
PRInt32 callerDepth, void *data,
|
||||
PRBool helpingSetScopePrivilege,
|
||||
nsPrincipal *prefPrin);
|
||||
|
||||
PRBool AskPermission(nsPrincipal* useThisPrin, nsTarget* target, void* data);
|
||||
|
||||
void SetPermission(nsPrincipal *useThisPrin, nsTarget *target,
|
||||
nsPrivilege *newPrivilege);
|
||||
|
||||
void registerPrincipalAndSetPrivileges(nsPrincipal *principal,
|
||||
nsTarget *target,
|
||||
nsPrivilege *newPrivilege);
|
||||
|
||||
void updatePrivilegeTable(nsTarget *target,
|
||||
nsPrivilegeTable *privTable,
|
||||
nsPrivilege *newPrivilege);
|
||||
|
||||
PRBool checkPrivilegeGranted(nsTarget *target, PRInt32 callerDepth);
|
||||
|
||||
PRBool checkPrivilegeGranted(void* context, nsTarget *target,
|
||||
PRInt32 callerDepth);
|
||||
|
||||
PRBool checkPrivilegeGranted(nsTarget *target, nsPrincipal *principal,
|
||||
void *data);
|
||||
|
||||
PRBool checkPrivilegeGranted(nsTarget *target, PRInt32 callerDepth,
|
||||
void *data);
|
||||
|
||||
PRBool checkPrivilegeGranted(void* context, nsTarget *target,
|
||||
PRInt32 callerDepth, void *data);
|
||||
|
||||
nsPrivilege *getPrincipalPrivilege(nsTarget *target, nsPrincipal *prin,
|
||||
void *data);
|
||||
|
||||
static nsPrivilegeManager * getPrivilegeManager(void);
|
||||
|
||||
static nsPrincipalArray* getMyPrincipals(PRInt32 callerDepth);
|
||||
|
||||
static nsPrincipalArray* getMyPrincipals(void* context, PRInt32 callerDepth);
|
||||
|
||||
static nsPrincipal * getSystemPrincipal(void);
|
||||
|
||||
static PRBool hasSystemPrincipal(nsPrincipalArray *prinArray);
|
||||
|
||||
static nsPrincipal* getUnsignedPrincipal(void);
|
||||
|
||||
static nsPrincipal* getUnknownPrincipal(void);
|
||||
|
||||
nsSetComparisonType comparePrincipalArray(nsPrincipalArray* prin1Array,
|
||||
nsPrincipalArray* prin2Array);
|
||||
|
||||
nsPrincipalArray* intersectPrincipalArray(nsPrincipalArray* prin1Array,
|
||||
nsPrincipalArray* prin2Array);
|
||||
|
||||
PRBool canExtendTrust(nsPrincipalArray* prin1Array,
|
||||
nsPrincipalArray* prin2Array);
|
||||
|
||||
PRBool checkMatchPrincipal(nsPrincipal *principal, PRInt32 callerDepth);
|
||||
|
||||
PRBool checkMatchPrincipal(void* context, nsPrincipal *principal,
|
||||
PRInt32 callerDepth);
|
||||
|
||||
/* Helper functions for ADMIN UI */
|
||||
const char * getAllPrincipalsString(void);
|
||||
|
||||
nsPrincipal * getPrincipalFromString(char *prinName);
|
||||
|
||||
void getTargetsWithPrivileges(char *prinName, char** forever,
|
||||
char** session, char **denied);
|
||||
|
||||
PRBool removePrincipal(char *prinName);
|
||||
|
||||
PRBool removePrincipalsPrivilege(char *prinName, char *targetName);
|
||||
|
||||
void remove(nsPrincipal *prin, nsTarget *target);
|
||||
|
||||
/* The following are old native methods */
|
||||
char * checkPrivilegeEnabled(nsTargetArray* targetArray,
|
||||
PRInt32 callerDepth, void *data);
|
||||
|
||||
char * checkPrivilegeEnabled(void* context, nsTargetArray* targetArray,
|
||||
PRInt32 callerDepth, void *data);
|
||||
|
||||
nsPrincipalArray* getClassPrincipalsFromStack(PRInt32 callerDepth);
|
||||
|
||||
nsPrincipalArray* getClassPrincipalsFromStack(void* context,
|
||||
PRInt32 callerDepth);
|
||||
|
||||
nsPrivilegeTable * getPrivilegeTableFromStack(PRInt32 callerDepth,
|
||||
PRBool createIfNull);
|
||||
|
||||
nsPrivilegeTable * getPrivilegeTableFromStack(void* context,
|
||||
PRInt32 callerDepth,
|
||||
PRBool createIfNull);
|
||||
|
||||
/* End of native methods */
|
||||
|
||||
private:
|
||||
|
||||
nsHashtable *itsPrinToPrivTable;
|
||||
nsHashtable *itsPrinToMacroTargetPrivTable;
|
||||
nsHashtable *itsPrinNameToPrincipalTable;
|
||||
|
||||
static PRBool theSecurityInited;
|
||||
|
||||
static char * SignedAppletDBName;
|
||||
|
||||
static PRBool theInited;
|
||||
|
||||
/* Private Field Accessors */
|
||||
|
||||
/* Private Methods */
|
||||
|
||||
void addToPrinNameToPrincipalTable(nsPrincipal *prin);
|
||||
|
||||
PRBool enablePrivilegePrivate(void* context, nsTarget *target,
|
||||
nsPrincipal *preferredPrincipal,
|
||||
PRInt32 callerDepth);
|
||||
|
||||
nsPermissionState getPrincipalPrivilege(nsTarget *target,
|
||||
nsPrincipalArray* callerPrinArray,
|
||||
void *data);
|
||||
|
||||
PRBool isPermissionGranted(nsTarget *target,
|
||||
nsPrincipalArray* callerPrinArray,
|
||||
void *data);
|
||||
|
||||
|
||||
/* The following methods are used to save and load the persistent store */
|
||||
void save(nsPrincipal *prin, nsTarget *target, nsPrivilege *newPrivilege);
|
||||
|
||||
void load(void);
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif /* _NS_PRIVILEGE_MANAGER_H_ */
|
||||
58
mozilla/caps/include/nsPrivilegeTable.h
Executable file
58
mozilla/caps/include/nsPrivilegeTable.h
Executable file
@@ -0,0 +1,58 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef _NS_PRIVILEGE_TABLE_H_
|
||||
#define _NS_PRIVILEGE_TABLE_H_
|
||||
|
||||
#include "prtypes.h"
|
||||
#include "nsHashtable.h"
|
||||
#include "nsCaps.h"
|
||||
#include "nsTarget.h"
|
||||
#include "nsPrivilege.h"
|
||||
|
||||
struct nsPrivilegeTable {
|
||||
|
||||
public:
|
||||
|
||||
/* Public Methods */
|
||||
nsPrivilegeTable(void);
|
||||
virtual ~nsPrivilegeTable(void);
|
||||
|
||||
PRInt32 size(void);
|
||||
|
||||
PRBool isEmpty(void);
|
||||
|
||||
virtual nsPrivilege * get(nsTarget *t);
|
||||
|
||||
nsPrivilege * put(nsTarget *a, nsPrivilege *priv);
|
||||
|
||||
nsPrivilege * remove(nsTarget *key);
|
||||
|
||||
nsPrivilegeTable * clone(void);
|
||||
|
||||
void clear(void);
|
||||
|
||||
void Enumerate(nsHashtableEnumFunc aEnumFunc);
|
||||
|
||||
private:
|
||||
|
||||
/* Private Field Accessors */
|
||||
nsHashtable * itsTable;
|
||||
};
|
||||
|
||||
#endif /* _NS_PRIVILEGE_TABLE_H_ */
|
||||
38
mozilla/caps/include/nsSystemPrivilegeTable.h
Executable file
38
mozilla/caps/include/nsSystemPrivilegeTable.h
Executable file
@@ -0,0 +1,38 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef _NS_SYSTEM_PRIVILEGE_TABLE_H_
|
||||
#define _NS_SYSTEM_PRIVILEGE_TABLE_H_
|
||||
|
||||
#include "nsTarget.h"
|
||||
#include "nsPrivilege.h"
|
||||
#include "nsPrivilegeTable.h"
|
||||
#include "nsCom.h"
|
||||
|
||||
|
||||
class nsSystemPrivilegeTable : public nsPrivilegeTable {
|
||||
|
||||
public:
|
||||
|
||||
/* Public Methods */
|
||||
nsSystemPrivilegeTable(void);
|
||||
|
||||
virtual nsPrivilege * get(nsTarget *a);
|
||||
};
|
||||
|
||||
#endif /* _NS_SYSTEM_PRIVILEGE_TABLE_H_ */
|
||||
235
mozilla/caps/include/nsTarget.h
Executable file
235
mozilla/caps/include/nsTarget.h
Executable file
@@ -0,0 +1,235 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef _NS_TARGET_H_
|
||||
#define _NS_TARGET_H_
|
||||
|
||||
#include <string.h>
|
||||
#include "prtypes.h"
|
||||
#include "plhash.h"
|
||||
|
||||
#include "nsHashtable.h"
|
||||
#include "nsVector.h"
|
||||
#include "nsCaps.h"
|
||||
#include "nsPrincipal.h"
|
||||
#include "nsPrivilege.h"
|
||||
#include "nsUserDialogHelper.h"
|
||||
|
||||
typedef nsVector nsTargetArray;
|
||||
|
||||
PR_BEGIN_EXTERN_C
|
||||
#include "jpermission.h"
|
||||
PR_PUBLIC_API(void)
|
||||
java_netscape_security_getTargetDetails(const char *charSetName, char* targetName,
|
||||
char** details, char **risk);
|
||||
/* XXXXXXXX Begin oF HACK */
|
||||
|
||||
#ifdef XXX
|
||||
extern int CAPS_TARGET_RISK_COLOR_HIGH;
|
||||
#endif
|
||||
|
||||
extern char* capsGetString(int id);
|
||||
/* XXXXXXXX end oF HACK */
|
||||
|
||||
PR_END_EXTERN_C
|
||||
|
||||
|
||||
extern PRBool CreateSystemTargets(nsPrincipal *sysPrin);
|
||||
|
||||
struct nsTarget {
|
||||
|
||||
public:
|
||||
|
||||
/* Public Methods */
|
||||
|
||||
virtual ~nsTarget(void);
|
||||
|
||||
nsTarget(char *name, nsPrincipal *prin,
|
||||
PRInt32 risk = JavaSecUI_targetRiskHigh(),
|
||||
/* XXX: char *riskColor = JavaSecUI_getString(CAPS_TARGET_RISK_COLOR_HIGH), */
|
||||
char *riskColor = "High",
|
||||
char *description = NULL,
|
||||
char *detailDescription = NULL,
|
||||
char *url = NULL,
|
||||
nsTargetArray* targetArray = NULL)
|
||||
{
|
||||
init(name, prin, targetArray, risk, riskColor, description,
|
||||
detailDescription, url);
|
||||
}
|
||||
|
||||
nsTarget(char *name, nsPrincipal *prin,
|
||||
PRInt32 risk = JavaSecUI_targetRiskHigh(),
|
||||
/* XXX: char *riskColor = JavaSecUI_getString(CAPS_TARGET_RISK_COLOR_HIGH), */
|
||||
char *riskColor = "High",
|
||||
int desc_id = 0,
|
||||
int detail_desc_id = 0,
|
||||
int help_url_id = 0,
|
||||
nsTargetArray* targetArray = NULL);
|
||||
|
||||
nsTarget * registerTarget(void);
|
||||
|
||||
nsTarget * registerTarget(void* context);
|
||||
|
||||
static nsTarget * findTarget(nsTarget *target);
|
||||
|
||||
static nsTarget * findTarget(char *name);
|
||||
|
||||
static nsTarget * findTarget(char *name, nsPrincipal *prin);
|
||||
|
||||
nsPrivilege * checkPrivilegeEnabled(nsTargetArray* prinArray, void *data);
|
||||
|
||||
nsPrivilege * checkPrivilegeEnabled(nsTargetArray* prinArray);
|
||||
|
||||
nsPrivilege * checkPrivilegeEnabled(nsPrincipal *p, void *data);
|
||||
|
||||
virtual nsPrivilege * enablePrivilege(nsPrincipal *prin, void *data);
|
||||
|
||||
nsPrivilege * getPrincipalPrivilege(nsPrincipal *prin, void *data);
|
||||
|
||||
nsTargetArray* getFlattenedTargetArray(void);
|
||||
|
||||
static nsTargetArray* getAllRegisteredTargets(void);
|
||||
|
||||
char * getRisk(void);
|
||||
|
||||
char * getRiskColor(void);
|
||||
|
||||
char * getDescription(void);
|
||||
|
||||
char * getDetailDescription(void);
|
||||
|
||||
static nsTarget * getTargetFromDescription(char *a);
|
||||
|
||||
char * getHelpURL(void);
|
||||
|
||||
char * getDetailedInfo(void *a);
|
||||
|
||||
nsPrincipal * getPrincipal(void);
|
||||
|
||||
char * getName(void);
|
||||
|
||||
PRBool equals(nsTarget *a);
|
||||
|
||||
PRInt32 hashCode(void);
|
||||
|
||||
char * toString(void);
|
||||
|
||||
PRBool isRegistered(void);
|
||||
|
||||
private:
|
||||
|
||||
/* Private Field Accessors */
|
||||
char * itsName;
|
||||
|
||||
nsPrincipal * itsPrincipal;
|
||||
|
||||
PRInt32 itsRisk;
|
||||
|
||||
char * itsRiskColorStr;
|
||||
|
||||
char * itsDescriptionStr;
|
||||
|
||||
char * itsDetailDescriptionStr;
|
||||
|
||||
char * itsURLStr;
|
||||
|
||||
PRBool itsRegistered;
|
||||
|
||||
nsTargetArray* itsTargetArray;
|
||||
|
||||
nsTargetArray* itsExpandedTargetArray;
|
||||
|
||||
char *itsString;
|
||||
|
||||
PRUint32 itsDescriptionHash;
|
||||
|
||||
static PRBool theInited;
|
||||
|
||||
/* Private Methods */
|
||||
void init(char *name, nsPrincipal *prin, nsTargetArray* targetArray, PRInt32 risk, char *riskColor, char *description, char *detailDescription, char *url);
|
||||
|
||||
void getFlattenedTargets(nsHashtable *targHash, nsTargetArray* expandedTargetArray);
|
||||
|
||||
};
|
||||
|
||||
|
||||
class TargetKey: public nsHashKey {
|
||||
public:
|
||||
nsTarget *itsTarget;
|
||||
TargetKey(nsTarget *targ) {
|
||||
itsTarget = targ;
|
||||
}
|
||||
|
||||
PRUint32 HashValue(void) const {
|
||||
return itsTarget->hashCode();
|
||||
}
|
||||
|
||||
PRBool Equals(const nsHashKey *aKey) const {
|
||||
return (itsTarget->equals(((const TargetKey *) aKey)->itsTarget));
|
||||
}
|
||||
|
||||
nsHashKey *Clone(void) const {
|
||||
return new TargetKey(itsTarget);
|
||||
}
|
||||
};
|
||||
|
||||
/* XXX: IMO, IntegerKey and StringKey should be part of xpcom */
|
||||
class IntegerKey: public nsHashKey {
|
||||
private:
|
||||
PRUint32 itsHash;
|
||||
|
||||
public:
|
||||
IntegerKey(PRUint32 hash) {
|
||||
itsHash = hash;
|
||||
}
|
||||
|
||||
PRUint32 HashValue(void) const {
|
||||
return itsHash;
|
||||
}
|
||||
|
||||
PRBool Equals(const nsHashKey *aKey) const {
|
||||
return (itsHash == (((const IntegerKey *) aKey)->itsHash)) ? PR_TRUE : PR_FALSE;
|
||||
}
|
||||
|
||||
nsHashKey *Clone(void) const {
|
||||
return new IntegerKey(itsHash);
|
||||
}
|
||||
};
|
||||
|
||||
class StringKey: public nsHashKey {
|
||||
public:
|
||||
const char *itsString;
|
||||
|
||||
StringKey(const char *string) {
|
||||
itsString = string;
|
||||
}
|
||||
|
||||
PRUint32 HashValue(void) const {
|
||||
return PL_HashString(itsString);
|
||||
}
|
||||
|
||||
PRBool Equals(const nsHashKey *aKey) const {
|
||||
return (strcmp(itsString, (((const StringKey *) aKey)->itsString)) == 0);
|
||||
}
|
||||
|
||||
nsHashKey *Clone(void) const {
|
||||
return new StringKey(itsString);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _NS_TARGET_H_ */
|
||||
46
mozilla/caps/include/nsUserDialogHelper.h
Normal file
46
mozilla/caps/include/nsUserDialogHelper.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef _NS_USER_DIALOG_HELPER_H_
|
||||
#define _NS_USER_DIALOG_HELPER_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "prtypes.h"
|
||||
|
||||
typedef enum nsRiskType {
|
||||
nsRiskType_LowRisk=10,
|
||||
nsRiskType_MediumRisk=20,
|
||||
nsRiskType_HighRisk=30
|
||||
} nsRiskType;
|
||||
|
||||
extern char * JavaSecUI_targetRiskStr(int risk);
|
||||
extern int JavaSecUI_targetRiskLow(void);
|
||||
extern int JavaSecUI_targetRiskMedium(void);
|
||||
extern int JavaSecUI_targetRiskHigh(void);
|
||||
|
||||
extern char * JavaSecUI_getHelpURL(int id);
|
||||
extern char * JavaSecUI_getString(int id);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _NS_USER_DIALOG_HELPER_H_ */
|
||||
84
mozilla/caps/include/nsUserTarget.h
Executable file
84
mozilla/caps/include/nsUserTarget.h
Executable file
@@ -0,0 +1,84 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef _NS_USER_TARGET_H_
|
||||
#define _NS_USER_TARGET_H_
|
||||
|
||||
|
||||
#include "prtypes.h"
|
||||
|
||||
#include "nsTarget.h"
|
||||
#include "nsPrivilege.h"
|
||||
#include "nsPrincipal.h"
|
||||
#include "nsCom.h"
|
||||
|
||||
/* Any methods that is not defined here is in Java */
|
||||
class nsUserTarget : public nsTarget {
|
||||
|
||||
public:
|
||||
|
||||
/* Public Methods */
|
||||
|
||||
nsUserTarget(char *name);
|
||||
virtual ~nsUserTarget(void);
|
||||
|
||||
nsUserTarget(char *name, nsPrincipal *prin, PRInt32 risk,
|
||||
char *riskColor, char *description,
|
||||
char *detailDescription, char *url)
|
||||
: nsTarget(name, prin, risk, riskColor, description, detailDescription,
|
||||
url, NULL)
|
||||
{
|
||||
}
|
||||
|
||||
nsUserTarget(char *name, nsPrincipal *prin, PRInt32 risk,
|
||||
char *riskColor, char *description,
|
||||
char *detailDescription, char *url,
|
||||
nsTargetArray *targetArray)
|
||||
: nsTarget(name, prin, risk, riskColor, description, detailDescription,
|
||||
url, targetArray)
|
||||
{
|
||||
}
|
||||
|
||||
nsUserTarget(char *name, nsPrincipal *prin, PRInt32 risk,
|
||||
char *riskColor,
|
||||
int desc_id,
|
||||
int detail_desc_id,
|
||||
int help_url_id)
|
||||
: nsTarget(name, prin, risk, riskColor, desc_id, detail_desc_id,
|
||||
help_url_id, NULL)
|
||||
{
|
||||
}
|
||||
|
||||
nsUserTarget(char *name, nsPrincipal *prin, PRInt32 risk,
|
||||
char *riskColor,
|
||||
int desc_id,
|
||||
int detail_desc_id,
|
||||
int help_url_id,
|
||||
nsTargetArray *targetArray)
|
||||
: nsTarget(name, prin, risk, riskColor, desc_id, detail_desc_id,
|
||||
help_url_id, targetArray)
|
||||
{
|
||||
}
|
||||
|
||||
nsPrivilege * enablePrivilege(nsPrincipal *prin, void *data);
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif /* _NS_USER_TARGET_H_ */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user