]> git.saurik.com Git - apple/coreosmakefiles.git/commitdiff
CoreOSMakefiles-18.tar.gz mac-os-x-100 mac-os-x-1004 mac-os-x-101 mac-os-x-1011 mac-os-x-1012 mac-os-x-1013 mac-os-x-1014 mac-os-x-1015 v18
authorApple <opensource@apple.com>
Tue, 10 Apr 2001 01:57:15 +0000 (01:57 +0000)
committerApple <opensource@apple.com>
Tue, 10 Apr 2001 01:57:15 +0000 (01:57 +0000)
27 files changed:
APPLE_LICENSE [new file with mode: 0644]
Makefile [new file with mode: 0644]
ProjectBuilder/Makefile.Postamble.Common [new file with mode: 0644]
ProjectBuilder/Makefile.Preamble.Common [new file with mode: 0644]
ProjectBuilder/README [new file with mode: 0644]
README [new file with mode: 0644]
ReleaseControl/BSD.make [new file with mode: 0644]
ReleaseControl/Common.make [new file with mode: 0644]
ReleaseControl/GNUSource.make [new file with mode: 0644]
ReleaseControl/README [new file with mode: 0644]
ReleaseControl/mtree/BSD.include.dist [new file with mode: 0644]
ReleaseControl/mtree/BSD.local.dist [new file with mode: 0644]
ReleaseControl/mtree/BSD.release.dist [new file with mode: 0644]
ReleaseControl/mtree/BSD.root.dist [new file with mode: 0644]
ReleaseControl/mtree/BSD.usr.dist [new file with mode: 0644]
ReleaseControl/mtree/BSD.var.dist [new file with mode: 0644]
ReleaseControl/mtree/BSD.x11.dist [new file with mode: 0644]
ReleaseControl/mtree/Darwin.root.dist [new file with mode: 0644]
ReleaseControl/mtree/Darwin.usr.dist [new file with mode: 0644]
ReleaseControl/mtree/Darwin.var.dist [new file with mode: 0644]
ReleaseControl/mtree/README [new file with mode: 0644]
ReleaseControl/texi2html [new file with mode: 0755]
Standard/Commands.make [new file with mode: 0644]
Standard/Implicit.make [new file with mode: 0644]
Standard/Standard.make [new file with mode: 0644]
Standard/Variables.make [new file with mode: 0644]
dpkg/control [new file with mode: 0644]

