Compare commits

..

20 Commits

Author SHA1 Message Date
warren%netscape.com
e840c5935b fixing for linux...
git-svn-id: svn://10.0.0.236/branches/jar_restructuring_branch@79698 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-21 03:18:17 +00:00
sfraser%netscape.com
88cb187392 The SeaMonkey checkout line was commented out; fixed. Added new function Moz.pm to Launch codewarrior, and therefore create idepath.txt.
git-svn-id: svn://10.0.0.236/branches/jar_restructuring_branch@79630 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-20 16:22:08 +00:00
sfraser%netscape.com
063be1f2dc Export GetFileModDate
git-svn-id: svn://10.0.0.236/branches/jar_restructuring_branch@79606 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-20 06:23:21 +00:00
sfraser%netscape.com
675599de77 Do mod date comparisons when deciding whether to replace files
git-svn-id: svn://10.0.0.236/branches/jar_restructuring_branch@79605 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-20 06:22:52 +00:00
sfraser%netscape.com
be102bddcb Support for + meaning override.
git-svn-id: svn://10.0.0.236/branches/jar_restructuring_branch@79602 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-20 05:44:00 +00:00
sfraser%netscape.com
a53f522ef0 Explicitly check out mozilla/security/base/res/jar.mn with the jar branch tag, to override the security branch version. This change should NOT be landed on the trunk.
git-svn-id: svn://10.0.0.236/branches/jar_restructuring_branch@79600 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-20 05:06:07 +00:00
warren%netscape.com
5fcee56781 More jar building changes
git-svn-id: svn://10.0.0.236/branches/jar_restructuring_branch@79596 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-20 03:28:22 +00:00
sfraser%netscape.com
b128baac9b More jar file fixes on the branch.
git-svn-id: svn://10.0.0.236/branches/jar_restructuring_branch@79595 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-20 02:33:22 +00:00
warren%netscape.com
66f4bf40c5 Added check for mod dates when copying.
git-svn-id: svn://10.0.0.236/branches/jar_restructuring_branch@79576 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-19 23:51:32 +00:00
warren%netscape.com
05dcba736a Jar reorg for mac installer
git-svn-id: svn://10.0.0.236/branches/jar_restructuring_branch@79530 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-19 09:33:05 +00:00
warren%netscape.com
e4cfc8ac8a Jar reorg for mac installer
git-svn-id: svn://10.0.0.236/branches/jar_restructuring_branch@79529 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-19 08:47:51 +00:00
warren%netscape.com
9e389deff3 Fixed up installed-chrome.txt format for new jar structure. Made it check for dup entries.
git-svn-id: svn://10.0.0.236/branches/jar_restructuring_branch@79528 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-19 07:43:57 +00:00
warren%netscape.com
40a772c25a Removing obsolete install rule.
git-svn-id: svn://10.0.0.236/branches/jar_restructuring_branch@79522 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-19 05:49:33 +00:00
warren%netscape.com
f96ddddc59 Fixed paths.
git-svn-id: svn://10.0.0.236/branches/jar_restructuring_branch@79521 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-19 05:43:09 +00:00
warren%netscape.com
d355fda8bb Fixed chrome rules to work for ns tree.
git-svn-id: svn://10.0.0.236/branches/jar_restructuring_branch@79513 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-19 04:03:47 +00:00
warren%netscape.com
e0ba6391f2 Chrome jar reorg for unix.
git-svn-id: svn://10.0.0.236/branches/jar_restructuring_branch@79512 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-19 03:58:15 +00:00
sfraser%netscape.com
316b6c0691 Fixed to pull jar_restructuring_branch on the branch.
git-svn-id: svn://10.0.0.236/branches/jar_restructuring_branch@79474 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-18 22:57:34 +00:00
(no author)
60696e7fa3 This commit was manufactured by cvs2svn to create branch
'jar_restructuring_branch'.

git-svn-id: svn://10.0.0.236/branches/jar_restructuring_branch@79472 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-18 22:37:00 +00:00
warren%netscape.com
62a9a0a420 Chrome jar file restructuring - Windows portion.
git-svn-id: svn://10.0.0.236/branches/jar_restructuring_branch@79422 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-18 10:18:57 +00:00
(no author)
1970e0e9fb This commit was manufactured by cvs2svn to create branch
'jar_restructuring_branch'.

git-svn-id: svn://10.0.0.236/branches/jar_restructuring_branch@79418 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-18 07:08:23 +00:00
20006 changed files with 3896947 additions and 2519 deletions

43
mozilla/LEGAL Normal file
View 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.

567
mozilla/LICENSE Normal file
View File

