diff --git a/swh/loader/cvs/rcsparse/COPYRIGHT b/swh/loader/cvs/rcsparse/COPYRIGHT new file mode 100644 index 0000000..dba13ed --- /dev/null +++ b/swh/loader/cvs/rcsparse/COPYRIGHT @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/swh/loader/cvs/rcsparse/Makefile.test b/swh/loader/cvs/rcsparse/Makefile.test new file mode 100644 index 0000000..6283549 --- /dev/null +++ b/swh/loader/cvs/rcsparse/Makefile.test @@ -0,0 +1,8 @@ +PROG= rcsparse + +NOMAN= yes +CFLAGS+= -DTESTING + +WARNS?= 6 + +.include diff --git a/swh/loader/cvs/rcsparse/README b/swh/loader/cvs/rcsparse/README new file mode 100644 index 0000000..0276f1d --- /dev/null +++ b/swh/loader/cvs/rcsparse/README @@ -0,0 +1 @@ +A fast RCS file parsing library (needed for fromcvs) diff --git a/swh/loader/cvs/rcsparse/bar,v b/swh/loader/cvs/rcsparse/bar,v new file mode 100644 index 0000000..6e3bd52 --- /dev/null +++ b/swh/loader/cvs/rcsparse/bar,v @@ -0,0 +1,264 @@ +head 2.1; +access; +symbols + newbranch:1.9.0.2 + moh3:1.3.0.6 + moh2_moh:1.3.0.4 + bleh:1.3 + oldmoh:1.2.0.2 + oldmoh2:1.2.0.2 + oldmoh3:1.2.2 + moh2:1.3.0.2 + moh:1.7.0.2; +locks; strict; +comment @# @; + + +2.1 +date 2005.01.10.18.07.17; author corecode; state Exp; +branches; +next 1.9; + +1.9 +date 2005.01.04.22.39.05; author corecode; state Exp; +branches; +next 1.8; + +1.8 +date 2004.12.09.07.15.20; author corecode; state dead; +branches; +next 1.7; + +1.7 +date 2004.12.07.12.19.05; author corecode; state Exp; +branches + 1.7.2.1; +next 1.6; + +1.6 +date 2004.12.07.12.18.52; author corecode; state Exp; +branches; +next 1.5; + +1.5 +date 2004.12.07.12.18.18; author corecode; state Exp; +branches; +next 1.4; + +1.4 +date 2004.12.05.08.22.40; author corecode; state dead; +branches; +next 1.3; + +1.3 +date 2004.11.29.15.38.30; author corecode; state Exp; +branches + 1.3.6.1; +next 1.2; + +1.2 +date 2004.11.29.15.32.30; author corecode; state Exp; +branches + 1.2.2.1; +next 1.1; + +1.1 +date 2004.11.29.15.32.11; author corecode; state Exp; +branches; +next ; + +1.2.2.1 +date 2004.11.29.15.33.48; author corecode; state Exp; +branches; +next 1.2.2.2; + +1.2.2.2 +date 2004.12.07.12.16.50; author corecode; state Exp; +branches; +next 1.2.2.3; + +1.2.2.3 +date 2004.12.07.12.17.07; author corecode; state Exp; +branches; +next ; + +1.3.6.1 +date 2004.11.29.15.42.36; author corecode; state Exp; +branches; +next 1.3.6.2; + +1.3.6.2 +date 2004.12.05.08.19.30; author corecode; state dead; +branches; +next ; + +1.7.2.1 +date 2004.12.09.07.14.43; author corecode; state Exp; +branches; +next ; + + +desc +@@ + + +2.1 +log +@new revision +@ +text +@new rev +@ + + +1.9 +log +@add bar again +@ +text +@d1 1 +a1 1 +dfsgfg +@ + + +1.8 +log +@remove bar +@ +text +@@ + + +1.7 +log +@more +@ +text +@@ + + +1.7.2.1 +log +@add header +@ +text +@a0 1 +$Header$ +@ + + +1.6 +log +@ddd +@ +text +@d1 1 +a1 1 +traffC +@ + + +1.5 +log +@gna +@ +text +@d1 1 +a1 1 +traffc +@ + + +1.4 +log +@remove bar on trunk +@ +text +@d1 1 +a1 1 +c +@ + + +1.3 +log +@b->c +@ +text +@@ + + +1.3.6.1 +log +@c->c3 +@ +text +@d1 1 +a1 1 +c3 +@ + + +1.3.6.2 +log +@remove bar on moh3 +@ +text +@@ + + +1.2 +log +@a -> b +@ +text +@d1 1 +a1 1 +b +@ + + +1.2.2.1 +log +@b->b2 on moh +@ +text +@d1 1 +a1 1 +b2 +@ + + +1.2.2.2 +log +@more traffic on moh +@ +text +@d1 1 +a1 1 +bleh +@ + + +1.2.2.3 +log +@even more +@ +text +@d1 1 +a1 1 +bleC +@ + + +1.1 +log +@add file +@ +text +@d1 1 +a1 1 +a +@ + diff --git a/swh/loader/cvs/rcsparse/extconf.rb b/swh/loader/cvs/rcsparse/extconf.rb new file mode 100644 index 0000000..3be0954 --- /dev/null +++ b/swh/loader/cvs/rcsparse/extconf.rb @@ -0,0 +1,5 @@ +require 'mkmf' + +$objs = ['rcsparse.o', 'rb-rcsparse.o'] + +create_makefile('rcsfile') diff --git a/swh/loader/cvs/rcsparse/moo,v b/swh/loader/cvs/rcsparse/moo,v new file mode 100644 index 0000000..b3b6246 --- /dev/null +++ b/swh/loader/cvs/rcsparse/moo,v @@ -0,0 +1,41 @@ +head 1.1; +access; +symbols + newbranch:1.1.0.2; +locks; strict; +comment @# @; + + +1.1 +date 2005.01.04.22.42.50; author corecode; state dead; +branches + 1.1.2.1; +next ; + +1.1.2.1 +date 2005.01.04.22.42.50; author corecode; state Exp; +branches; +next ; + + +desc +@@ + + +1.1 +log +@file moo was initially added on branch newbranch. +@ +text +@@ + + +1.1.2.1 +log +@add moo +@ +text +@a0 1 +a +@ + diff --git a/swh/loader/cvs/rcsparse/py-rcsparse.c b/swh/loader/cvs/rcsparse/py-rcsparse.c new file mode 100644 index 0000000..bddde7c --- /dev/null +++ b/swh/loader/cvs/rcsparse/py-rcsparse.c @@ -0,0 +1,786 @@ +/* + * This file is part of rcsparse. + * + * rcsparse is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * rcsparse is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with rcsparse. If not, see . + */ + +#include + +#include +#include + +#include "queue.h" + +#include "rcsparse.h" + + +static PyObject * +rcstoken2pystr(struct rcstoken *tok) +{ + if (tok == NULL) + Py_RETURN_NONE; + + return PyString_FromStringAndSize(tok->str, tok->len); +} + +static PyObject * +rcstoklist2py(struct rcstoklist *head) +{ + PyObject *list; + struct rcstoken *tok; + + list = PyList_New(0); + if (list == NULL) + return NULL; + + for (tok = SLIST_FIRST(head); tok != NULL; tok = SLIST_NEXT(tok, link)) { + PyObject *o; + + o = rcstoken2pystr(tok); + if (PyList_Append(list, o) < 0) { + Py_XDECREF(o); + Py_XDECREF(list); + return NULL; + } + Py_XDECREF(o); + } + + return list; +} + +struct pyrcsrevtree { + PyObject_HEAD + struct pyrcsfile *pyrcs; + struct rcsrevtree *tree; +}; + +static int +pyrcsrevtree_find_internal(struct pyrcsrevtree *self, PyObject *key, struct rcsrev **frev) +{ + struct rcsrev rev; + struct rcstoken tok; + Py_ssize_t l; + + if (!PyString_CheckExact(key)) + return -1; + + PyString_AsStringAndSize(key, &tok.str, &l); + if (l < 0) + return -1; + tok.len = (unsigned)l; + rev.rev = &tok; + *frev = RB_FIND(rcsrevtree, self->tree, &rev); + return *frev != NULL; +} + +static PyObject * +rcsrev2py(struct rcsrev *rev) +{ + struct tm tm; + const char *month; + + bzero(&tm, sizeof(struct tm)); + +#define readdate(str, dest, len) do { \ + const char *pos; \ + int scale; \ + for (pos = str + len - 1, scale = 1; pos >= str; pos--, scale *= 10) \ + if (*pos < '0' || *pos > '9') \ + return PyErr_Format(PyExc_RuntimeError, "Invalid date format"); \ + else \ + dest += scale * (*pos - '0'); \ + } while (0) + + if (rev->date->len == 17) { + /* 2-digit year */ + readdate(rev->date->str, tm.tm_year, 2); + month = rev->date->str + 3; + } else { + /* 4-digit year */ + readdate(rev->date->str, tm.tm_year, 4); + tm.tm_year -= 1900; + month = rev->date->str + 5; + } + + readdate(month, tm.tm_mon, 2); + tm.tm_mon--; + readdate(month + 3, tm.tm_mday, 2); + readdate(month + 6, tm.tm_hour, 2); + readdate(month + 9, tm.tm_min, 2); + readdate(month + 12, tm.tm_sec, 2); + +#undef readdate + + return Py_BuildValue("NNNNNNN", + rcstoken2pystr(rev->rev), + PyInt_FromLong(timegm(&tm)), + rcstoken2pystr(rev->author), + rcstoken2pystr(rev->state), + rcstoklist2py(&rev->branches), + rcstoken2pystr(rev->next), + rcstoken2pystr(rev->commitid)); +} + +static PyObject * +pyrcsrevtree_find(struct pyrcsrevtree *self, PyObject *key) +{ + struct rcsrev *frev; + + switch (pyrcsrevtree_find_internal(self, key, &frev)) + { + case 1: + return rcsrev2py(frev); + case 0: + PyErr_SetObject(PyExc_KeyError, key); + return NULL; + case -1: + default: + return NULL; + } +} + +static PyObject * +pyrcsrevtree_get(struct pyrcsrevtree *self, PyObject *args) +{ + PyObject *key, *def = Py_None; + struct rcsrev *frev; + + if (!PyArg_ParseTuple(args, "O|O", &key, &def)) + return NULL; + + switch (pyrcsrevtree_find_internal(self, key, &frev)) { + case 1: + return rcsrev2py(frev); + case 0: + return Py_INCREF(def), def; + case -1: + default: + return NULL; + } +} + +static int +pyrcsrevtree_contains(struct pyrcsrevtree *self, PyObject *key) +{ + struct rcsrev *rev; + + return pyrcsrevtree_find_internal(self, key, &rev); +} + +static PyObject * +pyrcsrevtree_has_key(struct pyrcsrevtree *self, PyObject *key) +{ + switch (pyrcsrevtree_contains(self, key)) { + case 1: + Py_RETURN_TRUE; + case 0: + Py_RETURN_FALSE; + case -1: + default: + return NULL; + } +} + +static PyObject * +pyrcsrevtree_items(struct pyrcsrevtree *self) +{ + PyObject *list; + struct rcsrev *rev; + + list = PyList_New(0); + if (list == NULL) + return NULL; + + for (rev = RB_MIN(rcsrevtree, self->tree); rev != NULL; rev = RB_NEXT(rcsrevtree, self->tree, rev)) { + PyObject *f, *s, *p; + + f = rcstoken2pystr(rev->rev); + s = rcsrev2py(rev); + p = PyTuple_Pack(2, f, s); + Py_XDECREF(f); + Py_XDECREF(s); + if (PyList_Append(list, p) < 0) { + Py_XDECREF(p); + Py_DECREF(list); + return NULL; + } + Py_XDECREF(p); + } + + return list; +} + +static PyObject * +pyrcsrevtree_keys(struct pyrcsrevtree *self) +{ + PyObject *list; + struct rcsrev *rev; + + list = PyList_New(0); + if (list == NULL) + return NULL; + + for (rev = RB_MIN(rcsrevtree, self->tree); rev != NULL; rev = RB_NEXT(rcsrevtree, self->tree, rev)) { + PyObject *i; + + i = rcstoken2pystr(rev->rev); + if (PyList_Append(list, i) < 0) { + Py_XDECREF(i); + Py_DECREF(list); + return NULL; + } + Py_XDECREF(i); + } + + return list; +} + +static PyObject * +pyrcsrevtree_values(struct pyrcsrevtree *self) +{ + PyObject *list; + struct rcsrev *rev; + + list = PyList_New(0); + if (list == NULL) + return NULL; + + for (rev = RB_MIN(rcsrevtree, self->tree); rev != NULL; rev = RB_NEXT(rcsrevtree, self->tree, rev)) { + PyObject *i; + + i = rcsrev2py(rev); + if (PyList_Append(list, i) < 0) { + Py_XDECREF(i); + Py_DECREF(list); + return NULL; + } + Py_XDECREF(i); + } + + return list; +} + +static void +pyrcsrevtree_dealloc(struct pyrcsrevtree *self) +{ + Py_DECREF((PyObject *)self->pyrcs); + self->ob_type->tp_free(self); +} + +static PyMappingMethods pyrcsrevtree_mapmethods = { + NULL, + (binaryfunc)pyrcsrevtree_find, + NULL +}; + +static PySequenceMethods pyrcsrevtree_seqmethods = { + .sq_contains= (objobjproc)pyrcsrevtree_contains +}; + +static PyMethodDef pyrcsrevtree_methods[] = { + {"__contains__",(PyCFunction)pyrcsrevtree_has_key, METH_O | METH_COEXIST, NULL}, + {"__getitem__", (PyCFunction)pyrcsrevtree_find, METH_O | METH_COEXIST, NULL}, + {"has_key", (PyCFunction)pyrcsrevtree_has_key, METH_O, NULL}, + {"get", (PyCFunction)pyrcsrevtree_get, METH_VARARGS, NULL}, + {"keys", (PyCFunction)pyrcsrevtree_keys, METH_NOARGS, NULL}, + {"items", (PyCFunction)pyrcsrevtree_items, METH_NOARGS, NULL}, + {"values", (PyCFunction)pyrcsrevtree_values, METH_NOARGS, NULL}, + {NULL} +}; + +static PyTypeObject pyrcsrevtree_type = { + PyObject_HEAD_INIT(&PyType_Type) + .tp_name= "rcsparse.rcsrevtree", + .tp_basicsize= sizeof(struct pyrcsrevtree), + .tp_dealloc= (destructor)pyrcsrevtree_dealloc, + .tp_as_mapping= &pyrcsrevtree_mapmethods, + .tp_as_sequence= &pyrcsrevtree_seqmethods, + .tp_flags= Py_TPFLAGS_DEFAULT, + .tp_doc= "RCS Revision Tree Map", + .tp_new= PyType_GenericNew, + .tp_methods= pyrcsrevtree_methods +}; + +static PyObject * +rcsrevtree2py(struct pyrcsfile *pyrcs, struct rcsrevtree *tree) +{ + struct pyrcsrevtree *pytree; + + if (tree == NULL) + Py_RETURN_NONE; + + pytree = PyObject_New(struct pyrcsrevtree, &pyrcsrevtree_type); + pytree->pyrcs = pyrcs; + Py_INCREF((PyObject *)pyrcs); + pytree->tree = tree; + return (PyObject *)pytree; +} + + +struct pyrcstokmap { + PyObject_HEAD + struct pyrcsfile *pyrcs; + struct rcstokmap *map; +}; + +static int +pyrcstokmap_find_internal(struct pyrcstokmap *self, PyObject *key, struct rcstokpair **fpair) +{ + struct rcstokpair pair; + struct rcstoken tok; + Py_ssize_t l; + + if (!PyString_CheckExact(key)) + return -1; + + PyString_AsStringAndSize(key, &tok.str, &l); + if (l < 0) + return -1; + tok.len = (unsigned)l; + pair.first = &tok; + *fpair = RB_FIND(rcstokmap, self->map, &pair); + return *fpair != NULL; +} + +static PyObject * +pyrcstokmap_find(struct pyrcstokmap *self, PyObject *key) +{ + struct rcstokpair *fpair; + + switch (pyrcstokmap_find_internal(self, key, &fpair)) + { + case 1: + return rcstoken2pystr(fpair->second); + case 0: + PyErr_SetObject(PyExc_KeyError, key); + return NULL; + case -1: + default: + return NULL; + } +} + +static PyObject * +pyrcstokmap_get(struct pyrcstokmap *self, PyObject *args) +{ + PyObject *key, *def = Py_None; + struct rcstokpair *fpair; + + if (!PyArg_ParseTuple(args, "O|O", &key, &def)) + return NULL; + + switch (pyrcstokmap_find_internal(self, key, &fpair)) { + case 1: + return rcstoken2pystr(fpair->second); + case 0: + return Py_INCREF(def), def; + case -1: + default: + return NULL; + } +} + +static int +pyrcstokmap_contains(struct pyrcstokmap *self, PyObject *key) +{ + struct rcstokpair *pair; + + return pyrcstokmap_find_internal(self, key, &pair); +} + +static PyObject * +pyrcstokmap_has_key(struct pyrcstokmap *self, PyObject *key) +{ + switch (pyrcstokmap_contains(self, key)) { + case 1: + Py_RETURN_TRUE; + case 0: + Py_RETURN_FALSE; + case -1: + default: + return NULL; + } +} + +static PyObject * +pyrcstokmap_items(struct pyrcstokmap *self) +{ + PyObject *list; + struct rcstokpair *pair; + + list = PyList_New(0); + if (list == NULL) + return NULL; + + for (pair = RB_MIN(rcstokmap, self->map); pair != NULL; pair = RB_NEXT(rcstokmap, self->map, pair)) { + PyObject *f, *s, *p; + + f = rcstoken2pystr(pair->first); + s = rcstoken2pystr(pair->second); + p = PyTuple_Pack(2, f, s); + Py_XDECREF(f); + Py_XDECREF(s); + if (PyList_Append(list, p) < 0) { + Py_XDECREF(p); + Py_DECREF(list); + return NULL; + } + Py_XDECREF(p); + } + + return list; +} + +static PyObject * +pyrcstokmap_keys(struct pyrcstokmap *self) +{ + PyObject *list; + struct rcstokpair *pair; + + list = PyList_New(0); + if (list == NULL) + return NULL; + + for (pair = RB_MIN(rcstokmap, self->map); pair != NULL; pair = RB_NEXT(rcstokmap, self->map, pair)) { + PyObject *i; + + i = rcstoken2pystr(pair->first); + if (PyList_Append(list, i) < 0) { + Py_XDECREF(i); + Py_DECREF(list); + return NULL; + } + Py_XDECREF(i); + } + + return list; +} + +static PyObject * +pyrcstokmap_values(struct pyrcstokmap *self) +{ + PyObject *list; + struct rcstokpair *pair; + + list = PyList_New(0); + if (list == NULL) + return NULL; + + for (pair = RB_MIN(rcstokmap, self->map); pair != NULL; pair = RB_NEXT(rcstokmap, self->map, pair)) { + PyObject *i; + + i = rcstoken2pystr(pair->second); + if (PyList_Append(list, i) < 0) { + Py_XDECREF(i); + Py_DECREF(list); + return NULL; + } + Py_XDECREF(i); + } + + return list; +} + +static void +pyrcstokmap_dealloc(struct pyrcstokmap *self) +{ + Py_DECREF((PyObject *)self->pyrcs); + self->ob_type->tp_free(self); +} + +static PyMappingMethods pyrcstokmap_mapmethods = { + NULL, + (binaryfunc)pyrcstokmap_find, + NULL +}; + +static PySequenceMethods pyrcstokmap_seqmethods = { + .sq_contains= (objobjproc)pyrcstokmap_contains +}; + +static PyMethodDef pyrcstokmap_methods[] = { + {"__contains__",(PyCFunction)pyrcstokmap_has_key, METH_O | METH_COEXIST, NULL}, + {"__getitem__", (PyCFunction)pyrcstokmap_find, METH_O | METH_COEXIST, NULL}, + {"has_key", (PyCFunction)pyrcstokmap_has_key, METH_O, NULL}, + {"get", (PyCFunction)pyrcstokmap_get, METH_VARARGS, NULL}, + {"keys", (PyCFunction)pyrcstokmap_keys, METH_NOARGS, NULL}, + {"items", (PyCFunction)pyrcstokmap_items, METH_NOARGS, NULL}, + {"values", (PyCFunction)pyrcstokmap_values, METH_NOARGS, NULL}, + {NULL} +}; + +static PyTypeObject pyrcstokmap_type = { + PyObject_HEAD_INIT(&PyType_Type) + .tp_name= "rcsparse.rcstokmap", + .tp_basicsize= sizeof(struct pyrcstokmap), + .tp_dealloc= (destructor)pyrcstokmap_dealloc, + .tp_as_mapping= &pyrcstokmap_mapmethods, + .tp_as_sequence= &pyrcstokmap_seqmethods, + .tp_flags= Py_TPFLAGS_DEFAULT, + .tp_doc= "RCS Token Map", + .tp_new= PyType_GenericNew, + .tp_methods= pyrcstokmap_methods +}; + +static PyObject * +rcstokmap2py(struct pyrcsfile *pyrcs, struct rcstokmap *map) +{ + struct pyrcstokmap *pymap; + + if (map == NULL) + Py_RETURN_NONE; + + pymap = PyObject_New(struct pyrcstokmap, &pyrcstokmap_type); + pymap->pyrcs = pyrcs; + Py_INCREF((PyObject *)pyrcs); + pymap->map = map; + return (PyObject *)pymap; +} + + +struct pyrcsfile { + PyObject_HEAD + struct rcsfile *rcs; +}; + +enum { + PYRCSADM_HEAD, + PYRCSADM_BRANCH, + PYRCSADM_SYMBOLS, + PYRCSADM_LOCKS, + PYRCSADM_COMMENT, + PYRCSADM_EXPAND, + PYRCSADM_DESC, +}; + +static PyObject * +pyrcsfile_getstr(struct pyrcsfile *self, void *closure) +{ + struct rcstoken *tok; + struct rcsadmin *adm; + + if (rcsparseadmin(self->rcs) < 0) + return PyErr_Format(PyExc_RuntimeError, "Error parsing"); + + adm = &self->rcs->admin; + + switch ((int)(uintptr_t)closure) { + case PYRCSADM_HEAD: tok = adm->head; break; + case PYRCSADM_BRANCH: tok = adm->branch; break; + case PYRCSADM_COMMENT: tok = adm->comment; break; + case PYRCSADM_EXPAND: tok = adm->expand; break; + case PYRCSADM_DESC: tok = adm->desc; break; + default: + return PyErr_Format(PyExc_RuntimeError, "Wrong closure"); + } + + return rcstoken2pystr(tok); +} + +static PyObject * +pyrcsfile_gettokmap(struct pyrcsfile *self, void *closure) +{ + struct rcstokmap *map; + struct rcsadmin *adm; + + if (rcsparseadmin(self->rcs) < 0) + return PyErr_Format(PyExc_RuntimeError, "Error parsing"); + + adm = &self->rcs->admin; + + switch ((int)(uintptr_t)closure) { + case PYRCSADM_SYMBOLS: map = &adm->symbols; break; + case PYRCSADM_LOCKS: map = &adm->locks; break; + default: + return PyErr_Format(PyExc_RuntimeError, "Wrong closure"); + } + + return rcstokmap2py(self, map); +} + +static PyObject * +pyrcsfile_getaccess(struct pyrcsfile *self, void *closure) +{ + if (rcsparseadmin(self->rcs) < 0) + return PyErr_Format(PyExc_RuntimeError, "Error parsing"); + + return rcstoklist2py(&self->rcs->admin.access); +} + +static PyObject * +pyrcsfile_getstrict(struct pyrcsfile *self, void *closure) +{ + if (rcsparseadmin(self->rcs) < 0) + return PyErr_Format(PyExc_RuntimeError, "Error parsing"); + + if (self->rcs->admin.strict) + Py_RETURN_TRUE; + else + Py_RETURN_FALSE; +} + +static PyObject * +pyrcsfile_checkout(struct pyrcsfile *self, PyObject *args) +{ + PyObject *o; + const char *rev = "HEAD"; + char *buf; + size_t len; + + if (!PyArg_ParseTuple(args, "|s", &rev)) + return NULL; + + buf = rcscheckout(self->rcs, rev, &len); + if (buf == NULL) + return PyErr_Format(PyExc_RuntimeError, "Error parsing"); + + o = PyString_FromStringAndSize(buf, len); + free(buf); + return o; +} + +static PyObject * +pyrcsfile_getlog(struct pyrcsfile *self, PyObject *args) +{ + PyObject *o; + const char *rev; + char *buf; + + if (!PyArg_ParseTuple(args, "s", &rev)) + return NULL; + + buf = rcsgetlog(self->rcs, rev); + if (buf == NULL) + return PyErr_Format(PyExc_RuntimeError, "Error parsing"); + + o = PyString_FromString(buf); + free(buf); + return o; +} + +static PyObject * +pyrcsfile_sym2rev(struct pyrcsfile *self, PyObject *args) +{ + PyObject *o; + const char *rev = "HEAD"; + char *buf; + + if (!PyArg_ParseTuple(args, "|s", &rev)) + return NULL; + + buf = rcsrevfromsym(self->rcs, rev); + if (buf == NULL) + return PyErr_Format(PyExc_RuntimeError, "Error parsing"); + + o = PyString_FromString(buf); + free(buf); + return o; +} + +static PyObject * +pyrcsfile_getrevs(struct pyrcsfile *self, void *closure) +{ + if (rcsparsetree(self->rcs) < 0) + return PyErr_Format(PyExc_RuntimeError, "Error parsing"); + + return rcsrevtree2py(self, &self->rcs->admin.revs); +} + +static int +pyrcsfile_init(struct pyrcsfile *pyrcs, PyObject *args) +{ + const char *filename; + + if (!PyArg_ParseTuple(args, "s", &filename)) + return -1; + + pyrcs->rcs = rcsopen(filename); + if (pyrcs->rcs == NULL) { + PyErr_SetFromErrnoWithFilename(PyExc_IOError, (char *)(long)filename); + return -1; + } + + return 0; +} + +static void +pyrcsfile_dealloc(struct pyrcsfile *self) +{ + if (self->rcs != NULL) + rcsclose(self->rcs); + + self->ob_type->tp_free(self); +} + +static PyGetSetDef pyrcsfile_getseters[] = { + {"head", (getter)pyrcsfile_getstr, NULL, "rcsfile head data", (void *)PYRCSADM_HEAD}, + {"branch", (getter)pyrcsfile_getstr, NULL, "rcsfile branch data", (void *)PYRCSADM_BRANCH}, + {"access", (getter)pyrcsfile_getaccess, NULL, "rcsfile access data", NULL}, + {"symbols", (getter)pyrcsfile_gettokmap, NULL, "rcsfile symbols data", (void *)PYRCSADM_SYMBOLS}, + {"locks", (getter)pyrcsfile_gettokmap, NULL, "rcsfile locks data", (void *)PYRCSADM_LOCKS}, + {"strict", (getter)pyrcsfile_getstrict, NULL, "rcsfile strict data", NULL}, + {"comment", (getter)pyrcsfile_getstr, NULL, "rcsfile comment data", (void *)PYRCSADM_COMMENT}, + {"expand", (getter)pyrcsfile_getstr, NULL, "rcsfile expand data", (void *)PYRCSADM_EXPAND}, + {"revs", (getter)pyrcsfile_getrevs, NULL, "rcsfile revs data", NULL}, + {"desc", (getter)pyrcsfile_getstr, NULL, "rcsfile desc data", (void *)PYRCSADM_DESC}, + {NULL} +}; + +static PyMethodDef pyrcsfile_methods[] = { + {"checkout", (PyCFunction)pyrcsfile_checkout, METH_VARARGS, NULL}, + {"getlog", (PyCFunction)pyrcsfile_getlog, METH_VARARGS, NULL}, + {"sym2rev", (PyCFunction)pyrcsfile_sym2rev, METH_VARARGS, NULL}, + {NULL} +}; + +static PyTypeObject pyrcsfile_type = { + PyObject_HEAD_INIT(&PyType_Type) + .tp_name= "rcsparse.rcsfile", + .tp_basicsize= sizeof(struct pyrcsfile), + .tp_dealloc= (destructor)pyrcsfile_dealloc, + .tp_flags= Py_TPFLAGS_DEFAULT, + .tp_doc= "RCS File", + .tp_getset= pyrcsfile_getseters, + .tp_init= (initproc)pyrcsfile_init, + .tp_new= PyType_GenericNew, + .tp_methods= pyrcsfile_methods, +}; + +static PyMethodDef pyrcsparse_methods[] = { + {NULL} +}; + +PyMODINIT_FUNC +initrcsparse(void) +{ + PyObject *m; + + if (PyType_Ready(&pyrcsfile_type) < 0) + return; + if (PyType_Ready(&pyrcstokmap_type) < 0) + return; + if (PyType_Ready(&pyrcsrevtree_type) < 0) + return; + + m = Py_InitModule3("rcsparse", pyrcsparse_methods, "RCS file parser"); + if (m == NULL) + return; + + Py_INCREF(&pyrcsfile_type); + PyModule_AddObject(m, "rcsfile", (PyObject *)&pyrcsfile_type); + Py_INCREF(&pyrcstokmap_type); + PyModule_AddObject(m, "rcstokmap", (PyObject *)&pyrcstokmap_type); + Py_INCREF(&pyrcsrevtree_type); + PyModule_AddObject(m, "rcsrevtree", (PyObject *)&pyrcsrevtree_type); +} diff --git a/swh/loader/cvs/rcsparse/queue.h b/swh/loader/cvs/rcsparse/queue.h new file mode 100644 index 0000000..f5ce068 --- /dev/null +++ b/swh/loader/cvs/rcsparse/queue.h @@ -0,0 +1,670 @@ +/* $NetBSD: queue.h,v 1.45 2006/03/07 17:56:00 pooka Exp $ */ + +/* + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)queue.h 8.5 (Berkeley) 8/20/94 + */ + +#ifndef _SYS_QUEUE_H_ +#define _SYS_QUEUE_H_ + +/* + * This file defines five types of data structures: singly-linked lists, + * lists, simple queues, tail queues, and circular queues. + * + * A singly-linked list is headed by a single forward pointer. The + * elements are singly linked for minimum space and pointer manipulation + * overhead at the expense of O(n) removal for arbitrary elements. New + * elements can be added to the list after an existing element or at the + * head of the list. Elements being removed from the head of the list + * should use the explicit macro for this purpose for optimum + * efficiency. A singly-linked list may only be traversed in the forward + * direction. Singly-linked lists are ideal for applications with large + * datasets and few or no removals or for implementing a LIFO queue. + * + * A list is headed by a single forward pointer (or an array of forward + * pointers for a hash table header). The elements are doubly linked + * so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before + * or after an existing element or at the head of the list. A list + * may only be traversed in the forward direction. + * + * A simple queue is headed by a pair of pointers, one the head of the + * list and the other to the tail of the list. The elements are singly + * linked to save space, so elements can only be removed from the + * head of the list. New elements can be added to the list after + * an existing element, at the head of the list, or at the end of the + * list. A simple queue may only be traversed in the forward direction. + * + * A tail queue is headed by a pair of pointers, one to the head of the + * list and the other to the tail of the list. The elements are doubly + * linked so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before or + * after an existing element, at the head of the list, or at the end of + * the list. A tail queue may be traversed in either direction. + * + * A circle queue is headed by a pair of pointers, one to the head of the + * list and the other to the tail of the list. The elements are doubly + * linked so that an arbitrary element can be removed without a need to + * traverse the list. New elements can be added to the list before or after + * an existing element, at the head of the list, or at the end of the list. + * A circle queue may be traversed in either direction, but has a more + * complex end of list detection. + * + * For details on the use of these macros, see the queue(3) manual page. + */ + +/* + * List definitions. + */ +#define LIST_HEAD(name, type) \ +struct name { \ + struct type *lh_first; /* first element */ \ +} + +#define LIST_HEAD_INITIALIZER(head) \ + { NULL } + +#define LIST_ENTRY(type) \ +struct { \ + struct type *le_next; /* next element */ \ + struct type **le_prev; /* address of previous next element */ \ +} + +/* + * List functions. + */ +#if defined(_KERNEL) && defined(QUEUEDEBUG) +#define QUEUEDEBUG_LIST_INSERT_HEAD(head, elm, field) \ + if ((head)->lh_first && \ + (head)->lh_first->field.le_prev != &(head)->lh_first) \ + panic("LIST_INSERT_HEAD %p %s:%d", (head), __FILE__, __LINE__); +#define QUEUEDEBUG_LIST_OP(elm, field) \ + if ((elm)->field.le_next && \ + (elm)->field.le_next->field.le_prev != \ + &(elm)->field.le_next) \ + panic("LIST_* forw %p %s:%d", (elm), __FILE__, __LINE__);\ + if (*(elm)->field.le_prev != (elm)) \ + panic("LIST_* back %p %s:%d", (elm), __FILE__, __LINE__); +#define QUEUEDEBUG_LIST_POSTREMOVE(elm, field) \ + (elm)->field.le_next = (void *)1L; \ + (elm)->field.le_prev = (void *)1L; +#else +#define QUEUEDEBUG_LIST_INSERT_HEAD(head, elm, field) +#define QUEUEDEBUG_LIST_OP(elm, field) +#define QUEUEDEBUG_LIST_POSTREMOVE(elm, field) +#endif + +#define LIST_INIT(head) do { \ + (head)->lh_first = NULL; \ +} while (/*CONSTCOND*/0) + +#define LIST_INSERT_AFTER(listelm, elm, field) do { \ + QUEUEDEBUG_LIST_OP((listelm), field) \ + if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \ + (listelm)->field.le_next->field.le_prev = \ + &(elm)->field.le_next; \ + (listelm)->field.le_next = (elm); \ + (elm)->field.le_prev = &(listelm)->field.le_next; \ +} while (/*CONSTCOND*/0) + +#define LIST_INSERT_BEFORE(listelm, elm, field) do { \ + QUEUEDEBUG_LIST_OP((listelm), field) \ + (elm)->field.le_prev = (listelm)->field.le_prev; \ + (elm)->field.le_next = (listelm); \ + *(listelm)->field.le_prev = (elm); \ + (listelm)->field.le_prev = &(elm)->field.le_next; \ +} while (/*CONSTCOND*/0) + +#define LIST_INSERT_HEAD(head, elm, field) do { \ + QUEUEDEBUG_LIST_INSERT_HEAD((head), (elm), field) \ + if (((elm)->field.le_next = (head)->lh_first) != NULL) \ + (head)->lh_first->field.le_prev = &(elm)->field.le_next;\ + (head)->lh_first = (elm); \ + (elm)->field.le_prev = &(head)->lh_first; \ +} while (/*CONSTCOND*/0) + +#define LIST_REMOVE(elm, field) do { \ + QUEUEDEBUG_LIST_OP((elm), field) \ + if ((elm)->field.le_next != NULL) \ + (elm)->field.le_next->field.le_prev = \ + (elm)->field.le_prev; \ + *(elm)->field.le_prev = (elm)->field.le_next; \ + QUEUEDEBUG_LIST_POSTREMOVE((elm), field) \ +} while (/*CONSTCOND*/0) + +#define LIST_FOREACH(var, head, field) \ + for ((var) = ((head)->lh_first); \ + (var); \ + (var) = ((var)->field.le_next)) + +/* + * List access methods. + */ +#define LIST_EMPTY(head) ((head)->lh_first == NULL) +#define LIST_FIRST(head) ((head)->lh_first) +#define LIST_NEXT(elm, field) ((elm)->field.le_next) + + +/* + * Singly-linked List definitions. + */ +#define SLIST_HEAD(name, type) \ +struct name { \ + struct type *slh_first; /* first element */ \ +} + +#define SLIST_HEAD_INITIALIZER(head) \ + { NULL } + +#define SLIST_ENTRY(type) \ +struct { \ + struct type *sle_next; /* next element */ \ +} + +/* + * Singly-linked List functions. + */ +#define SLIST_INIT(head) do { \ + (head)->slh_first = NULL; \ +} while (/*CONSTCOND*/0) + +#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ + (elm)->field.sle_next = (slistelm)->field.sle_next; \ + (slistelm)->field.sle_next = (elm); \ +} while (/*CONSTCOND*/0) + +#define SLIST_INSERT_HEAD(head, elm, field) do { \ + (elm)->field.sle_next = (head)->slh_first; \ + (head)->slh_first = (elm); \ +} while (/*CONSTCOND*/0) + +#define SLIST_REMOVE_HEAD(head, field) do { \ + (head)->slh_first = (head)->slh_first->field.sle_next; \ +} while (/*CONSTCOND*/0) + +#define SLIST_REMOVE(head, elm, type, field) do { \ + if ((head)->slh_first == (elm)) { \ + SLIST_REMOVE_HEAD((head), field); \ + } \ + else { \ + struct type *curelm = (head)->slh_first; \ + while(curelm->field.sle_next != (elm)) \ + curelm = curelm->field.sle_next; \ + curelm->field.sle_next = \ + curelm->field.sle_next->field.sle_next; \ + } \ +} while (/*CONSTCOND*/0) + +#define SLIST_FOREACH(var, head, field) \ + for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) + +/* + * Singly-linked List access methods. + */ +#define SLIST_EMPTY(head) ((head)->slh_first == NULL) +#define SLIST_FIRST(head) ((head)->slh_first) +#define SLIST_NEXT(elm, field) ((elm)->field.sle_next) + + +/* + * Singly-linked Tail queue declarations. + */ +#define STAILQ_HEAD(name, type) \ +struct name { \ + struct type *stqh_first; /* first element */ \ + struct type **stqh_last; /* addr of last next element */ \ +} + +#define STAILQ_HEAD_INITIALIZER(head) \ + { NULL, &(head).stqh_first } + +#define STAILQ_ENTRY(type) \ +struct { \ + struct type *stqe_next; /* next element */ \ +} + +/* + * Singly-linked Tail queue functions. + */ +#define STAILQ_INIT(head) do { \ + (head)->stqh_first = NULL; \ + (head)->stqh_last = &(head)->stqh_first; \ +} while (/*CONSTCOND*/0) + +#define STAILQ_INSERT_HEAD(head, elm, field) do { \ + if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \ + (head)->stqh_last = &(elm)->field.stqe_next; \ + (head)->stqh_first = (elm); \ +} while (/*CONSTCOND*/0) + +#define STAILQ_INSERT_TAIL(head, elm, field) do { \ + (elm)->field.stqe_next = NULL; \ + *(head)->stqh_last = (elm); \ + (head)->stqh_last = &(elm)->field.stqe_next; \ +} while (/*CONSTCOND*/0) + +#define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ + if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ + (head)->stqh_last = &(elm)->field.stqe_next; \ + (listelm)->field.stqe_next = (elm); \ +} while (/*CONSTCOND*/0) + +#define STAILQ_REMOVE_HEAD(head, field) do { \ + if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \ + (head)->stqh_last = &(head)->stqh_first; \ +} while (/*CONSTCOND*/0) + +#define STAILQ_REMOVE(head, elm, type, field) do { \ + if ((head)->stqh_first == (elm)) { \ + STAILQ_REMOVE_HEAD((head), field); \ + } else { \ + struct type *curelm = (head)->stqh_first; \ + while (curelm->field.stqe_next != (elm)) \ + curelm = curelm->field.stqe_next; \ + if ((curelm->field.stqe_next = \ + curelm->field.stqe_next->field.stqe_next) == NULL) \ + (head)->stqh_last = &(curelm)->field.stqe_next; \ + } \ +} while (/*CONSTCOND*/0) + +#define STAILQ_FOREACH(var, head, field) \ + for ((var) = ((head)->stqh_first); \ + (var); \ + (var) = ((var)->field.stqe_next)) + +/* + * Singly-linked Tail queue access methods. + */ +#define STAILQ_EMPTY(head) ((head)->stqh_first == NULL) +#define STAILQ_FIRST(head) ((head)->stqh_first) +#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) + + +/* + * Simple queue definitions. + */ +#define SIMPLEQ_HEAD(name, type) \ +struct name { \ + struct type *sqh_first; /* first element */ \ + struct type **sqh_last; /* addr of last next element */ \ +} + +#define SIMPLEQ_HEAD_INITIALIZER(head) \ + { NULL, &(head).sqh_first } + +#define SIMPLEQ_ENTRY(type) \ +struct { \ + struct type *sqe_next; /* next element */ \ +} + +/* + * Simple queue functions. + */ +#define SIMPLEQ_INIT(head) do { \ + (head)->sqh_first = NULL; \ + (head)->sqh_last = &(head)->sqh_first; \ +} while (/*CONSTCOND*/0) + +#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \ + if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \ + (head)->sqh_last = &(elm)->field.sqe_next; \ + (head)->sqh_first = (elm); \ +} while (/*CONSTCOND*/0) + +#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \ + (elm)->field.sqe_next = NULL; \ + *(head)->sqh_last = (elm); \ + (head)->sqh_last = &(elm)->field.sqe_next; \ +} while (/*CONSTCOND*/0) + +#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ + if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\ + (head)->sqh_last = &(elm)->field.sqe_next; \ + (listelm)->field.sqe_next = (elm); \ +} while (/*CONSTCOND*/0) + +#define SIMPLEQ_REMOVE_HEAD(head, field) do { \ + if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \ + (head)->sqh_last = &(head)->sqh_first; \ +} while (/*CONSTCOND*/0) + +#define SIMPLEQ_REMOVE(head, elm, type, field) do { \ + if ((head)->sqh_first == (elm)) { \ + SIMPLEQ_REMOVE_HEAD((head), field); \ + } else { \ + struct type *curelm = (head)->sqh_first; \ + while (curelm->field.sqe_next != (elm)) \ + curelm = curelm->field.sqe_next; \ + if ((curelm->field.sqe_next = \ + curelm->field.sqe_next->field.sqe_next) == NULL) \ + (head)->sqh_last = &(curelm)->field.sqe_next; \ + } \ +} while (/*CONSTCOND*/0) + +#define SIMPLEQ_FOREACH(var, head, field) \ + for ((var) = ((head)->sqh_first); \ + (var); \ + (var) = ((var)->field.sqe_next)) + +/* + * Simple queue access methods. + */ +#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == NULL) +#define SIMPLEQ_FIRST(head) ((head)->sqh_first) +#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) + + +/* + * Tail queue definitions. + */ +#define _TAILQ_HEAD(name, type, qual) \ +struct name { \ + qual type *tqh_first; /* first element */ \ + qual type *qual *tqh_last; /* addr of last next element */ \ +} +#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,) + +#define TAILQ_HEAD_INITIALIZER(head) \ + { NULL, &(head).tqh_first } + +#define _TAILQ_ENTRY(type, qual) \ +struct { \ + qual type *tqe_next; /* next element */ \ + qual type *qual *tqe_prev; /* address of previous next element */\ +} +#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,) + +/* + * Tail queue functions. + */ +#if defined(_KERNEL) && defined(QUEUEDEBUG) +#define QUEUEDEBUG_TAILQ_INSERT_HEAD(head, elm, field) \ + if ((head)->tqh_first && \ + (head)->tqh_first->field.tqe_prev != &(head)->tqh_first) \ + panic("TAILQ_INSERT_HEAD %p %s:%d", (head), __FILE__, __LINE__); +#define QUEUEDEBUG_TAILQ_INSERT_TAIL(head, elm, field) \ + if (*(head)->tqh_last != NULL) \ + panic("TAILQ_INSERT_TAIL %p %s:%d", (head), __FILE__, __LINE__); +#define QUEUEDEBUG_TAILQ_OP(elm, field) \ + if ((elm)->field.tqe_next && \ + (elm)->field.tqe_next->field.tqe_prev != \ + &(elm)->field.tqe_next) \ + panic("TAILQ_* forw %p %s:%d", (elm), __FILE__, __LINE__);\ + if (*(elm)->field.tqe_prev != (elm)) \ + panic("TAILQ_* back %p %s:%d", (elm), __FILE__, __LINE__); +#define QUEUEDEBUG_TAILQ_PREREMOVE(head, elm, field) \ + if ((elm)->field.tqe_next == NULL && \ + (head)->tqh_last != &(elm)->field.tqe_next) \ + panic("TAILQ_PREREMOVE head %p elm %p %s:%d", \ + (head), (elm), __FILE__, __LINE__); +#define QUEUEDEBUG_TAILQ_POSTREMOVE(elm, field) \ + (elm)->field.tqe_next = (void *)1L; \ + (elm)->field.tqe_prev = (void *)1L; +#else +#define QUEUEDEBUG_TAILQ_INSERT_HEAD(head, elm, field) +#define QUEUEDEBUG_TAILQ_INSERT_TAIL(head, elm, field) +#define QUEUEDEBUG_TAILQ_OP(elm, field) +#define QUEUEDEBUG_TAILQ_PREREMOVE(head, elm, field) +#define QUEUEDEBUG_TAILQ_POSTREMOVE(elm, field) +#endif + +#define TAILQ_INIT(head) do { \ + (head)->tqh_first = NULL; \ + (head)->tqh_last = &(head)->tqh_first; \ +} while (/*CONSTCOND*/0) + +#define TAILQ_INSERT_HEAD(head, elm, field) do { \ + QUEUEDEBUG_TAILQ_INSERT_HEAD((head), (elm), field) \ + if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \ + (head)->tqh_first->field.tqe_prev = \ + &(elm)->field.tqe_next; \ + else \ + (head)->tqh_last = &(elm)->field.tqe_next; \ + (head)->tqh_first = (elm); \ + (elm)->field.tqe_prev = &(head)->tqh_first; \ +} while (/*CONSTCOND*/0) + +#define TAILQ_INSERT_TAIL(head, elm, field) do { \ + QUEUEDEBUG_TAILQ_INSERT_TAIL((head), (elm), field) \ + (elm)->field.tqe_next = NULL; \ + (elm)->field.tqe_prev = (head)->tqh_last; \ + *(head)->tqh_last = (elm); \ + (head)->tqh_last = &(elm)->field.tqe_next; \ +} while (/*CONSTCOND*/0) + +#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ + QUEUEDEBUG_TAILQ_OP((listelm), field) \ + if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\ + (elm)->field.tqe_next->field.tqe_prev = \ + &(elm)->field.tqe_next; \ + else \ + (head)->tqh_last = &(elm)->field.tqe_next; \ + (listelm)->field.tqe_next = (elm); \ + (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ +} while (/*CONSTCOND*/0) + +#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ + QUEUEDEBUG_TAILQ_OP((listelm), field) \ + (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ + (elm)->field.tqe_next = (listelm); \ + *(listelm)->field.tqe_prev = (elm); \ + (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ +} while (/*CONSTCOND*/0) + +#define TAILQ_REMOVE(head, elm, field) do { \ + QUEUEDEBUG_TAILQ_PREREMOVE((head), (elm), field) \ + QUEUEDEBUG_TAILQ_OP((elm), field) \ + if (((elm)->field.tqe_next) != NULL) \ + (elm)->field.tqe_next->field.tqe_prev = \ + (elm)->field.tqe_prev; \ + else \ + (head)->tqh_last = (elm)->field.tqe_prev; \ + *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ + QUEUEDEBUG_TAILQ_POSTREMOVE((elm), field); \ +} while (/*CONSTCOND*/0) + +#define TAILQ_FOREACH(var, head, field) \ + for ((var) = ((head)->tqh_first); \ + (var); \ + (var) = ((var)->field.tqe_next)) + +#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ + for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ + (var); \ + (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) + +/* + * Tail queue access methods. + */ +#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) +#define TAILQ_FIRST(head) ((head)->tqh_first) +#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) + +#define TAILQ_LAST(head, headname) \ + (*(((struct headname *)((head)->tqh_last))->tqh_last)) +#define TAILQ_PREV(elm, headname, field) \ + (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) + + +/* + * Circular queue definitions. + */ +#if defined(_KERNEL) && defined(QUEUEDEBUG) +#define QUEUEDEBUG_CIRCLEQ_HEAD(head, field) \ + if ((head)->cqh_first != (void *)(head) && \ + (head)->cqh_first->field.cqe_prev != (void *)(head)) \ + panic("CIRCLEQ head forw %p %s:%d", (head), \ + __FILE__, __LINE__); \ + if ((head)->cqh_last != (void *)(head) && \ + (head)->cqh_last->field.cqe_next != (void *)(head)) \ + panic("CIRCLEQ head back %p %s:%d", (head), \ + __FILE__, __LINE__); +#define QUEUEDEBUG_CIRCLEQ_ELM(head, elm, field) \ + if ((elm)->field.cqe_next == (void *)(head)) { \ + if ((head)->cqh_last != (elm)) \ + panic("CIRCLEQ elm last %p %s:%d", (elm), \ + __FILE__, __LINE__); \ + } else { \ + if ((elm)->field.cqe_next->field.cqe_prev != (elm)) \ + panic("CIRCLEQ elm forw %p %s:%d", (elm), \ + __FILE__, __LINE__); \ + } \ + if ((elm)->field.cqe_prev == (void *)(head)) { \ + if ((head)->cqh_first != (elm)) \ + panic("CIRCLEQ elm first %p %s:%d", (elm), \ + __FILE__, __LINE__); \ + } else { \ + if ((elm)->field.cqe_prev->field.cqe_next != (elm)) \ + panic("CIRCLEQ elm prev %p %s:%d", (elm), \ + __FILE__, __LINE__); \ + } +#define QUEUEDEBUG_CIRCLEQ_POSTREMOVE(elm, field) \ + (elm)->field.cqe_next = (void *)1L; \ + (elm)->field.cqe_prev = (void *)1L; +#else +#define QUEUEDEBUG_CIRCLEQ_HEAD(head, field) +#define QUEUEDEBUG_CIRCLEQ_ELM(head, elm, field) +#define QUEUEDEBUG_CIRCLEQ_POSTREMOVE(elm, field) +#endif + +#define CIRCLEQ_HEAD(name, type) \ +struct name { \ + struct type *cqh_first; /* first element */ \ + struct type *cqh_last; /* last element */ \ +} + +#define CIRCLEQ_HEAD_INITIALIZER(head) \ + { (void *)&head, (void *)&head } + +#define CIRCLEQ_ENTRY(type) \ +struct { \ + struct type *cqe_next; /* next element */ \ + struct type *cqe_prev; /* previous element */ \ +} + +/* + * Circular queue functions. + */ +#define CIRCLEQ_INIT(head) do { \ + (head)->cqh_first = (void *)(head); \ + (head)->cqh_last = (void *)(head); \ +} while (/*CONSTCOND*/0) + +#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ + QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \ + QUEUEDEBUG_CIRCLEQ_ELM((head), (listelm), field) \ + (elm)->field.cqe_next = (listelm)->field.cqe_next; \ + (elm)->field.cqe_prev = (listelm); \ + if ((listelm)->field.cqe_next == (void *)(head)) \ + (head)->cqh_last = (elm); \ + else \ + (listelm)->field.cqe_next->field.cqe_prev = (elm); \ + (listelm)->field.cqe_next = (elm); \ +} while (/*CONSTCOND*/0) + +#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ + QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \ + QUEUEDEBUG_CIRCLEQ_ELM((head), (listelm), field) \ + (elm)->field.cqe_next = (listelm); \ + (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \ + if ((listelm)->field.cqe_prev == (void *)(head)) \ + (head)->cqh_first = (elm); \ + else \ + (listelm)->field.cqe_prev->field.cqe_next = (elm); \ + (listelm)->field.cqe_prev = (elm); \ +} while (/*CONSTCOND*/0) + +#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ + QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \ + (elm)->field.cqe_next = (head)->cqh_first; \ + (elm)->field.cqe_prev = (void *)(head); \ + if ((head)->cqh_last == (void *)(head)) \ + (head)->cqh_last = (elm); \ + else \ + (head)->cqh_first->field.cqe_prev = (elm); \ + (head)->cqh_first = (elm); \ +} while (/*CONSTCOND*/0) + +#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ + QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \ + (elm)->field.cqe_next = (void *)(head); \ + (elm)->field.cqe_prev = (head)->cqh_last; \ + if ((head)->cqh_first == (void *)(head)) \ + (head)->cqh_first = (elm); \ + else \ + (head)->cqh_last->field.cqe_next = (elm); \ + (head)->cqh_last = (elm); \ +} while (/*CONSTCOND*/0) + +#define CIRCLEQ_REMOVE(head, elm, field) do { \ + QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \ + QUEUEDEBUG_CIRCLEQ_ELM((head), (elm), field) \ + if ((elm)->field.cqe_next == (void *)(head)) \ + (head)->cqh_last = (elm)->field.cqe_prev; \ + else \ + (elm)->field.cqe_next->field.cqe_prev = \ + (elm)->field.cqe_prev; \ + if ((elm)->field.cqe_prev == (void *)(head)) \ + (head)->cqh_first = (elm)->field.cqe_next; \ + else \ + (elm)->field.cqe_prev->field.cqe_next = \ + (elm)->field.cqe_next; \ + QUEUEDEBUG_CIRCLEQ_POSTREMOVE((elm), field) \ +} while (/*CONSTCOND*/0) + +#define CIRCLEQ_FOREACH(var, head, field) \ + for ((var) = ((head)->cqh_first); \ + (var) != (const void *)(head); \ + (var) = ((var)->field.cqe_next)) + +#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \ + for ((var) = ((head)->cqh_last); \ + (var) != (const void *)(head); \ + (var) = ((var)->field.cqe_prev)) + +/* + * Circular queue access methods. + */ +#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head)) +#define CIRCLEQ_FIRST(head) ((head)->cqh_first) +#define CIRCLEQ_LAST(head) ((head)->cqh_last) +#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) +#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) + +#define CIRCLEQ_LOOP_NEXT(head, elm, field) \ + (((elm)->field.cqe_next == (void *)(head)) \ + ? ((head)->cqh_first) \ + : (elm->field.cqe_next)) +#define CIRCLEQ_LOOP_PREV(head, elm, field) \ + (((elm)->field.cqe_prev == (void *)(head)) \ + ? ((head)->cqh_last) \ + : (elm->field.cqe_prev)) + +#endif /* !_SYS_QUEUE_H_ */ diff --git a/swh/loader/cvs/rcsparse/rb-rcsparse.c b/swh/loader/cvs/rcsparse/rb-rcsparse.c new file mode 100644 index 0000000..9f2739b --- /dev/null +++ b/swh/loader/cvs/rcsparse/rb-rcsparse.c @@ -0,0 +1,609 @@ +/* + * This file is part of rcsparse. + * + * rcsparse is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * rcsparse is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with rcsparse. If not, see . + */ + +#include +#include + +#include "rcsparse.h" + + +/* Global Variables {{{1 */ +static VALUE rb_cRCSFile; +static VALUE rb_cRev; + + +/* Gobal Helper Functions {{{1 */ +static VALUE +str_from_tok(struct rcstoken *tok) +{ + if (tok == NULL) + rb_raise(rb_eRuntimeError, "Token is NULL"); + return rb_tainted_str_new(tok->str, tok->len); +} + +static VALUE +str_from_tok2(struct rcstoken *tok) +{ + if (tok == NULL) + return Qnil; + return rb_tainted_str_new(tok->str, tok->len); +} + +static VALUE +ary_from_toklist(struct rcstoklist *tl) +{ + VALUE ret; + struct rcstoken *t; + + ret = rb_ary_new(); + SLIST_FOREACH(t, tl, link) + rb_ary_push(ret, str_from_tok(t)); + return ret; +} + +static VALUE +hash_from_tokmap(struct rcstokmap *map) +{ + VALUE hash; + struct rcstokpair *p; + + hash = rb_hash_new(); + RB_FOREACH(p, rcstokmap, map) + rb_hash_aset(hash, str_from_tok(p->first), + str_from_tok(p->second)); + return hash; +} + +static void +rb_attr2(VALUE klass, const char *attr, int read, int write) +{ + rb_attr(klass, rb_intern(attr), read, write, 0); +} + + +/* Definition of RCSFile::Rev {{{1 */ +static void +readdate(const char *str, int *dest, size_t len) +{ + const char *pos; + + *dest = 0; + for (pos = str; pos < str + len; pos++) { + if (*pos < '0' || *pos > '9') + rb_raise(rb_eRuntimeError, "Invalid date format"); + *dest *= 10; + *dest += *pos - '0'; + } +} + +static VALUE +rb_rcsrev_new(struct rcsrev *rev) +{ + struct tm tm; + const char *month; + VALUE self; + VALUE date; + + memset(&tm, 0, sizeof(tm)); + if (rev->date->len == 17) { + /* 2-digit year */ + readdate(rev->date->str, &tm.tm_year, 2); + month = rev->date->str + 3; + } else { + /* 4-digit year */ + readdate(rev->date->str, &tm.tm_year, 4); + tm.tm_year -= 1900; + month = rev->date->str + 5; + } + + readdate(month, &tm.tm_mon, 2); + tm.tm_mon--; + readdate(month + 3, &tm.tm_mday, 2); + readdate(month + 6, &tm.tm_hour, 2); + readdate(month + 9, &tm.tm_min, 2); + readdate(month + 12, &tm.tm_sec, 2); + date = rb_time_new(timegm(&tm), 0); + /* + * rb_time_new returns a Time object in local time, so convert + * it to GMT, what RCS/CVS uses everywhere. + */ + date = rb_funcall(date, rb_intern("gmtime"), 0); + + self = rb_obj_alloc(rb_cRev); + rb_iv_set(self, "@rev", str_from_tok(rev->rev)); + rb_iv_set(self, "@date", date); + rb_iv_set(self, "@author", str_from_tok(rev->author)); + rb_iv_set(self, "@state", str_from_tok2(rev->state)); + rb_iv_set(self, "@branches", ary_from_toklist(&rev->branches)); + rb_iv_set(self, "@next", str_from_tok2(rev->next)); + rb_iv_set(self, "@commitid", str_from_tok2(rev->commitid)); + return self; +} + + +/* Definition of RCSFile {{{1 */ +/* Generic functions {{{2 */ +struct rb_rcsfile { + struct rcsfile *rf; + VALUE symbols; +}; + +static void +rcsfile_free(struct rb_rcsfile *rb_rf) +{ + if (rb_rf != NULL) { + if (rb_rf->rf != NULL) + rcsclose(rb_rf->rf); + free(rb_rf); + } +} + +static void +rcsfile_mark(struct rb_rcsfile *rb_rf) +{ + rb_gc_mark(rb_rf->symbols); +} + +static struct rb_rcsfile * +rcsfile_data(VALUE self) +{ + struct rb_rcsfile *rb_rf; + + Data_Get_Struct(self, struct rb_rcsfile, rb_rf); + if (rb_rf->rf == NULL) + rb_raise(rb_eIOError, "closed file"); + return rb_rf; +} + +static VALUE +rb_rcsfile_s_alloc(VALUE klass) +{ + struct rb_rcsfile *rb_rf; + + return Data_Make_Struct(klass, struct rb_rcsfile, + rcsfile_mark, rcsfile_free, rb_rf); +} + +static VALUE +rb_rcsfile_initialize(int argc, VALUE *argv, VALUE self) +{ + VALUE fname; + struct rb_rcsfile *rb_rf; + + Data_Get_Struct(self, struct rb_rcsfile, rb_rf); + rb_scan_args(argc, argv, "1", &fname); + SafeStringValue(fname); + rb_rf->rf = rcsopen(RSTRING_PTR(fname)); + if (rb_rf->rf == NULL) + rb_sys_fail(RSTRING_PTR(fname)); + rb_rf->symbols = Qnil; + return self; +} + +static VALUE +rb_rcsfile_close(VALUE self) +{ + struct rb_rcsfile *rb_rf = rcsfile_data(self); + + rcsclose(rb_rf->rf); + rb_rf->rf = NULL; + return Qnil; +} + +static VALUE +rb_rcsfile_s_open(int argc, VALUE *argv, VALUE klass) +{ + VALUE obj; + + obj = rb_rcsfile_s_alloc(klass); + obj = rb_rcsfile_initialize(argc, argv, obj); + + if (rb_block_given_p()) + return rb_ensure(rb_yield, obj, rb_rcsfile_close, obj); + else + return obj; +} + +/* Interface to admin fields {{{2 */ +static struct rcsadmin * +rb_rcsfile_admin_generic(VALUE self) +{ + struct rb_rcsfile *rb_rf = rcsfile_data(self); + + if (rcsparseadmin(rb_rf->rf) < 0) + rb_raise(rb_eRuntimeError, "Cannot parse RCS file"); + + return &rb_rf->rf->admin; +} + +static VALUE +rb_rcsfile_head(VALUE self) +{ + struct rcstoken *tok = rb_rcsfile_admin_generic(self)->head; + + if (tok == NULL) + return Qnil; + return str_from_tok(tok); +} + +static VALUE +rb_rcsfile_branch(VALUE self) +{ + struct rcstoken *tok = rb_rcsfile_admin_generic(self)->branch; + + if (tok == NULL) + return Qnil; + return str_from_tok(tok); +} + +static VALUE +rb_rcsfile_comment(VALUE self) +{ + struct rcstoken *tok = rb_rcsfile_admin_generic(self)->comment; + + if (tok == NULL) + return Qnil; + return str_from_tok(tok); +} + +static VALUE +rb_rcsfile_expand(VALUE self) +{ + struct rcstoken *tok = rb_rcsfile_admin_generic(self)->expand; + + if (tok == NULL) + return Qnil; + return str_from_tok(tok); +} + +static VALUE +rb_rcsfile_desc(VALUE self) +{ + struct rcstoken *tok = rb_rcsfile_admin_generic(self)->desc; + + if (tok == NULL) + return Qnil; + return str_from_tok(tok); +} + +static VALUE +rb_rcsfile_access(VALUE self) +{ + return ary_from_toklist( + &rb_rcsfile_admin_generic(self)->access); +} + +static VALUE +rb_rcsfile_strict(VALUE self) +{ + int strict = rb_rcsfile_admin_generic(self)->strict; + + if (strict) + return Qtrue; + else + return Qfalse; +} + +static VALUE +rb_rcsfile_symbols(VALUE self) +{ + struct rb_rcsfile *rb_rf = rcsfile_data(self); + + if (NIL_P(rb_rf->symbols)) { + rb_rf->symbols = hash_from_tokmap( + &rb_rcsfile_admin_generic(self)->symbols); + } + return rb_rf->symbols; +} + +static VALUE +rb_rcsfile_locks(VALUE self) +{ + return hash_from_tokmap(&rb_rcsfile_admin_generic(self)->locks); +} + +static VALUE +rb_rcsfile_checkout(int argc, VALUE *argv, VALUE self) +{ + struct rb_rcsfile *rb_rf = rcsfile_data(self); + VALUE rev; + VALUE ret; + size_t len; + const char *revstr = NULL; + char *data; + + if (rb_scan_args(argc, argv, "01", &rev) == 1) { + StringValue(rev); + revstr = RSTRING_PTR(rev); + } + data = rcscheckout(rb_rf->rf, revstr, &len); + if (data == NULL) + rb_raise(rb_eRuntimeError, "Cannot parse RCS file"); + ret = rb_tainted_str_new(data, len); + free(data); + return ret; +} + +static VALUE +rb_rcsfile_resolve_sym(int argc, VALUE *argv, VALUE self) +{ + struct rb_rcsfile *rb_rf = rcsfile_data(self); + VALUE sym; + VALUE ret; + const char *symstr = "HEAD"; + char *rev; + + if (rb_scan_args(argc, argv, "01", &sym) == 1) { + StringValue(sym); + symstr = RSTRING_PTR(sym); + } + rev = rcsrevfromsym(rb_rf->rf, symstr); + if (rev == NULL) + return Qnil; + ret = rb_tainted_str_new2(rev); + free(rev); + return ret; +} + +static VALUE +rb_rcsfile_getlog(VALUE self, VALUE rev) +{ + struct rb_rcsfile *rb_rf = rcsfile_data(self); + VALUE ret; + char *data; + + StringValue(rev); + data = rcsgetlog(rb_rf->rf, RSTRING_PTR(rev)); + if (data == NULL) + return Qnil; + ret = rb_tainted_str_new2(data); + free(data); + return ret; +} + +/* Hash-like interface {{{2 */ +static struct rcsrevtree * +rb_rcsfile_revs(VALUE self) +{ + struct rb_rcsfile *rb_rf = rcsfile_data(self); + + if (rcsparsetree(rb_rf->rf) < 0) + rb_raise(rb_eRuntimeError, "Cannot parse RCS file"); + + return &rb_rf->rf->admin.revs; +} + +static VALUE +rb_revtree_aref(VALUE self, VALUE index) +{ + struct rcsrev s, *f; + struct rcstoken st; + + StringValue(index); + s.rev = &st; + st.str = RSTRING_PTR(index); + st.len = RSTRING_LEN(index); + f = RB_FIND(rcsrevtree, rb_rcsfile_revs(self), &s); + if (f == NULL) + return Qnil; + else + return rb_rcsrev_new(f); +} + + +static void +revtree_foreach(VALUE self, void (*it)(struct rcsrev *, VALUE), VALUE arg) +{ + struct rcsrev *i; + + RB_FOREACH(i, rcsrevtree, rb_rcsfile_revs(self)) + it(i, arg); +} + +static void +revtree_each_i(struct rcsrev *r, VALUE dummy) +{ + rb_yield(rb_assoc_new(str_from_tok(r->rev), rb_rcsrev_new(r))); +} + +static VALUE +rb_revtree_each(VALUE self) +{ + revtree_foreach(self, revtree_each_i, 0); + return self; +} + +static void +revtree_each_pair_i(struct rcsrev *r, VALUE dummy) +{ + rb_yield_values(2, str_from_tok(r->rev), rb_rcsrev_new(r)); +} + +static VALUE +rb_revtree_each_pair(VALUE self) +{ + revtree_foreach(self, revtree_each_pair_i, 0); + return self; +} + +static void +revtree_each_key_i(struct rcsrev *r, VALUE dummy) +{ + rb_yield(str_from_tok(r->rev)); +} + +static VALUE +rb_revtree_each_key(VALUE self) +{ + revtree_foreach(self, revtree_each_key_i, 0); + return self; +} + +static void +revtree_each_value_i(struct rcsrev *r, VALUE dummy) +{ + rb_yield(rb_rcsrev_new(r)); +} + +static VALUE +rb_revtree_each_value(VALUE self) +{ + revtree_foreach(self, revtree_each_value_i, 0); + return self; +} + +static VALUE +rb_revtree_empty_p(VALUE self) +{ + if (RB_EMPTY(rb_rcsfile_revs(self))) + return Qtrue; + else + return Qfalse; +} + +static VALUE +rb_revtree_key_p(VALUE self, VALUE index) +{ + struct rcsrev s, *f; + struct rcstoken st; + + StringValue(index); + s.rev = &st; + st.str = RSTRING_PTR(index); + st.len = RSTRING_LEN(index); + f = RB_FIND(rcsrevtree, rb_rcsfile_revs(self), &s); + if (f == NULL) + return Qfalse; + else + return Qtrue; +} + +static void +revtree_keys_i(struct rcsrev *r, VALUE ary) +{ + rb_ary_push(ary, str_from_tok(r->rev)); +} + +static VALUE +rb_revtree_keys(VALUE self) +{ + VALUE ary; + + ary = rb_ary_new(); + revtree_foreach(self, revtree_keys_i, ary); + return ary; +} + +static void +revtree_values_i(struct rcsrev *r, VALUE ary) +{ + rb_ary_push(ary, rb_rcsrev_new(r)); +} + +static VALUE +rb_revtree_values(VALUE self) +{ + VALUE ary; + + ary = rb_ary_new(); + revtree_foreach(self, revtree_values_i, ary); + return ary; +} + +static void +revtree_to_a_i(struct rcsrev *r, VALUE ary) +{ + rb_ary_push(ary, rb_assoc_new(str_from_tok(r->rev), rb_rcsrev_new(r))); +} + +static VALUE +rb_revtree_to_a(VALUE self) +{ + VALUE ary; + + ary = rb_ary_new(); + revtree_foreach(self, revtree_to_a_i, ary); + return ary; +} + +static void +revtree_to_hash_i(struct rcsrev *r, VALUE hash) +{ + rb_hash_aset(hash, str_from_tok(r->rev), rb_rcsrev_new(r)); +} + +static VALUE +rb_revtree_to_hash(VALUE self) +{ + VALUE hash; + + hash = rb_hash_new(); + revtree_foreach(self, revtree_to_hash_i, hash); + return hash; +} + + + +/* Module initialization {{{1 */ +void +Init_rcsfile(void) +{ + rb_cRCSFile = rb_define_class("RCSFile", rb_cObject); + rb_define_alloc_func(rb_cRCSFile, rb_rcsfile_s_alloc); + rb_define_singleton_method(rb_cRCSFile, "open", rb_rcsfile_s_open, -1); + rb_define_method(rb_cRCSFile, "initialize", rb_rcsfile_initialize, -1); + rb_define_method(rb_cRCSFile, "close", rb_rcsfile_close, 0); + rb_define_method(rb_cRCSFile, "head", rb_rcsfile_head, 0); + rb_define_method(rb_cRCSFile, "branch", rb_rcsfile_branch, 0); + rb_define_method(rb_cRCSFile, "access", rb_rcsfile_access, 0); + rb_define_method(rb_cRCSFile, "symbols", rb_rcsfile_symbols, 0); + rb_define_method(rb_cRCSFile, "locks", rb_rcsfile_locks, 0); + rb_define_method(rb_cRCSFile, "strict", rb_rcsfile_strict, 0); + rb_define_method(rb_cRCSFile, "comment", rb_rcsfile_comment, 0); + rb_define_method(rb_cRCSFile, "expand", rb_rcsfile_expand, 0); + rb_define_method(rb_cRCSFile, "desc", rb_rcsfile_desc, 0); + rb_define_method(rb_cRCSFile, "checkout", rb_rcsfile_checkout, -1); + rb_define_method(rb_cRCSFile, "resolve_sym", rb_rcsfile_resolve_sym, -1); + rb_define_method(rb_cRCSFile, "getlog", rb_rcsfile_getlog, 1); + + /* Hash-like interface to revs */ + rb_include_module(rb_cRCSFile, rb_mEnumerable); + rb_define_method(rb_cRCSFile, "[]", rb_revtree_aref, 1); + rb_define_method(rb_cRCSFile, "each", rb_revtree_each, 0); + rb_define_method(rb_cRCSFile, "each_pair", rb_revtree_each_pair, 0); + rb_define_method(rb_cRCSFile, "each_key", rb_revtree_each_key, 0); + rb_define_method(rb_cRCSFile, "each_value", rb_revtree_each_value, 0); + rb_define_method(rb_cRCSFile, "empty?", rb_revtree_empty_p, 0); + rb_define_method(rb_cRCSFile, "key?", rb_revtree_key_p, 1); + rb_define_method(rb_cRCSFile, "has_key?", rb_revtree_key_p, 1); + rb_define_method(rb_cRCSFile, "include?", rb_revtree_key_p, 1); + rb_define_method(rb_cRCSFile, "member?", rb_revtree_key_p, 1); + rb_define_method(rb_cRCSFile, "keys", rb_revtree_keys, 0); + rb_define_method(rb_cRCSFile, "values", rb_revtree_values, 0); + rb_define_method(rb_cRCSFile, "to_a", rb_revtree_to_a, 0); + rb_define_method(rb_cRCSFile, "to_hash", rb_revtree_to_hash, 0); + + rb_cRev = rb_define_class_under(rb_cRCSFile, "Rev", rb_cObject); + rb_attr2(rb_cRev, "rev", 1, 0); + rb_attr2(rb_cRev, "date", 1, 0); + rb_attr2(rb_cRev, "author", 1, 0); + rb_attr2(rb_cRev, "state", 1, 0); + rb_attr2(rb_cRev, "branches", 1, 0); + rb_attr2(rb_cRev, "next", 1, 0); + rb_attr2(rb_cRev, "commitid", 1, 0); + rb_attr2(rb_cRev, "log", 1, 1); +} diff --git a/swh/loader/cvs/rcsparse/rcsparse.c b/swh/loader/cvs/rcsparse/rcsparse.c new file mode 100644 index 0000000..b490832 --- /dev/null +++ b/swh/loader/cvs/rcsparse/rcsparse.c @@ -0,0 +1,1439 @@ +/* + * This file is part of rcsparse. + * + * rcsparse is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * rcsparse is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with rcsparse. If not, see . + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "queue.h" +#include "tree.h" + +#include "rcsparse.h" + +struct line { + char *str; + size_t len; + size_t atcount; +}; + +struct stringinfo { + size_t size; + size_t pos; + struct line lines[0]; +}; + +#define STRNFO_LINES 8 + +struct rcsdelta { + SLIST_ENTRY(rcsdelta) link; + int action; + size_t pos; + size_t len; + struct line *lines; +}; + + +static int cmprev(struct rcsrev *, struct rcsrev *); +static int cmptokpair(struct rcstokpair *, struct rcstokpair *); +static struct rcstoken *checktok(struct rcsfile *); +static int skipws(struct rcsfile *); +static struct rcstoken *parsestring(struct rcsfile *, struct stringinfo **); +static struct rcstoken *parsetoken(struct rcsfile *); +static int tokcmp(struct rcstoken *, struct rcstoken *); +static int tokeqtok(struct rcstoken *, struct rcstoken *); +static int tokeqstr(struct rcstoken *, const char *); +static int tokeqstrn(struct rcstoken *, const char *, size_t); +static int expecttok(struct rcsfile *, int); +static int opttok(struct rcsfile *, int); +static int expecttokstr(struct rcsfile *, const char *); +static int opttokstr(struct rcsfile *, const char *); +static char *strnfo2txtbuf(struct stringinfo *, size_t *); +static int applydelta(struct stringinfo **, struct stringinfo *); + + +RB_GENERATE(rcsrevtree, rcsrev, link, cmprev); +RB_GENERATE(rcstokmap, rcstokpair, link, cmptokpair); + +static int +cmprev(struct rcsrev *rev1, struct rcsrev *rev2) +{ + return tokcmp(rev1->rev, rev2->rev); +} + +static int +cmptokpair(struct rcstokpair *pair1, struct rcstokpair *pair2) +{ + return tokcmp(pair1->first, pair2->first); +} + +static struct rcstoken * +checktok(struct rcsfile *rcs) +{ + if (rcs->tok == NULL) + rcs->lasttok = rcs->tok = calloc(1, sizeof(struct rcstoken)); + + return rcs->tok; +} + +static int +resizestrnfo(struct stringinfo **si, size_t len) +{ + size_t newsize; + + newsize = (*si)->size; + while (len > newsize) + newsize *= 2; + + if (newsize > (*si)->size) { + struct stringinfo *nsi; + + nsi = realloc(*si, sizeof(struct stringinfo) + + newsize * sizeof(struct line)); + if (nsi == NULL) + return -1; + nsi->size = newsize; + *si = nsi; + } + + return 0; +} + +static struct stringinfo * +copystrnfo(struct stringinfo *si) +{ + struct stringinfo *nsi; + size_t size; + + size = sizeof(*si) + si->size * sizeof(si->lines[0]); + nsi = malloc(size); + if (nsi == NULL) + return NULL; + memcpy(nsi, si, size); + return nsi; +} + +static int +skipws(struct rcsfile *rcs) +{ + for (; rcs->pos < rcs->end; rcs->pos++) { + switch (*rcs->pos) { + case ' ': + case '\b': + case '\t': + case '\n': + case '\r': + case '\v': + case '\f': + continue; + } + + break; + } + + return rcs->pos == rcs->end ? -1 : 0; +} + +static struct rcstoken * +parsestring(struct rcsfile *rcs, struct stringinfo **sip) +{ + int atcount; + struct stringinfo *si = NULL; + struct rcstoken *tok; + + if (skipws(rcs) < 0) + return NULL; + + if (*rcs->pos != '@') + return NULL; + + tok = checktok(rcs); + if (tok == NULL) + return NULL; + + rcs->pos++; + + if (sip != NULL) { + *sip = NULL; + si = malloc(sizeof(struct stringinfo) + STRNFO_LINES * sizeof(struct line)); + if (si == NULL) + return NULL; + + si->size = STRNFO_LINES; + si->pos = 0; + si->lines[0].str = rcs->pos; + si->lines[0].atcount = 0; + } + + tok->str = rcs->pos; + atcount = 0; + for (; rcs->pos < rcs->end; rcs->pos++) { + switch (*rcs->pos) { + case '\n': + if (si != NULL) { + if (resizestrnfo(&si, si->pos + 2) < 0) + goto fail; + + si->lines[si->pos].len = rcs->pos - si->lines[si->pos].str + 1; + si->pos++; + si->lines[si->pos].str = rcs->pos + 1; + si->lines[si->pos].atcount = 0; + } + continue; + + case '@': + if (rcs->pos + 1 == rcs->end) + goto fail; + + rcs->pos++; + if (*rcs->pos != '@') + break; + + atcount++; + if (si != NULL) + si->lines[si->pos].atcount++; + continue; + + default: + continue; + } + + /* If we reached this point, we need to finish */ + + break; + } + + if (si != NULL) { + si->lines[si->pos].len = rcs->pos - si->lines[si->pos].str - 1; + if (si->lines[si->pos].len != 0) /* last line didn't end with '\n' */ + si->pos++; + *sip = si; + } + + tok->len = rcs->pos - tok->str - 1; + tok->type = atcount > 0 ? TOK_STRINGAT : TOK_STRING; + + return tok; + +fail: + if (si != NULL) + free(si); + + return NULL; +} + +static struct rcstoken * +parsetoken(struct rcsfile *rcs) +{ + int ch; + int type; + int finish; + struct rcstoken *tok; + + if (skipws(rcs) < 0) + return NULL; + + tok = checktok(rcs); + + ch = *rcs->pos; + switch (ch) { + case ';': + case ':': + case ',': + case '$': + tok->type = ch; + tok->str = rcs->pos; + rcs->pos++; + tok->len = 1; + return tok; + + case '@': + return parsestring(rcs, NULL); + } + + tok->str = rcs->pos; + type = 0; + finish = 0; + while (rcs->pos < rcs->end && !finish) { + ch = *rcs->pos; + switch (ch) { + case ' ': + case '\b': + case '\t': + case '\n': + case '\r': + case '\v': + case '\f': + case ';': + case ':': + case ',': + case '$': + case '@': + finish = 1; + continue; + } + + if (isdigit(ch)) + type |= TOK_DIGIT; + else if (ch == '.') + type |= TOK_DOT; + else + type |= TOK_PRINT; + + rcs->pos++; + } + + tok->type = type; + tok->len = rcs->pos - tok->str; + + return tok; +} + +static int +tokcmp(struct rcstoken *tok1, struct rcstoken *tok2) +{ + char *pos1, *pos2, *end1, *end2; + + pos1 = tok1->str; + end1 = pos1 + tok1->len; + pos2 = tok2->str; + end2 = pos2 + tok2->len; + for (; pos1 < end1 && pos2 < end2; pos1++, pos2++) + if (*pos1 != *pos2) + return *pos1 - *pos2; + + if (pos1 == end1) { + if (pos2 == end2) + return 0; + else + return -1; + } else { + return 1; + } +} + +static int +tokeqtok(struct rcstoken *tok1, struct rcstoken *tok2) +{ + return tokcmp(tok1, tok2) == 0; +} + +static int +tokeqstr(struct rcstoken *tok, const char *str) +{ + char *pos, *endpos; + + pos = tok->str; + endpos = pos + tok->len; + for (; pos < endpos && *str; pos++, str++) { + if (*str != *pos) + return 0; + } + + if (pos == endpos && *str == '\0') + return 1; + else + return 0; +} + +static int +tokeqstrn(struct rcstoken *tok, const char *str, size_t len) +{ + char *pos, *endpos; + + if (tok->len < len) + return 0; + + pos = tok->str; + endpos = pos + tok->len; + for (; len && *str; pos++, str++, len--) { + if (*str != *pos) + return 0; + } + + return len == 0 ? 1 : 0; +} + +static int +expecttok(struct rcsfile *rcs, int type) +{ + if (parsetoken(rcs) == NULL) + return -2; + + if (rcs->tok->type == type) + return 0; + else + return -1; +} + +static int +opttok(struct rcsfile *rcs, int type) +{ + return expecttok(rcs, type) + 1; +} + +static int +expecttokstr(struct rcsfile *rcs, const char *str) +{ + if (parsetoken(rcs) == NULL) + return -2; + + return tokeqstr(rcs->tok, str) ? 0 : -1; +} + +static int +opttokstr(struct rcsfile *rcs, const char *str) +{ + int ret; + + ret = expecttokstr(rcs, str); + if (ret == -1) + rcs->pos = rcs->tok->str; + + return ret + 1; +} + +static char * +tokstripat(struct rcstoken *tok) +{ + char *ret; + + ret = malloc(tok->len + 1); + if (ret == NULL) + return NULL; + + if (tok->type == TOK_STRING) { + bcopy(tok->str, ret, tok->len); + ret[tok->len] = '\0'; + } else { + char *endpos, *at, *ipos, *opos; + + ipos = tok->str; + endpos = ipos + tok->len; + opos = ret; + while ((at = memchr(ipos, '@', endpos - ipos)) != NULL) { + bcopy(ipos, opos, at - ipos + 1); + opos += at - ipos + 1; + ipos = at + 2; + } + bcopy(ipos, opos, endpos - ipos); + opos += endpos - ipos; + *opos = '\0'; + } + + return ret; +} + +static char * +strnfo2txtbuf(struct stringinfo *si, size_t *plen) +{ + struct line *curline; + size_t lineno, len; + char *pos, *ret; + + for (len = lineno = 0; lineno < si->pos; lineno++) + len += si->lines[lineno].len; + + ret = malloc(len + 1); + if (ret == NULL) + return NULL; + ret[len] = '\0'; + + pos = ret; + for (lineno = 0, curline = si->lines; lineno < si->pos; lineno++, curline++) { + if (curline->atcount == 0) { + bcopy(curline->str, pos, curline->len); + pos += curline->len; + } else { + char *oldpos, *newpos, *endpos; + size_t atn; + + oldpos = curline->str; + endpos = oldpos + curline->len; + for (atn = 0; atn < curline->atcount; atn++) { + newpos = memchr(oldpos, '@', endpos - oldpos); + bcopy(oldpos, pos, newpos - oldpos + 1); + pos += newpos - oldpos + 1; + oldpos = newpos + 2; + } + bcopy(oldpos, pos, endpos - oldpos); + pos += endpos - oldpos; + } + } + + if (plen != NULL) + *plen = pos - ret; + + return ret; +} + +static int +applydelta(struct stringinfo **text, struct stringinfo *deltatext) +{ + SLIST_HEAD(, rcsdelta) deltas; + struct rcsdelta *curdelta; + struct stringinfo *curtext; + size_t lineno; + int ret = -1; + + curdelta = NULL; + SLIST_INIT(&deltas); + + curtext = *text; + for (lineno = 0; lineno < deltatext->pos; lineno++) { + char *pos, *endpos; + + pos = deltatext->lines[lineno].str; + endpos = pos + deltatext->lines[lineno].len; + if (endpos - pos < 5) /* check for minimum */ + goto fail; + + curdelta = calloc(1, sizeof(struct rcsdelta)); + if (curdelta == NULL) + goto fail; + + if (*pos != 'a' && *pos != 'd') + goto fail; + curdelta->action = *pos; + pos++; + for (curdelta->pos = 0; pos < endpos && isdigit(*pos); pos++) + curdelta->pos = curdelta->pos * 10 + *pos - '0'; + + if (pos == endpos || *pos++ != ' ' || pos == endpos) + goto fail; + + for (curdelta->len = 0; pos < endpos && isdigit(*pos); pos++) + curdelta->len = curdelta->len * 10 + *pos - '0'; + + if (pos == endpos || *pos != '\n') + goto fail; + + if (curdelta->len == 0) + goto fail; + + if (curdelta->action == 'a') { + curdelta->lines = &deltatext->lines[lineno + 1]; + lineno += curdelta->len; + } + + SLIST_INSERT_HEAD(&deltas, curdelta, link); + curdelta = NULL; + } + + if (lineno != deltatext->pos) + goto fail; + + while ((curdelta = SLIST_FIRST(&deltas)) != NULL) { + SLIST_REMOVE_HEAD(&deltas, link); + + switch (curdelta->action) { + case 'a': + if (resizestrnfo(&curtext, curtext->pos + curdelta->len) < 0) + goto fail; + + bcopy(&curtext->lines[curdelta->pos], + &curtext->lines[curdelta->pos + curdelta->len], + (curtext->pos - curdelta->pos) * sizeof(struct line)); + bcopy(curdelta->lines, + &curtext->lines[curdelta->pos], + curdelta->len * sizeof(struct line)); + curtext->pos += curdelta->len; + break; + case 'd': + if (curdelta->pos <= 0 || + curdelta->pos > curtext->pos || + curdelta->pos + curdelta->len - 1 > curtext->pos) + goto fail; + bcopy(&curtext->lines[curdelta->pos + curdelta->len - 1], + &curtext->lines[curdelta->pos - 1], + (curtext->pos - curdelta->pos - curdelta->len + 1) * + sizeof(struct line)); + curtext->pos -= curdelta->len; + break; + } + + free(curdelta); + } + + ret = 0; + +fail: + if (curdelta != NULL) + free(curdelta); + while ((curdelta = SLIST_FIRST(&deltas)) != NULL) { + SLIST_REMOVE_HEAD(&deltas, link); + free(curdelta); + } + *text = curtext; + + return ret; +} + +static void +rcsfreerev(struct rcsrev *rev) +{ + struct rcstoken *tok; + + free(rev->rev); + free(rev->date); + free(rev->author); + if (rev->state != NULL) + free(rev->state); + if (rev->next != NULL) + free(rev->next); + while ((tok = SLIST_FIRST(&rev->branches)) != NULL) { + SLIST_REMOVE_HEAD(&rev->branches, link); + free(tok); + } + if (rev->commitid != NULL) + free(rev->commitid); + if (rev->log != NULL) + free(rev->log); + if (rev->rawtext != NULL) + free(rev->rawtext); + if (rev->text != NULL) + free(rev->text); + + free(rev); +} + +int +rcsparseadmin(struct rcsfile *rcs) +{ + if (rcs->revpos != NULL) + return 0; + + if (expecttokstr(rcs, "head") < 0) + return -1; + + if (opttok(rcs, ';') == 0) { + if ((rcs->tok->type & ~TOK_NUM) != 0) + return -1; + + rcs->admin.head = rcs->tok; + rcs->tok = NULL; + if (expecttok(rcs, ';') < 0) + return -1; + } + + if (opttokstr(rcs, "branch") > 0) { + if (opttok(rcs, ';') == 0) { + if ((rcs->tok->type & ~TOK_NUM) != 0) + return -1; + + rcs->admin.branch = rcs->tok; + rcs->tok = NULL; + if (expecttok(rcs, ';') < 0) + return -1; + } + } + + if (expecttokstr(rcs, "access") < 0) + return -1; + while (opttok(rcs, ';') == 0) { + SLIST_INSERT_HEAD(&rcs->admin.access, rcs->tok, link); + rcs->tok = NULL; + } + + if (expecttokstr(rcs, "symbols") < 0) + return -1; + while (opttok(rcs, ';') == 0) { + struct rcstokpair *pair; + + if ((rcs->tok->type & TOK_DOT) != 0) + return -1; + pair = calloc(1, sizeof(struct rcstokpair)); + if (pair == NULL) + return -1; + + pair->first = rcs->tok; + rcs->tok = NULL; + + if (expecttok(rcs, ':') < 0 || + parsetoken(rcs) == NULL || + (rcs->tok->type & ~TOK_NUM) != 0) { + free(pair); + return -1; + } + + pair->second = rcs->tok; + rcs->tok = NULL; + + RB_INSERT(rcstokmap, &rcs->admin.symbols, pair); + } + + if (expecttokstr(rcs, "locks") < 0) + return -1; + while (opttok(rcs, ';') == 0) { + struct rcstokpair *pair; + + pair = calloc(1, sizeof(struct rcstokpair)); + if (pair == NULL) + return -1; + + pair->first = rcs->tok; + rcs->tok = NULL; + + if (expecttok(rcs, ':') < 0 || + parsetoken(rcs) == NULL || + (rcs->tok->type & ~TOK_NUM) != 0) { + free(pair); + return -1; + } + + pair->second = rcs->tok; + rcs->tok = NULL; + + RB_INSERT(rcstokmap, &rcs->admin.locks, pair); + } + + if (opttokstr(rcs, "strict") > 0) { + rcs->admin.strict = 1; + if (expecttok(rcs, ';') < 0) + return -1; + } + + if (opttokstr(rcs, "comment") > 0) { + if (opttok(rcs, ';') == 0) { + rcs->admin.comment = rcs->tok; + rcs->tok = NULL; + if (expecttok(rcs, ';') < 0) + return -1; + } + } + + if (opttokstr(rcs, "expand") > 0) { + if (opttok(rcs, ';') == 0) { + rcs->admin.expand = rcs->tok; + rcs->tok = NULL; + if (expecttok(rcs, ';') < 0) + return -1; + } + } + + for (;;) { + rcs->revpos = rcs->pos; + + if (parsetoken(rcs) == NULL) + return -1; + if (tokeqstr(rcs->tok, "desc")) { + rcs->pos = rcs->tok->str; + break; + } + if ((rcs->tok->type & ~TOK_NUM) == 0) { + rcs->pos = rcs->tok->str; + break; + } + + while (opttok(rcs, ';') == 0) + ; + } + + return 0; +} + +int +rcsparsetree(struct rcsfile *rcs) +{ + struct rcsrev searchrev; + struct rcsrev *rev = NULL; + + if (rcs->deltapos != NULL) + return 0; + + if (rcsparseadmin(rcs) < 0) + return -1; + + rcs->pos = rcs->revpos; + + for (;;) { + if (parsetoken(rcs) == NULL) + return -1; + + if (tokeqstr(rcs->tok, "desc")) { + rcs->pos = rcs->tok->str; + break; + } + + rev = calloc(1, sizeof(struct rcsrev)); + if (rev == NULL) + return -1; + + if ((rcs->tok->type & ~TOK_NUM) != 0) + goto fail; + rev->rev = rcs->tok; + rcs->tok = NULL; + + if (expecttokstr(rcs, "date") < 0) + goto fail; + if (expecttok(rcs, TOK_NUM) < 0) + goto fail; + if (rcs->tok->len != 17 && rcs->tok->len != 19) + goto fail; + rev->date = rcs->tok; + rcs->tok = NULL; + if (expecttok(rcs, ';') < 0) + goto fail; + + if (expecttokstr(rcs, "author") < 0) + goto fail; + if (parsetoken(rcs) == NULL) + goto fail; + if ((rcs->tok->type & (TOK_STRING | TOK_PRINT)) != TOK_PRINT) + goto fail; + rev->author = rcs->tok; + rcs->tok = NULL; + if (expecttok(rcs, ';') < 0) + goto fail; + + if (expecttokstr(rcs, "state") < 0) + goto fail; + if (opttok(rcs, ';') == 0) { + rev->state = rcs->tok; + rcs->tok = NULL; + if (expecttok(rcs, ';') < 0) + goto fail; + } + + if (expecttokstr(rcs, "branches") < 0) + goto fail; + while (opttok(rcs, ';') == 0) { + SLIST_INSERT_HEAD(&rev->branches, rcs->tok, link); + rcs->tok = NULL; + } + + if (expecttokstr(rcs, "next") < 0) + goto fail; + if (opttok(rcs, ';') == 0) { + rev->next = rcs->tok; + rcs->tok = NULL; + if (expecttok(rcs, ';') < 0) + goto fail; + } + if (expecttokstr(rcs, "commitid") < 0) { + /* No hit, rewind */ + rcs->pos = rcs->tok->str; + } else { + if (parsetoken(rcs) == NULL) + goto fail; + rev->commitid = rcs->tok; + rcs->tok = NULL; + if (expecttok(rcs, ';') < 0) + goto fail; + } + + for (;;) { + if (parsetoken(rcs) == NULL) + return -1; + if (tokeqstr(rcs->tok, "desc")) { + rcs->pos = rcs->tok->str; + break; + } + if ((rcs->tok->type & ~TOK_NUM) == 0) { + rcs->pos = rcs->tok->str; + break; + } + + while (opttok(rcs, ';') == 0) + ; + } + + RB_INSERT(rcsrevtree, &rcs->admin.revs, rev); + rev = NULL; + } + + parsetoken(rcs); /* We *know* it is good */ + if (parsetoken(rcs) == NULL) + return -1; + rcs->admin.desc = rcs->tok; + rcs->tok = NULL; + + rcs->deltapos = rcs->pos; + + /* There are empty RCS files around */ + if (rcs->admin.head == NULL) + return 0; + + if (parsetoken(rcs) == NULL) + goto fail; + if ((rcs->tok->type & ~TOK_NUM) != 0) + goto fail; + if (!tokeqtok(rcs->tok, rcs->admin.head)) + goto fail; + + searchrev.rev = rcs->tok; + rev = RB_FIND(rcsrevtree, &rcs->admin.revs, &searchrev); + if (rev == NULL) + goto fail; + + rev->logpos = rcs->pos; + + return 0; + +fail: + if (rev != NULL) + rcsfreerev(rev); + + return -1; +} + +static int +rcsparsetext(struct rcsfile *rcs, struct rcsrev *rrev) +{ + struct rcsrev searchrev; + + if (rrev->log != NULL) + return 0; + + if (rrev->logpos == NULL) + return -1; + + rcs->pos = rrev->logpos; + + if (expecttokstr(rcs, "log") < 0) + return -1; + + if (parsestring(rcs, NULL) == NULL) + return -1; + + if (rrev->log == NULL) { + rrev->log = rcs->tok; + rcs->tok = NULL; + } + + for (;;) { + if (parsetoken(rcs) == NULL) + return -1; + if (tokeqstr(rcs->tok, "text")) + break; + + while (opttok(rcs, ';') == 0) + ; + } + + if (parsestring(rcs, &rrev->rawtext) == NULL) + return -1; + + if (parsetoken(rcs) == NULL) + return (0); /* could be end of file */ + if ((rcs->tok->type & ~TOK_NUM) != 0) + return -1; + + searchrev.rev = rcs->tok; + rrev->nextlog = RB_FIND(rcsrevtree, &rcs->admin.revs, &searchrev); + if (rrev->nextlog == NULL) + return (-1); + + rrev->nextlog->logpos = rcs->pos; + return 0; +} + +char * +rcscheckout(struct rcsfile *rcs, const char *revstr, size_t *len) +{ + struct rcsrev searchrev; + struct rcstoken searchtok; + struct rcsrev *currcsrev, *curtextrev; + struct stringinfo *curtext; + struct rcstoken *nextrev; + char *branchrev, *tmpstr; + char *retbuf, *rev; + + if (rcsparsetree(rcs) < 0) + return NULL; + + curtextrev = NULL; + curtext = NULL; + nextrev = NULL; + branchrev = NULL; + retbuf = NULL; + + rev = rcsrevfromsym(rcs, revstr); + if (rev == NULL) + goto fail; + + searchtok.str = rev; + searchtok.len = strlen(rev); + searchrev.rev = &searchtok; + currcsrev = RB_FIND(rcsrevtree, &rcs->admin.revs, &searchrev); + if (currcsrev == NULL) + goto fail; + + curtext = currcsrev->text; + if (curtext != NULL) + goto done; + + branchrev = strdup(rev); + if (branchrev == NULL) + goto fail; + tmpstr = strchr(branchrev, '.'); + if (tmpstr != NULL) + tmpstr = strchr(tmpstr + 1, '.'); + if (tmpstr != NULL) + *tmpstr = '\0'; + + searchrev.rev = rcs->admin.head; + currcsrev = RB_FIND(rcsrevtree, &rcs->admin.revs, &searchrev); + if (currcsrev == NULL) + goto fail; + + for (; currcsrev != NULL; currcsrev = currcsrev->nextlog) { + if (rcsparsetext(rcs, currcsrev) < 0) + goto fail; + + if (curtext == NULL) { + curtext = currcsrev->rawtext; + curtextrev = currcsrev; + } else { + if (nextrev == NULL) + goto fail; + + if (!tokeqtok(currcsrev->rev, nextrev)) + continue; + + if (currcsrev->text) { + /* Was expanded before */ + if (curtextrev != NULL) { + free(curtextrev->text); + curtextrev->text = NULL; + } + curtext = currcsrev->text; + curtextrev = currcsrev; + } else { + if (currcsrev->rawtext == NULL) + goto fail; + currcsrev->text = copystrnfo(curtext); + if (currcsrev->text == NULL) + goto fail; + if (applydelta(&currcsrev->text, currcsrev->rawtext) < 0) + goto fail; + if (curtextrev != NULL) { + free(curtextrev->text); + curtextrev->text = NULL; + } + curtext = currcsrev->text; + curtextrev = currcsrev; + } + } + + if (tokeqstr(currcsrev->rev, rev)) + break; + + if (tokeqstr(currcsrev->rev, branchrev)) { + size_t cmplen; + + *tmpstr = '.'; + tmpstr = strchr(tmpstr + 1, '.'); + if (tmpstr != NULL) + cmplen = tmpstr - branchrev + 1; + else + cmplen = strlen(branchrev) + 1; + + SLIST_FOREACH(nextrev, &currcsrev->branches, link) + if (tokeqstrn(nextrev, branchrev, cmplen)) + break; + + if (tmpstr != NULL) { + tmpstr = strchr(tmpstr + 1, '.'); + if (tmpstr != NULL) + *tmpstr = '\0'; + } + } else { + nextrev = currcsrev->next; + } + } + + if (currcsrev == NULL) + goto fail; + +done: + if (tokeqstr(currcsrev->state, "dead")) { + /* TODO: optimize this case */ + retbuf = strdup(""); + if (len != NULL) + *len = 0; + } else { + retbuf = strnfo2txtbuf(curtext, len); + } + +fail: + if (rev != NULL) + free(rev); + + free(branchrev); + return retbuf; +} + +char * +rcsrevfromsym(struct rcsfile *rcs, const char *sym) +{ + struct rcsrev findrev, *rev; + struct rcstokpair findpair, *pair; + struct rcstoken findtok, branchtok, *tok; + char *pos, *endpos; + char *lastdot, *last2dot; + char *retrev; + size_t dotcount; + int issym, searchbranch; + + /* To check head we only need admin info */ + if (rcsparseadmin(rcs) < 0) + return NULL; + + /* Handle special symbol "HEAD" */ + if (sym == NULL || strcmp(sym, "HEAD") == 0) { + if (rcs->admin.branch == NULL) { + tok = rcs->admin.head; + goto found; + } else { + findtok = *rcs->admin.branch; + } + } else { + findtok.str = (char *)(unsigned long)sym; + findtok.len = strlen(sym); + } + + /* We really need to wade in the revs, so parse them as well */ + if (rcsparsetree(rcs) < 0) + return NULL; + + dotcount = 0; + issym = 0; + lastdot = last2dot = NULL; + for (pos = findtok.str, endpos = pos + findtok.len; pos < endpos; pos++) { + if (*pos == '.') { + /* Two adjacent dots are invalid */ + if (pos == lastdot + 1) + return NULL; + dotcount++; + last2dot = lastdot; + lastdot = pos; + } else if (!isdigit(*pos)) { + issym = 1; + } + } + + if (issym && dotcount > 0) + return NULL; + if (*findtok.str == '.' || findtok.len == 0 || findtok.str[findtok.len - 1] == '.') + return NULL; + + if (issym) { + findpair.first = &findtok; + pair = RB_FIND(rcstokmap, &rcs->admin.symbols, &findpair); + if (pair == NULL) + return NULL; + + findtok = *pair->second; + for (pos = findtok.str, endpos = pos + findtok.len; pos < endpos; pos++) { + if (*pos == '.') { + /* Two adjacent dots are invalid */ + if (pos == lastdot + 1) + return NULL; + dotcount++; + last2dot = lastdot; + lastdot = pos; + } else if (!isdigit(*pos)) { + return NULL; + } + } + } + + searchbranch = 0; + if (dotcount == 0) { + branchtok = findtok; + findtok = *rcs->admin.head; + } else if (dotcount % 2 == 0 || + (last2dot != NULL && lastdot - last2dot == 2 && *(last2dot + 1) == '0')) { + /* + * We are explicitly searching for a branch or + * seeking a magic branch. + */ + branchtok.str = lastdot + 1; + branchtok.len = findtok.str + findtok.len - branchtok.str; + if (dotcount % 2 == 0) + findtok.len = lastdot - findtok.str; + else + findtok.len = last2dot - findtok.str; + + searchbranch = 1; + } + + findrev.rev = &findtok; + rev = RB_FIND(rcsrevtree, &rcs->admin.revs, &findrev); + if (rev == NULL) + return NULL; + + if (searchbranch) { + struct rcsrev *nextrev; + char *branchstr; + size_t branchlen; + + /* First locate the right branch, then climb up */ + branchlen = rev->rev->len + branchtok.len + 3; + branchstr = malloc(branchlen); + if (branchstr == NULL) + return NULL; + + bcopy(rev->rev->str, branchstr, rev->rev->len); + branchstr[rev->rev->len] = '.'; + bcopy(branchtok.str, branchstr + rev->rev->len + 1, branchtok.len); + branchstr[branchlen - 2] = '.'; + branchstr[branchlen - 1] = '\0'; + + SLIST_FOREACH(tok, &rev->branches, link) + if (tokeqstrn(tok, branchstr, branchlen - 1)) + break; + + free(branchstr); + + findrev.rev = tok; + while (findrev.rev != NULL && + (nextrev = RB_FIND(rcsrevtree, &rcs->admin.revs, &findrev)) != NULL) { + rev = nextrev; + findrev.rev = rev->next; + } + } + + if (dotcount == 0) { + for (;;) { + if (rev->rev->len > branchtok.len + 1 && + memcmp(rev->rev->str, branchtok.str, branchtok.len) == 0 && + rev->rev->str[branchtok.len] == '.') + break; + + if (rev->next == NULL) + return NULL; + + findrev.rev = rev->next; + rev = RB_FIND(rcsrevtree, &rcs->admin.revs, &findrev); + if (rev == NULL) + return NULL; + } + } + tok = rev->rev; + +found: + retrev = malloc(tok->len + 1); + if (retrev == NULL) + return NULL; + bcopy(tok->str, retrev, tok->len); + retrev[tok->len] = '\0'; + + return retrev; +} + +char * +rcsgetlog(struct rcsfile *rcs, const char *logrev) +{ + struct rcstoken findtok; + struct rcsrev findrev, *rev; + + if (rcsparsetree(rcs) < 0) + return NULL; + + findtok.str = (char *)(long)logrev; + findtok.len = strlen(logrev); + findrev.rev = &findtok; + + rev = RB_FIND(rcsrevtree, &rcs->admin.revs, &findrev); + if (rev == NULL) + return NULL; + + if (rev->log != NULL) + goto done; + + findrev.rev = rcs->admin.head; + rev = RB_FIND(rcsrevtree, &rcs->admin.revs, &findrev); + + for (; rev != NULL; rev = rev->nextlog) { + if (rcsparsetext(rcs, rev) < 0) + return NULL; + + if (tokeqstr(rev->rev, logrev)) + break; + } + + if (rev == NULL) + return NULL; + +done: + return tokstripat(rev->log); +} + +struct rcsfile * +rcsopen(const char *filename) +{ + struct stat st; + struct rcsfile *rcs; + + rcs = calloc(1, sizeof(struct rcsfile)); + if (rcs == NULL) + goto fail; + + rcs->file = open(filename, O_RDONLY); + if (rcs->file < 0) + goto fail; + + if (fstat(rcs->file, &st) < 0) + goto fail; + + rcs->size = st.st_size; + + rcs->data = mmap(NULL, rcs->size, PROT_READ, MAP_PRIVATE, rcs->file, 0); + if (rcs->data == MAP_FAILED) + goto fail; + + rcs->end = rcs->data + rcs->size; + rcs->pos = rcs->data; + + SLIST_INIT(&rcs->admin.access); + RB_INIT(&rcs->admin.symbols); + RB_INIT(&rcs->admin.locks); + RB_INIT(&rcs->admin.revs); + + return rcs; + +fail: + if (rcs != NULL && rcs->file >= 0) + close(rcs->file); + if (rcs != NULL) + free(rcs); + + return NULL; +} + +void +rcsclose(struct rcsfile *rcs) +{ + struct rcstoken *tok; + struct rcstokpair *pair; + struct rcsrev *rev; + + if (rcs->tok != NULL) { + free(rcs->tok); + + if (rcs->lasttok != NULL && rcs->lasttok != rcs->tok) + free(rcs->lasttok); + } + + if (rcs->admin.head != NULL) + free(rcs->admin.head); + if (rcs->admin.branch != NULL) + free(rcs->admin.branch); + while ((tok = SLIST_FIRST(&rcs->admin.access)) != NULL) { + SLIST_REMOVE_HEAD(&rcs->admin.access, link); + free(tok); + } + if (rcs->admin.comment != NULL) + free(rcs->admin.comment); + if (rcs->admin.expand != NULL) + free(rcs->admin.expand); + if (rcs->admin.desc != NULL) + free(rcs->admin.desc); + + while ((pair = RB_MIN(rcstokmap, &rcs->admin.symbols)) != NULL) { + RB_REMOVE(rcstokmap, &rcs->admin.symbols, pair); + free(pair->first); + free(pair->second); + free(pair); + } + + while ((pair = RB_MIN(rcstokmap, &rcs->admin.locks)) != NULL) { + RB_REMOVE(rcstokmap, &rcs->admin.locks, pair); + free(pair->first); + free(pair->second); + free(pair); + } + + while ((rev = RB_MIN(rcsrevtree, &rcs->admin.revs)) != NULL) { + RB_REMOVE(rcsrevtree, &rcs->admin.revs, rev); + rcsfreerev(rev); + } + + munmap(rcs->data, rcs->size); + close(rcs->file); + free(rcs); +} + +#ifdef TESTING +int +main(int argc, char **argv) +{ + struct rcsfile *rcs; + char *buf, *rev, *log; + int i; + size_t len; + + if (argc < 3) + errx(1, "invalid arguments"); + + rcs = rcsopen(argv[1]); + if (rcs == NULL) + return 1; + + if (rcsparseadmin(rcs) < 0) + return 1; + if (rcsparsetree(rcs) < 0) + return 2; + + for (i = 2; i < argc; i++) { + if (strcmp(argv[i], "all") == 0) { + struct rcsrev *rrev; + + RB_FOREACH(rrev, rcsrevtree, &rcs->admin.revs) { + rev = malloc(rrev->rev->len + 1); + memcpy(rev, rrev->rev->str, rrev->rev->len); + rev[rrev->rev->len] = 0; + log = rcsgetlog(rcs, rev); + free(log); + buf = rcscheckout(rcs, rev, &len); + free(buf); + free(rev); + } + } else { + rev = rcsrevfromsym(rcs, argv[i]); + if (rev == NULL) + return 3; + + log = rcsgetlog(rcs, rev); + if (log == NULL) + return 5; + printf("%s\n", log); + free(log); + + buf = rcscheckout(rcs, rev, &len); + if (buf == NULL) + return 4; + fwrite(buf, 1, len, stdout); + free(buf); + free(rev); + } + } + + rcsclose(rcs); + + return 0; +} +#endif diff --git a/swh/loader/cvs/rcsparse/rcsparse.h b/swh/loader/cvs/rcsparse/rcsparse.h new file mode 100644 index 0000000..2f4bae6 --- /dev/null +++ b/swh/loader/cvs/rcsparse/rcsparse.h @@ -0,0 +1,105 @@ +/* + * This file is part of rcsparse. + * + * rcsparse is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * rcsparse is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with rcsparse. If not, see . + */ + +#ifndef RCSPARSE_H +#define RCSPARSE_H + +#include "queue.h" +#include "tree.h" + + +struct stringinfo; + +RB_HEAD(rcsrevtree, rcsrev); +RB_HEAD(rcstokmap, rcstokpair); +SLIST_HEAD(rcstoklist, rcstoken); + +struct rcstoken { + char *str; + size_t len; + int type; + SLIST_ENTRY(rcstoken) link; +}; + +#define TOK_STRING 0x100 +#define TOK_STRINGAT 0x101 +#define TOK_DIGIT 0x200 +#define TOK_DOT 0x400 +#define TOK_PRINT 0x800 +#define TOK_NUM (TOK_DOT | TOK_DIGIT) + +struct rcstokpair { + RB_ENTRY(rcstokpair) link; + struct rcstoken *first; + struct rcstoken *second; +}; + +struct rcsrev { + RB_ENTRY(rcsrev) link; + struct rcstoken *rev; + struct rcstoken *date; + struct rcstoken *author; + struct rcstoken *state; + struct rcstoklist branches; + struct rcstoken *next; + struct rcstoken *commitid; + char *logpos; + struct rcstoken *log; + struct stringinfo *text; + struct stringinfo *rawtext; + struct rcsrev *nextlog; +}; + +struct rcsadmin { + struct rcstoken *head; + struct rcstoken *branch; + struct rcstoklist access; + struct rcstokmap symbols; + struct rcstokmap locks; + int strict; + struct rcstoken *comment; + struct rcstoken *expand; + struct rcsrevtree revs; + struct rcstoken *desc; +}; + +struct rcsfile { + int file; + size_t size; + char *data; + char *pos; + char *end; + struct rcstoken *tok; + struct rcstoken *lasttok; + char *revpos; + char *deltapos; + struct rcsadmin admin; +}; + + +struct rcsfile *rcsopen(const char *); +void rcsclose(struct rcsfile *); +int rcsparseadmin(struct rcsfile *); +int rcsparsetree(struct rcsfile *); +char *rcscheckout(struct rcsfile *, const char *, size_t *); +char *rcsrevfromsym(struct rcsfile *, const char *); +char *rcsgetlog(struct rcsfile *, const char *); + +RB_PROTOTYPE(rcsrevtree, rcsrev, link, cmprev); +RB_PROTOTYPE(rcstokmap, rcstokpair, link, cmptokpair); + +#endif diff --git a/swh/loader/cvs/rcsparse/setup.py b/swh/loader/cvs/rcsparse/setup.py new file mode 100755 index 0000000..5513674 --- /dev/null +++ b/swh/loader/cvs/rcsparse/setup.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python + +from distutils.core import setup, Extension + +setup( + name = "rcsparse", + version = "0.1", + ext_modules = [ + Extension("rcsparse", ["py-rcsparse.c", "rcsparse.c"]) + ] +) diff --git a/swh/loader/cvs/rcsparse/test,v b/swh/loader/cvs/rcsparse/test,v new file mode 100644 index 0000000..e4e49fe --- /dev/null +++ b/swh/loader/cvs/rcsparse/test,v @@ -0,0 +1,17923 @@ +head 1.472; +access; +symbols + RELENG_4_11:1.141.2.70.0.2 + RELENG_4_11_BP:1.141.2.70 + RELENG_5_3_0_RELEASE:1.438.2.4.2.1 + RELENG_5_3:1.438.2.4.0.2 + RELENG_5_3_BP:1.438.2.4 + RELENG_5:1.438.0.2 + RELENG_5_BP:1.438 + RELENG_4_10_0_RELEASE:1.141.2.67.2.1 + RELENG_4_10:1.141.2.67.0.2 + RELENG_4_10_BP:1.141.2.67 + RELENG_5_2_1_RELEASE:1.397.2.2 + RELENG_5_2_0_RELEASE:1.397.2.2 + RELENG_5_2:1.397.0.2 + RELENG_5_2_BP:1.397 + RELENG_4_9_0_RELEASE:1.141.2.63.2.1 + RELENG_4_9:1.141.2.63.0.2 + RELENG_4_9_BP:1.141.2.63 + RELENG_5_1_0_RELEASE:1.362 + RELENG_5_1:1.362.0.2 + RELENG_5_1_BP:1.362 + RELENG_4_8_0_RELEASE:1.141.2.61.2.1 + RELENG_4_8:1.141.2.61.0.2 + RELENG_4_8_BP:1.141.2.61 + RELENG_5_0_0_RELEASE:1.313 + RELENG_5_0:1.313.0.2 + RELENG_5_0_BP:1.313 + RELENG_4_7_0_RELEASE:1.141.2.56 + RELENG_4_7:1.141.2.56.0.2 + RELENG_4_7_BP:1.141.2.56 + RELENG_4_6_2_RELEASE:1.141.2.45.2.2 + RELENG_4_6_1_RELEASE:1.141.2.45.2.2 + RELENG_4_6_0_RELEASE:1.141.2.45 + RELENG_4_6:1.141.2.45.0.2 + RELENG_4_6_BP:1.141.2.45 + RELENG_4_5_0_RELEASE:1.141.2.39.2.1 + RELENG_4_5:1.141.2.39.0.2 + RELENG_4_5_BP:1.141.2.39 + RELENG_4_4_0_RELEASE:1.141.2.31.2.1 + RELENG_4_4:1.141.2.31.0.2 + RELENG_4_4_BP:1.141.2.31 + KSE_MILESTONE_2:1.215 + KSE_PRE_MILESTONE_2:1.215 + RELENG_4_3_0_RELEASE:1.141.2.26 + RELENG_4_3:1.141.2.26.0.2 + RELENG_4_3_BP:1.141.2.26 + RELENG_4_2_0_RELEASE:1.141.2.16 + RELENG_4_1_1_RELEASE:1.141.2.12 + PRE_SMPNG:1.167 + RELENG_4_1_0_RELEASE:1.141.2.4 + RELENG_3_5_0_RELEASE:1.59.2.9 + RELENG_4_0_0_RELEASE:1.141 + RELENG_4:1.141.0.2 + RELENG_4_BP:1.141 + RELENG_3_4_0_RELEASE:1.59.2.7 + RELENG_3_3_0_RELEASE:1.59.2.6 + RELENG_3_2_PAO:1.59.2.4.0.2 + RELENG_3_2_PAO_BP:1.59.2.4 + RELENG_3_2_0_RELEASE:1.59.2.4 + RELENG_3_1_0_RELEASE:1.59.2.2 + RELENG_3:1.59.0.2 + RELENG_3_BP:1.59 + RELENG_3_0_0_RELEASE:1.34; +locks; strict; +comment @# @; + + +1.472 +date 2004.12.29.19.39.06; author obrien; state Exp; +branches; +next 1.471; + +1.471 +date 2004.12.22.22.00.01; author ru; state Exp; +branches; +next 1.470; + +1.470 +date 2004.12.21.12.21.25; author ru; state Exp; +branches; +next 1.469; + +1.469 +date 2004.12.21.12.13.22; author ru; state Exp; +branches; +next 1.468; + +1.468 +date 2004.12.21.12.05.10; author ru; state Exp; +branches; +next 1.467; + +1.467 +date 2004.12.21.10.36.53; author ru; state Exp; +branches; +next 1.466; + +1.466 +date 2004.12.21.10.15.58; author ru; state Exp; +branches; +next 1.465; + +1.465 +date 2004.12.21.09.59.39; author ru; state Exp; +branches; +next 1.464; + +1.464 +date 2004.12.21.09.53.13; author ru; state Exp; +branches; +next 1.463; + +1.463 +date 2004.12.21.09.33.43; author ru; state Exp; +branches; +next 1.462; + +1.462 +date 2004.12.21.09.00.24; author ru; state Exp; +branches; +next 1.461; + +1.461 +date 2004.12.21.08.46.56; author ru; state Exp; +branches; +next 1.460; + +1.460 +date 2004.12.17.10.11.33; author ru; state Exp; +branches; +next 1.459; + +1.459 +date 2004.12.01.23.23.14; author peter; state Exp; +branches; +next 1.458; + +1.458 +date 2004.11.23.09.09.47; author ru; state Exp; +branches; +next 1.457; + +1.457 +date 2004.11.20.23.41.25; author peter; state Exp; +branches; +next 1.456; + +1.456 +date 2004.11.15.05.59.10; author peter; state Exp; +branches; +next 1.455; + +1.455 +date 2004.11.13.20.40.32; author bz; state Exp; +branches; +next 1.454; + +1.454 +date 2004.11.12.13.22.22; author ru; state Exp; +branches; +next 1.453; + +1.453 +date 2004.11.10.23.38.00; author peter; state Exp; +branches; +next 1.452; + +1.452 +date 2004.11.10.23.31.07; author peter; state Exp; +branches; +next 1.451; + +1.451 +date 2004.11.06.03.14.26; author peter; state Exp; +branches; +next 1.450; + +1.450 +date 2004.10.24.15.32.23; author ru; state Exp; +branches; +next 1.449; + +1.449 +date 2004.10.11.23.51.13; author peter; state Exp; +branches; +next 1.448; + +1.448 +date 2004.09.27.08.23.42; author dougb; state Exp; +branches; +next 1.447; + +1.447 +date 2004.09.21.21.47.05; author ru; state Exp; +branches; +next 1.446; + +1.446 +date 2004.09.21.19.01.41; author des; state Exp; +branches; +next 1.445; + +1.445 +date 2004.09.07.15.27.10; author imp; state Exp; +branches; +next 1.444; + +1.444 +date 2004.09.07.15.19.40; author imp; state Exp; +branches; +next 1.443; + +1.443 +date 2004.08.26.10.24.25; author paul; state Exp; +branches; +next 1.442; + +1.442 +date 2004.08.25.22.06.29; author ru; state Exp; +branches; +next 1.441; + +1.441 +date 2004.08.24.23.12.16; author paul; state Exp; +branches; +next 1.440; + +1.440 +date 2004.08.18.13.21.40; author ru; state Exp; +branches; +next 1.439; + +1.439 +date 2004.08.18.06.49.56; author ru; state Exp; +branches; +next 1.438; + +1.438 +date 2004.08.16.18.17.14; author ru; state Exp; +branches + 1.438.2.1; +next 1.437; + +1.437 +date 2004.08.11.16.45.20; author harti; state Exp; +branches; +next 1.436; + +1.436 +date 2004.08.11.11.02.26; author ru; state Exp; +branches; +next 1.435; + +1.435 +date 2004.08.10.13.18.05; author harti; state Exp; +branches; +next 1.434; + +1.434 +date 2004.08.09.11.38.41; author harti; state Exp; +branches; +next 1.433; + +1.433 +date 2004.08.09.10.51.01; author obrien; state Exp; +branches; +next 1.432; + +1.432 +date 2004.07.28.05.27.17; author kan; state Exp; +branches; +next 1.431; + +1.431 +date 2004.07.08.09.08.09; author harti; state Exp; +branches; +next 1.430; + +1.430 +date 2004.06.17.08.06.41; author obrien; state Exp; +branches; +next 1.429; + +1.429 +date 2004.06.17.05.27.56; author obrien; state Exp; +branches; +next 1.428; + +1.428 +date 2004.06.17.02.59.53; author obrien; state Exp; +branches; +next 1.427; + +1.427 +date 2004.05.17.16.19.51; author ru; state Exp; +branches; +next 1.426; + +1.426 +date 2004.05.13.07.51.46; author ru; state Exp; +branches; +next 1.425; + +1.425 +date 2004.05.12.07.02.17; author ru; state Exp; +branches; +next 1.424; + +1.424 +date 2004.04.27.15.00.29; author ru; state Exp; +branches; +next 1.423; + +1.423 +date 2004.04.14.16.06.17; author harti; state Exp; +branches; +next 1.422; + +1.422 +date 2004.04.13.13.42.01; author des; state Exp; +branches; +next 1.421; + +1.421 +date 2004.03.24.08.26.22; author ru; state Exp; +branches; +next 1.420; + +1.420 +date 2004.03.19.17.57.07; author ru; state Exp; +branches; +next 1.419; + +1.419 +date 2004.03.19.15.08.58; author ru; state Exp; +branches; +next 1.418; + +1.418 +date 2004.03.18.10.17.03; author ru; state Exp; +branches; +next 1.417; + +1.417 +date 2004.03.14.16.44.27; author ru; state Exp; +branches; +next 1.416; + +1.416 +date 2004.03.13.15.46.34; author ru; state Exp; +branches; +next 1.415; + +1.415 +date 2004.03.12.13.24.17; author ru; state Exp; +branches; +next 1.414; + +1.414 +date 2004.03.12.13.20.24; author ru; state Exp; +branches; +next 1.413; + +1.413 +date 2004.03.12.03.46.15; author gshapiro; state Exp; +branches; +next 1.412; + +1.412 +date 2004.03.11.00.22.04; author mlaier; state Exp; +branches; +next 1.411; + +1.411 +date 2004.03.10.16.34.11; author mlaier; state Exp; +branches; +next 1.410; + +1.410 +date 2004.03.05.18.16.28; author gad; state Exp; +branches; +next 1.409; + +1.409 +date 2004.03.04.18.41.35; author gad; state Exp; +branches; +next 1.408; + +1.408 +date 2004.03.04.09.14.30; author bde; state Exp; +branches; +next 1.407; + +1.407 +date 2004.03.03.22.56.41; author gad; state Exp; +branches; +next 1.406; + +1.406 +date 2004.03.03.19.36.19; author gad; state Exp; +branches; +next 1.405; + +1.405 +date 2004.02.13.21.52.08; author ru; state Exp; +branches; +next 1.404; + +1.404 +date 2004.01.31.08.15.52; author ru; state Exp; +branches; +next 1.403; + +1.403 +date 2004.01.23.16.22.48; author harti; state Exp; +branches; +next 1.402; + +1.402 +date 2004.01.22.08.18.36; author ru; state Exp; +branches; +next 1.401; + +1.401 +date 2004.01.17.01.24.13; author ru; state Exp; +branches; +next 1.400; + +1.400 +date 2004.01.16.16.06.54; author ru; state Exp; +branches; +next 1.399; + +1.399 +date 2004.01.15.09.50.54; author ru; state Exp; +branches; +next 1.398; + +1.398 +date 2003.12.09.00.42.44; author gad; state Exp; +branches; +next 1.397; + +1.397 +date 2003.11.16.21.17.43; author gordon; state Exp; +branches + 1.397.2.1; +next 1.396; + +1.396 +date 2003.11.12.17.09.12; author harti; state Exp; +branches; +next 1.395; + +1.395 +date 2003.11.10.09.00.08; author harti; state Exp; +branches; +next 1.394; + +1.394 +date 2003.11.03.21.09.47; author ru; state Exp; +branches; +next 1.393; + +1.393 +date 2003.10.04.18.53.38; author ru; state Exp; +branches; +next 1.392; + +1.392 +date 2003.09.16.12.53.18; author ru; state Exp; +branches; +next 1.391; + +1.391 +date 2003.09.15.21.18.30; author ru; state Exp; +branches; +next 1.390; + +1.390 +date 2003.09.07.14.15.40; author ru; state Exp; +branches; +next 1.389; + +1.389 +date 2003.09.01.06.43.24; author scottl; state Exp; +branches; +next 1.388; + +1.388 +date 2003.08.30.13.48.16; author ru; state Exp; +branches; +next 1.387; + +1.387 +date 2003.08.28.20.13.34; author marcel; state Exp; +branches; +next 1.386; + +1.386 +date 2003.08.27.04.49.43; author imp; state Exp; +branches; +next 1.385; + +1.385 +date 2003.08.25.18.30.06; author imp; state Exp; +branches; +next 1.384; + +1.384 +date 2003.08.25.17.48.25; author imp; state Exp; +branches; +next 1.383; + +1.383 +date 2003.08.17.07.50.15; author gordon; state Exp; +branches; +next 1.382; + +1.382 +date 2003.07.24.18.14.29; author markm; state Exp; +branches; +next 1.381; + +1.381 +date 2003.07.14.16.21.16; author gordon; state Exp; +branches; +next 1.380; + +1.380 +date 2003.07.11.17.01.58; author gordon; state Exp; +branches; +next 1.379; + +1.379 +date 2003.07.11.16.57.43; author gordon; state Exp; +branches; +next 1.378; + +1.378 +date 2003.07.10.05.29.56; author kris; state Exp; +branches; +next 1.377; + +1.377 +date 2003.07.08.01.24.21; author obrien; state Exp; +branches; +next 1.376; + +1.376 +date 2003.07.06.19.37.40; author gshapiro; state Exp; +branches; +next 1.375; + +1.375 +date 2003.07.04.14.27.06; author ru; state Exp; +branches; +next 1.374; + +1.374 +date 2003.07.02.19.26.19; author gordon; state Exp; +branches; +next 1.373; + +1.373 +date 2003.07.01.23.10.39; author gordon; state Exp; +branches; +next 1.372; + +1.372 +date 2003.07.01.12.57.53; author ru; state Exp; +branches; +next 1.371; + +1.371 +date 2003.07.01.12.25.11; author ru; state Exp; +branches; +next 1.370; + +1.370 +date 2003.06.30.05.59.35; author gordon; state Exp; +branches; +next 1.369; + +1.369 +date 2003.06.28.04.46.45; author smkelly; state Exp; +branches; +next 1.368; + +1.368 +date 2003.06.22.10.01.03; author simokawa; state Exp; +branches; +next 1.367; + +1.367 +date 2003.06.14.17.50.13; author imp; state Exp; +branches; +next 1.366; + +1.366 +date 2003.06.14.13.30.32; author des; state Exp; +branches; +next 1.365; + +1.365 +date 2003.06.08.04.15.05; author imp; state Exp; +branches; +next 1.364; + +1.364 +date 2003.06.07.18.16.12; author imp; state Exp; +branches; +next 1.363; + +1.363 +date 2003.05.31.21.29.38; author obrien; state Exp; +branches; +next 1.362; + +1.362 +date 2003.05.21.21.47.20; author ru; state Exp; +branches + 1.362.2.1; +next 1.361; + +1.361 +date 2003.05.19.15.51.58; author des; state Exp; +branches; +next 1.360; + +1.360 +date 2003.05.18.20.22.26; author ru; state Exp; +branches; +next 1.359; + +1.359 +date 2003.05.18.00.40.22; author ru; state Exp; +branches; +next 1.358; + +1.358 +date 2003.05.17.23.07.09; author ru; state Exp; +branches; +next 1.357; + +1.357 +date 2003.05.15.17.59.32; author ru; state Exp; +branches; +next 1.356; + +1.356 +date 2003.05.05.12.54.26; author bde; state Exp; +branches; +next 1.355; + +1.355 +date 2003.05.05.08.44.40; author markm; state Exp; +branches; +next 1.354; + +1.354 +date 2003.05.04.04.14.10; author imp; state Exp; +branches; +next 1.353; + +1.353 +date 2003.05.01.20.41.03; author ru; state Exp; +branches; +next 1.352; + +1.352 +date 2003.04.30.12.38.20; author ru; state Exp; +branches; +next 1.351; + +1.351 +date 2003.04.30.11.17.33; author markm; state Exp; +branches; +next 1.350; + +1.350 +date 2003.04.30.10.58.52; author ru; state Exp; +branches; +next 1.349; + +1.349 +date 2003.04.16.21.05.06; author jhb; state Exp; +branches; +next 1.348; + +1.348 +date 2003.04.14.14.46.13; author ru; state Exp; +branches; +next 1.347; + +1.347 +date 2003.04.13.16.26.31; author ru; state Exp; +branches; +next 1.346; + +1.346 +date 2003.04.13.16.05.28; author ru; state Exp; +branches; +next 1.345; + +1.345 +date 2003.04.13.15.43.29; author ru; state Exp; +branches; +next 1.344; + +1.344 +date 2003.04.13.15.09.26; author ru; state Exp; +branches; +next 1.343; + +1.343 +date 2003.04.13.14.34.17; author ru; state Exp; +branches; +next 1.342; + +1.342 +date 2003.04.13.11.42.55; author ru; state Exp; +branches; +next 1.341; + +1.341 +date 2003.04.12.15.07.46; author ru; state Exp; +branches; +next 1.340; + +1.340 +date 2003.04.11.17.58.17; author ru; state Exp; +branches; +next 1.339; + +1.339 +date 2003.04.07.00.01.33; author ru; state Exp; +branches; +next 1.338; + +1.338 +date 2003.04.06.23.46.02; author imp; state Exp; +branches; +next 1.337; + +1.337 +date 2003.04.06.21.46.44; author imp; state Exp; +branches; +next 1.336; + +1.336 +date 2003.04.06.21.39.20; author ru; state Exp; +branches; +next 1.335; + +1.335 +date 2003.04.06.21.33.49; author ru; state Exp; +branches; +next 1.334; + +1.334 +date 2003.04.06.21.23.02; author ru; state Exp; +branches; +next 1.333; + +1.333 +date 2003.04.06.03.50.28; author imp; state Exp; +branches; +next 1.332; + +1.332 +date 2003.04.05.20.30.29; author imp; state Exp; +branches; +next 1.331; + +1.331 +date 2003.04.04.22.46.08; author imp; state Exp; +branches; +next 1.330; + +1.330 +date 2003.04.01.11.39.04; author ru; state Exp; +branches; +next 1.329; + +1.329 +date 2003.04.01.11.29.29; author ru; state Exp; +branches; +next 1.328; + +1.328 +date 2003.03.31.13.10.51; author ru; state Exp; +branches; +next 1.327; + +1.327 +date 2003.03.31.12.58.33; author ru; state Exp; +branches; +next 1.326; + +1.326 +date 2003.03.11.11.45.43; author ru; state Exp; +branches; +next 1.325; + +1.325 +date 2003.03.08.10.01.26; author markm; state Exp; +branches; +next 1.324; + +1.324 +date 2003.03.06.13.54.31; author ru; state Exp; +branches; +next 1.323; + +1.323 +date 2003.03.04.17.24.17; author ru; state Exp; +branches; +next 1.322; + +1.322 +date 2003.03.04.09.49.00; author ru; state Exp; +branches; +next 1.321; + +1.321 +date 2003.03.03.11.19.18; author ru; state Exp; +branches; +next 1.320; + +1.320 +date 2003.03.03.08.50.32; author ru; state Exp; +branches; +next 1.319; + +1.319 +date 2003.02.24.20.09.16; author ru; state Exp; +branches; +next 1.318; + +1.318 +date 2003.02.21.11.19.25; author ru; state Exp; +branches; +next 1.317; + +1.317 +date 2003.02.11.19.21.13; author trhodes; state Exp; +branches; +next 1.316; + +1.316 +date 2003.02.07.07.29.57; author jkoshy; state Exp; +branches; +next 1.315; + +1.315 +date 2003.02.04.08.15.30; author phk; state Exp; +branches; +next 1.314; + +1.314 +date 2002.12.30.10.01.25; author obrien; state Exp; +branches; +next 1.313; + +1.313 +date 2002.12.02.14.03.40; author ru; state Exp; +branches + 1.313.2.1; +next 1.312; + +1.312 +date 2002.11.14.19.24.50; author ru; state Exp; +branches; +next 1.311; + +1.311 +date 2002.11.13.13.49.29; author ru; state Exp; +branches; +next 1.310; + +1.310 +date 2002.11.03.23.48.14; author scottl; state Exp; +branches; +next 1.309; + +1.309 +date 2002.10.28.08.44.59; author ru; state Exp; +branches; +next 1.308; + +1.308 +date 2002.10.27.03.38.57; author peter; state Exp; +branches; +next 1.307; + +1.307 +date 2002.10.25.19.15.29; author peter; state Exp; +branches; +next 1.306; + +1.306 +date 2002.10.22.08.30.31; author ru; state Exp; +branches; +next 1.305; + +1.305 +date 2002.10.20.11.18.55; author markm; state Exp; +branches; +next 1.304; + +1.304 +date 2002.09.17.01.48.47; author peter; state Exp; +branches; +next 1.303; + +1.303 +date 2002.08.23.12.49.16; author johan; state Exp; +branches; +next 1.302; + +1.302 +date 2002.08.08.15.43.23; author ru; state Exp; +branches; +next 1.301; + +1.301 +date 2002.08.07.13.41.46; author ru; state Exp; +branches; +next 1.300; + +1.300 +date 2002.08.05.08.54.26; author ru; state Exp; +branches; +next 1.299; + +1.299 +date 2002.08.02.18.04.21; author ru; state Exp; +branches; +next 1.298; + +1.298 +date 2002.07.31.03.56.03; author jhb; state Exp; +branches; +next 1.297; + +1.297 +date 2002.07.24.23.08.57; author ru; state Exp; +branches; +next 1.296; + +1.296 +date 2002.07.24.22.44.19; author peter; state Exp; +branches; +next 1.295; + +1.295 +date 2002.07.11.16.43.59; author ru; state Exp; +branches; +next 1.294; + +1.294 +date 2002.07.01.17.51.43; author jmallett; state Exp; +branches; +next 1.293; + +1.293 +date 2002.07.01.05.43.11; author jmallett; state Exp; +branches; +next 1.292; + +1.292 +date 2002.06.21.08.54.02; author ru; state Exp; +branches; +next 1.291; + +1.291 +date 2002.06.16.14.24.51; author sobomax; state Exp; +branches; +next 1.290; + +1.290 +date 2002.06.06.13.45.45; author ru; state Exp; +branches; +next 1.289; + +1.289 +date 2002.05.31.13.04.09; author ru; state Exp; +branches; +next 1.288; + +1.288 +date 2002.05.30.19.46.34; author peter; state Exp; +branches; +next 1.287; + +1.287 +date 2002.05.29.03.59.20; author peter; state Exp; +branches; +next 1.286; + +1.286 +date 2002.05.29.00.48.14; author peter; state Exp; +branches; +next 1.285; + +1.285 +date 2002.05.28.07.30.20; author ru; state Exp; +branches; +next 1.284; + +1.284 +date 2002.05.27.15.51.38; author ru; state Exp; +branches; +next 1.283; + +1.283 +date 2002.05.25.13.29.46; author ru; state Exp; +branches; +next 1.282; + +1.282 +date 2002.05.20.14.42.48; author ru; state Exp; +branches; +next 1.281; + +1.281 +date 2002.05.18.18.23.04; author obrien; state Exp; +branches; +next 1.280; + +1.280 +date 2002.05.18.18.17.13; author obrien; state Exp; +branches; +next 1.279; + +1.279 +date 2002.05.18.00.20.01; author obrien; state Exp; +branches; +next 1.278; + +1.278 +date 2002.05.16.08.55.59; author markm; state Exp; +branches; +next 1.277; + +1.277 +date 2002.05.15.16.29.44; author ru; state Exp; +branches; +next 1.276; + +1.276 +date 2002.05.15.16.19.54; author ru; state Exp; +branches; +next 1.275; + +1.275 +date 2002.05.14.08.30.40; author ru; state Exp; +branches; +next 1.274; + +1.274 +date 2002.05.14.07.30.40; author ru; state Exp; +branches; +next 1.273; + +1.273 +date 2002.05.12.16.00.43; author ru; state Exp; +branches; +next 1.272; + +1.272 +date 2002.05.12.13.37.59; author obrien; state Exp; +branches; +next 1.271; + +1.271 +date 2002.05.10.00.46.53; author obrien; state Exp; +branches; +next 1.270; + +1.270 +date 2002.05.09.20.48.19; author des; state Exp; +branches; +next 1.269; + +1.269 +date 2002.05.09.20.36.42; author obrien; state Exp; +branches; +next 1.268; + +1.268 +date 2002.05.08.20.35.12; author obrien; state Exp; +branches; +next 1.267; + +1.267 +date 2002.05.07.07.49.12; author obrien; state Exp; +branches; +next 1.266; + +1.266 +date 2002.04.30.23.29.00; author bde; state Exp; +branches; +next 1.265; + +1.265 +date 2002.04.30.11.50.01; author ru; state Exp; +branches; +next 1.264; + +1.264 +date 2002.04.30.11.46.49; author ru; state Exp; +branches; +next 1.263; + +1.263 +date 2002.04.30.09.34.53; author ru; state Exp; +branches; +next 1.262; + +1.262 +date 2002.04.29.15.22.01; author ru; state Exp; +branches; +next 1.261; + +1.261 +date 2002.04.26.17.55.10; author ru; state Exp; +branches; +next 1.260; + +1.260 +date 2002.04.20.19.04.59; author gshapiro; state Exp; +branches; +next 1.259; + +1.259 +date 2002.04.16.14.38.15; author ru; state Exp; +branches; +next 1.258; + +1.258 +date 2002.04.16.14.35.01; author ru; state Exp; +branches; +next 1.257; + +1.257 +date 2002.04.15.15.31.25; author des; state Exp; +branches; +next 1.256; + +1.256 +date 2002.04.15.11.31.52; author des; state Exp; +branches; +next 1.255; + +1.255 +date 2002.04.13.07.24.14; author des; state Exp; +branches; +next 1.254; + +1.254 +date 2002.04.12.19.46.22; author ru; state Exp; +branches; +next 1.253; + +1.253 +date 2002.04.11.14.49.25; author ru; state Exp; +branches; +next 1.252; + +1.252 +date 2002.04.11.13.43.50; author ru; state Exp; +branches; +next 1.251; + +1.251 +date 2002.04.08.15.11.29; author ru; state Exp; +branches; +next 1.250; + +1.250 +date 2002.04.08.07.40.41; author ru; state Exp; +branches; +next 1.249; + +1.249 +date 2002.04.04.06.49.46; author ru; state Exp; +branches; +next 1.248; + +1.248 +date 2002.04.01.20.47.27; author joe; state Exp; +branches; +next 1.247; + +1.247 +date 2002.04.01.16.59.43; author joe; state Exp; +branches; +next 1.246; + +1.246 +date 2002.03.26.16.05.09; author ru; state Exp; +branches; +next 1.245; + +1.245 +date 2002.03.20.18.25.48; author ru; state Exp; +branches; +next 1.244; + +1.244 +date 2002.03.20.09.39.16; author ru; state Exp; +branches; +next 1.243; + +1.243 +date 2002.03.16.21.41.09; author markm; state Exp; +branches; +next 1.242; + +1.242 +date 2002.03.16.14.55.37; author markm; state Exp; +branches; +next 1.241; + +1.241 +date 2002.03.06.08.24.32; author obrien; state Exp; +branches; +next 1.240; + +1.240 +date 2002.02.21.10.23.41; author ru; state Exp; +branches; +next 1.239; + +1.239 +date 2002.02.14.13.06.52; author ru; state Exp; +branches; +next 1.238; + +1.238 +date 2002.02.11.16.47.04; author ru; state Exp; +branches; +next 1.237; + +1.237 +date 2002.02.08.13.42.55; author ru; state Exp; +branches; +next 1.236; + +1.236 +date 2002.02.08.13.09.07; author ru; state Exp; +branches; +next 1.235; + +1.235 +date 2001.12.28.11.53.18; author paul; state Exp; +branches; +next 1.234; + +1.234 +date 2001.12.23.22.49.06; author jedgar; state Exp; +branches; +next 1.233; + +1.233 +date 2001.12.21.01.44.11; author jedgar; state Exp; +branches; +next 1.232; + +1.232 +date 2001.12.13.17.00.59; author imp; state Exp; +branches; +next 1.231; + +1.231 +date 2001.12.13.01.37.45; author imp; state Exp; +branches; +next 1.230; + +1.230 +date 2001.12.11.16.10.26; author phantom; state Exp; +branches; +next 1.229; + +1.229 +date 2001.12.06.07.44.47; author jhb; state Exp; +branches; +next 1.228; + +1.228 +date 2001.11.19.17.43.29; author obrien; state Exp; +branches; +next 1.227; + +1.227 +date 2001.11.16.03.02.34; author matusita; state Exp; +branches; +next 1.226; + +1.226 +date 2001.11.15.07.09.00; author matusita; state Exp; +branches; +next 1.225; + +1.225 +date 2001.11.15.07.04.23; author matusita; state Exp; +branches; +next 1.224; + +1.224 +date 2001.11.14.16.48.47; author matusita; state Exp; +branches; +next 1.223; + +1.223 +date 2001.11.13.15.47.40; author matusita; state Exp; +branches; +next 1.222; + +1.222 +date 2001.11.02.23.48.31; author obrien; state Exp; +branches; +next 1.221; + +1.221 +date 2001.11.01.06.14.42; author obrien; state Exp; +branches; +next 1.220; + +1.220 +date 2001.10.25.07.28.55; author ru; state Exp; +branches; +next 1.219; + +1.219 +date 2001.09.29.13.17.53; author ru; state Exp; +branches; +next 1.218; + +1.218 +date 2001.09.25.12.17.52; author ru; state Exp; +branches; +next 1.217; + +1.217 +date 2001.09.20.12.24.10; author markm; state Exp; +branches; +next 1.216; + +1.216 +date 2001.09.17.11.50.36; author ru; state Exp; +branches; +next 1.215; + +1.215 +date 2001.08.29.09.11.03; author bde; state Exp; +branches; +next 1.214; + +1.214 +date 2001.08.27.12.01.46; author paul; state Exp; +branches; +next 1.213; + +1.213 +date 2001.08.26.18.39.07; author paul; state Exp; +branches; +next 1.212; + +1.212 +date 2001.08.26.17.47.21; author markm; state Exp; +branches; +next 1.211; + +1.211 +date 2001.08.26.17.45.56; author markm; state Exp; +branches; +next 1.210; + +1.210 +date 2001.08.19.21.32.52; author kris; state Exp; +branches; +next 1.209; + +1.209 +date 2001.08.17.17.21.38; author obrien; state Exp; +branches; +next 1.208; + +1.208 +date 2001.08.04.18.25.38; author tmm; state Exp; +branches; +next 1.207; + +1.207 +date 2001.07.29.08.58.16; author dd; state Exp; +branches; +next 1.206; + +1.206 +date 2001.07.09.17.49.34; author markm; state Exp; +branches; +next 1.205; + +1.205 +date 2001.06.14.01.35.22; author peter; state Exp; +branches; +next 1.204; + +1.204 +date 2001.06.13.15.18.11; author ru; state Exp; +branches; +next 1.203; + +1.203 +date 2001.06.11.18.09.08; author ru; state Exp; +branches; +next 1.202; + +1.202 +date 2001.05.28.16.54.02; author ru; state Exp; +branches; +next 1.201; + +1.201 +date 2001.05.14.17.21.02; author ru; state Exp; +branches; +next 1.200; + +1.200 +date 2001.04.26.17.54.24; author asmodai; state Exp; +branches; +next 1.199; + +1.199 +date 2001.04.24.20.19.29; author asmodai; state Exp; +branches; +next 1.198; + +1.198 +date 2001.04.24.02.57.42; author gshapiro; state Exp; +branches; +next 1.197; + +1.197 +date 2001.04.18.12.20.28; author ru; state Exp; +branches; +next 1.196; + +1.196 +date 2001.03.27.05.44.32; author ken; state Exp; +branches; +next 1.195; + +1.195 +date 2001.03.26.12.46.17; author ru; state Exp; +branches; +next 1.194; + +1.194 +date 2001.03.22.09.54.25; author ru; state Exp; +branches; +next 1.193; + +1.193 +date 2001.03.02.16.52.06; author ru; state Exp; +branches; +next 1.192; + +1.192 +date 2001.02.22.22.58.24; author jhb; state Exp; +branches; +next 1.191; + +1.191 +date 2001.02.22.08.27.17; author jhb; state Exp; +branches; +next 1.190; + +1.190 +date 2001.02.17.06.06.11; author bde; state Exp; +branches; +next 1.189; + +1.189 +date 2001.02.14.19.50.42; author markm; state Exp; +branches; +next 1.188; + +1.188 +date 2001.02.14.19.48.51; author markm; state Exp; +branches; +next 1.187; + +1.187 +date 2001.01.23.09.52.50; author peter; state Exp; +branches; +next 1.186; + +1.186 +date 2001.01.22.23.29.13; author peter; state Exp; +branches; +next 1.185; + +1.185 +date 2001.01.22.23.10.01; author peter; state Exp; +branches; +next 1.184; + +1.184 +date 2001.01.22.08.07.58; author imp; state Exp; +branches; +next 1.183; + +1.183 +date 2001.01.22.07.29.48; author peter; state Exp; +branches; +next 1.182; + +1.182 +date 2001.01.21.23.44.41; author jkh; state Exp; +branches; +next 1.181; + +1.181 +date 2001.01.19.09.23.59; author peter; state Exp; +branches; +next 1.180; + +1.180 +date 2000.12.24.14.58.34; author kato; state Exp; +branches; +next 1.179; + +1.179 +date 2000.12.03.20.29.31; author marcel; state Exp; +branches; +next 1.178; + +1.178 +date 2000.11.24.11.13.15; author sheldonh; state Exp; +branches; +next 1.177; + +1.177 +date 2000.11.21.04.37.29; author marcel; state Exp; +branches; +next 1.176; + +1.176 +date 2000.11.20.02.17.30; author marcel; state Exp; +branches; +next 1.175; + +1.175 +date 2000.11.10.22.02.06; author obrien; state Exp; +branches; +next 1.174; + +1.174 +date 2000.10.28.21.26.44; author obrien; state Exp; +branches; +next 1.173; + +1.173 +date 2000.10.25.04.31.32; author jkoshy; state Exp; +branches; +next 1.172; + +1.172 +date 2000.10.13.01.19.36; author obrien; state Exp; +branches; +next 1.171; + +1.171 +date 2000.09.18.03.35.49; author gibbs; state Exp; +branches; +next 1.170; + +1.170 +date 2000.09.17.21.02.58; author imp; state Exp; +branches; +next 1.169; + +1.169 +date 2000.09.09.14.37.06; author des; state Exp; +branches; +next 1.168; + +1.168 +date 2000.09.09.04.42.34; author peter; state Exp; +branches; +next 1.167; + +1.167 +date 2000.09.03.02.58.39; author obrien; state Exp; +branches; +next 1.166; + +1.166 +date 2000.08.13.12.36.40; author joe; state Exp; +branches; +next 1.165; + +1.165 +date 2000.08.07.14.35.49; author sheldonh; state Exp; +branches; +next 1.164; + +1.164 +date 2000.08.03.05.52.22; author marcel; state Exp; +branches; +next 1.163; + +1.163 +date 2000.07.23.21.30.35; author marcel; state Exp; +branches; +next 1.162; + +1.162 +date 2000.07.23.17.38.32; author marcel; state Exp; +branches; +next 1.161; + +1.161 +date 2000.07.23.16.43.03; author marcel; state Exp; +branches; +next 1.160; + +1.160 +date 2000.07.23.00.20.56; author marcel; state Exp; +branches; +next 1.159; + +1.159 +date 2000.07.20.03.03.23; author marcel; state Exp; +branches; +next 1.158; + +1.158 +date 2000.07.19.22.48.52; author marcel; state Exp; +branches; +next 1.157; + +1.157 +date 2000.07.19.18.18.21; author marcel; state Exp; +branches; +next 1.156; + +1.156 +date 2000.07.19.04.41.59; author marcel; state Exp; +branches; +next 1.155; + +1.155 +date 2000.07.18.01.49.05; author ache; state Exp; +branches; +next 1.154; + +1.154 +date 2000.07.18.00.21.05; author ache; state Exp; +branches; +next 1.153; + +1.153 +date 2000.07.02.16.15.03; author markm; state Exp; +branches; +next 1.152; + +1.152 +date 2000.06.25.15.02.18; author markm; state Exp; +branches; +next 1.151; + +1.151 +date 2000.06.15.10.00.20; author brian; state Exp; +branches; +next 1.150; + +1.150 +date 2000.06.09.10.42.36; author brian; state Exp; +branches; +next 1.149; + +1.149 +date 2000.05.05.08.02.15; author nyan; state Exp; +branches; +next 1.148; + +1.148 +date 2000.04.27.21.24.43; author wollman; state Exp; +branches; +next 1.147; + +1.147 +date 2000.04.27.19.38.57; author wollman; state Exp; +branches; +next 1.146; + +1.146 +date 2000.04.27.16.43.45; author wollman; state Exp; +branches; +next 1.145; + +1.145 +date 2000.04.27.09.20.18; author sheldonh; state Exp; +branches; +next 1.144; + +1.144 +date 2000.04.17.03.50.53; author kris; state Exp; +branches; +next 1.143; + +1.143 +date 2000.03.30.13.06.53; author sheldonh; state Exp; +branches; +next 1.142; + +1.142 +date 2000.03.29.07.30.44; author ru; state Exp; +branches; +next 1.141; + +1.141 +date 2000.03.09.06.28.19; author kris; state Exp; +branches + 1.141.2.1; +next 1.140; + +1.140 +date 2000.02.28.21.04.38; author markm; state Exp; +branches; +next 1.139; + +1.139 +date 2000.02.24.23.03.16; author markm; state Exp; +branches; +next 1.138; + +1.138 +date 2000.02.20.09.13.30; author jkh; state Exp; +branches; +next 1.137; + +1.137 +date 2000.02.03.09.43.17; author ru; state Exp; +branches; +next 1.136; + +1.136 +date 2000.01.30.20.57.58; author obrien; state Exp; +branches; +next 1.135; + +1.135 +date 2000.01.29.08.39.07; author imp; state Exp; +branches; +next 1.134; + +1.134 +date 2000.01.28.21.15.24; author imp; state Exp; +branches; +next 1.133; + +1.133 +date 2000.01.24.20.11.53; author markm; state Exp; +branches; +next 1.132; + +1.132 +date 2000.01.19.04.03.48; author kris; state Exp; +branches; +next 1.131; + +1.131 +date 2000.01.18.11.00.24; author ru; state Exp; +branches; +next 1.130; + +1.130 +date 2000.01.18.07.26.20; author ru; state Exp; +branches; +next 1.129; + +1.129 +date 2000.01.17.15.33.34; author ru; state Exp; +branches; +next 1.128; + +1.128 +date 2000.01.12.14.33.00; author marcel; state Exp; +branches; +next 1.127; + +1.127 +date 2000.01.12.10.00.36; author marcel; state Exp; +branches; +next 1.126; + +1.126 +date 2000.01.11.16.23.51; author marcel; state Exp; +branches; +next 1.125; + +1.125 +date 2000.01.11.13.19.57; author obrien; state Exp; +branches; +next 1.124; + +1.124 +date 2000.01.11.12.51.51; author green; state Exp; +branches; +next 1.123; + +1.123 +date 2000.01.11.10.44.37; author marcel; state Exp; +branches; +next 1.122; + +1.122 +date 2000.01.09.17.56.40; author marcel; state Exp; +branches; +next 1.121; + +1.121 +date 2000.01.04.14.12.12; author marcel; state Exp; +branches; +next 1.120; + +1.120 +date 99.12.30.10.31.21; author markm; state Exp; +branches; +next 1.119; + +1.119 +date 99.12.29.14.47.00; author obrien; state Exp; +branches; +next 1.118; + +1.118 +date 99.12.29.14.42.41; author obrien; state Exp; +branches; +next 1.117; + +1.117 +date 99.12.29.14.18.51; author kris; state Exp; +branches; +next 1.116; + +1.116 +date 99.12.29.13.57.31; author asami; state Exp; +branches; +next 1.115; + +1.115 +date 99.12.29.13.33.54; author asami; state Exp; +branches; +next 1.114; + +1.114 +date 99.12.28.16.22.50; author kris; state Exp; +branches; +next 1.113; + +1.113 +date 99.12.23.19.18.28; author marcel; state Exp; +branches; +next 1.112; + +1.112 +date 99.12.23.11.25.34; author marcel; state Exp; +branches; +next 1.111; + +1.111 +date 99.12.22.20.27.45; author ache; state Exp; +branches; +next 1.110; + +1.110 +date 99.12.20.10.32.11; author marcel; state Exp; +branches; +next 1.109; + +1.109 +date 99.12.17.11.23.56; author marcel; state Exp; +branches; +next 1.108; + +1.108 +date 99.12.16.13.47.34; author marcel; state Exp; +branches; +next 1.107; + +1.107 +date 99.12.16.01.21.48; author billf; state Exp; +branches; +next 1.106; + +1.106 +date 99.12.12.22.24.08; author marcel; state Exp; +branches; +next 1.105; + +1.105 +date 99.12.12.21.24.07; author marcel; state Exp; +branches; +next 1.104; + +1.104 +date 99.12.12.03.54.58; author nyan; state Exp; +branches; +next 1.103; + +1.103 +date 99.12.11.17.05.36; author marcel; state Exp; +branches; +next 1.102; + +1.102 +date 99.12.10.16.13.41; author marcel; state Exp; +branches; +next 1.101; + +1.101 +date 99.12.10.11.24.06; author marcel; state Exp; +branches; +next 1.100; + +1.100 +date 99.12.10.10.48.20; author marcel; state Exp; +branches; +next 1.99; + +1.99 +date 99.12.09.16.40.25; author marcel; state Exp; +branches; +next 1.98; + +1.98 +date 99.12.09.13.36.16; author marcel; state Exp; +branches; +next 1.97; + +1.97 +date 99.12.09.10.45.09; author marcel; state Exp; +branches; +next 1.96; + +1.96 +date 99.12.08.13.45.11; author marcel; state Exp; +branches; +next 1.95; + +1.95 +date 99.11.25.20.05.07; author julian; state Exp; +branches; +next 1.94; + +1.94 +date 99.11.24.06.04.11; author obrien; state Exp; +branches; +next 1.93; + +1.93 +date 99.11.23.18.52.12; author marcel; state Exp; +branches; +next 1.92; + +1.92 +date 99.11.21.20.06.03; author marcel; state Exp; +branches; +next 1.91; + +1.91 +date 99.11.15.17.07.43; author marcel; state Exp; +branches; +next 1.90; + +1.90 +date 99.11.14.13.54.34; author marcel; state Exp; +branches; +next 1.89; + +1.89 +date 99.10.25.14.50.13; author julian; state Exp; +branches; +next 1.88; + +1.88 +date 99.10.14.06.40.43; author bp; state Exp; +branches; +next 1.87; + +1.87 +date 99.10.04.14.57.38; author peter; state Exp; +branches; +next 1.86; + +1.86 +date 99.09.20.20.27.09; author markm; state Exp; +branches; +next 1.85; + +1.85 +date 99.09.04.13.25.57; author bde; state Exp; +branches; +next 1.84; + +1.84 +date 99.08.31.06.53.39; author markm; state Exp; +branches; +next 1.83; + +1.83 +date 99.08.30.08.33.15; author peter; state Exp; +branches; +next 1.82; + +1.82 +date 99.08.28.01.35.58; author peter; state Exp; +branches; +next 1.81; + +1.81 +date 99.08.08.22.26.09; author jdp; state Exp; +branches; +next 1.80; + +1.80 +date 99.08.06.00.58.41; author jdp; state Exp; +branches; +next 1.79; + +1.79 +date 99.07.07.04.46.44; author imp; state Exp; +branches; +next 1.78; + +1.78 +date 99.06.04.17.34.28; author billf; state Exp; +branches; +next 1.77; + +1.77 +date 99.06.01.02.55.44; author billf; state Exp; +branches; +next 1.76; + +1.76 +date 99.05.03.17.54.59; author obrien; state Exp; +branches; +next 1.75; + +1.75 +date 99.05.02.15.23.55; author markm; state Exp; +branches; +next 1.74; + +1.74 +date 99.04.20.05.33.07; author jkoshy; state Exp; +branches; +next 1.73; + +1.73 +date 99.04.11.21.48.09; author des; state Exp; +branches; +next 1.72; + +1.72 +date 99.04.05.22.37.54; author obrien; state Exp; +branches; +next 1.71; + +1.71 +date 99.04.04.21.35.27; author obrien; state Exp; +branches; +next 1.70; + +1.70 +date 99.04.03.23.46.18; author obrien; state Exp; +branches; +next 1.69; + +1.69 +date 99.04.03.08.18.43; author obrien; state Exp; +branches; +next 1.68; + +1.68 +date 99.04.02.15.37.07; author peter; state Exp; +branches; +next 1.67; + +1.67 +date 99.03.31.06.42.36; author obrien; state Exp; +branches; +next 1.66; + +1.66 +date 99.03.31.06.38.13; author obrien; state Exp; +branches; +next 1.65; + +1.65 +date 99.03.01.01.09.06; author imp; state Exp; +branches; +next 1.64; + +1.64 +date 99.02.27.03.18.10; author jkh; state Exp; +branches; +next 1.63; + +1.63 +date 99.02.14.13.56.14; author des; state Exp; +branches; +next 1.62; + +1.62 +date 99.01.27.15.08.05; author jkh; state Exp; +branches; +next 1.61; + +1.61 +date 99.01.23.08.44.17; author markm; state Exp; +branches; +next 1.60; + +1.60 +date 99.01.22.15.10.05; author brandon; state Exp; +branches; +next 1.59; + +1.59 +date 99.01.20.05.45.57; author markm; state Exp; +branches + 1.59.2.1; +next 1.58; + +1.58 +date 99.01.07.13.09.15; author eivind; state Exp; +branches; +next 1.57; + +1.57 +date 99.01.07.06.26.33; author peter; state Exp; +branches; +next 1.56; + +1.56 +date 99.01.06.10.06.36; author bde; state Exp; +branches; +next 1.55; + +1.55 +date 99.01.04.12.05.59; author bde; state Exp; +branches; +next 1.54; + +1.54 +date 99.01.01.08.45.43; author peter; state Exp; +branches; +next 1.53; + +1.53 +date 98.12.30.12.06.07; author bde; state Exp; +branches; +next 1.52; + +1.52 +date 98.12.30.11.26.24; author bde; state Exp; +branches; +next 1.51; + +1.51 +date 98.12.28.17.03.50; author peter; state Exp; +branches; +next 1.50; + +1.50 +date 98.12.27.21.11.07; author phk; state Exp; +branches; +next 1.49; + +1.49 +date 98.12.21.09.41.26; author dillon; state Exp; +branches; +next 1.48; + +1.48 +date 98.12.13.04.39.01; author dillon; state Exp; +branches; +next 1.47; + +1.47 +date 98.12.13.04.32.13; author dillon; state Exp; +branches; +next 1.46; + +1.46 +date 98.11.28.13.14.58; author jkh; state Exp; +branches; +next 1.45; + +1.45 +date 98.11.28.08.19.24; author jkh; state Exp; +branches; +next 1.44; + +1.44 +date 98.11.20.02.03.52; author jdp; state Exp; +branches; +next 1.43; + +1.43 +date 98.11.18.01.59.39; author jdp; state Exp; +branches; +next 1.42; + +1.42 +date 98.11.18.00.40.38; author jdp; state Exp; +branches; +next 1.41; + +1.41 +date 98.11.15.10.03.12; author jb; state Exp; +branches; +next 1.40; + +1.40 +date 98.11.13.00.59.00; author jdp; state Exp; +branches; +next 1.39; + +1.39 +date 98.11.05.07.54.05; author msmith; state Exp; +branches; +next 1.38; + +1.38 +date 98.11.05.04.38.28; author peter; state Exp; +branches; +next 1.37; + +1.37 +date 98.11.04.12.43.46; author peter; state Exp; +branches; +next 1.36; + +1.36 +date 98.10.17.11.56.20; author bde; state Exp; +branches; +next 1.35; + +1.35 +date 98.10.16.14.22.54; author bde; state Exp; +branches; +next 1.34; + +1.34 +date 98.10.13.10.01.32; author rnordier; state Exp; +branches; +next 1.33; + +1.33 +date 98.10.13.08.13.32; author jkh; state Exp; +branches; +next 1.32; + +1.32 +date 98.10.11.19.02.27; author rnordier; state Exp; +branches; +next 1.31; + +1.31 +date 98.10.11.18.39.38; author rnordier; state Exp; +branches; +next 1.30; + +1.30 +date 98.10.11.07.41.31; author peter; state Exp; +branches; +next 1.29; + +1.29 +date 98.10.10.19.56.59; author jkh; state Exp; +branches; +next 1.28; + +1.28 +date 98.10.10.11.16.08; author kato; state Exp; +branches; +next 1.27; + +1.27 +date 98.10.10.10.54.54; author jkh; state Exp; +branches; +next 1.26; + +1.26 +date 98.10.10.08.21.18; author jkh; state Exp; +branches; +next 1.25; + +1.25 +date 98.10.09.22.22.34; author jkh; state Exp; +branches; +next 1.24; + +1.24 +date 98.10.08.09.40.17; author jkh; state Exp; +branches; +next 1.23; + +1.23 +date 98.10.05.08.06.45; author msmith; state Exp; +branches; +next 1.22; + +1.22 +date 98.09.26.01.30.36; author sos; state Exp; +branches; +next 1.21; + +1.21 +date 98.09.25.08.58.49; author sos; state Exp; +branches; +next 1.20; + +1.20 +date 98.09.23.10.30.43; author obrien; state Exp; +branches; +next 1.19; + +1.19 +date 98.09.23.06.11.35; author markm; state Exp; +branches; +next 1.18; + +1.18 +date 98.09.21.08.55.50; author jb; state Exp; +branches; +next 1.17; + +1.17 +date 98.09.17.16.32.00; author andreas; state Exp; +branches; +next 1.16; + +1.16 +date 98.09.17.09.34.51; author phk; state Exp; +branches; +next 1.15; + +1.15 +date 98.09.17.03.56.23; author gibbs; state Exp; +branches; +next 1.14; + +1.14 +date 98.09.15.11.44.30; author phk; state Exp; +branches; +next 1.13; + +1.13 +date 98.09.15.07.46.17; author gibbs; state Exp; +branches; +next 1.12; + +1.12 +date 98.09.10.00.27.57; author obrien; state Exp; +branches; +next 1.11; + +1.11 +date 98.09.10.00.13.48; author obrien; state Exp; +branches; +next 1.10; + +1.10 +date 98.09.09.19.30.20; author markm; state Exp; +branches; +next 1.9; + +1.9 +date 98.09.09.17.30.30; author markm; state Exp; +branches; +next 1.8; + +1.8 +date 98.09.09.06.01.37; author markm; state Exp; +branches; +next 1.7; + +1.7 +date 98.09.05.12.25.54; author asami; state Exp; +branches; +next 1.6; + +1.6 +date 98.09.05.11.37.14; author jb; state Exp; +branches; +next 1.5; + +1.5 +date 98.09.03.21.34.31; author jb; state Exp; +branches; +next 1.4; + +1.4 +date 98.09.01.06.07.47; author jb; state Exp; +branches; +next 1.3; + +1.3 +date 98.09.01.00.39.02; author jb; state Exp; +branches; +next 1.2; + +1.2 +date 98.08.31.20.43.13; author jb; state Exp; +branches; +next 1.1; + +1.1 +date 98.08.31.01.08.08; author jb; state Exp; +branches; +next ; + +1.59.2.1 +date 99.02.02.03.12.57; author jkh; state Exp; +branches; +next 1.59.2.2; + +1.59.2.2 +date 99.02.14.14.09.43; author des; state Exp; +branches; +next 1.59.2.3; + +1.59.2.3 +date 99.04.11.21.52.42; author des; state Exp; +branches; +next 1.59.2.4; + +1.59.2.4 +date 99.05.05.13.22.35; author markm; state Exp; +branches; +next 1.59.2.5; + +1.59.2.5 +date 99.06.11.00.24.12; author steve; state Exp; +branches; +next 1.59.2.6; + +1.59.2.6 +date 99.08.29.15.55.26; author peter; state Exp; +branches; +next 1.59.2.7; + +1.59.2.7 +date 99.11.25.20.00.31; author julian; state Exp; +branches; +next 1.59.2.8; + +1.59.2.8 +date 2000.03.23.14.56.16; author asmodai; state Exp; +branches; +next 1.59.2.9; + +1.59.2.9 +date 2000.04.05.17.55.16; author ru; state Exp; +branches; +next ; + +1.141.2.1 +date 2000.03.30.13.08.32; author sheldonh; state Exp; +branches; +next 1.141.2.2; + +1.141.2.2 +date 2000.04.05.17.52.02; author ru; state Exp; +branches; +next 1.141.2.3; + +1.141.2.3 +date 2000.05.28.12.33.40; author asmodai; state Exp; +branches; +next 1.141.2.4; + +1.141.2.4 +date 2000.06.17.03.43.06; author nyan; state Exp; +branches; +next 1.141.2.5; + +1.141.2.5 +date 2000.08.03.06.12.19; author marcel; state Exp; +branches; +next 1.141.2.6; + +1.141.2.6 +date 2000.08.15.17.51.02; author sheldonh; state Exp; +branches; +next 1.141.2.7; + +1.141.2.7 +date 2000.08.17.01.43.35; author jhb; state Exp; +branches; +next 1.141.2.8; + +1.141.2.8 +date 2000.08.23.19.27.30; author jhb; state Exp; +branches; +next 1.141.2.9; + +1.141.2.9 +date 2000.09.10.23.02.58; author peter; state Exp; +branches; +next 1.141.2.10; + +1.141.2.10 +date 2000.09.20.20.21.08; author jkh; state Exp; +branches; +next 1.141.2.11; + +1.141.2.11 +date 2000.09.22.07.49.09; author des; state Exp; +branches; +next 1.141.2.12; + +1.141.2.12 +date 2000.09.23.00.22.56; author gibbs; state Exp; +branches; +next 1.141.2.13; + +1.141.2.13 +date 2000.10.05.09.56.49; author markm; state Exp; +branches; +next 1.141.2.14; + +1.141.2.14 +date 2000.10.27.16.11.49; author asmodai; state Exp; +branches; +next 1.141.2.15; + +1.141.2.15 +date 2000.10.30.20.32.22; author obrien; state Exp; +branches; +next 1.141.2.16; + +1.141.2.16 +date 2000.11.11.21.52.39; author obrien; state Exp; +branches; +next 1.141.2.17; + +1.141.2.17 +date 2000.11.24.11.16.02; author sheldonh; state Exp; +branches; +next 1.141.2.18; + +1.141.2.18 +date 2000.12.01.21.58.09; author jkh; state Exp; +branches; +next 1.141.2.19; + +1.141.2.19 +date 2001.01.22.23.26.15; author jkh; state Exp; +branches; +next 1.141.2.20; + +1.141.2.20 +date 2001.02.02.08.33.47; author peter; state Exp; +branches; +next 1.141.2.21; + +1.141.2.21 +date 2001.02.11.03.51.45; author imp; state Exp; +branches; +next 1.141.2.22; + +1.141.2.22 +date 2001.03.04.12.39.26; author obrien; state Exp; +branches; +next 1.141.2.23; + +1.141.2.23 +date 2001.03.04.14.49.04; author markm; state Exp; +branches; +next 1.141.2.24; + +1.141.2.24 +date 2001.03.04.17.57.33; author markm; state Exp; +branches; +next 1.141.2.25; + +1.141.2.25 +date 2001.03.05.05.45.35; author obrien; state Exp; +branches; +next 1.141.2.26; + +1.141.2.26 +date 2001.03.05.13.08.30; author ru; state Exp; +branches + 1.141.2.26.2.1; +next 1.141.2.27; + +1.141.2.27 +date 2001.04.26.17.10.53; author ru; state Exp; +branches; +next 1.141.2.28; + +1.141.2.28 +date 2001.05.04.02.06.42; author gshapiro; state Exp; +branches; +next 1.141.2.29; + +1.141.2.29 +date 2001.06.11.11.18.03; author ru; state Exp; +branches; +next 1.141.2.30; + +1.141.2.30 +date 2001.08.01.14.28.41; author sheldonh; state Exp; +branches; +next 1.141.2.31; + +1.141.2.31 +date 2001.08.17.22.47.13; author obrien; state Exp; +branches + 1.141.2.31.2.1; +next 1.141.2.32; + +1.141.2.32 +date 2001.09.17.15.36.59; author ru; state Exp; +branches; +next 1.141.2.33; + +1.141.2.33 +date 2001.09.24.15.43.04; author ru; state Exp; +branches; +next 1.141.2.34; + +1.141.2.34 +date 2001.10.11.15.10.34; author ru; state Exp; +branches; +next 1.141.2.35; + +1.141.2.35 +date 2001.11.14.12.46.19; author matusita; state Exp; +branches; +next 1.141.2.36; + +1.141.2.36 +date 2001.11.14.16.50.29; author matusita; state Exp; +branches; +next 1.141.2.37; + +1.141.2.37 +date 2001.11.15.07.13.08; author matusita; state Exp; +branches; +next 1.141.2.38; + +1.141.2.38 +date 2001.11.18.10.11.40; author matusita; state Exp; +branches; +next 1.141.2.39; + +1.141.2.39 +date 2001.12.17.15.41.55; author phantom; state Exp; +branches + 1.141.2.39.2.1; +next 1.141.2.40; + +1.141.2.40 +date 2002.02.19.16.21.34; author ru; state Exp; +branches; +next 1.141.2.41; + +1.141.2.41 +date 2002.03.19.11.19.52; author ru; state Exp; +branches; +next 1.141.2.42; + +1.141.2.42 +date 2002.03.22.18.26.54; author ru; state Exp; +branches; +next 1.141.2.43; + +1.141.2.43 +date 2002.04.03.15.50.23; author joe; state Exp; +branches; +next 1.141.2.44; + +1.141.2.44 +date 2002.04.14.10.15.33; author asmodai; state Exp; +branches; +next 1.141.2.45; + +1.141.2.45 +date 2002.04.28.19.59.27; author gshapiro; state Exp; +branches + 1.141.2.45.2.1; +next 1.141.2.46; + +1.141.2.46 +date 2002.07.02.11.10.13; author des; state Exp; +branches; +next 1.141.2.47; + +1.141.2.47 +date 2002.07.17.10.37.28; author ru; state Exp; +branches; +next 1.141.2.48; + +1.141.2.48 +date 2002.07.18.08.00.43; author ru; state Exp; +branches; +next 1.141.2.49; + +1.141.2.49 +date 2002.07.22.14.21.43; author ru; state Exp; +branches; +next 1.141.2.50; + +1.141.2.50 +date 2002.07.23.08.45.20; author ru; state Exp; +branches; +next 1.141.2.51; + +1.141.2.51 +date 2002.07.23.08.55.14; author ru; state Exp; +branches; +next 1.141.2.52; + +1.141.2.52 +date 2002.07.23.09.18.30; author ru; state Exp; +branches; +next 1.141.2.53; + +1.141.2.53 +date 2002.07.23.12.12.29; author ru; state Exp; +branches; +next 1.141.2.54; + +1.141.2.54 +date 2002.07.25.09.33.13; author ru; state Exp; +branches; +next 1.141.2.55; + +1.141.2.55 +date 2002.08.08.08.44.24; author ru; state Exp; +branches; +next 1.141.2.56; + +1.141.2.56 +date 2002.08.30.18.26.49; author johan; state Exp; +branches + 1.141.2.56.2.1; +next 1.141.2.57; + +1.141.2.57 +date 2002.12.04.14.28.10; author ru; state Exp; +branches; +next 1.141.2.58; + +1.141.2.58 +date 2003.01.09.17.01.55; author des; state Exp; +branches; +next 1.141.2.59; + +1.141.2.59 +date 2003.02.14.15.17.10; author trhodes; state Exp; +branches; +next 1.141.2.60; + +1.141.2.60 +date 2003.02.25.18.07.54; author ru; state Exp; +branches; +next 1.141.2.61; + +1.141.2.61 +date 2003.03.04.17.24.18; author ru; state Exp; +branches + 1.141.2.61.2.1; +next 1.141.2.62; + +1.141.2.62 +date 2003.04.06.19.54.00; author dwmalone; state Exp; +branches; +next 1.141.2.63; + +1.141.2.63 +date 2003.07.12.23.25.29; author gshapiro; state Exp; +branches + 1.141.2.63.2.1; +next 1.141.2.64; + +1.141.2.64 +date 2003.12.13.16.05.34; author des; state Exp; +branches; +next 1.141.2.65; + +1.141.2.65 +date 2004.02.23.11.26.11; author ru; state Exp; +branches; +next 1.141.2.66; + +1.141.2.66 +date 2004.03.16.08.34.19; author ru; state Exp; +branches; +next 1.141.2.67; + +1.141.2.67 +date 2004.03.16.17.55.57; author ru; state Exp; +branches + 1.141.2.67.2.1; +next 1.141.2.68; + +1.141.2.68 +date 2004.08.09.10.36.06; author ru; state Exp; +branches; +next 1.141.2.69; + +1.141.2.69 +date 2004.12.13.13.49.58; author marius; state Exp; +branches; +next 1.141.2.70; + +1.141.2.70 +date 2004.12.13.13.58.43; author marius; state Exp; +branches + 1.141.2.70.2.1; +next ; + +1.141.2.70.2.1 +date 2004.12.17.13.41.58; author kensmith; state Exp; +branches; +next ; + +1.141.2.67.2.1 +date 2004.05.25.05.26.25; author scottl; state Exp; +branches; +next ; + +1.141.2.63.2.1 +date 2003.10.23.04.53.45; author murray; state Exp; +branches; +next ; + +1.141.2.61.2.1 +date 2003.03.25.10.36.18; author murray; state Exp; +branches; +next ; + +1.141.2.56.2.1 +date 2002.10.06.19.22.15; author murray; state Exp; +branches; +next 1.141.2.56.2.2; + +1.141.2.56.2.2 +date 2003.02.20.20.39.31; author nectar; state Exp; +branches; +next ; + +1.141.2.45.2.1 +date 2002.07.16.12.27.01; author des; state Exp; +branches; +next 1.141.2.45.2.2; + +1.141.2.45.2.2 +date 2002.07.18.07.45.46; author murray; state Exp; +branches; +next 1.141.2.45.2.3; + +1.141.2.45.2.3 +date 2002.08.19.16.33.07; author ru; state Exp; +branches; +next ; + +1.141.2.39.2.1 +date 2002.01.26.14.38.57; author murray; state Exp; +branches; +next ; + +1.141.2.31.2.1 +date 2001.09.14.17.47.51; author imp; state Exp; +branches; +next ; + +1.141.2.26.2.1 +date 2003.09.25.17.09.33; author ru; state Exp; +branches; +next ; + +1.313.2.1 +date 2003.09.25.17.09.33; author ru; state Exp; +branches; +next ; + +1.362.2.1 +date 2003.09.25.17.09.34; author ru; state Exp; +branches; +next ; + +1.397.2.1 +date 2003.12.07.04.29.35; author scottl; state Exp; +branches; +next 1.397.2.2; + +1.397.2.2 +date 2003.12.18.18.22.21; author gad; state Exp; +branches; +next ; + +1.438.2.1 +date 2004.08.20.02.57.07; author kensmith; state Exp; +branches; +next 1.438.2.2; + +1.438.2.2 +date 2004.09.22.07.11.45; author ru; state Exp; +branches; +next 1.438.2.3; + +1.438.2.3 +date 2004.09.26.03.09.15; author des; state Exp; +branches; +next 1.438.2.4; + +1.438.2.4 +date 2004.09.30.23.36.06; author dougb; state Exp; +branches + 1.438.2.4.2.1; +next 1.438.2.5; + +1.438.2.5 +date 2004.11.08.19.38.31; author ru; state Exp; +branches; +next 1.438.2.6; + +1.438.2.6 +date 2004.11.10.23.39.31; author peter; state Exp; +branches; +next 1.438.2.7; + +1.438.2.7 +date 2004.11.12.23.21.42; author peter; state Exp; +branches; +next 1.438.2.8; + +1.438.2.8 +date 2004.11.15.06.01.11; author peter; state Exp; +branches; +next 1.438.2.9; + +1.438.2.9 +date 2004.11.20.23.42.15; author peter; state Exp; +branches; +next 1.438.2.10; + +1.438.2.10 +date 2004.11.28.14.10.15; author bz; state Exp; +branches; +next 1.438.2.11; + +1.438.2.11 +date 2004.12.25.07.52.41; author ru; state Exp; +branches; +next ; + +1.438.2.4.2.1 +date 2004.10.24.09.24.25; author scottl; state Exp; +branches; +next ; + + +desc +@@ + + +1.472 +log +@Remove the special sparc64 time_t support. +If someone isn't running with a 64-bit time_t by now, they don't +track -CURRENT and would probably go to RELENG_5 vs. 6-CURRENT. +@ +text +@# +# $FreeBSD$ +# +# Make command line options: +# -DNO_DYNAMICROOT do not link /bin and /sbin dynamically +# -DNO_KERBEROS Do not build Heimdal (Kerberos 5) +# -DNO_RESCUE do not build rescue binaries +# -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir +# -DNO_CLEAN do not clean at all +# -DNO_CRYPT will prevent building of crypt versions +# -DNO_MAN do not build the manual pages +# -DNO_PROFILE do not build profiled libraries +# -DNO_GAMES do not go into games subdir +# -DNO_SHARE do not go into share subdir +# -DNO_INFO do not make or install info files +# -DNO_LIBC_R do not build libc_r. +# -DNO_FORTRAN do not build g77 and related libraries. +# -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel +# -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel +# -DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel +# -DNO_PORTSUPDATE do not update ports in ${MAKE} update +# -DNO_DOCUPDATE do not update doc in ${MAKE} update +# LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list +# TARGET_ARCH="arch" to crossbuild world to a different arch + +# +# The intended user-driven targets are: +# buildworld - rebuild *everything*, including glue to help do upgrades +# installworld- install everything built by "buildworld" +# update - convenient way to update your source tree (eg: cvsup/cvs) +# +# Standard targets (not defined here) are documented in the makefiles in +# /usr/share/mk. These include: +# obj depend all install clean cleandepend cleanobj + +# We must do share/info early so that installation of info `dir' +# entries works correctly. Do it first since it is less likely to +# grow dependencies on include and lib than vice versa. +# +# We must do lib and libexec before bin, because if installworld +# installs a new /bin/sh, the 'make' command will *immediately* +# use that new version. And the new (dynamically-linked) /bin/sh +# will expect to find appropriate libraries in /lib and /libexec. +# +# We must do etc last for install/distribute to work. +# +SUBDIR= share/info include lib libexec bin +.if !defined(NO_GAMES) +SUBDIR+=games +.endif +SUBDIR+=gnu +.if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL) +SUBDIR+=kerberos5 +.endif +.if !defined(NO_RESCUE) +SUBDIR+=rescue +.endif +SUBDIR+=sbin +.if !defined(NO_CRYPT) +SUBDIR+=secure +.endif +.if !defined(NO_SHARE) +SUBDIR+=share +.endif +SUBDIR+=sys usr.bin usr.sbin etc + +# These are last, since it is nice to at least get the base system +# rebuilt before you do them. +.for _DIR in ${LOCAL_DIRS} +.if exists(${.CURDIR}/${_DIR}/Makefile) +SUBDIR+= ${_DIR} +.endif +.endfor + +.if defined(SUBDIR_OVERRIDE) +SUBDIR= ${SUBDIR_OVERRIDE} +.endif + +.if defined(NO_CLEANDIR) +CLEANDIR= clean cleandepend +.else +CLEANDIR= cleandir +.endif + +CVS?= cvs +CVSFLAGS?= -A -P -d -I! +SUP?= /usr/local/bin/cvsup +SUPFLAGS?= -g -L 2 -P - +.if defined(SUPHOST) +SUPFLAGS+= -h ${SUPHOST} +.endif + +MAKEOBJDIRPREFIX?= /usr/obj +.if !defined(OSRELDATE) +.if exists(/usr/include/osreldate.h) +OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ + /usr/include/osreldate.h +.else +OSRELDATE= 0 +.endif +.endif +TARGET_ARCH?= ${MACHINE_ARCH} +.if ${TARGET_ARCH} == ${MACHINE_ARCH} +TARGET?= ${MACHINE} +TARGET_CPUTYPE?=${CPUTYPE} +.else +TARGET?= ${TARGET_ARCH} +TARGET_CPUTYPE?= +.endif +.if !empty(TARGET_CPUTYPE) +_TARGET_CPUTYPE=${TARGET_CPUTYPE} +.else +_TARGET_CPUTYPE=dummy +.endif +_CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} \ + -f /dev/null -m ${.CURDIR}/share/mk -V CPUTYPE +.if ${_CPUTYPE} != ${_TARGET_CPUTYPE} +.error CPUTYPE global should be set with ?=. +.endif +.if make(buildworld) +BUILD_ARCH!= sysctl -n hw.machine_arch +.if ${MACHINE_ARCH} != ${BUILD_ARCH} +.error To cross-build, set TARGET_ARCH. +.endif +.endif +.if ${MACHINE} == ${TARGET} +OBJTREE= ${MAKEOBJDIRPREFIX} +.else +OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET} +.endif +WORLDTMP= ${OBJTREE}${.CURDIR}/${MACHINE_ARCH} +# /usr/games added for fortune which depend on strfile +BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games +XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games +STRICTTMPPATH= ${BPATH}:${XPATH} +TMPPATH= ${STRICTTMPPATH}:${PATH} + +INSTALLTMP!= /usr/bin/mktemp -d -u -t install + +# +# Building a world goes through the following stages +# +# 1. legacy stage [BMAKE] +# This stage is responsible for creating compatibility +# shims that are needed by the bootstrap-tools, +# build-tools and cross-tools stages. +# 1. bootstrap-tools stage [BMAKE] +# This stage is responsible for creating programs that +# are needed for backward compatibility reasons. They +# are not built as cross-tools. +# 2. build-tools stage [TMAKE] +# This stage is responsible for creating the object +# tree and building any tools that are needed during +# the build process. +# 3. cross-tools stage [XMAKE] +# This stage is responsible for creating any tools that +# are needed for cross-builds. A cross-compiler is one +# of them. +# 4. world stage [WMAKE] +# This stage actually builds the world. +# 5. install stage (optional) [IMAKE] +# This stage installs a previously built world. +# + +BOOTSTRAPPING?= 0 + +# Common environment for world related stages +CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \ + MACHINE_ARCH=${TARGET_ARCH} \ + MACHINE=${TARGET} \ + CPUTYPE=${TARGET_CPUTYPE} \ + GROFF_BIN_PATH=${WORLDTMP}/legacy/usr/bin \ + GROFF_FONT_PATH=${WORLDTMP}/legacy/usr/share/groff_font \ + GROFF_TMAC_PATH=${WORLDTMP}/legacy/usr/share/tmac + +# bootstrap-tools stage +BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ + PATH=${BPATH}:${PATH} \ + WORLDTMP=${WORLDTMP} \ + MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" +BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ + ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ + DESTDIR= \ + BOOTSTRAPPING=${OSRELDATE} \ + -DNO_HTML -DNO_INFO -DNO_LINT -DNO_MAN -DNO_PIC -DNO_PROFILE \ + -DNO_SHARED -DNO_CPU_CFLAGS -DNO_WARNS + +# build-tools stage +TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ + ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ + DESTDIR= \ + BOOTSTRAPPING=${OSRELDATE} -DNO_LINT -DNO_CPU_CFLAGS -DNO_WARNS + +# cross-tools stage +XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} -DNO_FORTRAN -DNO_GDB + +# world stage +WMAKEENV= ${CROSSENV} \ + _SHLIBDIRPREFIX=${WORLDTMP} \ + INSTALL="sh ${.CURDIR}/tools/install.sh" \ + PATH=${TMPPATH} +WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP} + +.if ${MACHINE_ARCH} == "amd64" +# 32 bit world +LIB32TMP= ${OBJTREE}${.CURDIR}/lib32 + +LIB32PREFLAGS= -m32 -march=athlon-xp -msse2 -mfancy-math-387 -DCOMPAT_32BIT +LIB32POSTFLAGS= -I${LIB32TMP}/usr/include \ + -L${LIB32TMP}/usr/lib32 \ + -B${LIB32TMP}/usr/lib32 +LIB32CC= ${LIB32PREFLAGS} \ + ${LIB32POSTFLAGS} +LIB32CXX= ${LIB32PREFLAGS} -I${LIB32TMP}/usr/include/c++/3.4 \ + ${LIB32POSTFLAGS} +LIB32OBJC= ${LIB32PREFLAGS} -I${LIB32TMP}/usr/include/objc \ + ${LIB32POSTFLAGS} + +# Yes, the flags are redundant. +LIB32MAKEENV= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \ + _SHLIBDIRPREFIX=${LIB32TMP} \ + MACHINE_ARCH=i386 \ + INSTALL="sh ${.CURDIR}/tools/install.sh" \ + PATH=${TMPPATH} \ + CC="cc ${LIB32CC}" \ + CXX="c++ ${LIB32CXX}" \ + OBJC="cc ${LIB32OBJC}" \ + LD="ld -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \ + AS="as --32" \ + LIBDIR=/usr/lib32 \ + SHLIBDIR=/usr/lib32 + +LIB32MAKE= ${LIB32MAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \ + -DNO_BIND -DNO_MAN -DNO_INFO -DNO_HTML \ + CC="cc ${LIB32CC}" \ + CXX="c++ ${LIB32CXX}" \ + OBJC="cc ${LIB32OBJC}" \ + LD="ld -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \ + AS="as --32" \ + LIBDIR=/usr/lib32 \ + SHLIBDIR=/usr/lib32 +.endif + +# install stage +.if empty(.MAKEFLAGS:M-n) +IMAKEENV= ${CROSSENV} \ + PATH=${STRICTTMPPATH}:${INSTALLTMP} +.else +IMAKEENV= ${CROSSENV} \ + PATH=${TMPPATH}:${INSTALLTMP} +.endif +IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 + +# kernel stage +KMAKEENV= ${WMAKEENV} + +# +# buildworld +# +# Attempt to rebuild the entire system, with reasonable chance of +# success, regardless of how old your existing system is. +# +_worldtmp: +.if ${.CURDIR:C/[^,]//g} != "" +# The m4 build of sendmail files doesn't like it if ',' is used +# anywhere in the path of it's files. + @@echo + @@echo "*** Error: path to source tree contains a comma ','" + @@echo + false +.endif + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Rebuilding the temporary build tree" + @@echo "--------------------------------------------------------------" +.if !defined(NO_CLEAN) + rm -rf ${WORLDTMP} +.else + rm -rf ${WORLDTMP}/legacy/usr/include + # XXX - These two can depend on any header file. + rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c + rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c +.endif +.for _dir in \ + usr/bin usr/games usr/include/c++/3.4 usr/include/sys usr/lib \ + usr/libexec usr/sbin usr/share/dict \ + usr/share/groff_font/devX100 \ + usr/share/groff_font/devX100-12 \ + usr/share/groff_font/devX75 \ + usr/share/groff_font/devX75-12 \ + usr/share/groff_font/devascii \ + usr/share/groff_font/devcp1047 \ + usr/share/groff_font/devdvi \ + usr/share/groff_font/devhtml \ + usr/share/groff_font/devkoi8-r \ + usr/share/groff_font/devlatin1 \ + usr/share/groff_font/devlbp \ + usr/share/groff_font/devlj4 \ + usr/share/groff_font/devps \ + usr/share/groff_font/devutf8 \ + usr/share/tmac/mdoc usr/share/tmac/mm + mkdir -p ${WORLDTMP}/legacy/${_dir} +.endfor +.for _dir in \ + lib usr/bin usr/include usr/lib/compat/aout usr/libdata/ldscripts \ + usr/libexec usr/sbin usr/share/misc \ + usr/share/snmp/defs usr/share/snmp/mibs + mkdir -p ${WORLDTMP}/${_dir} +.endfor + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ + -p ${WORLDTMP}/usr/include >/dev/null + ln -sf ${.CURDIR}/sys ${WORLDTMP} +.if defined(WITH_BIND_LIBS) && !defined(NO_BIND) + mtree -deU -f ${.CURDIR}/etc/mtree/BIND.include.dist \ + -p ${WORLDTMP}/usr/include >/dev/null +.endif +_legacy: + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> stage 1.1: legacy release compatibility shims" + @@echo "--------------------------------------------------------------" + ${_+_}cd ${.CURDIR}; ${BMAKE} legacy +_bootstrap-tools: + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> stage 1.2: bootstrap tools" + @@echo "--------------------------------------------------------------" + ${_+_}cd ${.CURDIR}; ${BMAKE} bootstrap-tools +_cleanobj: +.if !defined(NO_CLEAN) + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> stage 2.1: cleaning up the object tree" + @@echo "--------------------------------------------------------------" + ${_+_}cd ${.CURDIR}; ${WMAKE} ${CLEANDIR:S/^/par-/} +.endif +_obj: + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> stage 2.2: rebuilding the object tree" + @@echo "--------------------------------------------------------------" + ${_+_}cd ${.CURDIR}; ${WMAKE} par-obj +_build-tools: + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> stage 2.3: build tools" + @@echo "--------------------------------------------------------------" + ${_+_}cd ${.CURDIR}; ${TMAKE} build-tools +_cross-tools: + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> stage 3: cross tools" + @@echo "--------------------------------------------------------------" + ${_+_}cd ${.CURDIR}; ${XMAKE} cross-tools +_includes: + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> stage 4.1: building includes" + @@echo "--------------------------------------------------------------" + ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks par-includes +_libraries: + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> stage 4.2: building libraries" + @@echo "--------------------------------------------------------------" + ${_+_}cd ${.CURDIR}; \ + ${WMAKE} -DNO_FSCHG -DNO_HTML -DNO_INFO -DNO_LINT -DNO_MAN -DNO_PROFILE \ + libraries +_depend: + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> stage 4.3: make dependencies" + @@echo "--------------------------------------------------------------" + ${_+_}cd ${.CURDIR}; ${WMAKE} par-depend +everything: + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> stage 4.4: building everything" + @@echo "--------------------------------------------------------------" + ${_+_}cd ${.CURDIR}; ${WMAKE} par-all +.if ${MACHINE_ARCH} == "amd64" +build32: + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> stage 5.1: building 32 bit shim libraries" + @@echo "--------------------------------------------------------------" +.for _dir in \ + lib lib32 usr/bin usr/include usr/lib32 usr/libdata/ldscripts \ + usr/libexec usr/sbin usr/share/misc \ + usr/share/snmp/defs usr/share/snmp/mibs + mkdir -p ${LIB32TMP}/${_dir} +.endfor + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ + -p ${LIB32TMP}/usr/include >/dev/null + ln -sf ${.CURDIR}/sys ${WORLDTMP} +.if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL) +.for _t in obj depend all + cd ${.CURDIR}/kerberos5/tools; \ + MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} ${_t} +.endfor +.endif +.for _t in obj includes + cd ${.CURDIR}/include; \ + ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} + cd ${.CURDIR}/lib; \ + ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} + cd ${.CURDIR}/gnu/lib; \ + ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} +.if !defined(NO_CRYPT) + cd ${.CURDIR}/secure/lib; \ + ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} +.endif +.if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL) + cd ${.CURDIR}/kerberos5/lib; \ + ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} +.endif +.endfor +.for _dir in usr.sbin/pcvt/keycap usr.bin/lex/lib + cd ${.CURDIR}/${_dir}; \ + ${LIB32MAKE} DESTDIR=${LIB32TMP} obj +.endfor +.for _dir in lib/libncurses lib/libmagic + cd ${.CURDIR}/${_dir}; \ + MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} build-tools +.endfor + cd ${.CURDIR}; \ + ${LIB32MAKE} -f Makefile.inc1 DESTDIR=${LIB32TMP} libraries +.for _t in obj depend all + cd ${.CURDIR}/libexec/rtld-elf; \ + PROG=ld-elf32.so.1 ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} +.endfor + +install32: + mkdir -p ${DESTDIR}/usr/lib32 # XXX add to mtree + cd ${.CURDIR}/lib; ${LIB32MAKE} install + cd ${.CURDIR}/gnu/lib; ${LIB32MAKE} install +.if !defined(NO_CRYPT) + cd ${.CURDIR}/secure/lib; ${LIB32MAKE} install +.endif + cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32MAKE} install +.endif + + +WMAKE_TGTS= +.if !defined(SUBDIR_OVERRIDE) +WMAKE_TGTS+= _worldtmp _legacy _bootstrap-tools +.endif +WMAKE_TGTS+= _cleanobj _obj _build-tools +.if !defined(SUBDIR_OVERRIDE) +WMAKE_TGTS+= _cross-tools +.endif +WMAKE_TGTS+= _includes _libraries _depend everything +.if ${MACHINE_ARCH} == "amd64" && defined(WITH_LIB32) +WMAKE_TGTS+= build32 +.endif + +buildworld: ${WMAKE_TGTS} +.ORDER: ${WMAKE_TGTS} + +TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything} +toolchain: ${TOOLCHAIN_TGTS} +kernel-toolchain: ${TOOLCHAIN_TGTS:N_includes:N_libraries} + +# +# Use this to add checks to installworld/installkernel targets. +# +SPECIAL_INSTALLCHECKS= + +# +# installcheck +# +# Checks to be sure system is ready for installworld +# +CHECK_UIDS= +CHECK_GIDS= +.if !defined(NO_SENDMAIL) +CHECK_UIDS+= smmsp +CHECK_GIDS+= smmsp +.endif +.if !defined(NO_PF) +CHECK_UIDS+= proxy +CHECK_GIDS+= proxy authpf +.endif +installcheck: ${SPECIAL_INSTALLCHECKS} +.for uid in ${CHECK_UIDS} + @@if ! `id -u ${uid} >/dev/null 2>&1`; then \ + echo "ERROR: Required ${uid} user is missing, see /usr/src/UPDATING."; \ + false; \ + fi +.endfor +.for gid in ${CHECK_GIDS} + @@if ! `find / -prune -group ${gid} >/dev/null 2>&1`; then \ + echo "ERROR: Required ${gid} group is missing, see /usr/src/UPDATING."; \ + false; \ + fi +.endfor + +# +# distributeworld +# +# Distributes everything compiled by a `buildworld'. +# +# installworld +# +# Installs everything compiled by a 'buildworld'. +# +distributeworld installworld: installcheck + mkdir -p ${INSTALLTMP} + for prog in [ awk cap_mkdb cat chflags chmod chown \ + date echo egrep find grep \ + ln make mkdir mtree mv pwd_mkdb rm sed sh sysctl \ + test true uname wc zic; do \ + cp `which $$prog` ${INSTALLTMP}; \ + done + ${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//} + rm -rf ${INSTALLTMP} + +# +# reinstall +# +# If you have a build server, you can NFS mount the source and obj directories +# and do a 'make reinstall' on the *client* to install new binaries from the +# most recent server build. +# +reinstall: ${SPECIAL_INSTALLCHECKS} + @@echo "--------------------------------------------------------------" + @@echo ">>> Making hierarchy" + @@echo "--------------------------------------------------------------" + ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 hierarchy + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Installing everything" + @@echo "--------------------------------------------------------------" + ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install +.if ${MACHINE_ARCH} == "amd64" && defined(WITH_LIB32) + ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install32 +.endif + +redistribute: + @@echo "--------------------------------------------------------------" + @@echo ">>> Distributing everything" + @@echo "--------------------------------------------------------------" + ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute + +# +# buildkernel and installkernel +# +# Which kernels to build and/or install is specified by setting +# KERNCONF. If not defined a GENERIC kernel is built/installed. +# Only the existing (depending TARGET) config files are used +# for building kernels and only the first of these is designated +# as the one being installed. +# +# Note that we have to use TARGET instead of TARGET_ARCH when +# we're in kernel-land. Since only TARGET_ARCH is (expected) to +# be set to cross-build, we have to make sure TARGET is set +# properly. + +.if !defined(KERNCONF) && defined(KERNEL) +KERNCONF= ${KERNEL} +KERNWARN= +.else +KERNCONF?= GENERIC +.endif +INSTKERNNAME?= kernel + +KERNSRCDIR?= ${.CURDIR}/sys +KRNLCONFDIR= ${KERNSRCDIR}/${TARGET}/conf +KRNLOBJDIR= ${OBJTREE}${KERNSRCDIR} +KERNCONFDIR?= ${KRNLCONFDIR} + +BUILDKERNELS= +INSTALLKERNEL= +.for _kernel in ${KERNCONF} +.if exists(${KERNCONFDIR}/${_kernel}) +BUILDKERNELS+= ${_kernel} +.if empty(INSTALLKERNEL) +INSTALLKERNEL= ${_kernel} +.endif +.endif +.endfor + +# +# buildkernel +# +# Builds all kernels defined by BUILDKERNELS. +# +buildkernel: +.if empty(BUILDKERNELS) + @@echo "ERROR: Missing kernel configuration file(s) (${KERNCONF})."; + false +.endif +.if defined(KERNWARN) + @@echo "--------------------------------------------------------------" + @@echo ">>> WARNING: KERNEL= setting should be changed to KERNCONF=" + @@echo "--------------------------------------------------------------" + @@sleep 3 +.endif + @@echo +.for _kernel in ${BUILDKERNELS} + @@echo "--------------------------------------------------------------" + @@echo ">>> Kernel build for ${_kernel} started on `LC_ALL=C date`" + @@echo "--------------------------------------------------------------" + @@echo "===> ${_kernel}" + mkdir -p ${KRNLOBJDIR} +.if !defined(NO_KERNELCONFIG) + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> stage 1: configuring the kernel" + @@echo "--------------------------------------------------------------" + cd ${KRNLCONFDIR}; \ + PATH=${TMPPATH} \ + config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \ + ${KERNCONFDIR}/${_kernel} +.endif +.if !defined(NO_CLEAN) && !defined(NO_KERNELCLEAN) + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> stage 2.1: cleaning up the object tree" + @@echo "--------------------------------------------------------------" + cd ${KRNLOBJDIR}/${_kernel}; \ + ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} ${CLEANDIR} +.endif + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> stage 2.2: rebuilding the object tree" + @@echo "--------------------------------------------------------------" + cd ${KRNLOBJDIR}/${_kernel}; \ + ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} obj + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> stage 2.3: build tools" + @@echo "--------------------------------------------------------------" + cd ${KRNLOBJDIR}/${_kernel}; \ + MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \ + ${MAKE} -DNO_CPU_CFLAGS -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile +# XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. +.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules) +.for target in obj depend all + cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \ + MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ + ${MAKE} -DNO_CPU_CFLAGS ${target} +.endfor +.endif +.if !defined(NO_KERNELDEPEND) + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> stage 3.1: making dependencies" + @@echo "--------------------------------------------------------------" + cd ${KRNLOBJDIR}/${_kernel}; \ + ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} depend -DNO_MODULES_OBJ +.endif + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> stage 3.2: building everything" + @@echo "--------------------------------------------------------------" + cd ${KRNLOBJDIR}/${_kernel}; \ + ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} all -DNO_MODULES_OBJ + @@echo "--------------------------------------------------------------" + @@echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`" + @@echo "--------------------------------------------------------------" +.endfor + +# +# installkernel, etc. +# +# Install the kernel defined by INSTALLKERNEL +# +installkernel installkernel.debug \ +reinstallkernel reinstallkernel.debug: ${SPECIAL_INSTALLCHECKS} +.if empty(INSTALLKERNEL) + @@echo "ERROR: No kernel \"${KERNCONF}\" to install." + false +.endif + @@echo "--------------------------------------------------------------" + @@echo ">>> Making hierarchy" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}; \ + ${CROSSENV} PATH=${TMPPATH} ${MAKE} -f Makefile.inc1 hierarchy + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Installing kernel" + @@echo "--------------------------------------------------------------" + cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ + ${CROSSENV} PATH=${TMPPATH} \ + ${MAKE} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//} + +# +# update +# +# Update the source tree, by running cvsup and/or running cvs to update to the +# latest copy. +# +update: +.if defined(SUP_UPDATE) + @@echo "--------------------------------------------------------------" + @@echo ">>> Running ${SUP}" + @@echo "--------------------------------------------------------------" +.if defined(SUPFILE) + @@${SUP} ${SUPFLAGS} ${SUPFILE} +.endif +.if defined(SUPFILE1) + @@${SUP} ${SUPFLAGS} ${SUPFILE1} +.endif +.if defined(SUPFILE2) + @@${SUP} ${SUPFLAGS} ${SUPFILE2} +.endif +.if defined(PORTSSUPFILE) && !defined(NO_PORTSUPDATE) + @@${SUP} ${SUPFLAGS} ${PORTSSUPFILE} +.endif +.if defined(DOCSUPFILE) && !defined(NO_DOCUPDATE) + @@${SUP} ${SUPFLAGS} ${DOCSUPFILE} +.endif +.endif +.if defined(CVS_UPDATE) + @@echo "--------------------------------------------------------------" + @@echo ">>> Updating ${.CURDIR} from CVS repository" ${CVSROOT} + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}; ${CVS} -R -q update ${CVSFLAGS} +.endif + +# +# ------------------------------------------------------------------------ +# +# From here onwards are utility targets used by the 'make world' and +# related targets. If your 'world' breaks, you may like to try to fix +# the problem and manually run the following targets to attempt to +# complete the build. Beware, this is *not* guaranteed to work, you +# need to have a pretty good grip on the current state of the system +# to attempt to manually finish it. If in doubt, 'make world' again. +# + +# +# legacy: Build compatibility shims for the next three targets +# +legacy: +.for _tool in tools/build + ${_+_}@@${ECHODIR} "===> ${_tool} (obj,includes,depend,all,install)"; \ + cd ${.CURDIR}/${_tool}; \ + ${MAKE} DIRPRFX=${_tool}/ obj; \ + ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy includes; \ + ${MAKE} DIRPRFX=${_tool}/ depend; \ + ${MAKE} DIRPRFX=${_tool}/ all; \ + ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install +.endfor + +# +# bootstrap-tools: Build tools needed for compatibility +# +.if !defined(NO_GAMES) +_strfile= games/fortune/strfile +.endif + +.if !defined(NO_CXX) +_gperf= gnu/usr.bin/gperf +.if ${BOOTSTRAPPING} < 500113 +_groff= gnu/usr.bin/groff +.else +_groff= gnu/usr.bin/groff/tmac +.endif +.endif + +.if ${BOOTSTRAPPING} < 502102 +_lex= usr.bin/lex +.endif + +.if ${BOOTSTRAPPING} < 450005 || \ + ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500034 +_uudecode= usr.bin/uudecode +.endif + +.if ${BOOTSTRAPPING} < 430002 || \ + ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500019 +_xargs= usr.bin/xargs +.endif + +.if ${BOOTSTRAPPING} < 430002 || \ + ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500018 +_yacc= usr.bin/yacc +.endif + +.if !defined(NO_RESCUE) && \ + ${BOOTSTRAPPING} < 502128 +_crunchgen= usr.sbin/crunch/crunchgen +.endif + +.if ${BOOTSTRAPPING} < 502128 +_gensnmptree= usr.sbin/bsnmpd/gensnmptree +.endif + +.if ${BOOTSTRAPPING} < 500019 +_kbdcontrol= usr.sbin/kbdcontrol +.endif + +bootstrap-tools: +.for _tool in \ + ${_strfile} \ + ${_gperf} \ + ${_groff} \ + gnu/usr.bin/texinfo \ + usr.bin/colldef \ + ${_lex} \ + usr.bin/makewhatis \ + usr.bin/rpcgen \ + ${_uudecode} \ + ${_xargs} \ + usr.bin/xinstall \ + ${_yacc} \ + usr.sbin/config \ + ${_crunchgen} \ + ${_gensnmptree} \ + ${_kbdcontrol} + ${_+_}@@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ + cd ${.CURDIR}/${_tool}; \ + ${MAKE} DIRPRFX=${_tool}/ obj; \ + ${MAKE} DIRPRFX=${_tool}/ depend; \ + ${MAKE} DIRPRFX=${_tool}/ all; \ + ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install +.endfor + +# +# build-tools: Build special purpose build tools +# +.if defined(MODULES_WITH_WORLD) && exists(${KERNSRCDIR}/modules) +_aicasm= sys/modules/aic7xxx/aicasm +.endif + +.if !defined(NO_SHARE) +_share= share/syscons/scrnmaps +.endif + +.if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL) +_kerberos5_tools= kerberos5/tools +.endif + +.if !defined(NO_RESCUE) +_rescue= rescue/rescue +.endif + +build-tools: +.for _tool in \ + bin/csh \ + bin/sh \ + ${_rescue} \ + lib/libncurses \ + ${_share} \ + ${_aicasm} \ + usr.bin/awk \ + lib/libmagic \ + usr.sbin/sysinstall + ${_+_}@@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \ + cd ${.CURDIR}/${_tool}; \ + ${MAKE} DIRPRFX=${_tool}/ obj; \ + ${MAKE} DIRPRFX=${_tool}/ build-tools +.endfor +.for _tool in \ + gnu/usr.bin/cc/cc_tools \ + ${_kerberos5_tools} + ${_+_}@@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \ + cd ${.CURDIR}/${_tool}; \ + ${MAKE} DIRPRFX=${_tool}/ obj; \ + ${MAKE} DIRPRFX=${_tool}/ depend; \ + ${MAKE} DIRPRFX=${_tool}/ all +.endfor + +# +# cross-tools: Build cross-building tools +# +.if ${TARGET_ARCH} == "sparc64" && ${TARGET_ARCH} != ${MACHINE_ARCH} && \ + ${BOOTSTRAPPING} < 500037 +_elf2aout= usr.bin/elf2aout +.endif + +.if ${TARGET_ARCH} == "i386" && ${TARGET_ARCH} != ${MACHINE_ARCH} +_btxld= usr.sbin/btxld +.endif + +.if (!defined(NO_RESCUE) || \ + defined(RELEASEDIR)) && \ + (${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 501101) +_crunchide= usr.sbin/crunch/crunchide +.endif + +.if ${TARGET_ARCH} == "alpha" && ${TARGET_ARCH} != ${MACHINE_ARCH} +_elf2exe= usr.sbin/elf2exe +.endif + +.if ${TARGET_ARCH} == "i386" && ${TARGET_ARCH} != ${MACHINE_ARCH} && \ + defined(RELEASEDIR) +_kgzip= usr.sbin/kgzip +.endif + +cross-tools: +.for _tool in \ + gnu/usr.bin/binutils \ + gnu/usr.bin/cc \ + ${_elf2aout} \ + usr.bin/xlint/lint1 usr.bin/xlint/lint2 usr.bin/xlint/xlint \ + ${_btxld} \ + ${_crunchide} \ + ${_elf2exe} \ + ${_kgzip} + ${_+_}@@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ + cd ${.CURDIR}/${_tool}; \ + ${MAKE} DIRPRFX=${_tool}/ obj; \ + ${MAKE} DIRPRFX=${_tool}/ depend; \ + ${MAKE} DIRPRFX=${_tool}/ all; \ + ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install +.endfor + +# +# hierarchy - ensure that all the needed directories are present +# +hierarchy: + cd ${.CURDIR}/etc; ${MAKE} distrib-dirs + +# +# libraries - build all libraries, and install them under ${DESTDIR}. +# +# The list of libraries with dependents (${_prebuild_libs}) and their +# interdependencies (__L) are built automatically by the +# ${.CURDIR}/tools/make_libdeps.sh script. +# +libraries: + cd ${.CURDIR}; \ + ${MAKE} -f Makefile.inc1 _startup_libs; \ + ${MAKE} -f Makefile.inc1 _prebuild_libs; \ + ${MAKE} -f Makefile.inc1 _generic_libs; + +# These dependencies are not automatically generated: +# +# gnu/lib/csu, gnu/lib/libgcc and lib/csu must be built before all +# shared libraries for ELF. +# +_startup_libs= gnu/lib/csu gnu/lib/libgcc +.if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}-elf) +_startup_libs+= lib/csu/${MACHINE_ARCH}-elf +.else +_startup_libs+= lib/csu/${MACHINE_ARCH} +.endif + +_prebuild_libs= + +_generic_libs= gnu/lib + +.if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL) +_prebuild_libs+= kerberos5/lib/libasn1 +_prebuild_libs+= kerberos5/lib/libgssapi +_prebuild_libs+= kerberos5/lib/libkrb5 +_prebuild_libs+= kerberos5/lib/libroken +_generic_libs+= kerberos5/lib +.endif + +_prebuild_libs+= lib/libcom_err lib/libcrypt lib/libexpat \ + lib/libkvm lib/libmd \ + lib/libncurses lib/libnetgraph lib/libopie lib/libpam \ + lib/libradius \ + lib/libsbuf lib/libtacplus lib/libutil \ + lib/libz lib/msun + +lib/libopie__L lib/libtacplus__L: lib/libmd__L + +.if !defined(NO_BIND) +.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "sparc64" +_prebuild_libs+= lib/libc_r +.else +_prebuild_libs+= lib/libpthread +.endif +.endif + +_generic_libs+= lib + +.if !defined(NO_CRYPT) +.if !defined(NO_OPENSSL) +_prebuild_libs+= secure/lib/libcrypto secure/lib/libssl +lib/libradius__L: secure/lib/libssl__L +secure/lib/libssl__L: secure/lib/libcrypto__L +.if !defined(NO_OPENSSH) +_prebuild_libs+= secure/lib/libssh +secure/lib/libssh__L: lib/libz__L secure/lib/libcrypto__L lib/libcrypt__L +.if !defined(NO_KERBEROS) +secure/lib/libssh__L: kerberos5/lib/libgssapi__L kerberos5/lib/libkrb5__L \ + kerberos5/lib/libasn1__L lib/libcom_err__L lib/libmd__L \ + kerberos5/lib/libroken__L +.endif +.endif +.endif +_generic_libs+= secure/lib +.endif + +.if defined(NO_CRYPT) || defined(NO_OPENSSL) +lib/libradius__L: lib/libmd__L +.endif + +.if !defined(NO_NIS) +_prebuild_libs+= lib/libypclnt +.endif + +_generic_libs+= usr.bin/lex/lib + +.if ${MACHINE_ARCH} == "i386" +_generic_libs+= usr.sbin/pcvt/keycap +.endif + +.for _lib in ${_startup_libs} ${_prebuild_libs:Nlib/libpam} ${_generic_libs} +${_lib}__L: .PHONY +.if exists(${.CURDIR}/${_lib}) + ${_+_}@@${ECHODIR} "===> ${_lib} (depend,all,install)"; \ + cd ${.CURDIR}/${_lib}; \ + ${MAKE} DIRPRFX=${_lib}/ depend; \ + ${MAKE} DIRPRFX=${_lib}/ all; \ + ${MAKE} DIRPRFX=${_lib}/ install +.endif +.endfor + +# libpam is special: we need to build static PAM modules before +# static PAM library, and dynamic PAM library before dynamic PAM +# modules. +lib/libpam__L: .PHONY + ${_+_}@@${ECHODIR} "===> lib/libpam (depend,all,install)"; \ + cd ${.CURDIR}/lib/libpam; \ + ${MAKE} DIRPRFX=lib/libpam/ depend; \ + ${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET all; \ + ${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET install + +_startup_libs: ${_startup_libs:S/$/__L/} +_prebuild_libs: ${_prebuild_libs:S/$/__L/} +_generic_libs: ${_generic_libs:S/$/__L/} + +.for __target in all clean cleandepend cleandir depend includes obj +.for entry in ${SUBDIR} +${entry}.${__target}__D: .PHONY + ${_+_}@@if test -d ${.CURDIR}/${entry}.${MACHINE_ARCH}; then \ + ${ECHODIR} "===> ${DIRPRFX}${entry}.${MACHINE_ARCH} (${__target})"; \ + edir=${entry}.${MACHINE_ARCH}; \ + cd ${.CURDIR}/$${edir}; \ + else \ + ${ECHODIR} "===> ${DIRPRFX}${entry} (${__target})"; \ + edir=${entry}; \ + cd ${.CURDIR}/$${edir}; \ + fi; \ + ${MAKE} ${__target} DIRPRFX=${DIRPRFX}$${edir}/ +.endfor +par-${__target}: ${SUBDIR:S/$/.${__target}__D/} +.endfor + +.include +@ + + +1.471 +log +@Further fix the case mentioned in rev. 1.302. The +intent was (and still is) that if a user has say +CPUTYPE=i686 set in /etc/make.conf, we don't print +the assignment type warning unless TARGET_CPUTYPE +is overridden. + +Unfortunately, the implementation was buggy, and +only recent changes to bsd.cpu.mk that swapped +canonical and alias values of some CPU types made +the bug apparent. + +Here's what happens here. + +- CPUTYPE=i686 is set in /etc/make.conf, +- bsd.cpu.mk reset it to "pentiumpro", +- Makefile.inc1 compares this canonical value + with the result of the following test, + +make -f /dev/null CPUTYPE=pentiumpro -V CPUTYPE + +and expects the result to be "pentiumpro" too, +but "i686" is returned, here's why. We have two +CPUTYPE variables, global, set to "i686" in +/etc/make.conf, and command-line (of a higher +precedence), set to "pentiumpro". + +The following part of bsd.cpu.mk, + +. elif ${CPUTYPE} == "i686" +CPUTYPE = pentiumpro + +which is responsible for converting aliases to +canonical values, sees the value of the CPUTYPE +command-line variable first, "pentiumpro", and +no conversion is done -- the net effect is that +CPUTYPE global stays with its old value "i686", +and "make -V CPUTYPE" (which prints variables +in the global context) returns "i686". + +The fix was to pass the CPUTYPE in the test above +as an environment variable instead of as a command +line variable, i.e., + +CPUTYPE=pentiumpro make -f /dev/null -V CPUTYPE + +This time, CPUTYPE global is still set to "i686" +initially (by /etc/make.conf), and an envieronment +variable CPUTYPE (of a lower precedence) is set +to "pentiumpro". The .elif sees it's set to +"i686" and resets it to "pentiumpro", and so +"make -V" returns "pentiumpro". + +NB: these various types of make(1) variables can +be very painful, especially when combined with +"make -V". +@ +text +@a469 51 +# The following install-time check will see if the installation will +# change the type used for time_t, and if it will, the target makes +# sure that the user is expecting to make that change. +# +.if ${TARGET_ARCH} == "sparc64" +SPECIAL_INSTALLCHECKS+=sparc64_installcheck + +CUR_TIMET!= grep __time_t /usr/include/machine/_types.h | awk '{print $$2}' +SRC_TIMET!= grep __time_t ${.CURDIR}/sys/sparc64/include/_types.h | \ + awk '{print $$2}' +NEWSPARC_TIMETYPE?=${CUR_TIMET} + +sparc64_installcheck: +.if ${CUR_TIMET} != ${SRC_TIMET} + @@echo +.if ${NEWSPARC_TIMETYPE} != ${SRC_TIMET} + @@echo "*** ERROR: This target would change the type used for time_t!" +.else + @@echo "* Note: This installation changes the type used for time_t." +.endif + @@echo "* " + @@echo "* This host has time_t defined as ${CUR_TIMET}," + @@echo "* and this installation would change that to type ${SRC_TIMET}." +.if ${NEWSPARC_TIMETYPE} != ${SRC_TIMET} + @@echo "* " + @@echo "* If that is *NOT* what you wanted, then you need to change the" + @@echo "* typedef of __time_t in ${.CURDIR}/sys/sparc64/include/_types.h" + @@echo "* from '${SRC_TIMET}' to '${CUR_TIMET}'. After that you *MUST*" + @@echo "* do a complete cleanworld, buildworld, buildkernel before you" + @@echo "* retry the 'make' command. Also read /usr/src/UPDATING.64BTT." + @@echo "* " + @@echo "* If that *is* what you want, then enter the commands:" + @@echo " NEWSPARC_TIMETYPE=${SRC_TIMET}" + @@echo " export NEWSPARC_TIMETYPE" + @@echo "* and repeat your 'make' command." + @@echo + false +.endif + @@echo +.elif ${NEWSPARC_TIMETYPE} != ${SRC_TIMET} + @@echo + @@echo "*** ERROR: NEWSPARC_TIMETYPE is set to '${NEWSPARC_TIMETYPE}'" + @@echo "*** but ${.CURDIR}/sys/sparc64/include/_types.h" + @@echo "*** has __time_t defined as '${SRC_TIMET}'." + false +.else + @@# in sparc64_installcheck, all TIMETYPEs == '${CUR_TIMET}' +.endif +.endif + +# +@ + + +1.470 +log +@NOCLEAN -> NO_CLEAN +NOCLEANDIR -> NO_CLEANDIR +@ +text +@d115 2 +a116 2 +_CPUTYPE!= MAKEFLAGS= ${MAKE} -f /dev/null -m ${.CURDIR}/share/mk \ + CPUTYPE=${_TARGET_CPUTYPE} -V CPUTYPE +@ + + +1.469 +log +@NOSHARE -> NO_SHARE +@ +text +@d8 2 +a9 2 +# -DNOCLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir +# -DNOCLEAN do not clean at all +d79 1 +a79 1 +.if defined(NOCLEANDIR) +d276 1 +a276 1 +.if !defined(NOCLEAN) +d330 1 +a330 1 +.if !defined(NOCLEAN) +d667 1 +a667 1 +.if !defined(NOCLEAN) && !defined(NO_KERNELCLEAN) +@ + + +1.468 +log +@NOHTML -> NO_HTML +@ +text +@d14 1 +a14 1 +# -DNOSHARE do not go into share subdir +d62 1 +a62 1 +.if !defined(NOSHARE) +d879 1 +a879 1 +.if !defined(NOSHARE) +@ + + +1.467 +log +@NOGAMES -> NO_GAMES +@ +text +@d185 1 +a185 1 + -DNOHTML -DNO_INFO -DNO_LINT -DNO_MAN -DNO_PIC -DNO_PROFILE \ +d234 1 +a234 1 + -DNO_BIND -DNO_MAN -DNO_INFO -DNOHTML \ +d367 1 +a367 1 + ${WMAKE} -DNO_FSCHG -DNOHTML -DNO_INFO -DNO_LINT -DNO_MAN -DNO_PROFILE \ +@ + + +1.466 +log +@NOCRYPT -> NO_CRYPT +@ +text +@d13 1 +a13 1 +# -DNOGAMES do not go into games subdir +d48 1 +a48 1 +.if !defined(NOGAMES) +d801 1 +a801 1 +.if !defined(NOGAMES) +@ + + +1.465 +log +@NOSHARED -> NO_SHARED +@ +text +@d10 1 +a10 1 +# -DNOCRYPT will prevent building of crypt versions +d52 1 +a52 1 +.if !defined(NO_KERBEROS) && !defined(NOCRYPT) && !defined(NO_OPENSSL) +d59 1 +a59 1 +.if !defined(NOCRYPT) +d396 1 +a396 1 +.if !defined(NO_KERBEROS) && !defined(NOCRYPT) && !defined(NO_OPENSSL) +d409 1 +a409 1 +.if !defined(NOCRYPT) +d413 1 +a413 1 +.if !defined(NO_KERBEROS) && !defined(NOCRYPT) && !defined(NO_OPENSSL) +d437 1 +a437 1 +.if !defined(NOCRYPT) +d883 1 +a883 1 +.if !defined(NO_KERBEROS) && !defined(NOCRYPT) && !defined(NO_OPENSSL) +d997 1 +a997 1 +.if !defined(NO_KERBEROS) && !defined(NOCRYPT) && !defined(NO_OPENSSL) +d1024 1 +a1024 1 +.if !defined(NOCRYPT) +d1042 1 +a1042 1 +.if defined(NOCRYPT) || defined(NO_OPENSSL) +@ + + +1.464 +log +@NOFSCHG -> NO_FSCHG +@ +text +@d186 1 +a186 1 + -DNOSHARED -DNO_CPU_CFLAGS -DNO_WARNS +@ + + +1.463 +log +@NODOCCOMPRESS -> NO_DOCCOMPRESS +NOINFO -> NO_INFO +NOINFOCOMPRESS -> NO_INFOCOMPRESS +NOLINT -> NO_LINT +NOPIC -> NO_PIC +NOPROFILE -> NO_PROFILE +@ +text +@d367 1 +a367 1 + ${WMAKE} -DNOFSCHG -DNOHTML -DNO_INFO -DNO_LINT -DNO_MAN -DNO_PROFILE \ +@ + + +1.462 +log +@NOLIBC_R -> NO_LIBC_R +NOLIBPTHREAD -> NO_LIBPTHREAD +NOLIBTHR -> NO_LIBTHR +@ +text +@d12 1 +a12 1 +# -DNOPROFILE do not build profiled libraries +d15 1 +a15 1 +# -DNOINFO do not make or install info files +d185 1 +a185 1 + -DNOHTML -DNOINFO -DNOLINT -DNO_MAN -DNOPIC -DNOPROFILE \ +d192 1 +a192 1 + BOOTSTRAPPING=${OSRELDATE} -DNOLINT -DNO_CPU_CFLAGS -DNO_WARNS +d234 1 +a234 1 + -DNO_BIND -DNO_MAN -DNODOC -DNOINFO -DNOHTML \ +d367 1 +a367 1 + ${WMAKE} -DNOFSCHG -DNOHTML -DNOINFO -DNOLINT -DNO_MAN -DNOPROFILE \ +@ + + +1.461 +log +@Start the dreaded NOFOO -> NO_FOO conversion. + +OK'ed by: core +@ +text +@d16 1 +a16 1 +# -DNOLIBC_R do not build libc_r. +@ + + +1.460 +log +@Minor tweaks in "make update" comments. +@ +text +@d11 1 +a11 1 +# -DNOMAN do not build the manual pages +d185 1 +a185 1 + -DNOHTML -DNOINFO -DNOLINT -DNOMAN -DNOPIC -DNOPROFILE \ +d234 1 +a234 1 + -DNO_BIND -DNOMAN -DNODOC -DNOINFO -DNOHTML \ +d367 1 +a367 1 + ${WMAKE} -DNOFSCHG -DNOHTML -DNOINFO -DNOLINT -DNOMAN -DNOPROFILE \ +@ + + +1.459 +log +@Do not leave build droppings in /usr/src for usr.sbin/pcvt/keycap and +usr.bin/lex/lib for the 32 bit libraries on amd64. Add an explicit +obj for these two directories that are built in for the "libraries" target. +@ +text +@d30 1 +a30 1 +# update - convenient way to update your source tree (eg: sup/cvs) +d742 1 +a742 1 +# Update the source tree, by running sup and/or running cvs to update to the +d768 1 +a768 1 + @@echo ">>> Updating ${.CURDIR} from cvs repository" ${CVSROOT} +@ + + +1.458 +log +@Hopefully fix the "aicasm" build-tool issue when using ${KERNSRCDIR} +different from ${.CURDIR}. + +Reported by: jhb +@ +text +@d418 4 +@ + + +1.457 +log +@In the amd64 hybrid libraries case, move the kerberos5 tools to before +building the kerberos5 includes. This is not the same patch that +Bjoern A. Zeeb came up with, but the credit still goes to him for finding +the problem. Thanks! +@ +text +@d687 1 +a687 1 + cd ${.CURDIR}/sys/modules/aic7xxx/aicasm; \ +@ + + +1.456 +log +@Oops, all my test boxes have NO_KERBEROS set, so I didn't hit the kerberos5 +build tools problem. I'd missed the kerberos5/tools stuff entirely. Add +the missing bits. +@ +text +@d396 6 +a421 6 +.if !defined(NO_KERBEROS) && !defined(NOCRYPT) && !defined(NO_OPENSSL) +.for _t in obj depend all + cd ${.CURDIR}/kerberos5/tools; \ + MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} ${_t} +.endfor +.endif +@ + + +1.455 +log +@Add knob NO_NIS (fka NO_YP_LIBC) and make world compileable when set. +If turned on no NIS support and related programs will be built. + +Lost parts rediscovered by: Danny Braniss +PR: bin/68303 +No objections: des, gshapiro, nectar +Reviewed by: ru +Approved by: rwatson (mentor) +MFC after: 2 weeks +@ +text +@d407 4 +d416 6 +@ + + +1.454 +log +@Show stray files during "cvs update". +@ +text +@d995 1 +a995 1 + lib/libsbuf lib/libtacplus lib/libutil lib/libypclnt \ +d1030 4 +@ + + +1.453 +log +@Ruslan told me I should have quoted the arch strings when comparing to +MACHINE_ARCH. Belatedly get around to doing it. +@ +text +@d86 1 +a86 1 +CVSFLAGS?= -A -P -d +@ + + +1.452 +log +@Change WANT_LIB32 to WITH_LIB32. Sorry for the whiplash folks. +It was pointed out to me that the convention we have is to use WITH_ +elsewhere in the system, eg: ports etc. This is all temporary anyway +and presumably will be inverted to a NO_LIB32 or something like it in +the future. +@ +text +@d204 1 +a204 1 +.if ${MACHINE_ARCH} == amd64 +d381 1 +a381 1 +.if ${MACHINE_ARCH} == amd64 +d439 1 +a439 1 +.if ${MACHINE_ARCH} == amd64 && defined(WITH_LIB32) +d572 1 +a572 1 +.if ${MACHINE_ARCH} == amd64 && defined(WITH_LIB32) +@ + + +1.451 +log +@Convert tools/lib32/build.sh into world connectable hooks. This still +rates pretty high on the "hack!" scale, but it works for me. Adding +-DWANT_LIB32 to the world build command line, or 'WANT_LIB32=yes' to +/etc/make.conf will include the 32 bit libraries with the build. + +I have not made this default behavior. Cross compiling this stuff is an +adventure I have not investigated. + +This is still a WIP. We needed this at work so that we could install from +a readonly obj tree - lib32/build.sh wasn't up to that. +@ +text +@d439 1 +a439 1 +.if ${MACHINE_ARCH} == amd64 && defined(WANT_LIB32) +d572 1 +a572 1 +.if ${MACHINE_ARCH} == amd64 && defined(WANT_LIB32) +@ + + +1.450 +log +@For variables that are only checked with defined(), don't provide +any fake value. +@ +text +@d204 40 +d381 47 +d439 3 +d572 3 +@ + + +1.449 +log +@Catch another gcc-3.3 c++ include path reference and update it to 3.4. +@ +text +@d505 1 +a505 1 +KERNWARN= yes +@ + + +1.448 +log +@1. Add much finer granularity to the NO_BIND knobs with the addition of: +NO_BIND_DNSSEC, NO_BIND_ETC, NO_BIND_NAMED, and NO_BIND_UTILS. + +2. Make creation of directories in /usr/include that are only needed +in the WITH_BIND_LIBS case conditional. + +Reviewed by: ru, des +@ +text +@d245 1 +a245 1 + usr/bin usr/games usr/include/c++/3.3 usr/include/sys usr/lib \ +@ + + +1.447 +log +@Hopefully fix alpha and sparc64 builds: on these architectures, +libpthread is provided by src/lib/libc_r. + +Also, removed lib/bind from _generic_libs, "lib" will suffice. +Also, removed redundant lib/bind dependency on lib/libpthread +(as lib/bind is not in the _prebuild_libs, it's not needed). + +Prodded by: trhodes@@ reporting that des@@ is on the flight +@ +text +@d273 4 +@ + + +1.446 +log +@Switch from BIND 8 to BIND 9. + +Submitted by: (in part) dougb@@, trhodes@@ +Reviewed by: dougb@@, trhodes@@, re@@ +MFC after: 5 days +@ +text +@d904 3 +d908 1 +a908 3 +_generic_libs+= lib/bind + +lib/bind__L: lib/libpthread__L +@ + + +1.445 +log +@[[ Forced commit due to fumble with the file used to commit with. + cvsgNMRSs vs cvsg4JFe3 :-( ]] + +When recursing, print the target name as well as the subdirectory. +This changes the output a little, but appears to break no scripts. +These changes should make the debugging of build problems easier, as +well as explain why it appears things build 4 times (they don't, +really, since there's obj, depend, all and install). + +I've been running these changes, or variations on them, for about 2 +years. + +Reviewed by: arch@@ (des, markm, koshy, marcel, scottl) +@ +text +@d903 7 +@ + + +1.444 +log +@Although 'Unanimous Consent' appears to be a well defined and used in +the US Senate, Canadian Parliament and Australian Senate, it was +causing some confusion. After some consultation with Mark Murray, +change this to 'without objection' since often times a plain-speaking +term is preferable to a regionally used term. + +Also, clarify that this procedure is to be used when for more mundane +matters that need a sanity check, but don't need the whole, ponderous +voting proceedure that more difficult issues require. Core members +that read email in any given 48 hour period are trusted enough to know +the difference and to provide the sanity check as necessary. + +Reviewed by: markm +@ +text +@@ + + +1.443 +log +@Backout the CVSTAG variable, it could potentially be dangerous if +you track multiple releases in different trees. + +Leave the CVSOPTIONS variable there since it could be useful. +@ +text +@d678 1 +a678 1 + ${_+_}@@${ECHODIR} "===> ${_tool}"; \ +d753 1 +a753 1 + ${_+_}@@${ECHODIR} "===> ${_tool}"; \ +d791 1 +a791 1 + ${_+_}@@${ECHODIR} "===> ${_tool}"; \ +d799 1 +a799 1 + ${_+_}@@${ECHODIR} "===> ${_tool}"; \ +d843 1 +a843 1 + ${_+_}@@${ECHODIR} "===> ${_tool}"; \ +d936 1 +a936 1 + ${_+_}@@${ECHODIR} "===> ${_lib}"; \ +d948 1 +a948 1 + ${_+_}@@${ECHODIR} "===> lib/libpam"; \ +d962 1 +a962 1 + ${ECHODIR} "===> ${DIRPRFX}${entry}.${MACHINE_ARCH}"; \ +d966 1 +a966 1 + ${ECHODIR} "===> ${DIRPRFX}${entry}"; \ +@ + + +1.442 +log +@Fix "make world DESTDIR=/mnt" to work again. A recent change +to make(1) that causes command-line variables to be passed as +command-line variables to sub-processes that make(1) executes +broke it. By changing the type of all DESTDIR variables used +internally in Makefile.inc1, from environment to command-line +variables of the highest priority, I was able to "make world" +with success, with the command-line variable DESTDIR set. +@ +text +@a86 3 +.if defined(CVSTAG) +CVSFLAGS+= -r ${CVSTAG} +.endif +@ + + +1.441 +log +@Add a CVSTAG makefile variable that can be set in /etc/make.conf that +determines which CVS tag to track when running make update. This makes +it easier to configure a box to track a particular release if it does +automated updates from a cvs repository. +@ +text +@d180 1 +a180 2 +BMAKEENV= DESTDIR= \ + INSTALL="sh ${.CURDIR}/tools/install.sh" \ +d186 1 +d194 1 +a201 1 + DESTDIR=${WORLDTMP} \ +d205 1 +a205 1 +WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 +@ + + +1.440 +log +@A fix from rev. 1.52 of gnu/usr.bin/cc/cc_tools/Makefile was lost +in rev. 1.57. Fix this regression by making cc_tools a new-style +build-tool in Makefile.inc1. For details of what has been fixed, +please see the gnu/usr.bin/cc/cc_tools/Makefile,v 1.52 commit log. + +Caught this by accidentally touching param.h while in the process +of cross-buildworld for amd64. +@ +text +@d86 4 +d662 1 +a662 1 + cd ${.CURDIR}; ${CVS} -R -q update -A -P -d +@ + + +1.439 +log +@Moved the MAKEOBJDIRPREFIX check from Makefile.inc1 to Makefile, +to suppress warnings with installworld and distributeworld when +env(1) cannot be found in the PATH. +@ +text +@a783 1 + gnu/usr.bin/cc/cc_tools \ +d796 1 +@ + + +1.438 +log +@sys/boot seems to compile fine on Alpha; unbreak ``make release''. + +Prodded by: re-alpha (wilko) +@ +text +@a92 7 +_MAKEOBJDIRPREFIX!= env -i PATH=${PATH} MAKEFLAGS="${.MAKEFLAGS}" ${MAKE} \ + -f /dev/null -V MAKEOBJDIRPREFIX dummy +.if !empty(_MAKEOBJDIRPREFIX) +.error MAKEOBJDIRPREFIX can only be set in environment, not as a global\ + (in /etc/make.conf) or command-line variable. +.endif + +@ + + +1.438.2.1 +log +@Fix 'make update' to look for RELENG_5 tag. + +Submitted by: eik +Approved by: re (scottl) +@ +text +@d665 1 +a665 1 + cd ${.CURDIR}; ${CVS} -R -q update -rRELENG_5 -P -d +@ + + +1.438.2.2 +log +@MFC: Makefile.inc1,v 1.440 and gnu/usr.bin/cc/cc_tools/Makefile,v 1.80. + +Ensure that .depend file in cc_tools has correct libraries and headers +(host versions, not target). + +Approved by: re (kensmith) +@ +text +@d791 1 +a803 1 + gnu/usr.bin/cc/cc_tools \ +@ + + +1.438.2.3 +log +@MFC: BIND 9 and related bits. + +Approved by: re +@ +text +@a908 8 +.if !defined(NO_BIND) +.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "sparc64" +_prebuild_libs+= lib/libc_r +.else +_prebuild_libs+= lib/libpthread +.endif +.endif + +@ + + +1.438.2.4 +log +@MFC the BIND 9 import and chroot-by-default work up to date. + +This includes: +1. More granular NO_BIND_* make knobs. +2. WITH_BIND_LIBS make knob. +3. Run in an automatically configured chroot dir by default. +4. Edit paths in man pages, and install man pages for liblwres. +5. Improve named.conf and make it work with the new structure. +6. Install the bind9 docs. +7. A few Makefile style fixes. + +Approved by: re (scottl) +@ +text +@a278 4 +.if defined(WITH_BIND_LIBS) && !defined(NO_BIND) + mtree -deU -f ${.CURDIR}/etc/mtree/BIND.include.dist \ + -p ${WORLDTMP}/usr/include >/dev/null +.endif +@ + + +1.438.2.5 +log +@MFC: + +- moved the MAKEOBJDIRPREFIX check from Makefile.inc1 to Makefile, +- improved "make universe", +- fixed "make world DESTDIR=/mnt". +@ +text +@d93 7 +d183 2 +a184 1 +BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ +a189 1 + DESTDIR= \ +a196 1 + DESTDIR= \ +d204 1 +d208 1 +a208 1 +WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP} +@ + + +1.438.2.6 +log +@MFC: add optional WITH_LIB32 hooks for amd64. Note that the tls/%fs/%gs +support code hasn't been merged. +@ +text +@a202 40 +.if ${MACHINE_ARCH} == "amd64" +# 32 bit world +LIB32TMP= ${OBJTREE}${.CURDIR}/lib32 + +LIB32PREFLAGS= -m32 -march=athlon-xp -msse2 -mfancy-math-387 -DCOMPAT_32BIT +LIB32POSTFLAGS= -I${LIB32TMP}/usr/include \ + -L${LIB32TMP}/usr/lib32 \ + -B${LIB32TMP}/usr/lib32 +LIB32CC= ${LIB32PREFLAGS} \ + ${LIB32POSTFLAGS} +LIB32CXX= ${LIB32PREFLAGS} -I${LIB32TMP}/usr/include/c++/3.4 \ + ${LIB32POSTFLAGS} +LIB32OBJC= ${LIB32PREFLAGS} -I${LIB32TMP}/usr/include/objc \ + ${LIB32POSTFLAGS} + +# Yes, the flags are redundant. +LIB32MAKEENV= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \ + _SHLIBDIRPREFIX=${LIB32TMP} \ + MACHINE_ARCH=i386 \ + INSTALL="sh ${.CURDIR}/tools/install.sh" \ + PATH=${TMPPATH} \ + CC="cc ${LIB32CC}" \ + CXX="c++ ${LIB32CXX}" \ + OBJC="cc ${LIB32OBJC}" \ + LD="ld -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \ + AS="as --32" \ + LIBDIR=/usr/lib32 \ + SHLIBDIR=/usr/lib32 + +LIB32MAKE= ${LIB32MAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \ + -DNO_BIND -DNOMAN -DNODOC -DNOINFO -DNOHTML \ + CC="cc ${LIB32CC}" \ + CXX="c++ ${LIB32CXX}" \ + OBJC="cc ${LIB32OBJC}" \ + LD="ld -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \ + AS="as --32" \ + LIBDIR=/usr/lib32 \ + SHLIBDIR=/usr/lib32 +.endif + +a339 47 +.if ${MACHINE_ARCH} == "amd64" +build32: + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> stage 5.1: building 32 bit shim libraries" + @@echo "--------------------------------------------------------------" +.for _dir in \ + lib lib32 usr/bin usr/include usr/lib32 usr/libdata/ldscripts \ + usr/libexec usr/sbin usr/share/misc \ + usr/share/snmp/defs usr/share/snmp/mibs + mkdir -p ${LIB32TMP}/${_dir} +.endfor + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ + -p ${LIB32TMP}/usr/include >/dev/null + ln -sf ${.CURDIR}/sys ${WORLDTMP} +.for _t in obj includes + cd ${.CURDIR}/include; \ + ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} + cd ${.CURDIR}/lib; \ + ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} + cd ${.CURDIR}/gnu/lib; \ + ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} +.if !defined(NOCRYPT) + cd ${.CURDIR}/secure/lib; \ + ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} +.endif +.endfor +.for _dir in lib/libncurses lib/libmagic + cd ${.CURDIR}/${_dir}; \ + MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} build-tools +.endfor + cd ${.CURDIR}; \ + ${LIB32MAKE} -f Makefile.inc1 DESTDIR=${LIB32TMP} libraries +.for _t in obj depend all + cd ${.CURDIR}/libexec/rtld-elf; \ + PROG=ld-elf32.so.1 ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} +.endfor + +install32: + mkdir -p ${DESTDIR}/usr/lib32 # XXX add to mtree + cd ${.CURDIR}/lib; ${LIB32MAKE} install + cd ${.CURDIR}/gnu/lib; ${LIB32MAKE} install +.if !defined(NOCRYPT) + cd ${.CURDIR}/secure/lib; ${LIB32MAKE} install +.endif + cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32MAKE} install +.endif +a350 3 +.if ${MACHINE_ARCH} == "amd64" && defined(WITH_LIB32) +WMAKE_TGTS+= build32 +.endif +a480 3 +.if ${MACHINE_ARCH} == "amd64" && defined(WITH_LIB32) + ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install32 +.endif +@ + + +1.438.2.7 +log +@Refine 5.x version of WITH_LIB32 so that it doesn't explode if you have +COMPAT4X or COMPAT5X etc in make.conf. I didn't hit this in -current +because there are no integral compat libs there. +@ +text +@d230 1 +a230 2 + SHLIBDIR=/usr/lib32 \ + LIBCOMPATDIR=/usr/lib32/compat +d240 1 +a240 2 + SHLIBDIR=/usr/lib32 \ + LIBCOMPATDIR=/usr/lib32/compat +d387 1 +a387 1 + lib lib32 usr/bin usr/include usr/lib32/compat usr/libdata/ldscripts \ +d419 1 +a419 1 + mkdir -p ${DESTDIR}/usr/lib32/compat # XXX add to mtree +@ + + +1.438.2.8 +log +@Insta-MFC rev 1.456: Add the build tools for kerberos5 for WITH_LIB32 on +amd64. +@ +text +@a407 4 +.if !defined(NO_KERBEROS) && !defined(NOCRYPT) && !defined(NO_OPENSSL) + cd ${.CURDIR}/kerberos5/lib; \ + ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t} +.endif +a412 6 +.if !defined(NO_KERBEROS) && !defined(NOCRYPT) && !defined(NO_OPENSSL) +.for _t in obj depend all + cd ${.CURDIR}/kerberos5/tools; \ + MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} ${_t} +.endfor +.endif +@ + + +1.438.2.9 +log +@Insta-MFC rev 1.457 (amd64 hybrid libs only). Fix kerberos5 build. +@ +text +@a396 6 +.if !defined(NO_KERBEROS) && !defined(NOCRYPT) && !defined(NO_OPENSSL) +.for _t in obj depend all + cd ${.CURDIR}/kerberos5/tools; \ + MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} ${_t} +.endfor +.endif +d417 6 +@ + + +1.438.2.10 +log +@MFC knob NO_NIS (fka NO_YP_LIBC) and make world compileable when set. +If turned on no NIS support and related programs will be built. + +Approved by: rwatson (mentor) +@ +text +@d1006 1 +a1006 1 + lib/libsbuf lib/libtacplus lib/libutil \ +a1042 4 +.if !defined(NO_NIS) +_prebuild_libs+= lib/libypclnt +.endif + +@ + + +1.438.2.11 +log +@MFC: 1.471: Fixed CPUTYPE assignment type check to bother +only those who attempts to set it to a different value. +@ +text +@d114 2 +a115 2 +_CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} \ + -f /dev/null -m ${.CURDIR}/share/mk -V CPUTYPE +@ + + +1.438.2.4.2.1 +log +@Use the RELENG_5_3 branch. + +Approved by: re +@ +text +@d669 1 +a669 1 + cd ${.CURDIR}; ${CVS} -R -q update -rRELENG_5_3 -P -d +@ + + +1.437 +log +@Ensure that a new gensnmptree is built. This should fix the problems +with the snmp_atm module. +@ +text +@d65 1 +a65 4 +.if ${MACHINE_ARCH} != "alpha" +SUBDIR+=sys +.endif +SUBDIR+=usr.bin usr.sbin etc +@ + + +1.436 +log +@Enforce the check that MAKEOBJDIRPREFIX (if set) is set in environment +only, and not as a global (in /etc/make.conf) or command-line variable. + +MAKEOBJDIRPREFIX has never been a global or command-line variable, and +the fact that it works in some scenarios for "make buildworld" doesn't +make it any more correct. Using it as a global or command-line variable +is error prone, discouraged, costs us lot of false build reports, etc. + +This commit is aimed to fix it once and for all. + +Anyone potentially objecting to this change is encouraged to read the +make(1) and make.conf(5) manpages, and the comments regarding the use +of the MAKEOBJDIRPREFIX variable in /usr/share/mk/bsd.obj.mk and +/usr/share/examples/etc/make.conf. +@ +text +@d736 1 +a736 1 +.if ${BOOTSTRAPPING} < 501114 +@ + + +1.435 +log +@Fix recent breakage in rescue. We need to build a new crunchgen +that will not emit the bad MAKE=make line that caused the breakage. + +Submitted by: ru +@ +text +@d96 7 +@ + + +1.434 +log +@Make make recurse into sub-directories and sub-makes when given +two -n flags. If only one -n flag is given the old behaviour +is retained (POLA). In order to make this working for installworld +change the IMAKEENV in this case so that the tools are found +(we have no temporary installation environment in this case). + +Submitted by: ru (IMAKEENV part) +@ +text +@d725 1 +a725 1 + ${BOOTSTRAPPING} < 501100 +@ + + +1.433 +log +@The file(1) related build-tool moved to libmagic. +@ +text +@d207 1 +d210 4 +d280 1 +a280 1 + cd ${.CURDIR}; ${BMAKE} legacy +d286 1 +a286 1 + cd ${.CURDIR}; ${BMAKE} bootstrap-tools +d293 1 +a293 1 + cd ${.CURDIR}; ${WMAKE} ${CLEANDIR:S/^/par-/} +d300 1 +a300 1 + cd ${.CURDIR}; ${WMAKE} par-obj +d306 1 +a306 1 + cd ${.CURDIR}; ${TMAKE} build-tools +d312 1 +a312 1 + cd ${.CURDIR}; ${XMAKE} cross-tools +d318 1 +a318 1 + cd ${.CURDIR}; ${WMAKE} SHARED=symlinks par-includes +d324 1 +a324 1 + cd ${.CURDIR}; \ +d332 1 +a332 1 + cd ${.CURDIR}; ${WMAKE} par-depend +d338 1 +a338 1 + cd ${.CURDIR}; ${WMAKE} par-all +d460 1 +a460 1 + cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//} +d474 1 +a474 1 + cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 hierarchy +d479 1 +a479 1 + cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install +d485 1 +a485 1 + cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute +d680 1 +a680 1 + @@${ECHODIR} "===> ${_tool}"; \ +d755 1 +a755 1 + @@${ECHODIR} "===> ${_tool}"; \ +d794 1 +a794 1 + @@${ECHODIR} "===> ${_tool}"; \ +d801 1 +a801 1 + @@${ECHODIR} "===> ${_tool}"; \ +d845 1 +a845 1 + @@${ECHODIR} "===> ${_tool}"; \ +d938 1 +a938 1 + @@${ECHODIR} "===> ${_lib}"; \ +d950 1 +a950 1 + @@${ECHODIR} "===> lib/libpam"; \ +d963 1 +a963 1 + @@if test -d ${.CURDIR}/${entry}.${MACHINE_ARCH}; then \ +@ + + +1.432 +log +@Bmake glue for GCC 3.4.2-prerelease. +@ +text +@d787 1 +a787 1 + usr.bin/file \ +@ + + +1.431 +log +@Get rid of the THISHOST variable when building on sparc64. The problem +with it is that it is set by calling hostname and hostname isn't normally +in the path at that point. +@ +text +@a768 4 +.if !defined(NO_FORTRAN) +_fortran= gnu/usr.bin/cc/f771 +.endif + +a782 1 + ${_fortran} \ +@ + + +1.430 +log +@Third time's a charm?? (the logic was reversed from desired) +Time for sleep... + +Submitted by: ru +@ +text +@a369 4 +THISHOST!= hostname -s +.if empty(THISHOST) +THISHOST="name not set yet" +.endif +d380 1 +a380 1 + @@echo "* This host (${THISHOST}) has time_t defined as ${CUR_TIMET}," +@ + + +1.429 +log +@Grrr, use the userland spelling not the kernel tree spelling. +@ +text +@d65 1 +a65 1 +.if ${MACHINE_ARCH} == "alpha" +@ + + +1.428 +log +@Fall out from Binutils 2.15: disable building the Alpha loader. +@ +text +@d65 1 +a65 1 +.if ${TARGET_ARCH} == "alpha" +@ + + +1.427 +log +@Allow buildworld and friends to complete when make(1) is called +with some debug flags (-d). + +Noticed by: Gleb Smirnoff +@ +text +@d65 4 +a68 1 +SUBDIR+=sys usr.bin usr.sbin etc +@ + + +1.426 +log +@Record the libssl.so dependency on libcrypto.so. This should +help some ports that depend on libradius that recently gained +the dependency on libssl. This is also how the stock OpenSSL +build would link libssl.so on FreeBSD. + +Prompted by: kris +OK'ed by: markm, nectar +@ +text +@d114 1 +a114 1 +_CPUTYPE!= ${MAKE} -f /dev/null -m ${.CURDIR}/share/mk \ +@ + + +1.425 +log +@Catch up with the current output of tools/make_libdeps.sh: + +- Removed the stale dependency of libypclnt on librpcsvc. +- Fixed the dependency graph of libssh. +@ +text +@d912 1 +@ + + +1.424 +log +@- Added rad_demangle() for demangling user-passwords (needed for + MS-CHAPv1 MPPE-keys). +- Added rad_demangle_mppe_key() for demangling mppe-keys (needed + for MPPE-keys). +- Added some typecasts for avoiding compiler warnings. +- Fix: better handle wrong usage of the lib (if the programmer + has not called rad_create_request() but rad_put_*(), then a + weird error message was returned). +- Added a new function for putting the Message-Authenticator. +- Verify the Message-Authenticator, if it was found inside a + response packet and silently drop the packet, if the validation + failed. +- Implicitly put the Message-Authenticator, if the EAP-Message + attribute was added. +- Added some missing defines. + +Submitted by: Michael Bretterklieber +PR: 46555 +@ +text +@d900 1 +a900 1 + lib/libradius lib/librpcsvc \ +a904 1 +lib/libypclnt__L: lib/librpcsvc__L +d914 6 +a919 1 +secure/lib/libssh__L: secure/lib/libcrypto__L lib/libz__L +@ + + +1.423 +log +@Move the SNMP MIBs and tree definitions from /usr/share/bsnmp to +/usr/share/snmp. This mirrors the use of /usr/local/share/snmp and +makes also more sense when non-bsnmp-specific MIBs go in. +@ +text +@d904 1 +a904 1 +lib/libopie__L lib/libradius__L lib/libtacplus__L: lib/libmd__L +d912 1 +d919 4 +@ + + +1.422 +log +@Add a kernel-toolchain target which only builds the bits required to build +a kernel. This is essentially the same as the toolchain target, except +that it does not build headers and libraries. + +Submitted by: ru +@ +text +@d261 1 +a261 1 + usr/share/bsnmp/defs usr/share/bsnmp/mibs +@ + + +1.421 +log +@Added the `toolchain' top-level target, which builds enough of +buildworld, up to and including libraries, except for actually +building the world. + +Requested by: many +@ +text +@d346 3 +a348 1 +toolchain: ${WMAKE_TGTS:N_depend:Neverything} +@ + + +1.420 +log +@Removed 3x2 dots I don't like. ;) +@ +text +@d346 2 +@ + + +1.419 +log +@Create /usr/sbin in ${WORLDTMP}. I've accidentally removed it in +revision 1.343, but it's needed for btxld(8), and this fix (along +with the --enable-64-bit-bfd configured BFD on i386) allows other +architectures to successfully cross-build the i386 world. + +Tested on: alpha +@ +text +@d328 1 +a328 1 + @@echo ">>> stage 4.4: building everything.." +d469 1 +a469 1 + @@echo ">>> Installing everything.." +d475 1 +a475 1 + @@echo ">>> Distributing everything.." +@ + + +1.418 +log +@Comment various stages of buildkernel, symmetrical to buildworld. +@ +text +@d260 2 +a261 1 + usr/libexec usr/share/misc usr/share/bsnmp/defs usr/share/bsnmp/mibs +@ + + +1.417 +log +@Don't scare non-root users attempting to build world. +@ +text +@d540 4 +d550 4 +d557 10 +a569 2 + cd ${KRNLOBJDIR}/${_kernel}; \ + ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} obj +d579 4 +d586 4 +@ + + +1.416 +log +@Create hierarchy before installing a new kernel. This is needed +because we require that a new kernel be installed prior to a new +world, and we may need some new directories to succeed. + +Once MFCed, this will also help those poor souls who redundantly +``mv /modules /modules.old'' in RELENG_4 before an installkernel. + +Requested by: many +MFC after: 3 days +@ +text +@d264 1 +a264 1 + -p ${WORLDTMP}/usr/include +@ + + +1.415 +log +@Hide internal implementation details of UID/GID checks from the user. +@ +text +@d584 9 +@ + + +1.414 +log +@Use find(1) instead of ``pw groupshow'' to detect missing groups. +Restore checks for recently added PF groups. + +Reviewed by: mlaier +@ +text +@d422 1 +a422 1 + @@if ! `id -u ${uid} > /dev/null`; then \ +d428 1 +a428 1 + @@if ! `find / -prune -group ${gid} > /dev/null`; then \ +@ + + +1.413 +log +@Use 'pw groupshow' instead of 'id -g' to see if a group exists. + +PR: 64073 +Submitted by: jhb +MFC after: 5 days +@ +text +@d410 10 +d421 3 +a423 3 +.if !defined(NO_SENDMAIL) + @@if ! `id -u smmsp > /dev/null`; then \ + echo "ERROR: Required smmsp user is missing, see /usr/src/UPDATING."; \ +d426 4 +a429 2 + @@if ! `pw groupshow smmsp > /dev/null`; then \ + echo "ERROR: Required smmsp group is missing, see /usr/src/UPDATING."; \ +d432 1 +a432 7 +.endif +.if !defined(NO_PF) + @@if ! `id -u proxy > /dev/null`; then \ + echo "ERROR: Required proxy user is missing, see /usr/src/UPDATING."; \ + false; \ + fi +.endif +@ + + +1.412 +log +@Back out id -g checks as they are wrong (sendmail group untouched). + +Requested by: dwhite +Approve by: dwhite +@ +text +@d416 1 +a416 1 + @@if ! `id -g smmsp > /dev/null`; then \ +@ + + +1.411 +log +@Add installcheck for proxy:proxy and authpf. + +Suggested by: ru +Approved by: bms(mentor) +@ +text +@a425 8 + @@if ! `id -g proxy > /dev/null`; then \ + echo "ERROR: Required proxy group is missing, see /usr/src/UPDATING."; \ + false; \ + fi + @@if ! `id -g authpf > /dev/null`; then \ + echo "ERROR: Required authpf group is missing, see /usr/src/UPDATING."; \ + false; \ + fi +@ + + +1.410 +log +@Reword two more lines to avoid wrapping. +@ +text +@d421 14 +@ + + +1.409 +log +@Minor stylistic improvements in the SPECIAL_INSTALLCHECKS section, mainly +to reduce the number of wrapped lines. + +Suggested by: bde +@ +text +@d376 2 +a377 2 + @@echo "* This host (${THISHOST}) presently has a time_t of type ${CUR_TIMET}," + @@echo "* and this installation will switch time_t to be type ${SRC_TIMET}." +@ + + +1.408 +log +@Improved the description of the installkernel targets. + +Don't hide what we do to force failures for the installkernel targets +or other targets. +@ +text +@d358 6 +a363 5 +CUR_TIMETYPE!= grep __time_t /usr/include/machine/_types.h | awk '{print $$2}' +SRC_TIMETYPE!= grep __time_t ${.CURDIR}/sys/sparc64/include/_types.h | awk '{print $$2}' +NEWSPARC_TIMETYPE?=${CUR_TIMETYPE} +THISHOST!= hostname -s +.if ${THISHOST} == "" +d368 4 +a371 4 +.if ${CUR_TIMETYPE} != ${SRC_TIMETYPE} + @@echo "" +.if ${NEWSPARC_TIMETYPE} != ${SRC_TIMETYPE} + @@echo "*** ERROR: This target would change the type used for time_t! ***" +d373 1 +a373 1 + @@echo "* Note: This installation changes the type used for time_t" +d376 3 +a378 3 + @@echo "* This host (${THISHOST}) presently has a time_t of type ${CUR_TIMETYPE}," + @@echo "* and this installation will switch time_t to be type ${SRC_TIMETYPE}." +.if ${NEWSPARC_TIMETYPE} != ${SRC_TIMETYPE} +d381 4 +a384 4 + @@echo "* typedef for __time_t in: ${.CURDIR}/sys/sparc64/include/_types.h" + @@echo "* from '${SRC_TIMETYPE}' to '${CUR_TIMETYPE}'. After that you *MUST* do a" + @@echo "* complete cleanworld, buildworld, buildkernel before you retry" + @@echo "* your 'make' command. Also read /usr/src/UPDATING.64BTT." +d387 1 +a387 1 + @@echo " NEWSPARC_TIMETYPE=${SRC_TIMETYPE}" +d390 1 +a390 1 + @@echo "" +d393 4 +a396 4 + @@echo "" +.elif ${NEWSPARC_TIMETYPE} != ${SRC_TIMETYPE} + @@echo "" + @@echo "*** ERROR: The variable NEWSPARC_TIMETYPE is set to '${NEWSPARC_TIMETYPE}'" +d398 1 +a398 1 + @@echo "*** has __time_t defined as: '${SRC_TIMETYPE}'" +d401 1 +a401 1 + @@# in sparc64_installcheck, all TIMETYPEs == '${NEWSPARC_TIMETYPE}' +@ + + +1.407 +log +@[this is just a forced commit to say:] The time_t-specific safety measure +added by the sparc64_installcheck target is mostly from Marcel, although +it includes some adjustments of my own... +@ +text +@d224 1 +a224 1 + @@false +d390 1 +a390 1 + @@false +d398 1 +a398 1 + @@false +d511 1 +a511 1 + @@false +d561 1 +a561 1 +# installkernel +d569 1 +a569 1 + @@false +@ + + +1.406 +log +@Commit the first set of files for changing time_t on freebsd/sparc64 +from a 32-bit value to a 64-bit value. This commit does not actually +change anything. It merely provides instructions, scripts, and a safety +measure in Makefile.inc1 for people who want to make the change. + +The real change to 64-bit time_t's on sparc64 is scheduled to happen +on March 10th, assuming that so major problems are found between now +and then by early-adopters. + +Reviewed by: freebsd-sparc64 +@ +text +@@ + + +1.405 +log +@Drop directory existence checks. + +OK'ed by: bde +@ +text +@d346 59 +d409 1 +a409 1 +installcheck: +d448 1 +a448 1 +reinstall: +d565 2 +a566 1 +installkernel reinstallkernel installkernel.debug reinstallkernel.debug: +@ + + +1.404 +log +@Overhaul of kerberos5/ makefiles. Most significant changes are: + +- Dropped support for standalone builds, this was only partially + supported anyway, and required so much magic in makefiles that + made life dangerous (e.g., by using the custom yacc rules). + +- Got rid of .OBJDIR in makefiles -- makes building of individual + files possible again. + +- Made the .x.c transformations -j safe. + +- Reprogrammed LDADD to fix static build of some utilities that + was broken. + +- Fixed LDFLAGS and DPADD in the WITH_OPENLDAP case -- positively + affects the contents of .depend files. + +- Removed redundant .h's from SRCS, only kept those that are + generated. + +- libkrb5/ INCS were bogusly installed again with libgssapi/. + +- Made build-tools real tools with their own makefiles in + separate directories. This allows us to properly track + their dependencies, etc. + +- Faster build, 21% less of makefile code! + +Approved by: nectar +Reviewed by: markm +Silence on: arch +@ +text +@a35 3 +# Put initial settings here. +SUBDIR= + +d39 1 +a39 8 +.if exists(${.CURDIR}/share/info) +SUBDIR+= share/info +.endif + +.if exists(${.CURDIR}/include) +SUBDIR+= include +.endif + +d44 6 +a49 22 +.if exists(${.CURDIR}/lib) +SUBDIR+= lib +.endif +.if exists(${.CURDIR}/libexec) +SUBDIR+= libexec +.endif + +.if exists(${.CURDIR}/bin) +SUBDIR+= bin +.endif +.if exists(${.CURDIR}/games) && !defined(NOGAMES) +SUBDIR+= games +.endif +.if exists(${.CURDIR}/gnu) +SUBDIR+= gnu +.endif +.if exists(${.CURDIR}/kerberos5) && exists(${.CURDIR}/crypto) && \ + !defined(NOCRYPT) && !defined(NO_OPENSSL) && !defined(NO_KERBEROS) +SUBDIR+= kerberos5 +.endif +.if exists(${.CURDIR}/rescue) && !defined(NO_RESCUE) +SUBDIR+= rescue +d51 3 +a53 2 +.if exists(${.CURDIR}/sbin) +SUBDIR+= sbin +d55 2 +a56 2 +.if exists(${.CURDIR}/secure) && !defined(NOCRYPT) +SUBDIR+= secure +d58 3 +a60 2 +.if exists(${.CURDIR}/share) && !defined(NOSHARE) +SUBDIR+= share +d62 2 +a63 13 +.if exists(${.CURDIR}/sys) +SUBDIR+= sys +.endif +.if exists(${.CURDIR}/usr.bin) +SUBDIR+= usr.bin +.endif +.if exists(${.CURDIR}/usr.sbin) +SUBDIR+= usr.sbin +.endif + +# etc must be last for install/distribute to work +.if exists(${.CURDIR}/etc) +SUBDIR+= etc +d65 1 +a68 1 +.if defined(LOCAL_DIRS) +d70 1 +a70 1 +.if exists(${.CURDIR}/${_DIR}) && exists(${.CURDIR}/${_DIR}/Makefile) +a73 1 +.endif +d577 1 +a577 1 +.if exists(${.CURDIR}/games) && !defined(NOGAMES) +d655 1 +a655 1 +.if exists(${.CURDIR}/share) && !defined(NOSHARE) +d663 1 +a663 2 +.if exists(${.CURDIR}/kerberos5) && exists(${.CURDIR}/crypto) && \ + !defined(NOCRYPT) && !defined(NO_OPENSSL) && !defined(NO_KERBEROS) +d667 1 +a667 1 +.if exists(${.CURDIR}/rescue) && !defined(NO_RESCUE) +d778 1 +a778 2 +.if exists(${.CURDIR}/kerberos5) && exists(${.CURDIR}/crypto) && \ + !defined(NOCRYPT) && !defined(NO_OPENSSL) && !defined(NO_KERBEROS) +@ + + +1.403 +log +@Create the OID and tree files while building the modules and the daemon +instead of creating them by hand and storing them in the CVS tree. Add +gensnmptree to the bootstrap tools (it is used to generated these files). +This simplifies the update procedure. + +Submitted by: ru +@ +text +@d701 1 +a701 2 +_libkrb5= kerberos5/lib/libroken kerberos5/lib/libvers \ + kerberos5/lib/libasn1 kerberos5/lib/libhdb kerberos5/lib/libsl +a714 1 + ${_libkrb5} \ +d725 8 +@ + + +1.402 +log +@- Run makewhatis(1) in etc/Makefile at the end of "install". +- Removed redundant and undocumented NO_MAKEDB_RUN knob. +@ +text +@d650 4 +d674 1 +@ + + +1.401 +log +@Create ${WORLDTMP}/legacy/usr/include/c++/3.3 for usr.bin/lex. +@ +text +@d96 1 +a96 1 +# etc must be last for "distribute" to work +a434 7 +.if !defined(NOMAN) && !defined(NO_MAKEDB_RUN) + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Rebuilding man page indices" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}/share/man; ${MAKE} makedb +.endif +@ + + +1.400 +log +@lex(1) prior to flex.skl,v 1.8 and gen.c,v 1.7 requires bootstrapping. + +Prodded by: nectar +@ +text +@d275 1 +a275 1 + usr/bin usr/games usr/include/sys usr/lib \ +@ + + +1.399 +log +@Alongside revision 1.382, don't build profiled libraries so early +in the build -- it's OK to keep this for the "make all" phase. +@ +text +@d633 4 +d668 1 +@ + + +1.398 +log +@Fix a problem where 'make installworld' will fail and leave the +system in a messy state *if* the user is upgrading from a system +which has no /libexec to a system which builds a DYNAMICROOT, and +if that user has set DISTDIR (as documented for ports, but it turns +out that the same variable name is used for a completely unrelated +purpose in 'make release'). + +There are other possible fixes for this issue, and ru@@ may later +decide to commit one of those fixes. I just wanted some fix in +ASAP, and this is the fix that I have tested. + +Reviewed by: bde, imp, and ru +@ +text +@d351 3 +a353 2 + cd ${.CURDIR}; ${WMAKE} -DNOHTML -DNOINFO -DNOMAN -DNOFSCHG -DNOLINT \ + libraries +@ + + +1.397 +log +@Invert the condition that installs the dynamic linker early, since +DYNAMICROOT is now the default. Also document -DNO_DYNAMICROOT since +that is going to be a documented feature. + +Submitted by: matusita, rushani +@ +text +@d49 5 +d57 2 +a58 10 + +# When upgrading to a dynamically linked root, install the runtime +# linker early into its new location before make(1) has a chance +# to run the dynamically linked /bin/sh. +.if !defined(NO_DYNAMICROOT) && !defined(NOPIC) && \ + (!defined(TARGET_ARCH) || ${TARGET_ARCH} == ${MACHINE_ARCH}) && \ + !defined(DISTDIR) && \ + (!defined(DESTDIR) || empty(DESTDIR) || ${DESTDIR} == "/") && \ + !exists(/libexec/ld-elf.so.1) +SUBDIR+= libexec/rtld-elf +a72 3 +.endif +.if exists(${.CURDIR}/libexec) +SUBDIR+= libexec +@ + + +1.397.2.1 +log +@Point 'make update' at RELENG_5_2 +@ +text +@d594 1 +a594 1 + cd ${.CURDIR}; ${CVS} -R -q update -rRELENG_5_2 -P -d +@ + + +1.397.2.2 +log +@MFC 1.398: Fix a problem where 'make installworld' can fail and +leave the system in a messy state when upgrading from a system +which has no /libexec to a system which builds a DYNAMICROOT. + +Approved by: re (scottl) +@ +text +@a48 5 + +# We must do lib and libexec before bin, because if installworld +# installs a new /bin/sh, the 'make' command will *immediately* +# use that new version. And the new (dynamically-linked) /bin/sh +# will expect to find appropriate libraries in /lib and /libexec. +d52 10 +a61 2 +.if exists(${.CURDIR}/libexec) +SUBDIR+= libexec +d76 3 +@ + + +1.396 +log +@The snmp_netgraph module depends on libnetgraph. So add a dependency and +add libnetgraph to the list of prebuilt libraries in the main Makefile. + +Reviewed by: ru +@ +text +@d5 1 +d56 1 +a56 1 +.if defined(WITH_DYNAMICROOT) && !defined(NOPIC) && \ +@ + + +1.395 +log +@Make two directories under usr/share/bsnmp that are needed during +library build to install tree definition files and MIBS. + +Okay'ed by: ru +@ +text +@d821 2 +a822 2 + lib/libncurses lib/libopie lib/libpam lib/libradius \ + lib/librpcsvc \ +@ + + +1.394 +log +@Don't be so chatty about building includes. +@ +text +@d301 1 +a301 1 + usr/libexec usr/share/misc +@ + + +1.393 +log +@Retired the "most" and "installmost" targets -- they just +do not have a chance to work nowadays as we have a lot of +internal libraries in lib/. + +Discussed with: marcel, wollman +@ +text +@d348 1 +a348 1 + @@echo ">>> stage 4.1: populating ${WORLDTMP}/usr/include" +@ + + +1.392 +log +@Help those attempting to upgrade from static to dynamic root. +@ +text +@a29 2 +# most - build user commands, no libraries or include files +# installmost - install user commands, no libraries or include files +a594 27 + +# +# most +# +# Build most of the user binaries on the existing system libs and includes. +# +most: + @@echo "--------------------------------------------------------------" + @@echo ">>> Building programs only" + @@echo "--------------------------------------------------------------" +.for _dir in bin sbin libexec usr.bin usr.sbin gnu/usr.bin gnu/usr.sbin + cd ${.CURDIR}/${_dir}; ${MAKE} DIRPRFX=${_dir}/ all +.endfor + +# +# installmost +# +# Install the binaries built by the 'most' target. This does not include +# libraries or include files. +# +installmost: + @@echo "--------------------------------------------------------------" + @@echo ">>> Installing programs only" + @@echo "--------------------------------------------------------------" +.for _dir in bin sbin libexec usr.bin usr.sbin gnu/usr.bin gnu/usr.sbin + cd ${.CURDIR}/${_dir}; ${MAKE} DIRPRFX=${_dir}/ install +.endfor +@ + + +1.391 +log +@Catch up with libpthread/support/Makefile.inc,v 1.6 and revert +Makefile.inc1 revisions 1.365 and 1.367: libc_pic.a is no longer +necessary to build libpthread.so (ie: libkse.so). +@ +text +@d54 11 +@ + + +1.390 +log +@- No need to create libfoo.so -> libfoo.so.X symlinks in /lib, + as it was decided that our toolchain will revert to looking + for libraries in /usr/lib only. + +- Make /usr/lib/libfoo.so -> /lib/libfoo.so.X symlinks absolute + so that they still work if /usr is symlinked. + +- Remove stale /usr/lib/libfoo.so.X libraries during install. + +Discussed with: gordon, obrien, peter +@ +text +@a816 2 +# lib/libc (libc_pic.a) must be built before lib/libpthread. +# +d825 1 +a836 3 +.if !defined(NOLIBPTHREAD) +_prebuild_libs+= lib/libc +.endif +@ + + +1.389 +log +@Clarify the numbering of some of the build stages. +@ +text +@d230 1 +@ + + +1.388 +log +@Revert rev. 1.378, and restore the correct arithmetic expression +syntax. The + + make buildworld + mv /usr/include /usr/include.old + make installworld + +issue has been fixed a month ago in Makefile,v 1.285, and there +is no valid reason to continue to keep the wrong syntax here -- +buildworld takes care of upgrading a make for you if necessary. +But if you find yourself in an environment with an old make(1) +binary that breaks on this, and this is because you attempted +to run a target other than buildworld, don't whine but try again +with -DALWAYS_CHECK_MAKE defined -- it should do the trick. +Otherwise, if you still have a problem, please report it as a +bug and attach the ``make -dl ...'' output. + +Reviewed by: marcel +@ +text +@d300 1 +a300 1 + @@echo ">>> stage 1: legacy release compatibility shims" +d306 1 +a306 1 + @@echo ">>> stage 1: bootstrap tools" +d313 1 +a313 1 + @@echo ">>> stage 2: cleaning up the object tree" +d320 1 +a320 1 + @@echo ">>> stage 2: rebuilding the object tree" +d326 1 +a326 1 + @@echo ">>> stage 2: build tools" +d338 1 +a338 1 + @@echo ">>> stage 4: populating ${WORLDTMP}/usr/include" +d344 1 +a344 1 + @@echo ">>> stage 4: building libraries" +d351 1 +a351 1 + @@echo ">>> stage 4: make dependencies" +d357 1 +a357 1 + @@echo ">>> stage 4: building everything.." +@ + + +1.387 +log +@Remove the AFM (Anti-Footshooting Measure) added when we split the +5.x signal code from the 4.x signal code. The split happened in +Oct 2002 and we have had 2 releases since then. A kernel older than +5.0-R cannot reasonably be called a -current kernel anymore. + +This does not break upgrading from an 10 month older kernel. It just +makes it more exiting. +@ +text +@d761 1 +a761 1 + ( ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 501101 ) +@ + + +1.386 +log +@OSRELDATE should fallback to 'unknown' rather than the kernel that's +booted on this machine. This is a slightly better default to use. + +Requested by: ru +@ +text +@a390 7 +.if ${TARGET_ARCH} == ${MACHINE_ARCH} && !defined(DISTDIR) && \ + (!defined(DESTDIR) || empty(DESTDIR) || ${DESTDIR} == "/") + @@echo "Checking to see if your booted kernel is fresh enough.." + @@${.OBJDIR}/bin/sh/sh -c \ + 'echo "Testing installed kernel for new sigaction(2) syscall"' + @@echo "Seems ok.." +.endif +@ + + +1.385 +log +@Add @@ before the shell invocation for the testing of sufficiently new sh. +No need to see this message twice. +@ +text +@d130 1 +a130 1 +OSRELDATE!= sysctl -n kern.osreldate +@ + + +1.384 +log +@Fall back to using the kernel version for the OSRELDATE when +/usr/include/osreldate.h doesn't exist on the system. While this +could be worked around by saying something like 'make includes +OSLRELDATE=0' when this file doesn't exist, it is just as easy to +provide a fallback when the file we know we depend on doesn't exist. +While this doesn't make all targets work w/o a +/usr/include/osreldate.h, because some of the FreeBSD bootstrap tools +use this file. 'make includes' however does work. + +Noticed by: peter, obrien (and likely others) +Pointy hat to: imp (for suggesting a method that depended on /usr/include) +@ +text +@d394 1 +a394 1 + ${.OBJDIR}/bin/sh/sh -c \ +@ + + +1.383 +log +@In preparation for libraries being installed in /lib, add lib to the +list of build directories during the tool creation phase of the build. +@ +text +@d126 1 +d129 3 +@ + + +1.382 +log +@Don't lint(1) so early in the build. Its OK to keep this for the +"make all" phase. +@ +text +@d286 1 +a286 1 + usr/bin usr/include usr/lib/compat/aout usr/libdata/ldscripts \ +@ + + +1.381 +log +@Apparently we prefer underscores in new options. Sorry for the churn folks. + +Requested by: obrien +@ +text +@d342 2 +a343 1 + cd ${.CURDIR}; ${WMAKE} -DNOHTML -DNOINFO -DNOMAN -DNOFSCHG libraries +@ + + +1.380 +log +@Forgot that the rescue subdir needs to be a conditional for the +build-tools bit. +@ +text +@d6 1 +a11 1 +# -DNORESCUE do not build rescue binaries +d70 1 +a70 1 +.if exists(${.CURDIR}/rescue) && !defined(NORESCUE) +d671 1 +a671 1 +.if !defined(NORESCUE) && \ +d725 1 +a725 1 +.if exists(${.CURDIR}/rescue) && !defined(NORESCUE) +d761 1 +a761 1 +.if (!defined(NORESCUE) || \ +@ + + +1.379 +log +@Turn rescue back on, conditional to NORESCUE. We seem to be split on +using underscores or not, so I just randomly picked a style. I think +I have the logic correct, but if someone wants to give it a once over +that would be good. + +Tim submitted a patch to fix the cross-building issues which I tested +with a tinderbox run for sparc64. + +Submitted by: Tim Kientzle +@ +text +@d725 4 +d733 1 +a733 1 + rescue/rescue \ +@ + + +1.378 +log +@Correct makefile syntax error in r1.375. +@ +text +@d11 1 +d70 1 +a70 1 +.if exists(${.CURDIR}/rescue) && defined(RESCUE) +d671 1 +a671 1 +.if defined(RESCUE) && \ +d729 1 +d757 1 +a757 1 +.if (defined(RESCUE) || \ +@ + + +1.377 +log +@Style nit. +@ +text +@d757 1 +a757 1 + (${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 501101) +@ + + +1.376 +log +@Use 'id' instead of 'grep' to detect the presence of the smmsp user/group. +This fixes the check for users with smmsp in NIS instead of their local +files. + +Suggested by: peter +MFC after: 5 days +@ +text +@d670 1 +a670 1 +.if exists(${.CURDIR}/rescue) && defined(RESCUE) && \ +d755 1 +a755 1 +.if (exists(${.CURDIR}/rescue) && defined(RESCUE) || \ +@ + + +1.375 +log +@Fixed style bugs related to parentheses in Makefile.inc1. + +Submitted by: bde + +Fixed nearby bug: propagate the root Makefile's idea of +the appropriate "make" binary down to release/Makefile. +@ +text +@d376 1 +a376 1 + @@if ! `grep -q '^smmsp:' /etc/passwd`; then \ +d380 1 +a380 1 + @@if ! `grep -q '^smmsp:' /etc/group`; then \ +@ + + +1.374 +log +@More NO_RESCUE to RESCUE transitions. + +Submitted by: ru +@ +text +@d655 2 +a656 2 +.if ( ${BOOTSTRAPPING} < 450005 || \ + ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500034 )) +d660 2 +a661 2 +.if ( ${BOOTSTRAPPING} < 430002 || \ + ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500019 )) +d665 2 +a666 2 +.if ( ${BOOTSTRAPPING} < 430002 || \ + ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500018 )) +d757 1 +a757 1 + ( ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 501101 ) +@ + + +1.373 +log +@Switch the logic on the /rescue bits from NO_RESCUE to RESCUE, at least +until there is a fix for cross building available. +@ +text +@d670 1 +a670 1 +.if exists(${.CURDIR}/rescue) && !defined(NO_RESCUE) && \ +d755 1 +a755 1 +.if (exists(${.CURDIR}/rescue) && !defined(NO_RESCUE) || \ +@ + + +1.372 +log +@Put rescue/ into a correct slot in the SUBDIR list. Sort bootstrap-, +build-, and cross-tools lists, reformat lists for easier maintenance. + +Submitted by: bde, ru +@ +text +@d69 1 +a69 1 +.if exists(${.CURDIR}/rescue) && !defined(NO_RESCUE) +@ + + +1.371 +log +@Only bootstrap crunchide(1) and build crunchgen(1) when necessary. +The latter needs to be built either if it's used as a cross-tool +(${TARGET_ARCH} != ${MACHINE_ARCH}) or if it has backward compat +issues, like e.g. lack of the AMD64 support. +@ +text +@a52 4 +.if exists(${.CURDIR}/rescue) && !defined(NO_RESCUE) +SUBDIR+= rescue +.endif + +d69 3 +d680 15 +a694 5 +.for _tool in ${_strfile} usr.bin/colldef \ + usr.bin/makewhatis usr.bin/rpcgen ${_uudecode} \ + ${_xargs} usr.bin/xinstall ${_yacc} \ + usr.sbin/config ${_crunchgen} ${_kbdcontrol} \ + ${_gperf} ${_groff} gnu/usr.bin/texinfo +d725 12 +a736 3 +.for _tool in bin/csh bin/sh gnu/usr.bin/cc/cc_tools ${_fortran} \ + ${_libkrb5} lib/libncurses ${_share} \ + ${_aicasm} usr.bin/awk usr.bin/file usr.sbin/sysinstall +d746 3 +a748 2 +.if ${TARGET_ARCH} == "alpha" && ${TARGET_ARCH} != ${MACHINE_ARCH} +_elf2exe= usr.sbin/elf2exe +d752 1 +a752 9 +_btxld= usr.sbin/btxld +.if defined(RELEASEDIR) +_kgzip= usr.sbin/kgzip +.endif +.endif + +.if ${TARGET_ARCH} == "sparc64" && ${TARGET_ARCH} != ${MACHINE_ARCH} && \ + ${BOOTSTRAPPING} < 500037 +_elf2aout= usr.bin/elf2aout +d761 8 +a768 1 +_xlint= usr.bin/xlint/lint1 usr.bin/xlint/lint2 usr.bin/xlint/xlint +d771 9 +a779 3 +.for _tool in ${_btxld} ${_elf2aout} ${_elf2exe} \ + gnu/usr.bin/binutils ${_crunchide} \ + gnu/usr.bin/cc ${_xlint} ${_kgzip} +@ + + +1.370 +log +@Do the deed and hookup /rescue to the build. As a result, always build +crunchgen and crunchide as cross-tools. + +Submitted by: Tim Kientzle +@ +text +@d671 5 +d684 1 +a684 1 + usr.sbin/config ${_kbdcontrol} \ +d744 6 +d754 1 +a754 2 + gnu/usr.bin/binutils \ + usr.sbin/crunch/crunchgen usr.sbin/crunch/crunchide \ +@ + + +1.369 +log +@- Fix a typo. + +PR: bin/53864 +Submitted by: Lukas Ertl +Approved by: jeff (mentor) +@ +text +@d53 4 +a738 4 +.if defined(RELEASEDIR) +_crunchide= usr.sbin/crunch/crunchide +.endif + +d743 2 +a744 1 + gnu/usr.bin/binutils ${_crunchide} \ +@ + + +1.368 +log +@Allow installkernel.debug and reinstallkernel.debug. +@ +text +@d97 1 +a97 1 +.if exists(${.CURDIR}/${_DIR}) & exists(${.CURDIR}/${_DIR}/Makefile) +@ + + +1.367 +log +@Minor tweaks to the build process so that we can build 5.1-current on +4.8-stable: + +Must build lib/libc before libpthread. Fix how we do this to be more +consistant with how lists are handled in the file. Also, don't bother +to prebuild libc if we're not building libpthread. + +Submitted by: ru@@ +Reviewed by: bde@@ (before ru@@ submitted it) +@ +text +@d541 1 +a541 1 +installkernel reinstallkernel: +d548 1 +a548 1 + ${MAKE} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel$//} +@ + + +1.366 +log +@Do not bogusly set CSTD to the empty string. +@ +text +@d777 2 +d786 1 +a786 1 +_prebuild_libs+= lib/libc +d798 3 +@ + + +1.365 +log +@Add lib/libc to list of _prebuild_libs because we need the target +built libc_pic.a for libkse. + +# This should finally fix the build on 4.x + +Submitted by: kan +@ +text +@a204 3 +.if ${BOOTSTRAPPING} < 501100 +BMAKEENV+= CSTD= +.endif +@ + + +1.364 +log +@When boot strapping from older systems, don't specify a C standard in +the bootstrap process. This allows one to more completely build from +a -stable box. + +Reviewed by: ru@@ (briefly) +@ +text +@d787 1 +a787 2 +_prebuild_libs= + +@ + + +1.363 +log +@Wrap gperf & groff wth NO_CXX. +@ +text +@d205 3 +@ + + +1.362 +log +@Unbreak world build if NO_OPENSSL is defined but NO_KERBEROS is not. + +Submitted by: Marius Strobl +Approved by: re (jhb) +@ +text +@d643 2 +d650 1 +d676 1 +a676 1 + gnu/usr.bin/gperf ${_groff} gnu/usr.bin/texinfo +@ + + +1.362.2.1 +log +@Fixed the update target to follow the correct CVS branch. + +Approved by: nectar +@ +text +@d581 1 +a581 1 + cd ${.CURDIR}; ${CVS} -R -q update -rRELENG_5_1 -P -d +@ + + +1.361 +log +@Retire the useless NOSECURE knob. + +Approved by: re (scottl) +@ +text +@d698 1 +a698 1 + !defined(NOCRYPT) && !defined(NO_KERBEROS) +d785 2 +a786 1 +.if !defined(NOCRYPT) && !defined(NO_KERBEROS) +@ + + +1.360 +log +@Unbreak parallel make of _includes after revision 1.356 changes. + +Spotted by: bde +Approved by: re (scottl) +@ +text +@a10 1 +# -DNOSECURE do not go into secure subdir +d72 1 +a72 1 +.if exists(${.CURDIR}/secure) && !defined(NOCRYPT) && !defined(NOSECURE) +d805 1 +a805 1 +.if !defined(NOCRYPT) && !defined(NOSECURE) +@ + + +1.359 +log +@-lbsdxml lives in lib/libexpat. *Blush* + +Submitted by: tmm (Makefile.inc1) +@ +text +@d287 2 +@ + + +1.358 +log +@Unbreak world: record libgeom dependency on libbsdxml here too. + +Forgotten by: ru +Submitted by: des +Verified by: tools/make_libdeps.sh +Approved by: re (scottl) (related change) +@ +text +@d792 1 +a792 1 +_prebuild_libs+= lib/libbsdxml lib/libcom_err lib/libcrypt \ +@ + + +1.357 +log +@Use the installed world's idea of OSRELDATE rather than the kernel. +This was the initial intent anyway, and it became clear that it is +really necessary to treat it this way, as many people happen to run +with kernel newer than the installed world. + +Submitted by: imp, ru +Approved by: re (scottl) +@ +text +@d792 2 +a793 1 +_prebuild_libs+= lib/libcom_err lib/libcrypt lib/libkvm lib/libmd \ +@ + + +1.356 +log +@Install symlinks to individual headers instead of symlinks to directories +in the SHARED=symlinks case. Symlinks to directories only work if all the +the necessary headers are in 1 directory, but the necessary headers are +scattered for at least ipfilter headers in . This change also +avoids polluting /usr/include with non-headers; the /usr/include hierarchy +is now independent of the setting of SHARED. + +Submitted by: ru (edited to fix netgraph/bluetooth/include and machine/pc) +PR: 44148 +@ +text +@d123 2 +a124 1 +OSRELDATE!= sysctl -n kern.osreldate +@ + + +1.355 +log +@Negate the logic of MAKE_KERBEROS5, and replace it with NO_KERBEROS. +@ +text +@d282 2 +a283 1 + usr/bin usr/lib/compat/aout usr/libdata/ldscripts usr/libexec usr/share/misc +a284 5 +.endfor +.for _dir in \ + arpa dev fs g++/backward g++/bits g++/ext isc isofs libmilter \ + objc openssl protocols readline rpc rpcsvc security ufs + mkdir -p ${WORLDTMP}/usr/include/${_dir} +@ + + +1.354 +log +@Many developers run with userland != to kernel. While this isn't +supported, it usually works for months at a time. Allow these people +to override the OSRELDATE of their installed world when things don't +match and the exact OSRELDATE matters and is different than the +kernel. Now that Makefile.inc1 depends more and more about which date +you have to optimize the pieces it builds, it may be necessary to +pessimize things if its guesses are wrong. + +If OSRELDATE is already set, we won't fork the sysctl to find out what +the kernel's date is. + +Developers on IRC suggested that they run mismatches all the time as +well. + +Reviewed by: obrien +@ +text +@d5 1 +a5 1 +# -DMAKE_KERBEROS5 to build Kerberos5 +d64 1 +a64 1 + !defined(NOCRYPT) && !defined(NO_OPENSSL) && defined(MAKE_KERBEROS5) +d700 1 +a700 1 + !defined(NOCRYPT) && defined(MAKE_KERBEROS5) +d787 1 +a787 1 +.if !defined(NOCRYPT) && defined(MAKE_KERBEROS5) +@ + + +1.353 +log +@For the time being, upgrade the whole Groff (to version 1.19), +but stop doing so again on the next __FreeBSD_version bump. +@ +text +@d122 1 +d124 1 +@ + + +1.352 +log +@Restore the ordering of NO's and remove one redundant NOLINT. + +Reviewed by: markm +@ +text +@d643 1 +a643 1 +.if ${BOOTSTRAPPING} < 500042 +@ + + +1.351 +log +@Fix "make world" for the WANT_LINT case. The various build tools +must not try to lint(1) stuff at *-tools time; keep the linting +for the actual build (which comes later). +@ +text +@d206 2 +a207 2 + -DNOHTML -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED \ + -DNO_CPU_CFLAGS -DNO_WARNS -DNOLINT +d212 1 +a212 1 + BOOTSTRAPPING=${OSRELDATE} -DNO_CPU_CFLAGS -DNO_WARNS -DNOLINT +d215 1 +a215 1 +XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} -DNO_FORTRAN -DNO_GDB -DNOLINT +@ + + +1.350 +log +@Groff after 2002/10/15 has no known backward compatibility issues, +but we always want the latest macro files. +@ +text +@d207 1 +a207 1 + -DNO_CPU_CFLAGS -DNO_WARNS +d212 1 +a212 1 + BOOTSTRAPPING=${OSRELDATE} -DNO_CPU_CFLAGS -DNO_WARNS +d215 1 +a215 1 +XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} -DNO_FORTRAN -DNO_GDB +@ + + +1.349 +log +@Rename KRNLSRCDIR to KERNSRCDIR and allow it to be overridden. The name +change was to be consistent with other overridable variables such as +KERNCONFDIR and KERNCONF. +@ +text +@d643 6 +d673 1 +a673 1 + gnu/usr.bin/gperf gnu/usr.bin/groff gnu/usr.bin/texinfo +@ + + +1.348 +log +@kbdcontrol.c rev. 1.35 and onwards support the KEYMAP_PATH +environment variable, and don't need to be bootstrapped. +@ +text +@d463 3 +a465 3 +KRNLSRCDIR= ${.CURDIR}/sys +KRNLCONFDIR= ${KRNLSRCDIR}/${TARGET}/conf +KRNLOBJDIR= ${OBJTREE}${KRNLSRCDIR} +d513 2 +a514 2 + MAKESRCPATH=${KRNLSRCDIR}/dev/aic7xxx/aicasm \ + ${MAKE} -DNO_CPU_CFLAGS -f ${KRNLSRCDIR}/dev/aic7xxx/aicasm/Makefile +d518 1 +a518 1 +.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KRNLSRCDIR}/modules) +d679 1 +a679 1 +.if defined(MODULES_WITH_WORLD) && exists(${KRNLSRCDIR}/modules) +@ + + +1.347 +log +@yacc(1) with skeleton.c rev. 1.29 in HEAD and rev. 1.28.2.1 in RELENG_4, +and onwards, are believed to not require bootstrapping. +@ +text +@d658 4 +d666 1 +a666 1 + usr.sbin/config usr.sbin/kbdcontrol \ +@ + + +1.346 +log +@xargs.c rev. 1.10 in HEAD and rev. 1.9.2.1 in RELENG_4, +and onwards, have support for the -J option we need. +@ +text +@d653 5 +d659 1 +a659 1 +.for _tool in ${_strfile} usr.bin/yacc usr.bin/colldef \ +d661 1 +a661 1 + ${_xargs} usr.bin/xinstall \ +@ + + +1.345 +log +@elf2aout.c,v 1.6 and onwards have no known backward compatibility issues. +@ +text +@d648 5 +d656 1 +a656 1 + usr.bin/xargs usr.bin/xinstall \ +@ + + +1.344 +log +@uudecode.c rev. 1.23 in HEAD and rev. 1.13.2.3 in RELENG_4, +and onwards, have no known backwards compatibility issues. +@ +text +@d186 2 +a642 1 +.if defined(BOOTSTRAPPING) +a646 1 +.endif +d707 2 +a708 1 +.if ${TARGET_ARCH} == "sparc64" && ${TARGET_ARCH} != ${MACHINE_ARCH} +@ + + +1.343 +log +@Only create directories that are really needed. +@ +text +@d641 7 +d650 1 +a650 1 + usr.bin/makewhatis usr.bin/rpcgen usr.bin/uudecode \ +@ + + +1.342 +log +@Install bootstrap-tools into a separate subtree of ${WORLDTMP}. +This allows us to use them as early as possible while building +bootstrap-, build-, and cross-tools. Some cleanups to follow. + +This change resolves the gperf(1) bootstrapping issue (missing +-E option) in gnu/usr.bin/cc/cc1plus while in the cross-tools +stage when upgrading from 4.0-RELEASE. +@ +text +@a229 22 +USRDIRS= usr/bin usr/lib/compat/aout usr/games usr/libdata/ldscripts \ + usr/libexec usr/sbin usr/share/misc \ + usr/share/dict \ + usr/share/groff_font/devX100 \ + usr/share/groff_font/devX100-12 \ + usr/share/groff_font/devX75 \ + usr/share/groff_font/devX75-12 \ + usr/share/groff_font/devascii \ + usr/share/groff_font/devcp1047 \ + usr/share/groff_font/devdvi \ + usr/share/groff_font/devhtml \ + usr/share/groff_font/devkoi8-r \ + usr/share/groff_font/devlatin1 \ + usr/share/groff_font/devlbp \ + usr/share/groff_font/devlj4 \ + usr/share/groff_font/devps \ + usr/share/groff_font/devutf8 \ + usr/share/tmac/mdoc usr/share/tmac/mm + +INCDIRS= arpa dev fs g++/backward g++/bits g++/ext isc isofs libmilter \ + objc openssl protocols readline rpc rpcsvc security ufs + +d257 19 +a275 2 +.for _dir in ${USRDIRS} + mkdir -p ${WORLDTMP}/${_dir} ${WORLDTMP}/legacy/${_dir} +d277 7 +a283 1 +.for _dir in ${INCDIRS} +a286 3 +.for _dir in lib include/sys + mkdir -p ${WORLDTMP}/legacy/usr/${_dir} +.endfor +@ + + +1.341 +log +@Make sure legacy stuff comes last. Some tools that use +legacy stuff (binutils) depend on this order. + +For this to work, provide (and use) specialized versions +of bsd.prog.mk and bsd.lib.mk that include the standard +versions first, then augment CFLAGS, DPADD, LDADD, and +LDFLAGS as necessary, with the legacy stuff. + +Tested on: 4.0-RELEASE +@ +text +@d154 3 +a156 1 +STRICTTMPPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games +d191 3 +a193 3 + GROFF_BIN_PATH=${WORLDTMP}/usr/bin \ + GROFF_FONT_PATH=${WORLDTMP}/usr/share/groff_font \ + GROFF_TMAC_PATH=${WORLDTMP}/usr/share/tmac +d198 1 +d280 1 +a280 1 + mkdir -p ${WORLDTMP}/${_dir} +d654 1 +a654 1 + ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install +@ + + +1.340 +log +@libc_gen/basename.c depends on include/libgen.h. +@ +text +@d196 2 +a197 3 + __MAKE_CONF=${.CURDIR}/tools/build/Makefile.boot \ + OLD_MAKE_CONF=${__MAKE_CONF} \ + WORLDTMP=${WORLDTMP} +@ + + +1.339 +log +@Put back the undocumented change from rev. 1.334 too: no +need to create ${WORLDTMP}/legacy/usr/include explicitly. +@ +text +@d628 1 +@ + + +1.338 +log +@Put back parts of 1.335 and 1.336 that 1.337 accidentally backed out. + +Submitted by: ru +@ +text +@d284 1 +a284 1 +.for _dir in lib include include/sys +@ + + +1.337 +log +@-legacy and /.../legacy/... looks better than build or bootstrap in +the logs, so use that instead. + +Submitted by: obrien. +@ +text +@d272 1 +a272 1 + rm -rf ${WORLDTMP}/build/usr/include +a622 4 +.if exists(${.CURDIR}/games) && !defined(NOGAMES) +_strfile= games/fortune/strfile +.endif + +@ + + +1.336 +log +@Always remove ${WORLDTMP}/build/usr/include, even in the NOCLEAN +case. This way, we won't have stale compatibility headers there. +@ +text +@d162 1 +a162 1 +# 1. libbuild stage [BMAKE] +d284 2 +a285 2 +.for _dir in lib include/sys + mkdir -p ${WORLDTMP}/build/usr/${_dir} +d287 1 +a287 1 +_libbuild: +d290 1 +a290 1 + @@echo ">>> stage 1: libbuild" +d292 1 +a292 1 + cd ${.CURDIR}; ${BMAKE} libbuild +d353 1 +a353 1 +WMAKE_TGTS+= _worldtmp _libbuild _bootstrap-tools +d621 1 +a621 1 +# libbuild: Build compatibility shims for the next three targets +d623 5 +a627 1 +libbuild: +d634 1 +a634 1 + ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/build install +@ + + +1.335 +log +@Moved libbuild target to where it belongs. Added a comment. +@ +text +@d272 1 +@ + + +1.334 +log +@Fixed buildworld stages names in comments. +@ +text +@d620 1 +a620 1 +# bootstrap-tools: Build tools needed for compatibility +a621 4 +.if exists(${.CURDIR}/games) && !defined(NOGAMES) +_strfile= games/fortune/strfile +.endif + +d631 7 +@ + + +1.333 +log +@We can't use ${WORLDTMP}/usr/{include,lib} for the compat layer. This +is because we populate these directories later, and a subsequent +-DNOCLEAN build may fail. So, we put them in +${WORLDTMP}/build/usr/{include,lib} instead and adjust Makefile.boot. + +Again, this works on -stable and -current, but might break older +versions. + +Submitted by: ru@@ +@ +text +@d163 4 +a166 3 +# This stage is responsible for creating compatibility shims that are +# needed by the bootstrap-tool, build-tool and cross-tool stages. +# 1. bootstrap-tool stage [BMAKE] +d170 1 +a170 1 +# 2. build-tool stage [TMAKE] +d174 1 +a174 1 +# 3. cross-tool stage [XMAKE] +d193 1 +a193 1 +# bootstrap-tool stage +d205 1 +a205 1 +# build-tool stage +d210 1 +a210 1 +# cross-tool stage +d283 1 +a283 1 +.for _dir in lib include include/sys +@ + + +1.332 +log +@Migrate to a new way of dealing with building from old revisions of +FreeBSD. This method attempts to centralize all the necessary hacks +or work arounds in one of two places in the tree (src/Makefile.inc1 +and src/tools/build). We build a small compatibility library +(libbuild.a) as well as selectively installing necessary include +files. We then include this directory when building host binaries. + +This removes all the past release compatibilty hacks from various +places in the tree. We still build on tip of stable and current. I +will work with those that want to support more, although I anticipate +it will just work. + +Many thanks to ru@@, obrien@@ and jhb@@ for providing valuable input at +various stage of implementation, as well as for working together to +positively effect a change for the better. +@ +text +@d162 3 +d282 9 +d351 1 +a351 1 +WMAKE_TGTS+= _worldtmp _bootstrap-tools +d625 10 +d636 1 +a636 1 +.for _tool in tools/build ${_strfile} usr.bin/yacc usr.bin/colldef \ +@ + + +1.331 +log +@Diff reduction with my p4 changes: + +Add @@ before ${ECHODIR} where appropriate because we don't need to echo +the echo command... This gets rid of extra echo ===> in log files... +@ +text +@d190 7 +a196 4 +BMAKEENV= MAKEOBJDIRPREFIX=${WORLDTMP} \ + DESTDIR= \ + INSTALL="sh ${.CURDIR}/tools/install.sh" +BMAKE= ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ +d202 2 +a203 4 +TMAKEENV= MAKEOBJDIRPREFIX=${OBJTREE} \ + DESTDIR= \ + INSTALL="sh ${.CURDIR}/tools/install.sh" +TMAKE= ${TMAKEENV} ${MAKE} -f Makefile.inc1 \ +d614 1 +a614 1 +.for _tool in ${_strfile} usr.bin/yacc usr.bin/colldef \ +@ + + +1.330 +log +@Parallelize (on the top-level SUBDIR list) the "all" stage of +buildworld. This gives 5-11% percent gain in real buildworld +times on various UP and SMP systems here. I used 4 * hw.ncpu +as an argument to "make -j" in my tests. +@ +text +@d618 1 +a618 1 + ${ECHODIR} "===> ${_tool}"; \ +d651 1 +a651 1 + ${ECHODIR} "===> ${_tool}"; \ +d685 1 +a685 1 + ${ECHODIR} "===> ${_tool}"; \ +d767 1 +a767 1 + ${ECHODIR} "===> ${_lib}"; \ +d779 1 +a779 1 + ${ECHODIR} "===> lib/libpam"; \ +@ + + +1.329 +log +@Pass NO_WARNS to the build-tool stage too; -Wsystem-headers +isn't known to the 4.x system compiler. +@ +text +@d333 1 +a333 1 + cd ${.CURDIR}; ${WMAKE} all +d789 1 +a789 1 +.for __target in clean cleandepend cleandir depend includes obj +@ + + +1.328 +log +@Enable cpp(1) warnings in system headers. GCC is oriented on +glibc which is externally maintained, so GCC ships with these +warnings turned off by default. This is also consistent with +the src/contrib/gcc/c-lex.c,v 1.2 change. +@ +text +@d203 1 +a203 1 + BOOTSTRAPPING=${OSRELDATE} -DNO_CPU_CFLAGS +@ + + +1.327 +log +@Slightly improve buildworld times by excluding crunchide(1) +and kgzip(8) from the list of cross-tools during the normal, +non-"make release" buildworld. + +Also, don't gratuitously build them, btxld(8) and elf2aout(1) +for native architecture builds, since they have no known +boostrapping issues along the supported upgrade path. + +Prodded by: peter +@ +text +@d196 1 +a196 1 + -DNO_CPU_CFLAGS -DNO_WERROR +@ + + +1.326 +log +@Convert kgzip(8) to be an i386 cross-tool. This is needed for +cross-releasing i386 on different architectures. This version +provides an i386 version of , and handles endianness. + +Tested on: alpha, sparc64 +@ +text +@d660 1 +a660 1 +.if ${TARGET_ARCH} == "alpha" && ${MACHINE_ARCH} != "alpha" +d664 1 +a664 1 +.if ${TARGET_ARCH} == "i386" +d666 1 +d669 1 +d671 1 +a671 1 +.if ${TARGET_ARCH} == "sparc64" +d675 4 +d683 1 +a683 1 + gnu/usr.bin/binutils usr.sbin/crunch/crunchide \ +@ + + +1.325 +log +@KerberosIV de-orbit burn continues. Disconnect from "make world". +@ +text +@d664 1 +a664 1 +.if ${TARGET_ARCH} == "i386" && ${MACHINE_ARCH} != "i386" +d666 1 +d678 1 +a678 1 + gnu/usr.bin/cc ${_xlint} +@ + + +1.324 +log +@With CVS_UPDATE, use read-only repository mode by default. +@ +text +@a4 1 +# -DMAKE_KERBEROS4 to build KerberosIV +a62 4 +.if exists(${.CURDIR}/kerberosIV) && exists(${.CURDIR}/crypto) && \ + !defined(NOCRYPT) && !defined(NO_OPENSSL) && defined(MAKE_KERBEROS4) +SUBDIR+= kerberosIV +.endif +a640 5 +.if exists(${.CURDIR}/kerberosIV) && exists(${.CURDIR}/crypto) && \ + !defined(NOCRYPT) && defined(MAKE_KERBEROS4) +_libroken4= kerberosIV/lib/libroken +.endif + +d649 1 +a649 1 + ${_libroken4} ${_libkrb5} lib/libncurses ${_share} \ +a726 6 +.endif + +.if !defined(NOCRYPT) && defined(MAKE_KERBEROS4) +_prebuild_libs+= kerberosIV/lib/libkrb +kerberosIV/lib/libkrb__L: lib/libcrypt__L +_generic_libs+= kerberosIV/lib +@ + + +1.323 +log +@Doh, committed to the wrong branch. + +Spotted by: johan +@ +text +@d569 1 +a569 1 + cd ${.CURDIR}; ${CVS} -q update -A -P -d +@ + + +1.322 +log +@MFC: Ship with /etc/login.conf hashed. + +Approved by: re +@ +text +@d389 2 +a390 1 + for prog in [ awk cat chflags chmod chown date echo egrep find grep \ +@ + + +1.321 +log +@Make sure the default install comes with /etc/login.conf hashed. +@ +text +@d389 1 +a389 2 + for prog in [ awk cat cap_mkdb chflags chmod chown \ + date echo egrep find grep \ +@ + + +1.320 +log +@Catch up with sys/conf/kern.post.mk,v 1.39 -- we can now use +plain ${CLEANDIR} to clean kernel and modules. This has an +additional nicety of respecting NOCLEANDIR. +@ +text +@d389 2 +a390 1 + for prog in [ awk cat chflags chmod chown date echo egrep find grep \ +@ + + +1.319 +log +@Ensure that build-tools end up in the object directory different +from the source directory. (This mostly affects the RELENG_4's +``make release'' release.5 target, where "rtermcap" build-tool +for release/sysinstall ends up in the source directory and later +steps of release.5 wipe it out.) + +Spotted by: jhay +@ +text +@d497 1 +a497 3 + ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} -DNO_MODULES clean + cd ${KRNLOBJDIR}/${_kernel}; \ + ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} cleandir +@ + + +1.318 +log +@Respect ``makeoptions NO_MODULES'' specified in the kernel config file. +@ +text +@d663 3 +a665 1 + cd ${.CURDIR}/${_tool}; ${MAKE} DIRPRFX=${_tool}/ build-tools +@ + + +1.317 +log +@Add -DNOMAN to the list. +@ +text +@a497 1 +.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KRNLSRCDIR}/modules) +a500 1 +.endif +d504 3 +d508 1 +a508 2 + cd ${KRNLOBJDIR}/${_kernel}; \ + ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} modules-obj +d511 2 +a512 3 + ${MAKE} -DNO_CPU_CFLAGS depend; \ + MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ + ${MAKE} -DNO_CPU_CFLAGS all +@ + + +1.316 +log +@Catch typos in the kernel name specified for an "installkernel" invocation +early on, rather than failing later with an obscure error message. + +Make error messages appear consistent. +@ +text +@d10 1 +@ + + +1.315 +log +@Don't attempt buildworld if the path to the source-tree contains a comma. + +Can be removed if the underlying issue is fixed. + +Submitted by: Flemming Jacobsen +@ +text +@d472 1 +a472 1 + @@echo ">>> ERROR: Missing kernel configuration file(s) (${KERNCONF})." +d531 4 +@ + + +1.314 +log +@Move elf2aout back to /usr/bin -- it is a general development tool, not +a sysadmin tool. +@ +text +@d256 8 +@ + + +1.313 +log +@For installkernel, use the fresh tools (if we've built them with +buildworld). + +Reviewed by: imp, marcel +Approved by: re (rwatson) +@ +text +@d666 1 +a666 1 +_elf2aout= usr.sbin/elf2aout +@ + + +1.313.2.1 +log +@Fixed the update target to follow the correct CVS branch. + +Approved by: nectar +@ +text +@d558 1 +a558 1 + cd ${.CURDIR}; ${CVS} -q update -rRELENG_5_0 -P -d +@ + + +1.312 +log +@Make dynamic PAM modules depend on dynamic PAM library. + +Requested by: des, markm +@ +text +@d524 2 +a525 1 + ${CROSSENV} ${MAKE} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel$//} +@ + + +1.311 +log +@Take __FreeBSD_version into account when BOOTSTRAPPING. +@ +text +@d732 2 +a733 1 + lib/libncurses lib/libopie lib/libradius lib/librpcsvc \ +d759 1 +a759 1 +.for _lib in ${_startup_libs} ${_prebuild_libs} ${_generic_libs} +d769 10 +@ + + +1.310 +log +@Hook the aic7xxx modules up. This requires some extra care since aicasm +is a compiler tool and needs to be compiled by the host compiler. I've +tested this in i386->sparc cross-build, 4.7->current upgrade, normal +buildkernel target, and normal /sys/i386/compile/GENERIC configurations. + +Submitted by: ru +@ +text +@d126 1 +d197 2 +a198 1 +BMAKE= ${BMAKEENV} ${MAKE} -f Makefile.inc1 -DBOOTSTRAPPING \ +d206 2 +a207 2 +TMAKE= ${TMAKEENV} ${MAKE} -f Makefile.inc1 -DBOOTSTRAPPING \ + -DNO_CPU_CFLAGS +@ + + +1.309 +log +@Emptify. +@ +text +@d495 9 +d506 1 +a506 1 + ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} depend +d509 1 +a509 1 + ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} all +d620 4 +d646 1 +a646 1 + usr.bin/awk usr.bin/file usr.sbin/sysinstall +@ + + +1.308 +log +@DISTDIR is used by 'make release', lets see if this is enough to turn +off the execution test. +@ +text +@d360 1 +a360 1 + (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/") +@ + + +1.307 +log +@Provide a bit of anti-foot-shooting protection. Make sure that in the +non-cross cases without DESTDIR, that the bin/sh that we're about to +install works. Otherwise, a 'make installworld' without having already +rebooted with a post-signal-fix kernel is a rather big disaster when +important things like /bin/sh coredump. +@ +text +@d359 1 +a359 1 +.if ${TARGET_ARCH} == ${MACHINE_ARCH} && \ +@ + + +1.306 +log +@_games is gone in rev. 1.305. +@ +text +@d359 7 +@ + + +1.305 +log +@Do not build the majority of the games. Remaining are the +"utility-like" games and everyone's favourite, fortune(6). +@ +text +@d624 1 +a624 1 +.for _tool in bin/csh bin/sh ${_games} gnu/usr.bin/cc/cc_tools ${_fortran} \ +@ + + +1.304 +log +@Initiate deorbit burn for the i386-only a.out related support. Moves are +under way to move the remnants of the a.out toolchain to ports. As the +comment in src/Makefile said, this stuff is deprecated and one should not +expect this to remain beyond 4.0-REL. It has already lasted WAY beyond +that. + +Notable exceptions: +gcc - I have not touched the a.out generation stuff there. +ldd/ldconfig - still have some code to interface with a.out rtld. +old as/ld/etc - I have not removed these yet, pending their move to ports. +some includes - necessary for ldd/ldconfig for now. + +Tested on: i386 (extensively), alpha +@ +text +@a603 4 +.if exists(${.CURDIR}/games) && !defined(NOGAMES) +_games= games/adventure games/hack games/phantasia +.endif + +@ + + +1.303 +log +@Similar to bsd.subdir.mk, echo the name of the dir before +doing the cd. This is done for bootstrap-tools, +build-tools, cross-tools, and the libraries loop. + +Reviewed by: ru +Approved by: sheldonh (mentor) +MFC after: 1 week +@ +text +@a158 1 +OBJFORMAT_PATH?= /usr/libexec +a187 1 + OBJFORMAT_PATH=${WORLDTMP}/usr/libexec \ +d223 1 +a223 2 +KMAKEENV= ${WMAKEENV} \ + OBJFORMAT_PATH=${WORLDTMP}/usr/libexec:${OBJFORMAT_PATH} +d226 1 +a226 1 + usr/libexec/${OBJFORMAT} usr/sbin usr/share/misc \ +d654 1 +a654 1 + gnu/usr.bin/binutils usr.bin/objformat usr.sbin/crunch/crunchide \ +d689 2 +a690 2 +.if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}-${OBJFORMAT}) +_startup_libs+= lib/csu/${MACHINE_ARCH}-${OBJFORMAT} +@ + + +1.302 +log +@The intent in rev. 1.299 was to make the CPUTYPE assignment type check +bother "only those who attempts to set it to a different value". This +got broken in rev. 1.300 (that fixed another race). + +Reported by: ache +@ +text +@d596 2 +a597 1 + cd ${.CURDIR}/${_tool}; \ +d634 2 +a635 1 + cd ${.CURDIR}/${_tool}; ${MAKE} DIRPRFX=${_tool}/ build-tools +d659 2 +a660 1 + cd ${.CURDIR}/${_tool}; \ +d746 2 +a747 1 + cd ${.CURDIR}/${_lib}; \ +@ + + +1.301 +log +@Makefile.inc1 may eventually be merged with Makefile, so fix an +endless recursion bug similar to the one that has been fixed in +release/Makefile,v 1.698, in advance. A related fix to make(1) +has been committed in make/main.c,v 1.68. + +Requested by: bde (who has them merged already) +@ +text +@d134 5 +d140 2 +a141 2 + CPUTYPE=X${TARGET_CPUTYPE} -V CPUTYPE +.if ${_CPUTYPE} != X${TARGET_CPUTYPE} +@ + + +1.300 +log +@An empty CPUTYPE now means ``the default CPUTYPE'' in bsd.cpu.mk. +If there was no CPUTYPE assignment in /etc/make.conf, this would +cause the ``CPUTYPE assignment type'' check to falsely fail. + +Reported by: johan + +Fixed this by making sure we always pass the non-empty CPUTYPE. +Also make sure we use the correct set of share/mk files in our +test. +@ +text +@d134 1 +a134 1 +_CPUTYPE!= cd ${.CURDIR}; ${MAKE} -m ${.CURDIR}/share/mk \ +@ + + +1.299 +log +@TARGET_CPUTYPE should exist solely in Makefile.inc1, similar to +TARGET_ARCH and TARGET. This is problematic when one has the = +(unconditional) type of assigment for CPUTYPE in /etc/make.conf. +(This would override what was set on the command line to "make +buildworld".) + +Add a (horrible) kludge to Makefile.inc1 to check the type of +assignment for CPUTYPE (only for those who attempts to set it to +a different value). Fix an example make.conf. Fix the kernel's +build-tools target (aicasm only at the moment) to catch up with +bsd.cpu.mk,v 1.15 (BOOTSTRAPPING replaced with NO_CPU_CFLAGS in +Makefile.inc1's BMAKE). + +Reviewed by: jhb +@ +text +@d134 3 +a136 2 +_CPUTYPE!= cd ${.CURDIR}; ${MAKE} CPUTYPE=${TARGET_CPUTYPE} -V CPUTYPE +.if ${_CPUTYPE} != ${TARGET_CPUTYPE} +@ + + +1.298 +log +@- Define NO_CPU_CFLAGS during BMAKE and TMAKE (and thus XMAKE) so that + bsd.cpu.mk doesn't have to worry about compilers other than the current + version. +- Allow TARGET_CPUTYPE to override CPUTYPE in bsd.cpu.mk. +- Treat an empty CPUTYPE the same as an undefined CPUTYPE. +- For buildworld, buildkernel, etc., define TARGET_CPUTYPE to CPUTYPE for + native builds and define it to be empty for cross-builds. + TARGET_CPUTYPE is only defined if it is not already defined via the + commandline or environment. +@ +text +@d129 1 +a129 1 +TARGET_CPUTYPE?= ${CPUTYPE} +d134 4 +d182 1 +d484 1 +a484 1 + ${MAKE} -DBOOTSTRAPPING -f ${KRNLSRCDIR}/dev/aic7xxx/aicasm/Makefile +@ + + +1.297 +log +@Inline ${_cxx_consumers}. +@ +text +@d129 1 +d132 1 +d189 1 +a189 1 + -DNO_WERROR +d195 2 +a196 1 +TMAKE= ${TMAKEENV} ${MAKE} -f Makefile.inc1 -DBOOTSTRAPPING +@ + + +1.296 +log +@We're done with 1.287 and 1.288 now. + +Submitted by: ru +@ +text +@a574 1 +_cxx_consumers= gnu/usr.bin/gperf gnu/usr.bin/groff +d581 1 +a581 1 + ${_cxx_consumers} gnu/usr.bin/texinfo +@ + + +1.295 +log +@Pass -DBOOTSTRAPPING to the kernel's build tool (sys/dev/aic7xxx/aicasm). +This way, it has a chance to be built with gcc 2.95.x (using the bandaid +in share/mk/bsd.cpu.mk,v 1.11). + +Feedback timeout from: gordon +@ +text +@a574 6 +# This horrible kludge should be deleted in about 2 weeks, say July 9, 2002 +_cxx_version!= ${CXX} -v 2>&1 | awk '$$0 ~ /^gcc version/ {print $$3}' +_cc_version!= ${CC} -v 2>&1 | awk '$$0 ~ /^gcc version/ {print $$3}' +.if ${CXX:T} != "c++" || \ + (${_cxx_version} == ${_cc_version} && ${_cxx_version} != "3.1") || \ + exists(/usr/lib/libstdc++.so.4) +a575 1 +.endif +@ + + +1.294 +log +@libufs does not need built before most things, after all. + +Submitted by: bde, ru +@ +text +@d475 2 +a476 2 + MAKESRCPATH=${KRNLSRCDIR}/dev/aic7xxx/aicasm \ + ${MAKE} -f ${KRNLSRCDIR}/dev/aic7xxx/aicasm/Makefile +@ + + +1.293 +log +@Add libufs to prebuild_libs, since lots of things will want it, in time. +@ +text +@d709 3 +a711 3 + lib/libsbuf lib/libtacplus lib/libufs lib/libutil \ + lib/libypclnt lib/libz lib/msun + +@ + + +1.292 +log +@Make NO_OPENSSL actually imply NO_OPENSSH, as documented in make.conf(5). +@ +text +@d709 3 +a711 3 + lib/libsbuf lib/libtacplus lib/libutil lib/libypclnt \ + lib/libz lib/msun + +@ + + +1.291 +log +@Don't try to build libssh if NO_OPENSSL is defined because NO_OPENSSL implies +NO_OPENSSH. +@ +text +@d720 1 +a720 2 +.endif +.if !defined(NO_OPENSSH) && !defined(NO_OPENSSL) +d723 1 +@ + + +1.290 +log +@libfetch now depends on libcrypto and libssl. +@ +text +@d721 1 +a721 1 +.if !defined(NO_OPENSSH) +@ + + +1.289 +log +@On behalf of lib/compat/compat4x.i386/libusb.so.0.bz2.uu,v 1.1, +added uudecode(1) to bootstrap-tools. +@ +text +@d718 3 +a720 1 +_prebuild_libs+= secure/lib/libcrypto +@ + + +1.288 +log +@Ignore a c++ that is version other than 3.1 if it does not also match +cc's version. libgcc.a will have been clobbered and will no longer have +the old c++ support. + +Submitted by: jhb +@ +text +@d586 2 +a587 1 + usr.bin/makewhatis usr.bin/rpcgen usr.bin/xargs usr.bin/xinstall \ +@ + + +1.287 +log +@Bandaid for helping people who have a broken /usr/bin/c++ installation. + +This only affects the -current early adopters and developers who have +done a 'make world' in the last few weeks and as a result installed a +gcc-3.1 version of /usr/bin/c++ but without the corresponding library +support that this now requires. This is a temporary hack that should be +deleted within a few weeks. In this case we will use the existing +gperf/groff one last time around for the early stage1 bootstrap. (This +isn't so bad, because we were unconditionally using the host one before) +@ +text +@d577 4 +a580 1 +.if ${CXX:T} != "c++" || ${_cxx_version} != "3.1" || exists(/usr/lib/libstdc++.so.4) +@ + + +1.286 +log +@Put on peril sensitive sunglasses and turn C++ stuff back on. +@ +text +@d575 3 +d579 1 +@ + + +1.285 +log +@Fixed the world breakage caused by my last commit. +NOMAN is defined when building bootstrap-tools. + +Submitted by: jhay +@ +text +@d233 2 +a234 2 +INCDIRS= arpa dev fs g++/std isc isofs libmilter objc openssl \ + protocols readline rpc rpcsvc security ufs +a574 1 +.if ${CXX:T} != "c++" +a575 1 +.endif +@ + + +1.284 +log +@Bootstrap makewhatis(1). +@ +text +@a578 4 +.if !defined(NOMAN) +_makewhatis= usr.bin/makewhatis +.endif + +d581 1 +a581 1 + ${_makewhatis} usr.bin/rpcgen usr.bin/xargs usr.bin/xinstall \ +@ + + +1.283 +log +@Move elf2aout to usr.sbin/. + +Approved by: jake +@ +text +@d361 1 +a361 1 + ln make makewhatis mkdir mtree mv pwd_mkdb rm sed sh sysctl \ +d579 4 +d585 1 +a585 1 + usr.bin/rpcgen usr.bin/xargs usr.bin/xinstall \ +@ + + +1.282 +log +@Bootstrap elf2aout(1) for sparc64; used to build sys/boot/sparc64/boot1. +@ +text +@d636 1 +a636 1 +_elf2aout= usr.bin/elf2aout +@ + + +1.281 +log +@Back out rev 1.278. Seems we grew a getconf(1) that requires it. +@ +text +@d635 4 +d642 1 +a642 1 +.for _tool in ${_btxld} ${_elf2exe} \ +@ + + +1.280 +log +@Remove local patch that crept in. +@ +text +@d576 1 +a576 1 +_cxx_consumers= gnu/usr.bin/groff +@ + + +1.279 +log +@Don't build gperf. +@ +text +@d320 1 +a320 1 +.if !defined(SUBDIR_OVERRIDE) && !defined(X_QUICK) +a322 1 +.if !defined(X_QUICK) +d324 1 +a324 2 +.endif +.if !defined(SUBDIR_OVERRIDE) && !defined(X_QUICK) +a327 6 + +.for __target in ${WMAKE_TGTS} +.if defined(NO${__target}) +WMAKE_TGTS:= ${WMAKE_TGTS:N${__target}} +.endif +.endfor +@ + + +1.278 +log +@Remove the perl bits from the build. +@ +text +@d320 1 +a320 1 +.if !defined(SUBDIR_OVERRIDE) +d323 1 +d325 2 +a326 1 +.if !defined(SUBDIR_OVERRIDE) +d331 6 +d583 2 +a584 2 +.if ${CXX} != "c++" +_cxx_consumers= gnu/usr.bin/gperf gnu/usr.bin/groff +@ + + +1.277 +log +@Make sure to not yet build the GNU C++, but still allow +for the C++ progs to be built with e.g. an old compiler, +CXX=/usr/bin/c++, for the time being. +@ +text +@a19 1 +# -DNO_PERL do not build perl5 and related libraries +a46 2 +# We must do include and lib early so that the perl *.ph generation +# works correctly as it uses the header files installed by this. +a176 1 + PERL5LIB=${WORLDTMP}/usr/libdata/perl/5.6.1 \ +d361 1 +a361 1 + ln make makewhatis mkdir mtree mv perl pwd_mkdb rm sed sh sysctl \ +a605 4 +.if !defined(NOPERL) && !defined(NO_PERL) +_perl= gnu/usr.bin/perl/miniperl +.endif + +d619 1 +a619 1 + ${_perl} ${_libroken4} ${_libkrb5} lib/libncurses ${_share} \ +a681 4 + +.if !defined(NOPERL) && !defined(NO_PERL) +_generic_libs+= gnu/usr.bin/perl/libperl +.endif +@ + + +1.276 +log +@Rename `includes' to `buildincludes'. +Rename `incsinstall' to `installincludes'. +Make `includes' a -j safe shortcut for `buildincludes' + `installincludes'. +`buildincludes' and `installincludes' are SUBDIR friendly, if run directly. +@ +text +@a661 4 +.if ${CXX} == "c++" +NO_CXX= yes +.endif + +@ + + +1.275 +log +@Restore comment that got lost in revision 1.265. +@ +text +@d302 1 +a302 1 + cd ${.CURDIR}; ${WMAKE} includes; ${WMAKE} SHARED=symlinks incsinstall +d752 1 +a752 1 +.for __target in clean cleandepend cleandir depend obj +@ + + +1.274 +log +@Do not run `includes' and `incsinstall' in parallel. + +Spotted by: jhay + +Parallel worlds and releases should be working again. +@ +text +@d354 4 +@ + + +1.273 +log +@Added new bsd.incs.mk which handles installing of header files +via INCS. Implemented INCSLINKS (equivalent to SYMLINKS) to +handle symlinking include files. Allow for multiple groups of +include files to be installed, with the powerful INCSGROUPS knob. +Documentation to follow. + +Added standard `includes' and `incsinstall' targets, use them +in Makefile.inc1. Headers from the following makefiles were +not installed before (during `includes' in Makefile.inc1): + + kerberos5/lib/libtelnet/Makefile + lib/libbz2/Makefile + lib/libdevinfo/Makefile + lib/libform/Makefile + lib/libisc/Makefile + lib/libmenu/Makefile + lib/libmilter/Makefile + lib/libpanel/Makefile + +Replaced all `beforeinstall' targets for installing includes +with the INCS stuff. + +Renamed INCDIR to INCSDIR, for consistency with FILES and SCRIPTS, +and for compatibility with NetBSD. Similarly for INCOWN, INCGRP, +and INCMODE. + +Consistently use INCLUDEDIR instead of /usr/include. + +gnu/lib/libstdc++/Makefile and gnu/lib/libsupc++/Makefile changes +were only lightly tested due to the missing contrib/libstdc++-v3. +I fully tested the pre-WIP_GCC31 version of this patch with the +contrib/libstdc++.295 stuff. + +These changes have been tested on i386 with the -DNO_WERROR "make +world" and "make release". +@ +text +@d302 1 +a302 1 + cd ${.CURDIR}; ${WMAKE} SHARED=symlinks includes incsinstall +@ + + +1.272 +log +@Quiet the peanut gallary and back out magical "breakage". +@ +text +@d237 2 +a238 2 +INCDIRS= arpa dev fs g++/std isc isofs objc protocols \ + readline rpc rpcsvc openssl security ufs +d302 1 +a302 1 + cd ${.CURDIR}; ${WMAKE} SHARED=symlinks includes +d540 3 +a542 7 + cd ${.CURDIR}/bin; ${MAKE} all + cd ${.CURDIR}/sbin; ${MAKE} all + cd ${.CURDIR}/libexec; ${MAKE} all + cd ${.CURDIR}/usr.bin; ${MAKE} all + cd ${.CURDIR}/usr.sbin; ${MAKE} all + cd ${.CURDIR}/gnu/usr.bin; ${MAKE} all + cd ${.CURDIR}/gnu/usr.sbin; ${MAKE} all +d554 3 +a556 7 + cd ${.CURDIR}/bin; ${MAKE} install + cd ${.CURDIR}/sbin; ${MAKE} install + cd ${.CURDIR}/libexec; ${MAKE} install + cd ${.CURDIR}/usr.bin; ${MAKE} install + cd ${.CURDIR}/usr.sbin; ${MAKE} install + cd ${.CURDIR}/gnu/usr.bin; ${MAKE} install + cd ${.CURDIR}/gnu/usr.sbin; ${MAKE} install +d585 4 +a588 4 + ${MAKE} obj; \ + ${MAKE} depend; \ + ${MAKE} all; \ + ${MAKE} DESTDIR=${MAKEOBJDIRPREFIX} install +d625 1 +a625 1 + cd ${.CURDIR}/${_tool}; ${MAKE} build-tools +d646 4 +a649 4 + ${MAKE} obj; \ + ${MAKE} depend; \ + ${MAKE} all; \ + ${MAKE} DESTDIR=${MAKEOBJDIRPREFIX} install +a660 78 +# +# includes - possibly generate and install the include files. +# +includes: + cd ${.CURDIR}/include; ${MAKE} -B all install + cd ${.CURDIR}/gnu/include; ${MAKE} install + cd ${.CURDIR}/gnu/lib/libdialog; ${MAKE} beforeinstall + cd ${.CURDIR}/gnu/lib/libobjc; ${MAKE} beforeinstall + cd ${.CURDIR}/gnu/lib/libreadline/readline; ${MAKE} beforeinstall + cd ${.CURDIR}/gnu/lib/libregex; ${MAKE} beforeinstall +.if !defined(NO_CXX) + cd ${.CURDIR}/gnu/lib/libstdc++; ${MAKE} beforeinstall + cd ${.CURDIR}/gnu/usr.bin/cc/cc1plus; ${MAKE} beforeinstall +.endif +.if exists(${.CURDIR}/kerberos5) && !defined(NOCRYPT) && \ + defined(MAKE_KERBEROS5) + cd ${.CURDIR}/kerberos5/lib/libasn1; ${MAKE} beforeinstall + cd ${.CURDIR}/kerberos5/lib/libhdb; ${MAKE} beforeinstall + cd ${.CURDIR}/kerberos5/lib/libkadm5clnt; ${MAKE} beforeinstall + cd ${.CURDIR}/kerberos5/lib/libkadm5srv; ${MAKE} beforeinstall + cd ${.CURDIR}/kerberos5/lib/libkafs5; ${MAKE} beforeinstall + cd ${.CURDIR}/kerberos5/lib/libkrb5; ${MAKE} beforeinstall + cd ${.CURDIR}/kerberos5/lib/libsl; ${MAKE} beforeinstall +.endif +.if exists(${.CURDIR}/kerberosIV) && !defined(NOCRYPT) && \ + defined(MAKE_KERBEROS4) + cd ${.CURDIR}/kerberosIV/lib/libacl; ${MAKE} beforeinstall + cd ${.CURDIR}/kerberosIV/lib/libkadm; ${MAKE} beforeinstall + cd ${.CURDIR}/kerberosIV/lib/libkafs; ${MAKE} beforeinstall + cd ${.CURDIR}/kerberosIV/lib/libkdb; ${MAKE} beforeinstall + cd ${.CURDIR}/kerberosIV/lib/libkrb; ${MAKE} beforeinstall + cd ${.CURDIR}/kerberosIV/lib/libtelnet; ${MAKE} beforeinstall +.elif exists(${.CURDIR}/secure) && !defined(NOCRYPT) && !defined(NOSECURE) + cd ${.CURDIR}/secure/lib/libtelnet; ${MAKE} beforeinstall +.else + cd ${.CURDIR}/lib/libtelnet; ${MAKE} beforeinstall +.endif + cd ${.CURDIR}/lib/libalias; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libatm; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libc; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libcalendar; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libcam; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libcom_err; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libdevstat; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libdisk; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libedit; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libfetch; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libftpio; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libkvm; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libmd; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libmp; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libncp; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libncurses; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libnetgraph; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libopie; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libpam/libpam; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libpcap; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libradius; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/librpcsvc; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libsbuf; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libstand; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libtacplus; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libusbhid; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libutil; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libvgl; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libwrap; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libypclnt; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libz; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/msun; ${MAKE} beforeinstall +.if exists(${.CURDIR}/secure) && !defined(NOCRYPT) && !defined(NOSECURE) +.if exists(${.CURDIR}/secure/lib/libcrypto) + cd ${.CURDIR}/secure/lib/libcrypto; ${MAKE} beforeinstall +.endif +.if exists(${.CURDIR}/secure/lib/libssl) + cd ${.CURDIR}/secure/lib/libssl; ${MAKE} beforeinstall +.endif +.endif + cd ${.CURDIR}/usr.bin/lex; ${MAKE} beforeinstall +d738 3 +a740 3 + ${MAKE} depend; \ + ${MAKE} all; \ + ${MAKE} install +@ + + +1.271 +log +@Turn off groff and gperf -- they will not compile with the in-tree Gcc 3.1. +@ +text +@d763 1 +a763 1 +# lib/csu and gnu/lib/csu, gnu/lib/libgcc must be built before all +d766 1 +d768 1 +a768 1 +_startup_libs= lib/csu/${MACHINE_ARCH}-${OBJFORMAT} +d770 1 +a770 1 +_startup_libs= lib/csu/${MACHINE_ARCH} +a771 1 +_startup_libs+= gnu/lib/csu gnu/lib/libgcc +@ + + +1.270 +log +@Add rpcgen to the bootstrap tools. +@ +text +@d583 3 +d591 1 +a591 1 + gnu/usr.bin/gperf gnu/usr.bin/groff gnu/usr.bin/texinfo +d666 3 +@ + + +1.269 +log +@`beforeinstall' w/the csu bits is a nop. +@ +text +@d586 1 +a586 1 + usr.bin/xargs usr.bin/xinstall \ +@ + + +1.268 +log +@Build our native CSU bits before the compiler-specific ones. +This helps in the compiler build. +@ +text +@a668 1 + cd ${.CURDIR}/gnu/lib/csu; ${MAKE} beforeinstall +a698 3 +.endif +.if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}) + cd ${.CURDIR}/lib/csu/${MACHINE_ARCH}; ${MAKE} beforeinstall +@ + + +1.267 +log +@Make NO_CXX, really mean NO_CXX. +@ +text +@d761 1 +a761 1 +# gnu/lib/csu, gnu/lib/libgcc and lib/csu must be built before all +a763 1 +_startup_libs= gnu/lib/csu gnu/lib/libgcc +d765 1 +a765 1 +_startup_libs+= lib/csu/${MACHINE_ARCH}-${OBJFORMAT} +d767 1 +a767 1 +_startup_libs+= lib/csu/${MACHINE_ARCH} +d769 1 +@ + + +1.266 +log +@Sorted the directories in the rule for the includes target as much as +possible. +@ +text +@d674 1 +d677 1 +@ + + +1.265 +log +@Milestone #2 in cross-arch make releases. They now work! + +You need to set TARGET_ARCH and possibly TARGET, the same +way you normally do it for a cross build(7). + +Renamed `distribworld' to a more natutal `distributeworld'. + +Put pwd_mkdb(8) under ${INSTALLTMP}; for `distributeworld'. +@ +text +@d669 2 +a674 1 + cd ${.CURDIR}/gnu/lib/libdialog; ${MAKE} beforeinstall +d676 9 +a684 7 +.if exists(${.CURDIR}/secure) && !defined(NOCRYPT) && !defined(NOSECURE) +.if exists(${.CURDIR}/secure/lib/libcrypto) + cd ${.CURDIR}/secure/lib/libcrypto; ${MAKE} beforeinstall +.endif +.if exists(${.CURDIR}/secure/lib/libssl) + cd ${.CURDIR}/secure/lib/libssl; ${MAKE} beforeinstall +.endif +a698 10 +.if exists(${.CURDIR}/kerberos5) && !defined(NOCRYPT) && \ + defined(MAKE_KERBEROS5) + cd ${.CURDIR}/kerberos5/lib/libasn1; ${MAKE} beforeinstall + cd ${.CURDIR}/kerberos5/lib/libhdb; ${MAKE} beforeinstall + cd ${.CURDIR}/kerberos5/lib/libkadm5clnt; ${MAKE} beforeinstall + cd ${.CURDIR}/kerberos5/lib/libkadm5srv; ${MAKE} beforeinstall + cd ${.CURDIR}/kerberos5/lib/libkafs5; ${MAKE} beforeinstall + cd ${.CURDIR}/kerberos5/lib/libkrb5; ${MAKE} beforeinstall + cd ${.CURDIR}/kerberos5/lib/libsl; ${MAKE} beforeinstall +.endif +a701 1 + cd ${.CURDIR}/gnu/lib/csu; ${MAKE} beforeinstall +a703 1 + cd ${.CURDIR}/lib/libdevstat; ${MAKE} beforeinstall +d707 2 +a715 1 + cd ${.CURDIR}/lib/msun; ${MAKE} beforeinstall +d720 1 +a723 1 + cd ${.CURDIR}/lib/libpam/libpam; ${MAKE} beforeinstall +a726 1 + cd ${.CURDIR}/lib/libcom_err; ${MAKE} beforeinstall +d733 9 +@ + + +1.264 +log +@Back out part of the revision 1.261: "etc" indeed needs to be +last for "distribute" to succeed -- the "make makedb" part of +the etc/Makefile:distribution target should be the last thing +made. +@ +text +@d358 1 +a358 1 +installworld: installcheck +d361 1 +a361 1 + ln make makewhatis mkdir mtree mv perl rm sed sh sysctl \ +d365 1 +a365 1 + cd ${.CURDIR}; ${IMAKE} reinstall +d393 5 +a397 8 +# +# distribworld +# +# Front-end to distribute to make sure the search path contains +# the object directory. Needed for miniperl. +# +distribworld: + cd ${.CURDIR}; PATH=${TMPPATH} ${MAKE} -f Makefile.inc1 distribute +@ + + +1.263 +log +@Make crunchide(1) a cross-tool; needed for cross-arch "make release". +Note that a.out is only supported for the non-cross i386 case. +@ +text +@a59 3 +.if exists(${.CURDIR}/etc) +SUBDIR+= etc +.endif +d94 5 +@ + + +1.262 +log +@Parallel "make release" fixes. +@ +text +@d649 2 +a650 1 + gnu/usr.bin/binutils usr.bin/objformat gnu/usr.bin/cc ${_xlint} +@ + + +1.261 +log +@Milestone #1 in cross-arch make releases. + +Do not install games and profiled libraries to the ${CHROOTDIR} +with the initial installworld. + +Eliminate the need in the second installworld. For that, make sure +_everything_ is built in the "world" environment, using the right +tool chain. + +Added SUBDIR_OVERRIDE helper stuff to Makefile.inc1. Split the +buildworld process into stages, and skip some stages when +SUBDIR_OVERRIDE is set (used to build crypto, krb4, and krb5 +dists). + +Added NO_MAKEDB_RUN knob to Makefile.inc1 to avoid running +makewhatis(1) at the end of installworld (used when making crypto, +krb4, and krb5 dists). + +In release/scripts/doFS.sh, ensure that the correct boot blocks are +used. + +Moved the creation of the "crypto" dist from release.5 to +release.2. + +In release.3 and doMFSKERN, build kernels in the "world" +environment. KERNELS now means "additional" kernels, GENERIC is +always built. + +Ensure we build crunched binaries in the "world" environment. +Obfuscate release/Makefile some more (WMAKEENV) to achieve this. + +Inline createBOOTMFS target. + +Use already built GENERIC kernel modules to augment mfsfd's +/stand/modules. GC doMODULES as such. + +Assorted fixes: + +Get rid of the "afterdistribute" target by moving the single use +of it from sys/Makefile to etc/Makefile's "distribute". + +Makefile.inc1: apparently "etc" no longer needs to be last for +"distribute" to succeed. + +gnu/usr.bin/perl/library/Makefile.inc: do not override the +"install" and "distribute" targets, do it the "canonical" way. + +release/scripts/{man,cat}pages-make.sh: make sure Perl manpages and +catpages appear in the right dists. Note that because Perl does +not respect the MANBUILDCAT (and NOMAN), this results in a loss of +/usr/share/perl/man/cat* empty directories. This will be fixed +soon. + +Turn MAKE_KERBEROS4 into a plain boolean variable (if it is set it +means "make KerberosIV"), as documented in the make.conf(5) +manpage. Most of the userland makefiles did not test it for "YES" +anyway. + +XXX Should specialized kerberized libpam versions be included into +the krb4 and krb5 dists? (libpam.a would be incorrect anyway if +both krb4 and krb5 dists were choosen.) + +Make sure "games" dist is made before "catpages", otherwise games +catpages settle in the wrong dist. + +Fast build machine provided by: Igor Kucherenko +@ +text +@a498 7 +# kernel +# +# Short hand for `make buildkernel installkernel' +# +kernel: buildkernel installkernel + +# +@ + + +1.260 +log +@Despite the fact that it is documented in the handbook, the release notes, +and UPDATING and has been posted to both freebsd-current and +freebsd-stable, users are still not adding the required smmsp user and +group before doing an installworld. Therefore, don't let users do an +installworld unless they have followed directions. + +Add a new installcheck Makefile target which installworld runs before +actually starting the installation. This target can be used by other parts +of userland as well. The first addition to the target is to check for the +smmsp user and group if NO_SENDMAIL isn't defined. + +Others may add checks to this target as they see fit. + +MFC after: 1 week +@ +text +@d60 3 +a98 5 +# etc must be last for "distribute" to work +.if exists(${.CURDIR}/etc) +SUBDIR+= etc +.endif + +d109 4 +d244 1 +a244 1 +buildworld: +d263 1 +d269 1 +d277 1 +d283 1 +d289 1 +d295 1 +d301 1 +d307 1 +d313 1 +d320 13 +a332 5 +everything: + @@echo "--------------------------------------------------------------" + @@echo ">>> Building everything.." + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}; ${WMAKE} all +d383 1 +a383 1 +.if !defined(NOMAN) +d494 1 +a494 4 +installkernel: + cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ + ${CROSSENV} ${MAKE} KERNEL=${INSTKERNNAME} install +reinstallkernel: +d496 1 +a496 1 + ${CROSSENV} ${MAKE} KERNEL=${INSTKERNNAME} reinstall +@ + + +1.259 +log +@Sort _startup_libs, _prebuild_libs, and _generic_libs lists alphabetically. + +Submitted by: bde, ru +@ +text +@d316 17 +d337 1 +a337 1 +installworld: +@ + + +1.258 +log +@Keep up with lib/Makefile,v 1.64 (uhh). +@ +text +@d731 6 +d738 1 +a738 1 +_startup_libs= lib/csu/${MACHINE_ARCH}-${OBJFORMAT} +d740 1 +a740 1 +_startup_libs= lib/csu/${MACHINE_ARCH} +a741 1 +_startup_libs+= gnu/lib/csu gnu/lib/libgcc +d743 1 +a743 4 +_prebuild_libs= lib/libcom_err lib/libcrypt lib/libkvm lib/libmd \ + lib/libncurses lib/libopie lib/libradius lib/librpcsvc \ + lib/libsbuf lib/libtacplus lib/libutil lib/libypclnt \ + lib/libz lib/msun +d745 1 +a745 4 +lib/libopie__L lib/libradius__L lib/libtacplus__L: lib/libmd__L +lib/libypclnt__L: lib/librpcsvc__L + +_generic_libs= lib gnu/lib +d751 1 +a751 7 +.if !defined(NOCRYPT) +.if defined(MAKE_KERBEROS4) +_prebuild_libs+= kerberosIV/lib/libkrb +kerberosIV/lib/libkrb__L: lib/libcrypt__L +_generic_libs+= kerberosIV/lib +.endif +.if defined(MAKE_KERBEROS5) +d758 18 +a775 1 +.if !defined(NOSECURE) +d782 1 +a782 2 +.endif !defined(NOSECURE) +.endif !defined(NOCRYPT) +d785 1 +@ + + +1.257 +log +@Fix incorrect ordering in previous commit. +@ +text +@d731 2 +a732 4 +.if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}.pcc) +_startup_libs= lib/csu/${MACHINE_ARCH}.pcc +.elif ${MACHINE_ARCH} == "i386" && ${OBJFORMAT} == "elf" +_startup_libs= lib/csu/i386-elf +@ + + +1.256 +log +@Add libypclnt to the prebuild library list, and record its dependency on +librpcsvc. +@ +text +@d742 2 +a743 2 + lib/libsbuf lib/libtacplus lib/libutil lib/libz lib/msun \ + lib/libypclnt +@ + + +1.255 +log +@Add libypclnt to the includes target. +@ +text +@d742 2 +a743 1 + lib/libsbuf lib/libtacplus lib/libutil lib/libz lib/msun +d746 1 +@ + + +1.254 +log +@Add a tool (and the first application of it) that could be used +to automate building of libraries. + +Prodded by: bde +@ +text +@d714 1 +@ + + +1.253 +log +@I now don't seem to be able to reproduce the -DNOCLEAN buildworld +breakage with ioctl.c. The .depend file should track dependencies +just fine, and the worst we can have is to miss new ioctls. + +But I still think it's a good idea to have -DNOCLEAN build produce +the same ioctl.c as it would without -DNOCLEAN. + +Prodded for a long time by: bde +@ +text +@d720 3 +a722 27 +# The following dependencies exist between the libraries: +# +# lib*: csu libgcc_pic +# libatm: libmd +# libcam: libsbuf +# libcrypt: libmd +# libdevstat: libkvm +# libdialog: libncurses +# libedit: libncurses +# libg++: msun +# libkrb: libcrypt +# libopie: libmd +# libpam: libcom_err libcrypt libcrypto libkrb libopie libradius \ +# librpcsvc libtacplus libutil libz libssh +# libradius: libmd +# libreadline: libncurses +# libssh: libcrypto libz +# libstc++: msun +# libtacplus: libmd +# +# Across directories this comes down to (rougly): +# +# gnu/lib: lib/msun lib/libncurses +# kerberosIV/lib kerberos5/lib: lib/libcrypt +# lib/libpam: secure/lib/libcrypto kerberosIV/lib/libkrb \ +# secure/lib/libssh lib/libz +# secure/lib: secure/lib/libcrypto lib/libmd lib/libz +d724 6 +d731 1 +a731 1 +_csu= lib/csu/${MACHINE_ARCH}.pcc +d733 1 +a733 1 +_csu= lib/csu/i386-elf +d735 1 +a735 1 +_csu= lib/csu/${MACHINE_ARCH} +d737 5 +d743 3 +a745 6 +.if exists(${.CURDIR}/secure) && !defined(NOCRYPT) && !defined(NOSECURE) +_secure_lib= secure/lib +.if exists(${.CURDIR}/secure/lib/libcrypto) +_libcrypto= secure/lib/libcrypto +.endif +.endif +d747 2 +a748 2 +.if !defined(NOCRYPT) && defined(MAKE_KERBEROS4) +_kerberosIV_lib= kerberosIV/lib +d751 22 +a772 3 +.if !defined(NOCRYPT) && defined(MAKE_KERBEROS5) +_kerberos5_lib= kerberos5/lib +.endif +d774 1 +d776 1 +a776 5 +_libkeycap= usr.sbin/pcvt/keycap +.endif + +.if !defined(NOPERL) && !defined(NO_PERL) +_libperl= gnu/usr.bin/perl/libperl +d779 2 +a780 6 +libraries: +.for _lib in ${_csu} gnu/lib/csu gnu/lib/libgcc lib/libmd lib/libcrypt \ + lib/libz ${_libcrypto} ${_secure_lib} ${_kerberosIV_lib} \ + ${_kerberos5_lib} lib/libcom_err lib/libkvm lib/msun lib/libncurses \ + lib/libopie lib/libradius lib/librpcsvc lib/libsbuf lib/libtacplus \ + lib/libutil lib gnu/lib ${_libperl} usr.bin/lex/lib ${_libkeycap} +d788 4 +@ + + +1.252 +log +@Don't special case i386/pc98, replace it with the smarter logic +of setting ${TARGET} -- make it default to ${MACHINE} if we are +not cross-building, and ${TARGET_ARCH} otherwise. + +Set MAKEOBJDIREPREFIX based on ${TARGET}, not on ${TARGET_ARCH}. +This is useful if you want to cross-build pc98 worlds on i386. +@ +text +@d249 4 +@ + + +1.251 +log +@Avoid cleaning modules twice in `buildkernel'. +@ +text +@d126 1 +d128 3 +d137 1 +a137 1 +.if ${MACHINE_ARCH} == ${TARGET_ARCH} +d140 1 +a140 1 +OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET_ARCH} +a380 7 + +# The only exotic TARGET_ARCH/TARGET combination valid at this +# time is i386/pc98. In all other cases set TARGET equal to +# TARGET_ARCH. +.if ${TARGET_ARCH} != "i386" || ${TARGET} != "pc98" +TARGET= ${TARGET_ARCH} +.endif +@ + + +1.250 +log +@Bootstrap xargs(1) -- sys/conf/kmod.mk uses the new -J option. + +PR: bin/36747 +@ +text +@a430 1 +.if defined(MODULES_WITH_WORLD) || defined(NO_MODULES) || !exists(${KRNLSRCDIR}/modules) +d432 2 +a433 2 + ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} clean +.else +d435 1 +a435 1 + ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} clean cleandir +@ + + +1.249 +log +@Unbreak buildworld after include/Makefile,v 1.167 commit. +@ +text +@d560 2 +a561 1 +.for _tool in ${_strfile} usr.bin/yacc usr.bin/colldef usr.bin/xinstall \ +@ + + +1.248 +log +@Back out lots of the last commit that was committed by accident. +(It's my test rig for some CVSUP,SUP code). + +Spotted by: Michael G. Petry +@ +text +@d229 2 +a230 2 +INCDIRS= arpa g++/std isc objc protocols readline rpc rpcsvc openssl \ + security +@ + + +1.247 +log +@Install libusbhid.h during 'make includes'. + +Requested by: jhb +MFC after: 3 days +@ +text +@a116 12 +CVSUP_COLLECTION_BASE?= src-all +CVSUP_BRANCH_BASE?= . +CVSUP_COLLECTION_PORTS?=ports-all +CVSUP_BRANCH_PORTS?= . +CVSUP_COLLECTION_DOC?= doc-all +CVSUP_BRANCH_DOC?= . +CVSUP_COMPRESS?= yes +CVSUP_BASE?= /usr +CVSUP_PREFIX?= /usr + +CVSUP_HOST?= cvsup.freebsd.org + +a122 22 +.if defined(CVSUP_COMPRESS) +SUPFLAGS+= -z +.else +SUPFLAGS+= -Z +.endif +.if !defined(CVSUP_HOST) + echo "Please set CVSUP_HOST to your nearest cvsup mirror." + exit +.endif + +SUPFILE?= /usr/share/examples/cvsup/standard-supfile +SUPFILE1?= /usr/share/examples/cvsup/secure-supfile +SUPFILE2?= /usr/share/examples/cvsup/secure-supfile +PORTSSUPFILE?= /usr/share/examples/cvsup/ports-supfile +DOCSUPFILE?= /usr/share/examples/cvsup/doc-supfile + +foo: + echo "*default base=${CVSUP_BASE}" + echo "*default prefix=${CVSUP_PREFIX}" + echo "*default release=cvs tag=${CVSUP_BRANCH_FOO}" + echo "*default delete use-rel-suffix" + echo "${CVSUP_COLLECTION_FOO}" +a477 2 +SUP_UPDATE=1 +SUP=echo +@ + + +1.246 +log +@Install sys/security/lomac/*.h to /usr/include/security/lomac/. + +Install sys//include/pc/*.h to /usr/include/machine/pc/. + +PR: docs/29534 + +Install sys/netatm/*/*.h to /usr/include/netatm/*/. + +Don't install compatibility symlinks for +and . Three years is enough to be aware of +the change, and these weren't visible in the SHARED=symlinks +case. + +Back out include/Makefile,v 1.160 that was a null change anyway +due to the bug in the path, and we now don't want to install +these headers because they would otherwise be invisible in the +SHARED=symlinks case. + +Don't install IPFILTER headers. Userland utilities fetch them +directly, and they were not visible in the SHARED=symlinks case. + +Resurrect SHARED=symlinks in Makefile.inc1. + +PR: bin/28002 + +Prodded by: bde +MFC after: 2 weeks +@ +text +@d117 12 +d135 22 +d512 2 +d745 1 +@ + + +1.245 +log +@Make lint(1) a cross-tool. + +(See commit log for usr.bin/xlint/Makefile,v 1.11 for what was wrong +with enabling build of lint libraries in rev. 1.12.) + +This fixes cross-arch compiles (running binaries for a different arch +when generating lint.7 and lint libraries) and cross-branch compiles +(4.x -> 5.0 buildworld should be working again). +@ +text +@d284 1 +a284 1 + cd ${.CURDIR}; ${WMAKE} SHARED=copies includes +@ + + +1.244 +log +@Fixed the NO_PERL braino. +@ +text +@d618 2 +d622 1 +a622 1 + gnu/usr.bin/binutils usr.bin/objformat gnu/usr.bin/cc +@ + + +1.243 +log +@Update for Perl 5.6.1 +@ +text +@d585 1 +a585 1 +.if !defined(NOPERL) || defined(NO_PERL) +d771 1 +a771 1 +.if !defined(NOPERL) || defined(NO_PERL) +@ + + +1.242 +log +@Allow the use of NO_PERL as well as NOPERL. The latter is going to +be removed. +@ +text +@d172 1 +a172 1 + PERL5LIB=${WORLDTMP}/usr/libdata/perl/5.6.0 \ +@ + + +1.241 +log +@1-true-AWK has a build-tool target. +@ +text +@d20 1 +d585 1 +a585 1 +.if !defined(NOPERL) +d771 1 +a771 1 +.if !defined(NOPERL) +@ + + +1.240 +log +@Obviate the need to set the COMPILER_PATH and LIBRARY_PATH in Makefile.inc1 +to pick up the correct cross-tools (the compiler executables and binutils) +and special linker files (crt*.o). This is now controlled by a single knob, +TOOLS_PREFIX, when building cross-tools. + +Fixed regression in Makefile.inc1,v 1.203 (-nostdinc). This clobbered target +architecture's CFLAGS with building host's CPUTYPE setting in /etc/make.conf, +and had a nice but nasty side effect of exposing some (normally hidden) bugs +in system headers. + +(Attempt to move the "-nostdinc -I..." part of CFLAGS into the new CINCLUDES +(modeled after a similar CXXINCLUDES) eventually failed because hard-coding +${WORLDTMP}/usr/include to be the first in the include list does not always +work, e.g. lib/libbind.) + +Compensate the -nostdinc removal by making cpp(1) built in the cross-tools +stage to not look for <> header files in the building host's /usr/include +(already committed as gnu/usr.bin/cc/cc_tools/freebsd-native.h, revisions +1.10-1.12, STANDARD_INCLUDE_DIR). + +: $ /usr/obj/usr/src/i386/usr/bin/cpp -v /dev/null +: +: Before: +: +: #include <...> search starts here: +: /usr/obj/usr/src/i386/usr/include +: /usr/include +: End of search list. +: +: After: +: +: #include <...> search starts here: +: /usr/obj/usr/src/i386/usr/include +: /usr/obj/usr/src/i386/usr/include + +(Disabling the use of GCC_INCLUDE_DIR in the FREEBSD_NATIVE case would fix +the duplicate above.) + +Get rid of the (now unneeded) -I${DESTDIR}/usr/include magic in bsd.prog.mk +and bsd.lib.mk. Finish the removal of LDDESTDIR in bsd.lib.mk,v 1.55 -- we +no longer have users of it. + +The required changes to gcc were already committed as contrib/gcc.295/gcc.c, +revisions 1.23 and 1.24. + +Basically, this allows for the changes above plus makes gcc(1) persistent +about path configuration, whether it's configured as a native or a cross +compiler: + +: $ /usr/obj/usr/src/i386/usr/bin/cc -print-search-dirs +: install: /usr/obj/usr/src/i386/usr/libexec/(null) +: programs: /usr/obj/usr/src/i386/usr/libexec/elf/:/usr/obj/usr/src/i386/usr/libexec/ +: libraries: /usr/obj/usr/src/i386/usr/lib/ +: +: $ /usr/obj/alpha/usr/src/i386/usr/bin/cc -print-search-dirs +: install: /usr/obj/alpha/usr/src/i386/usr/libexec/(null) +: programs: /usr/obj/alpha/usr/src/i386/usr/libexec/elf/:/usr/obj/alpha/usr/src/i386/usr/libexec/ +: libraries: /usr/obj/alpha/usr/src/i386/usr/lib/ + +Reviewed by: bde, obrien +@ +text +@d602 1 +a602 1 + usr.bin/file usr.sbin/sysinstall +@ + + +1.239 +log +@The previous fix for broken -DMAKE_KERBEROS5 world was incomplete. +Finish it by adding kerberos5/lib/libvers to the build-tools list. + +(I didn't notice it before because I tested my fix in a -DNOCLEAN +environment, and static libc.a was already in ${WORLDTMP}/usr/lib, +and libvers's make-print-version build tool used it for linking.) + +Spotted by: John Indra +@ +text +@a169 2 + COMPILER_PATH=${WORLDTMP}/usr/libexec:${WORLDTMP}/usr/bin \ + LIBRARY_PATH=${WORLDTMP}${SHLIBDIR}:${WORLDTMP}/usr/lib \ +a170 2 + CFLAGS="-nostdinc ${CFLAGS}" \ + CXXINCLUDES="-nostdinc++ ${CXXINCLUDES}" \ +@ + + +1.238 +log +@Fixed -DMAKE_KERBEROS5 world breakage in kerberos5/lib/libroken +(make-roken is a build tool). This bug was hiding itself after +a just fixed bug in cross-linker (binutuils/ld/Makefile,v 1.20). + +The bug was fatal for cross builds; for example, an alpha binary +(make-roken) was attempted to be run on i386. + +Added make-roken to the list of build-tools in libasn1. It only +worked because another build tool needs make-roken implicitly: + +(build-tools: asn1_compile: print_version.o: roken.h: make-roken). + +Spotted by: nectar +@ +text +@d599 2 +a600 2 +_libkrb5= kerberos5/lib/libasn1 kerberos5/lib/libhdb kerberos5/lib/libsl \ + kerberos5/lib/libroken +@ + + +1.237 +log +@Now that cross-tools ld(1) has been fixed to look for dynamic +dependencies in the correct place, record the fact that -lssh +depends on -lcrypto and -lz. + +Removed false dependencies on -lz (except ssh(1) and sshd(8)). +Removed false dependencies on -lcrypto and -lutil for scp(1). + +Reviewed by: markm +@ +text +@d599 2 +a600 1 +_libkrb5= kerberos5/lib/libasn1 kerberos5/lib/libhdb kerberos5/lib/libsl +@ + + +1.236 +log +@FreeBSD 4.1 bootstrapping aid (setproctitle(3) is in -lutil). + +This backs out (sort of) delta 1.18 to perl/miniperl/Makefile. +Update to the ld(1) comment by peter in this revision: + +ld(1) built as part of the cross-tools stage of buildworld has +been fixed to look for dynamic dependencies in the right place, +${WORLDTMP}/usr/lib, effective binutils/ld/Makefile,v 1.20. + +Approved by: markm +@ +text +@d734 1 +d744 1 +a744 1 +# secure/lib: lib/libmd +d754 1 +a754 1 +.if !defined(NOSECURE) && !defined(NOCRYPT) +d756 3 +d779 1 +a779 1 + ${_secure_lib} ${_kerberosIV_lib} \ +d782 1 +a782 1 + lib/libutil lib/libz lib gnu/lib ${_libperl} usr.bin/lex/lib ${_libkeycap} +@ + + +1.235 +log +@gnu/libexec has gone so remove it from the most targets. +@ +text +@d192 1 +a192 1 +TMAKE= ${TMAKEENV} ${MAKE} -f Makefile.inc1 +@ + + +1.234 +log +@Specify the full path to mktemp +@ +text +@a522 1 + cd ${.CURDIR}/gnu/libexec; ${MAKE} all +a540 1 + cd ${.CURDIR}/gnu/libexec; ${MAKE} install +@ + + +1.233 +log +@Use a more secure method of creating the temporary +install directory. +@ +text +@d143 1 +a143 1 +INSTALLTMP!= mktemp -d -u -t install +@ + + +1.232 +log +@Move NO_WERROR from CROSSENV to BMAKE. In CROSSENV it disables it for +the entire build. We only want it for the bootstrap process. + +Submitted by: ru +@ +text +@d143 1 +a143 3 +TMPDIR?= /tmp +TMPPID!= echo $$$$ +INSTALLTMP= ${TMPDIR}/install.${TMPPID} +@ + + +1.231 +log +@Add NO_WERROR to the cross building environment so that we do not bail on +warnings generated by earlier versions of the compilers when bootstrapping. + +Also a minor formatting nit in the tools list. + +Reviewed by: markm +@ +text +@d180 1 +a180 2 + GROFF_TMAC_PATH=${WORLDTMP}/usr/share/tmac \ + NO_WERROR=yes +d187 2 +a188 1 + -DNOHTML -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED +@ + + +1.230 +log +@Get rid of unsed since rev 1.109 of lib/Makefile WANT_CSRG_LIBM define. +Also replace internal make variable _libm with hardcoded path to lib/msun + +Reviewed by: bde +@ +text +@d180 2 +a181 1 + GROFF_TMAC_PATH=${WORLDTMP}/usr/share/tmac +d609 1 +a609 1 + usr.bin/file usr.sbin/sysinstall +@ + + +1.229 +log +@Just to be pedantic and more aesthetically pleasing, move the secure/ +top-level subdirectory prior to share/ so that the top-level directories +are processed in alphabetical order. +@ +text +@a698 1 +.if !defined(WANT_CSRG_LIBM) +a699 1 +.endif +d730 1 +a730 1 +# libg++: libm +d737 1 +a737 1 +# libstc++: libm +d742 1 +a742 1 +# gnu/lib: lib/libm lib/libncurses +a767 6 +.if defined(WANT_CSRG_LIBM) +_libm= lib/libm +.else +_libm= lib/msun +.endif + +d779 1 +a779 1 + ${_kerberos5_lib} lib/libcom_err lib/libkvm ${_libm} lib/libncurses \ +@ + + +1.228 +log +@Add the CVS knob so it may be overridden (or have options added). + +Submitted by: Andrea Campi +@ +text +@d79 3 +a92 3 +.endif +.if exists(${.CURDIR}/secure) && !defined(NOCRYPT) && !defined(NOSECURE) +SUBDIR+= secure +@ + + +1.227 +log +@Don't cleandir also if MODULES_WITH_WORLD. + +MFC after: 3 days +@ +text +@d116 1 +d507 1 +a507 1 + cd ${.CURDIR}; cvs -q update -A -P -d +@ + + +1.226 +log +@Typo fix (my test version doesn't have this...) +@ +text +@d434 1 +a434 1 +.if defined(NO_MODULES) || !exists(${KRNLSRCDIR}/modules) +@ + + +1.225 +log +@Run "make cleandir" if NO_MODULES are set, or there is no sys/modules +directory. Previous commit breaks buildkernel if NO_MODULES was set. +Sorry... + +Noticed by: mike +@ +text +@d437 1 +a437 1 +.else` +@ + + +1.224 +log +@"make cleandir" before building a kernel and modules. + +This will hopefully fix the recent 'I cannot compile linux module with +buildworld' problem. MFC will come shortly. + +Submitted by: imura@@ryu16.org +@ +text +@d434 4 +d440 1 +@ + + +1.223 +log +@Set full-path of cvsup. + +In src/Makefile rev 1.232, environment variable PATH is set explicitly +to /sbin:/bin:/usr/sbin:/usr/bin. As a result, binaries located on +non-standard path cannot be executed without full-path (it's the change +of this revision). + +However, cvsup is not in our base system -- you lose if you try to +"make update" without setting SUP in make.conf or command line argument. +I think it is safe to assume that cvsup is located at /usr/local/bin, +and it would help other people who first try to do "make update". + +PR: 31932 +MFC after: 1 day +@ +text +@d435 1 +a435 1 + ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} clean +@ + + +1.222 +log +@Bring Gawk back. There just isn't any other POSIX compliant AWK out there. +The biggest thing missing from Bell-Labs AWK is the character class regexes. +@ +text +@d116 1 +a116 1 +SUP?= cvsup +@ + + +1.221 +log +@Add 'awk' to the build-tools, so that the small utility used to build +one of the source files is made for the host, not target. +@ +text +@d601 1 +a601 1 + ${_perl} ${_libroken4} ${_libkrb5} lib/libncurses ${_share} usr.bin/awk \ +@ + + +1.220 +log +@Fix cross-building further. + +Introduce ${TARGET} defaulting to ${MACHINE} which should be set to +whatever your target ${MACHINE} is, and use that with world-related +stages. That is, to build pc98 on alpha, one now needs to set both +TARGET_ARCH=i386 and TARGET=pc98. + +The scope of ${TARGET} is limited to Makefile.inc1 and cross-tools. + +In particular, this change was tested to fix: + +1. Cross building of "alpha" on i386. The breakage was introduced + by rev. 1.10 to sbin/i386/Makefile (missing ). + +2. Descending into machine-specific subdirs for a different arch. + Previously, sbin/i386 and usr.sbin/boot0cfg were descended into + when cross-building "alpha" or pc98 on i386. + +3. Fixes pc98 cross-building which was horribly broken, caused by + not setting MACHINE correctly (most ${MACHINE} == pc98 checking + Makefiles put -DPC98 to CFLAGS). +@ +text +@d601 2 +a602 2 + ${_perl} ${_libroken4} ${_libkrb5} lib/libncurses ${_share} usr.bin/file \ + usr.sbin/sysinstall +@ + + +1.219 +log +@Fix cross-building, etc: + +1. To cross-build, one now needs to set TARGET_ARCH, and not the + MACHINE_ARCH. MACHINE_ARCH should never be changed manually! + +2. Initialize DESTDIR= explicitly for bootstrap-tools, build-tools, + and cross-tools stages. This fixes broken header and library + dependencies problem. We build them in the host environment, + and obviously want them to depend on host headers and libraries. + The problem with broken header dependencies for bootstrap-tools + and cross-tools was already partially solved (see BOOTSTRAPPING + tests in bsd.prog.mk and bsd.lib.mk), but it was still there for + build-tools if the user ran "make world DESTDIR=/foo". Also, + for all of these stages, the library dependencies were broken + because of how bsd.libnames.mk define DPADD members. + + We still provide a glue to install bootstrap- and cross-tools + under the ${WORLDTMP}. + + Removed PATH overrides for bootstrap-, build-, and cross-tools + stages. There is just no reason why we would need to override + it, and the hacks to clean up the ${WORLDTMP} in the -DNOCLEAN + case are no longer needed with fixes from this step. + + That is, we now never use ${WORLDTMP} headers and libraries, + and we don't use any ${WORLDTMP} installed binaries during + these stages. Again, these stages depend solely on the host + environment, including compiler, headers, and libraries. + +3. Moved "miniperl" back from cross-tools (it has nothing to do + with a cross-compiler) to build-tools where it belongs. The + change from step 1 let to do this. Also, to make this work, + build-tools targets of "cc_tools" and "miniperl" were modified + to call "depend". Here follow the detailed explanations. + + There are two categories of build tools, for now. In the first + category there are "cc_tools" and "miniperl". They occupy the + whole (sub)directory, and nothing needs to be done in this + subdirectory later during the "all" stage. They are also + constructed using system makefiles. We must build the .depend + early in the build-tools stage because: + + 1) They use (and depend on) the host environment. + + 2) If we don't do this in build-tools, the "depend" stage of + buildworld will do this for us; wrong library and header + dependencies will be recorded (DESTDIR=${WORLDTMP}) and, + what's worse, the "all" stage may then clobber the + build-architecture format tools (that we built in the + build-tools stage) with the target-architecture format + ones, breaking cross build. + + In the second category there are all other build-tools. They + share their directory with the "main" module that needs them + in the "all" stage, and they don't show up themselves in the + .depend file. The portion of this fix was already committed + in gnu/usr.bin/cc/cc_tools/Makefile,v 1.52. + +4. "libperl" is no longer a build tool, and "miniperl" is the + stand-alone application. I had to make this change because + build-tools and "all" stages share the same object directory. + Without this change, if we cross compile, libperl.a is first + built for the build architecture during the build-tools stage + (for the purposes of immediate linkage with "miniperl"). + Later on, the "all" stage sees this library as up-to-date, + and doesn't rebuild it. The effect is that the wrong format + static libperl library is installed with installworld. + +5. Fixed "includes" to install secure/lib/libtelnet headers if + required. + +Reviewed by: bde +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.218 2001/09/25 12:17:52 ru Exp $ +d124 1 +d170 1 +d364 1 +a364 1 +# Only the existing (depending MACHINE) config files are used +d368 1 +a368 1 +# Note that we have to use MACHINE instead of TARGET_ARCH when +d370 1 +a370 1 +# be set to cross-build, we have to make sure MACHINE is set +d381 2 +a382 2 +# The only exotic TARGET_ARCH/MACHINE combination valid at this +# time is i386/pc98. In all other cases set MACHINE equal to +d384 2 +a385 2 +.if ${TARGET_ARCH} != "i386" || ${MACHINE} != "pc98" +MACHINE= ${TARGET_ARCH} +d389 1 +a389 1 +KRNLCONFDIR= ${KRNLSRCDIR}/${MACHINE}/conf +d435 1 +a435 1 + ${KMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} clean +d442 1 +a442 1 + ${KMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} depend +d445 1 +a445 1 + ${KMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} all +d458 1 +a458 1 + ${CROSSENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} install +d461 1 +a461 1 + ${CROSSENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} reinstall +@ + + +1.218 +log +@Removed touch(1) from the list of installworld tools that +was added in previous revision for no apparent reason. + +Submitted by: bde +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.217 2001/09/20 12:24:10 markm Exp $ +d23 1 +a23 1 +# MACHINE_ARCH="machine arch" to crossbuild world to a different arch +d124 1 +d126 5 +a130 1 +.if ${BUILD_ARCH} == ${MACHINE_ARCH} +d133 1 +a133 1 +OBJTREE= ${MAKEOBJDIRPREFIX}/${MACHINE_ARCH} +d135 1 +a135 1 +WORLDTMP= ${OBJTREE}${.CURDIR}/${BUILD_ARCH} +a165 8 +# Common environment for bootstrap related stages +BOOTSTRAPENV= MAKEOBJDIRPREFIX=${WORLDTMP} \ + DESTDIR=${WORLDTMP} \ + INSTALL="sh ${.CURDIR}/tools/install.sh" \ + MACHINE_ARCH=${BUILD_ARCH} \ + TOOLS_PREFIX=${WORLDTMP} \ + PATH=${TMPPATH} + +d168 1 +d173 1 +d180 3 +a182 1 +BMAKEENV= ${BOOTSTRAPENV} +d188 2 +a189 2 + INSTALL="sh ${.CURDIR}/tools/install.sh" \ + PATH=${TMPPATH} +d193 1 +a193 5 +XMAKEENV= ${BOOTSTRAPENV} \ + TARGET_ARCH=${MACHINE_ARCH} +XMAKE= ${XMAKEENV} ${MAKE} -f Makefile.inc1 -DBOOTSTRAPPING \ + -DNO_FORTRAN -DNO_GDB -DNOHTML -DNOINFO -DNOMAN \ + -DNOPIC -DNOPROFILE -DNOSHARED +a245 7 +.else + for dir in bin games include lib sbin share; do \ + rm -rf ${WORLDTMP}/usr/$$dir; \ + done + # XXX - Work-around for broken cc/cc_tools/Makefile. + # This is beyond dirty... + rm -f ${OBJTREE}${.CURDIR}/gnu/usr.bin/cc/cc_tools/.depend +d264 1 +a264 1 + cd ${.CURDIR}; ${TMAKE} ${CLEANDIR:S/^/par-/} +d270 1 +a270 1 + cd ${.CURDIR}; ${TMAKE} par-obj +d317 1 +a317 1 + test true uname wc which zic; do \ +d366 2 +a367 2 +# Note that we have to use MACHINE instead of MACHINE_ARCH when +# we're in kernel-land. Since only MACHINE_ARCH is (expected) to +d379 1 +a379 1 +# The only exotic MACHINE_ARCH/MACHINE combination valid at this +d381 3 +a383 3 +# MACHINE_ARCH. +.if ${MACHINE_ARCH} != "i386" || ${MACHINE} != "pc98" +MACHINE= ${MACHINE_ARCH} +d565 1 +a565 1 + ${MAKE} install +d583 4 +d599 1 +a599 1 + ${_libroken4} ${_libkrb5} lib/libncurses ${_share} usr.bin/file \ +a606 11 +# WARNING: Because the bootstrap tools are expected to run on the +# build-machine, MACHINE_ARCH is *always* set to BUILD_ARCH when this +# target is being made. TARGET_ARCH is *always* set to reflect the +# target-machine (which you can set by specifying MACHINE_ARCH on +# make's command-line, get it?). +# The reason is simple: we build these tools not to be run on the +# architecture we're cross-building, but on the architecture we're +# currently building on (ie the host-machine) and we expect these +# tools to produce output for the architecture we're trying to +# cross-build. +# +a614 4 +.if !defined(NOPERL) +_perl= gnu/usr.bin/perl/libperl gnu/usr.bin/perl/miniperl +.endif + +d616 1 +a616 1 +.for _tool in ${_btxld} ${_elf2exe} ${_perl} \ +d622 1 +a622 1 + ${MAKE} install +d659 2 +@ + + +1.217 +log +@Add which(1) the stuff that we need early on. The perl build needs it +to find miniperl. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.216 2001/09/17 11:50:36 ru Exp $ +d327 1 +a327 1 + test touch true uname wc which zic; do \ +@ + + +1.216 +log +@Run the `bootstrap-tools' and `cross-tools' stages with BOOTSTRAPPING +flag defined. This replaces the WORLD flag that got lost in revision +1.96. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.215 2001/08/29 09:11:03 bde Exp $ +d327 1 +a327 1 + test true uname wc zic; do \ +@ + + +1.215 +log +@Fixed world breakage. mkdir was not copied to ${INSTALLTMP}, but it is +used by src/include/Makefile in the SHARED=symlinks case. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.214 2001/08/27 12:01:46 paul Exp $ +d182 2 +a183 2 +BMAKE= ${BMAKEENV} ${MAKE} -f Makefile.inc1 -DNOHTML -DNOINFO \ + -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED +d194 3 +a196 3 +XMAKE= ${XMAKEENV} ${MAKE} -f Makefile.inc1 -DNO_FORTRAN -DNO_GDB \ + -DNOHTML -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE \ + -DNOSHARED +@ + + +1.214 +log +@Change the name of KRNLDEFDIR to KERNCONFDIR. + +Suggested by Bruce, since the latter is more acceptable for a variable +that is externally visible. + +Fix a style nit with a long line. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.213 2001/08/26 18:39:07 paul Exp $ +d326 1 +a326 1 + ln make makewhatis mtree mv perl rm sed sh sysctl \ +@ + + +1.213 +log +@Add a variable KRNLDEFDIR that specifies where to find the kernel +config files. + +It defaults to KRNLCONFDIR. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.212 2001/08/26 17:47:21 markm Exp $ +d399 1 +a399 1 +KRNLDEFDIR?= ${KRNLCONFDIR} +d404 1 +a404 1 +.if exists(${KRNLDEFDIR}/${_kernel}) +d438 2 +a439 1 + config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} ${KRNLDEFDIR}/${_kernel} +@ + + +1.212 +log +@More libss removal. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.211 2001/08/26 17:45:56 markm Exp $ +d399 1 +d404 1 +a404 1 +.if exists(${KRNLCONFDIR}/${_kernel}) +d438 1 +a438 1 + config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} ${_kernel} +@ + + +1.211 +log +@Adjust dependancies; now that a PAM module (pam_unix) can change +NIS passwords, libpam needs rpc dependancies. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.210 2001/08/19 21:32:52 kris Exp $ +d234 1 +a234 1 + security ss +@ + + +1.210 +log +@Say goodbye to libss, which somehow managed to crouch hidden in the tree +for long after it was used. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.209 2001/08/17 17:21:38 obrien Exp $ +a714 1 + cd ${.CURDIR}/lib/libpam/libpam; ${MAKE} beforeinstall +d718 1 +d745 1 +a745 1 +# libtacplus libutil libz libssh +d797 1 +a797 1 + lib/libopie lib/libradius lib/libsbuf lib/libtacplus \ +@ + + +1.209 +log +@Use a build-tool to create the .mgc files. + +Submitted by: ru (partial) +Obtained from: NetBSD (basic idea) +Reviewed by: bde, ru +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.208 2001/08/04 18:25:38 tmm Exp $ +a722 1 + cd ${.CURDIR}/lib/libss; ${MAKE} -B hdrs beforeinstall +a747 1 +# libss: libcom_err +@ + + +1.208 +log +@Add some features to libdevstat, and overhaul the interface a bit: + +1.) prefix all functions in the library with devstat_ (compatability + functions are available for all functions that were chaned in an + incompatible way, but are deprecated). +2.) Add a pointer to a kvm_t as the first argument to functions that + used to get their information via sysctl; they behave the same + as before when NULL is passed as this argument, otherwise, the + information is obtained via libkvm using the supplied handle. +3.) Add a new function, devstat_compute_statistics(), that is intended + to replace the old compute_stats() function. It offers more + statistics data, and has a more flexible interface. + +libdevstat does now require libkvm; a library depedency is added, so +that libkvm only needs to be explicitely specified for statically linked +programs. +The library major version number is bumped. + +Submitted by: Sergey A. Osokin , ken (3) +Reviewed by: ken +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.207 2001/07/29 08:58:16 dd Exp $ +d603 2 +a604 1 + ${_libroken4} ${_libkrb5} lib/libncurses ${_share} usr.sbin/sysinstall +@ + + +1.207 +log +@Enable the new libmp in the build, and disable libgmp and its +henchmen. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.206 2001/07/09 17:49:34 markm Exp $ +d738 1 +d797 1 +a797 1 + ${_kerberos5_lib} lib/libcom_err ${_libm} lib/libncurses \ +@ + + +1.206 +log +@Axe S/Key. OPIE is the true and faithful successor. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.205 2001/06/14 01:35:22 peter Exp $ +a654 1 + cd ${.CURDIR}/gnu/lib/libmp; ${MAKE} beforeinstall +a659 1 + cd ${.CURDIR}/gnu/lib/libgmp; ${MAKE} beforeinstall +d706 1 +@ + + +1.205 +log +@Part 2 of gensetdefs de-orbit burn. linker sets are now self contained +for ELF, see src/sys/linker_set.h log. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.204 2001/06/13 15:18:11 ru Exp $ +a719 1 + cd ${.CURDIR}/lib/libskey; ${MAKE} beforeinstall +d745 1 +a745 1 +# libskey libtacplus libutil libz libssh +a747 1 +# libskey: libcrypt libmd +d798 1 +a798 1 + lib/libopie lib/libradius lib/libsbuf lib/libskey lib/libtacplus \ +@ + + +1.204 +log +@WARNS= is fully functional again. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.203 2001/06/11 18:09:08 ru Exp $ +d635 1 +a635 1 + usr.bin/gensetdefs gnu/usr.bin/binutils usr.bin/objformat gnu/usr.bin/cc +@ + + +1.203 +log +@- Restore -nostdinc that got lost in rev.1.105; we don't + want host headers during `buildworld'. + +- During `buildworld', install headers in a "copy" mode + until we decide what to do with the (currently broken) + SHARED=symlinks. + +- Temporarily run `buildworld' with -DNO_WERROR, which + effectively disabled the -Werror bit of recently added + WARNS=X feature. This is required because adding the + -nostdinc bit back revealed bugs in some header files + that were hiding after not using -nostdinc. + It is unclear currently how exactly (and why) -nostdinc + affects gcc(1) warnings. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.202 2001/05/28 16:54:02 ru Exp $ +d203 1 +a203 1 +WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 -DNO_WERROR +@ + + +1.202 +log +@Bootstrap install(1). +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.201 2001/05/14 17:21:02 ru Exp $ +d174 1 +d203 1 +a203 1 +WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 +d295 1 +a295 1 + cd ${.CURDIR}; ${WMAKE} SHARED=symlinks includes +@ + + +1.201 +log +@Add kbdcontrol(1) to bootstrap-tools. +This fixes the upgrade path breakage in usr.sbin/sysinstall. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.200 2001/04/26 17:54:24 asmodai Exp $ +d325 1 +a325 1 + install ln make makewhatis mtree mv perl rm sed sh sysctl \ +d565 2 +a566 2 +.for _tool in ${_strfile} usr.bin/yacc usr.bin/colldef usr.sbin/config \ + usr.sbin/kbdcontrol \ +@ + + +1.200 +log +@Remove xlint from build-tools. This needs to be fixed in a different way. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.199 2001/04/24 20:19:29 asmodai Exp $ +d566 1 +@ + + +1.199 +log +@Add usr.bin/xlint to build-tools. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.198 2001/04/24 02:57:42 gshapiro Exp $ +d601 1 +a601 2 + ${_libroken4} ${_libkrb5} lib/libncurses ${_share} usr.bin/xlint \ + usr.sbin/sysinstall +@ + + +1.198 +log +@${MAKEOBJDIRPREFIX}/usr/src/i386/usr/include/isc was being created as a plain +file during the bootstrapping process of a buildworld and contained the +last isc include file to be installed. It was meant to be a directory for +the isc include files. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.197 2001/04/18 12:20:28 ru Exp $ +d601 2 +a602 1 + ${_libroken4} ${_libkrb5} lib/libncurses ${_share} usr.sbin/sysinstall +@ + + +1.197 +log +@Add groff to bootstrap-tools. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.196 2001/03/27 05:44:32 ken Exp $ +d232 1 +a232 1 +INCDIRS= arpa g++/std objc protocols readline rpc rpcsvc openssl \ +@ + + +1.196 +log +@Rewrite of the CAM error recovery code. + +Some of the major changes include: + + - The SCSI error handling portion of cam_periph_error() has + been broken out into a number of subfunctions to better + modularize the code that handles the hierarchy of SCSI errors. + As a result, the code is now much easier to read. + + - String handling and error printing has been significantly + revamped. We now use sbufs to do string formatting instead + of using printfs (for the kernel) and snprintf/strncat (for + userland) as before. + + There is a new catchall error printing routine, + cam_error_print() and its string-based counterpart, + cam_error_string() that allow the kernel and userland + applications to pass in a CCB and have errors printed out + properly, whether or not they're SCSI errors. Among other + things, this helped eliminate a fair amount of duplicate code + in camcontrol. + + We now print out more information than before, including + the CAM status and SCSI status and the error recovery action + taken to remedy the problem. + + - sbufs are now available in userland, via libsbuf. This + change was necessary since most of the error printing code + is shared between libcam and the kernel. + + - A new transfer settings interface is included in this checkin. + This code is #ifdef'ed out, and is primarily intended to aid + discussion with HBA driver authors on the final form the + interface should take. There is example code in the ahc(4) + driver that implements the HBA driver side of the new + interface. The new transfer settings code won't be enabled + until we're ready to switch all HBA drivers over to the new + interface. + +src/Makefile.inc1, +lib/Makefile: Add libsbuf. It must be built before libcam, + since libcam uses sbuf routines. + +libcam/Makefile: libcam now depends on libsbuf. + +libsbuf/Makefile: Add a makefile for libsbuf. This pulls in the + sbuf sources from sys/kern. + +bsd.libnames.mk: Add LIBSBUF. + +camcontrol/Makefile: Add -lsbuf. Since camcontrol is statically + linked, we can't depend on the dynamic linker + to pull in libsbuf. + +camcontrol.c: Use cam_error_print() instead of checking for + CAM_SCSI_STATUS_ERROR on every failed CCB. + +sbuf.9: Change the prototypes for sbuf_cat() and + sbuf_cpy() so that the source string is now a + const char *. This is more in line wth the + standard system string functions, and helps + eliminate warnings when dealing with a const + source buffer. + + Fix a typo. + +cam.c: Add description strings for the various CAM + error status values, as well as routines to + look up those strings. + + Add new cam_error_string() and + cam_error_print() routines for userland and + the kernel. + +cam.h: Add a new CAM flag, CAM_RETRY_SELTO. + + Add enumerated types for the various options + available with cam_error_print() and + cam_error_string(). + +cam_ccb.h: Add new transfer negotiation structures/types. + + Change inq_len in the ccb_getdev structure to + be "reserved". This field has never been + filled in, and will be removed when we next + bump the CAM version. + +cam_debug.h: Fix typo. + +cam_periph.c: Modularize cam_periph_error(). The SCSI error + handling part of cam_periph_error() is now + in camperiphscsistatuserror() and + camperiphscsisenseerror(). + + In cam_periph_lock(), increase the reference + count on the periph while we wait for our lock + attempt to succeed so that the periph won't go + away while we're sleeping. + +cam_xpt.c: Add new transfer negotiation code. (ifdefed + out) + + Add a new function, xpt_path_string(). This + is a string/sbuf analog to xpt_print_path(). + +scsi_all.c: Revamp string handing and error printing code. + We now use sbufs for much of the string + formatting code. More of that code is shared + between userland the kernel. + +scsi_all.h: Get rid of SS_TURSTART, it wasn't terribly + useful in the first place. + + Add a new error action, SS_REQSENSE. (Send a + request sense and then retry the command.) + This is useful when the controller hasn't + performed autosense for some reason. + + Change the default actions around a bit. + +scsi_cd.c, +scsi_da.c, +scsi_pt.c, +scsi_ses.c: SF_RETRY_SELTO -> CAM_RETRY_SELTO. Selection + timeouts shouldn't be covered by a sense flag. + +scsi_pass.[ch]: SF_RETRY_SELTO -> CAM_RETRY_SELTO. + + Get rid of the last vestiges of a read/write + interface. + +libkern/bsearch.c, +sys/libkern.h, +conf/files: Add bsearch.c, which is needed for some of the + new table lookup routines. + +aic7xxx_freebsd.c: Define AHC_NEW_TRAN_SETTINGS if + CAM_NEW_TRAN_CODE is defined. + +sbuf.h, +subr_sbuf.c: Add the appropriate #ifdefs so sbufs can + compile and run in userland. + + Change sbuf_printf() to use vsnprintf() + instead of kvprintf(), which is only available + in the kernel. + + Change the source string for sbuf_cpy() and + sbuf_cat() to be a const char *. + + Add __BEGIN_DECLS and __END_DECLS around + function prototypes since they're now exported + to userland. + +kdump/mkioctls: Include stdio.h before cam.h since cam.h now + includes a function with a FILE * argument. + +Submitted by: gibbs (mostly) +Reviewed by: jdp, marcel (libsbuf makefile changes) +Reviewed by: des (sbuf changes) +Reviewed by: ken +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.195 2001/03/26 12:46:17 ru Exp $ +d174 4 +a177 1 + PERL5LIB=${WORLDTMP}/usr/libdata/perl/5.6.0 +d214 17 +a230 1 + usr/libexec/${OBJFORMAT} usr/sbin usr/share/misc +d249 1 +a249 1 + for dir in bin games include lib sbin; do \ +d566 1 +a566 1 + gnu/usr.bin/gperf gnu/usr.bin/texinfo +@ + + +1.195 +log +@Add missing NOSECURE check for `includes' target. + +Reviewed by: markm +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.194 2001/03/22 09:54:25 ru Exp $ +d698 1 +d717 1 +d779 2 +a780 2 + lib/libopie lib/libradius lib/libskey lib/libtacplus lib/libutil \ + lib/libz lib gnu/lib ${_libperl} usr.bin/lex/lib ${_libkeycap} +@ + + +1.194 +log +@Enhancement to 1.99 -> 1.100. +Avoid EPERM from ln(1) in a different (proper) way. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.193 2001/03/02 16:52:06 ru Exp $ +d642 1 +a642 1 +.if exists(${.CURDIR}/secure) && !defined(NOCRYPT) +@ + + +1.193 +log +@setlocale(3) has been fixed to match POSIX standard: +LC_ALL takes precedence over other LC_* envariables. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.192 2001/02/22 22:58:24 jhb Exp $ +a232 1 + rm -f ${WORLDTMP}/sys +d243 1 +a243 1 + ln -sf ${.CURDIR}/sys ${WORLDTMP}/sys +@ + + +1.192 +log +@MACHINE_ARCH is the target arch to crossbuild to, not TARGET_ARCH. + +Requested by: marcel +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.191 2001/02/22 08:27:17 jhb Exp $ +d411 1 +a411 1 + @@echo ">>> Kernel build for ${_kernel} started on `LC_TIME=C date`" +d434 1 +a434 1 + @@echo ">>> Kernel build for ${_kernel} completed on `LC_TIME=C date`" +@ + + +1.191 +log +@Document TARGET_ARCH. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.190 2001/02/17 06:06:11 bde Exp $ +d23 1 +a23 1 +# TARGET_ARCH="machine arch" to crossbuild world to a different arch +@ + + +1.190 +log +@Removed some garbage (genassym(8) and its infrastructure). +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.189 2001/02/14 19:50:42 markm Exp $ +d23 1 +@ + + +1.189 +log +@Previous commit should have read: + +Fix "make world" for those folks building world with KRB5 +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.188 2001/02/14 19:48:51 markm Exp $ +d613 1 +a613 1 +.for _tool in ${_btxld} ${_elf2exe} ${_perl} usr.bin/genassym \ +@ + + +1.188 +log +@Fix make world. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.187 2001/01/23 09:52:50 peter Exp $ +@ + + +1.187 +log +@Provide backwards compatable recognition of ${KERNEL}. You should be +able to use KERNEL= again with buildkernel, but it will point you at +KERNCONF= and press on regardless. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.186 2001/01/22 23:29:13 peter Exp $ +d577 1 +a577 2 +_libkrb5= kerberos5/lib/libroken kerberos5/lib/libasn1 kerberos5/lib/libhdb \ + kerberos5/lib/libsl +@ + + +1.186 +log +@Sigh, I thought we still had the rm -rf objdir stuff in make world, which +would have taken care of the possibility of buildkernel crossing over +from one binutils set to another. Back out the part about turning off +'make clean' if the 'make depend' is still active, but add a NO_KERNELCLEAN +target instead that works like NOCLEAN but just for the kernel. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.185 2001/01/22 23:10:01 peter Exp $ +d361 4 +d366 1 +d400 6 +@ + + +1.185 +log +@Use 'make clean' instead of 'config -r', and only if the 'depend' step has +been skipped. We went to a lot of trouble to make the 'blow away' stage +unneeded, and it has not been needed for quite some time. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.184 2001/01/22 08:07:58 imp Exp $ +d18 1 +d408 1 +a408 1 +.if !defined(NOCLEAN) && defined(NO_KERNELDEPEND) +@ + + +1.184 +log +@As threatened in hackers@@ on Friday, obviate the need for a buildworld +to preceed a buildkernel. + +The buildworld is still required when upgrading across major releases, +across binutil upgrades and when config changes version. If +buildkernel breaks, and you haven't done a buildworld, then do not +complain unless you do a buildworld and it still breaks. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.183 2001/01/22 07:29:48 peter Exp $ +a373 4 +.if !defined(NOCLEAN) +CONFIGARGS+= -r +.endif + +d406 4 +@ + + +1.183 +log +@Using "KERNEL" for buildkernel was a very very bad mistake. $KERNEL is +already used by the kernel makefiles themselves, and this leads to a lot +of trouble when people put "KERNEL=MYKERNEL" in make.conf. Bite the bullet +and change it to KERNCONF instead, before it gets too far entrenched. + +The kernel Makefiles use ${KERNEL} as the name of what to install the +kernel as, eg: /boot/${KERNEL}/kernel or /${KERNEL}. This leads to much +unhappiness with things like /LOCAL instead of /kernel. buildkernel is +severely limited as it is only useful directly after a buildworld. + +Reviewed by: jhb +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.182 2001/01/21 23:44:41 jkh Exp $ +d132 1 +d204 4 +d416 1 +a416 1 + ${WMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} depend +d419 1 +a419 1 + ${WMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} all +@ + + +1.182 +log +@Also add some timing information for kernel builds so that it's +easy to do "make world kernel |grep -e '^>>>'" and get a complete +event log. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.181 2001/01/19 09:23:59 peter Exp $ +d345 1 +a345 1 +# KERNEL. If not defined a GENERIC kernel is built/installed. +d355 1 +a355 1 +KERNEL?= GENERIC +d375 1 +a375 1 +.for _kernel in ${KERNEL} +d391 1 +a391 1 + @@echo ">>> ERROR: Missing kernel configuration file(s) (${KERNEL})." +@ + + +1.181 +log +@Create a build-tools target for sysinstall and rtermcap. This is still +not right because rtermcap would be reading the *host* termcap, not +from the termcap in the src tree. Besides, /usr/sbin/sysinstall +(not the crunched one in /stand) should use the runtime termcap +not the precompiled set. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.180 2000/12/24 14:58:34 kato Exp $ +d395 1 +d397 1 +a397 1 + @@echo ">>> Rebuilding kernel(s)" +a398 1 +.for _kernel in ${BUILDKERNELS} +d415 3 +@ + + +1.180 +log +@Removed pc98-hack of aout tools. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.179 2000/12/03 20:29:31 marcel Exp $ +d563 1 +a563 1 + ${_libroken4} ${_libkrb5} lib/libncurses ${_share} +@ + + +1.179 +log +@Fix cross-building once again. + +Forgotten by: ache +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.178 2000/11/24 11:13:15 sheldonh Exp $ +a205 4 +.if ${MACHINE_ARCH} == "i386" && ${MACHINE} == "pc98" +USRDIRS+= usr/libexec/aout +.endif + +a588 5 +# XXX - MACHINE should actually be TARGET. But we don't set that... +.if ${TARGET_ARCH} == "i386" && ${MACHINE} == "pc98" +_aout_tools= usr.bin/size usr.bin/strip gnu/usr.bin/as gnu/usr.bin/ld +.endif + +d594 1 +a594 1 +.for _tool in ${_aout_tools} ${_btxld} ${_elf2exe} ${_perl} usr.bin/genassym \ +@ + + +1.178 +log +@(forced commit) + +More detail describing why chmod is installed into ${INSTALLTMP} since +rev 1.176: + +We use Perl's MakeMaker-generated makefiles to install Perl. Since we +can't hack up MakeMaker's MM_Unix.pm to suit our build, we need chmod +to be around until we use our own makefiles to install perl. + +PR: gnu/22025 +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.177 2000/11/21 04:37:29 marcel Exp $ +d566 1 +a566 1 +.for _tool in bin/sh ${_games} gnu/usr.bin/cc/cc_tools ${_fortran} \ +@ + + +1.177 +log +@Fix release, broken by the perl cross-build fixes. + +The distribute target is basicly the same as an install. For +perl, this means that miniperl is needed. Since miniperl is +only present in the object directory, we need to make sure +the path is set correctly. To do this, we have make release +use a new distribworld target that sets the path before doing +a make distribute. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.176 2000/11/20 02:17:30 marcel Exp $ +@ + + +1.176 +log +@Fix cross-building. + +o Move building libperl and miniperl from build-tools to + cross-tools. libperl uses MACHINE_ARCH to determine the + right configuration, which doesn't match the build + machine when cross-building if they are built as build- + tools. +o Since miniperl needs to be built as a cross-tool, it + needs to be installed under /usr/obj so that it can be + used (cross-tools have a special object directory to + avoid build conflicts. As a downside, you can't easily + run cross-tools from their object directory). Remove + the install and distribute override targets. To avoid + having miniperl installed by installworld, remove it + from SUBDIR. +o We can't pickup miniperl from the object directory but + since it's installed, depend on PATH. This is save, + because the makefiles are run with a known path. +o Build libperl again as part of the library target. A + _libperl variable existed, but it was never defined. +o Add chmod to the list of saved tools, because perl + conditionally uses it during install. + +The bootstrap-tools and cross-tools targets are modified to +avoid building profiled and shared libraries. While here, +have these targets build static binaries instead of shared +binaries. + +Approved by: markm +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.175 2000/11/10 22:02:06 obrien Exp $ +d335 9 +@ + + +1.175 +log +@libgcc now needs to be built earlier in the build. + +Submitted by: jdp +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.174 2000/10/28 21:26:44 obrien Exp $ +d175 2 +a176 1 +BMAKE= ${BMAKEENV} ${MAKE} -f Makefile.inc1 -DNOMAN -DNOINFO -DNOHTML +d187 3 +a189 2 +XMAKE= ${XMAKEENV} ${MAKE} -f Makefile.inc1 -DNOMAN -DNOINFO -DNOHTML \ + -DNO_FORTRAN -DNO_GDB +d303 1 +a303 1 + for prog in [ awk cat chflags chown date echo egrep find grep \ +a555 4 +.if !defined(NOPERL) +_perl= gnu/usr.bin/perl +.endif + +d558 1 +a558 1 + ${_libroken4} ${_libkrb5} lib/libncurses ${_share} ${_perl} +d589 4 +d594 1 +a594 1 +.for _tool in ${_aout_tools} ${_btxld} ${_elf2exe} usr.bin/genassym \ +d750 4 +d759 1 +a759 2 + lib/libz lib gnu/lib \ + ${_libperl} usr.bin/lex/lib ${_libkeycap} +@ + + +1.174 +log +@* Bring back the guts of crt{i,n}.S. This allows C++ exceptions to work +when using the egcs and gcc-devel ports, along with GCC built from stock +public FSF sources. With out this change, FreeBSD will be removed from +the list of systems GCC 3.0 must be evaluated on before release. With +the effort some of us put into getting FreeBSD on this list, we should +not turn this effort into a waste, else we might not be worth fighting +for in the future. (note that Alpha and IA-64 versions of crt{i,n}.S +are needed) + +* Switch from our own crt{begin,in} to those created from GCC's crtstuff.c. +This will allow us to switch to DWARF2 exceptions in the future, along with +staying in sync with any future GCC requirements. + +* Break out our ELF branding bits into a seperate file. Currently this +is now included by our crt1.c files (since this functionality was part of +our native crtbegin.c). Later crtbrand.o will be merged in the creation +of crti.o. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.173 2000/10/25 04:31:32 jkoshy Exp $ +d693 1 +a693 1 +# lib*: csu +d701 1 +a701 1 +# libpam: libcom_err libcrypt libcrypto libgcc_pic libkrb libopie libradius \ +d714 1 +a714 1 +# lib/libpam: secure/lib/libcrypto kerberosIV/lib/libkrb gnu/lib/libgcc \ +d749 3 +a751 2 +.for _lib in ${_csu} gnu/lib/csu lib/libmd lib/libcrypt ${_secure_lib} ${_kerberosIV_lib} \ + ${_kerberos5_lib} gnu/lib/libgcc lib/libcom_err ${_libm} lib/libncurses \ +@ + + +1.173 +log +@Fail the 'buildkernel' target if not even one of the specified kernel configuration +files was found. + +Reviewed by: obrien +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.172 2000/10/13 01:19:36 obrien Exp $ +d653 1 +d749 1 +a749 1 +.for _lib in ${_csu} lib/libmd lib/libcrypt ${_secure_lib} ${_kerberosIV_lib} \ +@ + + +1.172 +log +@Number the stages in the documentation to match what is printed out when +running. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.171 2000/09/18 03:35:49 gibbs Exp $ +d383 4 +@ + + +1.171 +log +@This is really gross. + +If a user decides to forego a make depend during "make buildkernel", +they should get what they deserve if no previous make depend has +been run for that kernel. Instead, the build process includes +special instructions to unconditionally rebuild aicasm. When aicasm +moved to its own directory, this hack broke. + +Correct the hack until a get buy off on killing it. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.170 2000/09/17 21:02:58 imp Exp $ +d140 1 +a140 1 +# bootstrap-tool stage [BMAKE] +d144 1 +a144 1 +# build-tool stage [TMAKE] +d148 1 +a148 1 +# cross-tool stage [XMAKE] +d152 1 +a152 1 +# world stage [WMAKE] +d154 1 +a154 1 +# install stage (optional) [IMAKE] +@ + + +1.170 +log +@Add reinstallkernel target. Does same thing as installkernel, but +executes the reinstall target rather than the install target that +installkernel does. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.169 2000/09/09 14:37:06 des Exp $ +d396 2 +a397 2 + MAKESRCPATH=${KRNLSRCDIR}/dev/aic7xxx \ + ${MAKE} -f ${KRNLSRCDIR}/dev/aic7xxx/Makefile +@ + + +1.169 +log +@Include libfetch in the includes target. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.168 2000/09/09 04:42:34 peter Exp $ +d414 3 +@ + + +1.168 +log +@USA_RESIDENT is no longer required for buildworld, do not force it. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.167 2000/09/03 02:58:39 obrien Exp $ +d654 1 +@ + + +1.167 +log +@Allow one to specify what the installed kernel's name is by setting +"INSTKERNNAME". + +Reviewed by: marcel +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.166 2000/08/13 12:36:40 joe Exp $ +a217 12 +.if !defined(NOSECURE) && !defined(NO_OPENSSL) && exists(${.CURDIR}/secure) && \ + (!defined(USA_RESIDENT) || (${USA_RESIDENT} != NO && \ + ${USA_RESIDENT} != YES)) + @@echo + @@echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" + @@echo ">>> You must define the value of USA_RESIDENT as 'YES' or" + @@echo ">>> 'NO' as appropriate, in the environment or /etc/make.conf" + @@echo ">>> before building can proceed." + @@echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" + @@/usr/bin/false +.endif + +@ + + +1.166 +log +@Define SUPHOST. If this is set a '-h ${SUPHOST}' is added to the +SUPFLAGS when a 'make update' is run. This means that the supfile +doesn't need to be edited because the -h will override the +CHANGE_THIS.FreeBSD.org host. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.165 2000/08/07 14:35:49 sheldonh Exp $ +d361 1 +d412 1 +a412 1 + ${WMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=kernel depend +d415 1 +a415 1 + ${WMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=kernel all +d425 8 +a432 1 + ${CROSSENV} MACHINE=${MACHINE} ${MAKE} KERNEL=kernel install +@ + + +1.165 +log +@Make the update target consistent; both ports and doc are updated +if their SUPFILE variables are defined _and_ NO_PORTSUPDATE and +NO_DOCUPDATE respectively are not defined. + +Previously, only ports was updated and there was no way to prevent +this without undefining its SUPFILE variable. + +PR: 17514 +Reported by: Udo Erdelhoff +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.164 2000/08/03 05:52:22 marcel Exp $ +d116 3 +@ + + +1.164 +log +@Fix buildkernel and installkernel when KERNEL is defined in +/etc/make.conf. + +PR: 20325 +Submitted by: Johan Karlsson +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.163 2000/07/23 21:30:35 marcel Exp $ +d19 2 +d443 1 +a443 1 +.if defined(PORTSSUPFILE) +d445 3 +@ + + +1.163 +log +@Argh... mtree has been removed from the bootstrap-tools. In that +case we need to save it in installworld. That latter I forgot... + +Pointy hat: me +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.162 2000/07/23 17:38:32 marcel Exp $ +d406 1 +a406 1 + ${WMAKEENV} MACHINE=${MACHINE} KERNEL=kernel ${MAKE} depend +d409 1 +a409 1 + ${WMAKEENV} MACHINE=${MACHINE} KERNEL=kernel ${MAKE} all +d419 1 +a419 1 + ${CROSSENV} MACHINE=${MACHINE} KERNEL=kernel ${MAKE} install +@ + + +1.162 +log +@Name all kernels 'kernel'. This fixes the incompatible behaviour +of the buildkernel and installkernel targets where the kernel +was called after the config name. + +While here, fix the brokenness of the installkernel target. It +used to use ${IMAKEENV}, but since that has a very restricted +PATH, it couldn't find make(1). Use ${CROSSENV} instead. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.161 2000/07/23 16:43:03 marcel Exp $ +d309 2 +a310 2 + install ln make makewhatis mv perl rm sed sh sysctl test \ + true uname wc zic; do \ +@ + + +1.161 +log +@Remove mtree for bootstrap-tools. The -L switch change has been +backed out. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.160 2000/07/23 00:20:56 marcel Exp $ +d406 1 +a406 2 + ${WMAKEENV} MACHINE=${MACHINE} KERNEL=${_kernel} \ + ${MAKE} depend +d409 1 +a409 1 + ${WMAKEENV} MACHINE=${MACHINE} KERNEL=${_kernel} ${MAKE} all +d419 1 +a419 2 + ${IMAKEENV} MACHINE=${MACHINE} KERNEL=${INSTALLKERNEL} \ + ${MAKE} KERNEL=${INSTALLKERNEL} install +@ + + +1.160 +log +@Don't save cp(1) in installworld. Its use has been replaced by +a use of install. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.159 2000/07/20 03:03:23 marcel Exp $ +d511 1 +a511 1 + usr.sbin/mtree gnu/usr.bin/gperf gnu/usr.bin/texinfo +@ + + +1.159 +log +@Add awk and wc to the list of copied binaries for the installworld +target. These are needed by liloldr. + +Found by: make release +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.158 2000/07/19 22:48:52 marcel Exp $ +d308 1 +a308 1 + for prog in [ awk cat chflags chown cp date echo egrep find grep \ +@ + + +1.158 +log +@Add cp(1) to the list of binaries we need to save. The cp(1) command +is used by the installation of ld-elf.so when an existing version +exists. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.157 2000/07/19 18:18:21 marcel Exp $ +d308 1 +a308 1 + for prog in [ cat chflags chown cp date echo egrep find grep \ +d310 1 +a310 1 + true uname zic; do \ +@ + + +1.157 +log +@Don't save install-info. We already have that built. We'll use +the one we built anyway. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.156 2000/07/19 04:41:59 marcel Exp $ +d308 3 +a310 2 + for prog in [ cat chflags chown date echo egrep find grep install ln \ + make makewhatis mv perl rm sed sh sysctl test true uname zic; do \ +@ + + +1.156 +log +@Save any binaries we use by installworld, so that we won't use the +binaries we just installed. This allows a future upgrade target to +install a new system without intermediate reboots and also +prevents conflicts for parallel make runs where we might exec a +binary that's being installed at the same time. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.155 2000/07/18 01:49:05 ache Exp $ +d308 2 +a309 3 + for prog in [ cat chflags chown date echo egrep find grep install \ + install-info ln make makewhatis mv perl rm sed sh sysctl test \ + true uname zic; do \ +@ + + +1.155 +log +@Move mtree to bootstrap-tools and add PATH=${TMPPATH} to IMAKEENV to pick it +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.154 2000/07/18 00:21:05 ache Exp $ +d128 4 +d193 1 +a193 1 + PATH=${TMPPATH} +d307 6 +d314 1 +d511 1 +a511 1 + gnu/usr.bin/gperf gnu/usr.bin/texinfo usr.sbin/mtree +@ + + +1.154 +log +@Add mtree to cross-tools to make it updated for new -L option +It must solve make world breakage +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.153 2000/07/02 16:15:03 markm Exp $ +d188 2 +a189 1 +IMAKEENV= ${CROSSENV} +d500 1 +a500 1 + gnu/usr.bin/gperf gnu/usr.bin/texinfo +d573 1 +a573 2 + usr.bin/gensetdefs gnu/usr.bin/binutils usr.bin/objformat gnu/usr.bin/cc \ + usr.sbin/mtree +@ + + +1.153 +log +@Perl's version number needs to change. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.152 2000/06/25 15:02:18 markm Exp $ +d572 2 +a573 1 + usr.bin/gensetdefs gnu/usr.bin/binutils usr.bin/objformat gnu/usr.bin/cc +@ + + +1.152 +log +@Rearrange Perl's build priority; it needs to get made earlier. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.151 2000/06/15 10:00:20 brian Exp $ +d162 1 +a162 1 + PERL5LIB=${WORLDTMP}/usr/libdata/perl/5.006 +@ + + +1.151 +log +@Add -DNO_KERNELDEPEND and -DNO_KERNELCONFIG + +Not reviewed by: sheldonh +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.150 2000/06/09 10:42:36 brian Exp $ +d162 1 +a162 1 + PERL5LIB=${WORLDTMP}/usr/libdata/perl/5.00503 +d533 4 +d539 1 +a539 1 + ${_libroken4} ${_libkrb5} lib/libncurses ${_share} +a718 4 +.endif + +.if !defined(NOPERL) +_libperl= gnu/usr.bin/perl/libperl +@ + + +1.150 +log +@Set KERNEL=${INSTALLKERNEL} doing a make install in /sys/conf +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.149 2000/05/05 08:02:15 nyan Exp $ +d17 2 +d384 1 +d388 1 +d391 3 +a393 1 + ${MAKE} -f ${KRNLSRCDIR}/dev/aic7xxx/Makefile; \ +d395 3 +a397 1 + ${MAKE} depend; \ +@ + + +1.149 +log +@GENERIC98 is removed. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.148 2000/04/27 21:24:43 wollman Exp $ +d401 1 +a401 1 + ${MAKE} install +@ + + +1.148 +log +@Make gperf be a bootstrap-tool, since we now depend on features of +the specific version in -current. + +Approved in principle by: marcel +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.147 2000/04/27 19:38:57 wollman Exp $ +d341 1 +a341 1 +KERNEL?= GENERIC GENERIC98 +@ + + +1.147 +log +@Revert my changes to make gperf a build-tool; that was the wrong thing. +All builds had been broken; now just upgrade builds are until I or +someone else can figure out the Right Thing. +@ +text +@d2 1 +a2 1 +# $FreeBSD$ +d491 1 +a491 1 + gnu/usr.bin/texinfo +@ + + +1.146 +log +@Add gperf(1) to build tools. It should have been one before, but +gcc does not depend on version-specific gperf behavior (yet). +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.145 2000/04/27 09:20:18 sheldonh Exp $ +d526 2 +a527 2 +.for _tool in bin/sh ${_games} gnu/usr.bin/gperf gnu/usr.bin/cc/cc_tools \ + ${_fortran} ${_libroken4} ${_libkrb5} lib/libncurses ${_share} +@ + + +1.145 +log +@Create ${KRNLOBJDIR} before running config(8), since config(8) does +not create required parent directories of the kernel compile +directory specified with its -d option. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.144 2000/04/17 03:50:53 kris Exp $ +d526 2 +a527 2 +.for _tool in bin/sh ${_games} gnu/usr.bin/cc/cc_tools ${_fortran} \ + ${_libroken4} ${_libkrb5} lib/libncurses ${_share} +@ + + +1.144 +log +@Unbreak make world (libpam depends on libopie) +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.143 2000/03/30 13:06:53 sheldonh Exp $ +d381 1 +@ + + +1.143 +log +@Fix the buildkernel and installkernel targets for the case where +KERNEL specifies multiple kernels. + +PR: 17536 +Submitted by: Johan Karlsson +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.142 2000/03/29 07:30:44 ru Exp $ +d665 2 +a666 2 +# libpam: libcom_err libcrypt libcrypto libgcc_pic libkrb libradius libskey \ +# libtacplus libutil libz libssh +d719 2 +a720 1 + lib/libradius lib/libskey lib/libtacplus lib/libutil lib/libz lib gnu/lib \ +@ + + +1.142 +log +@Get rid of "sticky" files when updating sources with cvs(1). + +Approved by: peter +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141 2000/03/09 06:28:19 kris Exp $ +d387 3 +a389 2 + ${WMAKEENV} MACHINE=${MACHINE} ${MAKE} depend; \ + ${WMAKEENV} MACHINE=${MACHINE} ${MAKE} all +d399 2 +a400 1 + ${IMAKEENV} MACHINE=${MACHINE} ${MAKE} install +@ + + +1.141 +log +@Buildworld fixes for NO_OPENSSH and NO_OPENSSL + +Approved by: jkh +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.140 2000/02/28 21:04:38 markm Exp $ +d428 1 +a428 1 + cd ${.CURDIR}; cvs -q update -P -d +@ + + +1.141.2.1 +log +@MFC rev 1.143: Fix buildkernel and installkernel targets. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141 2000/03/09 06:28:19 kris Exp $ +d387 2 +a388 3 + ${WMAKEENV} MACHINE=${MACHINE} KERNEL=${_kernel} \ + ${MAKE} depend; \ + ${WMAKEENV} MACHINE=${MACHINE} KERNEL=${_kernel} ${MAKE} all +d398 1 +a398 2 + ${IMAKEENV} MACHINE=${MACHINE} KERNEL=${INSTALLKERNEL} \ + ${MAKE} install +@ + + +1.141.2.2 +log +@MFC: (rev 1.142) +Get rid of "sticky" files when updating sources from CVS repository. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.1 2000/03/30 13:08:32 sheldonh Exp $ +d430 1 +a430 1 + cd ${.CURDIR}; cvs -q update -rRELENG_4 -P -d +@ + + +1.141.2.3 +log +@MFC: - make sure KRNLOBJDIR gets mkdir'd + - add gperf to the bootstrap tools +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.2 2000/04/05 17:52:02 ru Exp $ +a380 1 + mkdir -p ${KRNLOBJDIR} +d490 1 +a490 1 + gnu/usr.bin/gperf gnu/usr.bin/texinfo +@ + + +1.141.2.4 +log +@MFC: Rename GENERIC98 to GENERIC. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.3 2000/05/28 12:33:40 asmodai Exp $ +d341 1 +a341 1 +KERNEL?= GENERIC +@ + + +1.141.2.5 +log +@MFC: buildkernel and installkernel: +1.151: Add NO_KERNELDEPEND and NO_KERNELCONFIG +1.162: Name all kernels 'kernel' +1.164: Fix when KERNEL is set in /etc/make.conf +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.4 2000/06/17 03:43:06 nyan Exp $ +a16 2 +# -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel +# -DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel +a381 1 +.if !defined(NO_KERNELCONFIG) +a384 1 +.endif +d387 4 +a390 7 + ${MAKE} -f ${KRNLSRCDIR}/dev/aic7xxx/Makefile +.if !defined(NO_KERNELDEPEND) + cd ${KRNLOBJDIR}/${_kernel}; \ + ${WMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=kernel depend +.endif + cd ${KRNLOBJDIR}/${_kernel}; \ + ${WMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=kernel all +d400 2 +a401 1 + ${CROSSENV} MACHINE=${MACHINE} ${MAKE} KERNEL=kernel install +@ + + +1.141.2.6 +log +@MFC rev 1.165: add NO_PORTSUPDATE and NO_DOCUPDATE. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.5 2000/08/03 06:12:19 marcel Exp $ +a18 2 +# -DNO_PORTSUPDATE do not update ports in ${MAKE} update +# -DNO_DOCUPDATE do not update doc in ${MAKE} update +d429 1 +a429 1 +.if defined(PORTSSUPFILE) && !defined(NO_PORTSUPDATE) +a430 3 +.endif +.if defined(DOCSUPFILE) && !defined(NO_DOCUPDATE) + @@${SUP} ${SUPFLAGS} ${DOCSUPFILE} +@ + + +1.141.2.7 +log +@MFC: Add a SUPHOST option to override the cvsup server used. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.6 2000/08/15 17:51:02 sheldonh Exp $ +a115 3 +.if defined(SUPHOST) +SUPFLAGS+= -h ${SUPHOST} +.endif +@ + + +1.141.2.8 +log +@MFC: Save any binaries we use by installworld, so that we won't use the + binaries we just installed. This allows a future upgrade target to + install a new system without intermediate reboots and also + prevents conflicts for parallel make runs where we might exec a + binary that's being installed at the same time. + +Note that 4-stable requires miniperl to be saved as an install tool +unlike -current. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.7 2000/08/17 01:43:35 jhb Exp $ +a132 4 +TMPDIR?= /tmp +TMPPID!= echo $$$$ +INSTALLTMP= ${TMPDIR}/install.${TMPPID} + +d193 1 +a193 2 +IMAKEENV= ${CROSSENV} \ + PATH=${STRICTTMPPATH}:${INSTALLTMP} +a306 6 + mkdir -p ${INSTALLTMP} + for prog in [ awk cat chflags chown date echo egrep find grep \ + install ln make makewhatis miniperl mtree mv perl rm sed sh sysctl \ + test true uname wc zic; do \ + cp `which $$prog` ${INSTALLTMP}; \ + done +a307 1 + rm -rf ${INSTALLTMP} +@ + + +1.141.2.9 +log +@MFC: rev 1.168: no longer force USA_RESIDENT to be set. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.8 2000/08/23 19:27:30 jhb Exp $ +d218 12 +@ + + +1.141.2.10 +log +@MFC: add libopie + +Kindly noted by: ru +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.9 2000/09/10 23:02:58 peter Exp $ +d680 2 +a681 2 +# libpam: libcom_err libcrypt libcrypto libgcc_pic libkrb libopie libradius \ +# libskey libtacplus libutil libz libssh +d734 1 +a734 2 + lib/libopie lib/libradius lib/libskey lib/libtacplus lib/libutil \ + lib/libz lib gnu/lib \ +@ + + +1.141.2.11 +log +@MFC: include libfetch in 'includes' target. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.10 2000/09/20 20:21:08 jkh Exp $ +a641 1 + cd ${.CURDIR}/lib/libfetch; ${MAKE} beforeinstall +@ + + +1.141.2.12 +log +@MFC: Update buildkernel target for new aicasm location. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.11 2000/09/22 07:49:09 des Exp $ +d395 2 +a396 2 + MAKESRCPATH=${KRNLSRCDIR}/dev/aic7xxx/aicasm \ + ${MAKE} -f ${KRNLSRCDIR}/dev/aic7xxx/aicasm/Makefile +@ + + +1.141.2.13 +log +@MFC: New perl build methodology. Don't install miniperl. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.12 2000/09/23 00:22:56 gibbs Exp $ +d302 1 +a302 1 + install ln make makewhatis mtree mv perl rm sed sh sysctl \ +a538 4 +.if !defined(NOPERL) +_perl= gnu/usr.bin/perl +.endif + +d541 1 +a541 1 + ${_libroken4} ${_libkrb5} lib/libncurses ${_share} ${_perl} +@ + + +1.141.2.14 +log +@MFC: Add the numbers to the stages in the comments +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.13 2000/10/05 09:56:49 markm Exp $ +d140 1 +a140 1 +# 1. bootstrap-tool stage [BMAKE] +d144 1 +a144 1 +# 2. build-tool stage [TMAKE] +d148 1 +a148 1 +# 3. cross-tool stage [XMAKE] +d152 1 +a152 1 +# 4. world stage [WMAKE] +d154 1 +a154 1 +# 5. install stage (optional) [IMAKE] +@ + + +1.141.2.15 +log +@MFC. + +* Bring back the guts of crt{i,n}.S. This allows C++ exceptions to work +when using the egcs and gcc-devel ports, along with GCC built from stock +public FSF sources. With out this change, FreeBSD will be removed from +the list of systems GCC 3.0 must be evaluated on before release. + +* Switch from our own crt{begin,in} to those created from GCC's crtstuff.c. + +* Break out our ELF branding bits into a seperate file. Currently this +is now included by our crt1.c files (since this functionality was part of +our native crtbegin.c). Later crtbrand.o will be merged in the creation +of crti.o. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.14 2000/10/27 16:11:49 asmodai Exp $ +a637 1 + cd ${.CURDIR}/gnu/lib/csu; ${MAKE} beforeinstall +d737 1 +a737 1 +.for _lib in ${_csu} gnu/lib/csu lib/libmd lib/libcrypt ${_secure_lib} ${_kerberosIV_lib} \ +@ + + +1.141.2.16 +log +@MFC: link shared objections agaisnt libgcc[_r]_pic. + (also remove last vestages of -kthread) + +Approved by: JKH +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.15 2000/10/30 20:32:22 obrien Exp $ +d678 1 +a678 1 +# lib*: csu libgcc_pic +d686 1 +a686 1 +# libpam: libcom_err libcrypt libcrypto libkrb libopie libradius \ +d699 1 +a699 1 +# lib/libpam: secure/lib/libcrypto kerberosIV/lib/libkrb \ +d738 2 +a739 3 +.for _lib in ${_csu} gnu/lib/csu gnu/lib/libgcc lib/libmd lib/libcrypt \ + ${_secure_lib} ${_kerberosIV_lib} \ + ${_kerberos5_lib} lib/libcom_err ${_libm} lib/libncurses \ +@ + + +1.141.2.17 +log +@MFC rev 1.178: add chmod to the list of tools installed into +${INSTALLTMP} +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.16 2000/11/11 21:52:39 obrien Exp $ +d301 1 +a301 1 + for prog in [ awk cat chflags chmod chown date echo egrep find grep \ +@ + + +1.141.2.18 +log +@MFC: "kernel" target +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.17 2000/11/24 11:16:02 sheldonh Exp $ +a412 7 + +# +# kernel +# +# Short hand for `make buildkernel installkernel' +# +kernel: buildkernel installkernel +@ + + +1.141.2.19 +log +@MFC: kernel time reporting. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.18 2000/12/01 21:58:09 jkh Exp $ +a382 1 +.for _kernel in ${BUILDKERNELS} +d384 1 +a384 1 + @@echo ">>> Kernel build for ${_kernel} started on `LC_TIME=C date`" +d386 1 +a402 3 + @@echo "--------------------------------------------------------------" + @@echo ">>> Kernel build for ${_kernel} completed on `LC_TIME=C date`" + @@echo "--------------------------------------------------------------" +@ + + +1.141.2.20 +log +@MFC a few things related to buildkernel: +- add the reinstallkernel target (does a make reinstall) +- prefer KERNCONF to KERNEL, but accept KERNEL anyway (with a pointer + to KERNCONF, but not as annoying as on -current) +- use 'make clean' instead of 'config -r' +- add a NO_KERNELCLEAN option to avoid a clean. NOCLEAN is respected. +- buildkernel checks to see if a kernel name was supplied +- Allow changing the installed kernel name.. + eg: make buildkernel KERNCONF=GENERIC INSTKERNNAME=kernel.GENERIC + +These should largely be transparent and should not break anything +or anyone. It should enable consistant doc targets between -current +and RELENG_4 now. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.19 2001/01/22 23:26:15 jkh Exp $ +a17 1 +# -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel +d338 1 +a338 1 +# KERNCONF. If not defined a GENERIC kernel is built/installed. +d348 1 +a348 7 +.if !defined(KERNCONF) && defined(KERNEL) +KERNCONF= ${KERNEL} +KERNWARN= yes +.else +KERNCONF?= GENERIC +.endif +INSTKERNNAME?= kernel +d361 4 +d367 1 +a367 1 +.for _kernel in ${KERNCONF} +a381 9 +.if empty(BUILDKERNELS) + @@echo ">>> ERROR: Missing kernel configuration file(s) (${KERNCONF})." + @@false +.endif +.if defined(KERNWARN) + @@echo "--------------------------------------------------------------" + @@echo ">>> WARNING: KERNEL= setting should be changed to KERNCONF=" + @@echo "--------------------------------------------------------------" +.endif +a393 4 +.if !defined(NOCLEAN) && !defined(NO_KERNELCLEAN) + cd ${KRNLOBJDIR}/${_kernel}; \ + ${KMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} clean +.endif +d399 1 +a399 1 + ${KMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} depend +d402 1 +a402 1 + ${KMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} all +d415 1 +a415 4 + ${CROSSENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} install +reinstallkernel: + cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ + ${CROSSENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} reinstall +@ + + +1.141.2.21 +log +@1.141.2.20 changed WMAKEENV to KMAKEENV in the kernel build targets. +This breaks make buildkernel on a 4.0-release box due to the binutils +issue. Add KMAKEENV kernel definitions from current. With the the +conditional definition of OBJFORMAT_PATH, this effectively merges +1.184 from -current. This makes the window of breakage at 8 days +(2001-02-02 through 2001-02-10). +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.20 2001/02/02 08:33:47 peter Exp $ +a132 1 +OBJFORMAT_PATH?= /usr/libexec +a200 4 + +# kernel stage +KMAKEENV= ${WMAKEENV} \ + OBJFORMAT_PATH=${WORLDTMP}/usr/libexec:${OBJFORMAT_PATH} +@ + + +1.141.2.22 +log +@MFC: 1.19[12]: document MACHINE_ARCH + 1.187(partial): sleep as in -current + 1.179: fix cross-building once again + 1.177(partial): new distribworld target + 1.176(partial): bootstrap-tools and cross-tools targets avoid + building profiled and shared libraries; and build + static binaries instead of shared binaries +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.21 2001/02/11 03:51:45 imp Exp $ +a22 1 +# MACHINE_ARCH="machine arch" to crossbuild world to a different arch +d177 1 +a177 2 +BMAKE= ${BMAKEENV} ${MAKE} -f Makefile.inc1 -DNOHTML -DNOINFO \ + -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED +d188 2 +a189 3 +XMAKE= ${XMAKEENV} ${MAKE} -f Makefile.inc1 -DNO_FORTRAN -DNO_GDB \ + -DNOHTML -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE \ + -DNOSHARED +a340 9 +# distribworld +# +# Front-end to distribute to make sure the search path contains +# the object directory. Needed for miniperl. +# +distribworld: + cd ${.CURDIR}; PATH=${TMPPATH} ${MAKE} -f Makefile.inc1 distribute + +# +a397 1 + @@sleep 3 +d578 1 +a578 1 +.for _tool in bin/csh bin/sh ${_games} gnu/usr.bin/cc/cc_tools ${_fortran} \ +d776 2 +a777 1 + lib/libz lib gnu/lib ${_libperl} usr.bin/lex/lib ${_libkeycap} +@ + + +1.141.2.23 +log +@MFC: don't build kerberos stuff that can't be built. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.22 2001/03/04 12:39:26 obrien Exp $ +d582 2 +a583 1 +_libkrb5= kerberos5/lib/libasn1 kerberos5/lib/libhdb kerberos5/lib/libsl +@ + + +1.141.2.24 +log +@Fix make world. bin/csh has no build-tools target. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.23 2001/03/04 14:49:04 markm Exp $ +d590 1 +a590 1 +.for _tool in bin/sh ${_games} gnu/usr.bin/cc/cc_tools ${_fortran} \ +@ + + +1.141.2.25 +log +@MFC: 1.179: fix cross-building once again +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.24 2001/03/04 17:57:33 markm Exp $ +d590 1 +a590 1 +.for _tool in bin/csh bin/sh ${_games} gnu/usr.bin/cc/cc_tools ${_fortran} \ +@ + + +1.141.2.26 +log +@MFC: fix setlocale(3) so that LC_ALL environment variable (if set +and not NULL) is preferred over other LC_* environment variables, +as required by POSIX. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.25 2001/03/05 05:45:35 obrien Exp $ +d415 1 +a415 1 + @@echo ">>> Kernel build for ${_kernel} started on `LC_ALL=C date`" +d438 1 +a438 1 + @@echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`" +@ + + +1.141.2.26.2.1 +log +@Fixed the update target to follow the correct CVS branch. + +Approved by: nectar +@ +text +@d2 1 +a2 1 +# $FreeBSD$ +d492 1 +a492 1 + cd ${.CURDIR}; cvs -q update -rRELENG_4_3 -P -d +@ + + +1.141.2.27 +log +@MFC: Upgrade to Groff 1.17. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.26 2001/03/05 13:08:30 ru Exp $ +d174 1 +a174 4 + PERL5LIB=${WORLDTMP}/usr/libdata/perl/5.00503 \ + GROFF_BIN_PATH=${WORLDTMP}/usr/bin \ + GROFF_FONT_PATH=${WORLDTMP}/usr/share/groff_font \ + GROFF_TMAC_PATH=${WORLDTMP}/usr/share/tmac +d211 1 +a211 17 + usr/libexec/${OBJFORMAT} usr/sbin usr/share/misc \ + usr/share/dict \ + usr/share/groff_font/devX100 \ + usr/share/groff_font/devX100-12 \ + usr/share/groff_font/devX75 \ + usr/share/groff_font/devX75-12 \ + usr/share/groff_font/devascii \ + usr/share/groff_font/devcp1047 \ + usr/share/groff_font/devdvi \ + usr/share/groff_font/devhtml \ + usr/share/groff_font/devkoi8-r \ + usr/share/groff_font/devlatin1 \ + usr/share/groff_font/devlbp \ + usr/share/groff_font/devlj4 \ + usr/share/groff_font/devps \ + usr/share/groff_font/devutf8 \ + usr/share/tmac/mdoc usr/share/tmac/mm +d234 1 +a234 1 + for dir in bin games include lib sbin share; do \ +d237 1 +d248 1 +a248 1 + ln -sf ${.CURDIR}/sys ${WORLDTMP} +d552 1 +a552 1 + gnu/usr.bin/gperf gnu/usr.bin/groff gnu/usr.bin/texinfo +@ + + +1.141.2.28 +log +@MFC: ${MAKEOBJDIRPREFIX}/usr/src/i386/usr/include/isc was being created as a + plain file during the bootstrapping process of a buildworld and contained + the last isc include file to be installed. It was meant to be a directory + for the isc include files. + + Revision Changes Path + 1.198 +2 -2 src/Makefile.inc1 +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.27 2001/04/26 17:10:53 ru Exp $ +d236 1 +a236 1 +INCDIRS= arpa g++/std isc objc protocols readline rpc rpcsvc openssl \ +@ + + +1.141.2.29 +log +@- Restore -nostdinc that got lost in rev.1.105; we don't + want host headers during `buildworld'. + +Submitted by: bde + +- During `buildworld', install headers in a "copy" mode + until we decide what to do with the (currently broken) + SHARED=symlinks. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.28 2001/05/04 02:06:42 gshapiro Exp $ +a173 1 + CFLAGS="-nostdinc ${CFLAGS}" \ +d298 1 +a298 1 + cd ${.CURDIR}; ${WMAKE} SHARED=copies includes +@ + + +1.141.2.30 +log +@MFC rev 1.202: add install to the bootstrap tools + +(required by rev 1.20.2.4 of src/sbin/init/Makefile) + +Reported by: tmm +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.29 2001/06/11 11:18:03 ru Exp $ +d330 1 +a330 1 + ln make makewhatis mtree mv perl rm sed sh sysctl \ +d570 1 +a570 2 +.for _tool in ${_strfile} usr.bin/yacc usr.bin/colldef usr.bin/xinstall \ + usr.sbin/config \ +@ + + +1.141.2.31 +log +@MFC: use a build-tool to create the .mgc files. + +Approved by: re +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.30 2001/08/01 14:28:41 sheldonh Exp $ +d611 1 +a611 1 + ${_libroken4} ${_libkrb5} lib/libncurses ${_share} ${_perl} usr.bin/file +@ + + +1.141.2.32 +log +@Make downgrading from 5.0-CURRENT to 4.4-RELEASE work. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.31 2001/08/17 22:47:13 obrien Exp $ +a570 1 + usr.bin/mk_cmds \ +@ + + +1.141.2.33 +log +@MFC: Bootstrapping fixes. + +This unbreaks source upgrades from 4.2-RELEASE. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.32 2001/09/17 15:36:59 ru Exp $ +d182 2 +a183 2 +BMAKE= ${BMAKEENV} ${MAKE} -f Makefile.inc1 -DBOOTSTRAPPING \ + -DNOHTML -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED +d194 3 +a196 3 +XMAKE= ${XMAKEENV} ${MAKE} -f Makefile.inc1 -DBOOTSTRAPPING \ + -DNO_FORTRAN -DNO_GDB -DNOHTML -DNOINFO -DNOMAN \ + -DNOPIC -DNOPROFILE -DNOSHARED +@ + + +1.141.2.34 +log +@MFC: 1.195: Add missing NOSECURE check for the `includes' target. + +PR: bin/14648 +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.33 2001/09/24 15:43:04 ru Exp $ +d673 1 +a673 1 +.if exists(${.CURDIR}/secure) && !defined(NOCRYPT) && !defined(NOSECURE) +@ + + +1.141.2.35 +log +@MFC: rev 1.223: Set full-path of cvsup for "make update" + +PR: 31932 +@ +text +@d2 1 +a2 1 +# $FreeBSD$ +d116 1 +a116 1 +SUP?= /usr/local/bin/cvsup +@ + + +1.141.2.36 +log +@MFC: rev 1.224: "make cleandir" before building a kernel and modules. +@ +text +@d445 1 +a445 1 + ${KMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} clean cleandir +@ + + +1.141.2.37 +log +@MFC: rev 1.225,1.226: Run "make cleandir" if NO_MODULES are set or directory +sys/modules is not existed. +@ +text +@a443 4 +.if defined(NO_MODULES) || !exists(${KRNLSRCDIR}/modules) + cd ${KRNLOBJDIR}/${_kernel}; \ + ${KMAKEENV} MACHINE=${MACHINE} ${MAKE} KERNEL=${INSTKERNNAME} clean +.else +a445 1 +.endif +@ + + +1.141.2.38 +log +@MFC: rev 1.227: Don't cleandir also if MODULES_WITH_WORLD. +@ +text +@d444 1 +a444 1 +.if defined(MODULES_WITH_WORLD) || defined(NO_MODULES) || !exists(${KRNLSRCDIR}/modules) +@ + + +1.141.2.39 +log +@MFC: rev 1.230, get rid of WANT_CSRG_LIBM define. +@ +text +@d723 1 +d725 1 +d755 1 +a755 1 +# libg++: msun +d764 1 +a764 1 +# libstc++: msun +d769 1 +a769 1 +# gnu/lib: lib/msun lib/libncurses +d795 6 +d812 1 +a812 1 + ${_kerberos5_lib} lib/libcom_err lib/msun lib/libncurses \ +@ + + +1.141.2.40 +log +@MFC: cross-building fixes. +@ +text +@d23 1 +a23 1 +# TARGET_ARCH="arch" to crossbuild world to a different arch +a123 2 +TARGET?= ${MACHINE} +.if make(buildworld) +d125 1 +a125 5 +.if ${MACHINE_ARCH} != ${BUILD_ARCH} +.error To cross-build, set TARGET_ARCH. +.endif +.endif +.if ${MACHINE_ARCH} == ${TARGET_ARCH} +d128 1 +a128 1 +OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET_ARCH} +d130 1 +a130 1 +WORLDTMP= ${OBJTREE}${.CURDIR}/${MACHINE_ARCH} +d161 8 +a170 2 + MACHINE_ARCH=${TARGET_ARCH} \ + MACHINE=${TARGET} \ +a174 1 + CXXINCLUDES="-nostdinc++ ${CXXINCLUDES}" \ +d181 1 +a181 3 +BMAKEENV= MAKEOBJDIRPREFIX=${WORLDTMP} \ + DESTDIR= \ + INSTALL="sh ${.CURDIR}/tools/install.sh" +d187 3 +a189 3 + DESTDIR= \ + INSTALL="sh ${.CURDIR}/tools/install.sh" +TMAKE= ${TMAKEENV} ${MAKE} -f Makefile.inc1 -DBOOTSTRAPPING +d192 5 +a196 1 +XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} -DNO_FORTRAN -DNO_GDB +d233 4 +d253 7 +d278 1 +a278 1 + cd ${.CURDIR}; ${WMAKE} ${CLEANDIR:S/^/par-/} +d284 1 +a284 1 + cd ${.CURDIR}; ${WMAKE} par-obj +d376 1 +a376 1 +# Only the existing (depending TARGET) config files are used +d380 3 +a382 3 +# Note that we have to use TARGET instead of TARGET_ARCH when +# we're in kernel-land. Since only TARGET_ARCH is (expected) to +# be set to cross-build, we have to make sure TARGET is set +d393 5 +a397 5 +# The only exotic TARGET_ARCH/TARGET combination valid at this +# time is i386/pc98. In all other cases set TARGET equal to +# TARGET_ARCH. +.if ${TARGET_ARCH} != "i386" || ${TARGET} != "pc98" +TARGET= ${TARGET_ARCH} +d401 1 +a401 1 +KRNLCONFDIR= ${KRNLSRCDIR}/${TARGET}/conf +d446 1 +a446 1 + ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} clean +d449 1 +a449 1 + ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} clean cleandir +d457 1 +a457 1 + ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} depend +d460 1 +a460 1 + ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} all +d473 1 +a473 1 + ${CROSSENV} ${MAKE} KERNEL=${INSTKERNNAME} install +d476 1 +a476 1 + ${CROSSENV} ${MAKE} KERNEL=${INSTKERNNAME} reinstall +d583 1 +a583 1 + ${MAKE} DESTDIR=${MAKEOBJDIRPREFIX} install +a600 4 +.if !defined(NOPERL) +_perl= gnu/usr.bin/perl/miniperl +.endif + +d611 4 +d617 1 +a617 1 + ${_perl} ${_libroken4} ${_libkrb5} lib/libncurses ${_share} usr.bin/file +d624 11 +d643 5 +d649 1 +a649 1 +.for _tool in ${_btxld} ${_elf2exe} usr.bin/genassym \ +d655 1 +a655 1 + ${MAKE} DESTDIR=${MAKEOBJDIRPREFIX} install +@ + + +1.141.2.41 +log +@Garbage collect COMPILER_PATH, LIBRARY_PATH, and -nostdinc +in Makefile.inc1, -I${DESTDIR}/usr/include in bsd.prog.mk +and bsd.lib.mk, and LDDESTDIR in bsd.lib.mk. + +(David O'Brien already merged the required changes to gcc.) +@ +text +@d171 2 +d174 2 +@ + + +1.141.2.42 +log +@MFC: Fixed "includes" to install secure/lib/libtelnet headers if required. +@ +text +@a661 2 +.elif exists(${.CURDIR}/secure) && !defined(NOCRYPT) && !defined(NOSECURE) + cd ${.CURDIR}/secure/lib/libtelnet; ${MAKE} beforeinstall +@ + + +1.141.2.43 +log +@MFC: Rename libusb to libusbhid (following NetBSD). +@ +text +@a706 1 + cd ${.CURDIR}/lib/libusbhid; ${MAKE} beforeinstall +@ + + +1.141.2.44 +log +@Disconnect libss and mk_cmds from the build. +Nothing uses them. + +Approved by: re +@ +text +@d560 1 +d706 1 +d732 1 +@ + + +1.141.2.45 +log +@MFC: Despite the fact that it is documented in the handbook, the release notes, + and UPDATING and has been posted to both freebsd-current and + freebsd-stable, users are still not adding the required smmsp user and + group before doing an installworld. Therefore, don't let users do an + installworld unless they have followed directions. + + Add a new installcheck Makefile target which installworld runs before + actually starting the installation. This target can be used by other parts + of userland as well. The first addition to the target is to check for the + smmsp user and group if NO_SENDMAIL isn't defined. + + Others may add checks to this target as they see fit. + + Revision Changes Path + 1.249 +3 -3 src/Makefile + 1.260 +18 -1 src/Makefile.inc1 +@ +text +@a306 17 +# installcheck +# +# Checks to be sure system is ready for installworld +# +installcheck: +.if !defined(NO_SENDMAIL) + @@if ! `grep -q '^smmsp:' /etc/passwd`; then \ + echo "ERROR: Required smmsp user is missing, see /usr/src/UPDATING."; \ + false; \ + fi + @@if ! `grep -q '^smmsp:' /etc/group`; then \ + echo "ERROR: Required smmsp group is missing, see /usr/src/UPDATING."; \ + false; \ + fi +.endif + +# +d311 1 +a311 1 +installworld: installcheck +@ + + +1.141.2.45.2.1 +log +@Merge OpenSSH, OPIE, PAM and a number of dependencies from -STABLE. +@ +text +@a746 1 +# libssh: libcrypto libz +d756 1 +a756 1 +# secure/lib: secure/lib/libcrypto lib/libmd lib/libz +d766 1 +a766 1 +.if exists(${.CURDIR}/secure) && !defined(NOCRYPT) && !defined(NOSECURE) +a767 3 +.if exists(${.CURDIR}/secure/lib/libcrypto) +_libcrypto= secure/lib/libcrypto +.endif +d788 1 +a788 1 + lib/libz ${_libcrypto} ${_secure_lib} ${_kerberosIV_lib} \ +d791 1 +a791 1 + lib gnu/lib ${_libperl} usr.bin/lex/lib ${_libkeycap} +@ + + +1.141.2.45.2.2 +log +@The update target should track RELENG_4_6, not RELENG_4 + +Consistent with: Makefile.inc1 on RELENG_4_5 +Submitted by: ru +Approved by: re +@ +text +@d517 1 +a517 1 + cd ${.CURDIR}; cvs -q update -rRELENG_4_6 -P -d +@ + + +1.141.2.45.2.3 +log +@MFS: 1.141.2.48: Fixed the -DMAKE_KERBEROS5 world breakage in +kerberos5/lib/libroken that was hiding after a recently fixed +bug in ld(1). + +Approved by: re (murray) +@ +text +@d612 1 +a612 2 +_libkrb5= kerberos5/lib/libroken kerberos5/lib/libvers \ + kerberos5/lib/libasn1 kerberos5/lib/libhdb kerberos5/lib/libsl +@ + + +1.141.2.46 +log +@MFC: (1.237) build lib/libz and secure/lib/libcrypto before secure/lib. +@ +text +@a746 1 +# libssh: libcrypto libz +d756 1 +a756 1 +# secure/lib: secure/lib/libcrypto lib/libmd lib/libz +d766 1 +a766 1 +.if exists(${.CURDIR}/secure) && !defined(NOCRYPT) && !defined(NOSECURE) +a767 3 +.if exists(${.CURDIR}/secure/lib/libcrypto) +_libcrypto= secure/lib/libcrypto +.endif +d788 1 +a788 1 + lib/libz ${_libcrypto} ${_secure_lib} ${_kerberosIV_lib} \ +d791 1 +a791 1 + lib gnu/lib ${_libperl} usr.bin/lex/lib ${_libkeycap} +@ + + +1.141.2.47 +log +@MFC: 1.241 (1-true-AWK has a build-tool target). +@ +text +@d617 1 +a617 2 + ${_perl} ${_libroken4} ${_libkrb5} lib/libncurses ${_share} \ + usr.bin/awk usr.bin/file +@ + + +1.141.2.48 +log +@MFC: 1.238, 1.239: Fixed the -DMAKE_KERBEROS5 world breakage in +kerberos5/lib/libroken revealed by recently fixed bug in ld(1). + +Reminded by: Stephen Hilton +@ +text +@d612 1 +a612 2 +_libkrb5= kerberos5/lib/libroken kerberos5/lib/libvers \ + kerberos5/lib/libasn1 kerberos5/lib/libhdb kerberos5/lib/libsl +@ + + +1.141.2.49 +log +@MFC: bsd.incs.mk support and assorted header fixes: + +Install sys//include/pc/*.h to /usr/include/machine/pc/. + +Install sys/netatm/*/*.h to /usr/include/netatm/*/. + +Don't install compatibility symlinks for +and . + +Don't install IPFILTER headers. Userland utilities fetch them +directly, and they were not visible in the SHARED=symlinks case. + +Resurrect SHARED=symlinks in Makefile.inc1. + +PR: docs/29534, bin/28002 +@ +text +@d228 2 +a229 2 +INCDIRS= arpa dev fs g++/std isc isofs libmilter objc openssl \ + protocols readline rpc rpcsvc security ufs +d283 1 +a283 1 + cd ${.CURDIR}; ${WMAKE} SHARED=symlinks par-includes +d529 8 +a536 3 +.for _dir in bin sbin libexec usr.bin usr.sbin gnu/libexec gnu/usr.bin gnu/usr.sbin + cd ${.CURDIR}/${_dir}; ${MAKE} DIRPRFX=${_dir}/ all +.endfor +d548 8 +a555 3 +.for _dir in bin sbin libexec usr.bin usr.sbin gnu/libexec gnu/usr.bin gnu/usr.sbin + cd ${.CURDIR}/${_dir}; ${MAKE} DIRPRFX=${_dir}/ install +.endfor +d580 4 +a583 4 + ${MAKE} DIRPRFX=${_tool}/ obj; \ + ${MAKE} DIRPRFX=${_tool}/ depend; \ + ${MAKE} DIRPRFX=${_tool}/ all; \ + ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install +d620 1 +a620 1 + cd ${.CURDIR}/${_tool}; ${MAKE} DIRPRFX=${_tool}/ build-tools +d638 4 +a641 4 + ${MAKE} DIRPRFX=${_tool}/ obj; \ + ${MAKE} DIRPRFX=${_tool}/ depend; \ + ${MAKE} DIRPRFX=${_tool}/ all; \ + ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install +d651 81 +d800 3 +a802 3 + ${MAKE} DIRPRFX=${_lib}/ depend; \ + ${MAKE} DIRPRFX=${_lib}/ all; \ + ${MAKE} DIRPRFX=${_lib}/ install +d806 1 +a806 1 +.for __target in clean cleandepend cleandir depend includes obj +@ + + +1.141.2.50 +log +@MFC: 1.251: Avoid cleaning modules twice in `buildkernel'. +@ +text +@d445 1 +d447 2 +a448 2 + ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} -DNO_MODULES clean +.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KRNLSRCDIR}/modules) +d450 1 +a450 1 + ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} cleandir +@ + + +1.141.2.51 +log +@MFC: Set MAKEOBJDIREPREFIX based on ${TARGET}, not on ${TARGET_ARCH}. +@ +text +@a123 1 +.if ${TARGET_ARCH} == ${MACHINE_ARCH} +a124 3 +.else +TARGET?= ${TARGET_ARCH} +.endif +d131 1 +a131 1 +.if ${MACHINE} == ${TARGET} +d134 1 +a134 1 +OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET} +d393 7 +@ + + +1.141.2.52 +log +@MFC: Replaced .depend generation hacks with a cleaner one. +@ +text +@a247 4 +.else + # XXX - These two can depend on any header file. + rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c + rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c +@ + + +1.141.2.53 +log +@MFC: Automate building of libraries with the tools/make_libdeps.sh script. +@ +text +@a78 3 +.if exists(${.CURDIR}/secure) && !defined(NOCRYPT) && !defined(NOSECURE) +SUBDIR+= secure +.endif +d91 3 +d186 1 +a186 2 + -DNOHTML -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED \ + -DNO_WERROR +d454 2 +a455 2 + MAKESRCPATH=${KRNLSRCDIR}/dev/aic7xxx/aicasm \ + ${MAKE} -DBOOTSTRAPPING -f ${KRNLSRCDIR}/dev/aic7xxx/aicasm/Makefile +d643 1 +a643 3 +# The list of libraries with dependents (${_prebuild_libs}) and their +# interdependencies (__L) are built automatically by the +# ${.CURDIR}/tools/make_libdeps.sh script. +d645 29 +a673 14 +libraries: + cd ${.CURDIR}; \ + ${MAKE} -f Makefile.inc1 _startup_libs; \ + ${MAKE} -f Makefile.inc1 _prebuild_libs; \ + ${MAKE} -f Makefile.inc1 _generic_libs; + +# These dependencies are not automatically generated: +# +# gnu/lib/csu, gnu/lib/libgcc and lib/csu must be built before all +# shared libraries for ELF. +# +_startup_libs= gnu/lib/csu gnu/lib/libgcc +.if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}-${OBJFORMAT}) +_startup_libs+= lib/csu/${MACHINE_ARCH}-${OBJFORMAT} +d675 1 +a675 1 +_startup_libs+= lib/csu/${MACHINE_ARCH} +d678 4 +a681 6 +_prebuild_libs= + +_generic_libs= gnu/lib + +.if !defined(NOPERL) +_generic_libs+= gnu/usr.bin/perl/libperl +a682 7 + +.if !defined(NOCRYPT) && defined(MAKE_KERBEROS5) +_prebuild_libs+= kerberos5/lib/libasn1 +_prebuild_libs+= kerberos5/lib/libgssapi +_prebuild_libs+= kerberos5/lib/libkrb5 +_prebuild_libs+= kerberos5/lib/libroken +_generic_libs+= kerberos5/lib +d686 1 +a686 3 +_prebuild_libs+= kerberosIV/lib/libkrb +kerberosIV/lib/libkrb__L: lib/libcrypt__L +_generic_libs+= kerberosIV/lib +d689 3 +a691 4 +_prebuild_libs+= lib/libcom_err lib/libcrypt lib/libmd \ + lib/libncurses lib/libopie lib/libradius lib/libskey \ + lib/libtacplus lib/libutil \ + lib/libz lib/msun +d693 2 +a694 11 +lib/libopie__L lib/libradius__L lib/libtacplus__L: lib/libmd__L +lib/libskey__L: lib/libcrypt__L lib/libmd__L + +_generic_libs+= lib + +.if !defined(NOCRYPT) && !defined(NOSECURE) +.if !defined(NO_OPENSSL) +_prebuild_libs+= secure/lib/libcrypto +.if !defined(NO_OPENSSH) +_prebuild_libs+= secure/lib/libssh +secure/lib/libssh__L: secure/lib/libcrypto__L lib/libz__L +a695 5 +.endif +_generic_libs+= secure/lib +.endif + +_generic_libs+= usr.bin/lex/lib +d698 1 +a698 1 +_generic_libs+= usr.sbin/pcvt/keycap +d701 6 +a706 2 +.for _lib in ${_startup_libs} ${_prebuild_libs} ${_generic_libs} +${_lib}__L: .PHONY +a713 4 + +_startup_libs: ${_startup_libs:S/$/__L/} +_prebuild_libs: ${_prebuild_libs:S/$/__L/} +_generic_libs: ${_generic_libs:S/$/__L/} +@ + + +1.141.2.54 +log +@MFC: cross-release support. + +Assorted fixes: + +- Changed the way the `catpages' dist is built (all MD catpages + were missing before). + +- Perl manpages now end up in the `manpage' dist. + +- Clean up the `dict' dist generation script. + +- Diff reduction to -CURRENT. +@ +text +@a109 4 +.if defined(SUBDIR_OVERRIDE) +SUBDIR= ${SUBDIR_OVERRIDE} +.endif + +d242 1 +a242 1 +_worldtmp: +a260 1 +_bootstrap-tools: +a265 1 +_cleanobj: +a272 1 +_obj: +a277 1 +_build-tools: +a282 1 +_cross-tools: +a287 1 +_includes: +a292 1 +_libraries: +a297 1 +_depend: +a302 1 +everything: +d309 5 +a313 13 + +WMAKE_TGTS= +.if !defined(SUBDIR_OVERRIDE) +WMAKE_TGTS+= _worldtmp _bootstrap-tools +.endif +WMAKE_TGTS+= _cleanobj _obj _build-tools +.if !defined(SUBDIR_OVERRIDE) +WMAKE_TGTS+= _cross-tools +.endif +WMAKE_TGTS+= _includes _libraries _depend everything + +buildworld: ${WMAKE_TGTS} +.ORDER: ${WMAKE_TGTS} +a332 4 +# distributeworld +# +# Distributes everything compiled by a `buildworld'. +# +d337 1 +a337 1 +distributeworld installworld: installcheck +d340 1 +a340 1 + ln make makewhatis mtree mv perl pwd_mkdb rm sed sh sysctl \ +d344 1 +a344 1 + cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//} +d364 1 +a364 1 +.if !defined(NOMAN) && !defined(NO_MAKEDB_RUN) +d372 8 +a379 5 +redistribute: + @@echo "--------------------------------------------------------------" + @@echo ">>> Distributing everything.." + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute +d473 4 +a476 1 +installkernel reinstallkernel: +d478 8 +a485 1 + ${CROSSENV} ${MAKE} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel$//} +a606 4 +.if defined(RELEASEDIR) +_sysinstall= release/sysinstall +.endif + +d610 1 +a610 1 + usr.bin/awk usr.bin/file ${_sysinstall} +d626 2 +a627 3 +.for _tool in ${_btxld} ${_elf2exe} usr.bin/genassym usr.bin/gensetdefs \ + gnu/usr.bin/binutils usr.bin/objformat usr.sbin/crunch/crunchide \ + gnu/usr.bin/cc +@ + + +1.141.2.55 +log +@MFC: 1.289: Added uudecode(1) to the list of bootstrap tools, +now that we have *.bz2.uu files under lib/compat/compat22. +@ +text +@d579 1 +a579 2 +.for _tool in ${_strfile} usr.bin/yacc usr.bin/colldef \ + usr.bin/uudecode usr.bin/xinstall \ +@ + + +1.141.2.56 +log +@MFC rev 1.303: Similar to bsd.subdir.mk, echo the name of the dir before +doing the cd. + +Approved by: sheldonh (mentor) +@ +text +@d583 1 +a583 2 + ${ECHODIR} "===> ${_tool}"; \ + cd ${.CURDIR}/${_tool}; \ +d628 1 +a628 2 + ${ECHODIR} "===> ${_tool}"; \ + cd ${.CURDIR}/${_tool}; ${MAKE} DIRPRFX=${_tool}/ build-tools +d646 1 +a646 2 + ${ECHODIR} "===> ${_tool}"; \ + cd ${.CURDIR}/${_tool}; \ +d736 1 +a736 2 + ${ECHODIR} "===> ${_lib}"; \ + cd ${.CURDIR}/${_lib}; \ +@ + + +1.141.2.57 +log +@MFC: KERNCONFDIR. + +Prodded by: Oleg Sharoiko +@ +text +@a427 1 +KERNCONFDIR?= ${KRNLCONFDIR} +d432 1 +a432 1 +.if exists(${KERNCONFDIR}/${_kernel}) +d466 1 +a466 2 + config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \ + ${KERNCONFDIR}/${_kernel} +@ + + +1.141.2.58 +log +@Add libssl to _prebuild_libs, since libfetch needs it. This unbreaks world. +@ +text +@d723 1 +a723 1 +_prebuild_libs+= secure/lib/libcrypto secure/lib/libssl +@ + + +1.141.2.59 +log +@MFC: Add -DNOMAN to the list. +@ +text +@a9 1 +# -DNOMAN do not build the manual pages +@ + + +1.141.2.60 +log +@MFC: 1.319: Ensure that build-tools end up in the correct object directory. + +Approved by: re +@ +text +@d633 1 +a633 3 + cd ${.CURDIR}/${_tool}; \ + ${MAKE} DIRPRFX=${_tool}/ obj; \ + ${MAKE} DIRPRFX=${_tool}/ build-tools +@ + + +1.141.2.61 +log +@Doh, committed to the wrong branch. + +Spotted by: johan +@ +text +@d365 1 +a365 2 + for prog in [ awk cap_mkdb cat chflags chmod chown \ + date echo egrep find grep \ +@ + + +1.141.2.62 +log +@Grab a copy of mkdir for doing the installworld. The calendar MFC needs +this. + +Reviewed by: ru +@ +text +@d367 1 +a367 1 + ln make makewhatis mkdir mtree mv perl pwd_mkdb rm sed sh sysctl \ +@ + + +1.141.2.63 +log +@MFC: Use 'id' instead of 'grep' to detect the presence of the smmsp user/group. + This fixes the check for users with smmsp in NIS instead of their local + files. + + Revision Changes Path + 1.376 +2 -2 src/Makefile.inc1 +@ +text +@d344 1 +a344 1 + @@if ! `id -u smmsp > /dev/null`; then \ +d348 1 +a348 1 + @@if ! `id -g smmsp > /dev/null`; then \ +@ + + +1.141.2.64 +log +@Perl is no longer needed for installworld, but makewhatis(1) is now a +bootstrap tool. Also fix a NOPERL nit: PERL5LIB is not needed in the +cross-build environment if NOPERL is defined. +@ +text +@d181 1 +a185 4 +.if !defined(NOPERL) +CROSSENV+= PERL5LIB=${WORLDTMP}/usr/libdata/perl/5.00503 +.endif + +d367 1 +a367 1 + ln make makewhatis mkdir mtree mv pwd_mkdb rm sed sh sysctl \ +d584 1 +a584 1 + usr.bin/makewhatis usr.bin/uudecode usr.bin/xinstall \ +@ + + +1.141.2.65 +log +@MFC: 1.324: "cvs update" with -R. +@ +text +@d537 1 +a537 1 + cd ${.CURDIR}; cvs -R -q update -rRELENG_4 -P -d +@ + + +1.141.2.66 +log +@MFC: 1.313: Use fresh tools in installkernel, if available. + 1.416: Create hierarchy before installing a new kernel. +@ +text +@a502 9 + @@echo "--------------------------------------------------------------" + @@echo ">>> Making hierarchy" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}; \ + ${CROSSENV} PATH=${TMPPATH} ${MAKE} -f Makefile.inc1 hierarchy + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Installing kernel" + @@echo "--------------------------------------------------------------" +d504 1 +a504 2 + ${CROSSENV} PATH=${TMPPATH} \ + ${MAKE} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel$//} +@ + + +1.141.2.67 +log +@MFC: 1.414, 1.415: Fixed the essential GID checks. + +Prodded by: gshapiro +@ +text +@d345 1 +a345 2 +CHECK_UIDS= +CHECK_GIDS= +d347 2 +a348 7 +CHECK_UIDS+= smmsp +CHECK_GIDS+= smmsp +.endif +installcheck: +.for uid in ${CHECK_UIDS} + @@if ! `id -u ${uid} >/dev/null 2>&1`; then \ + echo "ERROR: Required ${uid} user is missing, see /usr/src/UPDATING."; \ +d351 2 +a352 4 +.endfor +.for gid in ${CHECK_GIDS} + @@if ! `find / -prune -group ${gid} >/dev/null 2>&1`; then \ + echo "ERROR: Required ${gid} group is missing, see /usr/src/UPDATING."; \ +d355 1 +a355 1 +.endfor +@ + + +1.141.2.68 +log +@Do not run "make hierarchy" when installing kernel but *not* installing +modules, allowing in particular /usr to be mounted read-only. This +change won't be MFS'ed, because semantics of installing modules in 5.x +is slightly different from 4.x. + +PR: 68150 +@ +text +@a510 2 +.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KRNLSRCDIR}/modules) + @@echo +a515 1 +.endif +@ + + +1.141.2.69 +log +@MFC: +Makefile.inc1 1.361 +bin/ed/Makefile 1.22 +lib/Makefile 1.157 +lib/libcrypt/Makefile 1.31 +lib/libfetch/Makefile 1.41 +lib/libpam/modules/modules.inc 1.17 +libexec/Makefile 1.61 +share/examples/etc/make.conf 1.215 +share/man/man5/make.conf.5 1.73 +usr.bin/Makefile 1.239 +usr.bin/fetch/Makefile 1.14 +usr.sbin/pkg_install/Makefile 1.14 +usr.sbin/pkg_install/add/Makefile 1.17 +usr.sbin/pkg_install/info/Makefile 1.17 +usr.sbin/pkg_install/version/Makefile 1.12 +usr.sbin/ppp/Makefile 1.95, 1.96 +usr.sbin/pppd/Makefile 1.25 +usr.sbin/sendmail/Makefile 1.40 +usr.sbin/tcpdump/tcpdump/Makefile 1.36 + +Retire the useless NOSECURE knob. + +The motivation for this MFC is that MAKE_KERBEROS4 and MAKE_KERBEROS5 +are meant to be buildable by various makefiles when NOSECURE is set but +this was broken because Kerberos depends on e.g. des(3) from OpenSSL +which wasn't built when NOSECURE was defined. Fixing the NOSECURE knob +however would have meant to make it do the same as the NOCRYPT knob. +If you had been using the NOSECURE build knob please now use the NOCRYPT +knob instead. + +Discussed with: ru (some months ago) +Reviewed by: ru (some months ago) +Approved by: markm (telnet and secure bits, some months ago), kensmith (re) +@ +text +@d12 1 +d80 1 +a80 1 +.if exists(${.CURDIR}/secure) && !defined(NOCRYPT) +d749 1 +a749 1 +.if !defined(NOCRYPT) +@ + + +1.141.2.70 +log +@MFC: 1.362 +Unbreak world build if NO_OPENSSL is defined but MAKE_KERBEROS4 or +MAKE_KERBEROS5 are. + +Reviewed by: ru (some months ago) +Approved by: markm (telnet and secure bits, some months ago) +@ +text +@d638 1 +a638 1 + !defined(NOCRYPT) && !defined(NO_OPENSSL) && defined(MAKE_KERBEROS4) +d643 1 +a643 1 + !defined(NOCRYPT) && !defined(NO_OPENSSL) && defined(MAKE_KERBEROS5) +d724 1 +a724 1 +.if !defined(NOCRYPT) && !defined(NO_OPENSSL) && defined(MAKE_KERBEROS5) +d732 1 +a732 1 +.if !defined(NOCRYPT) && !defined(NO_OPENSSL) && defined(MAKE_KERBEROS4) +@ + + +1.141.2.70.2.1 +log +@Update tag used when doing a cvs update. + +Reminded by: ru +Approved by: re (implicit) +@ +text +@d557 1 +a557 1 + cd ${.CURDIR}; cvs -R -q update -rRELENG_4_11 -P -d +@ + + +1.141.2.67.2.1 +log +@Update for 4.10 + +Approved by: re +@ +text +@d555 1 +a555 1 + cd ${.CURDIR}; cvs -R -q update -rRELENG_4_10 -P -d +@ + + +1.141.2.63.2.1 +log +@Version bump -- 'make update' should check out RELENG_4_9 here. +@ +text +@d534 1 +a534 1 + cd ${.CURDIR}; cvs -q update -rRELENG_4_9 -P -d +@ + + +1.141.2.61.2.1 +log +@"make update" on a release branch should update to that release branch +(RELENG_4_8 here). + +Approved by: re +@ +text +@d534 1 +a534 1 + cd ${.CURDIR}; cvs -q update -rRELENG_4_8 -P -d +@ + + +1.141.2.56.2.1 +log +@The "update" target should track RELENG_4_7 here. + +Approved by: re +@ +text +@d530 1 +a530 1 + cd ${.CURDIR}; cvs -q update -rRELENG_4_7 -P -d +@ + + +1.141.2.56.2.2 +log +@Add touch to bootstap-tools. It appears to be necessary in order +to make release RELENG_4_7 on later 4.x or 5.x systems. +@ +text +@d580 1 +a580 1 + usr.bin/uudecode usr.bin/xinstall usr.bin/touch \ +@ + + +1.141.2.39.2.1 +log +@The update target should track RELENG_4_5, as we do on the RELENG_4_4 +branch. + +Submitted by: jeh +@ +text +@d516 1 +a516 1 + cd ${.CURDIR}; cvs -q update -rRELENG_4_5 -P -d +@ + + +1.141.2.31.2.1 +log +@As discussed in a number of different forums, make updating target be +for the 4.4 branch instead of the 4 branch. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.141.2.31 2001/08/17 22:47:13 obrien Exp $ +d511 1 +a511 1 + cd ${.CURDIR}; cvs -q update -rRELENG_4_4 -P -d +@ + + +1.140 +log +@A lot of tools need to be built before compilation proper can happen. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.139 2000/02/24 23:03:16 markm Exp $ +d60 1 +a60 1 + !defined(NOCRYPT) && defined(MAKE_KERBEROS4) +d64 1 +a64 1 + !defined(NOCRYPT) && defined(MAKE_KERBEROS5) +d206 1 +a206 1 +.if !defined(NOSECURE) && exists(${.CURDIR}/secure) && \ +@ + + +1.139 +log +@We have a new world order in libraries. + +Goodbye libdes; Welcome libcrypto. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.138 2000/02/20 09:13:30 jkh Exp $ +d518 2 +a519 1 +_libroken5= kerberos5/lib/libroken +d524 1 +a524 1 + ${_libroken4} ${_libroken5} lib/libncurses ${_share} +@ + + +1.138 +log +@Docfix: Note krb5 flags. + +PR: 16818 +Submitted by: martti.kuparinen@@nomadiclab.com +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.137 2000/02/03 09:43:17 ru Exp $ +a587 1 + cd ${.CURDIR}/secure/lib/libdes; ${MAKE} beforeinstall +d662 2 +a663 2 +# libpam: libcom_err libcrypt libdes libgcc_pic libkrb libradius libskey \ +# libtacplus libutil +d675 2 +a676 1 +# lib/libpam: secure/lib/libdes kerberosIV/lib/libkrb gnu/lib/libgcc +d716 1 +a716 1 + lib/libradius lib/libskey lib/libtacplus lib/libutil lib gnu/lib \ +@ + + +1.137 +log +@Now that bsd.lib.mk has PRECIOUSLIB feature back (rev 1.91), +we need -DNOFSCHG at stage 4 (building libraries) to support +non-root buildworlds. + +Reviewed by: +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.136 2000/01/30 20:57:58 obrien Exp $ +d6 1 +@ + + +1.136 +log +@The readline includes handling was moved down a level in +src/gnu/libreadline -- reflect that change here. + +Ok'ed by: JKH +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.135 2000/01/29 08:39:07 imp Exp $ +d275 1 +a275 1 + cd ${.CURDIR}; ${WMAKE} -DNOHTML -DNOINFO -DNOMAN libraries +@ + + +1.135 +log +@Back out 1.134. It works from 3.3R, but breaks cross compilation for too +little gain. I'll work out the issues after 4.0R is out. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.134 2000/01/28 21:15:24 imp Exp $ +d577 1 +a577 1 + cd ${.CURDIR}/gnu/lib/libreadline; ${MAKE} beforeinstall +@ + + +1.134 +log +@Remove Fortran from build tools. It isn't needed to build the system +and costs us an extra 2% to build it for no reason. It may break +building cross compilation environments for fortran, but that isn't +officially supported at this time anyway (also, the % of our user base +that would use that is < .001% imho). This does't break fortran (it +is built again later anyway). + +Reviewed by: obrien +Tested by: make buildworld and make buildworld -DNOCLEAN +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.133 2000/01/24 20:11:53 markm Exp $ +d506 4 +d521 1 +a521 1 +.for _tool in bin/sh ${_games} gnu/usr.bin/cc/cc_tools \ +@ + + +1.133 +log +@Build Kerberos5 if the correct macro is set. This is not for the +faint_hearted; serious hackers only! +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.132 2000/01/19 04:03:48 kris Exp $ +a505 4 +.if !defined(NO_FORTRAN) +_fortran= gnu/usr.bin/cc/f771 +.endif + +d517 1 +a517 1 +.for _tool in bin/sh ${_games} gnu/usr.bin/cc/cc_tools ${_fortran} \ +@ + + +1.132 +log +@Require USA_RESIDENT to be 'NO' or 'YES' if building secure/ + +Reviewed by: marcel +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.131 2000/01/18 11:00:24 ru Exp $ +d62 4 +d512 6 +a517 1 +_libroken= kerberosIV/lib/libroken +d522 1 +a522 1 + ${_libroken} lib/libncurses ${_share} +d603 10 +d674 1 +a674 1 +# kerberosIV/lib: lib/libcrypt +d694 4 +d714 3 +a716 3 + gnu/lib/libgcc lib/libcom_err ${_libm} lib/libncurses lib/libradius \ + lib/libskey lib/libtacplus lib/libutil lib gnu/lib ${_libperl} \ + usr.bin/lex/lib ${_libkeycap} +@ + + +1.131 +log +@Finally resolve the texinfo issue by moving it +from the cross-tools to the bootstrap-tools. + +Requested by: bde, marcel +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.130 2000/01/18 07:26:20 ru Exp $ +d201 12 +@ + + +1.130 +log +@For some reason compiler should be the last in the list of cross-tools. +Unbroke the world by moving gnu/usr.bin/texinfo before gnu/usr.bin/cc. + +Submitted by: Jim Bloom +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.129 2000/01/17 15:33:34 ru Exp $ +d470 2 +a471 1 +.for _tool in ${_strfile} usr.bin/yacc usr.bin/colldef usr.sbin/config +d534 1 +a534 2 + usr.bin/gensetdefs gnu/usr.bin/binutils gnu/usr.bin/texinfo \ + usr.bin/objformat gnu/usr.bin/cc +@ + + +1.129 +log +@Add gnu/usr.bin/texinfo to the list of cross-tools. +We need an up-to-date `makeinfo' and `install-info' +at `world' and `install' stages. + +Pointed out by: bde +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.128 2000/01/12 14:33:00 marcel Exp $ +d533 2 +a534 2 + usr.bin/gensetdefs gnu/usr.bin/binutils usr.bin/objformat gnu/usr.bin/cc \ + gnu/usr.bin/texinfo +@ + + +1.128 +log +@Add gross hack to work around bogus dependency information created +by gnu/usr.bin/cc/cc_tools/Makefile. This bug is painfully visible +when making buildworld with -DNOCLEAN. This work around is beyond +dirty... +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.127 2000/01/12 10:00:36 marcel Exp $ +d533 2 +a534 1 + usr.bin/gensetdefs gnu/usr.bin/binutils usr.bin/objformat gnu/usr.bin/cc +@ + + +1.127 +log +@Fix broken installkernel target. Don't use the WMAKE context to +install; use the IMAKE context. + +Reported by: sheldonh +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.126 2000/01/11 16:23:51 marcel Exp $ +d212 3 +@ + + +1.126 +log +@Revert gratuitous change in rev. 1.123 which broke building world +as non-root. + +Breakage caused by: green +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.125 2000/01/11 13:19:57 obrien Exp $ +d378 1 +a378 1 + ${WMAKEENV} MACHINE=${MACHINE} ${MAKE} install +@ + + +1.125 +log +@Remove Bison from "bootstrap-tools" as we don't use it to build anything +in /usr/src/ anymore. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.124 2000/01/11 12:51:51 green Exp $ +d145 1 +d163 1 +d176 1 +@ + + +1.124 +log +@This is the second half of unbreaking the world build. Add a -DNOHTML +corollary for -DNOINFO and -DNOMAN. I'll fix this properly (add +specific HTML doc magic) in the .mk files later; right now, just +unbreak the world. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.123 2000/01/11 10:44:37 marcel Exp $ +d464 1 +a464 2 +.for _tool in ${_strfile} usr.bin/yacc usr.bin/colldef usr.sbin/config \ + gnu/usr.bin/bison +@ + + +1.123 +log +@Add the -r flag to CONFIGARGS instead of assigning to it so that +it's more easy to build a kernel with debugging information. + +Suggested by: sheldonh +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.122 2000/01/09 17:56:40 marcel Exp $ +a144 1 + INSTALL="sh ${.CURDIR}/tools/install.sh" \ +d158 1 +a158 1 +BMAKE= ${BMAKEENV} ${MAKE} -f Makefile.inc1 -DNOMAN -DNOINFO +a161 1 + INSTALL="sh ${.CURDIR}/tools/install.sh" \ +d168 1 +a168 1 +XMAKE= ${XMAKEENV} ${MAKE} -f Makefile.inc1 -DNOMAN -DNOINFO \ +a173 1 + INSTALL="sh ${.CURDIR}/tools/install.sh" \ +d253 1 +a253 1 + cd ${.CURDIR}; ${WMAKE} -DNOINFO -DNOMAN libraries +@ + + +1.122 +log +@Add a buildkernel and an installkernel target. With these targets +users can more easily upgrade. + +buildworld now makes usr.sbin/config in bootstrap-tools so that +when you first make buildworld, buildkernel will use config(8) +from the temp. world tree (and of course also the compiler). + +Which kernel to built is determined by the KERNEL variable. You +can have as many kernels listed as you like. When a config file +exists for the given MACHINE it will be built. When KERNEL has +not been defined it will be set to "GENERIC GENERIC98". + +The first valid kernel named in the list will be used by the +installkernel target. + +When NOCLEAN is defined the kernel object directory is *not* +removed by config first. This is in line with normal buildworld +behaviour. + +The buildkernel target makes aicasm in sys/dev/aic7xxx first and +unconditionally. This hack allows us to cross-build kernels and +can go away when the problem is solved in a structural way. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.121 2000/01/04 14:12:12 marcel Exp $ +d335 1 +a335 1 +CONFIGARGS= -r +@ + + +1.121 +log +@Add btxld to the list of cross-tools on machines that don't have it +natively (ie non-i386 architectures). +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.120 1999/12/30 10:31:21 markm Exp $ +d308 73 +d467 2 +a468 1 +.for _tool in ${_strfile} usr.bin/yacc usr.bin/colldef gnu/usr.bin/bison +@ + + +1.120 +log +@Grrrr... This was supoosed to go with the commit to kerberosIV/.../libroken's +Makefile. + +Fix make world by building appropriate build-tools. + +Submitted by: marcel +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.119 1999/12/29 14:47:00 obrien Exp $ +d446 4 +d456 2 +a457 2 +.for _tool in ${_aout_tools} ${_elf2exe} usr.bin/genassym usr.bin/gensetdefs \ + gnu/usr.bin/binutils usr.bin/objformat gnu/usr.bin/cc +@ + + +1.119 +log +@Restore changes I spammed. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.118 1999/12/29 14:42:41 obrien Exp $ +d417 5 +d424 1 +a424 1 + lib/libncurses ${_share} +@ + + +1.118 +log +@Allow the specification of a prefix for gcc to find all the various bits. +If one wishes to anchor the compiler toolchain tree somewhere other than /, +all one needs to do is set "TOOLS_PREFIX" to a different rooting. + +Submitted by: marcel (in a different format and reworked by me) +@ +text +@d2 1 +a2 1 +# $FreeBSD$ +d477 1 +d479 1 +d481 1 +d483 1 +@ + + +1.117 +log +@Only make beforeinstall in libcrypto/libssl if they actually exist. I haven't +imported these on Freefall yet for the reasons previously explained. + +Noticed by: asami +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.116 1999/12/29 13:57:31 asami Exp $ +d147 1 +a476 1 +.if exists(${.CURDIR}/secure/lib/libcrypto) +a477 1 +.endif +a478 1 +.if exists(${.CURDIR}/secure/lib/libssl) +a479 1 +.endif +@ + + +1.116 +log +@Oops, the previous commit was bogus. I shouldn't commit something without +reading all my mail. + +I still don't understand why this was was committed on freefall before +the libcrypto and libssl subdirectories were imported on freefall though. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.115 1999/12/29 13:33:54 asami Exp $ +d476 1 +d478 1 +d480 1 +d482 1 +@ + + +1.115 +log +@Typo (libcrypto -> libcrypt). +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.114 1999/12/28 16:22:50 kris Exp $ +d476 1 +a476 1 + cd ${.CURDIR}/secure/lib/libcrypt; ${MAKE} beforeinstall +@ + + +1.114 +log +@Build openssl properly during make world. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.113 1999/12/23 19:18:28 marcel Exp $ +d476 1 +a476 1 + cd ${.CURDIR}/secure/lib/libcrypto; ${MAKE} beforeinstall +@ + + +1.113 +log +@Don't build caesar as a tool. fortune(6) doesn't depend on it +anymore. Update comments and variable names as well to wipe out any +traces that may confuse people in the future. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.112 1999/12/23 11:25:34 marcel Exp $ +d190 2 +a191 1 +INCDIRS= arpa g++/std objc protocols readline rpc rpcsvc security ss +d476 1 +d478 1 +@ + + +1.112 +log +@Revert previous commit, and + +o Add genassym to the list of cross-tools +o Remove sh hashing work-around, we don't need it anymore +o Clean more directories in WORLDTMP when NOCLEAN is specified + +The sh hashing work-around is not needed anymore, because we don't +trigger the bug anymore. + +When NOCLEAN is not defined, we wipe out the complete WORLDTMP, +including the object directories of the tools we have built. When +NOCLEAN is defined, we remove anything that we install anyway, which +is usr/bin, usr/games, usr/include, usr/lib and usr/sbin. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.111 1999/12/22 20:27:45 ache Exp $ +d117 1 +a117 1 +# /usr/games added for fortune which depend on strfile and caesar. +d388 1 +a388 1 +_games_tools= games/caesar games/fortune/strfile +d392 1 +a392 1 +.for _tool in ${_games_tools} usr.bin/yacc usr.bin/colldef gnu/usr.bin/bison +@ + + +1.111 +log +@Add ${WORLDTMP}/sbin to ${STRICTTMPPATH} - sysctl not found otherwise +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.110 1999/12/20 10:32:11 marcel Exp $ +d118 1 +a118 1 +STRICTTMPPATH= ${WORLDTMP}/sbin:${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games +d206 3 +a208 1 + rm -rf ${WORLDTMP}/usr/bin +a222 4 +.if !empty(.MAKEFLAGS:M-j) + # Work-around for broken sh(1) hashing. + -hash -r +.endif +d445 1 +a445 1 +.for _tool in ${_aout_tools} ${_elf2exe} usr.bin/gensetdefs \ +@ + + +1.110 +log +@o make SHARED=symlinks a caller defined instead of a callee defined + property. This fixes the includes target when DESTDIR is empty. +o Do not make build-tools for f771 when NO_FORTRAN is defined. +o Add new build stage. See below. +o Change banners so that staging information is displayed. + +The addition of the build-tools target broke the upgrade path because +we couldn't make use of previously built tools that were made for +compatibility reasons. Doing so would also result in the cross-compiler +being used and that is exactly what had to be avoided. + +This is solved by designating the bootstrap-tools stage for building +anything that is needed for compatibility only and to create a new +stage (started after the build-tools stage) that handles cross-tools +building. We now have the following stages: +1. bootstrap-tools (for compatibility issues only) +2. build-tools +3. cross-tools (what it says) +4. world +5. install + +Stages 1-4 (inclusive) are handled by buildworld. +Stage 5 is handled by installworld. + +Any more stages and I'll join Nik in his quest for the +holy grail^W^Wworld :-) +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.109 1999/12/17 11:23:56 marcel Exp $ +d118 1 +a118 1 +STRICTTMPPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games +@ + + +1.109 +log +@Don't build usr.sbin/pcvt/keycap on anything other than i386 when +building the libraries target. pcvt is i386 specific. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.108 1999/12/16 13:47:34 marcel Exp $ +d121 23 +a143 2 +# bootstrap make +BMAKEENV= MAKEOBJDIRPREFIX=${WORLDTMP} \ +a145 1 + TARGET_ARCH=${MACHINE_ARCH} \ +a147 2 +BMAKE= ${BMAKEENV} ${MAKE} -f Makefile.inc1 -DNOMAN -DNOINFO \ + -DNO_FORTRAN -DNO_GDB +d149 12 +a160 1 +# script/tool make +d162 2 +a163 1 + INSTALL="sh ${.CURDIR}/tools/install.sh" +d166 5 +a170 4 +CROSSENV= COMPILER_PATH=${WORLDTMP}/usr/libexec:${WORLDTMP}/usr/bin \ + LIBRARY_PATH=${WORLDTMP}${SHLIBDIR}:${WORLDTMP}/usr/lib \ + OBJFORMAT_PATH=${WORLDTMP}/usr/libexec \ + PERL5LIB=${WORLDTMP}/usr/libdata/perl/5.00503 +d172 2 +a173 3 +# cross make used for compilation +XMAKEENV= MAKEOBJDIRPREFIX=${OBJTREE} \ + ${CROSSENV} \ +d177 1 +a177 1 +XMAKE= ${XMAKEENV} ${MAKE} -f Makefile.inc1 +d179 2 +a180 3 +# cross make used for final installation +IMAKEENV= MAKEOBJDIRPREFIX=${OBJTREE} \ + ${CROSSENV} +d218 1 +a218 1 + @@echo ">>> Rebuilding bootstrap tools" +d228 1 +a228 1 + @@echo ">>> Cleaning up the object tree" +d234 1 +a234 1 + @@echo ">>> Rebuilding the object tree" +d239 1 +a239 1 + @@echo ">>> Rebuilding build tools" +d244 6 +a249 1 + @@echo ">>> Rebuilding ${WORLDTMP}/usr/include" +d251 1 +a251 1 + cd ${.CURDIR}; ${XMAKE} includes +d254 1 +a254 1 + @@echo ">>> Building libraries" +d256 1 +a256 1 + cd ${.CURDIR}; ${XMAKE} -DNOINFO -DNOMAN libraries +d259 1 +a259 1 + @@echo ">>> Rebuilding dependencies" +d261 1 +a261 1 + cd ${.CURDIR}; ${XMAKE} par-depend +d264 1 +a264 1 + @@echo ">>> Building everything.." +d266 1 +a266 1 + cd ${.CURDIR}; ${XMAKE} all +d272 1 +a272 1 + cd ${.CURDIR}; ${XMAKE} all +d387 1 +a387 12 +# bootstrap-tools - Build tools needed to run the actual build. +# +# WARNING: Because the bootstrap tools are expected to run on the +# build-machine, MACHINE_ARCH is *always* set to BUILD_ARCH when this +# target is being made. TARGET_ARCH is *always* set to reflect the +# target-machine (which you can set by specifying MACHINE_ARCH on +# make's command-line, get it?). +# The reason is simple: we build these tools not to be run on the +# architecture we're cross-building, but on the architecture we're +# currently building on (ie the host-machine) and we expect these +# tools to produce output for the architecture we're trying to +# cross-build. +a392 9 +# XXX - MACHINE should actually be TARGET. But we don't set that... +.if ${TARGET_ARCH} == "i386" && ${MACHINE} == "pc98" +_aout_tools= usr.bin/size usr.bin/strip gnu/usr.bin/as gnu/usr.bin/ld +.endif + +.if ${TARGET_ARCH} == "alpha" && ${MACHINE_ARCH} != "alpha" +_elf2exe= usr.sbin/elf2exe +.endif + +d394 1 +a394 3 +.for _tool in ${_games_tools} ${_aout_tools} ${_elf2exe} usr.bin/gensetdefs \ + gnu/usr.bin/binutils usr.bin/objformat usr.bin/yacc usr.bin/colldef \ + gnu/usr.bin/bison gnu/usr.bin/cc +d403 1 +a403 1 +# build-tools +d413 4 +d418 1 +a418 1 +.for _tool in bin/sh ${_games} gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/f771 \ +d424 33 +d466 1 +a466 1 + cd ${.CURDIR}/include; ${MAKE} SHARED=symlinks -B all install +@ + + +1.108 +log +@o Add games/caesar to the list of bootstrap-tools so that a + buildworld doesn't break because the host doesn't have any + games installed, +o Add a new build stage: TMAKE. TMAKE builds all the build-tools + targets in the respective makefiles. Note that these targets + don't use the bootstrap tools, +o Add elf2exe to the bootstrap-tools when cross-building Alpha on + other platforms, +o Add ${WORLDTMP}/usr/games to TMPPATH, +o Remove ${WORLDTMP}/usr/bin even when NOCLEAN is defined. This + prevents using any bootstrap-tools previously installed. Most + importantly, it prevents using the cross-compiler when we still + need the native compiler. + +The current stages are BMAKE, TMAKE, XMAKE and IMAKE in that order. +BMAKE builds bootstrap-tools that either solve compatibility problems + or are needed as cross-tools, +TMAKE builds the support tools necessary by some parts in the source + tree and also performs the cleandir and par-obj targets, +XMAKE builds the includes, libraries and everything (resp.), and +IMAKE installs the world. This stage needs further work if it's to be + used to install -current over -stable for example. + +This is the last major update towards cross-building. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.107 1999/12/16 01:21:48 billf Exp $ +d532 4 +d540 1 +a540 1 + usr.bin/lex/lib usr.sbin/pcvt/keycap +@ + + +1.107 +log +@It is possible for someone to want to 'make update' wht SUPFILE not defined +while SUPFILE1 or PORTSSUPFILE are defined. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.106 1999/12/12 22:24:08 marcel Exp $ +d109 1 +d117 2 +a118 1 +STRICTTMPPATH= ${WORLDTMP}/bin:${WORLDTMP}/usr/bin +d121 1 +a121 1 +# bootstrap/tools make +d131 5 +d139 1 +a139 2 + PERL5LIB=${WORLDTMP}/usr/libdata/perl/5.00503 \ + MAKEOBJDIRPREFIX=${OBJTREE} +d142 2 +a143 1 +XMAKEENV= ${CROSSENV} \ +d150 2 +a151 1 +IMAKEENV= ${CROSSENV} +d155 1 +a155 1 + usr/libexec/${OBJFORMAT} usr/share/misc +d176 3 +a185 3 +.if defined(NOCLEAN) + rm -f ${WORLDTMP}/sys +.endif +d189 1 +a189 1 + @@echo ">>> Rebuilding tools" +d191 5 +a195 1 + cd ${.CURDIR}; ${BMAKE} tools +d201 1 +a201 1 + cd ${.CURDIR}; ${XMAKE} ${CLEANDIR:S/^/par-/} +d207 6 +a212 1 + cd ${.CURDIR}; ${XMAKE} par-obj +d353 12 +a364 1 +# tools - Build tools needed to run the actual build. +d367 1 +a367 1 +_strfile= games/fortune/strfile +d370 2 +a371 1 +.if ${MACHINE_ARCH} == "i386" && ${MACHINE} == "pc98" +d375 6 +a380 2 +tools:: +.for _tool in ${_strfile} ${_aout_tools} usr.bin/gensetdefs \ +d388 17 +@ + + +1.106 +log +@Add colldef to the list of tools. It's needed on older systems. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.105 1999/12/12 21:24:07 marcel Exp $ +d267 1 +d269 1 +@ + + +1.105 +log +@o Add gensetdefs to the list of tools. +o Don't set CFLAGS in the bootstrap env. It is very likely to be + overridden my any CFLAGS setting in /etc/make.conf. Setting it + here is almost useless. So far, it doesn't seem necessary. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.104 1999/12/12 03:54:58 nyan Exp $ +d346 2 +a347 2 + gnu/usr.bin/binutils usr.bin/objformat usr.bin/yacc gnu/usr.bin/bison \ + gnu/usr.bin/cc +@ + + +1.104 +log +@Build a.out tools if MACHINE_ARCH == i386 and MACHINE == pc98. +The boot2 for pc98 is still a.out program. + +I made the original patch, and many problems were fixed by Marcel Moolenaar. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.103 1999/12/11 17:05:36 marcel Exp $ +d127 1 +a127 1 + -DNO_FORTRAN -DNO_GDB -DNO_OBJC +a131 1 + CFLAGS="-nostdinc ${CFLAGS}" \ +d345 3 +a347 2 +.for _tool in ${_strfile} ${_aout_tools} gnu/usr.bin/binutils \ + usr.bin/objformat usr.bin/yacc gnu/usr.bin/bison gnu/usr.bin/cc +@ + + +1.103 +log +@Don't add MACHINE_ARCH to MAKEOBJDIRPREFIX when not cross-building. +This should fix make release. + +Reported by: jhay, phk +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.102 1999/12/10 16:13:41 marcel Exp $ +d150 4 +d341 4 +d346 2 +a347 2 +.for _tool in ${_strfile} gnu/usr.bin/binutils usr.bin/objformat \ + usr.bin/yacc gnu/usr.bin/bison gnu/usr.bin/cc +@ + + +1.102 +log +@o Don't make games/fortune/strfile if games does not exist or NOGAMES + has been defined. +o Make libraries before making depend. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.101 1999/12/10 11:24:06 marcel Exp $ +d110 3 +d114 1 +@ + + +1.101 +log +@Remove installworld related settings that I had as a safety-net and +for development. :-/ +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.100 1999/12/10 10:48:20 marcel Exp $ +d196 1 +a196 1 + @@echo ">>> Rebuilding dependencies" +d198 1 +a198 1 + cd ${.CURDIR}; ${XMAKE} par-depend +d201 1 +a201 1 + @@echo ">>> Building libraries" +d203 1 +a203 1 + cd ${.CURDIR}; ${XMAKE} -DNOINFO -DNOMAN libraries +d329 4 +d334 1 +a334 1 +.for _tool in games/fortune/strfile gnu/usr.bin/binutils usr.bin/objformat \ +@ + + +1.100 +log +@More cross-building related changes: +o Build tools before doing anything in or with the object tree. +o Tools don't use the object tree any more, but have there object + tree located in the temp. world. +o Use the proper make env. for cleaning and building the object tree. +o Don't create kernel include subdirectories in the temp. world. These + are removed later on and replaced by symlinks. +o Change the layout of the object tree: + +The temp. world now is /usr/obj/${MACHINE_ARCH}${.CURDIR}/${BUILD_ARCH}. +/usr/obj can be set/changed by using MAKEOBJDIRPREFIX, and {.CURDIR} +obviously depends on where the source tree is located. MACHINE_ARCH +is the arch. for which the world is to be build and BUILD_ARCH is the +arch. on which we are building. + +The object tree now is /usr/obj/${MACHINE_ARCH}${.CURDIR}. + +This allows concurrent cross-builds and allows the object tree to be +shared on different archs., each doing the same cross-build. This of +course assumes that the output on Alpha (for example) is the same as +the output of an Alpha cross-build on i386 (for example). + +The use of NOCLEAN is is still dangerous, but should be usable in many +more situations than before. It should now be possible to safely +restart an interrupted build with NOCLEAN without side-effects. Because +the tools don't share the object tree with the normal (cross-build), no +tools have to be rebuild. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.99 1999/12/09 16:40:25 marcel Exp $ +d140 1 +a140 3 +IMAKEENV= ${CROSSENV} \ + DESTDIR=/usr1/release \ + PATH=${STRICTTMPPATH} +@ + + +1.99 +log +@Don't make gdb, objc and f77 when building tools. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.98 1999/12/09 13:36:16 marcel Exp $ +d108 4 +a111 15 +# +# Define the location of the temporary installation directory. Note that +# MAKEOBJDIRPREFIX normally isn't defined so if the current directory is +# /usr/src, then the world temporary directory is /usr/obj/usr/src/tmp. +# +# During the transition from aout to elf format on i386, MAKEOBJDIRPREFIX +# is set by the parent makefile (Makefile.inc0) to be /usr/obj/${OBJFORMAT} +# in order to keep aout and elf format files apart. +# +.if defined(MAKEOBJDIRPREFIX) +WORLDTMP= ${MAKEOBJDIRPREFIX}${.CURDIR}/tmp +.else +WORLDTMP= /usr/obj${.CURDIR}/tmp +.endif + +d115 4 +a118 3 +BUILD_ARCH!= sysctl -n hw.machine_arch + +BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ +d122 2 +d125 1 +a125 1 +XMAKEENV= COMPILER_PATH=${WORLDTMP}/usr/libexec:${WORLDTMP}/usr/bin \ +d129 7 +a135 1 + PERL5LIB=${DESTDIR}/usr/libdata/perl/5.00503 \ +d137 1 +d139 5 +a143 3 +# bootstrap make +BMAKE= ${BMAKEENV} ${MAKE} DESTDIR=${WORLDTMP} -DNOMAN -DNOINFO \ + -DNO_FORTRAN -DNO_GDB -DNO_OBJC +d145 2 +a146 3 +# cross make used for compilation +XMAKE= ${XMAKEENV} ${MAKE} DESTDIR=${WORLDTMP} \ + INSTALL="sh ${.CURDIR}/tools/install.sh" +d148 1 +a148 2 +# cross make used for final installation +IXMAKE= ${XMAKEENV} ${MAKE} +a155 8 +USRDIRS= usr/bin usr/lib/compat/aout usr/games usr/libdata/ldscripts \ + usr/libexec/${OBJFORMAT} usr/share/misc + +INCDIRS= arpa cam/scsi g++/std isofs/cd9660 machine msdosfs net \ + netatalk netatm netgraph netinet netinet6 netipx netkey \ + netncp netns nfs ntfs nwfs objc pccard posix4 protocols \ + readline rpc rpcsvc security ss sys ufs/ffs ufs/mfs ufs/ufs vm + +d159 1 +a159 1 + @@echo ">>> Cleaning up the temporary build tree" +d161 1 +d163 1 +d170 3 +d174 5 +d184 1 +a184 1 + cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 ${CLEANDIR:S/^/par-/} +d190 1 +a190 6 + cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 par-obj + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Rebuilding tools" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 -DNOINFO -DNOMAN tools +d193 1 +a193 1 + @@echo ">>> Rebuilding ${DESTDIR}/usr/include" +d195 1 +a195 1 + cd ${.CURDIR}; ${XMAKE} -f Makefile.inc1 includes +d200 1 +a200 1 + cd ${.CURDIR}; ${XMAKE} -f Makefile.inc1 par-depend +d205 1 +a205 1 + cd ${.CURDIR}; ${XMAKE} -DNOINFO -DNOMAN -f Makefile.inc1 libraries +d210 1 +a210 1 + cd ${.CURDIR}; ${XMAKE} -f Makefile.inc1 all +d216 1 +a216 1 + cd ${.CURDIR}; ${XMAKE} -f Makefile.inc1 all +d224 1 +a224 1 + cd ${.CURDIR}; ${IXMAKE} -f Makefile.inc1 reinstall +a296 6 +#.if defined(MAKE_KERBEROS4) && !defined(NOCRYPT) +# cd ${.CURDIR}/kerberosIV; ${MAKE} most +#.endif +#.if !defined(NOSECURE) && !defined(NOCRYPT) +# cd ${.CURDIR}/secure; ${MAKE} most +#.endif +a315 6 +#.if defined(MAKE_KERBEROS4) && !defined(NOCRYPT) +# cd ${.CURDIR}/kerberosIV; ${MAKE} installmost +#.endif +#.if !defined(NOSECURE) && !defined(NOCRYPT) +# cd ${.CURDIR}/secure; ${MAKE} installmost +#.endif +d331 1 +a331 1 +tools: +d335 1 +d338 1 +a338 3 + ${MAKE} install; \ + ${MAKE} cleandir; \ + ${MAKE} obj +@ + + +1.98 +log +@Make sure the links to the source tree end up in the source tree. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.97 1999/12/09 10:45:09 marcel Exp $ +d141 3 +a143 1 +BMAKE= ${BMAKEENV} ${MAKE} DESTDIR=${WORLDTMP} -DNOMAN -DNOINFO +@ + + +1.97 +log +@o Add usr/lib/compat/aout to the temp world. This is needed by release. +o If you can't beat them, join them: use symlinks to populate the obj + tree. This avoids using mtree. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.96 1999/12/08 13:45:11 marcel Exp $ +d175 1 +@ + + +1.96 +log +@Restore the upgrade path from -stable to -current and prepare for +non-root cross-building. + +o Makefile.inc0 is not used anymore. +o The legacy aout build has been removed. +o Selectively build tools *before* building includes/libraries. +o Avoid using mtree to populate the obj tree. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.95 1999/11/25 20:05:07 julian Exp $ +d155 1 +a155 1 +USRDIRS= usr/bin usr/lib/compat usr/games usr/libdata/ldscripts \ +d365 1 +a365 1 + cd ${.CURDIR}/include; ${MAKE} -B all install +@ + + +1.95 +log +@Place netgraph entry into alphabetical position +along with the misplaced entries that it was next to. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.94 1999/11/24 06:04:11 obrien Exp $ +a4 1 +# -DCLOBBER will remove /usr/include +a7 1 +# -DNOTOOLS do not rebuild any tools first +a98 5 +OBJDIR= obj + +.if defined(NOCLEAN) +CLEANDIR= +.else +a103 10 +.endif + +.if !defined(NOCLEAN) +_NODEPEND= true +.endif +.if defined(_NODEPEND) +_DEPEND= cleandepend +.else +_DEPEND= depend +.endif +a108 13 +# While building tools for bootstrapping, we don't need to waste time on +# shared or profiled libraries, shared linkage, or documentation, except +# when the tools won't get cleaned we must use the defaults for shared +# libraries and shared linkage (and this doesn't waste time). +# XXX actually, we do need to waste time building shared libraries. +# +.if defined(NOCLEAN) +MK_FLAGS= -DWORLD -DNOINFO -DNOMAN -DNOPROFILE +.else +MK_FLAGS= -DWORLD -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED +.endif + +# +d123 1 +a123 22 +# +# Define the PATH to the build tools. +# +# If not building tools, the PATH always points to the installed binaries. +# The NOTOOLS option assumes that in installed tools are good enough and that +# the user's PATH will locate to appropriate tools. This option is required +# for a cross-compiled build environment. +# +# If building tools, then the PATH includes the world temporary directories +# so that the bootstrapped tools are used as soon as they are built. The +# strict path is for use after all tools are supposed to have been +# bootstrapped. It doesn't allow any of the installed tools to be used. +# +.if defined(NOTOOLS) +# Default root of the tool tree +TOOLROOT?= +# Choose the PATH relative to the root of the tool tree +PATH= ${TOOLROOT}/sbin:${TOOLROOT}/bin:${TOOLROOT}/usr/sbin:${TOOLROOT}/usr/bin +.else +TOOLROOT= ${WORLDTMP} +.endif +STRICTTMPPATH= ${TOOLROOT}/sbin:${TOOLROOT}/usr/sbin:${TOOLROOT}/bin:${TOOLROOT}/usr/bin +d126 11 +a136 22 +# XXX COMPILER_PATH is needed for finding cc1, ld and as +# XXX GCC_EXEC_PREFIX is for *crt.o. It is probably unnecessary now +# that LIBRARY_PATH is set. We still can't use -nostdlib, since gcc +# wouldn't link *crt.o or libgcc if it were used. +# XXX LD_LIBRARY_PATH is for ld.so. It is also used by ld, although we don't +# want that - all compile-time library paths should be resolved by gcc. +# It fails for set[ug]id executables (are any used?). +COMPILER_ENV= BISON_SIMPLE=${TOOLROOT}/usr/share/misc/bison.simple \ + COMPILER_PATH=${TOOLROOT}/usr/libexec:${TOOLROOT}/usr/bin \ + GCC_EXEC_PREFIX=${WORLDTMP}${SHLIBDIR}:${WORLDTMP}/usr/lib/ \ + LD_LIBRARY_PATH=${TOOLROOT}${SHLIBDIR} \ + LIBRARY_PATH=${WORLDTMP}${SHLIBDIR}:${WORLDTMP}/usr/lib + +BMAKEENV= ${COMPILER_ENV} NOEXTRADEPEND=t PATH=${TMPPATH} \ + OBJFORMAT_PATH=${TOOLROOT}/usr/libexec:/usr/libexec +XTMAKEENV= NOEXTRADEPEND=t +.if defined(TARGET) +XMAKEENV= PATH=${TMPPATH} +.else +XMAKEENV= PATH=${STRICTTMPPATH} +.endif +XMAKEENV+= ${COMPILER_ENV} \ +d138 1 +a138 2 + OBJFORMAT_PATH=${TOOLROOT}/usr/libexec \ + CFLAGS="-nostdinc ${CFLAGS}" # XXX -nostdlib +a139 7 +# used to compile and install 'make' in temporary build tree +MAKETMP= ${WORLDTMP}/make +IBMAKE= ${BMAKEENV} MAKEOBJDIR=${MAKETMP} ${MAKE} DESTDIR=${WORLDTMP} + +.if defined(NOTOOLS) +# cross tools make +XTMAKE= ${XTMAKEENV} ${MAKE} DESTDIR=${WORLDTMP} +d141 1 +a141 1 +BMAKE= ${BMAKEENV} ${MAKE} DESTDIR=${WORLDTMP} +d143 3 +a145 1 +XMAKE= ${XMAKEENV} ${MAKE} DESTDIR=${WORLDTMP} +a147 10 +.else +# cross tools make +XTMAKE= ${XTMAKEENV} ${WORLDTMP}/usr/bin/make DESTDIR=${WORLDTMP} +# bootstrap make +BMAKE= ${BMAKEENV} ${WORLDTMP}/usr/bin/make DESTDIR=${WORLDTMP} +# cross make used for compilation +XMAKE= ${XMAKEENV} ${WORLDTMP}/usr/bin/make DESTDIR=${WORLDTMP} +# cross make used for final installation +IXMAKE= ${XMAKEENV} ${WORLDTMP}/usr/bin/make +.endif +d155 9 +a163 2 +buildworld: check-objformat +.if !defined(NOCLEAN) +d166 1 +a166 1 + @@echo ">>> Cleaning up the temporary ${OBJFORMAT} build tree" +a167 2 + mkdir -p ${WORLDTMP} + -chflags -R noschg ${WORLDTMP}/ +d169 6 +a174 33 +.endif +.if !defined(NOTOOLS) + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Making make" + @@echo "--------------------------------------------------------------" + mkdir -p ${WORLDTMP}/usr/bin ${MAKETMP} + ( \ + cd ${.CURDIR}/usr.bin/make; \ + MAKEOBJDIRPREFIX=""; unset MAKEOBJDIRPREFIX; \ + ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} all; \ + ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} install; \ + ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} clean \ + ) + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Making mtree" + @@echo "--------------------------------------------------------------" + mkdir -p ${WORLDTMP}/usr/sbin ${WORLDTMP}/mtree + ( \ + cd ${.CURDIR}/usr.sbin/mtree; \ + MAKEOBJDIRPREFIX=""; unset MAKEOBJDIRPREFIX; \ + export MAKEOBJDIR=${WORLDTMP}/mtree; \ + ${BMAKE} ${MK_FLAGS} all; \ + ${BMAKE} ${MK_FLAGS} -B install clean \ + ) +.endif + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Making hierarchy" + @@echo "--------------------------------------------------------------" + mkdir -p ${WORLDTMP} + cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 hierarchy +d178 1 +a178 1 + @@echo ">>> Cleaning up the ${OBJFORMAT} obj tree" +d184 1 +a184 7 + @@echo ">>> Rebuilding the ${OBJFORMAT} obj tree" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 par-${OBJDIR} +.if defined(TARGET) + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Rebuilding toolchain for ${TARGET} buildworld" +d186 1 +a186 3 + cd ${.CURDIR}; ${XTMAKE} -f Makefile.inc1 cross-toolchain +.endif +.if !defined(NOTOOLS) && !defined(TARGET) +d189 1 +a189 1 + @@echo ">>> Rebuilding ${OBJFORMAT} bootstrap tools" +d191 1 +a191 7 + cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 bootstrap + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Rebuilding tools necessary to build the include files" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 include-tools +.endif +d196 1 +a196 19 + cd ${.CURDIR}; SHARED=copies ${BMAKE} -f Makefile.inc1 includes + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Rebuilding bootstrap libraries" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 bootstrap-libraries +.if !defined(NOTOOLS) + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Rebuilding tools needed to build libraries" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 lib-tools + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Rebuilding all other tools needed to build the ${OBJFORMAT} world" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 build-tools +.endif +.if !defined(_NODEPEND) +a201 1 +.endif +d204 1 +a204 1 + @@echo ">>> Building ${OBJFORMAT} libraries" +a243 7 +.if ${MACHINE_ARCH} == "i386" && ${OBJFORMAT} == "aout" && !defined(DESTDIR) + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Re-scanning the shared libraries.." + @@echo "--------------------------------------------------------------" + -cd ${.CURDIR}; /sbin/ldconfig -R +.endif +d342 14 +a361 49 +# bootstrap - [re]build tools needed to run the actual build, this includes +# tools needed by 'make depend', as some tools are needed to generate source +# for the dependency information to be gathered from. +# +bootstrap: +.if defined(DESTDIR) + rm -f ${DESTDIR}/usr/src/sys + ln -s ${.CURDIR}/sys ${DESTDIR}/usr/src + cd ${.CURDIR}/include; ${MAKE} all + cd ${.CURDIR}/include; ${MAKE} beforeinstall +.endif + cd ${.CURDIR}/usr.bin/make; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ + ${MAKE} ${MK_FLAGS} all; \ + ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR} + cd ${.CURDIR}/usr.bin/xinstall; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ + ${MAKE} ${MK_FLAGS} all; \ + ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR} + cd ${.CURDIR}/usr.bin/yacc; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ + ${MAKE} ${MK_FLAGS} all; \ + ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR} + cd ${.CURDIR}/usr.bin/lex; ${MAKE} bootstrap; \ + ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ + ${MAKE} ${MK_FLAGS} -DNOLIB all; \ + ${MAKE} ${MK_FLAGS} -DNOLIB -B install ${CLEANDIR} + cd ${.CURDIR}/usr.bin/lex; ${MAKE} ${OBJDIR} + cd ${.CURDIR}/usr.sbin/mtree; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ + ${MAKE} ${MK_FLAGS} all; \ + ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR} +.if defined(DESTDIR) + cd ${.CURDIR}/include && ${MAKE} copies +.endif + +# +# include-tools - generally the same as 'bootstrap', except that it's for +# things that are specifically needed to generate include files. +# +# XXX should be merged with bootstrap, it's not worth keeeping them separate. +# Well, maybe it is now. We force 'cleandepend' here to avoid dependencies +# on cleaned away headers in ${WORLDTMP}. +# +include-tools: +.for d in usr.bin/compile_et usr.bin/rpcgen + cd ${.CURDIR}/$d; ${MAKE} cleandepend; \ + ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ + ${MAKE} ${MK_FLAGS} all; \ + ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR} +.endfor + +# +a364 5 +.if defined(CLOBBER) + rm -rf ${DESTDIR}/usr/include/* + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ + -p ${DESTDIR}/usr/include +.endif +d426 1 +a426 1 +# Declare tools if they are not required on all architectures. +d428 1 +a428 43 +.if ${MACHINE_ARCH} == "i386" +# aout tools: +_aout_ar = usr.bin/ar +_aout_as = gnu/usr.bin/as +_aout_ld = gnu/usr.bin/ld +_aout_nm = usr.bin/nm +_aout_ranlib = usr.bin/ranlib +_aout_size = usr.bin/size +_aout_strip = usr.bin/strip +# boot block/loader tools: +_btxld = usr.sbin/btxld +.endif + +# +# lib-tools - build tools to compile and install the libraries. +# +# XXX gperf is required for cc +# XXX a new ld and tsort is required for cc +lib-tools: +.for d in \ + gnu/usr.bin/gperf \ + ${_aout_ld} \ + usr.bin/tsort \ + ${_aout_as} \ + gnu/usr.bin/bison \ + gnu/usr.bin/cc \ + gnu/lib/libgcc \ + ${_aout_ar} \ + usr.bin/env \ + usr.bin/lex/lib \ + usr.bin/mk_cmds \ + ${_aout_nm} \ + ${_aout_ranlib} \ + ${_aout_strip} \ + gnu/usr.bin/binutils \ + usr.bin/uudecode \ + usr.bin/objformat + cd ${.CURDIR}/$d; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ + ${MAKE} ${MK_FLAGS} all; \ + ${MAKE} ${MK_FLAGS} -B install; \ + ${MAKE} ${MK_FLAGS:S/-DNOPIC//} -B ${CLEANDIR} ${OBJDIR} +.endfor + +d430 23 +a452 20 +# We have to know too much about ordering and subdirs in the lib trees: +# +# To satisfy shared library linkage when only the libraries being built +# are visible: +# +# csu must be built before all shared libaries for ELF. +# libcom_err must be built before libss and libkrb. +# libcrypt must be built before libkrb and libskey. +# libdes must be built before libpam. +# libkrb must be built before libpam. +# libm must be built before libstdc++. +# libmd must be built before libatm, libcrypt, libopie, libradius, libskey, +# and libtacplus. +# libncurses must be built before libdialog, libedit and libreadline. +# libradius must be built before libpam. +# libskey must be built before libpam. +# libtacplus must be built before libpam. +# +# Some libraries are built conditionally and/or are in inconsistently +# named directories: +d455 1 +a455 1 +_csu=lib/csu/${MACHINE_ARCH}.pcc +d457 1 +a457 1 +_csu=lib/csu/i386-elf +d459 1 +a459 1 +_csu=lib/csu/${MACHINE_ARCH} +a462 1 +_libcrypt= lib/libcrypt secure/lib/libcrypt +a463 2 +.else +_libcrypt= lib/libcrypt +d467 1 +a467 1 +_kerberosIV_lib=kerberosIV/lib +d477 1 +a477 1 +_libperl= gnu/usr.bin/perl/libperl +d480 5 +a484 19 +# +# bootstrap-libraries - build just enough libraries for the bootstrap +# tools, and install them under ${WORLDTMP}. +# +# Build csu early so that some tools get linked to the new +# version (too late for the main tools, however). Then build the +# necessary prerequisite libraries. +# +# This is mostly wrong. The build tools must run on the host system, +# so they should use host libraries. We depend on the target being +# similar enough to the host for new target libraries to work on the +# host. +# +bootstrap-libraries: +.for _lib in ${_csu} lib/libc lib/libncurses \ + gnu/lib/libregex gnu/lib/libreadline \ + lib/libedit ${_libm} \ + lib/libmd lib/libcrypt lib/libutil lib/libz usr.bin/lex/lib \ + ${_libperl} +d487 3 +a489 214 + ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ + ${MAKE} ${MK_FLAGS} all; \ + ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR} +.endif +.endfor + +# +# libraries - build all libraries, and install them under ${DESTDIR}. +# +# The ordering is not as special as for bootstrap-libraries. Build +# the prerequisites first, then build almost everything else in +# alphabetical order. +# +libraries: +.for _lib in ${_csu} lib/libcom_err ${_libm} lib/libmd ${_libcrypt} \ + lib/libradius lib/libskey lib/libtacplus \ + ${_secure_lib} ${_kerberosIV_lib} \ + gnu/lib ${_libperl} lib usr.bin/lex/lib \ + usr.sbin/pcvt/keycap +.if exists(${.CURDIR}/${_lib}) + cd ${.CURDIR}/${_lib}; ${MAKE} all; ${MAKE} -B install +.endif +.endfor + +# +# Exclude unused tools from build-tools. +# +.if !defined(NOGAMES) && exists(${.CURDIR}/games) +_adventure= games/adventure +_caesar= games/caesar +_hack= games/hack +_phantasia= games/phantasia +_strfile= games/fortune/strfile +.endif +.if !defined(NOPERL) +_perl= gnu/usr.bin/perl/miniperl +.endif +.if !defined(NOSHARE) && exists(${.CURDIR}/share) +_scrnmaps= share/syscons/scrnmaps +.endif +.if ${MACHINE_ARCH} == alpha +_elf2exe= usr.sbin/elf2exe +.endif +.if ${MACHINE_ARCH} == i386 +_kldlinux= sys/modules/linux +.endif +.if ${OBJFORMAT} == "aout" +_netboot= sys/${MACHINE_ARCH}/boot/netboot +.endif + +BTMAKEFLAGS= ${MK_FLAGS} -D_BUILD_TOOLS + +# +# build-tools - build and install any other tools needed to complete the +# compile and install. +# ifdef stale +# bc and cpp are required to build groff. Otherwise, the order here is +# mostly historical, i.e., bogus. +# chmod is used to build gcc's tmpmultilib[2] at obscure times. +# endif stale +# XXX uname is a bug - the target should not depend on the host. +# +build-tools: +.for d in \ + bin/cat \ + bin/chmod \ + bin/cp \ + bin/date \ + bin/dd \ + bin/echo \ + bin/expr \ + bin/hostname \ + bin/ln \ + bin/ls \ + bin/mkdir \ + bin/mv \ + bin/rm \ + bin/test \ + ${_caesar} \ + ${_strfile} \ + gnu/usr.bin/awk \ + gnu/usr.bin/bc \ + gnu/usr.bin/grep \ + gnu/usr.bin/groff \ + gnu/usr.bin/gzip \ + gnu/usr.bin/man/makewhatis \ + gnu/usr.bin/patch \ + ${_perl} \ + gnu/usr.bin/sort \ + gnu/usr.bin/texinfo \ + usr.bin/basename \ + usr.bin/cap_mkdb \ + usr.bin/chflags \ + usr.bin/cmp \ + usr.bin/col \ + usr.bin/colldef \ + usr.bin/cpp \ + usr.bin/expand \ + usr.bin/file2c \ + usr.bin/find \ + usr.bin/gencat \ + usr.bin/gensetdefs \ + usr.bin/id \ + usr.bin/join \ + usr.bin/lorder \ + usr.bin/m4 \ + usr.bin/mkdep \ + usr.bin/mklocale \ + usr.bin/paste \ + usr.bin/printf \ + usr.bin/sed \ + ${_aout_size} \ + usr.bin/soelim \ + usr.bin/symorder \ + usr.bin/touch \ + usr.bin/tr \ + usr.bin/true \ + usr.bin/uname \ + usr.bin/uuencode \ + usr.bin/vgrind \ + usr.bin/vi \ + usr.bin/wc \ + usr.bin/xargs \ + usr.bin/yacc \ + ${_btxld} \ + usr.sbin/chown \ + ${_elf2exe} \ + usr.sbin/mtree \ + usr.sbin/zic \ + bin/sh + cd ${.CURDIR}/$d; ${MAKE} ${BTMAKEFLAGS} ${_DEPEND}; \ + ${MAKE} ${BTMAKEFLAGS} all; \ + ${MAKE} ${BTMAKEFLAGS} -B install ${CLEANDIR} ${OBJDIR} +.endfor +.if !defined(NOGAMES) && exists(${.CURDIR}/games) + cd ${DESTDIR}/usr/games; cp -p caesar strfile ${DESTDIR}/usr/bin +.endif +.for d in \ + bin/sh \ + ${_adventure} \ + ${_hack} \ + ${_phantasia} \ + gnu/usr.bin/cc/cc_tools \ + ${_linux} \ + ${_kldlinux} \ + ${_scrnmaps} \ + ${_netboot} + cd ${.CURDIR}/$d; ${MAKE} ${BTMAKEFLAGS} build-tools +.endfor + +# +# Build aout versions of things that provide legacy support when all the +# rest of the world is elf. +# +legacy-build: +.if ${MACHINE_ARCH} == "i386" && ${OBJFORMAT} == "aout" + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Making hierarchy" + @@echo "--------------------------------------------------------------" + mkdir -p ${WORLDTMP} + cd ${.CURDIR}; ${XMAKE} -f Makefile.inc1 hierarchy + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Rebuilding the ${OBJFORMAT} obj tree" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}; ${XMAKE} -f Makefile.inc1 par-${OBJDIR} + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Rebuilding ${DESTDIR}/usr/include" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}; SHARED=copies ${XMAKE} -f Makefile.inc1 includes + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Building legacy libraries" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}; \ + ${XMAKE} -DNOINFO -DNOMAN -f Makefile.inc1 bootstrap-libraries + cd ${.CURDIR}; \ + ${XMAKE} -DNOINFO -DNOMAN -f Makefile.inc1 libraries + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Building legacy rtld" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}/libexec/rtld-aout; \ + ${XMAKE} -DNOMAN depend; ${XMAKE} -DNOMAN all; + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Building legacy boot" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}/sys/${MACHINE_ARCH}/boot && \ + ${XMAKE} -DNOMAN -B obj depend; ${XMAKE} -DNOMAN all; +.endif + +# +# Install aout versions of things that provide legacy support when all the +# rest of the world is elf. +# +legacy-install: +.if ${MACHINE_ARCH} == "i386" && ${OBJFORMAT} == "aout" + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Installing legacy libraries" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}/lib; ${MAKE} -B -DNOMAN -DNOINFO install + cd ${.CURDIR}/gnu/lib; ${MAKE} -B -DNOMAN -DNOINFO install + cd ${.CURDIR}/gnu/lib/libgcc; \ + ${MAKE} -B -DNOMAN -DNOINFO install + cd ${.CURDIR}/usr.bin/lex/lib; \ + ${MAKE} -B -DNOMAN -DNOINFO install + cd ${.CURDIR}/usr.sbin/pcvt/keycap; \ + ${MAKE} -B -DNOMAN -DNOINFO install +.if exists(${.CURDIR}/secure/lib) && !defined(NOCRYPT) && !defined(NOSECURE) + cd ${.CURDIR}/secure/lib; ${MAKE} -B -DNOMAN -DNOINFO install +a490 68 +.if exists(${.CURDIR}/kerberosIV/lib) && !defined(NOCRYPT) && \ + defined(MAKE_KERBEROS4) + cd ${.CURDIR}/kerberosIV/lib; ${MAKE} -B -DNOMAN -DNOINFO install +.endif + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Installing legacy rtld" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}/libexec/rtld-aout; ${MAKE} -DNOMAN install + @@echo +.if ${MACHINE_ARCH} == "i386" + @@echo "--------------------------------------------------------------" + @@echo ">>> Installing legacy boot" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}/sys/${MACHINE_ARCH}/boot && ${MAKE} -DNOMAN install +.endif +.endif + + +# Get the object format that the tools see. +# +# +.if exists(/usr/bin/objformat) +__OBJFORMAT!= objformat +.else +__OBJFORMAT= ${OBJFORMAT} +.endif + +# +# Check if the local /etc/make.conf or /etc/make.conf.local have attempted +# to override the OBJFORMAT without updating the environment for the tools +# to see. +# +check-objformat : +.if ${__OBJFORMAT} != ${OBJFORMAT} + @@/bin/sh -c "echo \"It looks like you set OBJFORMAT=${OBJFORMAT} in /etc/make.conf. Don't do that!\" " + @@/bin/sh -c "echo \"If you want to override the installed object format, you must set OBJFORMAT\" " + @@/bin/sh -c "echo \"in your environment.\" " + @@exit 1 +.endif +.if !defined(REALLY_WANT_DEPRECIATED_AOUT) && ${OBJFORMAT} == "aout" + @@echo "==== NOTICE: a.out buildworld is depreciated and disabled! =====" + @@echo "Read: http://www.freebsd.org/~peter/elfday.html for information." + @@echo "You need to complete a 'make aout-to-elf' to bring your system" + @@echo "up to date with ELF tools. This requires a fair amount of disk" + @@echo "space to complete. Alternatively, you can do a binary upgrade" + @@echo "using the 3.0-RELEASE binaries from CD or ftp.freebsd.org in" + @@echo "/pub/FreeBSD/3.0-RELEASE/bin/ to convert your userland to ELF." + @@exit 1 +.endif + +# +# cross toolchain +# +# This is a subset of the tools built in lib-tools, build-tools, etc. What +# we are looking for here is to build the cross compilers, etc, with +# the current host compiler. +# +cross-toolchain: +.for d in \ + gnu/usr.bin/binutils \ + gnu/usr.bin/bison \ + gnu/usr.bin/cc \ + usr.bin/objformat + cd ${.CURDIR}/$d; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ + ${XTMAKE} ${MK_FLAGS} all; \ + ${XTMAKE} ${MK_FLAGS} -B install; \ + ${XTMAKE} ${MK_FLAGS:S/-DNOPIC//} -B ${CLEANDIR} ${OBJDIR} +@ + + +1.94 +log +@Revert to rev 1.91. Revs 1.9{2,3} were causing problems for people with +pre-Aug 4.0-CURRENT worlds and those with pre-GCC 2.95.2 worlds. + +The problem with pre-Aug worlds is the installed Byacc and Bison doesn't +have necessary changes to compile either GCC 2.95 or EGCS 1.1.x. + +The problem with pre-GCC 2.95 worlds is libgcc is built with the wrong +compiler. See rev 1.17 of src/gnu/lib/libgcc/Makefile (which used to live +in src/gnu/usr.bin/cc/libgcc) + commit messge for details of the requirements. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.93 1999/11/23 18:52:12 marcel Exp $ +a578 3 + cd ${.CURDIR}/lib/libncp; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libncurses; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libnetgraph; ${MAKE} beforeinstall +d586 3 +@ + + +1.93 +log +@Fix some bugs and make some policy changes. + +o Send libmytinfo back to the afterlife. It was revived by mistake, +o Make gnu/lib/libgcc before making lib/libpam. This dependency has + been overlooked in constructing the list, +o make depend before make all. It's by using make depend that the + dependency was found in the first place and we need it to prevent + cleaning everything up before we start, +o Don't specify -DNOINFO -DNOMAN for the libraries target. Let the + target handle it. We can do away with a single run over the libs + if we make everything while we're there and only install the + libraries in the object tree. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.92 1999/11/21 20:06:03 marcel Exp $ +d190 2 +a191 1 +BMAKEENV= NOEXTRADEPEND=t +d203 5 +d216 10 +d248 1 +a248 1 + mkdir -p ${WORLDTMP}/usr/bin ${WORLDTMP}/make +d252 3 +a254 4 + export MAKEOBJDIR=${WORLDTMP}/make; \ + ${BMAKE} ${MK_FLAGS} all; \ + ${BMAKE} ${MK_FLAGS} install; \ + ${BMAKE} ${MK_FLAGS} clean \ +d300 5 +d306 10 +a327 5 + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Rebuilding ${DESTDIR}/usr/include" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}; SHARED=copies ${BMAKE} -f Makefile.inc1 includes +d339 1 +a339 1 + cd ${.CURDIR}; ${XMAKE} -f Makefile.inc1 libraries +d493 9 +d511 3 +a513 3 + ${MAKE} ${MK_FLAGS} -DNOLIB -B install ${CLEANDIR} ${OBJDIR} + cd ${.CURDIR}/usr.bin/compile_et; ${MAKE} cleandepend; \ + ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ +d516 15 +a530 1 + cd ${.CURDIR}/usr.bin/rpcgen; ${MAKE} cleandepend; \ +d534 1 +d652 4 +a655 1 +# libraries - build all libraries, and install them under ${DESTDIR}. +d657 12 +a668 1 +# The following dependencies exist between the libraries: +d670 2 +a671 23 +# lib*: csu +# libatm: libmd +# libcrypt: libmd +# libdialog: libmytinfo libncurses +# libedit: libncurses +# libg++: libm +# libkrb: libcrypt +# libopie: libmd +# libpam: libcom_err libcrypt libdes libgcc_pic libkrb libradius libskey \ +# libtacplus libutil +# libradius: libmd +# libreadline: libncurses +# libskey: libcrypt libmd +# libss: libcom_err +# libstc++: libm +# libtacplus: libmd +# +# Across directories this comes down to (rougly): +# +# gnu/lib: lib/libm lib/libmytinfo lib/libncurses +# kerberosIV/lib: lib/libcrypt +# lib/libpam: secure/lib/libdes kerberosIV/lib/libkrb gnu/lib/libgcc +# secure/lib: lib/libmd +d674 1 +a674 1 +_csu= lib/csu/${MACHINE_ARCH}.pcc +d676 1 +a676 1 +_csu= lib/csu/i386-elf +d678 1 +a678 1 +_csu= lib/csu/${MACHINE_ARCH} +d682 1 +d684 2 +d689 1 +a689 1 +_kerberosIV_lib= kerberosIV/lib +d699 27 +a725 1 +_libperl= gnu/usr.bin/perl/libperl +d727 1 +d729 7 +d737 5 +a741 4 +.for _lib in ${_csu} lib/libmd lib/libcrypt ${_secure_lib} ${_kerberosIV_lib} \ + gnu/lib/libgcc lib/libcom_err ${_libm} lib/libncurses lib/libradius \ + lib/libskey lib/libtacplus lib/libutil lib gnu/lib ${_libperl} \ + usr.bin/lex/lib usr.sbin/pcvt/keycap +d743 1 +a743 4 + cd ${.CURDIR}/${_lib}; \ + ${MAKE} depend; \ + ${MAKE} all; \ + ${MAKE} -DNOINFO -DNOMAN install; +d766 6 +d866 4 +a869 1 + ${_scrnmaps} +@ + + +1.92 +log +@Build tools against the host's includes and libraries. Also, don't +build make(1) twice and merge the bootstrap-libraries and libraries +targets. + +This change solves the bug where build-tools, compiled against the +includes and libraries built from the sources failed to run on the +host, as was the case with the sigset_t change. With this update, a +buildworld will fail if the tools won't compile on the host. This +is solved in further commits where backward compatibility of the +tools is enlarged. + +The libraries target has been fixed. The libraries are now build in +the proper order, satisfying the dependencies. The comment is updated +to reflect this. + +The linux module and netboot have been removed from the list of tools. +More to follow. + +Reviewed by: bde, imp +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.91 1999/11/15 17:07:43 marcel Exp $ +d314 1 +a314 1 + cd ${.CURDIR}; ${XMAKE} -DNOINFO -DNOMAN -f Makefile.inc1 libraries +d628 1 +a628 1 +# lib/libpam: secure/lib/libdes kerberosIV/lib/libkrb +d659 1 +a659 1 + lib/libcom_err ${_libm} lib/libmytinfo lib/libncurses lib/libradius \ +d663 4 +a666 1 + cd ${.CURDIR}/${_lib}; ${MAKE} all; ${MAKE} -B install +@ + + +1.91 +log +@Remove CROSS_MAKE_FLAGS. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.90 1999/11/14 13:54:34 marcel Exp $ +d190 1 +a190 2 +BMAKEENV= ${COMPILER_ENV} NOEXTRADEPEND=t PATH=${TMPPATH} \ + OBJFORMAT_PATH=${TOOLROOT}/usr/libexec:/usr/libexec +a201 5 +# used to compile and install 'make' in temporary build tree +MAKETMP= ${WORLDTMP}/make +IBMAKE= ${BMAKEENV} MAKEOBJDIR=${MAKETMP} ${MAKE} DESTDIR=${WORLDTMP} + +.if defined(NOTOOLS) +a209 10 +.else +# cross tools make +XTMAKE= ${XTMAKEENV} ${WORLDTMP}/usr/bin/make DESTDIR=${WORLDTMP} +# bootstrap make +BMAKE= ${BMAKEENV} ${WORLDTMP}/usr/bin/make DESTDIR=${WORLDTMP} +# cross make used for compilation +XMAKE= ${XMAKEENV} ${WORLDTMP}/usr/bin/make DESTDIR=${WORLDTMP} +# cross make used for final installation +IXMAKE= ${XMAKEENV} ${WORLDTMP}/usr/bin/make +.endif +d232 1 +a232 1 + mkdir -p ${WORLDTMP}/usr/bin ${MAKETMP} +d236 4 +a239 3 + ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} all; \ + ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} install; \ + ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} clean \ +a284 5 + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Rebuilding tools necessary to build the include files" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 include-tools +a285 10 + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Rebuilding ${DESTDIR}/usr/include" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}; SHARED=copies ${BMAKE} -f Makefile.inc1 includes + @@echo + @@echo "--------------------------------------------------------------" + @@echo ">>> Rebuilding bootstrap libraries" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}; ${BMAKE} -f Makefile.inc1 bootstrap-libraries +d298 5 +a467 9 +.if defined(DESTDIR) + rm -f ${DESTDIR}/usr/src/sys + ln -s ${.CURDIR}/sys ${DESTDIR}/usr/src + cd ${.CURDIR}/include; ${MAKE} all + cd ${.CURDIR}/include; ${MAKE} beforeinstall +.endif + cd ${.CURDIR}/usr.bin/make; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ + ${MAKE} ${MK_FLAGS} all; \ + ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR} +d477 3 +a479 3 + ${MAKE} ${MK_FLAGS} -DNOLIB -B install ${CLEANDIR} + cd ${.CURDIR}/usr.bin/lex; ${MAKE} ${OBJDIR} + cd ${.CURDIR}/usr.sbin/mtree; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ +d482 1 +a482 15 +.if defined(DESTDIR) + cd ${.CURDIR}/include && ${MAKE} copies +.endif + +# +# include-tools - generally the same as 'bootstrap', except that it's for +# things that are specifically needed to generate include files. +# +# XXX should be merged with bootstrap, it's not worth keeeping them separate. +# Well, maybe it is now. We force 'cleandepend' here to avoid dependencies +# on cleaned away headers in ${WORLDTMP}. +# +include-tools: +.for d in usr.bin/compile_et usr.bin/rpcgen + cd ${.CURDIR}/$d; ${MAKE} cleandepend; \ +a485 1 +.endfor +d603 1 +a603 4 +# We have to know too much about ordering and subdirs in the lib trees: +# +# To satisfy shared library linkage when only the libraries being built +# are visible: +d605 1 +a605 12 +# csu must be built before all shared libaries for ELF. +# libcom_err must be built before libss and libkrb. +# libcrypt must be built before libkrb and libskey. +# libdes must be built before libpam. +# libkrb must be built before libpam. +# libm must be built before libstdc++. +# libmd must be built before libatm, libcrypt, libopie, libradius, libskey, +# and libtacplus. +# libncurses must be built before libdialog, libedit and libreadline. +# libradius must be built before libpam. +# libskey must be built before libpam. +# libtacplus must be built before libpam. +d607 23 +a629 2 +# Some libraries are built conditionally and/or are in inconsistently +# named directories: +d632 1 +a632 1 +_csu=lib/csu/${MACHINE_ARCH}.pcc +d634 1 +a634 1 +_csu=lib/csu/i386-elf +d636 1 +a636 1 +_csu=lib/csu/${MACHINE_ARCH} +a639 1 +_libcrypt= lib/libcrypt secure/lib/libcrypt +a640 2 +.else +_libcrypt= lib/libcrypt +d644 1 +a644 1 +_kerberosIV_lib=kerberosIV/lib +d654 1 +a654 1 +_libperl= gnu/usr.bin/perl/libperl +a656 34 +# +# bootstrap-libraries - build just enough libraries for the bootstrap +# tools, and install them under ${WORLDTMP}. +# +# Build csu early so that some tools get linked to the new +# version (too late for the main tools, however). Then build the +# necessary prerequisite libraries. +# +# This is mostly wrong. The build tools must run on the host system, +# so they should use host libraries. We depend on the target being +# similar enough to the host for new target libraries to work on the +# host. +# +bootstrap-libraries: +.for _lib in ${_csu} lib/libc lib/libncurses \ + gnu/lib/libregex gnu/lib/libreadline \ + lib/libedit ${_libm} \ + lib/libmd lib/libcrypt lib/libutil lib/libz usr.bin/lex/lib \ + ${_libperl} +.if exists(${.CURDIR}/${_lib}) + cd ${.CURDIR}/${_lib}; \ + ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ + ${MAKE} ${MK_FLAGS} all; \ + ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR} +.endif +.endfor + +# +# libraries - build all libraries, and install them under ${DESTDIR}. +# +# The ordering is not as special as for bootstrap-libraries. Build +# the prerequisites first, then build almost everything else in +# alphabetical order. +# +d658 4 +a661 5 +.for _lib in ${_csu} lib/libcom_err ${_libm} lib/libmd ${_libcrypt} \ + lib/libradius lib/libskey lib/libtacplus \ + ${_secure_lib} ${_kerberosIV_lib} \ + gnu/lib ${_libperl} lib usr.bin/lex/lib \ + usr.sbin/pcvt/keycap +a685 6 +.if ${MACHINE_ARCH} == i386 +_kldlinux= sys/modules/linux +.endif +.if ${OBJFORMAT} == "aout" +_netboot= sys/${MACHINE_ARCH}/boot/netboot +.endif +d780 1 +a780 4 + ${_linux} \ + ${_kldlinux} \ + ${_scrnmaps} \ + ${_netboot} +@ + + +1.90 +log +@${MACHINE} -> ${MACHINE_ARCH} + +All Makefiles now use MACHINE_ARCH for the target architecture. +Unification is required for cross-building. + +Tags added to: + sys/boot/Makefile + sys/boot/arc/loader/Makefile + sys/kern/Makefile + usr.bin/cpp/Makefile + usr.bin/gcore/Makefile + usr.bin/truss/Makefile + +usr.bin/gcore/Makefile: + fixed typo: MACHINDE -> MACHINE_ARCH +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.89 1999/10/25 14:50:13 julian Exp $ +a138 11 +# If we're building a cross world, define MACHINE and MACHINE_ARCH for +# the version of make that we're using. +# +.if defined(TARGET) +CROSS_MAKE_FLAGS+=-DMACHINE=\"${TARGET}\" +.endif +.if defined(TARGET_ARCH) +CROSS_MAKE_FLAGS+=-DMACHINE_ARCH=\"${TARGET_ARCH}\" +.endif + +# +d252 1 +a252 1 + ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} all CROSS_MAKE_FLAGS='${CROSS_MAKE_FLAGS}'; \ +d500 1 +a500 1 + ${MAKE} ${MK_FLAGS} all CROSS_MAKE_FLAGS='${CROSS_MAKE_FLAGS}'; \ +@ + + +1.89 +log +@install netgraph.h a bit earlier. + +Submitted by: Boris Popov +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.88 1999/10/14 06:40:43 bp Exp $ +d781 1 +a781 1 +_netboot= sys/${MACHINE}/boot/netboot +d924 1 +a924 1 + cd ${.CURDIR}/sys/${MACHINE}/boot && \ +d963 1 +a963 1 + cd ${.CURDIR}/sys/${MACHINE}/boot && ${MAKE} -DNOMAN install +@ + + +1.88 +log +@Make libncp actually compiled. + +Reviewed by: mdodd +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.87 1999/10/04 14:57:38 peter Exp $ +d592 1 +@ + + +1.87 +log +@Add libkvm to the includes target. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.86 1999/09/20 20:27:09 markm Exp $ +d590 1 +@ + + +1.86 +log +@Minor (but important) comment change. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.85 1999/09/04 13:25:57 bde Exp $ +d593 1 +@ + + +1.85 +log +@FIxed disorder in the comments about library build order. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.84 1999/08/31 06:53:39 markm Exp $ +d666 1 +a666 1 +# libcom_err must be built before libss. +@ + + +1.84 +log +@Further preparation for tn3270's demise. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.83 1999/08/30 08:33:15 peter Exp $ +d667 1 +a667 1 +# libcrypt must be built before libskey and libkrb. +d671 3 +a673 3 +# libmd must be built before libatm, libopie, libradius, libskey, +# libtacplus and libcrypt. +# libncurses must be built before libdialog, libedit, libreadline. +@ + + +1.83 +log +@Update for ncurses5 aftermath.. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.82 1999/08/28 01:35:58 peter Exp $ +a879 1 + cd ${.CURDIR}/usr.bin/tn3270/tools; ${MAKE} ${BTMAKEFLAGS} all +@ + + +1.82 +log +@$Id$ -> $FreeBSD$ +@ +text +@d2 1 +a2 1 +# $FreeBSD$ +a588 1 + cd ${.CURDIR}/lib/libcurses; ${MAKE} beforeinstall +d590 1 +a593 2 + cd ${.CURDIR}/lib/libmytinfo; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libncurses; ${MAKE} beforeinstall +a604 1 + cd ${.CURDIR}/lib/libtermcap; ${MAKE} beforeinstall +d673 1 +a673 2 +# libmytinfo must be built before libdialog and libncurses. +# libncurses must be built before libdialog. +a676 1 +# libtermcap must be built before libcurses, libedit and libreadline. +d716 1 +a716 3 +# necessary prerequisite libraries (libtermcap just needs to be before +# libcurses, and this only matters for the NOCLEAN case when NOPIC is +# not set). +d724 3 +a726 3 +.for _lib in ${_csu} lib/libtermcap \ + gnu/lib/libregex gnu/lib/libreadline lib/libc \ + lib/libcurses lib/libedit ${_libm} \ +a745 1 + lib/libmytinfo lib/libncurses lib/libtermcap \ +a873 1 + lib/libmytinfo \ +@ + + +1.81 +log +@Remove f2c-related stuff from the "includes" target and from a +comment. Fixes broken make world. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.80 1999/08/06 00:58:41 jdp Exp $ +@ + + +1.80 +log +@Add usr.sbin/elf2exe to the build-tools target on the Alpha. This +fixes the make buildworld breakage in sys/boot/arc/loader. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.79 1999/07/07 04:46:44 imp Exp $ +a613 1 + cd ${.CURDIR}/usr.bin/f2c; ${MAKE} beforeinstall +d673 1 +a673 1 +# libm must be built before libf2c and libstdc++. +@ + + +1.79 +log +@Per requests from the community, commit rudimentary cross compilation +support. I've been building world with these changes for months w/o +ill effect. I've also managed to build the cross tool chain for MIPS +with these patches. + +Please note that the extent to which these patches work is largely +dictated by how well our tool chains support the cross compilation. +Building alpha binaries on i386 doesn't work. Supposedly building +i386 binaries on alpha does work, but I've not verified it with these +patches, however. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.78 1999/06/04 17:34:28 billf Exp $ +d780 3 +d866 1 +@ + + +1.78 +log +@${.CURDIR} doesn't have to be /usr/src, especially in a cvs checkout. Make +sure what is reported to the user is accurate. + +Stolen From: mharo +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.77 1999/06/01 02:55:44 billf Exp $ +d139 11 +d201 1 +a201 1 +BMAKEENV= PATH=${TMPPATH} ${COMPILER_ENV} NOEXTRADEPEND=t \ +d203 7 +a209 1 +XMAKEENV= PATH=${STRICTTMPPATH} ${COMPILER_ENV} \ +d219 2 +d228 2 +d263 1 +a263 1 + ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} all; \ +d298 8 +a305 1 +.if !defined(NOTOOLS) +a332 2 +.endif +.if !defined(NOTOOLS) +d504 6 +d511 1 +a511 1 + ${MAKE} ${MK_FLAGS} all; \ +d527 3 +d1004 18 +@ + + +1.77 +log +@'make update' in the ports directory. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.76 1999/05/03 17:54:59 obrien Exp $ +d401 1 +a401 1 + @@echo ">>> Updating /usr/src from cvs repository" ${CVSROOT} +@ + + +1.76 +log +@Document NO_FORTRAN. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.75 1999/05/02 15:23:55 markm Exp $ +d394 3 +@ + + +1.75 +log +@Perl is moving up a maintenance version. + +While I'm here - reorder crypto directories to better support +dependancies. Perl and others like it better that way. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.74 1999/04/20 05:33:07 jkoshy Exp $ +d17 1 +@ + + +1.74 +log +@Change 'exists()' constructs to refer to directories in ${.CURDIR}. +Tested with a make world. + +PR: misc/4395 +Submitted by: J Wunsch +Reviewed by: bde +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.73 1999/04/11 21:48:09 des Exp $ +d192 1 +a192 1 + PERL5LIB=${DESTDIR}/usr/libdata/perl/5.00502 \ +d637 1 +a637 1 +# and libtacplus. +d657 1 +a657 1 +_libcrypt= secure/lib/libcrypt lib/libcrypt +d695 2 +a696 2 + lib/libcrypt lib/libcurses lib/libedit ${_libm} \ + lib/libmd lib/libutil lib/libz usr.bin/lex/lib \ +d714 1 +a714 1 +.for _lib in ${_csu} lib/libcom_err ${_libcrypt} ${_libm} lib/libmd \ +@ + + +1.73 +log +@Don't build man page indices if NOMAN is defined. + +PR: bin/11035 +Submitted by: Chris Costello +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.72 1999/04/05 22:37:54 obrien Exp $ +d37 1 +a37 1 +.if exists(share/info) +d43 1 +a43 1 +.if exists(include) +d46 1 +a46 1 +.if exists(lib) +d50 1 +a50 1 +.if exists(bin) +d53 1 +a53 1 +.if exists(games) && !defined(NOGAMES) +d56 1 +a56 1 +.if exists(gnu) +d59 2 +a60 2 +.if exists(kerberosIV) && exists(crypto) && !defined(NOCRYPT) && \ + defined(MAKE_KERBEROS4) +d63 1 +a63 1 +.if exists(libexec) +d66 1 +a66 1 +.if exists(sbin) +d69 1 +a69 1 +.if exists(share) && !defined(NOSHARE) +d72 1 +a72 1 +.if exists(sys) +d75 1 +a75 1 +.if exists(usr.bin) +d78 1 +a78 1 +.if exists(usr.sbin) +d81 1 +a81 1 +.if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE) +d86 1 +a86 1 +.if exists(etc) +d94 1 +a94 1 +.if exists(${_DIR}) & exists(${_DIR}/Makefile) +d527 1 +a527 1 +.if exists(secure) && !defined(NOCRYPT) +d530 2 +a531 1 +.if exists(kerberosIV) && !defined(NOCRYPT) && defined(MAKE_KERBEROS4) +d648 1 +a648 1 +.if exists(lib/csu/${MACHINE_ARCH}.pcc) +@ + + +1.72 +log +@Clean up "lib-tools:", folding libgcc into the rest. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.71 1999/04/04 21:35:27 obrien Exp $ +d368 1 +d371 1 +a371 1 + @@echo ">>> Rebuilding man page indexes" +d374 1 +@ + + +1.71 +log +@Remove a lingering reference to libg++. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.70 1999/04/03 23:46:18 obrien Exp $ +d603 2 +a604 11 + gnu/usr.bin/cc + cd ${.CURDIR}/$d; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ + ${MAKE} ${MK_FLAGS} all; \ + ${MAKE} ${MK_FLAGS} -B install; \ + ${MAKE} ${MK_FLAGS:S/-DNOPIC//} -B ${CLEANDIR} ${OBJDIR} +.endfor + cd ${.CURDIR}/gnu/lib/libgcc; ${MAKE} ${MK_FLAGS} ${_DEPEND}; \ + ${MAKE} ${MK_FLAGS} all; \ + ${MAKE} ${MK_FLAGS} -B install; \ + ${MAKE} ${MK_FLAGS:S/-DNOPIC//} -B ${CLEANDIR} ${OBJDIR} +.for d in \ +@ + + +1.70 +log +@Missed a gnu/usr.bin/cc/libgcc. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.69 1999/04/03 08:18:43 obrien Exp $ +a521 1 + cd ${.CURDIR}/gnu/lib/libg++; ${MAKE} beforeinstall +d641 1 +a641 1 +# libm must be built before libf2c, libg++ and libstdc++. +@ + + +1.69 +log +@EGCS will have some new includes that need to be installed. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.68 1999/04/02 15:37:07 peter Exp $ +d725 1 +a725 1 + gnu/lib gnu/usr.bin/cc/libgcc ${_libperl} lib usr.bin/lex/lib \ +d912 1 +a912 1 + cd ${.CURDIR}/gnu/usr.bin/cc/libgcc; \ +@ + + +1.68 +log +@Add libwrap to includes target, otherwise doesn't get installed +in time to build inetd. (If you already have /usr/include/tcpd.h, the +build doesn't fail. This mainly affects upgrades and 'make world' from +systems more than a few weeks old) +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.67 1999/03/31 06:42:36 obrien Exp $ +d525 1 +@ + + +1.67 +log +@An earlier version of Rev 1.66 was reviewed by bde and the issues were +hashed out with his gracious help. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.66 1999/03/31 06:38:13 obrien Exp $ +d570 1 +@ + + +1.66 +log +@* Deal with libgcc's move from gnu/usr.bin/cc to gnu/lib. + Move was necessary as libgcc should be built with the freshly built + compiler and thus we must wait until the freshly built bits have been + installed somewhere so we can use them. libgcc presence in gnu/usr.bin/cc/ + gets in the way of building the new compiler. We could have either + cd'ed to specific directories w/in gnu/usr.bin/cc/ and built and installed + individual bits, or move libgcc out of the way and let our normal subdir + building process work. + +* Don't build libgcc in "bootstrap-libraries:" target it should not be + assumed the currently installed compiler can correctly build libgcc. + (as is the case for g++ 2.7.2 and EGCS' libgcc) +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.65 1999/03/01 01:09:06 imp Exp $ +@ + + +1.65 +log +@The legacy boot stuff is available only on i386, not all architectures +which aren't the alpha. Test for MACHINE_ARCH == i386 rather than +MACHINE_ARCH != alpha. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.64 1999/02/27 03:18:10 jkh Exp $ +d602 11 +a612 1 + gnu/usr.bin/cc \ +d686 2 +a687 2 +# Build csu and libgcc early so that some tools get linked to the new +# versions (too late for the main tools, however). Then build the +d698 1 +a698 1 +.for _lib in ${_csu} gnu/usr.bin/cc/libgcc lib/libtermcap \ +@ + + +1.64 +log +@Add a new flag, "WORLD", for telling certain tools that they're +being build as part of a bootstrap. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.63 1999/02/14 13:56:14 des Exp $ +d919 1 +a919 1 +.if ${MACHINE_ARCH} != "alpha" +@ + + +1.63 +log +@Ignore errors from chflags. This makes it possible to make installworld +with DESTDIR set to an NFS-mounted file system. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.62 1999/01/27 15:08:05 jkh Exp $ +d132 1 +a132 1 +MK_FLAGS= -DNOINFO -DNOMAN -DNOPROFILE +d134 1 +a134 1 +MK_FLAGS= -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED +@ + + +1.62 +log +@further refine the upgrade process. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.61 1999/01/23 08:44:17 markm Exp $ +d229 1 +a229 1 + chflags -R noschg ${WORLDTMP}/ +@ + + +1.61 +log +@More broken crypt(3) backout. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.59 1999/01/20 05:45:57 markm Exp $ +d366 1 +a366 1 + cd ${.CURDIR}; /sbin/ldconfig -R +@ + + +1.60 +log +@One more fix to remove secure/lib/libcrypt from the build (both +cases are now handled in lib/libcrypt, depending upon if +secure/lib/libcrypt/crypt-des.c exists) + +Reviewed by: Mark Murray +@ +text +@d651 4 +d656 1 +d690 1 +a690 1 + ${_libcrypt} lib/libcurses lib/libedit ${_libm} \ +@ + + +1.59 +log +@Help for Perl5 to make in cross-build environments. +Submitted by: Eivind Eklund +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.58 1999/01/07 13:09:15 eivind Exp $ +a650 4 +.if !defined(NOSECURE) && !defined(NOCRYPT) +_libcrypt= secure/lib/libcrypt lib/libcrypt +_secure_lib= secure/lib +.else +a651 1 +.endif +@ + + +1.59.2.1 +log +@Yow, I somehow missed these in the last MFC. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.59 1999/01/20 05:45:57 markm Exp $ +d366 1 +a366 1 + -cd ${.CURDIR}; /sbin/ldconfig -R +@ + + +1.59.2.2 +log +@MFC: Ignore errors from chflags. + +Approved by: jkh +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.59.2.1 1999/02/02 03:12:57 jkh Exp $ +d229 1 +a229 1 + -chflags -R noschg ${WORLDTMP}/ +@ + + +1.59.2.3 +log +@MFC: Don't build man page indices if NOMAN is defined. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.59.2.2 1999/02/14 14:09:43 des Exp $ +a367 1 +.if !defined(NOMAN) +d370 1 +a370 1 + @@echo ">>> Rebuilding man page indices" +a372 1 +.endif +@ + + +1.59.2.4 +log +@MFC: increment Perl5 maintenance relase number. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.59.2.3 1999/04/11 21:52:42 des Exp $ +d192 1 +a192 1 + PERL5LIB=${DESTDIR}/usr/libdata/perl/5.00503 \ +@ + + +1.59.2.5 +log +@MFC: add libwrap to the beforeinstall target (rev 1.68 in -current). + +PR: 11739 +Reviewed by: peter +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.59.2.4 1999/05/05 13:22:35 markm Exp $ +a571 1 + cd ${.CURDIR}/lib/libwrap; ${MAKE} beforeinstall +@ + + +1.59.2.6 +log +@$Id$ -> $FreeBSD$ +@ +text +@d2 1 +a2 1 +# $FreeBSD$ +@ + + +1.59.2.7 +log +@PR: 15084 +Submitted by: gshapiro+FreeBSD-gnats@@gshapiro.net (Gregory Neil Shapiro) +Obtained from: -current + +An MFC forgotten in bringing Netgraph back. +@ +text +@d555 1 +a558 2 + cd ${.CURDIR}/lib/libncurses; ${MAKE} beforeinstall + cd ${.CURDIR}/lib/libnetgraph; ${MAKE} beforeinstall +@ + + +1.59.2.8 +log +@Fix groff breakage with regard to the safer macros. +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.59.2.7 1999/11/25 20:00:31 julian Exp $ +a185 2 + GROFF_FONT_PATH=${WORLDTMP}/usr/share/groff_font \ + GROFF_TMAC_PATH=${WORLDTMP}/usr/share/tmac \ +@ + + +1.59.2.9 +log +@MFC: (rev 1.142) +Get rid of "sticky" files when updating sources from CVS repository. + +Requested by: peter +@ +text +@d2 1 +a2 1 +# $FreeBSD: src/Makefile.inc1,v 1.59.2.8 2000/03/23 14:56:16 asmodai Exp $ +d401 1 +a401 1 + cd ${.CURDIR}; cvs -q update -rRELENG_3 -P -d +@ + + +1.58 +log +@Don't do the ldconfig rescan if DESTDIR is set. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.57 1999/01/07 06:26:33 peter Exp $ +d192 1 +@ + + +1.57 +log +@``Disable'' a.out 'make world', as per flag day notification on current and +committers. A 'make aout-to-elf' is strongly encouraged. This isn't quite +the end of the line for people who have a real problem with updating yet, +but we've got to get this over and done with. Yes, it's bound to be a +couple of bumpy couple of days. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.56 1999/01/06 10:06:36 bde Exp $ +d360 1 +a360 1 +.if ${MACHINE_ARCH} == "i386" && ${OBJFORMAT} == "aout" +@ + + +1.56 +log +@Removed the weak spam of ${DESTDIR}/usr/include in the bootstrap +target (see the previous log message). This works for bootstrapping +from 2.2.7. It won't work for bootstrapping from 2.1.x, but that +fails due to include problems earlier. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.55 1999/01/04 12:05:59 bde Exp $ +d946 10 +@ + + +1.55 +log +@Backed out rev.1.49. It broke bootstrapping from 2.1.5 2.2.7 and +probably other versions by spamming ${DESTDIR}/usr/include in much +the same way as `make includes'. + +Details for 2.2.7: the bootstrap target has always done a weak spam +of ${DESTDIR}/usr/include; we depend on it not installing any +significant anachronisms (it probably shouldn't touch the headers +at all; however, we may be depending on it for things like the +renaming of ts_nsec to ts_sec in ). Rev.1.49 strengthens +the spam to everything in src/include. For 2.2.7, this is not +immediately fatal. However, the `make all' step in src/includes +is not followed by a `make clean' step, so new rpc headers are not +generated after we've bootstrapped rpcgen. This causes a fatal +error much later when the old (generated) rpc headers are used with +the current headers (sys/types.h and/or the non-generated rpc +headers). + +Details for 2.1.x: the bug is immediately fatal. It gives definition +of errno that is not supported by 2.1.x's libc. The weak spam in the +restored version avoids this problem by not installing errno.h. +(Bootstrapping from 2.1.5 actually breaks much earlier.) + +I think the header problems supposedly fixed by rev.1.49 were caused +by using NOCLEAN and having the build fall over when the weakly +spammed headers are active. Minor differences in the layout will +then cause the .depend files to point to nonexistent headers. It +is a feature for symlinks like errno.h -> sys/errno.h to not exist +early. + +The other change in rev.1.49 breaks building obj directories if NOCLEAN +is set. It is only safe for _re_building with NOCLEAN set. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.54 1999/01/01 08:45:43 peter Exp $ +a470 16 +.if defined(DESTDIR) + rm -f ${DESTDIR}/usr/src/sys + ln -s ${.CURDIR}/sys ${DESTDIR}/usr/src + cd ${.CURDIR}/include; find -dx . | cpio -dump ${DESTDIR}/usr/include +.for d in net netatm netinet posix4 sys vm machine + if [ -h ${DESTDIR}/usr/include/$d ]; then \ + rm -f ${DESTDIR}/usr/include/$d ; \ + fi +.endfor + cd ${.CURDIR}/sys; \ + find -dx net netatm netinet posix4 sys vm -name '*.h' -o -type d | \ + cpio -dump ${DESTDIR}/usr/include + mkdir -p ${DESTDIR}/usr/include/machine + cd ${.CURDIR}/sys/${MACHINE_ARCH}/include; find -dx . -name '*.h' -o -type d | \ + cpio -dump ${DESTDIR}/usr/include/machine +.endif +a487 3 +.if defined(DESTDIR) + cd ${.CURDIR}/include && ${MAKE} copies +.endif +@ + + +1.54 +log +@Reconnect pcvt hooks.. + +Reviewed by: core +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.53 1998/12/30 12:06:07 bde Exp $ +d269 1 +a274 1 +.endif +d474 12 +a485 2 + cd ${.CURDIR}/include; ${MAKE} all + cd ${.CURDIR}/include; ${MAKE} beforeinstall +@ + + +1.53 +log +@Backed out previous commit. It depends on a.out utilities and libraries +somehow being available even on pure elf systems. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.52 1998/12/30 11:26:24 bde Exp $ +d721 2 +a722 1 + gnu/lib gnu/usr.bin/cc/libgcc ${_libperl} lib usr.bin/lex/lib +d911 2 +@ + + +1.52 +log +@Fixed bootstrapping of /usr/mdec/boot[12]. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.51 1998/12/28 17:03:50 peter Exp $ +a679 5 +# biosboot is not a library, but must be built before libdisk. +.if exists(sys/${MACHINE}/boot/biosboot) +_biosboot= sys/${MACHINE}/boot/biosboot +.endif + +d719 1 +a719 1 + lib/libradius lib/libskey lib/libtacplus ${_biosboot} \ +@ + + +1.51 +log +@Dip my toes into the fire and zap the leftover lkm hooks.. It seems they +try and recurse if the lkm dir exists for some reason but there isn't any +Makefile there. (eg: stray files prevented cvs update -P from removing the +empty dirs) +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.50 1998/12/27 21:11:07 phk Exp $ +d680 5 +d724 1 +a724 1 + lib/libradius lib/libskey lib/libtacplus \ +@ + + +1.50 +log +@follow up to: +Pre 3.0 branch cleanup casualty #4: pcvt +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.49 1998/12/21 09:41:26 dillon Exp $ +a10 1 +# -DNOLKM do not build loadable kernel modules +a83 3 +.if exists(lkm) && !defined(NOLKM) && ${OBJFORMAT} == "aout" +SUBDIR+= lkm +.endif +a742 3 +.if !defined(NOLKM) && exists(${.CURDIR}/lkm) && ${OBJFORMAT} == "aout" +_linux= lkm/linux +.endif +a887 8 +.if exists(${.CURDIR}/lkm) && !defined(NOLKM) + @@echo "--------------------------------------------------------------" + @@echo ">>> Building legacy lkms" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}/lkm; \ + ${XMAKE} -DNOMAN depend; ${XMAKE} -DNOMAN all; + @@echo +.endif +a923 7 +.if exists(${.CURDIR}/lkm) && !defined(NOLKM) + @@echo "--------------------------------------------------------------" + @@echo ">>> Installing legacy lkms" + @@echo "--------------------------------------------------------------" + cd ${.CURDIR}/lkm; ${MAKE} -DNOMAN install + @@echo +.endif +@ + + +1.49 +log +@ Elf (and a.out?) rebuild of bootstrap tools appeared to be broken due to + some tools requiring header files, such as errno.h, that are softlinks. + The mini installation of include files in Makefile.inc1 wasn't doing + the job, so it has been ripped out and replaced with a true make of the + /usr/src/include/ directory (make all and make beforeinstall). I think + the original idea was to save time by not installing unnecessary header + files, but it doesn't really save all that much time. + + Also, I have moved a NOCLEAN conditional to cover rebuilding the object + tree 'Rebuilding the ${OBJFORMAT} obj tree' section. This may or may not + be correct but it appears to function properly. If it is not correct we + need to find another way to avoid scanning every single file in the + entire source hierarchy for make restarts. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.48 1998/12/13 04:39:01 dillon Exp $ +d725 1 +a725 2 + gnu/lib gnu/usr.bin/cc/libgcc ${_libperl} lib usr.bin/lex/lib \ + usr.sbin/pcvt/keycap +a924 2 + ${MAKE} -B -DNOMAN -DNOINFO install + cd ${.CURDIR}/usr.sbin/pcvt/keycap; \ +@ + + +1.48 +log +@ Grr. removed. backed-out. sorry! +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.47 1998/12/13 04:32:13 dillon Exp $ +a272 1 +.endif +d278 1 +d478 2 +a479 12 + cd ${.CURDIR}/include; find -dx . | cpio -dump ${DESTDIR}/usr/include +.for d in net netatm netinet posix4 sys vm machine + if [ -h ${DESTDIR}/usr/include/$d ]; then \ + rm -f ${DESTDIR}/usr/include/$d ; \ + fi +.endfor + cd ${.CURDIR}/sys; \ + find -dx net netatm netinet posix4 sys vm -name '*.h' -o -type d | \ + cpio -dump ${DESTDIR}/usr/include + mkdir -p ${DESTDIR}/usr/include/machine + cd ${.CURDIR}/sys/${MACHINE_ARCH}/include; find -dx . -name '*.h' -o -type d | \ + cpio -dump ${DESTDIR}/usr/include/machine +@ + + +1.47 +log +@ This needs to be commited now to fix usbd for make world +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.46 1998/11/28 13:14:58 jkh Exp $ +d479 1 +a479 1 +.for d in dev net netatm netinet posix4 sys vm machine +@ + + +1.46 +log +@Revert previous commit; write idea, wrong way. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.45 1998/11/28 08:19:24 jkh Exp $ +d479 1 +a479 1 +.for d in net netatm netinet posix4 sys vm machine +@ + + +1.45 +log +@Remove netboot from build order; it's not ready for the limelight +and probably doesn't belong there anyway. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.44 1998/11/20 02:03:52 jdp Exp $ +d764 3 +d863 2 +a864 1 + ${_scrnmaps} +@ + + +1.44 +log +@Make sure libskey is built before libpam. It is required for one of +the PAM modules. + +Fix the comments describing the PAM dependencies to be consistent +with other related comments. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.43 1998/11/18 01:59:39 jdp Exp $ +a763 3 +.if ${OBJFORMAT} == "aout" +_netboot= sys/${MACHINE}/boot/netboot +.endif +d860 1 +a860 2 + ${_scrnmaps} \ + ${_netboot} +@ + + +1.43 +log +@Add libpam to the "includes" and "libraries" targets. + +Build the ordered list of libraries in a variable "_libs" before +building any of them. This eliminates a little bit of duplicated +code. More importantly, it makes it easier to include or exclude +libraries with .if constructs, because the list can be built in +multiple steps using "+=". +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.42 1998/11/18 00:40:38 jdp Exp $ +d650 2 +d657 3 +a660 1 +# libdes, libkrb, libradius and libtacplus must be built before libpam. +d675 1 +d680 4 +a729 12 +_libs= ${_csu} lib/libcom_err ${_libcrypt} ${_libm} lib/libmd \ + lib/libmytinfo lib/libncurses lib/libtermcap \ + lib/libradius lib/libtacplus +.if !defined(NOCRYPT) && !defined(NOSECURE) +_libs+= secure/lib +.endif +.if !defined(NOCRYPT) && defined(MAKE_KERBEROS4) +_libs+= kerberosIV/lib +.endif +_libs+= gnu/lib gnu/usr.bin/cc/libgcc ${_libperl} lib usr.bin/lex/lib \ + usr.sbin/pcvt/keycap + +d731 6 +a736 1 +.for _lib in ${_libs} +@ + + +1.42 +log +@Note the requirement that libcrypt be built before libkrb. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.41 1998/11/15 10:03:12 jb Exp $ +d580 1 +d656 1 +d721 12 +d734 1 +a734 4 +.for _lib in ${_csu} lib/libcom_err ${_libcrypt} ${_libm} lib/libmd \ + lib/libmytinfo lib/libncurses lib/libtermcap \ + gnu/lib gnu/usr.bin/cc/libgcc ${_libperl} lib usr.bin/lex/lib \ + usr.sbin/pcvt/keycap +a738 7 +.if exists(${.CURDIR}/secure/lib) && !defined(NOCRYPT) && !defined(NOSECURE) + cd ${.CURDIR}/secure/lib; ${MAKE} all; ${MAKE} -B install +.endif +.if exists(${.CURDIR}/kerberosIV/lib) && !defined(NOCRYPT) && \ + defined(MAKE_KERBEROS4) + cd ${.CURDIR}/kerberosIV/lib; ${MAKE} all; ${MAKE} -B install +.endif +@ + + +1.41 +log +@Remove share/info from build tools because it breaks the build when +INFODIR is set. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.40 1998/11/13 00:59:00 jdp Exp $ +d648 1 +a648 1 +# libcrypt must be built before libskey. +@ + + +1.40 +log +@Add libradius and libtacplus to the includes target. Note their +dependence on libmd. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.39 1998/11/05 07:54:05 msmith Exp $ +a632 1 + share/info \ +@ + + +1.39 +log +@Typo , -> . + +Submitted by: Shaun Courtney +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.38 1998/11/05 04:38:28 peter Exp $ +d581 1 +d585 1 +d651 2 +a652 1 +# libmd must be built before libatm, libopie and libskey. +@ + + +1.38 +log +@sys/modules/linux has a build-tools target +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.37 1998/11/04 12:43:46 peter Exp $ +d755 1 +a755 1 +,endif +@ + + +1.37 +log +@Add usr.bin/gensetdefs to build-tools; it is used for src/sys/modules and +maybe for other things that use linker sets under ELF. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.36 1998/10/17 11:56:20 bde Exp $ +d753 3 +d854 1 +@ + + +1.36 +log +@Don't add /usr/games to $PATH. Adding it here can only work for the +`make world' case, and only made a difference for the evil NOTOOLS case +of `make world' since games tools are installed in ${TOOLROOT}/usr/bin +if they are built, but the PR was for normal builds. This is fixed +in rev.1.14 of src/games/fortune/datfiles/Makefile. + +PR: 7936 +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.35 1998/10/16 14:22:54 bde Exp $ +d808 1 +@ + + +1.35 +log +@Fixed missing directories in the libraries target: +- in the elf case, csu must be built and installed before any shared + libraries. It wasn't, but we usually used a stale version that + happened to work. E.g., in the !NOTOOLS case we used the version + built and installed by the bootstrap-libraries target. Only cross + building was completely broken. +- the shared libmd must be built and installed before any shared + libraries that link to it. It wasn't, but we sometimes used a stale + version that happened to work, as above. For elf, this caused + bogus linkage of the target shared libatm and libopie with the host + static libmd. It isn't clear what this actually breaks, except for + cross compiling. For aout, the shared libmd is not built at all, so + all shared libraries linked to libmd may be broken. The linker + reports them by spewing RRS warnings. + +Note that building src/lib early and building subdirs of src/lib in +the correct order in src/lib/Makefile doesn't help, since the subdirs +are all built before any are installed. + +Fixed bitrot in the comments about the ordering requirements. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.34 1998/10/13 10:01:32 rnordier Exp $ +d173 1 +a173 1 +PATH= ${TOOLROOT}/sbin:${TOOLROOT}/bin:${TOOLROOT}/usr/sbin:${TOOLROOT}/usr/bin:${TOOLROOT}/usr/games +d177 2 +a178 2 +STRICTTMPPATH= ${TOOLROOT}/sbin:${TOOLROOT}/usr/sbin:${TOOLROOT}/bin:${TOOLROOT}/usr/bin:${TOOLROOT}/usr/games +TMPPATH= ${STRICTTMPPATH}:${PATH}:/usr/games +@ + + +1.34 +log +@Include btxld in build-tools only for i386. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.33 1998/10/13 08:13:32 jkh Exp $ +d645 1 +d647 3 +a649 3 +# libcrypt and libmd must be built before libskey. +# libm must be built before libf2c, libg++ and libstdc++ +# libmd must be built before libatm and libopie +d718 2 +a719 2 +.for _lib in lib/libcom_err ${_libcrypt} ${_libm} lib/libmytinfo \ + lib/libncurses lib/libtermcap \ +@ + + +1.33 +log +@Conditionalise boot block building on i386. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.32 1998/10/11 19:02:27 rnordier Exp $ +d605 2 +d829 1 +a829 1 + usr.sbin/btxld \ +@ + + +1.32 +log +@Remove sys/boot from the install as well. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.31 1998/10/11 18:39:38 rnordier Exp $ +d943 1 +d948 1 +@ + + +1.31 +log +@In src/Makefile.inc1: + Remove /sys/boot from legacy-build. + Add btxld to build-tools. +In src/sys/Makefile: + Add /sys/boot for i386 ELF. + +I'm still not sure why the new boot code was being built along with the +legacy stuff, which meant a completely wrong default environment for it. + +This may well still be the wrong way to go about this, but it can't work +all that much worse than it has been. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.30 1998/10/11 07:41:31 peter Exp $ +a945 1 + cd ${.CURDIR}/sys/boot && ${MAKE} -DNOMAN install +@ + + +1.30 +log +@Comment about libm and libmd being needed for some libraries. +Prompted by: bde + +Also. Don't build & install legacy lkm's when NOLKM has been set. +Otherwise it gets built in the src tree rather than obj, because the +previous 'make obj' at the start of legacy-build does respect NOLKM. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.29 1998/10/10 19:56:59 jkh Exp $ +d827 1 +a900 2 + cd ${.CURDIR}/sys/boot && ${XMAKE} -DNOMAN -B obj depend; \ + ${XMAKE} -DNOMAN OBJFORMAT=elf all +@ + + +1.29 +log +@Move OBJFORMAT hack to the correct line; what can I say, it was very +late. :) +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.28 1998/10/10 11:16:08 kato Exp $ +d645 2 +d889 1 +d896 1 +d937 1 +d943 1 +@ + + +1.28 +log +@PC-98 uses different boot code from IBM-PC. So, MACHINE is used +instead of MACHINE_ARCH. + +Submitted by: Takahashi Yoshihiro +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.27 1998/10/10 10:54:54 jkh Exp $ +d897 1 +a897 1 + ${XMAKE} -DNOMAN all +d899 1 +a899 1 + ${XMAKE} -DNOMAN -B obj depend; ${XMAKE} -DNOMAN OBJFORMAT=elf all; +@ + + +1.27 +log +@Quick commit to see if I can't fix Robert's i386/boot problem in one line. +If this doesn't work, we'll try something else. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.26 1998/10/10 08:21:18 jkh Exp $ +d898 1 +a898 1 + cd ${.CURDIR}/sys/${MACHINE_ARCH}/boot && \ +@ + + +1.26 +log +@Don't chain makes with &&; apparently this is evil for parallelism. +According to: bde +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.25 1998/10/09 22:22:34 jkh Exp $ +d899 1 +a899 1 + ${XMAKE} -DNOMAN -B obj depend; ${XMAKE} -DNOMAN all; +@ + + +1.25 +log +@Clean up the boot targets a bit. +Suggested by: jdp +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.24 1998/10/08 09:40:17 jkh Exp $ +d896 1 +a896 1 + cd ${.CURDIR}/sys/boot && ${XMAKE} -DNOMAN -B obj depend && \ +d899 1 +a899 1 + ${XMAKE} -DNOMAN -B obj depend && ${XMAKE} -DNOMAN all; +@ + + +1.24 +log +@Make both types of boot targets. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.23 1998/10/05 08:06:45 msmith Exp $ +d896 2 +a897 1 + cd ${.CURDIR}/sys/boot && ${XMAKE} -DNOMAN depend; ${XMAKE} -DNOMAN all +d899 1 +a899 1 + ${XMAKE} -DNOMAN depend; ${XMAKE} -DNOMAN all; +d941 2 +a942 1 + cd ${.CURDIR}/sys/${MACHINE}/boot; ${MAKE} -DNOMAN install +@ + + +1.23 +log +@Add libstand to the includes target. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.22 1998/09/26 01:30:36 sos Exp $ +d896 2 +a897 1 + cd ${.CURDIR}/sys/${MACHINE}/boot; \ +@ + + +1.22 +log +@Backout my last commit. +Find another way to get the LKM's rebuild. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.20 1998/09/23 10:30:43 obrien Exp $ +d583 1 +@ + + +1.21 +log +@Build the LKM's both on aout & ELF systems. + +Reviewed by: jkh +@ +text +@d85 1 +a85 1 +.if exists(lkm) && !defined(NOLKM) +d744 1 +a744 1 +.if !defined(NOLKM) && exists(${.CURDIR}/lkm) +@ + + +1.20 +log +@Add printf(1) to the list of early-build tools. +(needed to build Amd, and causing the -jN crowd problems w/o being here) +((I will revisit the usage of printf(1) in building Amd at a later time)) +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.19 1998/09/23 06:11:35 markm Exp $ +d85 1 +a85 1 +.if exists(lkm) && !defined(NOLKM) && ${OBJFORMAT} == "aout" +d744 1 +a744 1 +.if !defined(NOLKM) && exists(${.CURDIR}/lkm) && ${OBJFORMAT} == "aout" +@ + + +1.19 +log +@Complete the Perl NOSHARED repair. I had not ensured that the shared library +was constructed early enough, so perl was linking against the static lib. +This was breaking perl under ELF, as perl could not load shared objects +(in fact would dump core). +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.18 1998/09/21 08:55:50 jb Exp $ +d809 1 +@ + + +1.18 +log +@Remove the bootstrap-rtld target which wasn't needed. + +Install the rest of the legacy libraries (like libgcc.a, libl.a). + +Add games to the user's path to avoid the temptation for people to +hack paths to unsuitable tools. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.17 1998/09/17 16:32:00 andreas Exp $ +d671 4 +d695 1 +a695 1 + gnu/usr.bin/perl/libperl +d714 2 +a715 1 + gnu/lib gnu/usr.bin/cc/libgcc lib usr.bin/lex/lib usr.sbin/pcvt/keycap +@ + + +1.17 +log +@Purely cosmetic but useful change. +Make output of make world more readable for grep. Now a + grep '>>>' world.log +shows you the single stages through which the bootstrap +process went as discussed on -current. Could be used to +debug the bootstrap mechanism in case of trouble more +easily. Would be fine if any further @@echo "..." messages +containing a description, what's going on, could use the +new format: @@echo ">>> ..." +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.16 1998/09/17 09:34:51 phk Exp $ +d177 2 +a178 2 +STRICTTMPPATH= ${TOOLROOT}/sbin:${TOOLROOT}/usr/sbin:${TOOLROOT}/bin:${TOOLROOT}/usr/bin +TMPPATH= ${STRICTTMPPATH}:${PATH} +a700 19 +# bootstrap-rtld - Build the shared library loader and install it +# under ${WORLDTMP}. This requires libc_pic which isn't normally +# bootstrapped, so libc has to be built again. *sigh* +# +RTLD_MK_FLAGS= -DNOINFO -DNOMAN -DNOPROFILE +bootstrap-rtld: +.if exists(${.CURDIR}/libexec/rtld-${OBJFORMAT}) + cd ${.CURDIR}/lib/libc; \ + ${MAKE} ${RTLD_MK_FLAGS} ${_DEPEND}; \ + ${MAKE} ${RTLD_MK_FLAGS} all; \ + ${MAKE} ${RTLD_MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR} + cd ${.CURDIR}/libexec/rtld-${OBJFORMAT}; \ + ${MAKE} obj; \ + ${MAKE} ${RTLD_MK_FLAGS} ${_DEPEND}; \ + ${MAKE} ${RTLD_MK_FLAGS} all; \ + ${MAKE} ${RTLD_MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR} +.endif + +# +d905 13 +@ + + +1.16 +log +@Two patches from the HARP people: + +Various Makefile related fixes. + +-Wformat fixes. + +Submitted by: Mike Spengler +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.15 1998/09/17 03:56:23 gibbs Exp $ +d229 1 +a229 1 + @@echo " Cleaning up the temporary ${OBJFORMAT} build tree" +d238 1 +a238 1 + @@echo " Making make" +d250 1 +a250 1 + @@echo " Making mtree" +d263 1 +a263 1 + @@echo " Making hierarchy" +d270 1 +a270 1 + @@echo " Cleaning up the ${OBJFORMAT} obj tree" +d276 1 +a276 1 + @@echo " Rebuilding the ${OBJFORMAT} obj tree" +d282 1 +a282 1 + @@echo " Rebuilding ${OBJFORMAT} bootstrap tools" +d287 1 +a287 1 + @@echo " Rebuilding tools necessary to build the include files" +d293 1 +a293 1 + @@echo " Rebuilding ${DESTDIR}/usr/include" +d298 1 +a298 1 + @@echo " Rebuilding bootstrap libraries" +d304 1 +a304 1 + @@echo " Rebuilding tools needed to build libraries" +d311 1 +a311 1 + @@echo " Rebuilding all other tools needed to build the ${OBJFORMAT} world" +d318 1 +a318 1 + @@echo " Rebuilding dependencies" +d324 1 +a324 1 + @@echo " Building ${OBJFORMAT} libraries" +d329 1 +a329 1 + @@echo " Building everything.." +d335 1 +a335 1 + @@echo " Building everything.." +d356 1 +a356 1 + @@echo " Making hierarchy" +d361 1 +a361 1 + @@echo " Installing everything.." +d367 1 +a367 1 + @@echo " Re-scanning the shared libraries.." +d373 1 +a373 1 + @@echo " Rebuilding man page indexes" +d386 1 +a386 1 + @@echo "Running ${SUP}" +d398 1 +a398 1 + @@echo "Updating /usr/src from cvs repository" ${CVSROOT} +d410 1 +a410 1 + @@echo " Building programs only" +d435 1 +a435 1 + @@echo " Installing programs only" +d870 1 +a870 1 + @@echo " Making hierarchy" +d876 1 +a876 1 + @@echo " Rebuilding the ${OBJFORMAT} obj tree" +d881 1 +a881 1 + @@echo " Rebuilding ${DESTDIR}/usr/include" +d886 1 +a886 1 + @@echo " Building legacy libraries" +d894 1 +a894 1 + @@echo " Building legacy rtld" +d900 1 +a900 1 + @@echo " Building legacy lkms" +d906 1 +a906 1 + @@echo " Building legacy boot" +d920 1 +a920 1 + @@echo " Installing legacy libraries" +d926 1 +a926 1 + @@echo " Installing legacy rtld" +d931 1 +a931 1 + @@echo " Installing legacy lkms" +d936 1 +a936 1 + @@echo " Installing legacy boot" +@ + + +1.15 +log +@libscsi is obsoleted by CAM. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.14 1998/09/15 11:44:30 phk Exp $ +d564 1 +@ + + +1.14 +log +@(this is an extract from src/share/examples/atm/README) + + =================================== + HARP | Host ATM Research Platform + =================================== + + HARP 3 + +What is this stuff? +------------------- +The Advanced Networking Group (ANG) at the Minnesota Supercomputer Center, +Inc. (MSCI), as part of its work on the MAGIC Gigabit Testbed, developed +the Host ATM Research Platform (HARP) software, which allows IP hosts to +communicate over ATM networks using standard protocols. It is intended to +be a high-quality platform for IP/ATM research. + +HARP provides a way for IP hosts to connect to ATM networks. It supports +standard methods of communication using IP over ATM. A host's standard IP +software sends and receives datagrams via a HARP ATM interface. HARP provides +functionality similar to (and typically replaces) vendor-provided ATM device +driver software. + +HARP includes full source code, making it possible for researchers to +experiment with different approaches to running IP over ATM. HARP is +self-contained; it requires no other licenses or commercial software packages. + +HARP implements support for the IETF Classical IP model for using IP over ATM +networks, including: + + o IETF ATMARP address resolution client + o IETF ATMARP address resolution server + o IETF SCSP/ATMARP server + o UNI 3.1 and 3.0 signalling protocols + o Fore Systems's SPANS signalling protocol + +What's supported +---------------- +The following are supported by HARP 3: + + o ATM Host Interfaces + - FORE Systems, Inc. SBA-200 and SBA-200E ATM SBus Adapters + - FORE Systems, Inc. PCA-200E ATM PCI Adapters + - Efficient Networks, Inc. ENI-155p ATM PCI Adapters + + o ATM Signalling Protocols + - The ATM Forum UNI 3.1 signalling protocol + - The ATM Forum UNI 3.0 signalling protocol + - The ATM Forum ILMI address registration + - FORE Systems's proprietary SPANS signalling protocol + - Permanent Virtual Channels (PVCs) + + o IETF "Classical IP and ARP over ATM" model + - RFC 1483, "Multiprotocol Encapsulation over ATM Adaptation Layer 5" + - RFC 1577, "Classical IP and ARP over ATM" + - RFC 1626, "Default IP MTU for use over ATM AAL5" + - RFC 1755, "ATM Signaling Support for IP over ATM" + - RFC 2225, "Classical IP and ARP over ATM" + - RFC 2334, "Server Cache Synchronization Protocol (SCSP)" + - Internet Draft draft-ietf-ion-scsp-atmarp-00.txt, + "A Distributed ATMARP Service Using SCSP" + + o ATM Sockets interface + - The file atm-sockets.txt contains further information + +What's not supported +-------------------- +The following major features of the above list are not currently supported: + + o UNI point-to-multipoint support + o Driver support for Traffic Control/Quality of Service + o SPANS multicast and MPP support + o SPANS signalling using Efficient adapters + +This software was developed under the sponsorship of the Defense Advanced +Research Projects Agency (DARPA). + +Reviewed (lightly) by: phk +Submitted by: Network Computing Services, Inc. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.13 1998/09/15 07:46:17 gibbs Exp $ +a584 1 + cd ${.CURDIR}/lib/libscsi; ${MAKE} beforeinstall +@ + + +1.13 +log +@Hook up beforeinstall targets for libcam and libdevstat +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.12 1998/09/10 00:27:57 obrien Exp $ +d479 1 +a479 1 +.for d in net netinet posix4 sys vm machine +d485 1 +a485 1 + find -dx net netinet posix4 sys vm -name '*.h' -o -type d | \ +@ + + +1.12 +log +@I don't want to be the only one to use ``cut''. Use ``sed'' instead. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.11 1998/09/10 00:13:48 obrien Exp $ +d564 1 +d567 1 +@ + + +1.11 +log +@Add ``usr/bin/cut'' to "build-tools" target. +Used in usr.sbin/amd/include/newvers.sh. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.10 1998/09/09 19:30:20 markm Exp $ +a809 1 + usr.bin/cut \ +@ + + +1.10 +log +@Remove the NOPERL block to building Perl5. + +Perl 5 will rebuild/bootstrap itself next time a make world is done +with this in effect. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.9 1998/09/09 17:30:30 markm Exp $ +d810 1 +@ + + +1.9 +log +@Add the Perl5 bootstrap tools. +@ +text +@d2 1 +a2 1 +# $Id$ +a33 3 + +#Break perl while the PERL5 import happens +NOPERL= yes +@ + + +1.8 +log +@Another place to set NOPERL. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.7 1998/09/05 12:25:54 asami Exp $ +d691 2 +a692 1 + lib/libmd lib/libutil lib/libz usr.bin/lex/lib +d754 1 +a754 1 +_perl= gnu/usr.bin/perl/perl +@ + + +1.7 +log +@Remove tcl from /usr/src, according to prior agreement. BTW, tcl-8.0 *is* +a port so there is nothing to be done on that side now. + +Approved by: jkh +=== +To: "Jordan K. Hubbard" +cc: Andreas Klemm , current@@freebsd.org +Subject: Re: Make this a relese coordinator decision (was Re: ports-current/packages-current discontinued) +From: David Greenman +Date: Sun, 03 Aug 1997 20:23:31 -0700 + +>decision is, I'll respect it. + + Another chance to architect people's principles...I can hardly wait. Seems +quite appropriate for a Sunday - I just need to get one of those collection +plates (and money envelopes) so I can profit, too. :-) + Tcl stays in /usr/src for now, but it needs to be kept up to date; same +for perl. If Jordan doesn't have "setup" (written in tcl) ready for 3.0, +then tcl will be yanked prior to the 3.0 release (and made into a port). + As for the ports tree only supporting the last FreeBSD release, this seems +sensible to me. The "ports" have always been a moving target between releases +and the problem is only going to get worse when we expand to supporting other +processor architectures. In any case, Satoshi is and always has been in charge +of the ports tree and whatever he wants to do with it (within reason :-)) is +his decision. + Does this cover the issue completely? I admit to deleting messages in this +thread with unusual fervor (people have FAR too much time on their hands!). +There's a fair bit of reasoning behind the above, but since everyone is sick +of arguing about this, I'll spare you the analysis. + +-DG + +David Greenman +Core-team/Principal Architect, The FreeBSD Project +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.6 1998/09/05 11:37:14 jb Exp $ +d34 3 +@ + + +1.6 +log +@Change i386 in a few paths to ${MACHINE} to support MACHINE=pc98. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.5 1998/09/03 21:34:31 jb Exp $ +a579 4 +.if !defined(NOTCL) && exists (${.CURDIR}/contrib/tcl) && \ + exists(${.CURDIR}/usr.bin/tclsh) && exists (${.CURDIR}/lib/libtcl) + cd ${.CURDIR}/lib/libtcl; ${MAKE} installhdrs +.endif +a641 1 +# libm must be built before libtcl. +@ + + +1.5 +log +@Only run ldconfig if the OBJFORMAT is aout. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.4 1998/09/01 06:07:47 jb Exp $ +d764 1 +a764 1 +_netboot= sys/i386/boot/netboot +d910 1 +a910 1 + cd ${.CURDIR}/sys/i386/boot; \ +d940 1 +a940 1 + cd ${.CURDIR}/sys/i386/boot; ${MAKE} -DNOMAN install +@ + + +1.4 +log +@Force NOMAN and NOINFO on legacy-install as well as legacy build. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.3 1998/09/01 00:39:02 jb Exp $ +d364 1 +a364 1 +.if ${MACHINE_ARCH} == "i386" +@ + + +1.3 +log +@Add a target to check the consistency of the make OBJFORMAT variable +with the object format determined by objformat. This prevents foot +shooting (a form of boot scooting for hackers?) where local changes +to /etc/make.conf or /etc/make.conf.local try to override OBJFORMAT +in an incomplete way. +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.2 1998/08/31 20:43:13 jb Exp $ +d924 2 +a925 2 + cd ${.CURDIR}/lib; ${MAKE} -B install + cd ${.CURDIR}/gnu/lib; ${MAKE} -B install +@ + + +1.2 +log +@MACHINE -> MACHINE_ARCH to allow PC98 to define MACHINE=pc98. + +Submitted by: Takahashi Yoshihiro +@ +text +@d2 1 +a2 1 +# $Id: Makefile.inc1,v 1.1 1998/08/31 01:08:08 jb Exp $ +d225 1 +a225 1 +buildworld: +d941 23 +@ + + +1.1 +log +@E-day build system changes. + +- Moved most of the guts of Makefile to Makefile.inc1 to become the + backend for the build system. +- The new Makefile doesn't suffer from problems including the wrong + sys.mk because it doesn't use anything in there or bsd.own.mk. So, + from now on, the proper build command is just `make world' (or + buildworld). +- The intermediate makefiles called Makefile.inc0 and Makefile.upgrade + fiddle with the OBJFORMAT and MAKEOBJDIRPREFIX variables so that + both aout and elf object trees can coexist. Makefile.upgrade contains + the aout->elf transition build. +- A cross build environment is now very close to reality. Specifying + TOOLDIR, setting OBJFORMAT and MAKEOBJDIRPREFIX allow that. + +See the comments in Makefile for more info. +@ +text +@d2 1 +a2 1 +# $Id: Makefile,v 1.209 1998/08/04 17:13:38 bde Exp $ +d560 2 +a561 2 +.if exists(${.CURDIR}/lib/csu/${MACHINE}) + cd ${.CURDIR}/lib/csu/${MACHINE}; ${MAKE} beforeinstall +d654 3 +a656 3 +.if exists(lib/csu/${MACHINE}.pcc) +_csu=lib/csu/${MACHINE}.pcc +.elif ${MACHINE} == "i386" && ${OBJFORMAT} == "elf" +d659 1 +a659 1 +_csu=lib/csu/${MACHINE} +d947 3 +a949 3 + @@if test -d ${.CURDIR}/${entry}.${MACHINE}; then \ + ${ECHODIR} "===> ${DIRPRFX}${entry}.${MACHINE}"; \ + edir=${entry}.${MACHINE}; \ +@ diff --git a/swh/loader/cvs/rcsparse/test.rb b/swh/loader/cvs/rcsparse/test.rb new file mode 100644 index 0000000..7ae7ed7 --- /dev/null +++ b/swh/loader/cvs/rcsparse/test.rb @@ -0,0 +1,62 @@ +require 'test/unit' +require 'time' +require 'rcsfile' + +class BasicsTest < Test::Unit::TestCase + def setup + @f = RCSFile.new('test,v') + end + + def test_file + assert(@f.head == '1.472', 'Correct HEAD') + end + + def test_symbols + s = @f.symbols + assert(s['RELENG_4'] == '1.141.0.2', 'Symbol lookup') + end + + def test_locks + assert(@f.locks == {}, 'Locks') + end + + def test_resolve_sym + assert(@f.resolve_sym('RELENG_4') == '1.141.2.70', 'Resolve sym') + end + + def test_revs + assert(@f.key?('1.1'), 'Rev lookup') + assert(!@f.key?('1.500'), 'Rev lookup 2') + assert(@f['1.1'] != nil, 'Rev lookup 3') + assert(@f['1.120'].date == Time.parse('Thu Dec 30 11:31:21 CET 1999'), + 'Positive rev time (2-digit year)') + assert(@f['1.121'].date == Time.parse('Tue Jan 04 15:12:12 CET 2000'), + 'Rev time (4-digit year)') + end + + def test_close + @f.close + begin + @f.head + assert(false, "Read file after close") + rescue IOError + assert(true) + end + # restore for teardown + @f = RCSFile.new('test,v') + end + + def test_open + RCSFile.open('test,v') do |f| + assert(f.head == '1.472', 'open with block') + end + + f = RCSFile.open('test,v') + assert(f.head == '1.472', 'open without block') + f.close + end + + def teardown + @f.close + end +end diff --git a/swh/loader/cvs/rcsparse/testmodule.py b/swh/loader/cvs/rcsparse/testmodule.py new file mode 100644 index 0000000..2f0d388 --- /dev/null +++ b/swh/loader/cvs/rcsparse/testmodule.py @@ -0,0 +1,13 @@ +import rcsparse +import md5 + +f=rcsparse.rcsfile('test,v') +print f.head +print f.branch +s=f.symbols +print s['RELENG_4'] +print s.items() +r=f.revs +i=r.items() +print i +print f.getlog(f.sym2rev('RELENG_4')) diff --git a/swh/loader/cvs/rcsparse/tree.h b/swh/loader/cvs/rcsparse/tree.h new file mode 100644 index 0000000..2305d5f --- /dev/null +++ b/swh/loader/cvs/rcsparse/tree.h @@ -0,0 +1,771 @@ +/* $NetBSD: tree.h,v 1.8 2004/03/28 19:38:30 provos Exp $ */ +/* $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $ */ +/* $DragonFly: src/sys/sys/tree.h,v 1.2 2005/04/15 19:08:13 dillon Exp $ */ +/* + * Copyright 2002 Niels Provos + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _SYS_TREE_H_ +#define _SYS_TREE_H_ + +/* + * This file defines data structures for different types of trees: + * splay trees and red-black trees. + * + * A splay tree is a self-organizing data structure. Every operation + * on the tree causes a splay to happen. The splay moves the requested + * node to the root of the tree and partly rebalances it. + * + * This has the benefit that request locality causes faster lookups as + * the requested nodes move to the top of the tree. On the other hand, + * every lookup causes memory writes. + * + * The Balance Theorem bounds the total access time for m operations + * and n inserts on an initially empty tree as O((m + n)lg n). The + * amortized cost for a sequence of m accesses to a splay tree is O(lg n); + * + * A red-black tree is a binary search tree with the node color as an + * extra attribute. It fulfills a set of conditions: + * - every search path from the root to a leaf consists of the + * same number of black nodes, + * - each red node (except for the root) has a black parent, + * - each leaf node is black. + * + * Every operation on a red-black tree is bounded as O(lg n). + * The maximum height of a red-black tree is 2lg (n+1). + */ + +#define SPLAY_HEAD(name, type) \ +struct name { \ + struct type *sph_root; /* root of the tree */ \ +} + +#define SPLAY_INITIALIZER(root) \ + { NULL } + +#define SPLAY_INIT(root) do { \ + (root)->sph_root = NULL; \ +} while (/*CONSTCOND*/ 0) + +#define SPLAY_ENTRY(type) \ +struct { \ + struct type *spe_left; /* left element */ \ + struct type *spe_right; /* right element */ \ +} + +#define SPLAY_LEFT(elm, field) (elm)->field.spe_left +#define SPLAY_RIGHT(elm, field) (elm)->field.spe_right +#define SPLAY_ROOT(head) (head)->sph_root +#define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL) + +/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */ +#define SPLAY_ROTATE_RIGHT(head, tmp, field) do { \ + SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \ + SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ + (head)->sph_root = tmp; \ +} while (/*CONSTCOND*/ 0) + +#define SPLAY_ROTATE_LEFT(head, tmp, field) do { \ + SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \ + SPLAY_LEFT(tmp, field) = (head)->sph_root; \ + (head)->sph_root = tmp; \ +} while (/*CONSTCOND*/ 0) + +#define SPLAY_LINKLEFT(head, tmp, field) do { \ + SPLAY_LEFT(tmp, field) = (head)->sph_root; \ + tmp = (head)->sph_root; \ + (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \ +} while (/*CONSTCOND*/ 0) + +#define SPLAY_LINKRIGHT(head, tmp, field) do { \ + SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ + tmp = (head)->sph_root; \ + (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \ +} while (/*CONSTCOND*/ 0) + +#define SPLAY_ASSEMBLE(head, node, left, right, field) do { \ + SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \ + SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field);\ + SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \ + SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \ +} while (/*CONSTCOND*/ 0) + +/* Generates prototypes and inline functions */ + +#define SPLAY_PROTOTYPE(name, type, field, cmp) \ +void name##_SPLAY(struct name *, struct type *); \ +void name##_SPLAY_MINMAX(struct name *, int); \ +struct type *name##_SPLAY_INSERT(struct name *, struct type *); \ +struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \ + \ +/* Finds the node with the same key as elm */ \ +static __inline struct type * \ +name##_SPLAY_FIND(struct name *head, struct type *elm) \ +{ \ + if (SPLAY_EMPTY(head)) \ + return(NULL); \ + name##_SPLAY(head, elm); \ + if ((cmp)(elm, (head)->sph_root) == 0) \ + return (head->sph_root); \ + return (NULL); \ +} \ + \ +static __inline struct type * \ +name##_SPLAY_NEXT(struct name *head, struct type *elm) \ +{ \ + name##_SPLAY(head, elm); \ + if (SPLAY_RIGHT(elm, field) != NULL) { \ + elm = SPLAY_RIGHT(elm, field); \ + while (SPLAY_LEFT(elm, field) != NULL) { \ + elm = SPLAY_LEFT(elm, field); \ + } \ + } else \ + elm = NULL; \ + return (elm); \ +} \ + \ +static __inline struct type * \ +name##_SPLAY_MIN_MAX(struct name *head, int val) \ +{ \ + name##_SPLAY_MINMAX(head, val); \ + return (SPLAY_ROOT(head)); \ +} + +/* Main splay operation. + * Moves node close to the key of elm to top + */ +#define SPLAY_GENERATE(name, type, field, cmp) \ +struct type * \ +name##_SPLAY_INSERT(struct name *head, struct type *elm) \ +{ \ + if (SPLAY_EMPTY(head)) { \ + SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \ + } else { \ + int __comp; \ + name##_SPLAY(head, elm); \ + __comp = (cmp)(elm, (head)->sph_root); \ + if(__comp < 0) { \ + SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field);\ + SPLAY_RIGHT(elm, field) = (head)->sph_root; \ + SPLAY_LEFT((head)->sph_root, field) = NULL; \ + } else if (__comp > 0) { \ + SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field);\ + SPLAY_LEFT(elm, field) = (head)->sph_root; \ + SPLAY_RIGHT((head)->sph_root, field) = NULL; \ + } else \ + return ((head)->sph_root); \ + } \ + (head)->sph_root = (elm); \ + return (NULL); \ +} \ + \ +struct type * \ +name##_SPLAY_REMOVE(struct name *head, struct type *elm) \ +{ \ + struct type *__tmp; \ + if (SPLAY_EMPTY(head)) \ + return (NULL); \ + name##_SPLAY(head, elm); \ + if ((cmp)(elm, (head)->sph_root) == 0) { \ + if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \ + (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);\ + } else { \ + __tmp = SPLAY_RIGHT((head)->sph_root, field); \ + (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);\ + name##_SPLAY(head, elm); \ + SPLAY_RIGHT((head)->sph_root, field) = __tmp; \ + } \ + return (elm); \ + } \ + return (NULL); \ +} \ + \ +void \ +name##_SPLAY(struct name *head, struct type *elm) \ +{ \ + struct type __node, *__left, *__right, *__tmp; \ + int __comp; \ +\ + SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\ + __left = __right = &__node; \ +\ + while ((__comp = (cmp)(elm, (head)->sph_root)) != 0) { \ + if (__comp < 0) { \ + __tmp = SPLAY_LEFT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if ((cmp)(elm, __tmp) < 0){ \ + SPLAY_ROTATE_RIGHT(head, __tmp, field); \ + if (SPLAY_LEFT((head)->sph_root, field) == NULL)\ + break; \ + } \ + SPLAY_LINKLEFT(head, __right, field); \ + } else if (__comp > 0) { \ + __tmp = SPLAY_RIGHT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if ((cmp)(elm, __tmp) > 0){ \ + SPLAY_ROTATE_LEFT(head, __tmp, field); \ + if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\ + break; \ + } \ + SPLAY_LINKRIGHT(head, __left, field); \ + } \ + } \ + SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ +} \ + \ +/* Splay with either the minimum or the maximum element \ + * Used to find minimum or maximum element in tree. \ + */ \ +void name##_SPLAY_MINMAX(struct name *head, int __comp) \ +{ \ + struct type __node, *__left, *__right, *__tmp; \ +\ + SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\ + __left = __right = &__node; \ +\ + while (1) { \ + if (__comp < 0) { \ + __tmp = SPLAY_LEFT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if (__comp < 0){ \ + SPLAY_ROTATE_RIGHT(head, __tmp, field); \ + if (SPLAY_LEFT((head)->sph_root, field) == NULL)\ + break; \ + } \ + SPLAY_LINKLEFT(head, __right, field); \ + } else if (__comp > 0) { \ + __tmp = SPLAY_RIGHT((head)->sph_root, field); \ + if (__tmp == NULL) \ + break; \ + if (__comp > 0) { \ + SPLAY_ROTATE_LEFT(head, __tmp, field); \ + if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\ + break; \ + } \ + SPLAY_LINKRIGHT(head, __left, field); \ + } \ + } \ + SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ +} + +#define SPLAY_NEGINF -1 +#define SPLAY_INF 1 + +#define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y) +#define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y) +#define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y) +#define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y) +#define SPLAY_MIN(name, x) (SPLAY_EMPTY(x) ? NULL \ + : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF)) +#define SPLAY_MAX(name, x) (SPLAY_EMPTY(x) ? NULL \ + : name##_SPLAY_MIN_MAX(x, SPLAY_INF)) + +#define SPLAY_FOREACH(x, name, head) \ + for ((x) = SPLAY_MIN(name, head); \ + (x) != NULL; \ + (x) = SPLAY_NEXT(name, head, x)) + +/* Macros that define a red-black tree */ + +#define RB_SCAN_INFO(name, type) \ +struct name##_scan_info { \ + struct name##_scan_info *link; \ + struct type *node; \ +} + +#define RB_HEAD(name, type) \ +struct name { \ + struct type *rbh_root; /* root of the tree */ \ + struct name##_scan_info *rbh_inprog; /* scans in progress */ \ +} + +#define RB_INITIALIZER(root) \ + { NULL, NULL } + +#define RB_INIT(root) do { \ + (root)->rbh_root = NULL; \ + (root)->rbh_inprog = NULL; \ +} while (/*CONSTCOND*/ 0) + +#define RB_BLACK 0 +#define RB_RED 1 +#define RB_ENTRY(type) \ +struct { \ + struct type *rbe_left; /* left element */ \ + struct type *rbe_right; /* right element */ \ + struct type *rbe_parent; /* parent element */ \ + int rbe_color; /* node color */ \ +} + +#define RB_LEFT(elm, field) (elm)->field.rbe_left +#define RB_RIGHT(elm, field) (elm)->field.rbe_right +#define RB_PARENT(elm, field) (elm)->field.rbe_parent +#define RB_COLOR(elm, field) (elm)->field.rbe_color +#define RB_ROOT(head) (head)->rbh_root +#define RB_INPROG(head) (head)->rbh_inprog +#define RB_EMPTY(head) (RB_ROOT(head) == NULL) + +#define RB_SET(elm, parent, field) do { \ + RB_PARENT(elm, field) = parent; \ + RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \ + RB_COLOR(elm, field) = RB_RED; \ +} while (/*CONSTCOND*/ 0) + +#define RB_SET_BLACKRED(black, red, field) do { \ + RB_COLOR(black, field) = RB_BLACK; \ + RB_COLOR(red, field) = RB_RED; \ +} while (/*CONSTCOND*/ 0) + +#ifndef RB_AUGMENT +#define RB_AUGMENT(x) +#endif + +#define RB_ROTATE_LEFT(head, elm, tmp, field) do { \ + (tmp) = RB_RIGHT(elm, field); \ + if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field)) != NULL) { \ + RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \ + } \ + RB_AUGMENT(elm); \ + if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \ + if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ + RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ + else \ + RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ + } else \ + (head)->rbh_root = (tmp); \ + RB_LEFT(tmp, field) = (elm); \ + RB_PARENT(elm, field) = (tmp); \ + RB_AUGMENT(tmp); \ + if ((RB_PARENT(tmp, field))) \ + RB_AUGMENT(RB_PARENT(tmp, field)); \ +} while (/*CONSTCOND*/ 0) + +#define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \ + (tmp) = RB_LEFT(elm, field); \ + if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field)) != NULL) { \ + RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \ + } \ + RB_AUGMENT(elm); \ + if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \ + if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ + RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ + else \ + RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ + } else \ + (head)->rbh_root = (tmp); \ + RB_RIGHT(tmp, field) = (elm); \ + RB_PARENT(elm, field) = (tmp); \ + RB_AUGMENT(tmp); \ + if ((RB_PARENT(tmp, field))) \ + RB_AUGMENT(RB_PARENT(tmp, field)); \ +} while (/*CONSTCOND*/ 0) + +/* Generates prototypes and inline functions */ +#define RB_PROTOTYPE(name, type, field, cmp) \ +struct type *name##_RB_REMOVE(struct name *, struct type *); \ +struct type *name##_RB_INSERT(struct name *, struct type *); \ +struct type *name##_RB_FIND(struct name *, struct type *); \ +int name##_RB_SCAN(struct name *, int (*)(struct type *, void *), \ + int (*)(struct type *, void *), void *); \ +struct type *name##_RB_NEXT(struct type *); \ +struct type *name##_RB_MINMAX(struct name *, int); \ +RB_SCAN_INFO(name, type) \ + +/* Main rb operation. + * Moves node close to the key of elm to top + */ +#define RB_GENERATE(name, type, field, cmp) \ +static void \ +name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \ +{ \ + struct type *parent, *gparent, *tmp; \ + while ((parent = RB_PARENT(elm, field)) != NULL && \ + RB_COLOR(parent, field) == RB_RED) { \ + gparent = RB_PARENT(parent, field); \ + if (parent == RB_LEFT(gparent, field)) { \ + tmp = RB_RIGHT(gparent, field); \ + if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ + RB_COLOR(tmp, field) = RB_BLACK; \ + RB_SET_BLACKRED(parent, gparent, field);\ + elm = gparent; \ + continue; \ + } \ + if (RB_RIGHT(parent, field) == elm) { \ + RB_ROTATE_LEFT(head, parent, tmp, field);\ + tmp = parent; \ + parent = elm; \ + elm = tmp; \ + } \ + RB_SET_BLACKRED(parent, gparent, field); \ + RB_ROTATE_RIGHT(head, gparent, tmp, field); \ + } else { \ + tmp = RB_LEFT(gparent, field); \ + if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ + RB_COLOR(tmp, field) = RB_BLACK; \ + RB_SET_BLACKRED(parent, gparent, field);\ + elm = gparent; \ + continue; \ + } \ + if (RB_LEFT(parent, field) == elm) { \ + RB_ROTATE_RIGHT(head, parent, tmp, field);\ + tmp = parent; \ + parent = elm; \ + elm = tmp; \ + } \ + RB_SET_BLACKRED(parent, gparent, field); \ + RB_ROTATE_LEFT(head, gparent, tmp, field); \ + } \ + } \ + RB_COLOR(head->rbh_root, field) = RB_BLACK; \ +} \ + \ +static void \ +name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, \ + struct type *elm) \ +{ \ + struct type *tmp; \ + while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \ + elm != RB_ROOT(head)) { \ + if (RB_LEFT(parent, field) == elm) { \ + tmp = RB_RIGHT(parent, field); \ + if (RB_COLOR(tmp, field) == RB_RED) { \ + RB_SET_BLACKRED(tmp, parent, field); \ + RB_ROTATE_LEFT(head, parent, tmp, field);\ + tmp = RB_RIGHT(parent, field); \ + } \ + if ((RB_LEFT(tmp, field) == NULL || \ + RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\ + (RB_RIGHT(tmp, field) == NULL || \ + RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\ + RB_COLOR(tmp, field) = RB_RED; \ + elm = parent; \ + parent = RB_PARENT(elm, field); \ + } else { \ + if (RB_RIGHT(tmp, field) == NULL || \ + RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) {\ + struct type *oleft; \ + if ((oleft = RB_LEFT(tmp, field)) \ + != NULL) \ + RB_COLOR(oleft, field) = RB_BLACK;\ + RB_COLOR(tmp, field) = RB_RED; \ + RB_ROTATE_RIGHT(head, tmp, oleft, field);\ + tmp = RB_RIGHT(parent, field); \ + } \ + RB_COLOR(tmp, field) = RB_COLOR(parent, field);\ + RB_COLOR(parent, field) = RB_BLACK; \ + if (RB_RIGHT(tmp, field)) \ + RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK;\ + RB_ROTATE_LEFT(head, parent, tmp, field);\ + elm = RB_ROOT(head); \ + break; \ + } \ + } else { \ + tmp = RB_LEFT(parent, field); \ + if (RB_COLOR(tmp, field) == RB_RED) { \ + RB_SET_BLACKRED(tmp, parent, field); \ + RB_ROTATE_RIGHT(head, parent, tmp, field);\ + tmp = RB_LEFT(parent, field); \ + } \ + if ((RB_LEFT(tmp, field) == NULL || \ + RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\ + (RB_RIGHT(tmp, field) == NULL || \ + RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\ + RB_COLOR(tmp, field) = RB_RED; \ + elm = parent; \ + parent = RB_PARENT(elm, field); \ + } else { \ + if (RB_LEFT(tmp, field) == NULL || \ + RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) {\ + struct type *oright; \ + if ((oright = RB_RIGHT(tmp, field)) \ + != NULL) \ + RB_COLOR(oright, field) = RB_BLACK;\ + RB_COLOR(tmp, field) = RB_RED; \ + RB_ROTATE_LEFT(head, tmp, oright, field);\ + tmp = RB_LEFT(parent, field); \ + } \ + RB_COLOR(tmp, field) = RB_COLOR(parent, field);\ + RB_COLOR(parent, field) = RB_BLACK; \ + if (RB_LEFT(tmp, field)) \ + RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK;\ + RB_ROTATE_RIGHT(head, parent, tmp, field);\ + elm = RB_ROOT(head); \ + break; \ + } \ + } \ + } \ + if (elm) \ + RB_COLOR(elm, field) = RB_BLACK; \ +} \ + \ +struct type * \ +name##_RB_REMOVE(struct name *head, struct type *elm) \ +{ \ + struct type *child, *parent, *old; \ + struct name##_scan_info *inprog; \ + int color; \ + \ + for (inprog = RB_INPROG(head); inprog; inprog = inprog->link) { \ + if (inprog->node == elm) \ + inprog->node = RB_NEXT(name, head, elm); \ + } \ + \ + old = elm; \ + if (RB_LEFT(elm, field) == NULL) \ + child = RB_RIGHT(elm, field); \ + else if (RB_RIGHT(elm, field) == NULL) \ + child = RB_LEFT(elm, field); \ + else { \ + struct type *left; \ + elm = RB_RIGHT(elm, field); \ + while ((left = RB_LEFT(elm, field)) != NULL) \ + elm = left; \ + child = RB_RIGHT(elm, field); \ + parent = RB_PARENT(elm, field); \ + color = RB_COLOR(elm, field); \ + if (child) \ + RB_PARENT(child, field) = parent; \ + if (parent) { \ + if (RB_LEFT(parent, field) == elm) \ + RB_LEFT(parent, field) = child; \ + else \ + RB_RIGHT(parent, field) = child; \ + RB_AUGMENT(parent); \ + } else \ + RB_ROOT(head) = child; \ + if (RB_PARENT(elm, field) == old) \ + parent = elm; \ + (elm)->field = (old)->field; \ + if (RB_PARENT(old, field)) { \ + if (RB_LEFT(RB_PARENT(old, field), field) == old)\ + RB_LEFT(RB_PARENT(old, field), field) = elm;\ + else \ + RB_RIGHT(RB_PARENT(old, field), field) = elm;\ + RB_AUGMENT(RB_PARENT(old, field)); \ + } else \ + RB_ROOT(head) = elm; \ + RB_PARENT(RB_LEFT(old, field), field) = elm; \ + if (RB_RIGHT(old, field)) \ + RB_PARENT(RB_RIGHT(old, field), field) = elm; \ + if (parent) { \ + left = parent; \ + do { \ + RB_AUGMENT(left); \ + } while ((left = RB_PARENT(left, field)) != NULL); \ + } \ + goto color; \ + } \ + parent = RB_PARENT(elm, field); \ + color = RB_COLOR(elm, field); \ + if (child) \ + RB_PARENT(child, field) = parent; \ + if (parent) { \ + if (RB_LEFT(parent, field) == elm) \ + RB_LEFT(parent, field) = child; \ + else \ + RB_RIGHT(parent, field) = child; \ + RB_AUGMENT(parent); \ + } else \ + RB_ROOT(head) = child; \ +color: \ + if (color == RB_BLACK) \ + name##_RB_REMOVE_COLOR(head, parent, child); \ + return (old); \ +} \ + \ +/* Inserts a node into the RB tree */ \ +struct type * \ +name##_RB_INSERT(struct name *head, struct type *elm) \ +{ \ + struct type *tmp; \ + struct type *parent = NULL; \ + int comp = 0; \ + tmp = RB_ROOT(head); \ + while (tmp) { \ + parent = tmp; \ + comp = (cmp)(elm, parent); \ + if (comp < 0) \ + tmp = RB_LEFT(tmp, field); \ + else if (comp > 0) \ + tmp = RB_RIGHT(tmp, field); \ + else \ + return(tmp); \ + } \ + RB_SET(elm, parent, field); \ + if (parent != NULL) { \ + if (comp < 0) \ + RB_LEFT(parent, field) = elm; \ + else \ + RB_RIGHT(parent, field) = elm; \ + RB_AUGMENT(parent); \ + } else \ + RB_ROOT(head) = elm; \ + name##_RB_INSERT_COLOR(head, elm); \ + return (NULL); \ +} \ + \ +/* Finds the node with the same key as elm */ \ +struct type * \ +name##_RB_FIND(struct name *head, struct type *elm) \ +{ \ + struct type *tmp = RB_ROOT(head); \ + int comp; \ + while (tmp) { \ + comp = cmp(elm, tmp); \ + if (comp < 0) \ + tmp = RB_LEFT(tmp, field); \ + else if (comp > 0) \ + tmp = RB_RIGHT(tmp, field); \ + else \ + return (tmp); \ + } \ + return (NULL); \ +} \ + \ +/* \ + * Issue a callback for all matching items. The scan function must \ + * return < 0 for items below the desired range, 0 for items within \ + * the range, and > 0 for items beyond the range. Any item may be \ + * deleted while the scan is in progress. \ + */ \ +static int \ +name##_SCANCMP_ALL(struct type *type, void *data) \ +{ \ + return(0); \ +} \ + \ +int \ +name##_RB_SCAN(struct name *head, \ + int (*scancmp)(struct type *, void *), \ + int (*callback)(struct type *, void *), \ + void *data) \ +{ \ + struct name##_scan_info info; \ + struct name##_scan_info **infopp; \ + struct type *best; \ + struct type *tmp; \ + int count; \ + int comp; \ + \ + if (scancmp == NULL) \ + scancmp = name##_SCANCMP_ALL; \ + \ + /* \ + * Locate the first element. \ + */ \ + tmp = RB_ROOT(head); \ + best = NULL; \ + while (tmp) { \ + comp = scancmp(tmp, data); \ + if (comp < 0) { \ + tmp = RB_RIGHT(tmp, field); \ + } else if (comp > 0) { \ + tmp = RB_LEFT(tmp, field); \ + } else { \ + best = tmp; \ + if (RB_LEFT(tmp, field) == NULL) \ + break; \ + tmp = RB_LEFT(tmp, field); \ + } \ + } \ + count = 0; \ + if (best) { \ + info.node = RB_NEXT(name, head, best); \ + info.link = RB_INPROG(head); \ + RB_INPROG(head) = &info; \ + while ((comp = callback(best, data)) >= 0) { \ + count += comp; \ + best = info.node; \ + if (best == NULL || scancmp(best, data) != 0) \ + break; \ + info.node = RB_NEXT(name, head, best); \ + } \ + if (comp < 0) /* error or termination */ \ + count = comp; \ + infopp = &RB_INPROG(head); \ + while (*infopp != &info) \ + infopp = &(*infopp)->link; \ + *infopp = info.link; \ + } \ + return(count); \ +} \ + \ +/* ARGSUSED */ \ +struct type * \ +name##_RB_NEXT(struct type *elm) \ +{ \ + if (RB_RIGHT(elm, field)) { \ + elm = RB_RIGHT(elm, field); \ + while (RB_LEFT(elm, field)) \ + elm = RB_LEFT(elm, field); \ + } else { \ + if (RB_PARENT(elm, field) && \ + (elm == RB_LEFT(RB_PARENT(elm, field), field))) \ + elm = RB_PARENT(elm, field); \ + else { \ + while (RB_PARENT(elm, field) && \ + (elm == RB_RIGHT(RB_PARENT(elm, field), field)))\ + elm = RB_PARENT(elm, field); \ + elm = RB_PARENT(elm, field); \ + } \ + } \ + return (elm); \ +} \ + \ +struct type * \ +name##_RB_MINMAX(struct name *head, int val) \ +{ \ + struct type *tmp = RB_ROOT(head); \ + struct type *parent = NULL; \ + while (tmp) { \ + parent = tmp; \ + if (val < 0) \ + tmp = RB_LEFT(tmp, field); \ + else \ + tmp = RB_RIGHT(tmp, field); \ + } \ + return (parent); \ +} + +#define RB_NEGINF -1 +#define RB_INF 1 + +#define RB_INSERT(name, x, y) name##_RB_INSERT(x, y) +#define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y) +#define RB_FIND(name, x, y) name##_RB_FIND(x, y) +#define RB_SCAN(name, root, cmp, callback, data) \ + name##_RB_SCAN(root, cmp, callback, data) +#define RB_NEXT(name, x, y) name##_RB_NEXT(y) +#define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF) +#define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF) + +#define RB_FOREACH(x, name, head) \ + for ((x) = RB_MIN(name, head); \ + (x) != NULL; \ + (x) = name##_RB_NEXT(x)) + +#endif /* _SYS_TREE_H_ */