diff --git a/APPLE_LICENSE b/APPLE_LICENSE
new file mode 100644 (file)
index 0000000..84687a4
--- /dev/null
@@ -0,0 +1,372 @@
+APPLE PUBLIC SOURCE LICENSE
+Version 1.1 - April 19,1999
+
+Please read this License carefully before downloading this software.
+By downloading and using this software, you are agreeing to be bound
+by the terms of this License.  If you do not or cannot agree to the
+terms of this License, please do not download or use the software.
+
+1. General; Definitions.  This License applies to any program or other
+work which Apple Computer, Inc. ("Apple") publicly announces as
+subject to this Apple Public Source License and which contains a
+notice placed by Apple identifying such program or work as "Original
+Code" and stating that it is subject to the terms of this Apple Public
+Source License version 1.1 (or subsequent version thereof), as it may
+be revised from time to time by Apple ("License").  As used in this
+License:
+
+1.1 "Affected Original Code" means only those specific portions of
+Original Code that allegedly infringe upon any party's intellectual
+property rights or are otherwise the subject of a claim of
+infringement.
+
+1.2 "Applicable Patent Rights" mean: (a) in the case where Apple is
+the grantor of rights, (i) claims of patents that are now or hereafter
+acquired, owned by or assigned to Apple and (ii) that cover subject
+matter contained in the Original Code, but only to the extent
+necessary to use, reproduce and/or distribute the Original Code
+without infringement; and (b) in the case where You are the grantor of
+rights, (i) claims of patents that are now or hereafter acquired,
+owned by or assigned to You and (ii) that cover subject matter in Your
+Modifications, taken alone or in combination with Original Code.
+
+1.3 "Covered Code" means the Original Code, Modifications, the
+combination of Original Code and any Modifications, and/or any
+respective portions thereof.
+
+1.4 "Deploy" means to use, sublicense or distribute Covered Code other
+than for Your internal research and development (R&D), and includes
+without limitation, any and all internal use or distribution of
+Covered Code within Your business or organization except for R&D use,
+as well as direct or indirect sublicensing or distribution of Covered
+Code by You to any third party in any form or manner.
+
+1.5 "Larger Work" means a work which combines Covered Code or portions
+thereof with code not governed by the terms of this License.
+
+1.6 "Modifications" mean any addition to, deletion from, and/or change
+to, the substance and/or structure of Covered Code.  When code is
+released as a series of files, a Modification is: (a) any addition to
+or deletion from the contents of a file containing Covered Code;
+and/or (b) any new file or other representation of computer program
+statements that contains any part of Covered Code.
+
+1.7 "Original Code" means (a) the Source Code of a program or other
+work as originally made available by Apple under this License,
+including the Source Code of any updates or upgrades to such programs
+or works made available by Apple under this License, and that has been
+expressly identified by Apple as such in the header file(s) of such
+work; and (b) the object code compiled from such Source Code and
+originally made available by Apple under this License.
+
+1.8 "Source Code" means the human readable form of a program or other
+work that is suitable 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
+(object code).
+
+1.9 "You" or "Your" means an individual or a legal entity exercising
+rights under this License.  For legal entities, "You" or "Your"
+includes any entity which controls, is controlled by, or is under
+common control with, You, where "control" means (a) the power, direct
+or indirect, to cause the direction or management of such entity,
+whether by contract or otherwise, or (b) ownership of fifty percent
+(50%) or more of the outstanding shares or beneficial ownership of
+such entity.
+
+2. Permitted Uses; Conditions & Restrictions.  Subject to the terms
+and conditions of this License, Apple hereby grants You, effective on
+the date You accept this License and download the Original Code, a
+world-wide, royalty-free, non- exclusive license, to the extent of
+Apple's Applicable Patent Rights and copyrights covering the Original
+Code, to do the following:
+
+2.1 You may use, copy, modify and distribute Original Code, with or
+without Modifications, solely for Your internal research and
+development, provided that You must in each instance:
+
+(a) retain and reproduce in all copies of Original Code the copyright
+and other proprietary notices and disclaimers of Apple as they appear
+in the Original Code, and keep intact all notices in the Original Code
+that refer to this License;
+
+(b) include a copy of this License with every copy of Source Code of
+Covered Code and documentation You distribute, and You may not offer
+or impose any terms on such Source Code that alter or restrict this
+License or the recipients' rights hereunder, except as permitted under
+Section 6; and
+
+(c) completely and accurately document all Modifications that you have
+made and the date of each such Modification, designate the version of
+the Original Code you used, prominently include a file carrying such
+information with the Modifications, and duplicate the notice in
+Exhibit A in each file of the Source Code of all such Modifications.
+
+2.2 You may Deploy Covered Code, provided that You must in each
+  instance:
+
+(a) satisfy all the conditions of Section 2.1 with respect to the
+Source Code of the Covered Code;
+
+(b) make all Your Deployed Modifications publicly available in Source
+Code form via electronic distribution (e.g. download from a web site)
+under the terms of this License and subject to the license grants set
+forth in Section 3 below, and any additional terms You may choose to
+offer under Section 6.  You must continue to make the Source Code of
+Your Deployed Modifications available for as long as you Deploy the
+Covered Code or twelve (12) months from the date of initial
+Deployment, whichever is longer;
+
+(c) if You Deploy Covered Code containing Modifications made by You,
+inform others of how to obtain those Modifications by filling out and
+submitting the information found at
+http://www.apple.com/publicsource/modifications.html, if available;
+and
+
+(d) if You Deploy Covered Code in object code, executable form only,
+include a prominent notice, in the code itself as well as in related
+documentation, stating that Source Code of the Covered Code is
+available under the terms of this License with information on how and
+where to obtain such Source Code.
+
+3. Your Grants.  In consideration of, and as a condition to, the
+licenses granted to You under this License:
+
+(a) You hereby grant to Apple and all third parties a non-exclusive,
+royalty-free license, under Your Applicable Patent Rights and other
+intellectual property rights owned or controlled by You, to use,
+reproduce, modify, distribute and Deploy Your Modifications of the
+same scope and extent as Apple's licenses under Sections 2.1 and 2.2;
+and
+
+(b) You hereby grant to Apple and its subsidiaries a non-exclusive,
+worldwide, royalty-free, perpetual and irrevocable license, under Your
+Applicable Patent Rights and other intellectual property rights owned
+or controlled by You, to use, reproduce, execute, compile, display,
+perform, modify or have modified (for Apple and/or its subsidiaries),
+sublicense and distribute Your Modifications, in any form, through
+multiple tiers of distribution.
+
+4. 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 each such
+instance, You must make sure the requirements of this License are
+fulfilled for the Covered Code or any portion thereof.
+
+5. Limitations on Patent License.  Except as expressly stated in
+Section 2, no other patent rights, express or implied, are granted by
+Apple herein.  Modifications and/or Larger Works may require
+additional patent licenses from Apple which Apple may grant in its
+sole discretion.
+
+6. Additional Terms.  You may choose to offer, and to charge a fee
+for, warranty, support, indemnity or liability obligations and/or
+other rights consistent with the scope of the license granted herein
+("Additional Terms") to one or more recipients of Covered
+Code. However, You may do so only on Your own behalf and as Your sole
+responsibility, and not on behalf of Apple. You must obtain the
+recipient's agreement that any such Additional Terms are offered by
+You alone, and You hereby agree to indemnify, defend and hold Apple
+harmless for any liability incurred by or claims asserted against
+Apple by reason of any such Additional Terms.
+
+7. Versions of the License.  Apple may publish revised and/or new
+versions of this License from time to time.  Each version will be
+given a distinguishing version number.  Once Original Code has been
+published under a particular version of this License, You may continue
+to use it under the terms of that version. You may also choose to use
+such Original Code under the terms of any subsequent version of this
+License published by Apple.  No one other than Apple has the right to
+modify the terms applicable to Covered Code created under this
+License.
+
+8. NO WARRANTY OR SUPPORT.  The Original Code may contain in whole or
+in part pre-release, untested, or not fully tested works.  The
+Original Code may contain errors that could cause failures or loss of
+data, and may be incomplete or contain inaccuracies.  You expressly
+acknowledge and agree that use of the Original Code, or any portion
+thereof, is at Your sole and entire risk.  THE ORIGINAL CODE IS
+PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND
+AND APPLE AND APPLE'S LICENSOR(S) (FOR THE PURPOSES OF SECTIONS 8 AND
+9, APPLE AND APPLE'S LICENSOR(S) ARE COLLECTIVELY REFERRED TO AS
+"APPLE") EXPRESSLY DISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+AND/OR CONDITIONS OF MERCHANTABILITY OR SATISFACTORY QUALITY AND
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
+RIGHTS.  APPLE DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE
+ORIGINAL CODE WILL MEET YOUR REQUIREMENTS, OR THAT THE OPERATION OF
+THE ORIGINAL CODE WILL BE UNINTERRUPTED OR ERROR- FREE, OR THAT
+DEFECTS IN THE ORIGINAL CODE WILL BE CORRECTED.  NO ORAL OR WRITTEN
+INFORMATION OR ADVICE GIVEN BY APPLE OR AN APPLE AUTHORIZED
+REPRESENTATIVE SHALL CREATE A WARRANTY OR IN ANY WAY INCREASE THE
+SCOPE OF THIS WARRANTY.  You acknowledge that the Original Code is not
+intended for use in the operation of nuclear facilities, aircraft
+navigation, communication systems, or air traffic control machines in
+which case the failure of the Original Code could lead to death,
+personal injury, or severe physical or environmental damage.
+
+9. Liability.
+
+9.1 Infringement.  If any portion of, or functionality implemented by,
+the Original Code becomes the subject of a claim of infringement,
+Apple may, at its option: (a) attempt to procure the rights necessary
+for Apple and You to continue using the Affected Original Code; (b)
+modify the Affected Original Code so that it is no longer infringing;
+or (c) suspend Your rights to use, reproduce, modify, sublicense and
+distribute the Affected Original Code until a final determination of
+the claim is made by a court or governmental administrative agency of
+competent jurisdiction and Apple lifts the suspension as set forth
+below.  Such suspension of rights will be effective immediately upon
+Apple's posting of a notice to such effect on the Apple web site that
+is used for implementation of this License.  Upon such final
+determination being made, if Apple is legally able, without the
+payment of a fee or royalty, to resume use, reproduction,
+modification, sublicensing and distribution of the Affected Original
+Code, Apple will lift the suspension of rights to the Affected
+Original Code by posting a notice to such effect on the Apple web site
+that is used for implementation of this License.  If Apple suspends
+Your rights to Affected Original Code, nothing in this License shall
+be construed to restrict You, at Your option and subject to applicable
+law, from replacing the Affected Original Code with non-infringing
+code or independently negotiating for necessary rights from such third
+party.
+
+9.2 LIMITATION OF LIABILITY.  UNDER NO CIRCUMSTANCES SHALL APPLE BE
+LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
+ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR USE OR INABILITY TO
+USE THE ORIGINAL CODE, OR ANY PORTION THEREOF, WHETHER UNDER A THEORY
+OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY
+OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF
+ANY REMEDY.  In no event shall Apple's total liability to You for all
+damages under this License exceed the amount of fifty dollars
+($50.00).
+
+10. Trademarks.  This License does not grant any rights to use the
+trademarks or trade names "Apple", "Apple Computer", "Mac OS X", "Mac
+OS X Server" or any other trademarks or trade names belonging to Apple
+(collectively "Apple Marks") and no Apple Marks may be used to endorse
+or promote products derived from the Original Code other than as
+permitted by and in strict compliance at all times with Apple's third
+party trademark usage guidelines which are posted at
+http://www.apple.com/legal/guidelinesfor3rdparties.html.
+
+11. Ownership.  Apple retains all rights, title and interest in and to
+the Original Code and any Modifications made by or on behalf of Apple
+("Apple Modifications"), and such Apple Modifications will not be
+automatically subject to this License.  Apple may, at its sole
+discretion, choose to license such Apple Modifications under this
+License, or on different terms from those contained in this License or
+may choose not to license them at all.  Apple's development, use,
+reproduction, modification, sublicensing and distribution of Covered
+Code will not be subject to this License.
+
+12. Termination.
+
+12.1 Termination.  This License and the rights granted hereunder will
+   terminate:
+
+(a) automatically without notice from Apple if You fail to comply with
+any term(s) of this License and fail to cure such breach within 30
+days of becoming aware of such breach; (b) immediately in the event of
+the circumstances described in Section 13.5(b); or (c) automatically
+without notice from Apple if You, at any time during the term of this
+License, commence an action for patent infringement against Apple.
+
+12.2 Effect of Termination.  Upon termination, You agree to
+immediately stop any further use, reproduction, modification,
+sublicensing and distribution of the Covered Code and to destroy all
+copies of the Covered Code that are in your possession or control.
+All sublicenses to the Covered Code which have been properly granted
+prior to termination shall survive any termination of this License.
+Provisions which, by their nature, should remain in effect beyond the
+termination of this License shall survive, including but not limited
+to Sections 3, 5, 8, 9, 10, 11, 12.2 and 13.  Neither party will be
+liable to the other for compensation, indemnity or damages of any sort
+solely as a result of terminating this License in accordance with its
+terms, and termination of this License will be without prejudice to
+any other right or remedy of either party.
+
+13.  Miscellaneous.
+
+13.1 Government End Users.  The Covered Code is a "commercial item" as
+defined in FAR 2.101.  Government software and technical data rights
+in the Covered Code include only those rights customarily provided to
+the public as defined in this License. This customary commercial
+license in technical data and software is provided in accordance with
+FAR 12.211 (Technical Data) and 12.212 (Computer Software) and, for
+Department of Defense purchases, DFAR 252.227-7015 (Technical Data --
+Commercial Items) and 227.7202-3 (Rights in Commercial Computer
+Software or Computer Software Documentation).  Accordingly, all U.S.
+Government End Users acquire Covered Code with only those rights set
+forth herein.
+
+13.2 Relationship of Parties.  This License will not be construed as
+creating an agency, partnership, joint venture or any other form of
+legal association between You and Apple, and You will not represent to
+the contrary, whether expressly, by implication, appearance or
+otherwise.
+
+13.3 Independent Development.  Nothing in this License will impair
+Apple's right to acquire, license, develop, have others develop for
+it, market and/or distribute technology or products that perform the
+same or similar functions as, or otherwise compete with,
+Modifications, Larger Works, technology or products that You may
+develop, produce, market or distribute.
+
+13.4 Waiver; Construction.  Failure by Apple to enforce any provision
+of this License will not be deemed a waiver of future enforcement of
+that or any other provision.  Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+will not apply to this License.
+
+13.5 Severability.  (a) If for any reason a court of competent
+jurisdiction finds any provision of this License, or portion thereof,
+to be unenforceable, that provision of the License will be enforced to
+the maximum extent permissible so as to effect the economic benefits
+and intent of the parties, and the remainder of this License will
+continue in full force and effect.  (b) Notwithstanding the foregoing,
+if applicable law prohibits or restricts You from fully and/or
+specifically complying with Sections 2 and/or 3 or prevents the
+enforceability of either of those Sections, this License will
+immediately terminate and You must immediately discontinue any use of
+the Covered Code and destroy all copies of it that are in your
+possession or control.
+
+13.6 Dispute Resolution.  Any litigation or other dispute resolution
+between You and Apple relating to this License shall take place in the
+Northern District of California, and You and Apple hereby consent to
+the personal jurisdiction of, and venue in, the state and federal
+courts within that District with respect to this License. The
+application of the United Nations Convention on Contracts for the
+International Sale of Goods is expressly excluded.
+
+13.7 Entire Agreement; Governing Law.  This License constitutes the
+entire agreement between the parties with respect to the subject
+matter hereof.  This License shall be governed by the laws of the
+United States and the State of California, except that body of
+California law concerning conflicts of law.
+
+Where You are located in the province of Quebec, Canada, the following
+clause applies: The parties hereby confirm that they have requested
+that this License and all related documents be drafted in English. Les
+parties ont exige que le present contrat et tous les documents
+connexes soient rediges en anglais.
+
+EXHIBIT A.
+
+"Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
+Reserved.  This file contains Original Code and/or Modifications of
+Original Code as defined in and that are subject to the Apple Public
+Source License Version 1.1 (the "License").  You may not use this file
+except in compliance with the License.  Please obtain a copy of the
+License at http://www.apple.com/publicsource and read it before using
+this file.
+
+The Original Code and all software distributed under the License are
+distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
+License for the specific language governing rights and limitations
+under the License."
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..f484e72
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,11 @@
+Project=CoreOSMakefiles
+
+CoreOSMakefiles = .
+
+include $(CoreOSMakefiles)/ReleaseControl/Common.make
+
+Destination = $(MAKEFILEPATH)/CoreOS
+
+install_headers::
+       @$(MAKE) install_source SRCROOT=$(DSTROOT)$(Destination)
+       $(_v) $(RM) -f $(DSTROOT)$(Destination)/Makefile
diff --git a/ProjectBuilder/Makefile.Postamble.Common b/ProjectBuilder/Makefile.Postamble.Common
new file mode 100644 (file)
index 0000000..351782b
--- /dev/null
@@ -0,0 +1,206 @@
+##
+# Common ProjectBuilder-style Postamble.
+#
+# Wilfredo Sanchez | wsanchez@apple.com
+# Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+#
+# @APPLE_LICENSE_HEADER_START@
+# 
+# Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
+# Reserved.  This file contains Original Code and/or Modifications of
+# Original Code as defined in and that are subject to the Apple Public
+# Source License Version 1.1 (the "License").  You may not use this file
+# except in compliance with the License.  Please obtain a copy of the
+# License at http://www.apple.com/publicsource and read it before using
+# this file.
+# 
+# The Original Code and all software distributed under the License are
+# distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+# EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
+# License for the specific language governing rights and limitations
+# under the License.
+# 
+# @APPLE_LICENSE_HEADER_END@
+##
+
+#########################
+# Overridding variables #
+#########################
+
+##
+# Permissions
+##
+INSTALL_AS_USER     = $(Install_User)
+INSTALL_AS_GROUP    = $(Install_Group)
+INSTALL_PERMISSIONS = $(Install_Program_Mode)
+
+##
+# This is a command to let you hard link the product to another name.
+# For example:
+# AFTER_INSTALL += install-links
+# install-links:
+#      $(LINKPRODUCT) $(DSTROOT)$(INSTALLDIR)/othername
+##
+LINKPRODUCT = $(LN) -f $(DSTROOT)$(INSTALLDIR)/$(notdir $(PRODUCT))
+
+##
+# If you set SHELLTOOL, then we know your program is a shell script.
+# There's no need to compile it, just copy and set permissions.
+##
+ifdef SHELLTOOL
+$(PRODUCT): $(SHELLTOOL)
+       $(_v) $(INSTALL_PROGRAM) -c $(SHELLTOOL) $(PRODUCT)
+endif
+
+##
+# If the user running make is not root, then you can't do chown.
+# We want to be able to compile as a regular user without having make
+# stop due to errors in using chown, so we set CHOWN in that case to
+# a noop.
+##
+ifneq ($(shell whoami),root)
+CHOWN = $(TRUE)
+endif
+
+##
+# PB Makefiles are wierd.
+# Some some odd reason, RC used to need to set SRCROOT=OBJROOT=SYMROOT and
+# make clean. That nukes subprojects without .tproj, etc extensions. This
+# is a bug in PB Makefiles, and the following is a workaround.
+##
+ifeq ($(SYMROOT),$(SRCROOT))
+PRODUCT =
+endif
+
+##
+# If we are using shared Makefiles, we should install them with the sources.
+##
+ifneq ($(wildcard Makefiles),)
+IMPLICIT_SOURCE_FILES += Makefiles
+endif
+
+##
+# PB want to add "-S" to its strip commands. I don't think so.
+# For libraries, that's a good default, otherwise, if we want,
+# we'll ask for it.
+##
+STRIPFLAGS = 
+
+##
+# Optimization
+##
+OPTIMIZE_BUILD_CFLAGS = $(CC_Optimize)
+
+##
+# Commands
+##
+MKDIRS = $(MKDIR)
+
+###########
+# Targets #
+###########
+
+install-source:
+ifneq ($(Install_Source),)
+       $(_v) $(MAKE) installsrc SRCROOT=$(DSTROOT)$(Install_Source)
+       $(_v) $(CHOWN) -R $(INSTALL_AS_USER).$(INSTALL_AS_GROUP) $(DSTROOT)$(Install_Source)
+       $(_v) $(CHMOD) -R -w $(DSTROOT)$(Install_Source)
+endif
+
+install-man: $(MANFILES)
+ifneq ($(strip $(MAN0FILES)),)
+       $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(MAN0DIR)
+       $(_v) $(INSTALL_FILE) -c $(MAN1FILES) $(DSTROOT)$(MAN0DIR)
+endif
+ifneq ($(strip $(MAN1FILES)),)
+       $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(MAN1DIR)
+       $(_v) $(INSTALL_FILE) -c $(MAN1FILES) $(DSTROOT)$(MAN1DIR)
+endif
+ifneq ($(strip $(MAN2FILES)),)
+       $(_v) $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(MAN2DIR)
+       $(_v) $(_v) $(INSTALL_FILE) -c $(MAN2FILES) $(DSTROOT)$(MAN2DIR)
+endif
+ifneq ($(strip $(MAN3FILES)),)
+       $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(MAN3DIR)
+       $(_v) $(INSTALL_FILE) -c $(MAN3FILES) $(DSTROOT)$(MAN3DIR)
+endif
+ifneq ($(strip $(MAN4FILES)),)
+       $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(MAN4DIR)
+       $(_v) $(INSTALL_FILE) -c $(MAN4FILES) $(DSTROOT)$(MAN4DIR)
+endif
+ifneq ($(strip $(MAN5FILES)),)
+       $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(MAN5DIR)
+       $(_v) $(INSTALL_FILE) -c $(MAN5FILES) $(DSTROOT)$(MAN5DIR)
+endif
+ifneq ($(strip $(MAN6FILES)),)
+       $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(MAN6DIR)
+       $(_v) $(INSTALL_FILE) -c $(MAN6FILES) $(DSTROOT)$(MAN6DIR)
+endif
+ifneq ($(strip $(MAN7FILES)),)
+       $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(MAN7DIR)
+       $(_v) $(INSTALL_FILE) -c $(MAN7FILES) $(DSTROOT)$(MAN7DIR)
+endif
+ifneq ($(strip $(MAN8FILES)),)
+       $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(MAN8DIR)
+       $(_v) $(INSTALL_FILE) -c $(MAN8FILES) $(DSTROOT)$(MAN8DIR)
+endif
+ifneq ($(strip $(MAN9FILES)),)
+       $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(MAN9DIR)
+       $(_v) $(INSTALL_FILE) -c $(MAN9FILES) $(DSTROOT)$(MAN9DIR)
+endif
+
+##
+# Libraries
+##
+
+ifeq ($(PROJTYPE),LIBRARY)
+
+# Don't strip all symbols
+STRIPFLAGS = -S
+
+# PB uses this recursively
+INSTALL_PERMISSIONS = ugo+rX
+
+# Create an object file list
+install-ofilelist::
+       echo $(OFILES) | $(FMT) -1 > $(OFILE_DIR)/$(NAME).ofileList
+       $(CHMOD) 444 $(OFILE_DIR)/$(NAME).ofileList
+
+endif
+
+##
+# Frameworks
+##
+
+ifeq ($(PROJECT_TYPE),Framework)
+
+# Don't strip all symbols
+STRIPFLAGS = -S
+
+# PB uses this recursively
+INSTALL_PERMISSIONS = ugo+rX
+
+# PB creates this bogus ObjC file ($(DUMMY_SYMBOL_FILE)) and wants to link it
+# into the framework. We don't want ObjC loading into clients of this framework,
+# so we filter it our from the $(LOADABLES) list, and remove the info file that
+# goes with it from the $(OTHER_INFO_FILES) list.
+LOADABLES        := $(patsubst $(DUMMY_SYMBOL).o,,$(LOADABLES))
+OTHER_INFO_FILES := $(patsubst $(DUMMY_SYMBOL_INFO_FILE),,$(OTHER_INFO_FILES))
+
+endif
+
+##
+# Bundles
+##
+
+ifeq ($(PROJECT_TYPE),Loadable Bundle)
+
+# Don't strip all symbols
+STRIPFLAGS = -S
+
+# PB uses this recursively
+INSTALL_PERMISSIONS = ugo+rX
+
+endif
diff --git a/ProjectBuilder/Makefile.Preamble.Common b/ProjectBuilder/Makefile.Preamble.Common
new file mode 100644 (file)
index 0000000..58b840d
--- /dev/null
@@ -0,0 +1,120 @@
+##
+# Common ProjectBuilder-style Premable.
+#
+# Wilfredo Sanchez | wsanchez@apple.com
+# Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+#
+# @APPLE_LICENSE_HEADER_START@
+# 
+# Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
+# Reserved.  This file contains Original Code and/or Modifications of
+# Original Code as defined in and that are subject to the Apple Public
+# Source License Version 1.1 (the "License").  You may not use this file
+# except in compliance with the License.  Please obtain a copy of the
+# License at http://www.apple.com/publicsource and read it before using
+# this file.
+# 
+# The Original Code and all software distributed under the License are
+# distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+# EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
+# License for the specific language governing rights and limitations
+# under the License.
+# 
+# @APPLE_LICENSE_HEADER_END@
+##
+
+##
+# Where to find Makefiles
+##
+ifndef CoreOSMakefiles
+CoreOSMakefiles = /$(MAKEFILEPATH)/CoreOS
+endif
+CoreOSMakefiles := $(shell cd $(CoreOSMakefiles) && pwd)
+
+##
+# Include the Classics
+##
+include $(CoreOSMakefiles)/Standard/Standard.make
+
+#############
+# Variables #
+#############
+
+##
+# Remember the name of the top-level project when using aggregates.
+##
+TOP_PROJECT = $(NAME)
+OTHER_RECURSIVE_VARIABLES += TOP_PROJECT CoreOSMakefiles
+
+##
+# Set some reasonable defaults for RC variables.
+##
+OBJROOT = /tmp/$(TOP_PROJECT)/Build
+SYMROOT = /tmp/$(TOP_PROJECT)/Debug
+DSTROOT = /tmp/$(TOP_PROJECT)/Release
+
+##
+# Add project version info to the binary.
+##
+OTHER_GENERATED_OFILES += $(VERS_OFILE)
+VERSIONING_SYSTEM = next-sgs
+
+##
+# Figure out if we have any man pages.
+##
+MANDIR    = /usr/share/man
+MAN0DIR   = $(MANDIR)/man0
+MAN1DIR   = $(MANDIR)/man1
+MAN2DIR   = $(MANDIR)/man2
+MAN3DIR   = $(MANDIR)/man3
+MAN4DIR   = $(MANDIR)/man4
+MAN5DIR   = $(MANDIR)/man5
+MAN6DIR   = $(MANDIR)/man6
+MAN7DIR   = $(MANDIR)/man7
+MAN8DIR   = $(MANDIR)/man8
+MAN9DIR   = $(MANDIR)/man9
+MAN0FILES = $(filter %.0,$(OTHERSRCS))
+MAN1FILES = $(filter %.1,$(OTHERSRCS))
+MAN2FILES = $(filter %.2,$(OTHERSRCS))
+MAN3FILES = $(filter %.3,$(OTHERSRCS))
+MAN4FILES = $(filter %.4,$(OTHERSRCS))
+MAN5FILES = $(filter %.5,$(OTHERSRCS))
+MAN6FILES = $(filter %.6,$(OTHERSRCS))
+MAN7FILES = $(filter %.7,$(OTHERSRCS))
+MAN8FILES = $(filter %.8,$(OTHERSRCS))
+MAN9FILES = $(filter %.9,$(OTHERSRCS))
+MANFILES  = $(MAN1FILES) \
+           $(MAN2FILES) \
+           $(MAN3FILES) \
+           $(MAN4FILES) \
+           $(MAN5FILES) \
+           $(MAN6FILES) \
+           $(MAN7FILES) \
+           $(MAN8FILES) \
+           $(MAN9FILES)
+
+###########
+# Targets #
+###########
+
+##
+# See postamble for info on these.
+##
+ifdef SHELLTOOL
+OTHERLINKEDOFILES      =
+OTHER_GENERATED_OFILES = 
+STRIP_ON_INSTALL       = NO
+endif
+
+AFTER_INSTALL += install-man install-source
+
+ifeq ($(PROJTYPE),LIBRARY)
+AFTER_INSTALL += install-ofilelist
+endif
+
+##
+# Default
+##
+default: all
diff --git a/ProjectBuilder/README b/ProjectBuilder/README
new file mode 100644 (file)
index 0000000..d8c2090
--- /dev/null
@@ -0,0 +1,13 @@
+ProjectBuilder Supplemental Makefiles
+
+  These makefiles extend the functionality of the PB makefiles and corrects
+some bogus assumptions made in the PB makefiles about how projects should
+build.  Some things you get:
+
+ - More predefined variables:
+   - commands
+   - path locations
+ - Knows how to install man pages placed in the "Supporting Files" bucket
+ - Corrects some assumptions about how projects should build
+   - Not everyone wants ObjC in their frameworks
+ - Handles tool projects which are shell scrips (no compiled code)
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..ccfa4a4
--- /dev/null
+++ b/README
@@ -0,0 +1,8 @@
+Core OS Common Makefiles
+
+  These are some makefiles which are required to build some Rhapsody
+Core OS projects. Please note that these are not supported in any way
+outside of Core OS; they are subject to change without notice.
+
+       -Wilfredo Sanchez
+        wsanchez@apple.com
diff --git a/ReleaseControl/BSD.make b/ReleaseControl/BSD.make
new file mode 100644 (file)
index 0000000..71cfd5e
--- /dev/null
@@ -0,0 +1,92 @@
+##
+# Makefile for Apple Release Control (BSD projects)
+#
+# Wilfredo Sanchez | wsanchez@apple.com
+# Copyright (c) 1997-1999 Apple Computer, Inc.
+#
+# @APPLE_LICENSE_HEADER_START@
+# 
+# Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
+# Reserved.  This file contains Original Code and/or Modifications of
+# Original Code as defined in and that are subject to the Apple Public
+# Source License Version 1.1 (the "License").  You may not use this file
+# except in compliance with the License.  Please obtain a copy of the
+# License at http://www.apple.com/publicsource and read it before using
+# this file.
+# 
+# The Original Code and all software distributed under the License are
+# distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+# EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
+# License for the specific language governing rights and limitations
+# under the License.
+# 
+# @APPLE_LICENSE_HEADER_END@
+##
+
+ifndef CoreOSMakefiles
+CoreOSMakefiles = $(MAKEFILEPATH)/CoreOS
+endif
+
+include $(CoreOSMakefiles)/ReleaseControl/Common.make
+
+##
+# My variables
+##
+
+CC_Debug += -Wall -Werror
+
+Extra_CC_Flags += -traditional-cpp
+
+Environment = ARCH_FLAGS="$(CC_Archs)" \
+                  COPTS="$(CFLAGS)"    \
+             MAKEOBJDIR="$(OBJROOT)"   \
+             $(Extra_Environment)
+
+ifndef BSD_Executable_Path
+BSD_Executable_Path = $(USRBINDIR)
+endif
+
+Extra_Environment += BINDIR="$(BSD_Executable_Path)"
+
+Install_Environment = DESTDIR=$(DSTROOT)               \
+                     $(Extra_Install_Environment)
+
+Install_Target = install
+
+##
+# Targets
+##
+
+.PHONY: bsd_install
+
+BSD_Install_Targets = $(BSD_Before_Install) BSD_install_dirs BSD_install BSD_clean_dirs $(BSD_After_Install)
+
+install:: $(BSD_Install_Targets)
+
+BSD_install_dirs::
+       $(_v) $(MKDIR) $(DSTROOT)
+       $(_v) mtree -f $(CoreOSMakefiles)/ReleaseControl/mtree/Darwin.root.dist     -U -p $(DSTROOT)
+       $(_v) mtree -f $(CoreOSMakefiles)/ReleaseControl/mtree/Darwin.usr.dist      -U -p $(DSTROOT)$(USRDIR)
+       $(_v) mtree -f $(CoreOSMakefiles)/ReleaseControl/mtree/Darwin.var.dist      -U -p $(DSTROOT)$(VARDIR)
+
+BSD_install:: build
+       @echo "Installing $(Project)..."
+       $(_v) umask $(Install_Mask) ; $(Environment) $(BSDMAKE) $(Install_Environment) $(Install_Target)
+
+BSD_clean_dirs::
+       -$(_v) $(FIND) -d $(DSTROOT) -type d -print0 | $(XARGS) -0 rmdir 2> /dev/null
+
+BSD_Build_Targets = $(BSD_Before_Build) BSD_build $(BSD_After_Build)
+
+build:: $(BSD_Build_Targets)
+
+BSD_build::
+       @echo "Building $(Project)..."
+       $(_v) $(MKDIR) $(OBJROOT)
+       $(_v) $(Environment) $(BSDMAKE)
+
+depend::
+       @echo "Making dependancy file"
+       $(_v) $(Environment) $(BSDMAKE) depend
diff --git a/ReleaseControl/Common.make b/ReleaseControl/Common.make
new file mode 100644 (file)
index 0000000..25d16a8
--- /dev/null
@@ -0,0 +1,171 @@
+##
+# Makefile for Apple Release Control (common)
+#
+# Wilfredo Sanchez | wsanchez@apple.com
+# Copyright (c) 1997-1999 Apple Computer, Inc.
+#
+# @APPLE_LICENSE_HEADER_START@
+# 
+# Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
+# Reserved.  This file contains Original Code and/or Modifications of
+# Original Code as defined in and that are subject to the Apple Public
+# Source License Version 1.1 (the "License").  You may not use this file
+# except in compliance with the License.  Please obtain a copy of the
+# License at http://www.apple.com/publicsource and read it before using
+# this file.
+# 
+# The Original Code and all software distributed under the License are
+# distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+# EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
+# License for the specific language governing rights and limitations
+# under the License.
+# 
+# @APPLE_LICENSE_HEADER_END@
+##
+# Set these variables as needed, then include this file, then:
+#
+#  Project           [ UNTITLED_PROJECT ]
+#  ProjectName       [ $(Project)       ]
+#  SubProjects
+#  Extra_Environment
+#  Passed_Targets
+#
+# Additional variables inherited from Standard/Standard.make
+##
+
+ifndef CoreOSMakefiles
+CoreOSMakefiles = $(MAKEFILEPATH)/CoreOS
+endif
+
+include $(CoreOSMakefiles)/Standard/Standard.make
+
+##
+# Some reasonable defaults for RC variables
+##
+
+RC_ARCHS   = ppc i386
+RC_RELEASE = unknown
+RC_VERSION = unknown
+
+ifeq ($(COPY_SOURCES),YES)
+SRCROOT = /tmp/$(Project)/Sources
+else
+SRCROOT = $(shell pwd)
+endif
+
+OBJROOT = /tmp/$(Project)/Build
+SYMROOT = /tmp/$(Project)/Debug
+DSTROOT = /tmp/$(Project)/Release
+
+##
+# My variables
+##
+
+ifndef Project
+Project = UNTITLED_PROJECT
+endif
+
+ifndef ProjectName
+ProjectName = $(Project)
+endif
+
+ifneq ($(RC_VERSION),unknown)
+Version = RC_VERSION
+else
+Version := $(shell $(VERS_STRING) -f $(Project) 2>/dev/null | cut -d - -f 2)
+ifeq ($(Version),)
+Version = 0
+endif
+endif
+
+Sources        = $(SRCROOT)
+Platforms      = $(patsubst %,%-apple-rhapsody$(RhapsodyVersion),$(RC_ARCHS:ppc=powerpc))
+BuildDirectory = $(OBJROOT)
+
+CC_Archs      = $(RC_ARCHS:%=-arch %)
+#CPP_Defines += -DPROJECT_VERSION=\"$(Project)-$(Version)\"
+
+Extra_CC_Flags += $(RC_CFLAGS)
+
+Environment =   CFLAGS="$(CFLAGS)"     \
+              CCFLAGS="$(CXXFLAGS)"    \
+             CXXFLAGS="$(CXXFLAGS)"    \
+              LDFLAGS="$(LDFLAGS)"     \
+             $(Extra_Environment)
+
+VPATH=$(Sources)
+
+##
+# Targets
+##
+
+.PHONY: all install installhdrs install_headers lazy_installsrc lazy_install_source installsrc install_source build clean recurse
+
+all: build
+
+$(DSTROOT): install
+
+install:: install_headers build
+
+# For RC
+installhdrs:: install_headers
+
+install_headers::
+
+lazy_install_source::
+       $(_v) if [ ! -f "$(SRCROOT)/Makefile" ]; then $(MAKE) install_source; fi
+
+install_source::
+ifneq ($(CommonNoInstallSource),YES)
+       @echo "Installing source for $(Project)..."
+       $(_v) $(MKDIR) "$(SRCROOT)"
+ifneq ($(wildcard $(PAX)),)
+       $(_v) $(PAX) -rw . "$(SRCROOT)"
+else
+       $(_v) $(TAR) cf - . | (cd "$(SRCROOT)" ; $(TAR) xfp -)
+endif
+       $(_v) $(FIND) "$(SRCROOT)" $(Find_Cruft) | $(XARGS) $(RMDIR)
+endif
+
+ifndef ShadowTestFile
+ShadowTestFile = $(BuildDirectory)/Makefile
+endif
+
+shadow_source:: $(ShadowTestFile)
+
+$(ShadowTestFile):
+       echo "Creating pseudo-copy of sources in the build directory...";
+       $(_v) mkdir -p $(BuildDirectory);
+       $(_v) for dir in $$( cd $(Sources) && $(FIND) . -type d ); do                   \
+               cd $(BuildDirectory) && if [ ! -d $$dir ]; then $(MKDIR) $$dir; fi;     \
+             done
+       $(_v) for file in $$( cd $(Sources) && $(FIND) . -type f ); do                  \
+               cd $(BuildDirectory) && $(LN) -fs $(Sources)/$$file $$file;             \
+             done
+
+# For RC
+installsrc: install_source
+
+build:: lazy_install_source
+
+clean::
+       @echo "Cleaning $(Project)..."
+       $(_v) $(RMDIR) -f "$(BuildDirectory)"
+
+$(Passed_Targets) $(Extra_Passed_Targets):
+       $(_v) umask $(Install_Mask) ; $(MAKE) -C $(BuildDirectory) $(Environment) $@
+
+recurse:
+ifdef SubProjects
+       $(_v) for SubProject in $(SubProjects); do                              \
+               $(MAKE) -C $$SubProject $(TARGET)                               \
+                       BuildDirectory=$(BuildDirectory)/$${SubProject}         \
+                              Sources=$(Sources)/$${SubProject}                \
+                      CoreOSMakefiles=$(CoreOSMakefiles);                      \
+             done
+endif
+
+rshowvar: showvar
+       $(_v) $(MAKE) recurse TARGET=rshowvar
diff --git a/ReleaseControl/GNUSource.make b/ReleaseControl/GNUSource.make
new file mode 100644 (file)
index 0000000..c52a2e6
--- /dev/null
@@ -0,0 +1,148 @@
+##
+# Makefile for Apple Release Control (GNU source projects)
+#
+# Wilfredo Sanchez | wsanchez@apple.com
+# Copyright (c) 1997-1999 Apple Computer, Inc.
+#
+# @APPLE_LICENSE_HEADER_START@
+# 
+# Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
+# Reserved.  This file contains Original Code and/or Modifications of
+# Original Code as defined in and that are subject to the Apple Public
+# Source License Version 1.1 (the "License").  You may not use this file
+# except in compliance with the License.  Please obtain a copy of the
+# License at http://www.apple.com/publicsource and read it before using
+# this file.
+# 
+# The Original Code and all software distributed under the License are
+# distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+# EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
+# License for the specific language governing rights and limitations
+# under the License.
+# 
+# @APPLE_LICENSE_HEADER_END@
+##
+# Set these variables as needed, then include this file, then:
+#
+#  Install_Prefix        [ $(USRDIR)                              ]
+#  Install_Man           [ $(MANDIR)                              ]
+#  Install_Info          [ $(SHAREDIR)/info                       ]
+#  Install_HTML          [ <depends>                              ]
+#  Install_Source        [ $(NSSOURCEDIR)/Commands/$(ProjectName) ]
+#  Configure             [ $(Sources)/configure                   ]
+#  Extra_Configure_Flags
+#  Extra_Install_Flags 
+#  Passed_Targets        [ check                                  ]
+#
+# Additional variables inherited from ReleaseControl/Common.make
+##
+
+ifndef CoreOSMakefiles
+CoreOSMakefiles = $(MAKEFILEPATH)/CoreOS
+endif
+
+Passed_Targets += check
+
+include $(CoreOSMakefiles)/ReleaseControl/Common.make
+
+##
+# My variables
+##
+
+Sources     = $(SRCROOT)/$(Project)
+ConfigStamp = $(BuildDirectory)/configure-stamp
+
+ifndef Install_Prefix
+Install_Prefix = $(USRDIR)
+endif
+ifndef Install_Man
+Install_Man = $(MANDIR)
+endif
+ifndef Install_Info
+Install_Info = $(SHAREDIR)/info
+endif
+ifndef Install_HTML
+ifeq "$(UserType)" "Developer"
+Install_HTML = $(NSDEVELOPERDIR)/Documentation/$(ToolType)/$(ProjectName)
+else
+Install_HTML = $(NSDOCUMENTATIONDIR)/$(ToolType)/$(ProjectName)
+endif
+endif
+ifndef Install_Source
+Install_Source = $(NSSOURCEDIR)/$(ToolType)/$(ProjectName)
+endif
+
+RC_Install_Prefix = $(DSTROOT)$(Install_Prefix)
+RC_Install_Man    = $(DSTROOT)$(Install_Man)
+RC_Install_Info   = $(DSTROOT)$(Install_Info)
+RC_Install_HTML   = $(DSTROOT)$(Install_HTML)
+ifneq ($(Install_Source),)
+RC_Install_Source = $(DSTROOT)$(Install_Source)
+endif
+
+ifndef Configure
+Configure = $(Sources)/configure
+endif
+
+Environment += TEXI2HTML="$(TEXI2HTML) -subdir ."
+
+Configure_Flags = --prefix="$(Install_Prefix)" \
+                 --mandir="$(Install_Man)"     \
+                --infodir="$(Install_Info)"    \
+                 $(Extra_Configure_Flags)
+
+Install_Flags = prefix="$(RC_Install_Prefix)"  \
+               mandir="$(RC_Install_Man)"      \
+              infodir="$(RC_Install_Info)"     \
+              htmldir="$(RC_Install_HTML)"     \
+                      $(Extra_Install_Flags)
+
+Install_Target = install-strip
+
+##
+# Targets
+##
+
+.PHONY: configure almostclean
+
+install:: build
+ifneq ($(GnuNoInstall),YES)
+       @echo "Installing $(Project)..."
+       $(_v) umask $(Install_Mask) ; $(MAKE) -C $(BuildDirectory) $(Environment) $(Install_Flags) $(Install_Target)
+       $(_v) $(FIND) $(DSTROOT) $(Find_Cruft) | $(XARGS) $(RMDIR)
+       $(_v) $(FIND) $(SYMROOT) $(Find_Cruft) | $(XARGS) $(RMDIR)
+ifneq ($(GnuNoChown),YES)
+       $(_v)- $(CHOWN) -R $(Install_User).$(Install_Group) $(DSTROOT) $(SYMROOT)
+endif
+endif
+ifdef GnuAfterInstall
+       $(_v) $(MAKE) $(GnuAfterInstall)
+endif
+
+build:: configure
+ifneq ($(GnuNoBuild),YES)
+       @echo "Building $(Project)..."
+       $(_v) $(MAKE) -C $(BuildDirectory) $(Environment)
+endif
+
+configure:: lazy_install_source $(ConfigStamp)
+
+reconfigure::
+       $(_v) $(RM) $(ConfigStamp)
+       $(_v) $(MAKE) configure
+
+$(ConfigStamp):
+ifneq ($(GnuNoConfigure),YES)
+       @echo "Configuring $(Project)..."
+       $(_v) $(MKDIR) $(BuildDirectory)
+       $(_v) cd $(BuildDirectory) && $(Environment) $(Configure) $(Configure_Flags)
+endif
+       $(_v) touch $@
+
+almostclean::
+ifneq ($(GnuNoClean),YES)
+       @echo "Cleaning $(Project)..."
+       $(_v) $(MAKE) -C $(BuildDirectory) clean
+endif
diff --git a/ReleaseControl/README b/ReleaseControl/README
new file mode 100644 (file)
index 0000000..e761539
--- /dev/null
@@ -0,0 +1,14 @@
+Release Control Support Makefiles
+
+  These makefiles provide a framework for building third-party source
+projects in Release Control.  The original sources can be placed in
+a subdirectory of the actual project and wrapped with a simple makefile
+that builds it with the proper options.
+
+  Common.make provides basic functionality following the RC makefile
+API rules.  It implements the installsrc and clean targets and defines
+the dependancies between the all the standard targets, including build
+and install.
+
+  GNUSource.make implements the build and install targets for sources
+which use GNU autoconf's configure script to build.
diff --git a/ReleaseControl/mtree/BSD.include.dist b/ReleaseControl/mtree/BSD.include.dist
new file mode 100644 (file)
index 0000000..edb1c15
--- /dev/null
@@ -0,0 +1,90 @@
+# $FreeBSD: src/etc/mtree/BSD.include.dist,v 1.33 2000/05/19 22:07:47 peter Exp $
+#
+# Please see the file README before making changes to this file.
+#
+
+/set type=dir uname=root gname=wheel mode=0755
+.
+    arpa
+    ..
+    cam
+        scsi
+        ..
+    ..
+    dev
+        ppbus
+        ..
+        usb
+        ..
+    ..
+    g++
+        std
+        ..
+    ..
+    isofs
+        cd9660
+        ..
+    ..
+    machine
+    ..
+    msdosfs
+    ..
+    net
+    ..
+    netatalk
+    ..
+    netatm
+    ..
+    netgraph
+    ..
+    netinet
+    ..
+    netinet6
+    ..
+    netipx
+    ..
+    netkey
+    ..
+    netncp
+    ..
+    netns
+    ..
+    nfs
+    ..
+    ntfs
+    ..
+    nwfs
+    ..
+    objc
+    ..
+    openssl
+    ..
+    pccard
+    ..
+    posix4
+    ..
+    protocols
+    ..
+    readline
+    ..
+    rpc
+    ..
+    rpcsvc
+    ..
+    security
+    ..
+    ss
+    ..
+    sys
+    ..
+    ufs
+        ffs
+        ..
+        mfs
+        ..
+        ufs
+        ..
+    ..
+    vm
+    ..
+..
diff --git a/ReleaseControl/mtree/BSD.local.dist b/ReleaseControl/mtree/BSD.local.dist
new file mode 100644 (file)
index 0000000..84ba44d
--- /dev/null
@@ -0,0 +1,274 @@
+# $FreeBSD: src/etc/mtree/BSD.local.dist,v 1.55 2000/01/11 07:57:09 rgrimes Exp $
+#
+# Please see the file README before making changes to this file.
+#
+
+/set type=dir uname=root gname=wheel mode=0755
+.
+    bin
+    ..
+    etc
+        rc.d
+        ..
+    ..
+    include
+    ..
+    info
+    ..
+    lib
+        perl5
+        ..
+    ..
+    libexec
+    ..
+    man
+/set type=dir uname=man gname=wheel mode=0755
+        cat1
+        ..
+        cat2
+        ..
+        cat3
+        ..
+        cat4
+        ..
+        cat5
+        ..
+        cat6
+        ..
+        cat7
+        ..
+        cat8
+        ..
+        cat9
+        ..
+        catl
+        ..
+        catn
+        ..
+        de_DE.ISO_8859-1    uname=root
+            cat1
+            ..
+            cat2
+            ..
+            cat3
+            ..
+            cat4
+            ..
+            cat5
+            ..
+            cat6
+            ..
+            cat7
+            ..
+            cat8
+            ..
+            cat9
+            ..
+            catl
+            ..
+            catn
+            ..
+/set type=dir uname=root gname=wheel mode=0755
+            man1
+            ..
+            man2
+            ..
+            man3
+            ..
+            man4
+            ..
+            man5
+            ..
+            man6
+            ..
+            man7
+            ..
+            man8
+            ..
+            man9
+            ..
+            manl
+            ..
+            mann
+            ..
+        ..
+        ja
+/set type=dir uname=man gname=wheel mode=0755
+            cat1
+            ..
+            cat2
+            ..
+            cat3
+            ..
+            cat4
+            ..
+            cat5
+            ..
+            cat6
+            ..
+            cat7
+            ..
+            cat8
+            ..
+            cat9
+            ..
+            catl
+            ..
+            catn
+            ..
+/set type=dir uname=root gname=wheel mode=0755
+            man1
+            ..
+            man2
+            ..
+            man3
+            ..
+            man4
+            ..
+            man5
+            ..
+            man6
+            ..
+            man7
+            ..
+            man8
+            ..
+            man9
+            ..
+            manl
+            ..
+            mann
+            ..
+        ..
+        man1
+        ..
+        man2
+        ..
+        man3
+        ..
+        man4
+        ..
+        man5
+        ..
+        man6
+        ..
+        man7
+        ..
+        man8
+        ..
+        man9
+        ..
+        manl
+        ..
+        mann
+        ..
+    ..
+    sbin
+    ..
+    share
+        dict
+        ..
+        doc
+        ..
+        emacs
+            site-lisp
+            ..
+        ..
+        examples
+        ..
+        misc
+        ..
+        nls
+            C
+            ..
+            cs_CZ.ISO_8859-2
+            ..
+            da_DK.ISO_8859-1
+            ..
+            de_AT.ISO_8859-1
+            ..
+            de_CH.ISO_8859-1
+            ..
+            de_DE.ISO_8859-1
+            ..
+            en_AU.ISO_8859-1
+            ..
+            en_CA.ISO_8859-1
+            ..
+            en_GB.ISO_8859-1
+            ..
+            en_US.ISO_8859-1
+            ..
+            es_ES.ISO_8859-1
+            ..
+            fi_FI.ISO_8859-1
+            ..
+            fr_BE.ISO_8859-1
+            ..
+            fr_CA.ISO_8859-1
+            ..
+            fr_CH.ISO_8859-1
+            ..
+            fr_FR.ISO_8859-1
+            ..
+            hr_HR.ISO_8859-2
+            ..
+            hu_HU.ISO_8859-2
+            ..
+            is_IS.ISO_8859-1
+            ..
+            it_CH.ISO_8859-1
+            ..
+            it_IT.ISO_8859-1
+            ..
+            ja_JP.EUC
+            ..
+            ja_JP.SJIS
+            ..
+            ja_JP.Shift_JIS
+            ..
+            ko_KR.EUC
+            ..
+            la_LN.ASCII
+            ..
+            la_LN.DIS_8859-15
+            ..
+            la_LN.ISO_8859-1
+            ..
+            la_LN.ISO_8859-2
+            ..
+            la_LN.ISO_8859-4
+            ..
+            lt_LT.ISO_8859-4
+            ..
+            nl_BE.ISO_8859-1
+            ..
+            nl_NL.ISO_8859-1
+            ..
+            no_NO.ISO_8859-1
+            ..
+            pl_PL.ISO_8859-2
+            ..
+            pt_PT.ISO_8859-1
+            ..
+            ru_SU.CP866
+            ..
+            ru_SU.ISO_8859-5
+            ..
+            ru_SU.KOI8-R
+            ..
+            sl_SI.ISO_8859-2
+            ..
+            sv_SE.ISO_8859-1
+            ..
+            uk_UA.KOI8-U
+            ..
+            zh_CN.EUC
+            ..
+            zh_TW.Big5
+            ..
+        ..
+        skel
+        ..
+    ..
+..
diff --git a/ReleaseControl/mtree/BSD.release.dist b/ReleaseControl/mtree/BSD.release.dist
new file mode 100644 (file)
index 0000000..82bb2e4
--- /dev/null
@@ -0,0 +1,22 @@
+# $FreeBSD: src/etc/mtree/BSD.release.dist,v 1.6 1999/08/27 23:24:00 peter Exp $
+#
+# Please see the file README before making changes to this file.
+#
+
+/set type=dir uname=root gname=wheel mode=0755
+.              
+    filesys        
+    ..
+    floppies       
+    ..
+    tarballs       
+        bindist        
+        ..
+        objdist        
+        ..
+        secrdist       
+        ..
+        srcdist        
+        ..
+    ..
+..
diff --git a/ReleaseControl/mtree/BSD.root.dist b/ReleaseControl/mtree/BSD.root.dist
new file mode 100644 (file)
index 0000000..75dc4b4
--- /dev/null
@@ -0,0 +1,74 @@
+# $FreeBSD: src/etc/mtree/BSD.root.dist,v 1.45 2000/02/25 14:18:48 peter Exp $
+#
+# Please see the file README before making changes to this file.
+#
+
+/set type=dir uname=root gname=wheel mode=0755
+.
+    bin
+    ..
+    boot
+        defaults
+        ..
+    ..
+/set type=dir uname=root gname=wheel mode=0555
+    dev             mode=0755
+        fd
+        ..
+    ..
+/set type=dir uname=root gname=wheel mode=0755
+    etc
+        defaults
+        ..
+        periodic
+            daily
+            ..
+            weekly
+            ..
+            monthly
+            ..
+        ..
+       ssh
+       ..
+        ssl
+        ..
+        gnats
+        ..
+        isdn            mode=0700
+        ..
+        kerberosIV
+        ..
+        mail
+        ..
+        mtree
+        ..
+        namedb
+# leave commented out until buildworld/installworld can
+# handle new user ids
+#             s               uname=bind gname=bind mode=0750
+#             ..
+        ..
+        ppp
+        ..
+        skel
+        ..
+        uucp            uname=uucp gname=uucp mode=0770
+        ..
+    ..
+    mnt
+    ..
+    modules
+    ..
+    proc            mode=0555
+    ..
+    root
+    ..
+    sbin
+    ..
+    tmp             mode=01777
+    ..
+    usr
+    ..
+    var
+    ..
+..
diff --git a/ReleaseControl/mtree/BSD.usr.dist b/ReleaseControl/mtree/BSD.usr.dist
new file mode 100644 (file)
index 0000000..f9d9e8e
--- /dev/null
@@ -0,0 +1,878 @@
+# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.190 2000/05/29 16:32:00 ps Exp $
+#
+# Please see the file README before making changes to this file.
+#
+
+/set type=dir uname=root gname=wheel mode=0755
+.
+    bin
+    ..
+    games
+        hide            gname=games mode=0550
+        ..
+    ..
+    include
+    ..
+    lib
+        aout
+        ..
+        compat
+            aout
+            ..
+        ..
+    ..
+    libdata
+        doscmd
+        ..
+        gcc
+        ..
+        ldscripts
+        ..
+        lint
+        ..
+        msdosfs
+        ..
+        perl
+            5.00503
+                B
+                ..
+                CGI
+                ..
+                CPAN
+                ..
+                Class
+                ..
+                Data
+                ..
+                Devel
+                ..
+                ExtUtils
+                ..
+                File
+                    Spec
+                    ..
+                ..
+                Getopt
+                ..
+                I18N
+                ..
+                IPC
+                ..
+                Math
+                ..
+                Net
+                ..
+                Pod
+                ..
+                Search
+                ..
+                Sys
+                ..
+                Term
+                ..
+                Test
+                ..
+                Text
+                ..
+                Tie
+                ..
+                Time
+                ..
+                User
+                ..
+                auto
+                    Getopt
+                        Long
+                        ..
+                    ..
+                ..
+                mach
+                    B
+                    ..
+                    CORE
+                    ..
+                    Data
+                    ..
+                    IO
+                    ..
+                    IPC
+                    ..
+                    auto
+                        B
+                        ..
+                        DB_File
+                        ..
+                        Data
+                            Dumper
+                            ..
+                        ..
+                        DynaLoader
+                        ..
+                        Fcntl
+                        ..
+                        IO
+                        ..
+                        IPC
+                            SysV
+                            ..
+                        ..
+                        NDBM_File
+                        ..
+                        Opcode
+                        ..
+                        POSIX
+                        ..
+                        SDBM_File
+                        ..
+                        Socket
+                        ..
+                        attrs
+                        ..
+                        re
+                        ..
+                        sdbm
+                        ..
+                    ..
+                ..
+                pod
+                ..
+            ..
+        ..
+        stallion
+        ..
+    ..
+    libexec
+        aout
+        ..
+        elf
+        ..
+        lpr
+            ru
+            ..
+        ..
+        sendmail
+        ..
+        sm.bin
+        ..
+        uucp
+        ..
+    ..
+    local
+    ..
+    mdec
+    ..
+    obj nochange
+    ..
+    sbin
+    ..
+    share
+        calendar
+            de_DE.ISO_8859-1
+            ..
+            hr_HR.ISO_8859-2
+            ..
+            ru_RU.KOI8-R
+            ..
+        ..
+        dict
+        ..
+        doc
+            IPv6
+            ..
+            bind
+                html
+                ..
+                misc
+                ..
+            ..
+            ncurses
+            ..
+            ntp
+            ..
+            papers
+            ..
+            psd
+                05.sysman
+                ..
+                12.make
+                ..
+                13.rcs
+                ..
+                18.gprof
+                ..
+                19.curses
+                ..
+                20.ipctut
+                ..
+                21.ipc
+                ..
+                22.rpcgen
+                ..
+                23.rpc
+                ..
+                24.xdr
+                ..
+                25.xdrrfc
+                ..
+                26.rpcrfc
+                ..
+                27.nfsrfc
+                ..
+                28.cvs
+                ..
+            ..
+            smm
+                01.setup
+                ..
+                02.config
+                ..
+                03.fsck
+                ..
+                04.quotas
+                ..
+                05.fastfs
+                ..
+                06.nfs
+                ..
+                07.lpd
+                ..
+                08.sendmailop
+                ..
+                09.sendmail
+                ..
+                10.named
+                ..
+                11.timedop
+                ..
+                12.timed
+                ..
+                18.net
+                ..
+            ..
+            usd
+                04.csh
+                ..
+                07.mail
+                ..
+                10.exref
+                ..
+                11.edit
+                ..
+                12.vi
+                ..
+                13.viref
+                ..
+                18.msdiffs
+                ..
+                19.memacros
+                ..
+                20.meref
+                ..
+                30.rogue
+                ..
+                31.trek
+                ..
+            ..
+        ..
+        examples
+            FreeBSD_version
+            ..
+            IPv6
+            ..
+            atapi
+            ..
+            atm
+            ..
+            bc
+            ..
+            bootforth
+            ..
+            cvs
+                contrib
+                ..
+                examples
+                ..
+                pcl-cvs
+                ..
+            ..
+            cvsup
+            ..
+            dialog
+            ..
+            diskless
+                209.157.86.12
+                ..
+                HT.DISKLESS
+                ..
+                HT.STD
+                ..
+                archive.backplane.com
+                ..
+            ..
+            drivers
+            ..
+            etc
+                defaults
+                ..
+            ..
+            find_interface
+            ..
+            ibcs2
+            ..
+            isdn
+            ..
+            kld
+                cdev
+                    module
+                    ..
+                    test
+                    ..
+                ..
+                syscall
+                    module
+                    ..
+                    test
+                    ..
+                ..
+            ..
+            libdialog
+            ..
+            libvgl
+            ..
+            mdoc
+            ..
+            meteor
+            ..
+            netgraph
+            ..
+            nwclient
+            ..
+            perfmon
+            ..
+            portal
+            ..
+            ppi
+            ..
+            ppp
+            ..
+            printing
+            ..
+            scsi_target
+            ..
+            ses
+                getencstat
+                ..
+                sesd
+                ..
+                setencstat
+                ..
+                setobjstat
+                ..
+                srcs
+                ..
+            ..
+            slattach
+            ..
+            sliplogin
+            ..
+            startslip
+            ..
+            sunrpc
+                dir
+                ..
+                msg
+                ..
+                sort
+                ..
+            ..
+            svr4
+            ..
+            worm
+            ..
+        ..
+        games
+            atc
+            ..
+            fortune
+            ..
+            larn
+            ..
+            quiz.db
+            ..
+        ..
+        groff_font
+            devX100
+            ..
+            devX100-12
+            ..
+            devX75
+            ..
+            devX75-12
+            ..
+            devascii
+            ..
+            devdvi
+            ..
+            devhtml
+            ..
+            devkoi8-r
+            ..
+            devlatin1
+            ..
+            devlj4
+            ..
+            devps
+            ..
+        ..
+        info
+        ..
+        isdn
+        ..
+        libg++
+        ..
+        locale
+            cs_CZ.ISO_8859-2
+            ..
+            da_DK.DIS_8859-15
+            ..
+            da_DK.ISO_8859-1
+            ..
+            de_AT.DIS_8859-15
+            ..
+            de_AT.ISO_8859-1
+            ..
+            de_CH.DIS_8859-15
+            ..
+            de_CH.ISO_8859-1
+            ..
+            de_DE.DIS_8859-15
+            ..
+            de_DE.ISO_8859-1
+            ..
+            en_AU.DIS_8859-15
+            ..
+            en_AU.ISO_8859-1
+            ..
+            en_CA.DIS_8859-15
+            ..
+            en_CA.ISO_8859-1
+            ..
+            en_GB.DIS_8859-15
+            ..
+            en_GB.ISO_8859-1
+            ..
+            en_US.DIS_8859-15
+            ..
+            en_US.ISO_8859-1
+            ..
+            es_ES.DIS_8859-15
+            ..
+            es_ES.ISO_8859-1
+            ..
+            fi_FI.DIS_8859-15
+            ..
+            fi_FI.ISO_8859-1
+            ..
+            fr_BE.DIS_8859-15
+            ..
+            fr_BE.ISO_8859-1
+            ..
+            fr_CA.DIS_8859-15
+            ..
+            fr_CA.ISO_8859-1
+            ..
+            fr_CH.DIS_8859-15
+            ..
+            fr_CH.ISO_8859-1
+            ..
+            fr_FR.DIS_8859-15
+            ..
+            fr_FR.ISO_8859-1
+            ..
+            hr_HR.ISO_8859-2
+            ..
+            hu_HU.ISO_8859-2
+            ..
+            is_IS.DIS_8859-15
+            ..
+            is_IS.ISO_8859-1
+            ..
+            it_CH.DIS_8859-15
+            ..
+            it_CH.ISO_8859-1
+            ..
+            it_IT.DIS_8859-15
+            ..
+            it_IT.ISO_8859-1
+            ..
+            ja_JP.EUC
+            ..
+            ja_JP.SJIS
+            ..
+            ja_JP.Shift_JIS
+            ..
+            ko_KR.EUC
+            ..
+            la_LN.ASCII
+            ..
+            la_LN.DIS_8859-15
+            ..
+            la_LN.ISO_8859-1
+            ..
+            la_LN.ISO_8859-2
+            ..
+            la_LN.ISO_8859-4
+            ..
+            lt_LT.ISO_8859-4
+            ..
+            nl_BE.DIS_8859-15
+            ..
+            nl_BE.ISO_8859-1
+            ..
+            nl_NL.DIS_8859-15
+            ..
+            nl_NL.ISO_8859-1
+            ..
+            no_NO.DIS_8859-15
+            ..
+            no_NO.ISO_8859-1
+            ..
+            pl_PL.ISO_8859-2
+            ..
+            pt_PT.DIS_8859-15
+            ..
+            pt_PT.ISO_8859-1
+            ..
+            ru_SU.CP866
+            ..
+            ru_SU.ISO_8859-5
+            ..
+            ru_SU.KOI8-R
+            ..
+            sl_SI.ISO_8859-2
+            ..
+            sv_SE.DIS_8859-15
+            ..
+            sv_SE.ISO_8859-1
+            ..
+            uk_UA.KOI8-U
+            ..
+            zh_CN.EUC
+            ..
+            zh_TW.Big5
+            ..
+        ..
+        man
+/set type=dir uname=man gname=wheel mode=0755
+            cat1
+            ..
+            cat1aout
+            ..
+            cat2
+            ..
+            cat3
+            ..
+            cat4
+                i386
+                ..
+            ..
+            cat5
+            ..
+            cat6
+            ..
+            cat7
+            ..
+            cat8
+                i386
+                ..
+            ..
+            cat9
+                i386
+                ..
+            ..
+            catn
+            ..
+            ja              uname=root
+                cat1
+                ..
+                cat2
+                ..
+                cat3
+                ..
+                cat4
+                ..
+                cat5
+                ..
+                cat6
+                ..
+                cat7
+                ..
+                cat8
+                ..
+                cat9
+                ..
+                catn
+                ..
+/set type=dir uname=root gname=wheel mode=0755
+                man1
+                ..
+                man2
+                ..
+                man3
+                ..
+                man4
+                ..
+                man5
+                ..
+                man6
+                ..
+                man7
+                ..
+                man8
+                ..
+                man9
+                ..
+                mann
+                ..
+            ..
+            man1
+            ..
+            man1aout
+            ..
+            man2
+            ..
+            man3
+            ..
+            man4
+                i386
+                ..
+            ..
+            man5
+            ..
+            man6
+            ..
+            man7
+            ..
+            man8
+                alpha
+                ..
+                i386
+                ..
+            ..
+            man9
+                i386
+                ..
+            ..
+            mann
+            ..
+        ..
+        me
+        ..
+        misc
+            fonts
+            ..
+            pcvtfonts
+            ..
+        ..
+        mk
+        ..
+        nls
+            C
+            ..
+            cs_CZ.ISO_8859-2
+            ..
+            da_DK.DIS_8859-15
+            ..
+            da_DK.ISO_8859-1
+            ..
+            de_AT.DIS_8859-15
+            ..
+            de_AT.ISO_8859-1
+            ..
+            de_CH.DIS_8859-15
+            ..
+            de_CH.ISO_8859-1
+            ..
+            de_DE.DIS_8859-15
+            ..
+            de_DE.ISO_8859-1
+            ..
+            en_AU.DIS_8859-15
+            ..
+            en_AU.ISO_8859-1
+            ..
+            en_CA.DIS_8859-15
+            ..
+            en_CA.ISO_8859-1
+            ..
+            en_GB.DIS_8859-15
+            ..
+            en_GB.ISO_8859-1
+            ..
+            en_US.DIS_8859-15
+            ..
+            en_US.ISO_8859-1
+            ..
+            es_ES.DIS_8859-15
+            ..
+            es_ES.ISO_8859-1
+            ..
+            fi_FI.DIS_8859-15
+            ..
+            fi_FI.ISO_8859-1
+            ..
+            fr_BE.DIS_8859-15
+            ..
+            fr_BE.ISO_8859-1
+            ..
+            fr_CA.DIS_8859-15
+            ..
+            fr_CA.ISO_8859-1
+            ..
+            fr_CH.DIS_8859-15
+            ..
+            fr_CH.ISO_8859-1
+            ..
+            fr_FR.DIS_8859-15
+            ..
+            fr_FR.ISO_8859-1
+            ..
+            hr_HR.ISO_8859-2
+            ..
+            hu_HU.ISO_8859-2
+            ..
+            is_IS.DIS_8859-15
+            ..
+            is_IS.ISO_8859-1
+            ..
+            it_CH.DIS_8859-15
+            ..
+            it_CH.ISO_8859-1
+            ..
+            it_IT.DIS_8859-15
+            ..
+            it_IT.ISO_8859-1
+            ..
+            ja_JP.EUC
+            ..
+            ja_JP.SJIS
+            ..
+            ja_JP.Shift_JIS
+            ..
+            ko_KR.EUC
+            ..
+            la_LN.ASCII
+            ..
+            la_LN.DIS_8859-15
+            ..
+            la_LN.ISO_8859-1
+            ..
+            la_LN.ISO_8859-2
+            ..
+            la_LN.ISO_8859-4
+            ..
+            lt_LT.ISO_8859-4
+            ..
+            nl_BE.ISO_8859-1
+            ..
+            nl_NL.ISO_8859-1
+            ..
+            no_NO.ISO_8859-1
+            ..
+            pl_PL.ISO_8859-2
+            ..
+            pt_PT.ISO_8859-1
+            ..
+            ru_SU.CP866
+            ..
+            ru_SU.ISO_8859-5
+            ..
+            ru_SU.KOI8-R
+            ..
+            sl_SI.ISO_8859-2
+            ..
+            sv_SE.DIS_8859-15
+            ..
+            sv_SE.ISO_8859-1
+            ..
+            uk_UA.KOI8-U
+            ..
+            zh_CN.EUC
+            ..
+        ..
+        pcvt
+            Doc
+            ..
+            Etc
+            ..
+        ..
+        perl
+            man
+                cat3            uname=man
+                ..
+                man3
+                ..
+            ..
+        ..
+        skel
+        ..
+        syscons
+            fonts
+            ..
+            keymaps
+            ..
+            scrnmaps
+            ..
+        ..
+        tabset
+        ..
+        tmac
+            locale
+            ..
+            mdoc
+                locale
+                ..
+            ..
+            mm
+            ..
+        ..
+        vi
+            catalog
+            ..
+            perl
+            ..
+            tcl
+            ..
+        ..
+        zoneinfo
+            Africa
+            ..
+            America
+                Indiana
+                ..
+            ..
+            Antarctica
+            ..
+            Arctic
+            ..
+            Asia
+            ..
+            Atlantic
+            ..
+            Australia
+            ..
+            Etc
+            ..
+            Europe
+            ..
+            Indian
+            ..
+            Pacific
+            ..
+            SystemV
+            ..
+        ..
+    ..
+    src             mode=0755 nochange
+    ..
+..
diff --git a/ReleaseControl/mtree/BSD.var.dist b/ReleaseControl/mtree/BSD.var.dist
new file mode 100644 (file)
index 0000000..06dfe19
--- /dev/null
@@ -0,0 +1,92 @@
+# $FreeBSD: src/etc/mtree/BSD.var.dist,v 1.43 1999/08/27 23:24:01 peter Exp $
+#
+# Please see the file README before making changes to this file.
+#
+
+/set type=dir uname=root gname=wheel mode=0755
+.
+    account
+    ..
+/set type=dir uname=daemon gname=wheel mode=0755
+    at              uname=root
+        jobs
+        ..
+        spool
+        ..
+    ..
+    backups         uname=root mode=0750
+    ..
+    crash           uname=root mode=0750
+    ..
+/set type=dir uname=root gname=wheel mode=0700
+    cron            mode=0750
+        tabs
+        ..
+    ..
+    db              mode=0755
+        pkg         mode=0755
+        ..
+    ..
+/set type=dir uname=root gname=wheel mode=0755
+    games                gname=games mode=0775
+        hackdir          gname=games mode=0770
+            save         gname=games mode=0770
+            ..
+        ..
+        larn             gname=games mode=0775
+        ..
+        phantasia        gname=games mode=0775
+        ..
+    ..
+/set type=dir uname=root gname=wheel mode=0755
+    log
+    ..
+    mail            gname=mail mode=0775
+    ..
+    msgs            uname=daemon
+    ..
+    preserve
+    ..
+    run
+    ..
+/set type=dir uname=root gname=daemon mode=0755
+    rwho            gname=daemon mode=0775
+    ..
+    spool           gname=wheel
+        lock            uname=uucp gname=dialer mode=0775
+        ..
+        lpd
+        ..
+        mqueue
+        ..
+        opielocks       mode=0700
+        ..
+        output
+            lpd
+            ..
+        ..
+/set type=dir uname=uucp gname=uucp mode=0775
+        uucp
+            .Preserve
+            ..
+            .Sequence
+            ..
+            .Status
+            ..
+            .Temp
+            ..
+            .Xqtdir
+            ..
+        ..
+        uucppublic      mode=0777
+        ..
+    ..
+/set type=dir uname=root gname=wheel mode=01777
+    tmp
+        vi.recover
+        ..
+    ..
+/set type=dir uname=root gname=wheel mode=0755
+    yp
+    ..
+..
diff --git a/ReleaseControl/mtree/BSD.x11.dist b/ReleaseControl/mtree/BSD.x11.dist
new file mode 100644 (file)
index 0000000..e0594fd
--- /dev/null
@@ -0,0 +1,296 @@
+# $FreeBSD: src/etc/mtree/BSD.x11.dist,v 1.11 2000/04/29 11:43:18 asami Exp $
+#
+# Please see the file README before making changes to this file.
+#
+
+/set type=dir uname=root gname=wheel mode=0755
+.
+    bin
+    ..
+    etc
+        rc.d
+        ..
+    ..
+    include
+        X11
+            ICE
+            ..
+            PEX5
+            ..
+            PM
+            ..
+            SM
+            ..
+            Xaw
+            ..
+            Xmu
+            ..
+            bitmaps
+            ..
+            extensions
+            ..
+            fonts
+            ..
+            pixmaps
+            ..
+        ..
+    ..
+    info
+    ..
+    lib
+        X11
+            XF86Setup
+                pics
+                ..
+                scripts
+                ..
+                tcllib
+                ..
+            ..
+            app-defaults
+            ..
+            config
+            ..
+            doc
+            ..
+            etc
+            ..
+            fonts
+                100dpi
+                ..
+                75dpi
+                ..
+                PEX
+                ..
+                Speedo
+                ..
+                Type1
+                ..
+                cyrillic
+                ..
+                local
+                ..
+                misc
+                ..
+            ..
+            fs
+            ..
+            lbxproxy
+            ..
+            locale
+                C
+                ..
+                en_US.utf
+                ..
+                iso8859-1
+                ..
+                iso8859-2
+                ..
+                iso8859-3
+                ..
+                iso8859-4
+                ..
+                iso8859-5
+                ..
+                iso8859-6
+                ..
+                iso8859-7
+                ..
+                iso8859-8
+                ..
+                iso8859-9
+                ..
+                ja
+                ..
+                ja.JIS
+                ..
+                ja.SJIS
+                ..
+                ko
+                ..
+                koi8-r
+                ..
+                tbl_data
+                ..
+                th_TH.TACTIS
+                ..
+                zh
+                ..
+                zh_TW
+                ..
+                zh_TW.Big5
+                ..
+            ..
+            proxymngr
+            ..
+            rstart
+                commands
+                    x11r6
+                    ..
+                ..
+                contexts
+                ..
+            ..
+            twm
+            ..
+            x11perfcomp
+            ..
+            xdm
+            ..
+            xinit
+            ..
+            xkb
+                compat
+                ..
+                compiled
+                ..
+                geometry
+                    digital
+                    ..
+                    sgi
+                    ..
+                ..
+                keycodes
+                    digital
+                    ..
+                    sgi
+                    ..
+                ..
+                keymap
+                    digital
+                    ..
+                    sgi
+                    ..
+                    sun
+                    ..
+                ..
+                rules
+                ..
+                semantics
+                ..
+                symbols
+                    digital
+                    ..
+                    fujitsu
+                    ..
+                    nec
+                    ..
+                    sony
+                    ..
+                    sun
+                    ..
+                ..
+            ..
+            xserver
+            ..
+            xsm
+            ..
+        ..
+        aout
+        ..
+        modules
+        ..
+    ..
+    libexec
+    ..
+    man
+/set type=dir uname=man gname=wheel mode=0755
+        cat1
+        ..
+        cat2
+        ..
+        cat3
+        ..
+        cat4
+        ..
+        cat5
+        ..
+        cat6
+        ..
+        cat7
+        ..
+        cat8
+        ..
+        cat9
+        ..
+        catl
+        ..
+        catn
+        ..
+        ja              uname=root
+            cat1
+            ..
+            cat2
+            ..
+            cat3
+            ..
+            cat4
+            ..
+            cat5
+            ..
+            cat6
+            ..
+            cat7
+            ..
+            cat8
+            ..
+            cat9
+            ..
+            catl
+            ..
+            catn
+            ..
+/set type=dir uname=root gname=wheel mode=0755
+            man1
+            ..
+            man2
+            ..
+            man3
+            ..
+            man4
+            ..
+            man5
+            ..
+            man6
+            ..
+            man7
+            ..
+            man8
+            ..
+            man9
+            ..
+            manl
+            ..
+            mann
+            ..
+        ..
+        man1
+        ..
+        man2
+        ..
+        man3
+        ..
+        man4
+        ..
+        man5
+        ..
+        man6
+        ..
+        man7
+        ..
+        man8
+        ..
+        man9
+        ..
+        manl
+        ..
+        mann
+        ..
+    ..
+    share
+        doc
+        ..
+        examples
+        ..
+    ..
+..
diff --git a/ReleaseControl/mtree/Darwin.root.dist b/ReleaseControl/mtree/Darwin.root.dist
new file mode 100644 (file)
index 0000000..e5f99c9
--- /dev/null
@@ -0,0 +1,23 @@
+# $FreeBSD: src/etc/mtree/BSD.root.dist,v 1.45 2000/02/25 14:18:48 peter Exp $
+#
+# Please see the file README before making changes to this file.
+#
+
+/set type=dir uname=root gname=wheel mode=0755
+.
+    bin
+    ..
+/set type=dir uname=root gname=wheel mode=0755
+    private
+        etc
+        ..
+        tmp             mode=01777
+        ..
+        var
+       ..
+    ..
+    sbin
+    ..
+    usr
+    ..
+..
diff --git a/ReleaseControl/mtree/Darwin.usr.dist b/ReleaseControl/mtree/Darwin.usr.dist
new file mode 100644 (file)
index 0000000..08f5423
--- /dev/null
@@ -0,0 +1,186 @@
+# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.190 2000/05/29 16:32:00 ps Exp $
+#
+# Please see the file README before making changes to this file.
+#
+
+/set type=dir uname=root gname=wheel mode=0755
+.
+    bin
+    ..
+#   include
+#   ..
+    lib
+    ..
+    libexec
+    ..
+    local
+    ..
+    sbin
+    ..
+    share
+        calendar
+        ..
+        dict
+        ..
+        locale
+#           cs_CZ.ISO_8859-2
+#           ..
+#           da_DK.DIS_8859-15
+#           ..
+#           da_DK.ISO_8859-1
+#           ..
+#           de_AT.DIS_8859-15
+#           ..
+#           de_AT.ISO_8859-1
+#           ..
+#           de_CH.DIS_8859-15
+#           ..
+#           de_CH.ISO_8859-1
+#           ..
+#           de_DE.DIS_8859-15
+#           ..
+#           de_DE.ISO_8859-1
+#           ..
+#           en_AU.DIS_8859-15
+#           ..
+#           en_AU.ISO_8859-1
+#           ..
+#           en_CA.DIS_8859-15
+#           ..
+#           en_CA.ISO_8859-1
+#           ..
+#           en_GB.DIS_8859-15
+#           ..
+#           en_GB.ISO_8859-1
+#           ..
+#           en_US.DIS_8859-15
+#           ..
+#           en_US.ISO_8859-1
+#           ..
+#           es_ES.DIS_8859-15
+#           ..
+#           es_ES.ISO_8859-1
+#           ..
+#           fi_FI.DIS_8859-15
+#           ..
+#           fi_FI.ISO_8859-1
+#           ..
+#           fr_BE.DIS_8859-15
+#           ..
+#           fr_BE.ISO_8859-1
+#           ..
+#           fr_CA.DIS_8859-15
+#           ..
+#           fr_CA.ISO_8859-1
+#           ..
+#           fr_CH.DIS_8859-15
+#           ..
+#           fr_CH.ISO_8859-1
+#           ..
+#           fr_FR.DIS_8859-15
+#           ..
+#           fr_FR.ISO_8859-1
+#           ..
+#           hr_HR.ISO_8859-2
+#           ..
+#           hu_HU.ISO_8859-2
+#           ..
+#           is_IS.DIS_8859-15
+#           ..
+#           is_IS.ISO_8859-1
+#           ..
+#           it_CH.DIS_8859-15
+#           ..
+#           it_CH.ISO_8859-1
+#           ..
+#           it_IT.DIS_8859-15
+#           ..
+#           it_IT.ISO_8859-1
+#           ..
+#           ja_JP.EUC
+#           ..
+#           ja_JP.SJIS
+#           ..
+#           ja_JP.Shift_JIS
+#           ..
+#           ko_KR.EUC
+#           ..
+#           la_LN.ASCII
+#           ..
+#           la_LN.DIS_8859-15
+#           ..
+#           la_LN.ISO_8859-1
+#           ..
+#           la_LN.ISO_8859-2
+#           ..
+#           la_LN.ISO_8859-4
+#           ..
+#           lt_LT.ISO_8859-4
+#           ..
+#           nl_BE.DIS_8859-15
+#           ..
+#           nl_BE.ISO_8859-1
+#           ..
+#           nl_NL.DIS_8859-15
+#           ..
+#           nl_NL.ISO_8859-1
+#           ..
+#           no_NO.DIS_8859-15
+#           ..
+#           no_NO.ISO_8859-1
+#           ..
+#           pl_PL.ISO_8859-2
+#           ..
+#           pt_PT.DIS_8859-15
+#           ..
+#           pt_PT.ISO_8859-1
+#           ..
+#           ru_SU.CP866
+#           ..
+#           ru_SU.ISO_8859-5
+#           ..
+#           ru_SU.KOI8-R
+#           ..
+#           sl_SI.ISO_8859-2
+#           ..
+#           sv_SE.DIS_8859-15
+#           ..
+#           sv_SE.ISO_8859-1
+#           ..
+#           uk_UA.KOI8-U
+#           ..
+#           zh_CN.EUC
+#           ..
+#           zh_TW.Big5
+#           ..
+        ..
+        man
+            man1
+            ..
+            man2
+            ..
+            man3
+            ..
+            man4
+            ..
+            man5
+            ..
+            man6
+            ..
+            man7
+            ..
+            man8
+            ..
+            man9
+            ..
+            mann
+            ..
+        ..
+        misc
+        ..
+        mk
+        ..
+        tabset
+        ..
+    ..
+..
diff --git a/ReleaseControl/mtree/Darwin.var.dist b/ReleaseControl/mtree/Darwin.var.dist
new file mode 100644 (file)
index 0000000..12f56e8
--- /dev/null
@@ -0,0 +1,43 @@
+# $FreeBSD: src/etc/mtree/BSD.var.dist,v 1.43 1999/08/27 23:24:01 peter Exp $
+#
+# Please see the file README before making changes to this file.
+#
+
+/set type=dir uname=root gname=wheel mode=0755
+.
+/set type=dir uname=daemon gname=wheel mode=0755
+    at              uname=root
+        jobs
+        ..
+        spool
+        ..
+    ..
+    backups         uname=root mode=0750
+    ..
+/set type=dir uname=root gname=wheel mode=0700
+    cron            mode=0750
+        tabs
+        ..
+    ..
+    db              mode=0755
+    ..
+/set type=dir uname=root gname=wheel mode=0755
+    log
+    ..
+    mail            gname=mail mode=0775
+    ..
+    msgs            uname=daemon
+    ..
+    run
+    ..
+/set type=dir uname=root gname=daemon mode=0755
+    rwho            gname=daemon mode=0775
+    ..
+    spool           gname=wheel
+/set type=dir uname=root gname=wheel mode=01777
+    tmp
+    ..
+/set type=dir uname=root gname=wheel mode=0755
+    yp
+    ..
+..
diff --git a/ReleaseControl/mtree/README b/ReleaseControl/mtree/README
new file mode 100644 (file)
index 0000000..a02200e
--- /dev/null
@@ -0,0 +1,48 @@
+$FreeBSD: src/etc/mtree/README,v 1.4 2000/01/11 07:57:09 rgrimes Exp $
+
+These files are used to create empty file hierarchies for building the
+system into.  Some notes about working with them are placed here to try
+and keep them in good working order.
+
+    a)  The files use 4 space indentation, and other than in the header
+        comments, should not contain any tabs.  An indentation of 4 is
+        preferable to the standard indentation of 8 because the indentation
+        of levels in these files can become quite deep causing the line to
+        overflow 80 characters.
+
+        This also matches with the files generated when using the
+        mtree -c option, which was implemented that way for the same reason.
+
+    b)  Only directories should be listed here.
+
+    c)  The listing should be keep in filename sorted order.
+
+    d)  Sanity checking changes to these files can be done by following
+        this procedure (the sed -e is ugly, but fixing mtree -c to
+        not emit the trailing white space would be even uglier):
+
+            mkdir /tmp/MTREE
+            mtree -deU -f BSD.X.dist -p /tmp/MTREE
+            mtree -cdin -k uname,gname,mode -p /tmp/MTREE | \
+               sed -e 's/ *$//' | tail +5 >BSD.X.new
+            diff -u BSD.X.dist BSD.X.new
+            rm -r /tmp/MTREE
+
+        Note that you will get some differences about /set lines,
+        and uname= gname= on certain directory areas, mainly man page
+        sections.  This is caused by mtree not having a look ahead
+        mechanism for making better selections for these as it
+        traverses the hierarchy.
+
+        The BSD.X.new file should NOT be commited, will be missing the
+        correct header, and important keywords like ``nochange''.  Simply
+        use the diff for a sanity check to make sure things are in the
+        correct order and correctly indented.
+
+    e)  Further sanity checking of the system builds with DESTDIR=/someplace
+        are more complicated, but can often catch missing entries in these
+        files.  I tend to run this more complete sanity check shortly after
+        the target date for a new release is announced.
+
+        If you want details on it bug me about it via email to
+        rgrimes@FreeBSD.org.
diff --git a/ReleaseControl/texi2html b/ReleaseControl/texi2html
new file mode 100755 (executable)
index 0000000..cc75178
--- /dev/null
@@ -0,0 +1,2021 @@
+#!/usr/bin/perl
+'di ';
+'ig 00 ';
+#+##############################################################################
+#                                                                              #
+# File: texi2html                                                              #
+#                                                                              #
+# Description: Program to transform most Texinfo documents to HTML             #
+#                                                                              #
+#-##############################################################################
+
+# @(#)texi2html        1.51 09/10/96   Written (mainly) by Lionel Cons, Lionel.Cons@cern.ch
+
+# The man page for this program is included at the end of this file and can be
+# viewed using the command 'nroff -man texi2html'.
+# Please read the copyright at the end of the man page.
+
+#+++############################################################################
+#                                                                              #
+# Constants                                                                    #
+#                                                                              #
+#---############################################################################
+
+$DEBUG_TOC   =  1;
+$DEBUG_INDEX =  2;
+$DEBUG_BIB   =  4;
+$DEBUG_GLOSS =  8;
+$DEBUG_DEF   = 16;
+$DEBUG_HTML  = 32;
+$DEBUG_USER  = 64;
+
+$BIBRE = '\[[\w\/]+\]';                        # RE for a bibliography reference
+$FILERE = '[\/\w.+-]+';                        # RE for a file name
+$VARRE = '[^\s\{\}]+';                 # RE for a variable name
+$NODERE = '[^@{}:\'`",]+';             # RE for a node name
+$NODESRE = '[^@{}:\'`"]+';             # RE for a list of node names
+$XREFRE = '[^@{}]+';                   # RE for a xref (should use NODERE)
+
+$ERROR = "***";                                # prefix for errors and warnings
+$THISPROG = "texi2html 1.51";                  # program name and version
+$HOMEPAGE = "http://wwwcn.cern.ch/dci/texi2html/"; # program home page
+$TODAY = &pretty_date;                 # like "20 September 1993"
+$SPLITTAG = "<!-- SPLIT HERE -->\n";   # tag to know where to split
+$PROTECTTAG = "_ThisIsProtected_";     # tag to recognize protected sections
+$html2_doctype = '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0 Strict Level 2//EN">';
+
+#
+# language dependent constants
+#
+#$LDC_SEE = 'see';
+#$LDC_SECTION = 'section';
+#$LDC_IN = 'in';
+#$LDC_TOC = 'Table of Contents';
+#$LDC_GOTO = 'Go to the';
+#$LDC_FOOT = 'Footnotes';
+# TODO: @def* shortcuts
+
+#
+# pre-defined indices
+#
+%predefined_index = (
+                   'cp', 'c',
+                   'fn', 'f',
+                   'vr', 'v',
+                   'ky', 'k',
+                   'pg', 'p',
+                   'tp', 't',
+                   );
+
+#
+# valid indices
+#
+%valid_index = (
+                   'c', 1,
+                   'f', 1,
+                   'v', 1,
+                   'k', 1,
+                   'p', 1,
+                   't', 1,
+               );
+
+#
+# texinfo section names to level
+#
+%sec2level = (
+             'top', 0,
+             'chapter', 1,
+             'unnumbered', 1,
+             'majorheading', 1,
+             'chapheading', 1,
+             'appendix', 1,
+             'section', 2,
+             'unnumberedsec', 2,
+             'heading', 2,
+             'appendixsec', 2,
+             'appendixsection', 2,
+             'subsection', 3,
+             'unnumberedsubsec', 3,
+             'subheading', 3,
+             'appendixsubsec', 3,
+             'subsubsection', 4,
+             'unnumberedsubsubsec', 4,
+             'subsubheading', 4,
+             'appendixsubsubsec', 4,
+             );
+
+#
+# accent map, TeX command to ISO name
+#
+%accent_map = (
+              '"',  'uml',
+              '~',  'tilde',
+              '^',  'circ',
+              '`',  'grave',
+              '\'', 'acute',
+              );
+
+#
+# texinfo "simple things" (@foo) to HTML ones
+#
+%simple_map = (
+              # cf. makeinfo.c
+              "*", "<BR>",             # HTML+
+              " ", " ",
+              "\n", "\n",
+              "|", "",
+              # spacing commands
+              ":", "",
+              "!", "!",
+              "?", "?",
+              ".", ".",
+              );
+
+#
+# texinfo "things" (@foo{}) to HTML ones
+#
+%things_map = (
+              'TeX', 'TeX',
+              'br', '<P>',             # paragraph break
+              'bullet', '*',
+              'copyright', '(C)',
+              'dots', '...',
+              'equiv', '==',
+              'error', 'error-->',
+              'expansion', '==>',
+              'minus', '-',
+              'point', '-!-',
+              'print', '-|',
+              'result', '=>',
+              'today', $TODAY,
+              );
+
+#
+# texinfo styles (@foo{bar}) to HTML ones
+#
+%style_map = (
+             'asis', '',
+             'b', 'B',
+             'cite', 'CITE',
+             'code', 'CODE',
+             'ctrl', '&do_ctrl',       # special case
+             'dfn', 'STRONG',          # DFN tag is illegal in the standard
+             'dmn', '',                # useless
+             'emph', 'EM',
+             'file', '"TT',            # will put quotes, cf. &apply_style
+             'i', 'I',
+             'kbd', 'KBD',
+             'key', 'KBD',
+             'r', '',                  # unsupported
+             'samp', '"SAMP',          # will put quotes, cf. &apply_style
+             'sc', '&do_sc',           # special case
+             'strong', 'STRONG',
+             't', 'TT',
+             'titlefont', '',          # useless
+             'var', 'VAR',
+             'w', '',                  # unsupported
+             );
+
+#
+# texinfo format (@foo/@end foo) to HTML ones
+#
+%format_map = (
+              'display', 'PRE',
+              'example', 'PRE',
+              'format', 'PRE',
+              'lisp', 'PRE',
+              'quotation', 'BLOCKQUOTE',
+              'smallexample', 'PRE',
+              'smalllisp', 'PRE',
+              # lists
+              'itemize', 'UL',
+              'enumerate', 'OL',
+              # poorly supported
+              'flushleft', 'PRE',
+              'flushright', 'PRE',
+              );
+
+#
+# texinfo definition shortcuts to real ones
+#
+%def_map = (
+           # basic commands
+           'deffn', 0,
+           'defvr', 0,
+           'deftypefn', 0,
+           'deftypevr', 0,
+           'defcv', 0,
+           'defop', 0,
+           'deftp', 0,
+           # basic x commands
+           'deffnx', 0,
+           'defvrx', 0,
+           'deftypefnx', 0,
+           'deftypevrx', 0,
+           'defcvx', 0,
+           'defopx', 0,
+           'deftpx', 0,
+           # shortcuts
+           'defun', 'deffn Function',
+           'defmac', 'deffn Macro',
+           'defspec', 'deffn {Special Form}',
+           'defvar', 'defvr Variable',
+           'defopt', 'defvr {User Option}',
+           'deftypefun', 'deftypefn Function',
+           'deftypevar', 'deftypevr Variable',
+           'defivar', 'defcv {Instance Variable}',
+           'defmethod', 'defop Method',
+           # x shortcuts
+           'defunx', 'deffnx Function',
+           'defmacx', 'deffnx Macro',
+           'defspecx', 'deffnx {Special Form}',
+           'defvarx', 'defvrx Variable',
+           'defoptx', 'defvrx {User Option}',
+           'deftypefunx', 'deftypefnx Function',
+           'deftypevarx', 'deftypevrx Variable',
+           'defivarx', 'defcvx {Instance Variable}',
+           'defmethodx', 'defopx Method',
+           );
+
+#
+# things to skip
+#
+%to_skip = (
+           # comments
+           'c', 1,
+           'comment', 1,
+           # useless
+           'contents', 1,
+           'shortcontents', 1,
+           'summarycontents', 1,
+           'footnotestyle', 1,
+           'end ifclear', 1,
+           'end ifset', 1,
+           'titlepage', 1,
+           'end titlepage', 1,
+           # unsupported commands (formatting)
+           'afourpaper', 1,
+           'cropmarks', 1,
+           'finalout', 1,
+           'headings', 1,
+           'need', 1,
+           'page', 1,
+           'setchapternewpage', 1,
+           'everyheading', 1,
+           'everyfooting', 1,
+           'evenheading', 1,
+           'evenfooting', 1,
+           'oddheading', 1,
+           'oddfooting', 1,
+           'smallbook', 1,
+           'vskip', 1,
+           'filbreak', 1,
+           # unsupported formats
+           'cartouche', 1,
+           'end cartouche', 1,
+           'group', 1,
+           'end group', 1,
+           );
+
+#+++############################################################################
+#                                                                              #
+# Argument parsing, initialisation                                             #
+#                                                                              #
+#---############################################################################
+
+$use_bibliography = 1;
+$use_acc = 0;
+$debug = 0;
+$doctype = '';
+$check = 0;
+$expandinfo = 0;
+$use_glossary = 0;
+$invisible_mark = '';
+$use_iso = 0;
+@include_dirs = ();
+$show_menu = 0;
+$number_sections = 0;
+$split_node = 0;
+$split_chapter = 0;
+$monolithic = 0;
+$verbose = 0;
+$usage = <<EOT;
+This is $THISPROG
+To convert a Texinfo file to HMTL: $0 [options] file
+  where options can be:
+    -expandinfo    : use \@ifinfo sections, not \@iftex
+    -glossary      : handle a glossary
+    -invisible name: use 'name' as an invisible anchor
+    -I dir         : search also for files in 'dir'
+    -menu          : handle menus
+    -monolithic    : output only one file including ToC
+    -number        : number sections
+    -split_chapter : split on main sections
+    -split_node    : split on nodes
+    -usage         : print usage instructions
+    -verbose       : verbose output
+To check converted files: $0 -check [-verbose] files
+EOT
+
+while ($#ARGV >= 0 && $ARGV[0] =~ /^-/) {
+    $_ = shift(@ARGV);
+    if (/^-acc$/)            { $use_acc = 1; next; }
+    if (/^-d(ebug)?(\d+)?$/) { $debug = $2 || shift(@ARGV); next; }
+    if (/^-doctype$/)        { $doctype = shift(@ARGV); next; }
+    if (/^-c(heck)?$/)       { $check = 1; next; }
+    if (/^-e(xpandinfo)?$/)  { $expandinfo = 1; next; }
+    if (/^-g(lossary)?$/)    { $use_glossary = 1; next; }
+    if (/^-i(nvisible)?$/)   { $invisible_mark = shift(@ARGV); next; }
+    if (/^-iso$/)            { $use_iso = 1; next; }
+    if (/^-I(.+)?$/)         { push(@include_dirs, $1 || shift(@ARGV)); next; }
+    if (/^-m(enu)?$/)        { $show_menu = 1; next; }
+    if (/^-mono(lithic)?$/)  { $monolithic = 1; next; }
+    if (/^-n(umber)?$/)      { $number_sections = 1; next; }
+    if (/^-s(plit)?_?(n(ode)?|c(hapter)?)?$/) {
+       if ($2 =~ /^n/) {
+           $split_node = 1;
+       } else {
+           $split_chapter = 1;
+       }
+       next;
+    }
+    if (/^-v(erbose)?$/)     { $verbose = 1; next; }
+    die $usage;
+}
+if ($check) {
+    die $usage unless @ARGV > 0;
+    &check;
+    exit;
+}
+
+if (($split_node || $split_chapter) && $monolithic) {
+    warn "Can't use -monolithic with -split, -monolithic ignored.\n";
+    $monolithic = 0;
+}
+if ($expandinfo) {
+    $to_skip{'ifinfo'}++;
+    $to_skip{'end ifinfo'}++;
+} else {
+    $to_skip{'iftex'}++;
+    $to_skip{'end iftex'}++;
+}
+$invisible_mark = '<IMG SRC="invisible.xbm">' if $invisible_mark eq 'xbm';
+die $usage unless @ARGV == 1;
+$docu = shift(@ARGV);
+if ($docu =~ /.*\//) {
+    chop($docu_dir = $&);
+    $docu_name = $';
+} else {
+    $docu_dir = '.';
+    $docu_name = $docu;
+}
+unshift(@include_dirs, $docu_dir);
+$docu_name =~ s/\.te?x(i|info)?$//;    # basename of the document
+
+$docu_doc = "$docu_name.html";         # document's contents
+if ($monolithic) {
+    $docu_toc = $docu_foot = $docu_doc;
+} else {
+    $docu_toc  = "${docu_name}_toc.html";  # document's table of contents
+    $docu_foot = "${docu_name}_foot.html"; # document's footnotes
+}
+
+#
+# variables
+#
+%value = ();                           # hold texinfo variables
+$value{'html'} = 1;                    # predefine html (the output format)
+$value{'texi2html'} = '1.51';          # predefine texi2html (the translator)
+# _foo: internal to track @foo
+foreach ('_author', '_title', '_subtitle',
+        '_settitle', '_setfilename') {
+    $value{$_} = '';                   # prevent -w warnings
+}
+%node2sec = ();                                # node to section name
+%node2href = ();                       # node to HREF
+%bib2href = ();                                # bibliography reference to HREF
+%gloss2href = ();                      # glossary term to HREF
+@sections = ();                                # list of sections
+%tag2pro = ();                         # protected sections
+
+#
+# initial indexes
+#
+$bib_num = 0;
+$foot_num = 0;
+$gloss_num = 0;
+$idx_num = 0;
+$sec_num = 0;
+$doc_num = 0;
+$html_num = 0;
+
+#
+# can I use ISO8879 characters? (HTML+)
+#
+if ($use_iso) {
+    $things_map{'bullet'} = "&bull;";
+    $things_map{'copyright'} = "&copy;";
+    $things_map{'dots'} = "&hellip;";
+    $things_map{'equiv'} = "&equiv;";
+    $things_map{'expansion'} = "&rarr;";
+    $things_map{'point'} = "&lowast;";
+    $things_map{'result'} = "&rArr;";
+}
+
+#
+# read texi2html extensions (if any)
+#
+$extensions = 'texi2html.ext'; # extensions in working directory
+if (-f $extensions) {
+    print "# reading extensions from $extensions\n" if $verbose;
+    require($extensions);
+}
+($progdir = $0) =~ s/[^\/]+$//;
+if ($progdir && ($progdir ne './')) {
+    $extensions = "${progdir}texi2html.ext"; # extensions in texi2html directory
+    if (-f $extensions) {
+       print "# reading extensions from $extensions\n" if $verbose;
+       require($extensions);
+    }
+}
+
+print "# reading from $docu\n" if $verbose;
+
+#+++############################################################################
+#                                                                              #
+# Pass 1: read source, handle command, variable, simple substitution           #
+#                                                                              #
+#---############################################################################
+
+@lines = ();                           # whole document
+@toc_lines = ();                       # table of contents
+$toplevel = 0;                         # top level seen in hierarchy
+$curlevel = 0;                         # current level in TOC
+$node = '';                            # current node name
+$in_table = 0;                         # am I inside a table
+$table_type = '';                      # type of table ('', 'f', 'v')
+@tables = ();                          # nested table support
+$in_bibliography = 0;                  # am I inside a bibliography
+$in_glossary = 0;                      # am I inside a glossary
+$in_top = 0;                           # am I inside the top node
+$in_pre = 0;                           # am I inside a preformatted section
+$in_list = 0;                          # am I inside a list
+$in_html = 0;                          # am I inside an HTML section
+$first_line = 1;                       # is it the first line
+$dont_html = 0;                                # don't protect HTML on this line
+$split_num = 0;                                # split index
+$deferred_ref = '';                    # deferred reference for indexes
+@html_stack = ();                      # HTML elements stack
+$html_element = '';                    # current HTML element
+&html_reset;
+
+# build code for simple substitutions
+# the maps used (%simple_map and %things_map) MUST be aware of this
+# watch out for regexps, / and escaped characters!
+$subst_code = '';
+foreach (keys(%simple_map)) {
+    ($re = $_) =~ s/(\W)/\\$1/g; # protect regexp chars
+    $subst_code .= "s/\\\@$re/$simple_map{$_}/g;\n";
+}
+foreach (keys(%things_map)) {
+    $subst_code .= "s/\\\@$_\\{\\}/$things_map{$_}/g;\n";
+}
+if ($use_acc) {
+    # accentuated characters
+    foreach (keys(%accent_map)) {
+       if ($_ eq "`") {
+           $subst_code .= "s/$;3";
+       } elsif ($_ eq "'") {
+           $subst_code .= "s/$;4";
+       } else {
+           $subst_code .= "s/\\\@\\$_";
+       }
+       $subst_code .= "([aeiou])/&\${1}$accent_map{$_};/gi;\n";
+    }
+}
+eval("sub simple_substitutions { $subst_code }");
+
+&init_input;
+while ($_ = &next_line) {
+    #
+    # remove \input on the first lines only
+    #
+    if ($first_line) {
+       next if /^\\input/;
+       $first_line = 0;
+    }
+    #
+    # parse texinfo tags
+    #
+    $tag = '';
+    $end_tag = '';
+    if (/^\@end\s+(\w+)\b/) {
+       $end_tag = $1;
+    } elsif (/^\@(\w+)\b/) {
+       $tag = $1;
+    }
+    #
+    # handle @ifhtml / @end ifhtml
+    #
+    if ($in_html) {
+       if ($end_tag eq 'ifhtml') {
+           $in_html = 0;
+       } else {
+           $tag2pro{$in_html} .= $_;
+       }
+       next;
+    } elsif ($tag eq 'ifhtml') {
+       $in_html = $PROTECTTAG . ++$html_num;
+       push(@lines, $in_html);
+       next;
+    }
+    #
+    # try to skip the line
+    #
+    if ($end_tag) {
+       next if $to_skip{"end $end_tag"};
+    } elsif ($tag) {
+       next if $to_skip{$tag};
+       last if $tag eq 'bye';
+    }
+    if ($in_top) {
+       # parsing the top node
+       if ($tag eq 'node' || $tag eq 'include' || $sec2level{$tag}) {
+           # no more in top
+           $in_top = 0;
+       } else {
+           # skip it
+           next;
+       }
+    }
+    #
+    # try to remove inlined comments
+    # syntax from tex-mode.el comment-start-skip
+    #
+    s/((^|[^\@])(\@\@)*)\@c(omment)? .*/$1/;
+    # non-@ substitutions cf. texinfmt.el
+    s/``/\"/g;
+    s/''/\"/g;
+    s/([\w ])---([\w ])/$1--$2/g;
+    #
+    # analyze the tag
+    #
+    if ($tag) {
+       # skip lines
+       &skip_until($tag), next if $tag eq 'ignore';
+       if ($expandinfo) {
+           &skip_until($tag), next if $tag eq 'iftex';
+       } else {
+           &skip_until($tag), next if $tag eq 'ifinfo';
+       }
+       &skip_until($tag), next if $tag eq 'tex';
+       # handle special tables
+       if ($tag eq 'table') {
+           $table_type = '';
+       } elsif ($tag eq 'ftable') {
+           $tag = 'table';
+           $table_type = 'f';
+       } elsif ($tag eq 'vtable') {
+           $tag = 'table';
+           $table_type = 'v';
+       }
+       # special cases
+       if ($tag eq 'top' || ($tag eq 'node' && /^\@node\s+top\s*,/i)) {
+           $in_top = 1;
+           @lines = (); # ignore all lines before top (title page garbage)
+           next;
+       } elsif ($tag eq 'node') {
+           $in_top = 0;
+           warn "$ERROR Bad node line: $_" unless $_ =~ /^\@node\s$NODESRE$/o;
+           $_ = &protect_html($_); # if node contains '&' for instance
+           s/^\@node\s+//;
+           ($node) = split(/,/);
+           &normalise_node($node);
+           if ($split_node) {
+               &next_doc;
+               push(@lines, $SPLITTAG) if $split_num++;
+               push(@sections, $node);
+           }
+           next;
+       } elsif ($tag eq 'include') {
+           if (/^\@include\s+($FILERE)\s*$/o) {
+               $file = $1;
+               unless (-e $file) {
+                   foreach $dir (@include_dirs) {
+                       $file = "$dir/$1";
+                       last if -e $file;
+                   }
+               }
+               if (-e $file) {
+                   &open($file);
+                   print "# including $file\n" if $verbose;
+               } else {
+                   warn "$ERROR Can't find $file, skipping";
+               }
+           } else {
+               warn "$ERROR Bad include line: $_";
+           }
+           next;
+       } elsif ($tag eq 'ifclear') {
+           if (/^\@ifclear\s+($VARRE)\s*$/o) {
+               next unless defined($value{$1});
+               &skip_until($tag);
+           } else {
+               warn "$ERROR Bad ifclear line: $_";
+           }
+           next;
+       } elsif ($tag eq 'ifset') {
+           if (/^\@ifset\s+($VARRE)\s*$/o) {
+               next if defined($value{$1});
+               &skip_until($tag);
+           } else {
+               warn "$ERROR Bad ifset line: $_";
+           }
+           next;
+       } elsif ($tag eq 'menu') {
+           unless ($show_menu) {
+               &skip_until($tag);
+               next;
+           }
+           &html_push_if($tag);
+           push(@lines, &html_debug("\n", __LINE__));
+       } elsif ($format_map{$tag}) {
+           $in_pre = 1 if $format_map{$tag} eq 'PRE';
+           &html_push_if($format_map{$tag});
+           push(@lines, &html_debug("\n", __LINE__));
+           $in_list++ if $format_map{$tag} eq 'UL' || $format_map{$tag} eq 'OL' ;
+           push(@lines, &debug("<$format_map{$tag}>\n", __LINE__));
+           next;
+       } elsif ($tag eq 'table') {
+           if (/^\@[fv]?table\s+\@(\w+)\s*$/) {
+               $in_table = $1;
+               unshift(@tables, join($;, $table_type, $in_table));
+               push(@lines, &debug("<DL COMPACT>\n", __LINE__));
+               &html_push_if('DL');
+               push(@lines, &html_debug("\n", __LINE__));
+           } else {
+               warn "$ERROR Bad table line: $_";
+           }
+           next;
+       } elsif ($tag eq 'synindex' || $tag eq 'syncodeindex') {
+           if (/^\@$tag\s+(\w)\w\s+(\w)\w\s*$/) {
+               eval("*${1}index = *${2}index");
+           } else {
+               warn "$ERROR Bad syn*index line: $_";
+           }
+           next;
+       } elsif ($tag eq 'sp') {
+           push(@lines, &debug("<P>\n", __LINE__));
+           next;
+       } elsif ($tag eq 'setref') {
+           &protect_html; # if setref contains '&' for instance
+           if (/^\@$tag\s*{($NODERE)}\s*$/) {
+               $setref = $1;
+               $setref =~ s/\s+/ /g; # normalize
+               $setref =~ s/ $//;
+               $node2sec{$setref} = $name;
+               $node2href{$setref} = "$docu_doc#$docid";
+           } else {
+               warn "$ERROR Bad setref line: $_";
+           }
+           next;
+       } elsif ($tag eq 'defindex' || $tag eq 'defcodeindex') {
+           if (/^\@$tag\s+(\w\w)\s*$/) {
+               $valid_index{$1} = 1;
+           } else {
+               warn "$ERROR Bad defindex line: $_";
+           }
+           next;
+       } elsif (defined($def_map{$tag})) {
+           if ($def_map{$tag}) {
+               s/^\@$tag\s+//;
+               $tag = $def_map{$tag};
+               $_ = "\@$tag $_";
+               $tag =~ s/\s.*//;
+           }
+       } elsif (defined($user_sub{$tag})) {
+           s/^\@$tag\s+//;
+           $sub = $user_sub{$tag};
+           print "# user $tag = $sub, arg: $_" if $debug & $DEBUG_USER;
+           if (defined(&$sub)) {
+               chop($_);
+               &$sub($_);
+           } else {
+               warn "$ERROR Bad user sub for $tag: $sub\n";
+           }
+           next;
+       }
+       if (defined($def_map{$tag})) {
+           s/^\@$tag\s+//;
+           if ($tag =~ /x$/) {
+               # extra definition line
+               $tag = $`;
+               $is_extra = 1;
+           } else {
+               $is_extra = 0;
+           }
+           while (/\{([^\{\}]*)\}/) {
+               # this is a {} construct
+               ($before, $contents, $after) = ($`, $1, $');
+               # protect spaces
+               $contents =~ s/\s+/$;9/g;
+               # restore $_ protecting {}
+               $_ = "$before$;7$contents$;8$after";
+           }
+           @args = split(/\s+/, &protect_html($_));
+           foreach (@args) {
+               s/$;9/ /g;      # unprotect spaces
+               s/$;7/\{/g;     # ... {
+               s/$;8/\}/g;     # ... }
+           }
+           $type = shift(@args);
+           $type =~ s/^\{(.*)\}$/$1/;
+           print "# def ($tag): {$type} ", join(', ', @args), "\n"
+               if $debug & $DEBUG_DEF;
+           $type .= ':'; # it's nicer like this
+           $name = shift(@args);
+           $name =~ s/^\{(.*)\}$/$1/;
+           if ($is_extra) {
+               $_ = &debug("<DT>", __LINE__);
+           } else {
+               $_ = &debug("<DL>\n<DT>", __LINE__);
+           }
+           if ($tag eq 'deffn' || $tag eq 'defvr' || $tag eq 'deftp') {
+               $_ .= "<U>$type</U> <B>$name</B>";
+               $_ .= " <I>@args</I>" if @args;
+           } elsif ($tag eq 'deftypefn' || $tag eq 'deftypevr'
+                    || $tag eq 'defcv' || $tag eq 'defop') {
+               $ftype = $name;
+               $name = shift(@args);
+               $name =~ s/^\{(.*)\}$/$1/;
+               $_ .= "<U>$type</U> $ftype <B>$name</B>";
+               $_ .= " <I>@args</I>" if @args;
+           } else {
+               warn "$ERROR Unknown definition type: $tag\n";
+               $_ .= "<U>$type</U> <B>$name</B>";
+               $_ .= " <I>@args</I>" if @args;
+           }
+           $_ .= &debug("\n<DD>", __LINE__);
+           $name = &unprotect_html($name);
+           if ($tag eq 'deffn' || $tag eq 'deftypefn') {
+               unshift(@input_spool, "\@findex $name\n");
+           } elsif ($tag eq 'defop') {
+               unshift(@input_spool, "\@findex $name on $ftype\n");
+           } elsif ($tag eq 'defvr' || $tag eq 'deftypevr' || $tag eq 'defcv') {
+               unshift(@input_spool, "\@vindex $name\n");
+           } else {
+               unshift(@input_spool, "\@tindex $name\n");
+           }
+           $dont_html = 1;
+       }
+    } elsif ($end_tag) {
+       if ($format_map{$end_tag}) {
+           $in_pre = 0 if $format_map{$end_tag} eq 'PRE';
+           $in_list-- if $format_map{$end_tag} eq 'UL' || $format_map{$end_tag} eq 'OL' ;
+           &html_pop_if('LI', 'P');
+           &html_pop_if();
+           push(@lines, &debug("</$format_map{$end_tag}>\n", __LINE__));
+           push(@lines, &html_debug("\n", __LINE__));
+       } elsif ($end_tag eq 'table' ||
+                $end_tag eq 'ftable' ||
+                $end_tag eq 'vtable') {
+           shift(@tables);
+           if (@tables) {
+               ($table_type, $in_table) = split($;, $tables[0]);
+           } else {
+               $in_table = 0;
+           }
+           push(@lines, "</DL>\n");
+           &html_pop_if('DD');
+           &html_pop_if();
+       } elsif (defined($def_map{$end_tag})) {
+           push(@lines, &debug("</DL>\n", __LINE__));
+       } elsif ($end_tag eq 'menu') {
+           &html_pop_if();
+           push(@lines, $_); # must keep it for pass 2
+       }
+       next;
+    }
+    #
+    # misc things
+    #
+    # protect texi and HTML things
+    &protect_texi;
+    $_ = &protect_html($_) unless $dont_html;
+    $dont_html = 0;
+    # substitution (unsupported things)
+    s/^\@center\s+//g;
+    s/^\@exdent\s+//g;
+    s/\@noindent\s+//g;
+    s/\@refill\s+//g;
+    # other substitutions
+    &simple_substitutions;
+    s/\@value{($VARRE)}/$value{$1}/eg;
+    s/\@footnote\{/\@footnote$docu_doc\{/g; # mark footnotes, cf. pass 4
+    #
+    # analyze the tag again
+    #
+    if ($tag) {
+       if (defined($sec2level{$tag}) && $sec2level{$tag} > 0) {
+           if (/^\@$tag\s+(.+)$/) {
+               $name = $1;
+               $name =~ s/\s+$//;
+               $level = $sec2level{$tag};
+               $name = &update_sec_num($tag, $level) . "  $name"
+                   if $number_sections && $tag !~ /^unnumbered/;
+               if ($tag =~ /heading$/) {
+                   push(@lines, &html_debug("\n", __LINE__));
+                   if ($html_element ne 'body') {
+                       # We are in a nice pickle here. We are trying to get a H? heading
+                       # even though we are not in the body level. So, we convert it to a
+                       # nice, bold, line by itself.
+                       $_ = &debug("\n\n<P><STRONG>$name</STRONG></P>\n\n", __LINE__);
+                   } else {
+                       $_ = &debug("<H$level>$name</H$level>\n", __LINE__);
+                       &html_push_if('body');
+                   }
+                   print "# heading, section $name, level $level\n"
+                       if $debug & $DEBUG_TOC;
+               } else {
+                   if ($split_chapter) {
+                       unless ($toplevel) {
+                           # first time we see a "section"
+                           unless ($level == 1) {
+                               warn "$ERROR The first section found is not of level 1: $_";
+                               warn "$ERROR I'll split on sections of level $level...\n";
+                           }
+                           $toplevel = $level;
+                       }
+                       if ($level == $toplevel) {
+                           &next_doc;
+                           push(@lines, $SPLITTAG) if $split_num++;
+                           push(@sections, $name);
+                       }
+                   }
+                   $sec_num++;
+                   $docid = "SEC$sec_num";
+                   $tocid = "TOC$sec_num";
+                   # check biblio and glossary
+                   $in_bibliography = ($name =~ /^([A-Z]|\d+)?(\.\d+)*\s*bibliography$/i);
+                   $in_glossary = ($name =~ /^([A-Z]|\d+)?(\.\d+)*\s*glossary$/i);
+                   # check node
+                   if ($node) {
+                       if ($node2sec{$node}) {
+                           warn "$ERROR Duplicate node found: $node\n";
+                       } else {
+                           $node2sec{$node} = $name;
+                           $node2href{$node} = "$docu_doc#$docid";
+                           print "# node $node, section $name, level $level\n"
+                               if $debug & $DEBUG_TOC;
+                       }
+                       $node = '';
+                   } else {
+                       print "# no node, section $name, level $level\n"
+                           if $debug & $DEBUG_TOC;
+                   }
+                   # update TOC
+                   while ($level > $curlevel) {
+                       $curlevel++;
+                       push(@toc_lines, "<UL>\n");
+                   }
+                   while ($level < $curlevel) {
+                       $curlevel--;
+                       push(@toc_lines, "</UL>\n");
+                   }
+                   $_ = "<LI>" . &anchor($tocid, "$docu_doc#$docid", $name, 1);
+                   push(@toc_lines, &substitute_style($_));
+                   # update DOC
+                   push(@lines, &html_debug("\n", __LINE__));
+                   &html_reset;
+                   $_ =  "<H$level>".&anchor($docid, "$docu_toc#$tocid", $name)."</H$level>\n";
+                   $_ = &debug($_, __LINE__);
+                   push(@lines, &html_debug("\n", __LINE__));
+               }
+               # update DOC
+               foreach $line (split(/\n+/, $_)) {
+                   push(@lines, "$line\n");
+               }
+               next;
+           } else {
+               warn "$ERROR Bad section line: $_";
+           }
+       } else {
+           # track variables
+           $value{$1} = $2, next if /^\@set\s+($VARRE)\s+(.*)$/o;
+           delete $value{$1}, next if /^\@clear\s+($VARRE)\s*$/o;
+           # store things
+           $value{'_setfilename'}   = $1, next if /^\@setfilename\s+(.*)$/;
+           $value{'_settitle'}      = $1, next if /^\@settitle\s+(.*)$/;
+           $value{'_author'}   .= "$1\n", next if /^\@author\s+(.*)$/;
+           $value{'_subtitle'} .= "$1\n", next if /^\@subtitle\s+(.*)$/;
+           $value{'_title'}    .= "$1\n", next if /^\@title\s+(.*)$/;
+           # index
+           if (/^\@(..?)index\s+/) {
+               unless ($valid_index{$1}) {
+                   warn "$ERROR Undefined index command: $_";
+                   next;
+               }
+               $id = 'IDX' . ++$idx_num;
+               $index = $1 . 'index';
+               $what = &substitute_style($');
+               $what =~ s/\s+$//;
+               print "# found $index for '$what' id $id\n"
+                   if $debug & $DEBUG_INDEX;
+               eval(<<EOC);
+               if (defined(\$$index\{\$what\})) {
+                   \$$index\{\$what\} .= "$;$docu_doc#$id";
+               } else {
+                   \$$index\{\$what\} = "$docu_doc#$id";
+               }
+EOC
+               #
+               # dirty hack to see if I can put an invisible anchor...
+               #
+               if ($html_element eq 'P' ||
+                   $html_element eq 'LI' ||
+                   $html_element eq 'DT' ||
+                   $html_element eq 'DD' ||
+                   $html_element eq 'ADDRESS' ||
+                   $html_element eq 'B' ||
+                   $html_element eq 'BLOCKQUOTE' ||
+                   $html_element eq 'PRE' ||
+                   $html_element eq 'SAMP') {
+                    push(@lines, &anchor($id, '', $invisible_mark, !$in_pre));
+                } elsif ($html_element eq 'body') {
+                   push(@lines, &debug("<P>\n", __LINE__));
+                    push(@lines, &anchor($id, '', $invisible_mark, !$in_pre));
+                   &html_push('P');
+               } elsif ($html_element eq 'DL' ||
+                        $html_element eq 'UL' ||
+                        $html_element eq 'OL' ) {
+                   $deferred_ref .= &anchor($id, '', $invisible_mark, !$in_pre) . " ";
+               }
+               next;
+           }
+           # list item
+           if (/^\@itemx?\s+/) {
+               $what = $';
+               $what =~ s/\s+$//;
+               if ($in_bibliography && $use_bibliography) {
+                   if ($what =~ /^$BIBRE$/o) {
+                       $id = 'BIB' . ++$bib_num;
+                       $bib2href{$what} = "$docu_doc#$id";
+                       print "# found bibliography for '$what' id $id\n"
+                           if $debug & $DEBUG_BIB;
+                       $what = &anchor($id, '', $what);
+                   }
+               } elsif ($in_glossary && $use_glossary) {
+                   $id = 'GLOSS' . ++$gloss_num;
+                   $entry = $what;
+                   $entry =~ tr/A-Z/a-z/ unless $entry =~ /^[A-Z\s]+$/;
+                   $gloss2href{$entry} = "$docu_doc#$id";
+                   print "# found glossary for '$entry' id $id\n"
+                       if $debug & $DEBUG_GLOSS;
+                   $what = &anchor($id, '', $what);
+               }
+               &html_pop_if('P');
+               if ($html_element eq 'DL' || $html_element eq 'DD') {
+                   if ($things_map{$in_table} && !$what) {
+                       # special case to allow @table @bullet for instance
+                       push(@lines, &debug("<DT>$things_map{$in_table}\n", __LINE__));
+                   } else {
+                       push(@lines, &debug("<DT>\@$in_table\{$what\}\n", __LINE__));
+                   }
+                   push(@lines, "<DD>");
+                   &html_push('DD') unless $html_element eq 'DD';
+                   if ($table_type) { # add also an index
+                       unshift(@input_spool, "\@${table_type}index $what\n");
+                   }
+               } else {
+                   push(@lines, &debug("<LI>$what\n", __LINE__));
+                   &html_push('LI') unless $html_element eq 'LI';
+               }
+               push(@lines, &html_debug("\n", __LINE__));
+               if ($deferred_ref) {
+                   push(@lines, &debug("$deferred_ref\n", __LINE__));
+                   $deferred_ref = '';
+               }
+               next;
+           }
+       }
+    }
+    # paragraph separator
+    if ($_ eq "\n") {
+       next if $#lines >= 0 && $lines[$#lines] eq "\n";
+       if ($html_element eq 'P') {
+           push(@lines, "\n");
+           $_ = &debug("</P>\n", __LINE__);
+           &html_pop;
+       }
+    } elsif ($html_element eq 'body' || $html_element eq 'BLOCKQUOTE') {
+       push(@lines, "<P>\n");
+       &html_push('P');
+       $_ = &debug($_, __LINE__);
+    }
+    # otherwise
+    push(@lines, $_);
+}
+
+# finish TOC
+$level = 0;
+while ($level < $curlevel) {
+    $curlevel--;
+    push(@toc_lines, "</UL>\n");
+}
+
+print "# end of pass 1\n" if $verbose;
+
+#+++############################################################################
+#                                                                              #
+# Pass 2/3: handle style, menu, index, cross-reference                         #
+#                                                                              #
+#---############################################################################
+
+@lines2 = ();                          # whole document (2nd pass)
+@lines3 = ();                          # whole document (3rd pass)
+$in_menu = 0;                          # am I inside a menu
+
+while (@lines) {
+    $_ = shift(@lines);
+    #
+    # special case (protected sections)
+    #
+    if (/^$PROTECTTAG/o) {
+       push(@lines2, $_);
+       next;
+    }
+    #
+    # menu
+    #
+    $in_menu = 1, push(@lines2, &debug("<UL>\n", __LINE__)), next if /^\@menu\b/;
+    $in_menu = 0, push(@lines2, &debug("</UL>\n", __LINE__)), next if /^\@end\s+menu\b/;
+    if ($in_menu) {
+       if (/^\*\s+($NODERE)::/o) {
+           $descr = $';
+           chop($descr);
+           &menu_entry($1, $1, $descr);
+       } elsif (/^\*\s+(.+):\s+([^\t,\.\n]+)[\t,\.\n]/) {
+           $descr = $';
+           chop($descr);
+           &menu_entry($1, $2, $descr);
+       } elsif (/^\*/) {
+           warn "$ERROR Bad menu line: $_";
+       } else { # description continued?
+           push(@lines2, $_);
+       }
+       next;
+    }
+    #
+    # printindex
+    #
+    if (/^\@printindex\s+(\w\w)\b/) {
+       local($index, *ary, @keys, $key, $letter, $last_letter, @refs);
+       if ($predefined_index{$1}) {
+           $index = $predefined_index{$1} . 'index';
+       } else {
+           $index = $1 . 'index';
+       }
+       eval("*ary = *$index");
+       @keys = keys(%ary);
+       foreach $key (@keys) {
+           $_ = $key;
+           1 while s/<(\w+)>\`(.*)\'<\/\1>/$2/; # remove HTML tags with quotes
+           1 while s/<(\w+)>(.*)<\/\1>/$2/;     # remove HTML tags
+           $_ = &unprotect_html($_);
+           &unprotect_texi;
+           tr/A-Z/a-z/; # lowercase
+           $key2alpha{$key} = $_;
+           print "# index $key sorted as $_\n"
+               if $key ne $_ && $debug & $DEBUG_INDEX;
+       }
+       $last_letter = undef;
+       foreach $key (sort byalpha @keys) {
+           $letter = substr($key2alpha{$key}, 0, 1);
+           $letter = substr($key2alpha{$key}, 0, 2) if $letter eq $;;
+           if (!defined($last_letter) || $letter ne $last_letter) {
+               push(@lines2, "</DIR>\n") if defined($last_letter);
+               push(@lines2, "<H2>" . &protect_html($letter) . "</H2>\n");
+               push(@lines2, "<DIR>\n");
+               $last_letter = $letter;
+           }
+           @refs = ();
+           foreach (split(/$;/, $ary{$key})) {
+               push(@refs, &anchor('', $_, $key, 0));
+           }
+           push(@lines2, "<LI>" . join(", ", @refs) . "\n");
+       }
+       push(@lines2, "</DIR>\n") if defined($last_letter);
+       next;
+    }
+    #
+    # simple style substitutions
+    #
+    $_ = &substitute_style($_);
+    #
+    # xref
+    #
+    while (/\@(x|px|info|)ref{($XREFRE)(}?)/o) {
+       # note: Texinfo may accept other characters
+       ($type, $nodes, $full) = ($1, $2, $3);
+       ($before, $after) = ($`, $');
+       if (! $full && $after) {
+           warn "$ERROR Bad xref (no ending } on line): $_";
+           $_ = "$before$;0${type}ref\{$nodes$after";
+           next; # while xref
+       }
+       if ($type eq 'x') {
+           $type = 'See ';
+       } elsif ($type eq 'px') {
+           $type = 'see ';
+       } elsif ($type eq 'info') {
+           $type = 'See Info';
+       } else {
+           $type = '';
+       }
+       unless ($full) {
+           $next = shift(@lines);
+           $next = &substitute_style($next);
+           chop($nodes); # remove final newline
+           if ($next =~ /\}/) { # split on 2 lines
+               $nodes .= " $`";
+               $after = $';
+           } else {
+               $nodes .= " $next";
+               $next = shift(@lines);
+               $next = &substitute_style($next);
+               chop($nodes);
+               if ($next =~ /\}/) { # split on 3 lines
+                   $nodes .= " $`";
+                   $after = $';
+               } else {
+                   warn "$ERROR Bad xref (no ending }): $_";
+                   $_ = "$before$;0xref\{$nodes$after";
+                   unshift(@lines, $next);
+                   next; # while xref
+               }
+           }
+       }
+       $nodes =~ s/\s+/ /g; # remove useless spaces
+       @args = split(/\s*,\s*/, $nodes);
+       $node = $args[0]; # the node is always the first arg
+       &normalise_node($node);
+       $sec = $node2sec{$node};
+       if (@args == 5) { # reference to another manual
+           $sec = $args[2] || $node;
+           $man = $args[4] || $args[3];
+           $_ = "${before}${type}section `$sec' in \@cite{$man}$after";
+       } elsif ($type =~ /Info/) { # inforef
+           warn "$ERROR Wrong number of arguments: $_" unless @args == 3;
+           ($nn, $_, $in) = @args;
+           $_ = "${before}${type} file `$in', node `$nn'$after";
+       } elsif ($sec) {
+           $href = $node2href{$node};
+           $_ = "${before}${type}section " . &anchor('', $href, $sec) . $after;
+       } else {
+           warn "$ERROR Undefined node ($node): $_";
+           $_ = "$before$;0xref{$nodes}$after";
+       }
+    }
+    #
+    # try to guess bibliography references or glossary terms
+    #
+    unless (/^<H\d><A NAME=\"SEC\d/) {
+       if ($use_bibliography) {
+           $done = '';
+           while (/$BIBRE/o) {
+               ($pre, $what, $post) = ($`, $&, $');
+               $href = $bib2href{$what};
+               if (defined($href) && $post !~ /^[^<]*<\/A>/) {
+                   $done .= $pre . &anchor('', $href, $what);
+               } else {
+                   $done .= "$pre$what";
+               }
+               $_ = $post;
+           }
+           $_ = $done . $_;
+       }
+       if ($use_glossary) {
+           $done = '';
+           while (/\b\w+\b/) {
+               ($pre, $what, $post) = ($`, $&, $');
+               $entry = $what;
+               $entry =~ tr/A-Z/a-z/ unless $entry =~ /^[A-Z\s]+$/;
+               $href = $gloss2href{$entry};
+               if (defined($href) && $post !~ /^[^<]*<\/A>/) {
+                   $done .= $pre . &anchor('', $href, $what);
+               } else {
+                   $done .= "$pre$what";
+               }
+               $_ = $post;
+           }
+           $_ = $done . $_;
+       }
+    }
+    # otherwise
+    push(@lines2, $_);
+}
+print "# end of pass 2\n" if $verbose;
+
+#
+# split style substitutions
+#
+while (@lines2) {
+    $_ = shift(@lines2);
+    #
+    # special case (protected sections)
+    #
+    if (/^$PROTECTTAG/o) {
+       push(@lines3, $_);
+       next;
+    }
+    #
+    # split style substitutions
+    #
+    $old = '';
+    while ($old ne $_) {
+        $old = $_;
+       if (/\@(\w+)\{/) {
+           ($before, $style, $after) = ($`, $1, $');
+           if (defined($style_map{$style})) {
+               $_ = $after;
+               $text = '';
+               $after = '';
+               $failed = 1;
+               while (@lines2) {
+                   if (/\}/) {
+                       $text .= $`;
+                       $after = $';
+                       $failed = 0;
+                       last;
+                   } else {
+                       $text .= $_;
+                       $_ = shift(@lines2);
+                   }
+               }
+               if ($failed) {
+                   die "* Bad syntax (\@$style) after: $before\n";
+               } else {
+                   $text = &apply_style($style, $text);
+                   $_ = "$before$text$after";
+               }
+           }
+       }
+    }
+    # otherwise
+    push(@lines3, $_);
+}
+print "# end of pass 3\n" if $verbose;
+
+#+++############################################################################
+#                                                                              #
+# Pass 4: foot notes, final cleanup                                            #
+#                                                                              #
+#---############################################################################
+
+@foot_lines = ();                      # footnotes
+@doc_lines = ();                       # final document
+$end_of_para = 0;                      # true if last line is <P>
+
+while (@lines3) {
+    $_ = shift(@lines3);
+    #
+    # special case (protected sections)
+    #
+    if (/^$PROTECTTAG/o) {
+       push(@doc_lines, $_);
+       $end_of_para = 0;
+       next;
+    }
+    #
+    # footnotes
+    #
+    while (/\@footnote([^\{\s]+)\{/) {
+       ($before, $d, $after) = ($`, $1, $');
+       $_ = $after;
+       $text = '';
+       $after = '';
+       $failed = 1;
+       while (@lines3) {
+           if (/\}/) {
+               $text .= $`;
+               $after = $';
+               $failed = 0;
+               last;
+           } else {
+               $text .= $_;
+               $_ = shift(@lines3);
+           }
+       }
+       if ($failed) {
+           die "* Bad syntax (\@footnote) after: $before\n";
+       } else {
+           $foot_num++;
+           $docid  = "DOCF$foot_num";
+           $footid = "FOOT$foot_num";
+           $foot = "($foot_num)";
+           push(@foot_lines, "<H3>" . &anchor($footid, "$d#$docid", $foot) . "</H3>\n");
+           $text = "<P>$text" unless $text =~ /^\s*<P>/;
+           push(@foot_lines, "$text\n");
+           $_ = $before . &anchor($docid, "$docu_foot#$footid", $foot) . $after;
+       }
+    }
+    #
+    # remove unnecessary <P>
+    #
+    if (/^\s*<P>\s*$/) {
+       next if $end_of_para++;
+    } else {
+       $end_of_para = 0;
+    }
+    # otherwise
+    push(@doc_lines, $_);
+}
+print "# end of pass 4\n" if $verbose;
+
+#+++############################################################################
+#                                                                              #
+# Pass 5: print things                                                         #
+#                                                                              #
+#---############################################################################
+
+$header = <<EOT;
+<!-- This HTML file has been created by $THISPROG
+     from $docu on $TODAY -->
+EOT
+
+$full_title = $value{'_title'} || $value{'_settitle'} || "Untitled Document";
+$title = $value{'_settitle'} || $full_title;
+$_ = &substitute_style($full_title);
+&unprotect_texi;
+s/\n$//; # rmv last \n (if any)
+$full_title = "<H1>" . join("</H1>\n<H1>", split(/\n/, $_)) . "</H1>\n";
+
+#
+# print ToC
+#
+if (!$monolithic && @toc_lines) {
+    if (open(FILE, "> $docu_toc")) {
+       print "# creating $docu_toc...\n" if $verbose;
+       &print_toplevel_header("$title - Table of Contents");
+       &print_ruler;
+       &print(*toc_lines, FILE);
+       &print_toplevel_footer;
+       close(FILE);
+    } else {
+       warn "$ERROR Can't write to $docu_toc: $!\n";
+    }
+}
+
+#
+# print footnotes
+#
+if (!$monolithic && @foot_lines) {
+    if (open(FILE, "> $docu_foot")) {
+       print "# creating $docu_foot...\n" if $verbose;
+       &print_toplevel_header("$title - Footnotes");
+       &print_ruler;
+        &print(*foot_lines, FILE);
+       &print_toplevel_footer;
+       close(FILE);
+    } else {
+       warn "$ERROR Can't write to $docu_foot: $!\n";
+    }
+}
+
+#
+# print document
+#
+if ($split_chapter || $split_node) { # split
+    $doc_num = 0;
+    $last_num = scalar(@sections);
+    $first_doc = &doc_name(1);
+    $last_doc = &doc_name($last_num);
+    while (@sections) {
+       $section = shift(@sections);
+       &next_doc;
+       if (open(FILE, "> $docu_doc")) {
+           print "# creating $docu_doc...\n" if $verbose;
+           &print_header("$title - $section");
+           $prev_doc = ($doc_num == 1 ? undef : &doc_name($doc_num - 1));
+           $next_doc = ($doc_num == $last_num ? undef : &doc_name($doc_num + 1));
+           $navigation = "Go to the ";
+           $navigation .= ($prev_doc ? &anchor('', $first_doc, "first") : "first");
+           $navigation .= ", ";
+           $navigation .= ($prev_doc ? &anchor('', $prev_doc, "previous") : "previous");
+           $navigation .= ", ";
+           $navigation .= ($next_doc ? &anchor('', $next_doc, "next") : "next");
+           $navigation .= ", ";
+           $navigation .= ($next_doc ? &anchor('', $last_doc, "last") : "last");
+           $navigation .= " section, " . &anchor('', $docu_toc, "table of contents") . ".\n";
+           print FILE $navigation;
+           &print_ruler;
+           # find corresponding lines
+            @tmp_lines = ();
+            while (@doc_lines) {
+               $_ = shift(@doc_lines);
+               last if ($_ eq $SPLITTAG);
+               push(@tmp_lines, $_);
+           }
+            &print(*tmp_lines, FILE);
+           &print_ruler;
+           print FILE $navigation;
+           &print_footer;
+           close(FILE);
+       } else {
+           warn "$ERROR Can't write to $docu_doc: $!\n";
+       }
+    }
+} else { # not split
+    if (open(FILE, "> $docu_doc")) {
+       print "# creating $docu_doc...\n" if $verbose;
+       if ($monolithic || !@toc_lines) {
+           &print_toplevel_header($title);
+       } else {
+           &print_header($title);
+           print FILE $full_title;
+       }
+       if ($monolithic && @toc_lines) {
+           &print_ruler;
+           print FILE "<H1>Table of Contents</H1>\n";
+           &print(*toc_lines, FILE);
+       }
+       &print_ruler;
+        &print(*doc_lines, FILE);
+       if ($monolithic && @foot_lines) {
+           &print_ruler;
+           print FILE "<H1>Footnotes</H1>\n";
+           &print(*foot_lines, FILE);
+       }
+       if ($monolithic || !@toc_lines) {
+           &print_toplevel_footer;
+       } else {
+           &print_footer;
+       }
+       close(FILE);
+    } else {
+       warn "$ERROR Can't write to $docu_doc: $!\n";
+    }
+}
+
+print "# that's all folks\n" if $verbose;
+
+#+++############################################################################
+#                                                                              #
+# Low level functions                                                          #
+#                                                                              #
+#---############################################################################
+
+sub update_sec_num {
+    local($name, $level) = @_;
+
+    $level--; # here we start at 0
+    if ($name =~ /^appendix/) {
+       # appendix style
+       if (defined(@appendix_sec_num)) {
+           &incr_sec_num($level, @appendix_sec_num);
+       } else {
+           @appendix_sec_num = ('A', 0, 0, 0);
+       }
+       return(join('.', @appendix_sec_num[0..$level]));
+    } else {
+       # normal style
+       if (defined(@normal_sec_num)) {
+           &incr_sec_num($level, @normal_sec_num);
+       } else {
+           @normal_sec_num = (1, 0, 0, 0);
+       }
+       return(join('.', @normal_sec_num[0..$level]));
+    }
+}
+
+sub incr_sec_num {
+    local($level, $l);
+    $level = shift(@_);
+    $_[$level]++;
+    foreach $l ($level+1 .. 3) {
+       $_[$l] = 0;
+    }
+}
+
+sub check {
+    local($_, %seen, %context, $before, $match, $after);
+
+    while (<>) {
+       if (/\@(\*|\.|\:|\@|\{|\})/) {
+           $seen{$&}++;
+           $context{$&} .= "> $_" if $verbose;
+           $_ = "$`XX$'";
+           redo;
+       }
+       if (/\@(\w+)/) {
+           ($before, $match, $after) = ($`, $&, $');
+           if ($before =~ /\b[\w-]+$/ && $after =~ /^[\w-.]*\b/) { # e-mail address
+               $seen{'e-mail address'}++;
+               $context{'e-mail address'} .= "> $_" if $verbose;
+           } else {
+               $seen{$match}++;
+               $context{$match} .= "> $_" if $verbose;
+           }
+           $match =~ s/^\@/X/;
+           $_ = "$before$match$after";
+           redo;
+       }
+    }
+    
+    foreach (sort(keys(%seen))) {
+       if ($verbose) {
+           print "$_\n";
+           print $context{$_};
+       } else {
+           print "$_ ($seen{$_})\n";
+       }
+    }
+}
+
+sub open {
+    local($name) = @_;
+
+    ++$fh_name;
+    if (open($fh_name, $name)) {
+       unshift(@fhs, $fh_name);
+    } else {
+       warn "$ERROR Can't read file $name: $!\n";
+    }
+}
+
+sub init_input {
+    @fhs = ();                 # hold the file handles to read
+    @input_spool = ();         # spooled lines to read
+    $fh_name = 'FH000';
+    &open($docu);
+}
+
+sub next_line {
+    local($fh, $line);
+
+    if (@input_spool) {
+       $line = shift(@input_spool);
+       return($line);
+    }
+    while (@fhs) {
+       $fh = $fhs[0];
+       $line = <$fh>;
+       return($line) if $line;
+       close($fh);
+       shift(@fhs);
+    }
+    return(undef);
+}
+
+# used in pass 1, use &next_line
+sub skip_until {
+    local($tag) = @_;
+    local($_);
+
+    while ($_ = &next_line) {
+       return if /^\@end\s+$tag\s*$/;
+    }
+    die "* Failed to find '$tag' after: " . $lines[$#lines];
+}
+
+#
+# HTML stacking to have a better HTML output
+#
+
+sub html_reset {
+    @html_stack = ('html');
+    $html_element = 'body';
+}
+
+sub html_push {
+    local($what) = @_;
+    push(@html_stack, $html_element);
+    $html_element = $what;
+}
+
+sub html_push_if {
+    local($what) = @_;
+    push(@html_stack, $html_element)
+       if ($html_element && $html_element ne 'P');
+    $html_element = $what;
+}
+
+sub html_pop {
+    $html_element = pop(@html_stack);
+}
+
+sub html_pop_if {
+    local($elt);
+
+    if (@_) {
+       foreach $elt (@_) {
+           if ($elt eq $html_element) {
+               $html_element = pop(@html_stack) if @html_stack;
+               last;
+           }
+       }
+    } else {
+       $html_element = pop(@html_stack) if @html_stack;
+    }
+}
+
+sub html_debug {
+    local($what, $line) = @_;
+    return("<!-- $line @html_stack, $html_element -->$what")
+       if $debug & $DEBUG_HTML;
+    return($what);
+}
+
+# to debug the output...
+sub debug {
+    local($what, $line) = @_;
+    return("<!-- $line -->$what")
+       if $debug & $DEBUG_HTML;
+    return($what);
+}
+
+sub normalise_node {
+    $_[0] =~ s/\s+/ /g;
+    $_[0] =~ s/ $//;
+    $_[0] =~ s/^ //;
+}
+
+sub menu_entry {
+    local($entry, $node, $descr) = @_;
+    local($href);
+
+    &normalise_node($node);
+    $href = $node2href{$node};
+    if ($href) {
+       $descr =~ s/^\s+//;
+       $descr = ": $descr" if $descr;
+       push(@lines2, "<LI>" . &anchor('', $href, $entry) . "$descr\n");
+    } else {
+       warn "$ERROR Undefined node ($node): $_";
+    }
+}
+
+sub do_ctrl { "^$_[0]" }
+
+sub do_sc { "\U$_[0]\E" }
+
+sub apply_style {
+    local($texi_style, $text) = @_;
+    local($style);
+
+    $style = $style_map{$texi_style};
+    if (defined($style)) { # known style
+       if ($style =~ /^\"/) { # add quotes
+           $style = $';
+           $text = "\`$text\'";
+       }
+       if ($style =~ /^\&/) { # custom
+           $style = $';
+           $text = &$style($text);
+       } elsif ($style) { # good style
+           $text = "<$style>$text</$style>";
+       } else { # no style
+       }
+    } else { # unknown style
+       $text = undef;
+    }
+    return($text);
+}
+
+# remove Texinfo styles
+sub remove_style {
+    local($_) = @_;
+    s/\@\w+{([^\{\}]+)}/$1/g;
+    return($_);
+}
+
+sub substitute_style {
+    local($_) = @_;
+    local($changed, $done, $style, $text);
+
+    $changed = 1;
+    while ($changed) {
+       $changed = 0;
+       $done = '';
+       while (/\@(\w+){([^\{\}]+)}/) {
+           $text = &apply_style($1, $2);
+           if ($text) {
+               $_ = "$`$text$'";
+               $changed = 1;
+           } else {
+               $done .= "$`\@$1";
+               $_ = "{$2}$'";
+           }
+       }
+        $_ = $done . $_;
+    }
+    return($_);
+}
+
+sub anchor {
+    local($name, $href, $text, $newline) = @_;
+    local($result);
+
+    $result = "<A";
+    $result .= " NAME=\"$name\"" if $name;
+    $result .= " HREF=\"$href\"" if $href;
+    $result .= ">$text</A>";
+    $result .= "\n" if $newline;
+    return($result);
+}
+
+sub pretty_date {
+    local(@MoY, $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst);
+
+    @MoY = ('January', 'Febuary', 'March', 'April', 'May', 'June',
+           'July', 'August', 'September', 'October', 'November', 'December');
+    ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
+    $year += ($year < 70) ? 2000 : 1900;
+    return("$mday $MoY[$mon] $year");
+}
+
+sub doc_name {
+    local($num) = @_;
+
+    return("${docu_name}_$num.html");
+}
+
+sub next_doc {
+    $docu_doc = &doc_name(++$doc_num);
+}
+
+sub print {
+    local(*lines, $fh) = @_;
+    local($_);
+
+    while (@lines) {
+       $_ = shift(@lines);
+       if (/^$PROTECTTAG/o) {
+           $_ = $tag2pro{$_};
+       } else {
+           &unprotect_texi;
+       }
+       print $fh $_;
+    }
+}
+
+sub print_ruler {
+    print FILE "<P><HR><P>\n";
+}
+
+sub print_header {
+    local($_);
+
+    # clean the title
+    $_ = &remove_style($_[0]);
+    &unprotect_texi;
+    # print the header
+    if ($doctype eq 'html2') {
+       print FILE $html2_doctype;
+    } elsif ($doctype) {
+       print FILE $doctype;
+    }
+    print FILE <<EOT;
+<HTML>
+<HEAD>
+$header
+<TITLE>$_</TITLE>
+</HEAD>
+<BODY>
+EOT
+}
+
+sub print_toplevel_header {
+    local($_);
+
+    &print_header; # pass given arg...
+    print FILE $full_title;
+    if ($value{'_subtitle'}) {
+       $value{'_subtitle'} =~ s/\n+$//;
+       foreach (split(/\n/, $value{'_subtitle'})) {
+           $_ = &substitute_style($_);
+           &unprotect_texi;
+           print FILE "<H2>$_</H2>\n";
+       }
+    }
+    if ($value{'_author'}) {
+       $value{'_author'} =~ s/\n+$//;
+       foreach (split(/\n/, $value{'_author'})) {
+           $_ = &substitute_style($_);
+           &unprotect_texi;
+           s/[\w.-]+\@[\w.-]+/<A HREF="mailto:$&">$&<\/A>/g;
+           print FILE "<ADDRESS>$_</ADDRESS>\n";
+       }
+    }
+    print FILE "<P>\n";
+}
+
+sub print_footer {
+    print FILE <<EOT;
+</BODY>
+</HTML>
+EOT
+}
+
+sub print_toplevel_footer {
+    &print_ruler;
+    print FILE <<EOT;
+This document was generated on $TODAY using the
+<A HREF=\"$HOMEPAGE\">texi2html</A>
+translator version 1.51.</P>
+EOT
+    &print_footer;
+}
+
+sub protect_texi {
+    # protect @ { } ` '
+    s/\@\@/$;0/go;
+    s/\@\{/$;1/go;
+    s/\@\}/$;2/go;
+    s/\@\`/$;3/go;
+    s/\@\'/$;4/go;
+}
+
+sub protect_html {
+    local($what) = @_;
+    # protect & < >
+    $what =~ s/\&/\&\#38;/g;
+    $what =~ s/\</\&\#60;/g;
+    $what =~ s/\>/\&\#62;/g;
+    # but recognize some HTML things
+    $what =~ s/\&\#60;\/A\&\#62;/<\/A>/g;            # </A>
+    $what =~ s/\&\#60;A ([^\&]+)\&\#62;/<A $1>/g;     # <A [^&]+>
+    $what =~ s/\&\#60;IMG ([^\&]+)\&\#62;/<IMG $1>/g; # <IMG [^&]+>
+    return($what);
+}
+
+sub unprotect_texi {
+    s/$;0/\@/go;
+    s/$;1/\{/go;
+    s/$;2/\}/go;
+    s/$;3/\`/go;
+    s/$;4/\'/go;
+}
+
+sub unprotect_html {
+    local($what) = @_;
+    $what =~ s/\&\#38;/\&/g;
+    $what =~ s/\&\#60;/\</g;
+    $what =~ s/\&\#62;/\>/g;
+    return($what);
+}
+
+sub byalpha {
+    $key2alpha{$a} cmp $key2alpha{$b};
+}
+
+##############################################################################
+
+       # These next few lines are legal in both Perl and nroff.
+
+.00 ;                  # finish .ig
+'di                    \" finish diversion--previous line must be blank
+.nr nl 0-1             \" fake up transition to first page again
+.nr % 0                        \" start at page 1
+'; __END__ ############# From here on it's a standard manual page ############
+.TH TEXI2HTML 1 "09/10/96"
+.AT 3
+.SH NAME
+texi2html \- a Texinfo to HTML converter
+.SH SYNOPSIS
+.B texi2html [options] file
+.PP
+.B texi2html -check [-verbose] files
+.SH DESCRIPTION
+.I Texi2html
+converts the given Texinfo file to a set of HTML files. It tries to handle
+most of the Texinfo commands. It creates hypertext links for cross-references,
+footnotes...
+.PP
+It also tries to add links from a reference to its corresponding entry in the
+bibliography (if any). It may also handle a glossary (see the
+.B \-glossary
+option).
+.PP
+.I Texi2html
+creates several files depending on the contents of the Texinfo file and on
+the chosen options (see FILES).
+.PP
+The HTML files created by
+.I texi2html
+are closer to TeX than to Info, that's why
+.I texi2html
+converts @iftex sections and not @ifinfo ones by default. You can reverse
+this with the \-expandinfo option.
+.SH OPTIONS
+.TP 12
+.B \-check
+Check the given file and give the list of all things that may be Texinfo commands.
+This may be used to check the output of
+.I texi2html
+to find the Texinfo commands that have been left in the HTML file.
+.TP
+.B \-expandinfo
+Expand @ifinfo sections, not @iftex ones.
+.TP
+.B \-glossary
+Use the section named 'Glossary' to build a list of terms and put links in the HTML
+document from each term toward its definition.
+.TP
+.B \-invisible \fIname\fP
+Use \fIname\fP to create invisible destination anchors for index links. This is a workaround
+for a known bug of many WWW browsers, including xmosaic.
+.TP
+.B \-I \fIdir\fP
+Look also in \fIdir\fP to find included files.
+.TP
+.B \-menu
+Show the Texinfo menus; by default they are ignored.
+.TP
+.B \-monolithic
+Output only one file, including the table of contents and footnotes.
+.TP
+.B \-number
+Number the sections.
+.TP
+.B \-split_chapter
+Split the output into several HTML files (one per main section:
+chapter, appendix...).
+.TP
+.B \-split_node
+Split the output into several HTML files (one per node).
+.TP
+.B \-usage
+Print usage instructions, listing the current available command-line options.
+.TP
+.B \-verbose
+Give a verbose output. Can be used with the
+.B \-check
+option.
+.PP
+.SH FILES
+By default
+.I texi2html
+creates the following files (foo being the name of the Texinfo file):
+.TP 16
+.B foo_toc.html
+The table of contents.
+.TP
+.B foo.html
+The document's contents.
+.TP
+.B foo_foot.html
+The footnotes (if any).
+.PP
+When used with the
+.B \-split
+option, it creates several files (one per chapter or node), named
+.B foo_n.html
+(n being the indice of the chapter or node), instead of the single
+.B foo.html
+file.
+.PP
+When used with the
+.B \-monolithic
+option, it creates only one file:
+.B foo.html
+.SH VARIABLES
+.I texi2html
+predefines the following variables: \fBhtml\fP, \fBtexi2html\fP.
+.SH ADDITIONAL COMMANDS
+.I texi2html
+implements the following non-Texinfo commands:
+.TP 16
+.B @ifhtml
+This indicates the start of an HTML section, this section will passed through
+without any modofication.
+.TP
+.B @end ifhtml
+This indcates the end of an HTML section.
+.SH VERSION
+This is \fItexi2html\fP version 1.51, 09/10/96.
+.PP
+The latest version of \fItexi2html\fP can be found in WWW, cf. URL
+http://wwwcn.cern.ch/dci/texi2html/
+.SH AUTHOR
+The main author is Lionel Cons, CERN CN/DCI/UWS, Lionel.Cons@cern.ch.
+Many other people around the net contributed to this program.
+.SH COPYRIGHT
+This program is the intellectual property of the European
+Laboratory for Particle Physics (known as CERN). No guarantee whatsoever is
+provided by CERN. No liability whatsoever is accepted for any loss or damage
+of any kind resulting from any defect or inaccuracy in this information or
+code.
+.PP
+CERN, 1211 Geneva 23, Switzerland
+.SH "SEE ALSO"
+GNU Texinfo Documentation Format,
+HyperText Markup Language (HTML),
+World Wide Web (WWW).
+.SH BUGS
+This program does not understand all Texinfo commands (yet).
+.PP
+TeX specific commands (normally enclosed in @iftex) will be
+passed unmodified.
+.ex
diff --git a/Standard/Commands.make b/Standard/Commands.make
new file mode 100644 (file)
index 0000000..04c2181
--- /dev/null
@@ -0,0 +1,151 @@
+##
+# Standard Commands
+#
+# Wilfredo Sanchez | wsanchez@apple.com
+# Copyright (c) 1997-1999 Apple Computer, Inc.
+#
+# @APPLE_LICENSE_HEADER_START@
+# 
+# Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
+# Reserved.  This file contains Original Code and/or Modifications of
+# Original Code as defined in and that are subject to the Apple Public
+# Source License Version 1.1 (the "License").  You may not use this file
+# except in compliance with the License.  Please obtain a copy of the
+# License at http://www.apple.com/publicsource and read it before using
+# this file.
+# 
+# The Original Code and all software distributed under the License are
+# distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+# EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
+# License for the specific language governing rights and limitations
+# under the License.
+# 
+# @APPLE_LICENSE_HEADER_END@
+##
+
+##
+# Make sure that we're using sh
+##
+SHELL=/bin/sh
+
+##
+# Archiving Commands
+##
+COMPRESS   = /usr/bin/compress
+GUNZIP     = /usr/bin/gzip -d
+GZCAT      = /usr/bin/gzip -d -c
+GZIP       = /usr/bin/gzip -9
+PAX        = /bin/pax
+TAR        = /usr/bin/tar
+UNCOMPRESS = $(GUNZIP)
+ZCAT       = $(GZCAT)
+
+##
+# Compilers and Binary Tools
+##
+AR      = /usr/bin/ar
+BISON   = /usr/bin/bison
+BSDMAKE = /usr/bin/bsdmake
+CC      = /usr/bin/cc
+CPP     = /usr/bin/cpp
+CTAGS   = /usr/bin/ctags
+Cxx     = /usr/bin/cc
+CXX     = $(Cxx)
+ETAGS   = /usr/bin/etags
+FILE    = /usr/bin/file
+FLEX    = /usr/bin/flex
+GM4     = /usr/bin/gm4
+GNUMAKE = /usr/bin/gnumake
+LEX     = $(FLEX)
+LIPO    = /usr/bin/lipo
+M4      = /usr/bin/m4
+OTOOL   = /usr/bin/otool
+STRIP   = /usr/bin/strip
+YACC    = /usr/bin/yacc
+
+##
+# File Commands
+##
+CHFLAGS           = /usr/bin/chflags
+CHGRP             = /usr/bin/chgrp
+CHMOD             = /bin/chmod
+CHOWN             = /usr/sbin/chown
+CP                = /bin/cp -pfR
+DU               = /usr/bin/du
+INSTALL           = /usr/bin/install
+INSTALL_DIRECTORY = $(INSTALL) -m $(Install_Directory_Mode) -o $(Install_Directory_User) -g $(Install_Directory_Group) -d
+INSTALL_DYLIB     = $(INSTALL) -m $(Install_Program_Mode)   -o $(Install_Program_User)   -g $(Install_Program_Group)   -S "-S"
+INSTALL_FILE      = $(INSTALL) -m $(Install_File_Mode)      -o $(Install_File_User)      -g $(Install_File_Group)
+INSTALL_LIBRARY   = $(INSTALL) -m $(Install_File_Mode)      -o $(Install_File_User)      -g $(Install_File_Group)      -S "-S"
+INSTALL_PROGRAM   = $(INSTALL) -m $(Install_Program_Mode)   -o $(Install_Program_User)   -g $(Install_Program_Group)   -s
+INSTALL_SCRIPT    = $(INSTALL) -m $(Install_Program_Mode)   -o $(Install_Program_User)   -g $(Install_Program_Group)
+LN               = /bin/ln
+LS               = /bin/ls
+MKDIR             = /bin/mkdir -p -m $(Install_Directory_Mode)
+MV               = /bin/mv
+RM                = /bin/rm -f
+RMDIR             = /bin/rm -fr
+TOUCH             = /usr/bin/touch
+
+# If you're not root, you can't change file ownership
+ifneq ($(USER),root)
+INSTALL_DIRECTORY = $(INSTALL) -m $(Install_Directory_Mode) -d
+INSTALL_FILE      = $(INSTALL) -m $(Install_File_Mode)
+INSTALL_PROGRAM   = $(INSTALL) -m $(Install_Program_Mode)   -s
+endif
+
+##
+# Find Commands
+##
+FIND  = /usr/bin/find
+XARGS = /usr/bin/xargs
+
+##
+# Installer
+##
+INSTALLER = /usr/bin/installer.sh
+LSBOM     = /usr/bin/lsbom
+MKBOM     = /usr/bin/mkbom
+PACKAGE   = /usr/bin/package
+
+##
+# Miscellaneous
+##
+ARCH        = /usr/bin/arch
+FALSE       = /usr/bin/false
+PWD         = /bin/pwd
+SLEEP       = /bin/sleep
+TEST        = /bin/test
+TEXI2HTML   = /usr/bin/texi2html
+TRUE        = /usr/bin/true
+UNAME       = /usr/bin/uname
+VERS_STRING = /usr/bin/vers_string
+WHICH       = /usr/bin/which
+WHOAMI      = /usr/bin/whoami
+YES         = /usr/bin/yes
+
+##
+# Shells
+##
+SH  = /bin/sh
+CSH = /bin/csh
+
+##
+# Text Commands
+##
+AWK   = /usr/bin/gawk
+CAT   = /bin/cat
+CMP   = /usr/bin/cmp
+CUT   = /usr/bin/cut
+EGREP = /usr/bin/egrep
+FGREP = /usr/bin/fgrep
+FMT   = /usr/bin/fmt
+GREP  = /usr/bin/grep
+HEAD  = /usr/bin/head
+PERL  = /usr/bin/perl
+SED   = /usr/bin/sed
+TAIL  = /usr/bin/tail
+TEE   = /usr/bin/tee
+WC    = /usr/bin/wc
diff --git a/Standard/Implicit.make b/Standard/Implicit.make
new file mode 100644 (file)
index 0000000..db18ae5
--- /dev/null
@@ -0,0 +1,97 @@
+##
+# Implicit rules
+#
+# Wilfredo Sanchez | wsanchez@apple.com
+# Copyright (c) 1997-1999 Apple Computer, Inc.
+#
+# @APPLE_LICENSE_HEADER_START@
+# 
+# Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
+# Reserved.  This file contains Original Code and/or Modifications of
+# Original Code as defined in and that are subject to the Apple Public
+# Source License Version 1.1 (the "License").  You may not use this file
+# except in compliance with the License.  Please obtain a copy of the
+# License at http://www.apple.com/publicsource and read it before using
+# this file.
+# 
+# The Original Code and all software distributed under the License are
+# distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+# EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
+# License for the specific language governing rights and limitations
+# under the License.
+# 
+# @APPLE_LICENSE_HEADER_END@
+##
+
+##
+# Variables
+##
+
+# CC Options
+CC_Archs    = 
+CC_Debug    = -g
+ifeq ($(DEBUG),YES)
+CC_Optimize = 
+LD_Prebind  = 
+else
+CC_Optimize = -O3
+endif
+CC_Other    = -pipe
+
+# OpenStep Frameworks
+Frameworks = $(Extra_Frameworks)
+
+# C Preprocessor Options
+CPP_Defines  = $(Extra_CPP_Defines)
+CPP_Includes = $(Extra_CPP_Includes)
+
+# Linker Options
+LD_Libraries = $(Extra_LD_Libraries)
+
+# CC/CPP/LD Flags
+CPP_Flags = $(CPP_Defines)            $(CPP_Includes)          $(Extra_CPP_Flags)
+LD_Flags  = $(CC_Archs) $(Frameworks) $(LD_Libraries)          $(Extra_LD_Flags)
+CC_Flags  = $(CC_Archs) $(CC_Debug) $(CC_Optimize) $(CC_Other) $(Extra_CC_Flags)
+Cxx_Flags = $(CC_Archs) $(CC_Debug) $(CC_Optimize) $(CC_Other) $(Extra_Cxx_Flags)
+
+# This is for compatibility with standard implicit rules
+CPPFLAGS = $(CPP_Flags)
+CFLAGS   = $(CC_Flags)
+CXXFLAGS = $(Cxx_Flags)
+LDFLAGS  = $(LD_Flags)
+
+##
+# Targets
+##
+
+# C / Objective-C / C++ Source
+
+%.o: %.c
+       @echo "Compiling "$@"..."
+       $(_v) $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+$(BuildDirectory)/%.o: %.c
+       @echo "Compiling "$@"..."
+       $(_v) $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+$(CC_Excecutable): $(CC_Objects)
+       @echo "Linking "$@"..."
+       $(_v) $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
+
+%: %.o
+       @echo "Linking "$@"..."
+       $(_v) $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
+
+# Shell scripts
+
+%: %.sh
+       @echo "Copying shell script "$@"..."
+       $(_v) $(CP) $< $@
+       $(_v) $(CHMOD) ugo+x $@
+
+$(BuildDirectory)/%: %.sh
+       @echo "Copying shell script "$@"..."
+       $(_v) $(CP) $< $@
+       $(_v) $(CHMOD) ugo+x $@
diff --git a/Standard/Standard.make b/Standard/Standard.make
new file mode 100644 (file)
index 0000000..bf5e02c
--- /dev/null
@@ -0,0 +1,36 @@
+##
+# Standard Includes
+#
+# Wilfredo Sanchez | wsanchez@apple.com
+# Copyright (c) 1997-1999 Apple Computer, Inc.
+#
+# @APPLE_LICENSE_HEADER_START@
+# 
+# Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
+# Reserved.  This file contains Original Code and/or Modifications of
+# Original Code as defined in and that are subject to the Apple Public
+# Source License Version 1.1 (the "License").  You may not use this file
+# except in compliance with the License.  Please obtain a copy of the
+# License at http://www.apple.com/publicsource and read it before using
+# this file.
+# 
+# The Original Code and all software distributed under the License are
+# distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+# EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
+# License for the specific language governing rights and limitations
+# under the License.
+# 
+# @APPLE_LICENSE_HEADER_END@
+##
+
+.PHONY: default
+
+default: all
+
+include $(CoreOSMakefiles)/Standard/Commands.make
+include $(CoreOSMakefiles)/Standard/Variables.make
+include $(CoreOSMakefiles)/Standard/Implicit.make
+
+noop:
diff --git a/Standard/Variables.make b/Standard/Variables.make
new file mode 100644 (file)
index 0000000..a67d41f
--- /dev/null
@@ -0,0 +1,144 @@
+##
+# Standard Variables
+#
+# Wilfredo Sanchez | wsanchez@apple.com
+# Copyright (c) 1997-1999 Apple Computer, Inc.
+#
+# @APPLE_LICENSE_HEADER_START@
+# 
+# Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
+# Reserved.  This file contains Original Code and/or Modifications of
+# Original Code as defined in and that are subject to the Apple Public
+# Source License Version 1.1 (the "License").  You may not use this file
+# except in compliance with the License.  Please obtain a copy of the
+# License at http://www.apple.com/publicsource and read it before using
+# this file.
+# 
+# The Original Code and all software distributed under the License are
+# distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+# EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
+# License for the specific language governing rights and limitations
+# under the License.
+# 
+# @APPLE_LICENSE_HEADER_END@
+##
+
+##
+# Where to find Makefiles
+##
+ifndef CoreOSMakefiles
+CoreOSMakefiles = $(MAKEFILEPATH)/CoreOS
+else
+CoreOSMakefiles := $(shell cd $(CoreOSMakefiles) && pwd)
+endif
+
+##
+# Verbosity
+##
+ifeq ($(RC_JASPER),YES)
+VERBOSE = YES
+else
+VERBOSE = NO
+endif
+
+_v = $(subst NO,@,$(subst YES,,$(VERBOSE)))
+_q = $(subst YES,@,$(subst NO,,$(VERBOSE)))
+
+##
+# Working Directory
+##
+WD := $(shell pwd)
+
+##
+# User
+##
+USER = $(shell whoami)
+
+##
+# Host Platform
+##
+ifeq ($(wildcard $(UNAME)),)
+OSName    := unknown
+OSVersion := unknown
+else
+OSName    := $(shell $(UNAME) -s)
+OSVersion := $(shell $(UNAME) -r)
+endif
+
+##
+# Find Garbage
+##
+Cruft      = CVS RCS SCCS *~ .*~ .nfs\* .*.wmd
+Find_Cruft = '(' $(Cruft:%=-name '%' -or) -name '' ')' -print
+
+##
+# Install
+##
+Install_User            = root
+Install_File_User       = $(Install_User)
+Install_Program_User    = $(Install_User)
+Install_Directory_User  = $(Install_User)
+Install_Group           = wheel
+Install_File_Group      = $(Install_Group)
+Install_Program_Group   = $(Install_Group)
+Install_Directory_Group = $(Install_Group)
+Install_Mask            = 0022
+Install_File_Mode       = 0444
+Install_Program_Mode    = 0555
+Install_Directory_Mode  = 0755
+
+##
+# Locations
+##
+AUTOMOUNTDIR          = $(NSNETWORKDIR)/Servers
+BINDIR                = /bin
+CORESDIR              = /private/cores
+DEVDIR                = /dev
+ETCDIR                = /private/etc
+LIBDIR                = /lib
+LIBEXECDIR            = $(USRDIR)/libexec
+LOGDIR                = $(VARDIR)/log
+MANDIR                = $(SHAREDIR)/man
+MAILDIR               = $(VARDIR)/mail
+MISCDIR               = $(SHAREDIR)/misc
+NSADMINDIR            = $(NSADMINSUBDIR)
+NSADMINSUBDIR         = /Administration
+NSAPPLICATIONDIR      = $(NSAPPLICATIONSUBDIR)
+NSAPPLICATIONSUBDIR   = /Applications
+NSDEFAULTLOCATION     = $(NSSYSTEMDIR)
+NSDEMODIR             = $(NSAPPLICATIONDIR)$(NSDEMOSUBDIR)
+NSDEMOSUBDIR          = /Extras
+NSDEVELOPERAPPSDIR    = $(NSDEVELOPERDIR)$(NSAPPLICATIONSUBDIR)
+NSDEVELOPERDIR        = $(NSDEVELOPERSUBDIR)
+NSDEVELOPERSUBDIR     = /Developer
+NSDOCUMENTATIONDIR    = $(NSLOCALDIR)$(NSDOCUMENTATIONSUBDIR)
+NSDOCUMENTATIONSUBDIR = $(NSLIBRARYSUBDIR)/Documentation
+NSFRAMEWORKDIR        = $(NSDEFAULTLOCATION)$(NSFRAMEWORKSUBDIR)
+NSFRAMEWORKSUBDIR     = $(NSLIBRARYSUBDIR)/Frameworks
+NSLIBRARYDIR          = $(NSDEFAULTLOCATION)$(NSLIBRARYSUBDIR)
+NSLIBRARYSUBDIR       = /Library
+NSLOCALDIR            = 
+NSNETWORKDIR          = /Network
+NSSOURCEDIR           = $(NSDEVELOPERDIR)$(NSSOURCESUBDIR)
+NSSOURCESUBDIR        = /Source
+NSSYSTEMDIR           = /System
+RUNDIR                = $(VARDIR)/run
+SBINDIR               = /sbin
+SHAREDIR              = $(USRDIR)/share
+SPOOLDIR              = $(VARDIR)/spool
+TMPDIR                = /private/tmp
+USRBINDIR             = $(USRDIR)/bin
+USRDIR                = /usr
+USRINCLUDEDIR         = $(USRDIR)/include
+USRLIBDIR             = $(USRDIR)/lib
+USRSBINDIR            = $(USRDIR)/sbin
+VARDIR                = /private/var
+VARTMPDIR             = $(VARDIR)/tmp
+
+##
+# Targets
+##
+showvar:
+       @echo $($(VAR))
diff --git a/dpkg/control b/dpkg/control
new file mode 100644 (file)
index 0000000..e73fd70
--- /dev/null
@@ -0,0 +1,4 @@
+Package: coreosmakefiles
+Maintainer: Darwin Developers <darwin-development@public.lists.apple.com>
+Description: Core OS Makefiles
+Build-Depends: cctools, libsystem, files, zsh, gnumake, file-cmds, shell-cmds, text-cmds