@@ -0,0 +1,567 @@
MOZILLA PUBLIC LICENSE
Version 1.1
---------------
1. Definitions.
1.0.1. "Commercial Use" means distribution or otherwise making the
Covered Code available to a third party.
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.8.1. "Licensable" means having the right to grant, to the maximum
extent possible, whether at the time of the initial grant or
subsequently acquired, any and all of the rights conveyed herein.
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.10.1. "Patent Claims" means any patent claim(s), now owned or
hereafter acquired, including without limitation, method, process,
and apparatus claims, in any patent Licensable by grantor.
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 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" (or "Your") 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 more than fifty percent
(50%) 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) under intellectual property rights (other than patent or
trademark) Licensable by Initial Developer to use, reproduce,
modify, display, perform, sublicense and distribute the Original
Code (or portions thereof) with or without Modifications, and/or
as part of a Larger Work; and
(b) under Patents Claims infringed by the making, using or
selling of Original Code, to make, have made, use, practice,
sell, and offer for sale, and/or otherwise dispose of the
Original Code (or portions thereof).
(c) the licenses granted in this Section 2.1(a) and (b) are
effective on the date Initial Developer first distributes
Original Code under the terms of this License.
(d) Notwithstanding Section 2.1(b) above, no patent license is
granted: 1) for code that You delete from the Original Code; 2)
separate from the Original Code; or 3) for infringements caused
by: i) the modification of the Original Code or ii) the
combination of the Original Code with other software or devices.
2.2. Contributor Grant.
Subject to third party intellectual property claims, each Contributor
hereby grants You a world-wide, royalty-free, non-exclusive license
(a) under intellectual property rights (other than patent or
trademark) Licensable by Contributor, 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
and/or as part of a Larger Work; and
(b) under Patent Claims infringed by the making, using, or
selling of Modifications made by that Contributor either alone
and/or in combination with its Contributor Version (or portions
of such combination), to make, use, sell, offer for sale, have
made, and/or otherwise dispose of: 1) Modifications made by that
Contributor (or portions thereof); and 2) the combination of
Modifications made by that Contributor with its Contributor
Version (or portions of such combination).
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are
effective on the date Contributor first makes Commercial Use of
the Covered Code.
(d) Notwithstanding Section 2.2(b) above, no patent license is
granted: 1) for any code that Contributor has deleted from the
Contributor Version; 2) separate from the Contributor Version;
3) for infringements caused by: i) third party modifications of
Contributor Version or ii) the combination of Modifications made
by that Contributor with other software (except as part of the
Contributor Version) or other devices; or 4) under Patent Claims
infringed by Covered Code in the absence of Modifications made by
that Contributor.
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 Contributor has knowledge that a license under a third party's
intellectual property rights is required to exercise the rights
granted by such Contributor under Sections 2.1 or 2.2,
Contributor 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 Contributor obtains such knowledge after
the Modification is made available as described in Section 3.2,
Contributor shall promptly modify the LEGAL file in all copies
Contributor makes 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 Contributor's Modifications include an application programming
interface and Contributor has knowledge of patent licenses which
are reasonably necessary to implement that API, Contributor must
also include this information in the LEGAL file.
(c) Representations.
Contributor represents that, except as disclosed pursuant to
Section 3.4(a) above, Contributor believes that Contributor's
Modifications are Contributor's original creation(s) and/or
Contributor has sufficient rights to grant the rights conveyed by
this License.
3.5. Required Notices.
You must duplicate the notice in Exhibit A in each file of the Source
Code. 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) where a user would be likely
to look for such a notice. If You created one or more Modification(s)
You may add your name as a Contributor to the notice described in
Exhibit A. You must also duplicate this License in any documentation
for the Source Code where You describe recipients' rights or ownership
rights relating to Covered Code. 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 or ownership rights 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, judicial order, 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",
"MPL", "NPL" or any confusingly similar phrase do not appear in your
license (except to note that your license differs from this 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.
8.1. 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.
8.2. If You initiate litigation by asserting a patent infringement
claim (excluding declatory judgment actions) against Initial Developer
or a Contributor (the Initial Developer or Contributor against whom
You file such action is referred to as "Participant") alleging that:
(a) such Participant's Contributor Version directly or indirectly
infringes any patent, then any and all rights granted by such
Participant to You under Sections 2.1 and/or 2.2 of this License
shall, upon 60 days notice from Participant terminate prospectively,
unless if within 60 days after receipt of notice You either: (i)
agree in writing to pay Participant a mutually agreeable reasonable
royalty for Your past and future use of Modifications made by such
Participant, or (ii) withdraw Your litigation claim with respect to
the Contributor Version against such Participant. If within 60 days
of notice, a reasonable royalty and payment arrangement are not
mutually agreed upon in writing by the parties or the litigation claim
is not withdrawn, the rights granted by Participant to You under
Sections 2.1 and/or 2.2 automatically terminate at the expiration of
the 60 day notice period specified above.
(b) any software, hardware, or device, other than such Participant's
Contributor Version, directly or indirectly infringes any patent, then
any rights granted to You by such Participant under Sections 2.1(b)
and 2.2(b) are revoked effective as of the date You first made, used,
sold, distributed, or had made, Modifications made by that
Participant.
8.3. If You assert a patent infringement claim against Participant
alleging that such Participant's Contributor Version directly or
indirectly infringes any patent where such claim is resolved (such as
by license or settlement) prior to the initiation of patent
infringement litigation, then the reasonable value of the licenses
granted by such Participant under Sections 2.1 or 2.2 shall be taken
into account in determining the amount or value of any payment or
license.
8.4. In the event of termination under Sections 8.1 or 8.2 above,
all end user license agreements (excluding distributors and resellers)
which have been validly granted by You or any distributor hereunder
prior to termination shall survive termination.
9. LIMITATION OF LIABILITY.
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY 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
THIS 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, any litigation relating to this License 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.
As between Initial Developer and the Contributors, each party is
responsible for claims and damages arising, directly or indirectly,
out of its utilization of rights under this License and You agree to
work with Initial Developer and Contributors to distribute such
responsibility on an equitable basis. Nothing herein is intended or
shall be deemed to constitute any admission of liability.
13. MULTIPLE-LICENSED CODE.
Initial Developer may designate portions of the Covered Code as
"Multiple-Licensed". "Multiple-Licensed" means that the Initial
Developer permits you to utilize portions of the Covered Code under
Your choice of the NPL or the alternative licenses, if any, specified
by the Initial Developer in the file described in Exhibit A.
EXHIBIT A -Mozilla Public License.
``The contents of this file are subject to the Mozilla Public License
Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
The Original Code is ______________________________________.
The Initial Developer of the Original Code is ________________________.
Portions created by ______________________ are Copyright (C) ______
_______________________. All Rights Reserved.
Contributor(s): ______________________________________.
Alternatively, the contents of this file may be used under the terms
of the _____ license (the "[___] License"), in which case the
provisions of [______] License are applicable instead of those
above. If you wish to allow use of your version of this file only
under the terms of the [____] License and not to allow others to use
your version of this file under the MPL, indicate your decision by
deleting the provisions above and replace them with the notice and
other provisions required by the [___] License. If you do not delete
the provisions above, a recipient may use your version of this file
under either the MPL or the [___] License."
[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. You should
use the text of this Exhibit A rather than the text found in the
Original Code Source Code for Your Modifications.]
----------------------------------------------------------------------
AMENDMENTS
The Netscape Public License Version 1.1 ("NPL") consists of the
Mozilla Public License Version 1.1 with the following Amendments,
including Exhibit A-Netscape Public License. Files identified with
"Exhibit A-Netscape Public License" are governed by the Netscape
Public License Version 1.1.
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 trademarks
"Netscape", the "Netscape N and horizon" logo or the "Netscape
lighthouse" logo, "Netcenter", "Gecko", "Java" or "JavaScript",
"Smart Browsing" even if such marks are included in the Original
Code or Modifications.
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 Netscape Branded Code becoming subject to the terms of
this License, and may license such Netscape Branded Code on
different terms from those contained in this License.
VI. Litigation.
Notwithstanding the limitations of Section 11 above, the
provisions regarding litigation in Section 11(a), (b) and (c) of
the License shall apply to all disputes relating to this License.
EXHIBIT A-Netscape Public License.
"The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s): ______________________________________.
Alternatively, the contents of this file may be used under the
terms of the _____ license (the "[___] License"), in which case
the provisions of [______] License are applicable instead of
those above. If you wish to allow use of your version of this
file only under the terms of the [____] License and not to allow
others to use your version of this file under the NPL, indicate
your decision by deleting the provisions above and replace them
with the notice and other provisions required by the [___]
License. If you do not delete the provisions above, a recipient
may use your version of this file under either the NPL or the
[___] License."

165
mozilla/Makefile.in Normal file
View File

@@ -0,0 +1,165 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = .
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/build/unix/modules.mk
ifneq ($(BUILD_MODULES),all)
DIRS = $(BUILD_MODULE_DIRS)
ifdef USE_ELF_DYNSTR_GC
DIRS += tools/elf-dynstr-gc
endif
else
DIRS = config build
ifdef USE_ELF_DYNSTR_GC
DIRS += tools/elf-dynstr-gc
endif
ifdef MOZ_L10N
DIRS += l10n
endif
ifdef MOZ_JAVA_SUPPLEMENT
DIRS += \
java/util \
java/webclient \
$(NULL)
endif
# boehm needs to be built before XPCOM
ifdef GC_LEAK_DETECTOR
DIRS += gc/boehm
endif
DIRS += $(NSPRPUB_DIR)
DIRS += dbm modules/libreg js xpcom js/src/xpconnect
ifdef MOZ_OJI
DIRS += js/src/liveconnect
endif
ifndef MOZ_NATIVE_ZLIB
DIRS += modules/zlib
endif
ifndef MOZ_NATIVE_JPEG
DIRS += jpeg
endif
ifdef MOZ_ENABLE_GTK
DIRS += widget/src/gtksuperwin widget/src/gtkxtbin
endif
# Linux and Solaris installer needs standalone libjar, hence standalone zlib
ifneq (,$(filter Linux SunOS,$(OS_ARCH)))
DIRS += modules/zlib/standalone
endif
DIRS += \
widget/timer \
include \
modules/libutil \
netwerk \
modules/appfilelocprovider \
security \
uriloader \
intl \
modules/libpref \
modules/libimg \
modules/oji \
modules/libjar \
caps \
expat \
htmlparser \
gfx \
modules/plugin \
dom \
view \
widget \
layout \
db \
rdf \
docshell \
webshell \
embedding \
editor \
sun-java \
profile \
themes \
$(NULL)
# This must preceed xpfe
ifdef MOZ_JPROF
DIRS += tools/jprof
endif
ifdef MOZ_BUILD_XPFE
DIRS += xpfe
endif
DIRS += xpinstall
ifdef MOZ_EXTENSIONS
DIRS += extensions
endif
ifdef MOZ_MAIL_NEWS
DIRS += mailnews
endif
ifdef MOZ_LEAKY
DIRS += tools/leaky
endif
ifdef ENABLE_TESTS
DIRS += xpcom/tests
endif
ifdef MOZ_LDAP_XPCOM
DIRS += directory/c-sdk/ldap directory/xpcom
endif
DIRS += l10n
endif # BUILD_MODULES == all
STATIC_MAKEFILES := $(NSPRPUB_DIR)
GARBAGE_DIRS += dist
DIST_GARBAGE = config.cache config.log config.status config-defs.h \
dependencies.beos config/autoconf.mk config/myrules.mk config/myconfig.mk \
$(shell cat unallmakefiles) unallmakefiles \
$(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
include $(topsrcdir)/config/rules.mk

View File

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

12
mozilla/aclocal.m4 vendored Normal file
View File

@@ -0,0 +1,12 @@
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
dnl
define(MOZ_TOPSRCDIR,.)dnl MOZ_TOPSRCDIR is used in altoptions.m4
builtin(include, build/autoconf/altoptions.m4)dnl

998
mozilla/allmakefiles.sh Executable file
View File

@@ -0,0 +1,998 @@
#! /bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
# 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.
#
# Please keep the modules in this file in sync with those in
# mozilla/build/unix/modules.mk
#
MAKEFILES=""
# add_makefiles - Shell function to add makefiles to MAKEFILES
add_makefiles() {
MAKEFILES="$MAKEFILES $*"
}
if [ "$srcdir" = "" ]; then
srcdir=.
fi
#
# Common makefiles used by everyone
#
add_makefiles "
Makefile
build/Makefile
build/unix/Makefile
build/unix/mozilla-config
build/unix/nspr_my_config.mk
build/unix/nspr_my_overrides.mk
config/Makefile
config/autoconf.mk
config/mkdepend/Makefile
config/mkdetect/Makefile
include/Makefile
tools/elf-dynstr-gc/Makefile
"
MAKEFILES_db="
db/Makefile
db/mdb/Makefile
db/mdb/public/Makefile
db/mork/Makefile
db/mork/build/Makefile
db/mork/src/Makefile
"
MAKEFILES_dbm="
dbm/Makefile
dbm/include/Makefile
dbm/src/Makefile
dbm/tests/Makefile
"
MAKEFILES_dom="
dom/Makefile
dom/public/Makefile
dom/public/base/Makefile
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/public/idl/Makefile
dom/public/idl/base/Makefile
dom/public/idl/coreDom/Makefile
dom/public/idl/css/Makefile
dom/public/idl/events/Makefile
dom/public/idl/html/Makefile
dom/public/idl/range/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
"
MAKEFILES_editor="
editor/Makefile
editor/base/Makefile
editor/public/Makefile
editor/idl/Makefile
editor/txmgr/Makefile
editor/txmgr/idl/Makefile
editor/txmgr/public/Makefile
editor/txmgr/src/Makefile
editor/txmgr/tests/Makefile
editor/txtsvc/Makefile
editor/txtsvc/public/Makefile
editor/txtsvc/src/Makefile
editor/ui/Makefile
editor/ui/composer/Makefile
editor/ui/composer/content/Makefile
editor/ui/composer/content/images/Makefile
editor/ui/composer/locale/Makefile
editor/ui/composer/locale/en-US/Makefile
editor/ui/dialogs/Makefile
editor/ui/dialogs/content/Makefile
editor/ui/dialogs/locale/Makefile
editor/ui/dialogs/locale/en-US/Makefile
"
MAKEFILES_expat="
expat/Makefile
expat/xmlparse/Makefile
expat/xmltok/Makefile
"
MAKEFILES_extensions="
extensions/Makefile
"
MAKEFILES_gfx="
gfx/Makefile
gfx/idl/Makefile
gfx/public/Makefile
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/mac/Makefile
gfx/src/qt/Makefile
gfx/src/xlib/Makefile
gfx/src/os2/Makefile
gfx/src/xlibrgb/Makefile
gfx/tests/Makefile
"
MAKEFILES_htmlparser="
htmlparser/Makefile
htmlparser/robot/Makefile
htmlparser/robot/test/Makefile
htmlparser/src/Makefile
htmlparser/tests/Makefile
htmlparser/tests/grabpage/Makefile
htmlparser/tests/logparse/Makefile
htmlparser/tests/outsinks/Makefile
"
MAKEFILES_intl="
intl/Makefile
intl/chardet/Makefile
intl/chardet/public/Makefile
intl/chardet/src/Makefile
intl/uconv/Makefile
intl/uconv/idl/Makefile
intl/uconv/public/Makefile
intl/uconv/src/Makefile
intl/uconv/tests/Makefile
intl/uconv/ucvja/Makefile
intl/uconv/ucvlatin/Makefile
intl/uconv/ucvcn/Makefile
intl/uconv/ucvtw/Makefile
intl/uconv/ucvtw2/Makefile
intl/uconv/ucvko/Makefile
intl/uconv/ucvibm/Makefile
intl/locale/Makefile
intl/locale/public/Makefile
intl/locale/idl/Makefile
intl/locale/src/Makefile
intl/locale/src/unix/Makefile
intl/locale/src/os2/Makefile
intl/locale/tests/Makefile
intl/lwbrk/Makefile
intl/lwbrk/src/Makefile
intl/lwbrk/public/Makefile
intl/lwbrk/tests/Makefile
intl/unicharutil/Makefile
intl/unicharutil/idl/Makefile
intl/unicharutil/src/Makefile
intl/unicharutil/public/Makefile
intl/unicharutil/tables/Makefile
intl/unicharutil/tests/Makefile
intl/unicharutil/tools/Makefile
intl/strres/Makefile
intl/strres/public/Makefile
intl/strres/src/Makefile
intl/strres/tests/Makefile
"
MAKEFILES_js="
js/Makefile
js/src/Makefile
js/src/fdlibm/Makefile
"
MAKEFILES_liveconnect="
js/src/liveconnect/Makefile
js/src/liveconnect/classes/Makefile
"
MAKEFILES_xpconnect="
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/loader/Makefile
js/src/xpconnect/tests/Makefile
js/src/xpconnect/tests/components/Makefile
js/src/xpconnect/tests/idl/Makefile
js/src/xpconnect/shell/Makefile
js/src/xpconnect/tools/Makefile
js/src/xpconnect/tools/idl/Makefile
js/src/xpconnect/tools/idl/Makefile
"
MAKEFILES_layout="
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/public/Makefile
layout/xul/base/src/Makefile
layout/xul/content/Makefile
layout/xul/content/src/Makefile
layout/xbl/Makefile
layout/xbl/public/Makefile
layout/xbl/src/Makefile
"
MAKEFILES_libimg="
modules/libimg/Makefile
modules/libimg/public/Makefile
modules/libimg/public_com/Makefile
modules/libimg/src/Makefile
modules/libimg/gifcom/Makefile
modules/libimg/jpgcom/Makefile
modules/libimg/pngcom/Makefile
"
MAKEFILES_libjar="
modules/libjar/Makefile
"
MAKEFILES_libreg="
modules/libreg/Makefile
modules/libreg/include/Makefile
modules/libreg/src/Makefile
"
MAKEFILES_libpref="
modules/libpref/Makefile
modules/libpref/public/Makefile
modules/libpref/src/Makefile
"
MAKEFILES_libutil="
modules/libutil/Makefile
modules/libutil/public/Makefile
modules/libutil/src/Makefile
"
MAKEFILES_oji="
modules/oji/Makefile
modules/oji/public/Makefile
modules/oji/src/Makefile
"
MAKEFILES_plugin="
modules/plugin/Makefile
modules/plugin/nglsrc/Makefile
modules/plugin/public/Makefile
modules/plugin/src/Makefile
modules/plugin/test/Makefile
modules/plugin/SanePlugin/Makefile
"
MAKEFILES_netwerk="
netwerk/Makefile
netwerk/base/Makefile
netwerk/base/public/Makefile
netwerk/base/src/Makefile
netwerk/build/Makefile
netwerk/cache/build/Makefile
netwerk/cache/filecache/Makefile
netwerk/cache/Makefile
netwerk/cache/memcache/Makefile
netwerk/cache/mgr/Makefile
netwerk/cache/public/Makefile
netwerk/dns/Makefile
netwerk/dns/public/Makefile
netwerk/dns/src/Makefile
netwerk/protocol/Makefile
netwerk/protocol/about/Makefile
netwerk/protocol/about/public/Makefile
netwerk/protocol/about/src/Makefile
netwerk/protocol/data/Makefile
netwerk/protocol/data/public/Makefile
netwerk/protocol/data/src/Makefile
netwerk/protocol/datetime/src/Makefile
netwerk/protocol/datetime/Makefile
netwerk/protocol/file/Makefile
netwerk/protocol/file/public/Makefile
netwerk/protocol/file/src/Makefile
netwerk/protocol/finger/Makefile
netwerk/protocol/finger/src/Makefile
netwerk/protocol/ftp/Makefile
netwerk/protocol/ftp/public/Makefile
netwerk/protocol/ftp/src/Makefile
netwerk/protocol/http/Makefile
netwerk/protocol/http/public/Makefile
netwerk/protocol/http/src/Makefile
netwerk/protocol/jar/Makefile
netwerk/protocol/jar/public/Makefile
netwerk/protocol/jar/src/Makefile
netwerk/protocol/keyword/Makefile
netwerk/protocol/keyword/src/Makefile
netwerk/protocol/res/Makefile
netwerk/protocol/res/public/Makefile
netwerk/protocol/res/src/Makefile
netwerk/mime/Makefile
netwerk/mime/public/Makefile
netwerk/mime/src/Makefile
netwerk/socket/Makefile
netwerk/socket/base/Makefile
netwerk/streamconv/Makefile
netwerk/streamconv/converters/Makefile
netwerk/streamconv/public/Makefile
netwerk/streamconv/src/Makefile
netwerk/streamconv/test/Makefile
netwerk/test/Makefile
netwerk/testserver/Makefile
"
MAKEFILES_uriloader="
uriloader/Makefile
uriloader/base/Makefile
uriloader/build/Makefile
uriloader/extprotocol/Makefile
uriloader/extprotocol/base/Makefile
uriloader/extprotocol/unix/Makefile
uriloader/exthandler/Makefile
"
MAKEFILES_profile="
profile/Makefile
profile/src/Makefile
profile/public/Makefile
profile/resources/Makefile
profile/resources/content/Makefile
profile/resources/locale/Makefile
profile/resources/locale/en-US/Makefile
profile/pref-migrator/Makefile
profile/pref-migrator/public/Makefile
profile/pref-migrator/src/Makefile
profile/pref-migrator/resources/Makefile
profile/pref-migrator/resources/content/Makefile
profile/pref-migrator/resources/locale/Makefile
profile/pref-migrator/resources/locale/en-US/Makefile
profile/defaults/Makefile
"
MAKEFILES_rdf="
rdf/Makefile
rdf/base/Makefile
rdf/base/idl/Makefile
rdf/base/public/Makefile
rdf/base/src/Makefile
rdf/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/public/idl/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
"
MAKEFILES_sun_java="
sun-java/Makefile
sun-java/stubs/Makefile
sun-java/stubs/include/Makefile
sun-java/stubs/jri/Makefile
sun-java/stubs/src/Makefile
"
MAKEFILES_caps="
caps/Makefile
caps/idl/Makefile
caps/include/Makefile
caps/src/Makefile
"
MAKEFILES_view="
view/Makefile
view/public/Makefile
view/src/Makefile
"
MAKEFILES_docshell="
docshell/Makefile
docshell/base/Makefile
docshell/build/Makefile
"
MAKEFILES_webshell="
webshell/Makefile
webshell/public/Makefile
webshell/src/Makefile
webshell/tests/Makefile
webshell/tests/viewer/Makefile
webshell/tests/viewer/public/Makefile
webshell/tests/viewer/unix/Makefile
webshell/tests/viewer/unix/gtk/Makefile
webshell/tests/viewer/unix/motif/Makefile
webshell/tests/viewer/unix/qt/Makefile
webshell/tests/viewer/unix/xlib/Makefile
webshell/embed/Makefile
"
MAKEFILES_widget="
widget/Makefile
widget/public/Makefile
widget/src/Makefile
widget/src/beos/Makefile
widget/src/build/Makefile
widget/src/gtk/Makefile
widget/src/gtksuperwin/Makefile
widget/src/gtkxtbin/Makefile
widget/src/motif/Makefile
widget/src/motif/app_context/Makefile
widget/src/photon/Makefile
widget/src/rhapsody/Makefile
widget/src/mac/Makefile
widget/src/xlib/Makefile
widget/src/os2/Makefile
widget/src/os2/res/Makefile
widget/src/os2/tests/Makefile
widget/src/qt/Makefile
widget/src/xlib/window_service/Makefile
widget/src/xpwidgets/Makefile
widget/src/support/Makefile
widget/tests/Makefile
widget/tests/scribble/Makefile
widget/tests/widget/Makefile
widget/timer/Makefile
widget/timer/public/Makefile
widget/timer/src/Makefile
widget/timer/src/beos/Makefile
widget/timer/src/rhapsody/Makefile
widget/timer/src/unix/Makefile
widget/timer/src/unix/gtk/Makefile
widget/timer/src/unix/motif/Makefile
widget/timer/src/unix/photon/Makefile
widget/timer/src/unix/xlib/Makefile
widget/timer/src/unix/qt/Makefile
"
MAKEFILES_xpcom="
xpcom/Makefile
xpcom/base/Makefile
xpcom/build/Makefile
xpcom/components/Makefile
xpcom/ds/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/os2/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/sample/Makefile
xpcom/tests/Makefile
xpcom/tests/dynamic/Makefile
xpcom/tests/services/Makefile
xpcom/threads/Makefile
xpcom/tools/Makefile
xpcom/tools/registry/Makefile
"
MAKEFILES_xpinstall="
xpinstall/Makefile
xpinstall/packager/Makefile
xpinstall/public/Makefile
xpinstall/res/Makefile
xpinstall/res/content/Makefile
xpinstall/res/locale/Makefile
xpinstall/res/locale/en-US/Makefile
xpinstall/src/Makefile
xpinstall/stub/Makefile
xpinstall/wizard/unix/src2/Makefile
"
MAKEFILES_xpfe="
xpfe/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/shistory/Makefile
xpfe/components/shistory/public/Makefile
xpfe/components/shistory/src/Makefile
xpfe/components/bookmarks/Makefile
xpfe/components/bookmarks/public/Makefile
xpfe/components/bookmarks/src/Makefile
xpfe/components/bookmarks/resources/Makefile
xpfe/components/directory/Makefile
xpfe/components/timebomb/Makefile
xpfe/components/timebomb/tools/Makefile
xpfe/components/timebomb/resources/Makefile
xpfe/components/timebomb/resources/content/Makefile
xpfe/components/timebomb/resources/locale/Makefile
xpfe/components/timebomb/resources/locale/en-US/Makefile
xpfe/components/regviewer/Makefile
xpfe/components/find/Makefile
xpfe/components/find/public/Makefile
xpfe/components/find/src/Makefile
xpfe/components/find/resources/Makefile
xpfe/components/filepicker/src/Makefile
xpfe/components/filepicker/res/content/Makefile
xpfe/components/filepicker/res/locale/Makefile
xpfe/components/filepicker/res/locale/en-US/Makefile
xpfe/components/filepicker/res/Makefile
xpfe/components/filepicker/Makefile
xpfe/components/history/Makefile
xpfe/components/history/src/Makefile
xpfe/components/history/public/Makefile
xpfe/components/history/resources/Makefile
xpfe/components/prefwindow/Makefile
xpfe/components/prefwindow/resources/Makefile
xpfe/components/prefwindow/resources/content/Makefile
xpfe/components/prefwindow/resources/content/unix/Makefile
xpfe/components/prefwindow/resources/locale/Makefile
xpfe/components/prefwindow/resources/locale/en-US/Makefile
xpfe/components/prefwindow/resources/locale/en-US/unix/Makefile
xpfe/components/related/Makefile
xpfe/components/related/src/Makefile
xpfe/components/related/public/Makefile
xpfe/components/related/resources/Makefile
xpfe/components/search/Makefile
xpfe/components/search/datasets/Makefile
xpfe/components/search/resources/Makefile
xpfe/components/search/public/Makefile
xpfe/components/search/src/Makefile
xpfe/components/sidebar/Makefile
xpfe/components/sidebar/public/Makefile
xpfe/components/sidebar/resources/Makefile
xpfe/components/sidebar/src/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/components/remote/Makefile
xpfe/components/remote/public/Makefile
xpfe/components/remote/src/Makefile
xpfe/components/autocomplete/Makefile
xpfe/components/autocomplete/public/Makefile
xpfe/components/autocomplete/resources/Makefile
xpfe/components/autocomplete/resources/content/Makefile
xpfe/components/autocomplete/src/Makefile
xpfe/components/console/Makefile
xpfe/components/console/resources/Makefile
xpfe/components/console/resources/content/Makefile
xpfe/components/console/resources/locale/Makefile
xpfe/components/console/resources/locale/en-US/Makefile
xpfe/appshell/Makefile
xpfe/appshell/src/Makefile
xpfe/appshell/public/Makefile
xpfe/bootstrap/Makefile
xpfe/browser/Makefile
xpfe/browser/src/Makefile
xpfe/browser/resources/Makefile
xpfe/browser/resources/content/Makefile
xpfe/browser/resources/content/unix/Makefile
xpfe/browser/resources/locale/Makefile
xpfe/browser/resources/locale/en-US/Makefile
xpfe/browser/resources/locale/en-US/unix/Makefile
xpfe/appfilelocprovider/Makefile
xpfe/appfilelocprovider/public/Makefile
xpfe/appfilelocprovider/src/Makefile
xpfe/global/Makefile
xpfe/global/resources/Makefile
xpfe/global/resources/content/Makefile
xpfe/global/resources/content/os2/Makefile
xpfe/global/resources/content/unix/Makefile
xpfe/global/resources/locale/Makefile
xpfe/global/resources/locale/en-US/Makefile
xpfe/global/resources/locale/en-US/os2/Makefile
xpfe/global/resources/locale/en-US/unix/Makefile
xpfe/communicator/Makefile
xpfe/communicator/resources/Makefile
xpfe/communicator/resources/locale/Makefile
xpfe/communicator/resources/locale/en-US/Makefile
xpfe/communicator/resources/content/Makefile
"
MAKEFILES_embedding="
embedding/Makefile
embedding/browser/Makefile
embedding/browser/build/Makefile
embedding/browser/webBrowser/Makefile
embedding/browser/gtk/Makefile
embedding/browser/gtk/src/Makefile
embedding/browser/gtk/tests/Makefile
embedding/browser/photon/Makefile
embedding/browser/photon/src/Makefile
embedding/browser/photon/tests/Makefile
embedding/config/Makefile
embedding/tests/gtkEmbed/Makefile
"
MAKEFILES_security="
security/Makefile
security/base/Makefile
security/base/public/Makefile
security/base/res/Makefile
security/base/res/content/Makefile
security/base/res/locale/Makefile
security/base/res/locale/en-US/Makefile
security/psm/Makefile
security/psm/lib/Makefile
security/psm/lib/client/Makefile
security/psm/lib/protocol/Makefile
"
MAKEFILES_transformiix="
extensions/transformiix/source/base/Makefile
extensions/transformiix/source/main/Makefile
extensions/transformiix/source/net/Makefile
extensions/transformiix/source/xml/dom/standalone/Makefile
extensions/transformiix/source/xml/dom/Makefile
extensions/transformiix/source/xml/dom/mozImpl/Makefile
extensions/transformiix/source/xml/parser/Makefile
extensions/transformiix/source/xml/printer/Makefile
extensions/transformiix/source/xml/util/Makefile
extensions/transformiix/source/xml/Makefile
extensions/transformiix/source/xpath/Makefile
extensions/transformiix/source/xslt/functions/Makefile
extensions/transformiix/source/xslt/util/Makefile
extensions/transformiix/source/xslt/Makefile
extensions/transformiix/source/Makefile
extensions/transformiix/Makefile
"
if [ "$MOZ_MAIL_NEWS" ]; then
MAKEFILES_mailnews=`cat ${srcdir}/mailnews/makefiles`
fi
if [ ! "$SYSTEM_JPEG" ]; then
MAKEFILES_jpeg="jpeg/Makefile"
fi
if [ ! "$SYSTEM_ZLIB" ]; then
MAKEFILES_zlib="
modules/zlib/Makefile
modules/zlib/src/Makefile
"
fi
if [ ! "$SYSTEM_PNG" ]; then
MAKEFILES_libimg="$MAKEFILES_libimg modules/libimg/png/Makefile"
fi
#
# java/
#
if [ "$MOZ_JAVA_SUPPLEMENT" ]; then
MAKEFILES_java_supplement=`cat ${srcdir}/java/makefiles`
fi
#
# l10n/
#
MAKEFILES_langpacks=`cat ${srcdir}/l10n/makefiles.all`
if [ "$MOZ_L10N" ]; then
MAKEFILES_l10n="l10n/Makefile"
if [ "$MOZ_L10N_LANG" ]; then
MAKEFILES_l10n_lang="
l10n/lang/Makefile
l10n/lang/addressbook/Makefile
l10n/lang/bookmarks/Makefile
l10n/lang/directory/Makefile
l10n/lang/editor/Makefile
l10n/lang/global/Makefile
l10n/lang/history/Makefile
l10n/lang/messenger/Makefile
l10n/lang/messengercompose/Makefile
l10n/lang/navigator/Makefile
l10n/lang/pref/Makefile
l10n/lang/related/Makefile
l10n/lang/sidebar/Makefile
l10n/lang/addressbook/locale/Makefile
l10n/lang/bookmarks/locale/Makefile
l10n/lang/directory/locale/Makefile
l10n/lang/editor/locale/Makefile
l10n/lang/global/locale/Makefile
l10n/lang/history/locale/Makefile
l10n/lang/messenger/locale/Makefile
l10n/lang/messengercompose/locale/Makefile
l10n/lang/navigator/locale/Makefile
l10n/lang/pref/locale/Makefile
l10n/lang/related/locale/Makefile
l10n/lang/sidebar/locale/Makefile
"
fi
fi
# tools/jprof
if [ "$MOZ_JPROF" ]; then
MAKEFILES_jprof="tools/jprof/Makefile"
fi
# tools/leaky
if [ "$MOZ_LEAKY" ]; then
MAKEFILES_leaky="tools/leaky/Makefile"
fi
# layout/mathml
if [ "$MOZ_MATHML" ]; then
MAKEFILES_layout="$MAKEFILES_layout
layout/mathml/Makefile
layout/mathml/base/Makefile
layout/mathml/base/src/Makefile
layout/mathml/content/Makefile
layout/mathml/content/src/Makefile
"
fi
# layout/svg
if [ "$MOZ_SVG" ]; then
MAKEFILES_layout="$MAKEFILES_layout
layout/svg/Makefile
layout/svg/base/Makefile
layout/svg/base/public/Makefile
layout/svg/base/src/Makefile
layout/svg/content/Makefile
layout/svg/content/src/Makefile
"
fi
# directory/xpcom
if [ "$MOZ_LDAP_XPCOM" ]; then
MAKEFILES_ldap="
directory/xpcom/Makefile
directory/xpcom/base/Makefile
directory/xpcom/base/public/Makefile
directory/xpcom/base/src/Makefile
"
fi
# libimg/mng
if [ "$MOZ_MNG" ]; then
MAKEFILES_libimg="$MAKEFILES_libimg
modules/libimg/mng/Makefile
modules/libimg/mngcom/Makefile
"
fi
for extension in $MOZ_EXTENSIONS; do
case "$extension" in
cookie ) MAKEFILES_extensions="$MAKEFILES_extensions
extensions/cookie/Makefile
extensions/cookie/tests/Makefile
" ;;
psm-glue ) MAKEFILES_extensions="$MAKEFILES_extensions
extensions/psm-glue/public/Makefile
extensions/psm-glue/Makefile
extensions/psm-glue/src/Makefile
" ;;
irc ) MAKEFILES_extensions="$MAKEFILES_extensions
extensions/irc/Makefile
extensions/irc/xul/Makefile
extensions/irc/xul/content/Makefile
extensions/irc/xul/locale/Makefile
extensions/irc/xul/locale/en-US/Makefile
" ;;
transformiix ) MAKEFILES_extensions="$MAKEFILES_extensions
$MAKEFILES_transformiix"
;;
wallet ) MAKEFILES_extensions="$MAKEFILES_extensions
extensions/wallet/Makefile
extensions/wallet/public/Makefile
extensions/wallet/src/Makefile
extensions/wallet/editor/Makefile
extensions/wallet/cookieviewer/Makefile
extensions/wallet/signonviewer/Makefile
extensions/wallet/walletpreview/Makefile
extensions/wallet/build/Makefile
" ;;
xmlextras ) MAKEFILES_extensions="$MAKEFILES_extensions
extensions/xmlextras/Makefile
extensions/xmlextras/base/Makefile
extensions/xmlextras/base/src/Makefile
extensions/xmlextras/base/public/Makefile
extensions/xmlextras/build/Makefile
extensions/xmlextras/build/src/Makefile
extensions/xmlextras/soap/public/Makefile
" ;;
xmlterm ) MAKEFILES_extensions="$MAKEFILES_extensions
extensions/xmlterm/Makefile
extensions/xmlterm/base/Makefile
extensions/xmlterm/geckoterm/Makefile
extensions/xmlterm/linetest/Makefile
extensions/xmlterm/scripts/Makefile
extensions/xmlterm/tests/Makefile
extensions/xmlterm/ui/Makefile
" ;;
xml-rpc ) MAKEFILES_extensions="$MAKEFILES_extensions
extensions/xml-rpc/Makefile
extensions/xml-rpc/idl/Makefile
extensions/xml-rpc/src/Makefile
" ;;
esac
done
#
# Translate from BUILD_MODULES into the proper makefiles list
#
if [ "$BUILD_MODULES" = "all" ]; then
MAKEFILES_themes=`cat ${srcdir}/themes/makefiles`
add_makefiles "
$MAKEFILES_caps
$MAKEFILES_db
$MAKEFILES_dbm
$MAKEFILES_docshell
$MAKEFILES_dom
$MAKEFILES_editor
$MAKEFILES_embedding
$MAKEFILES_expat
$MAKEFILES_extensions
$MAKEFILES_gfx
$MAKEFILES_htmlparser
$MAKEFILES_intl
$MAKEFILES_java_supplement
$MAKEFILES_ldap
$MAKEFILES_leaky
$MAKEFILES_jpeg
$MAKEFILES_jprof
$MAKEFILES_js
$MAKEFILES_l10n
$MAKEFILES_l10n_lang
$MAKEFILES_langpacks
$MAKEFILES_layout
$MAKEFILES_libreg
$MAKEFILES_libimg
$MAKEFILES_libjar
$MAKEFILES_libpref
$MAKEFILES_libutil
$MAKEFILES_liveconnect
$MAKEFILES_mailnews
$MAKEFILES_oji
$MAKEFILES_plugin
$MAKEFILES_netwerk
$MAKEFILES_profile
$MAKEFILES_rdf
$MAKEFILES_security
$MAKEFILES_sun_java
$MAKEFILES_themes
$MAKEFILES_uriloader
$MAKEFILES_view
$MAKEFILES_webshell
$MAKEFILES_widget
$MAKEFILES_xpcom
$MAKEFILES_xpconnect
$MAKEFILES_xpinstall
$MAKEFILES_xpfe
$MAKEFILES_zlib
"
else
# Standalone modules go here
for mod in $BUILD_MODULES; do
case $mod in
dbm) add_makefiles "$MAKEFILES_dbm"
;;
js) add_makefiles "$MAKEFILES_js"
;;
necko) add_makefiles "
$MAKEFILES_netwerk $MAKEFILES_xpcom $MAKEFILES_libreg"
;;
transformiix) add_makefiles "$MAKEFILES_transformiix"
;;
xpcom) add_makefiles "$MAKEFILES_xpcom $MAKEFILES_libreg"
;;
xpconnect) add_makefiles "
$MAKEFILES_xpconnect $MAKEFILES_js $MAKEFILES_xpcom
$MAKEFILES_libreg"
;;
esac
done
fi

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

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

View File

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

View File

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

View File

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

1195
mozilla/build/autoconf/config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

1268
mozilla/build/autoconf/config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

View File

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

View File

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

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1 @@
0000000000

View File

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

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

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

95
mozilla/build/hcc Executable file
View File

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

139
mozilla/build/hcpp Executable file
View File

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

View File

@@ -0,0 +1,197 @@
#!perl
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
#
# build script (optimized)
#
use Mac::Processes;
use NGLayoutBuildList;
use Cwd;
use Moz;
#-----------------------------------------------
# configuration variables that globally affect what is built
#-----------------------------------------------
$DEBUG = 0;
$CARBON = 0; # turn on to build with TARGET_CARBON
$PROFILE = 0;
$GC_LEAK_DETECTOR = 0; # turn on to use GC leak detection
$INCLUDE_CLASSIC_SKIN = 1;
$pull{all} = 0;
$pull{moz} = 0;
$pull{runtime} = 0;
$build{all} = 1; # turn off to do individual builds, or to do "most"
$build{most} = 0; # turn off to do individual builds
$build{dist} = 0;
$build{dist_runtime} = 0; # implied by $build{dist}
$build{xpidl} = 0;
$build{idl} = 0;
$build{stubs} = 0;
$build{runtime} = 0;
$build{common} = 0;
$build{imglib} = 0;
$build{necko} = 0;
$build{security} = 0;
$build{browserutils} = 0;
$build{intl} = 0;
$build{nglayout} = 0;
$build{editor} = 0;
$build{viewer} = 0;
$build{xpapp} = 0;
$build{extensions} = 1;
$build{plugins} = 0;
$build{mailnews} = 0;
$build{apprunner} = 0;
$build{resources} = 1;
$build{xptlink} = 0;
$options{transformiix} = 0;
$options{mathml} = 0;
$options{svg} = 0;
$options{mng} = 1;
$options{ldap} = 0;
$options{xmlextras} = 0;
$options{jar_manifests} = 1; # use jar.mn files for resources, not MANIFESTs
$options{jars} = 1; # build jar files
$options{chrome_files} = 0; # install files in chrome as well as making jar files.
# Don't change these (where should they go?)
$optiondefines{mathml}{MOZ_MATHML} = 1;
$optiondefines{svg}{MOZ_SVG} = 1;
#-----------------------------------------------
# configuration variables that affect the manner
# of building, but possibly affecting
# the outcome.
#-----------------------------------------------
$ALIAS_SYM_FILES = $DEBUG;
$CLOBBER_LIBS = 1; # turn on to clobber existing libs and .xSYM files before
# building each project
# The following two options will delete all dist files (if you have $build{dist} turned on),
# but leave the directory structure intact.
$CLOBBER_DIST_ALL = 1; # turn on to clobber all aliases/files inside dist (headers/xsym/libs)
$CLOBBER_DIST_LIBS = 0; # turn on to clobber only aliases/files for libraries/sym files in dist
$CLOBBER_IDL_PROJECTS = 0; # turn on to clobber all IDL projects.
#-----------------------------------------------
# configuration variables that are preferences for the build style,
# and do not affect what is built.
#-----------------------------------------------
$CodeWarriorLib::CLOSE_PROJECTS_FIRST
= 0;
# 1 = close then make (for development),
# 0 = make then close (for tinderbox).
$USE_TIMESTAMPED_LOGS = 0;
#-----------------------------------------------
# END OF CONFIG SWITCHES
#-----------------------------------------------
if ($pull{all})
{
foreach $k (keys(%pull))
{
$pull{$k} = 1;
}
}
if ($build{all})
{
foreach $k (keys(%build))
{
$build{$k} = 1;
}
}
if ($build{most})
{
### Just uncomment/comment to get the ones you want (if "most" is selected).
# $build{dist} = 0;
# $build{dist_runtime} = 0; # Implied by $build{dist}
# $build{xpidl} = 0;
# $build{idl} = 0;
# $build{stubs} = 0;
# $build{runtime} = 1;
# $build{common} = 1;
# $build{imglib} = 1;
# $build{necko} = 1;
# $build{security} = 1;
# $build{browserutils} = 1;
# $build{intl} = 1;
# $build{nglayout} = 1;
# $build{editor} = 1;
# $build{viewer} = 1;
# $build{xpapp} = 1;
# $build{extensions} = 1;
# $build{plugins} = 1;
# $build{mailnews} = 1;
# $build{apprunner} = 1;
# $build{resources} = 0;
}
# do the work
# you should not have to edit anything below
chdir("::::");
$MOZ_SRC = cwd();
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();
ConfigureBuildSystem();
Checkout();
my(@gen_files) = (
":mozilla:xpfe:appshell:public:nsBuildID.h",
":mozilla:xpfe:browser:resources:locale:en-US:navigator.dtd"
);
SetBuildNumber(":mozilla:config:build_number", ":mozilla:config:aboutime.pl", \@gen_files);
chdir($MOZ_SRC);
BuildDist();
chdir($MOZ_SRC);
BuildProjects();
print "Build complete\n";

View File

@@ -0,0 +1,189 @@
#!perl
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
#
# build script (debug)
#
use Mac::Processes;
use NGLayoutBuildList;
use Cwd;
use Moz;
$DEBUG = 1;
$CARBON = 0; # Turn on to build with TARGET_CARBON
$PROFILE = 0;
$GC_LEAK_DETECTOR = 0; # turn on to use GC leak detection
$INCLUDE_CLASSIC_SKIN = 1;
$pull{all} = 0;
$pull{moz} = 0;
$pull{runtime} = 0;
$build{all} = 1; # Turn off to do individual builds, or to do "most"
$build{most} = 0; # Turn off to do individual builds
$build{dist} = 0;
$build{dist_runtime} = 0; # Implied by $build{dist}
$build{xpidl} = 0;
$build{idl} = 0;
$build{stubs} = 0;
$build{runtime} = 0;
$build{common} = 0;
$build{imglib} = 0;
$build{necko} = 0;
$build{security} = 0;
$build{browserutils} = 0;
$build{intl} = 0;
$build{nglayout} = 0;
$build{editor} = 0;
$build{viewer} = 0;
$build{xpapp} = 0;
$build{extensions} = 1;
$build{plugins} = 0;
$build{mailnews} = 0;
$build{apprunner} = 0;
$build{resources} = 1;
$build{xptlink} = 0;
$options{transformiix} = 0;
$options{mathml} = 0;
$options{svg} = 0;
$options{mng} = 1;
$options{ldap} = 0;
$options{xmlextras} = 0;
$options{jar_manifests} = 1; # use jar.mn files for resources, not MANIFESTs
$options{jars} = 1; # build jar files
$options{chrome_files} = 0; # install files in chrome as well as making jar files.
# Don't change these (where should they go?)
$optiondefines{mathml}{MOZ_MATHML} = 1;
$optiondefines{svg}{MOZ_SVG} = 1;
#-----------------------------------------------
# configuration variables that affect the manner
# of building, but possibly affecting
# the outcome.
#-----------------------------------------------
$ALIAS_SYM_FILES = $DEBUG;
$CLOBBER_LIBS = 1; # turn on to clobber existing libs and .xSYM files before
# building each project
# The following two options will delete all dist files (if you have $build{dist} turned on),
# but leave the directory structure intact.
$CLOBBER_DIST_ALL = 1; # turn on to clobber all aliases/files inside dist (headers/xsym/libs)
$CLOBBER_DIST_LIBS = 0; # turn on to clobber only aliases/files for libraries/sym files in dist
$CLOBBER_IDL_PROJECTS = 0; # turn on to clobber all IDL projects.
#-----------------------------------------------
# configuration variables that are preferences for the build style,
# and do not affect what is built.
#-----------------------------------------------
$CodeWarriorLib::CLOSE_PROJECTS_FIRST
= 1;
# 1 = close then make (for development),
# 0 = make then close (for tinderbox).
$USE_TIMESTAMPED_LOGS = 1;
#-----------------------------------------------
# END OF CONFIG SWITCHES
#-----------------------------------------------
if ($pull{all})
{
foreach $k (keys(%pull))
{
$pull{$k} = 1;
}
}
if ($build{all})
{
foreach $k (keys(%build))
{
$build{$k} = 1;
}
}
if ($build{most})
{
### Just uncomment/comment to get the ones you want (if "most" is selected).
# $build{dist} = 1;
# $build{dist_runtime}= 1;
$build{xpidl} = 1; # build idl compiler
$build{idl} = 1;
$build{stubs} = 1;
$build{runtime} = 1;
$build{common} = 1;
$build{imglib} = 1;
$build{necko} = 1;
$build{security} = 1;
$build{browserutils} = 1;
$build{intl} = 1;
$build{nglayout} = 1;
$build{editor} = 1;
$build{viewer} = 1;
$build{xpapp} = 1;
$build{extensions} = 1;
$build{plugins} = 1;
$build{mailnews} = 1;
$build{apprunner} = 1;
$build{resources} = 1;
}
# do the work
# you should not have to edit anything below
chdir("::::");
$MOZ_SRC = cwd();
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();
ConfigureBuildSystem();
Checkout();
chdir($MOZ_SRC);
BuildDist();
chdir($MOZ_SRC);
BuildProjects();
print "Build complete\n";

View File

@@ -0,0 +1,470 @@
#!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 Cwd;
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';
my($scriptDir) = cwd();
# 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 (lc $full_path eq lc _full_path($cp)) {
return($cp);
}
}
} else { # is only one, not a list
if (lc $full_path eq lc _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();
_save_appath($filepath, $appath);
last;
}
}
if (!$appath || !-x $appath) {
$appath = _read_appath($filepath);
}
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;
}
}
=pod
=item quit()
Quits CodeWarrior.
=cut
sub quit() {
$last_project_built = "";
$last_project_was_closed = 0;
my($evt) = do_event(qw/aevt quit/, $app);
}
sub _build ($;$) {
my($evt);
if ($_[1]) {
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 ($$) {
my($cwd) = cwd(); # remember the current working dir
chdir($scriptDir); # change dir to the script dir
open(F, '>' . $_[0]) or die $!;
print F $_[1];
close(F);
chdir($cwd); # restore the cwd
}
sub _read_appath ($) {
my($filepath) = @_;
my($cwd) = cwd(); # remember the current working dir
chdir($scriptDir); # change dir to the script dir
if (! -e $filepath) {
return "";
}
open(F, $filepath);
my($appath) = <F>;
close(F);
chdir($cwd); # restore the cwd
return($appath);
}
sub _test ($) {
activate();
my($path) = $_[0];
build_project(
"${path}modules:xml:macbuild:XML.mcp", '',
"${path}build:mac:Mozilla.BuildLog.part"
);
}
1;
=pod
=back
=head1 HISTORY
=over 4
=item v1.02, September 23, 1998
Made fixes in finding and saving location of CodeWarrior IDE.
=item v1.01, June 1, 1998
Made fixes to C<chdir()> in C<activate()>, made C<activate()> more robust
in finding CodeWarrior IDE, added global variable to NOT switch to IDE
for each sent event, a few other fixes.
=item v1.00, May 30, 1998
First shot
=back
=head1 AUTHORS
Chris Nandor F<E<lt>pudge@pobox.comE<gt>>, and the author of the
original I<CodeWarriorLib>, Scott Collins F<E<lt>scc@netscape.comE<gt>>.
=head1 SEE ALSO
BuildProject L<Moz>.
=head1 COPYRIGHT
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
=cut

BIN
mozilla/build/mac/GenToc Normal file

Binary file not shown.

View File

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

View File

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

View File

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

View File

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

Binary file not shown.

View File

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

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

@@ -0,0 +1,204 @@
#!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($revstring) = ($revision ne "") ? $revision : "(none)";
my($datestring) = ($date ne "") ? $date : "(none)";
print "Checking out $module with revision $revstring, date $datestring\n";
my $script = <<END_OF_APPLESCRIPT;
tell (load script file "$MacCVSLib") to Checkout given sessionName:"$self->{name}", module:"$module", revision:"$revision", date:"$date"
END_OF_APPLESCRIPT
return _myDoAppleScript($script);
}
1;
=pod
=head1 NAME
MacCVS - Interface to MacCVS
=head1 SYNOPSIS
use MacCVS;
$session = MacCVS->new( <session_file_path>) || die "cannot create session";
$session->checkout([module] [revision] [date]) || die "Could not check out";
=head1 DESCRIPTION
This is a MacCVS interface for talking to MacCVS Pro client.
MacCVSSession is the class used to manipulate the session
=item new
MacCVS->new( <cvs session file path>);
Creates a new session. Returns undef on failure.
=item checkout( <module> [revision] [date] )
cvs checkout command. Revision and date are optional
returns 0 on failure
=cut
=head1 SEE ALSO
=over
=item MacCVS Home Page
http://www.maccvs.org/
=back
=head1 AUTHORS
Aleks Totic atotic@netscape.com
=cut
__END__

BIN
mozilla/build/mac/MacCVSLib Normal file

Binary file not shown.

View File

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

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

@@ -0,0 +1,572 @@
=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;
use File::Copy;
@ISA = qw(Exporter);
@EXPORT = qw(BuildProject LaunchCodeWarrior BuildProjectClean GetFileModDate 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 LaunchCodeWarrior()
{
CodeWarriorLib::activate();
}
sub activate_CodeWarrior()
{
#MacPerl::DoAppleScript(<<END_OF_APPLESCRIPT);
# tell (load script file "$CodeWarriorLib") to ActivateCodeWarrior()
#END_OF_APPLESCRIPT
}
$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 ||= ":";
mkpath($dest_dir) if !-d $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)
{
copy("$source_dir:$file", "$dest_dir:$file");
}
else
{
MakeAlias("$source_dir:$file", "$dest_dir:$file");
}
}
}
sub SetBuildNumber($$$)
{
my($build_num_file, $build_gen_script, $files_to_touch) = @_;
open (OUTPUT, ">$build_num_file") || die "could not open buildnumber";
open (BDATE, "perl :mozilla:config:bdate.pl|");
while (<BDATE>) {
print OUTPUT $_;
}
close (BDATE);
close (OUTPUT);
my($file);
foreach $file (@$files_to_touch)
{
print "Writing build number to $file\n";
system ("perl $build_gen_script $file $build_num_file");
}
}
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 GetFileModDate($)
{
my($filePath)=@_;
my($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
$atime,$mtime,$ctime,$blksize,$blocks) = stat($filePath);
return $mtime;
}
sub ActivateApplication($)
{
my ($appSignature) = @_;
my ($psi, $found);
my ($appPSN);
$found = 0;
foreach $psi (values(%Process))
{
if ($psi->processSignature() eq $appSignature)
{
$appPSN = $psi->processNumber();
$found = 1;
last;
}
}
if ($found == 0)
{
return;
}
SetFrontProcess($appPSN);
while (GetFrontProcess() != $appPSN)
{
WaitNextEvent();
}
}
1;
=head1 AUTHORS
Scott Collins <scc@netscape.com>, Simon Fraser <sfraser@netscape.com>, Chris Yeh <cyeh@netscape.com>
=head1 SEE ALSO
BuildMozillaDebug.pl (et al), BuildList.pm, CodeWarriorLib (an AppleScript library)
=head1 COPYRIGHT
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
=cut

View File

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

536
mozilla/build/mac/MozJar.pm Normal file
View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

Binary file not shown.

View File

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

Binary file not shown.

View File

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

View File

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

Binary file not shown.

View File

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

Binary file not shown.

Binary file not shown.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

115
mozilla/build/unix/mddepend.pl Executable file
View File

@@ -0,0 +1,115 @@
#!/usr/bin/env perl
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is this file as it was released upon March 8, 1999.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1999 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# mddepend.pl - Reads in dependencies generated my -MD flag. Prints list
# of objects that need to be rebuilt. These can then be added to the
# PHONY target. Using this script copes with the problem of header
# files that have been removed from the build.
#
# Usage:
# mddepend.pl <output_file> <dependency_files...>
#
# Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
#$debug = 1;
$outfile = shift @ARGV;
@alldeps=();
# Parse dependency files
while ($line = <>) {
chomp $line;
($obj,$rest) = split /\s*:\s+/, $line, 2;
next if $obj eq '';
if ($line =~ /\\$/) {
chop $rest;
$hasSlash = 1;
} else {
$hasSlash = 0;
}
$deps = [ $obj, split /\s+/, $rest ];
while ($hasSlash and $line = <>) {
chomp $line;
if ($line =~ /\\$/) {
chop $line;
} else {
$hasSlash = 0;
}
$line =~ s/^\s+//;
push @{$deps}, split /\s+/, $line;
}
warn "add @{$deps}\n" if $debug;
push @alldeps, $deps;
}
# Test dependencies
foreach $deps (@alldeps) {
$obj = shift @{$deps};
$mtime = (stat $obj)[9] or next;
foreach $dep_file (@{$deps}) {
if (not defined($dep_mtime = $modtimes{$dep_file})) {
$dep_mtime = (stat $dep_file)[9];
$modtimes{$dep_file} = $dep_mtime;
}
if ($dep_mtime ne '' and $dep_mtime > $mtime) {
print "$obj($mtime) older than $dep_file($dep_mtime)\n" if $debug;
push @objs, $obj;
# Object will be marked for rebuild. No need to check other dependencies.
last;
}
}
}
# Output objects to rebuild (if needed).
if (@objs) {
$new_output = "@objs: FORCE\n";
# Read in the current dependencies file.
open(OLD, "<$outfile")
and $old_output = <OLD>;
close(OLD);
# Only write out the dependencies if they are different.
if ($new_output ne $old_output) {
open(OUT, ">$outfile") and print OUT "$new_output";
print "Updating dependencies file, $outfile\n";
if ($debug) {
print "new: $new_output\n";
print "was: $old_output\n" if $old_output ne '';
}
}
} elsif (-s $outfile) {
# Remove the old dependencies because all objects are up to date.
print "Removing old dependencies file, $outfile\n";
if ($debug) {
open(OLD, "<$outfile")
and $old_output = <OLD>;
close(OLD);
print "was: $old_output\n";
}
unlink $outfile;
}

View File

@@ -0,0 +1,69 @@
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is build/unix/modules.mk from the Mozilla source tree.
#
# The Initial Developer of the Original Code is Christopher
# Seawood. Portions created by Christopher Seawood are
# Copyright (C) 2000 Christopher Seawood. All Rights Reserved.
#
#
BUILD_MODULE_DIRS := config build include
_BUILD_MODS =
NSPRPUB_DIR =
# client.mk does not have topsrcdir set
ifndef topsrcdir
topsrcdir=$(TOPSRCDIR)
endif
ifndef MOZ_NATIVE_NSPR
# Do not regenerate Makefile for NSPR
ifdef USE_NSPR_AUTOCONF
NSPRPUB_DIR = nsprpub
else
NSPRPUB_DIR = $(topsrcdir)/nsprpub
endif
endif
ifneq ($(BUILD_MODULES),all)
ifdef CROSS_COMPILE
BUILD_MODULE_DIRS_js = $(NSPRPUB_DIR)
endif
BUILD_MODULE_DIRS_dbm = $(NSPRPUB_DIR) dbm
BUILD_MODULE_DIRS_js += js
BUILD_MODULE_DIRS_necko = $(BUILD_MODULE_DIRS_xpcom) netwerk
BUILD_MODULE_DIRS_transformiix = extensions/transformiix
BUILD_MODULE_DIRS_xpcom = $(NSPRPUB_DIR) modules/libreg xpcom
BUILD_MODULE_DIRS_xpconnect = $(BUILD_MODULE_DIRS_xpcom) $(BUILD_MODULE_DIRS_js) js/src/xpconnect
BUILD_MODULE_DIRS += $(foreach mod,$(BUILD_MODULES), $(BUILD_MODULE_DIRS_$(mod)))
# Remove dups from the list to speed up the build
#
ifdef PERL
BUILD_MODULE_DIRS := $(shell $(PERL) -e 'undef @out; \
foreach $$d (@ARGV) { \
push @out, $$d if (!grep(/$$d/, @out)); \
}; \
print "@out\n"; ' $(BUILD_MODULE_DIRS))
else
# Since PERL isn't defined, client.mk must've called us so order doesn't matter
BUILD_MODULE_DIRS := $(sort $(BUILD_MODULE_DIRS))
endif
endif # BUILD_MODULES

View File

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

View File

@@ -0,0 +1,8 @@
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@
GC_LEAK_DETECTOR=@MOZ_NSPRENV_GC_LEAK_DETECTOR@

View File

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

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