This file contains diffs from version 3.60 of GNU Make to version 3.62. Changes in files that are generated by etags and TeX have been omitted. diff -c2 -r +new-file make-3.60 make-3.62 diff -c2 -r +new-file make-3.60/CHANGES make-3.62/CHANGES *** make-3.60/CHANGES Sat Mar 23 09:25:59 1991 --- make-3.62/CHANGES Tue Sep 24 01:18:29 1991 *************** *** 2,5 **** --- 2,19 ---- ========================================================================== + Version 3.61 + + * Built-in rules for C++ source files with the `.C' suffix. + We still recommend that you use `.cc' instead. + + * If commands are given too many times for a single target, + the last set given is used, and a warning message is printed. + + * Error messages about makefiles are in standard GNU error format, + so C-x ` in Emacs works on them. + + * Dependencies of pattern rules which contain no % need not actually exist + if they can be created (just like dependencies which do have a %). + Version 3.60 diff -c2 -r +new-file make-3.60/COPYING make-3.62/COPYING *** make-3.60/COPYING Tue Feb 28 18:32:36 1989 --- make-3.62/COPYING Mon Jun 3 16:36:55 1991 *************** *** 1,7 **** GNU GENERAL PUBLIC LICENSE ! Version 1, February 1989 ! Copyright (C) 1989 Free Software Foundation, Inc. ! 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. --- 1,7 ---- GNU GENERAL PUBLIC LICENSE ! Version 2, June 1991 ! Copyright (C) 1989, 1991 Free Software Foundation, Inc. ! 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. *************** *** 9,26 **** Preamble ! The license agreements of most software companies try to keep users ! at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free ! software--to make sure the software is free for all its users. The ! General Public License applies to the Free Software Foundation's ! software and to any other program whose authors commit to using it. ! You can use it for your programs, too. When we speak of free software, we are referring to freedom, not ! price. Specifically, the General Public License is designed to make ! sure that you have the freedom to give away or sell copies of free ! software, 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. To protect your rights, we need to make restrictions that forbid --- 9,28 ---- Preamble ! The licenses for most software are designed to take away your ! freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free ! software--to make sure the software is free for all its users. This ! General Public License applies to most of the Free Software ! Foundation's software and to any other program whose authors commit to ! using it. (Some other Free Software Foundation software is covered by ! the GNU Library General Public License instead.) You can apply it to ! your programs, too. 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 ! this service 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. To protect your rights, we need to make restrictions that forbid *************** *** 29,36 **** distribute copies of the software, or if you modify it. ! For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the ! source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and --- 31,39 ---- distribute copies of the software, or if you modify it. ! For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the ! source code. And you must show them these terms so they know their ! rights. We protect your rights with two steps: (1) copyright the software, and *************** *** 45,48 **** --- 48,57 ---- authors' reputations. + Finally, any free program is threatened constantly by software + patents. We wish to avoid the danger that redistributors of a free + program will individually obtain patent licenses, in effect making the + program proprietary. To prevent this, we have made it clear that any + patent must be licensed for everyone's free use or not licensed at all. + The precise terms and conditions for copying, distribution and modification follow. *************** *** 51,149 **** TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ! 0. This License Agreement applies to any program or other work which ! contains a notice placed by the copyright holder saying it may be ! distributed under the terms of this General Public License. The ! "Program", below, refers to any such program or work, and a "work based ! on the Program" means either the Program or any work containing the ! Program or a portion of it, either verbatim or with modifications. Each ! licensee is addressed as "you". ! ! 1. You may copy and distribute 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 and ! disclaimer of warranty; keep intact all the notices that refer to this ! General Public License and to the absence of any warranty; and give any ! other recipients of the Program a copy of this General Public License ! along with the Program. You may charge a fee for the physical act of ! transferring a copy. ! ! 2. You may modify your copy or copies of the Program or any portion of ! it, and copy and distribute such modifications under the terms of Paragraph ! 1 above, provided that you also do the following: ! ! a) cause the modified files to carry prominent notices stating that ! you changed the files and the date of any change; and ! ! b) cause the whole of any work that you distribute or publish, that ! in whole or in part contains the Program or any part thereof, either ! with or without modifications, to be licensed at no charge to all ! third parties under the terms of this General Public License (except ! that you may choose to grant warranty protection to some or all ! third parties, at your option). ! ! c) If the modified program normally reads commands interactively when ! run, you must cause it, when started running for such interactive use ! in the simplest and most usual way, to print or display an ! announcement including an appropriate copyright notice and a notice ! that there is no warranty (or else, saying that you provide a ! warranty) and that users may redistribute the program under these ! conditions, and telling the user how to view a copy of this General ! Public License. ! ! d) You may charge a fee for the physical act of transferring a ! copy, and you may at your option offer warranty protection in ! exchange for a fee. ! ! Mere aggregation of another independent work with the Program (or its ! derivative) on a volume of a storage or distribution medium does not bring ! the other work under the scope of these terms. ! 3. You may copy and distribute the Program (or a portion or derivative of ! it, under Paragraph 2) in object code or executable form under the terms of ! Paragraphs 1 and 2 above provided that you also do one of the following: ! ! a) accompany it with the complete corresponding machine-readable ! source code, which must be distributed under the terms of ! Paragraphs 1 and 2 above; or, ! ! b) accompany it with a written offer, valid for at least three ! years, to give any third party free (except for a nominal charge ! for the cost of distribution) a complete machine-readable copy of the ! corresponding source code, to be distributed under the terms of ! Paragraphs 1 and 2 above; or, ! c) accompany it with the information you received as to where the ! corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you ! received the program in object code or executable form alone.) ! Source code for a work means the preferred form of the work for making ! modifications to it. For an executable file, complete source code means ! all the source code for all modules it contains; but, as a special ! exception, it need not include source code for modules which are standard ! libraries that accompany the operating system on which the executable ! file runs, or for standard header files or definitions files that ! accompany that operating system. ! ! 4. You may not copy, modify, sublicense, distribute or transfer the ! Program except as expressly provided under this General Public License. ! Any attempt otherwise to copy, modify, sublicense, distribute or transfer ! the Program is void, and will automatically terminate your rights to use ! the Program under this License. However, parties who have received ! copies, or rights to use copies, from you under this General Public ! License will not have their licenses terminated so long as such parties ! remain in full compliance. ! ! 5. By copying, distributing or modifying the Program (or any work based ! on the Program) you indicate your acceptance of this license to do so, ! and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the ! Program), the recipient automatically receives a license from the original ! licensor to copy, distribute or modify the Program subject to these ! terms and conditions. You may not impose any further restrictions on the ! recipients' exercise of the rights granted herein. ! 7. The Free Software Foundation may publish revised and/or new versions of the 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 --- 60,239 ---- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ! 0. This License applies to any program or other work which contains ! a notice placed by the copyright holder saying it may be distributed ! under the terms of this General Public License. The "Program", below, ! refers to any such program or work, and a "work based on the Program" ! means either the Program or any derivative work under copyright law: ! that is to say, a work containing the Program or a portion of it, ! either verbatim or with modifications and/or translated into another ! language. (Hereinafter, translation is included without limitation in ! the term "modification".) Each licensee is addressed as "you". ! ! Activities other than copying, distribution and modification are not ! covered by this License; they are outside its scope. The act of ! running the Program is not restricted, and the output from the Program ! is covered only if its contents constitute a work based on the ! Program (independent of having been made by running the Program). ! Whether that is true depends on what the Program does. ! ! 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the ! notices that refer to this License and to the absence of any warranty; ! and give any other recipients of the Program a copy of this License ! along with the Program. ! ! You may charge a fee for the physical act of transferring a copy, and ! you may at your option offer warranty protection in exchange for a fee. ! ! 2. You may modify your copy or copies of the Program or any portion ! of it, thus forming a work based on the Program, and copy and ! distribute such modifications or work under the terms of Section 1 ! above, provided that you also meet all of these conditions: ! ! a) You must cause the modified files to carry prominent notices ! stating that you changed the files and the date of any change. ! ! b) You must cause any work that you distribute or publish, that in ! whole or in part contains or is derived from the Program or any ! part thereof, to be licensed as a whole at no charge to all third ! parties under the terms of this License. ! ! c) If the modified program normally reads commands interactively ! when run, you must cause it, when started running for such ! interactive use in the most ordinary way, to print or display an ! announcement including an appropriate copyright notice and a ! notice that there is no warranty (or else, saying that you provide ! a warranty) and that users may redistribute the program under ! these conditions, and telling the user how to view a copy of this ! License. (Exception: if the Program itself is interactive but ! does not normally print such an announcement, your work based on ! the Program is not required to print an announcement.) ! These requirements apply to the modified work as a whole. If ! identifiable sections of that work are not derived from the Program, ! and can be reasonably considered independent and separate works in ! themselves, then this License, and its terms, do not apply to those ! sections when you distribute them as separate works. But when you ! distribute the same sections as part of a whole which is a work based ! on the Program, the distribution of the whole must be on the terms of ! this License, whose permissions for other licensees extend to the ! entire whole, and thus to each and every part regardless of who wrote it. ! ! Thus, it is not the intent of this section to claim rights or contest ! your rights to work written entirely by you; rather, the intent is to ! exercise the right to control the distribution of derivative or ! collective works based on the Program. ! ! In addition, mere aggregation of another work not based on the Program ! with the Program (or with a work based on the Program) on a volume of ! a storage or distribution medium does not bring the other work under ! the scope of this License. ! ! 3. You may copy and distribute the Program (or a work based on it, ! under Section 2) in object code or executable form under the terms of ! Sections 1 and 2 above provided that you also do one of the following: ! ! a) Accompany it with the complete corresponding machine-readable ! source code, which must be distributed under the terms of Sections ! 1 and 2 above on a medium customarily used for software interchange; or, ! ! b) Accompany it with a written offer, valid for at least three ! years, to give any third party, for a charge no more than your ! cost of physically performing source distribution, a complete ! machine-readable copy of the corresponding source code, to be ! distributed under the terms of Sections 1 and 2 above on a medium ! customarily used for software interchange; or, ! c) Accompany it with the information you received as to the offer ! to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you ! received the program in object code or executable form with such ! an offer, in accord with Subsection b above.) ! The source code for a work means the preferred form of the work for ! making modifications to it. For an executable work, complete source ! code means all the source code for all modules it contains, plus any ! associated interface definition files, plus the scripts used to ! control compilation and installation of the executable. However, as a ! special exception, the source code distributed need not include ! anything that is normally distributed (in either source or binary ! form) with the major components (compiler, kernel, and so on) of the ! operating system on which the executable runs, unless that component ! itself accompanies the executable. ! ! If distribution of executable or object code is made by offering ! access to copy from a designated place, then offering equivalent ! access to copy the source code from the same place counts as ! distribution of the source code, even though third parties are not ! compelled to copy the source along with the object code. ! ! 4. You may not copy, modify, sublicense, or distribute the Program ! except as expressly provided under this License. Any attempt ! otherwise to copy, modify, sublicense or distribute the Program is ! void, and will automatically terminate your rights under this License. ! However, parties who have received copies, or rights, from you under ! this License will not have their licenses terminated so long as such ! parties remain in full compliance. ! ! 5. You are not required to accept this License, since you have not ! signed it. However, nothing else grants you permission to modify or ! distribute the Program or its derivative works. These actions are ! prohibited by law if you do not accept this License. Therefore, by ! modifying or distributing the Program (or any work based on the ! Program), you indicate your acceptance of this License to do so, and ! all its terms and conditions for copying, distributing or modifying ! the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the ! Program), the recipient automatically receives a license from the ! original licensor to copy, distribute or modify the Program subject to ! these terms and conditions. You may not impose any further ! restrictions on the recipients' exercise of the rights granted herein. ! You are not responsible for enforcing compliance by third parties to ! this License. ! ! 7. If, as a consequence of a court judgment or allegation of patent ! infringement or for any other reason (not limited to patent issues), ! 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 ! distribute so as to satisfy simultaneously your obligations under this ! License and any other pertinent obligations, then as a consequence you ! may not distribute the Program at all. For example, if a patent ! license would not permit royalty-free redistribution of the Program by ! all those who receive copies directly or indirectly through you, then ! the only way you could satisfy both it and this License would be to ! refrain entirely from distribution of the Program. ! ! If any portion of this section is held invalid or unenforceable under ! any particular circumstance, the balance of the section is intended to ! apply and the section as a whole is intended to apply in other ! circumstances. ! ! It is not the purpose of this section to induce you to infringe any ! patents or other property right claims or to contest validity of any ! such claims; this section has the sole purpose of protecting the ! integrity of the free software distribution system, which is ! implemented by public license practices. Many people have made ! generous contributions to the wide range of software distributed ! through that system in reliance on consistent application of that ! system; it is up to the author/donor to decide if he or she is willing ! to distribute software through any other system and a licensee cannot ! impose that choice. ! ! This section is intended to make thoroughly clear what is believed to ! be a consequence of the rest of this License. ! 8. If the distribution and/or use of the Program is restricted in ! certain countries either by patents or by copyrighted interfaces, the ! original copyright holder who places the Program under this License ! may add an explicit geographical distribution limitation excluding ! those countries, so that distribution is permitted only in or among ! countries not thus excluded. In such case, this License incorporates ! the limitation as if written in the body of this License. ! ! 9. The Free Software Foundation may publish revised and/or new versions of the 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 *************** *** 151,162 **** Each version is given a distinguishing version number. If the Program ! specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of ! the license, you may choose any version ever published by the Free Software Foundation. ! 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free --- 241,252 ---- Each version is given a distinguishing version number. If the Program ! specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of ! this License, you may choose any version ever published by the Free Software Foundation. ! 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free *************** *** 168,172 **** NO WARRANTY ! 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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 --- 258,262 ---- NO WARRANTY ! 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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 *************** *** 178,182 **** REPAIR OR CORRECTION. ! 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, --- 268,272 ---- REPAIR OR CORRECTION. ! 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, *************** *** 193,204 **** If you develop a new program, and you want it to be of the greatest ! possible use to humanity, 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 convey ! the exclusion of warranty; and each file should have at least the ! "copyright" line and a pointer to where the full notice is found. --- 283,293 ---- 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 ! convey the exclusion of warranty; and each file should have at least ! the "copyright" line and a pointer to where the full notice is found. *************** *** 207,212 **** This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) ! any later version. This program is distributed in the hope that it will be useful, --- 296,301 ---- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2 of the License, or ! (at your option) any later version. This program is distributed in the hope that it will be useful, *************** *** 224,228 **** when it starts in an interactive mode: ! Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it --- 313,317 ---- when it starts in an interactive mode: ! Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it *************** *** 229,245 **** under certain conditions; type `show c' for details. ! The hypothetical commands `show w' and `show c' should show the ! appropriate parts of the General Public License. Of course, the ! commands you use may be called something other than `show w' and `show ! c'; they could even be mouse-clicks or menu items--whatever suits your ! program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if ! necessary. Here a sample; alter the names: ! Yoyodyne, Inc., hereby disclaims all copyright interest in the ! program `Gnomovision' (a program to direct compilers to make passes ! at assemblers) written by James Hacker. , 1 April 1989 --- 318,332 ---- under certain conditions; type `show c' for details. ! The hypothetical commands `show w' and `show c' should show the appropriate ! parts of the General Public License. Of course, the commands you use may ! be called something other than `show w' and `show c'; they could even be ! mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if ! necessary. Here is a sample; alter the names: ! Yoyodyne, Inc., hereby disclaims all copyright interest in the program ! `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 *************** *** 246,248 **** Ty Coon, President of Vice ! That's all there is to it! --- 333,339 ---- Ty Coon, President of Vice ! This General Public License does not permit incorporating your program into ! proprietary programs. If your program is a subroutine library, you may ! consider it more useful to permit linking proprietary applications with the ! library. If this is what you want to do, use the GNU Library General ! Public License instead of this License. diff -c2 -r +new-file make-3.60/ChangeLog make-3.62/ChangeLog *** make-3.60/ChangeLog Sat May 25 02:42:32 1991 --- make-3.62/ChangeLog Tue Oct 29 21:01:31 1991 *************** *** 1,2 **** --- 1,387 ---- + Tue Oct 29 20:57:36 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 3.62. + + * remake.c (update_file_1): Check for deps still running before + giving up if any dep has failed. + + Sat Oct 26 16:20:00 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * make.h [uts]: #undef S_ISREG and S_ISDIR if defined. + + Fri Oct 25 19:50:39 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 3.60.17. + + Thu Oct 24 16:58:36 1991 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) + + * job.c (start_job): Don't check for empty cmds before tweaking the + command_ptr. Just let construct_command_argv do it. + + Tue Oct 22 20:21:03 1991 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) + + * remake.c, arscan.c [POSIX]: instead of . + + * make.h [POSIX]: Declare vfork as pid_t. + + Mon Oct 21 15:37:30 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 3.60.16. + + * job.c (construct_command_argv, construct_command_argv_internal): + Take new 2nd arg RESTP. If non-NULL, stop parsing at newline, and + store addr of the NL in *RESTP. + (start_job): Don't chop expanded cmd lines up; use above code to do it. + * function.c (expand_function: `shell'): Pass RESTP==NULL. + + Sat Oct 19 15:36:34 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 3.60.15. + + Fri Oct 18 15:26:55 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * job.c (start_job): If on the same cmds->command_lines elt, look + at cmds->lines_recurse[CHILD->command_line - 1] instead of + [CHILD->command_line]. + + * dirc [sgi]: , not ndir or anything else. + + Thu Oct 17 16:28:55 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * file.c (print_file_data_base): Remove unused var. + + * make.h [NeXT]: No #define ANSI_STRING. + + Tue Oct 15 20:08:41 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * Version 3.60.14. + + Fri Oct 11 16:23:52 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * make.h: Use PATH_MAX for getwd defn. + + * make.h: Move getcwd/getwd outside of #ifndef POSIX, and make it + #if USG||POSIX. + + Thu Oct 10 11:53:31 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * Version 3.60.13. + + * read.c (read_all_makefiles): When processing MAKEFILES, save the + malloc'd ptr to be freed, instead of freeing part-way thru it. + + * remake.c (update_file_1): Don't tweak FILE->also_make. + (update_file): Do it here. After calling update_file_1, set the + command_state, update_status, and updated members of each also_make + elt to FILE's values. + + Tue Oct 8 14:56:04 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * Version 3.60.12. + + * remake.c (notice_finished_file): Set command_state of FILE and + its also_make chain to cs_finished here. + * commands.c (execute_file_commands), job.c (child_handler), + remake.c (remake_file): Don't set it before calling + notice_finished_file. + + * file.h (struct file): Changed `also_make' to struct dep *. + * job.c (delete_child_targets), file.c (print_file_data_base), + remake.c (notice_finished_file), implicit.c (pattern_search): + Use dep chain instead of array of file names. + + Mon Oct 7 17:04:33 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * Version 3.60.11. + + * arscan.c: Declare open. + * misc.c: Declare {get,set}{re,}[ug]id. + * variable.c (target_environment): Declare getenv. + + Sat Oct 5 15:13:03 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * make.h [NeXT]: instead of . + + Fri Oct 4 16:05:41 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * default.c (default_suffixes, defualt_suffix_rules): Add .texi + just like .texinfo. + + * Version 3.60.10. + + * job.c: Move vfork decl into make.h. + + Fri Sep 27 18:45:30 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * compatMakefile (glob/libglob.a): Pass CC value to submake. + + Thu Sep 26 00:08:15 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * load.c (load_average): Made not static. + + * load.c [ultrix && vax]: Define LDAV_TYPE and LDAV_CVT for Ultrix 4.2. + + Tue Sep 24 00:17:20 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 3.60.9. + + * read.c (record_files): Warn about extra cmds even if the target's + name begins with a dot. I think the lusers can handle this. + + Mon Sep 23 22:33:26 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * make.h, arscan.c: Don't declare bcmp, bzero, or bcopy if they're + #define'd. + * make.h: Declare write and open. + + * default.c (default_suffixes, default_suffix_rules, + default_variables): Add .C just like .cc. + * make.texinfo (Catalogue of Rules): Document .C. + + * make.man (-w): Fix gramo. + + Fri Sep 20 17:18:16 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * make.h: No text after #endif. + + Sun Sep 15 16:20:46 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * Version 3.60.8. + + * implicit.c (pattern_search): In the second pass, recurse on rule + deps that don't have a %. Why did I make it not do this? + + Fri Sep 14 18:29:39 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * read.c (record_files): For extra cmds, use the last ones given. + If the target's name doesn't begin with a dot (bletch!!), emit a + two-line warning, one line giving the old cmds' location and the + other the new cmds' location. + + * misc.c (makefile_error, makefile_fatal): New fns. + * make.h: Declare them. + * Use them instead of error/fatal for all msgs including a file + name and line number. + + Thu Sep 13 16:35:54 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * make.h: Declare define_default_variables. + Declare ar_parse_name, instead of ar_name_parse (M-t). + + Mon Sep 10 18:35:40 1991 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) + + * Version 3.60.7. + + * make.texinfo (Variables: Setting): Say whitespace is removed if + "immediately after =", rather than simply "after =". + + * job.c: Don't declare wait #ifdef POSIX. + + * make.h [__GNUC__]: #undef alloca and then #define it. + + * main.c (main): When pruning makefiles which might loop from the + read_makefiles chain, look at all `prev' entries of double-colon rules. + + Fri Sep 7 00:41:53 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * main.c (main): Only remove makefiles with cmds but no deps from + the list of makefiles to be rebuilt if they are :: targets. + : targets with cmds and no deps are not dangerous. + + Wed Sep 5 17:35:51 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * compatMakefile (defines): Add comment that some compilers take + ENUM_BITFIELDS but produce bogus code. + (LOAD_AVG): Fix examples to \ "s. + (LOADLIBES): Add comment that SGI Irix needs -lmld for nlist. + + Tue Sep 4 20:26:26 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 3.60.6. + + Fri Aug 30 19:34:04 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * remake.c (update_file_1): When checking the command_state of + deps, check through the prev chain. + (update_goal_chain): When a target is finished, start checking its + prev (if it has one) instead. + + Wed Aug 7 17:32:03 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * rule.c (convert_to_pattern): Allow files with deps to define + suffix rules (really this time). + + Mon Aug 5 17:09:21 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * misc.c (user_access, make_access): Do saved-IDs (USG) flavor + #ifdef POSIX. + + * file.c (enter_file): Strip ./s here. + * read.c (parse_file_seq): Not here. + + Tue Jul 23 23:34:30 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * compatMakefile: Added comment that -lPW alloca is broken on HPUX. + + Thu Jul 18 03:10:41 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 3.60.5. + + * read.c (read_makefile): Ignore lines containing chars that are + all isspace, not just all isblank. + + * make.texinfo (Copying): @include gpl.texinfo, rather than copying + the text. + * gpl.texinfo: New file (symlink to /gd/gnu/doc/gpl.texinfo). + * GNUmakefile: Put gpl.texinfo in distribution. + + Tue Jul 16 12:50:35 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * make.h: #define _GNU_SOURCE before including headers. + Include and define isblank if doesn't. + * commands.c: Don't include here. + * *.c: Use isblank instead of explicit ' ' || '\t'. + + Mon Jul 15 17:43:38 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * function.c (expand_function: `filter'/`filter-out'): Fixed to not + loop infinitely. + + Fri Jul 12 12:18:12 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * function.c (expand_function: `filter'/`filter-out'): Rewritten to + handle filter-out of multiple patterns properly. Also no longer + mallocs and reallocs for temp array; uses alloca and a linked-list + instead. + + Wed Jul 10 22:34:54 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 3.60.4. + + * make.texinfo: Moved some @groups that were outside @examples to + be inside them. + + * load.c [apollo] (load_average): Define using special syscall for + Apollo DOMAIN/OS SR10.n. + + Thu Jul 4 12:32:53 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * make.texinfo (Missing): Added Unix excessive implicit rule + search; mention that POSIX.2 doesn't require any of the missing + features. + (Top): Updated printed manual price to $15. + + Wed Jul 3 18:17:50 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * file.c (rename_file): Carry over last_mtime when merging files. + * remake.c (f_mtime): Tail-recurse after renaming VPATH file, to + check for saved date in existing renamed-to file. + + * remote-cstms.c (start_remote_job): Use PATH_VAR. + + * commands.c [POSIX || __GNU_LIBRARY__]: Don't declare getpid. + + * compatMakefile (glob-{clean,realclean}): Run clean/realclean in glob. + (clean, realclean): Require those. + + * make.h: Always declare environ. + Don't declare old glob functions. + + * GNUmakefile: Make no-lib deps for load.c and remote.c. + + Tue Jul 2 18:35:20 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 3.60.3. + + Mon Jul 1 16:58:30 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * read.c (multi_glob): Don't pass GLOB_QUOTE flag to glob. + + * make.h [POSIX]: Include , and don't declare things that + should be there. + + * main.c (main) [USG && sgi]: malloc a buffer for broken sgi stdio. + + Sat Jun 29 11:22:21 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * function.c (expand_function: `shell'): Use alloca for the error + msg buffer, instead of assuming an arbitrary max size. + + Fri Jun 28 18:15:08 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * job.c [POSIX] (search_path): Do real 1003.1 goop to get NGROUPS_MAX. + + Wed Jun 26 11:04:44 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * default.c (define_default_variables): New fn. + (install_default_implicit_rules): Code for above fn moved there. + * main.c (main): Do define_default_variables before reading the + makefile. + + Tue Jun 25 17:30:46 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * main.c (main): Quote ; in MAKEOVERRIDES. + + Tue Jun 18 13:56:30 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * compatMakefile: Fixed typo in comment. + + Tue Jun 11 00:14:59 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * Version 3.60.2. + + Mon Jun 10 14:46:37 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * make.h: Always include . + [POSIX]: Include and #define MAXPATHLEN to be PATH_MAX. + + * default.c (default_suffix_rules: .texinfo.dvi): Use $(TEXI2DVI). + (default_variables): Define TEXI2DVI. + + Thu Jun 6 16:49:19 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * Version 3.60.1. + + * make.h (SIGNAL): Cast handler arg to SIGHANDLER type. + + Wed Jun 5 06:00:43 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * read.c (multi_glob): Use POSIX.2 `glob' function. + If a glob pattern matches nothing, leave it as is (a la sh, bash). + Also, if can't find USER for ~USER, leave it as is (a la bash). + + Mon Jun 3 16:36:00 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * compatMakefile: Rewrote comments about -Ds to be easier to use. + + * make.h, arscan.c, remake.c, main.c, dir.c, job.c: Changed tests + of _POSIX_SOURCE to POSIX. + + * job.c: Take getdtablesize out of #ifdef __GNU_LIBRARY__. + Put separately #ifdef USG. + + * COPYING: Replaced with version 2. + * Changed copyright notices to refer to GPL v2. + + Thu May 30 00:31:11 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * make.h: Don't declare sigblock for POSIX. + + * main.c (main, log_working_directory) [USG]: Get getcwd failure + mode from errno, not passed buffer like BSD getwd. + + * misc.c (child_access): New fn to set access for a child process; + like user_access, but you can't change back. + * make.h: Declare it. + * job.c (exec_command): Use it in place of user_access. + + Wed May 29 23:28:48 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * default.c (default_variables) [pyr]: PC = pascal. + + Tue May 28 20:24:56 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * variable.c (print_variable): Put a newline before `endef'. + Sat May 25 02:39:52 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu) diff -c2 -r +new-file make-3.60/Makefile make-3.62/Makefile *** make-3.60/Makefile Sat May 25 02:53:39 1991 --- make-3.62/Makefile Tue Oct 29 21:04:26 1991 *************** *** 1,3 **** ! # Copyright (C) 1988, 1989 Free Software Foundation, Inc. # This file is part of GNU Make. # --- 1,3 ---- ! # Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. # This file is part of GNU Make. # *************** *** 4,8 **** # GNU Make is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 1, or (at your option) # any later version. # --- 4,8 ---- # GNU Make is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by ! # the Free Software Foundation; either version 2, or (at your option) # any later version. # *************** *** 23,47 **** LDFLAGS = -g ! # Define nothing for BSD, USG for System V, and USGr3 (as well as USG) for ! # SVR3, HPUX for HP-UX (as well as USG or USGr3 as appropriate). If you have a ! # USG hybrid with and wait3, define HAVE_SYS_WAIT. If you are USG ! # but have sys_siglist, define HAVE_SIGLIST. If you are USG, and not USGr3, ! # but have dup2, define HAVE_DUP2. If your `cc' command doesn't grok -o ! # options with -c (true for many 4.2 BSD derivatives), define ! # NO_MINUS_C_MINUS_O. If you don't want archive support, define NO_ARCHIVES. ! # If you want to avoid use of floating-point numbers, define NO_FLOAT. If your ! # compiler can handle `enum' bitfields (and it's not GCC), define ! # ENUM_BITFIELDS. defines = ! # Define UMAX here to use Encore's inq_stats call. Define UMAX_43 (and UMAX) ! # if you have UMAX 4.3 instead of UMAX 4.2. If the load average is in a symbol ! # in /dev/kmem, define KERNEL_FILE_NAME if not "/vmunix", LDAV_SYMBOL if not ! # "_avenrun", LDAV_TYPE if not `long int', and LDAV_CVT to convert the ! # LDAV_TYPE value from LDAV_SYMBOL (in `load') to a double if this is not ! # "(double) load". If a `struct nlist' (as defined in ) has a `n_un' ! # union, rather than a simple `n_name' member, define NLIST_NAME_UNION. If the ! # `n_name' member of a `struct nlist' is an array that must be copied into, ! # define NLIST_NAME_ARRAY. Otherwise, define NO_LDAV. LOAD_AVG = --- 23,56 ---- LDFLAGS = -g ! # Define these for your system as follows: ! # -DUSG System V ! # -DUSGr3 SVR3 (also define USG) ! # -DHPUX HP-UX (also define USG and USGr3 appropriately) ! # -DHAVE_SYS_WAIT USG, but have and wait3 ! # -DHAVE_SIGLIST USG, but have sys_siglist ! # -DHAVE_DUP2 USG and not USGr3, but have dup2 ! # -DNO_MINUS_C_MINUS_O cc can't handle "cc -c foo.c -o foo.o" ! # -DPOSIX A 1003.1 system (or trying to be) ! # -DNO_ARCHIVES To disable `ar' archive support. ! # -DNO_FLOAT To avoid using floating-point numbers. ! # -DENUM_BITFIELDS If the compiler isn't GCC but groks enum foo:2. ! # Some compilers apparently accept this ! # without complaint but produce losing code, ! # so beware. ! # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline. defines = ! # Define these for your system as follows: ! # -DUMAX Encore UMAX ! # -DUMAX_43 Encore UMAX 4.3 (also define UMAX) ! # -DNO_LDAV Disable load-average checking. ! # To read /dev/kmem (most Unix systems), define these if different from the ! # given defaults: ! # -DKERNEL_FILE_NAME=\"/vmunix\" ! # -DLDAV_SYMBOL=\"_avenrun\" ! # -DLDAV_CVT="(double) load" ! # Define: ! # -DNLIST_NAME_UNION If `struct nlist' has a n_un member. ! # -DNLIST_NAME_ARRAY If `n_name' is an array. LOAD_AVG = *************** *** 51,55 **** # If your system needs extra libraries loaded in, define them here. ! # System V probably need -lPW for alloca. LOADLIBES = --- 60,67 ---- # If your system needs extra libraries loaded in, define them here. ! # System V probably need -lPW for alloca. HP-UX 7.0's alloca in ! # libPW.a is broken on HP9000s300 and HP9000s400 machines. Use ! # alloca.c (below) instead on those machines. SGI Irix needs -lmld ! # for nlist. LOADLIBES = *************** *** 66,80 **** extras = # Directory to install `make' in. bindir = $(prefix)/usr/local/bin # Directory to install the man page in. ! mandir = $(prefix)/usr/local/man/man1 # Number to put on the man page filename. ! manext = 1 ! objs = glob.o commands.o job.o dir.o file.o load.o misc.o main.o read.o \ remake.o remote.o rule.o implicit.o default.o variable.o expand.o \ function.o vpath.o version.o $(ARCHIVES) $(ALLOCA) $(extras) ! srcs = glob.c commands.c job.c dir.c file.c load.c misc.c main.c read.c \ remake.c remote.c rule.c implicit.c default.c variable.c expand.c \ function.c vpath.c version.c $(ALLOCASRC) $(ARCHIVES_SRC) \ --- 78,108 ---- extras = + # Comment this out if POSIX.2 glob is installed on your system + # (it's in the GNU C Library, so if you're using that, this is + # not needed at all.) + globdep = glob/libglob.a + + # Library containing POSIX.2 `glob' function. + # Comment this line out if it's in the C library (which is the case if you + # are using the GNU C Library), or change it to the appropriate file name + # or -l switch. + globlib = $(globdep) + + # Name under which to install GNU make. + instname = make # Directory to install `make' in. bindir = $(prefix)/usr/local/bin # Directory to install the man page in. ! mandir = $(prefix)/usr/local/man/manl # Number to put on the man page filename. ! manext = l ! ! # Install make setgid to this group so it can read /dev/kmem. ! group = kmem ! objs = commands.o job.o dir.o file.o load.o misc.o main.o read.o \ remake.o remote.o rule.o implicit.o default.o variable.o expand.o \ function.o vpath.o version.o $(ARCHIVES) $(ALLOCA) $(extras) ! srcs = commands.c job.c dir.c file.c load.c misc.c main.c read.c \ remake.c remote.c rule.c implicit.c default.c variable.c expand.c \ function.c vpath.c version.c $(ALLOCASRC) $(ARCHIVES_SRC) \ *************** *** 106,111 **** dvi2ps make.dvi > make.ps ! make: $(objs) ! $(CC) $(LDFLAGS) $(objs) $(LOADLIBES) -o make.new mv -f make.new make --- 134,139 ---- dvi2ps make.dvi > make.ps ! make: $(objs) $(globdep) ! $(CC) $(LDFLAGS) $(objs) $(globlib) $(LOADLIBES) -o make.new mv -f make.new make *************** *** 115,118 **** --- 143,153 ---- $(CC) $(CFLAGS) $(REMOTE) -c remote.c + # For some losing Unix makes. + MAKE = make + + glob/libglob.a: force + cd glob; $(MAKE) CC='$(CC)' CFLAGS='$(CFLAGS) -I..' libglob.a + force: + TAGS: $(srcs) etags -tw $(srcs) *************** *** 121,144 **** .PHONY: install ! install: $(bindir)/make $(mandir)/make.$(manext) ! $(bindir)/make: make cp make $@.new # These are necessary for load-average checking to work on most Unix machines. ! chgrp kmem $@.new chmod g+s $@.new mv $@.new $@ ! $(mandir)/make.$(manext): make.man cp make.man $@ .PHONY: clean realclean ! clean: -rm -f make *.o core ! realclean: clean ! -rm -f TAGS tags make.info* make-* make.dvi -rm -f make.?? make.??s make.log make.toc make.*aux # Automatically generated dependencies. - glob.o : glob.c commands.o : commands.c make.h dep.h commands.h file.h variable.h job.h job.o : job.c make.h commands.h job.h file.h variable.h --- 156,185 ---- .PHONY: install ! install: $(bindir)/$(instname) $(mandir)/$(instname).$(manext) ! $(bindir)/$(instname): make cp make $@.new # These are necessary for load-average checking to work on most Unix machines. ! chgrp $(group) $@.new chmod g+s $@.new mv $@.new $@ ! $(mandir)/$(instname).$(manext): make.man cp make.man $@ .PHONY: clean realclean ! clean: glob-clean -rm -f make *.o core ! realclean: clean glob-realclean ! -rm -f TAGS tags make.info* make-* make.dvi *~ -rm -f make.?? make.??s make.log make.toc make.*aux + + .PHONY: glob-clean glob-realclean + glob-clean glob-realclean: + cd glob; $(MAKE) $@ + + # Automatically generated dependencies will be put at the end of the file. + # Automatically generated dependencies. commands.o : commands.c make.h dep.h commands.h file.h variable.h job.h job.o : job.c make.h commands.h job.h file.h variable.h diff -c2 -r +new-file make-3.60/README make-3.62/README *** make-3.60/README Sat May 25 02:41:19 1991 --- make-3.62/README Mon Oct 28 20:30:48 1991 *************** *** 1,3 **** ! This directory contains the 3.60 test release of GNU Make. All bugs reported for previous test releases have been fixed. Some bugs probably remain. --- 1,3 ---- ! This directory contains the 3.62 test release of GNU Make. All bugs reported for previous test releases have been fixed. Some bugs probably remain. Binary files make-3.60/TAGS and make-3.62/TAGS differ diff -c2 -r +new-file make-3.60/ar.c make-3.62/ar.c *** make-3.60/ar.c Fri Jan 18 17:41:54 1991 --- make-3.62/ar.c Mon Jun 3 16:37:34 1991 *************** *** 4,8 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 4,8 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. diff -c2 -r +new-file make-3.60/arscan.c make-3.62/arscan.c *** make-3.60/arscan.c Thu Apr 11 18:01:14 1991 --- make-3.62/arscan.c Tue Oct 22 21:30:25 1991 *************** *** 4,8 **** This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 4,8 ---- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. *************** *** 31,35 **** #include ! #ifdef USG #include #else --- 31,35 ---- #include ! #if defined (USG) || defined (POSIX) #include #else *************** *** 38,42 **** #if (defined (STDC_HEADERS) || defined (__GNU_LIBRARY__) \ ! || defined (_POSIX_SOURCE)) #include #include --- 38,42 ---- #if (defined (STDC_HEADERS) || defined (__GNU_LIBRARY__) \ ! || defined (POSIX)) #include #include *************** *** 53,58 **** #include extern int bcmp (); ! extern void bzero (), bcopy (); #endif /* USG. */ --- 53,65 ---- #include + #ifndef bcmp extern int bcmp (); ! #endif ! #ifndef bzero ! extern void bzero (); ! #endif ! #ifndef bcopy ! extern void bcopy (); ! #endif #endif /* USG. */ *************** *** 86,93 **** #endif ! #if defined(__GNU_LIBRARY__) || defined(_POSIX_SOURCE) || defined(_IBMR2) #include #else ! extern int read (), close (), write (), fstat (); extern long int lseek (), atol (); extern int atoi (); --- 93,100 ---- #endif ! #if defined(__GNU_LIBRARY__) || defined(POSIX) || defined(_IBMR2) #include #else ! extern int read (), open (), close (), write (), fstat (); extern long int lseek (), atol (); extern int atoi (); diff -c2 -r +new-file make-3.60/commands.c make-3.62/commands.c *** make-3.60/commands.c Wed Dec 26 18:12:02 1990 --- make-3.62/commands.c Tue Oct 8 16:20:29 1991 *************** *** 1,4 **** /* Command processing for GNU Make. ! Copyright (C) 1988, 1989 Free Software Foundation, Inc. This file is part of GNU Make. --- 1,4 ---- /* Command processing for GNU Make. ! Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. This file is part of GNU Make. *************** *** 5,9 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 5,9 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. *************** *** 26,30 **** --- 26,32 ---- extern int remote_kill (); + #if !defined(POSIX) && !defined(__GNU_LIBRARY__) extern int getpid (); + #endif /* Set FILE's automatic variables up. */ *************** *** 312,320 **** for (p = file->cmds->commands; *p != '\0'; ++p) ! if (*p != ' ' && *p != '\t' && *p != '\n' && *p != '-' && *p != '@') break; if (*p == '\0') { - file->command_state = cs_finished; file->update_status = 0; notice_finished_file (file); --- 314,321 ---- for (p = file->cmds->commands; *p != '\0'; ++p) ! if (!isspace (*p) && *p != '-' && *p != '@') break; if (*p == '\0') { file->update_status = 0; notice_finished_file (file); *************** *** 411,414 **** --- 412,416 ---- { struct stat st; + struct dep *d; if (child->deleted) *************** *** 428,451 **** /* Also remove any non-precious targets listed in the `also_make' member. */ ! if (child->file->also_make != 0) ! { ! register unsigned int i; ! for (i = 0; child->file->also_make[i] != 0; ++i) { ! char *name = child->file->also_make[i]; ! struct file *f = lookup_file (name); ! if (f != 0 && f->precious) ! continue; ! if (stat (name, &st) == 0 ! && S_ISREG (st.st_mode) ! && (f == 0 || ! (time_t) st.st_mtime == f->last_mtime)) ! { ! error ("*** [%s] Deleting file `%s'", child->file->name, name); ! if (unlink (name) < 0) ! perror_with_name ("unlink: ", name); ! } } - } child->deleted = 1; --- 430,444 ---- /* Also remove any non-precious targets listed in the `also_make' member. */ ! for (d = child->file->also_make; d != 0; d = d->next) ! if (!d->file->precious) ! if (stat (d->file->name, &st) == 0 ! && S_ISREG (st.st_mode) ! && (time_t) st.st_mtime != d->file->last_mtime) { ! error ("*** [%s] Deleting file `%s'", child->file->name, ! d->file->name); ! if (unlink (d->file->name) < 0) ! perror_with_name ("unlink: ", d->file->name); } child->deleted = 1; *************** *** 472,476 **** char *end; ! while (*s == ' ' || *s == '\t' || *s == '\n') ++s; --- 465,469 ---- char *end; ! while (isspace (*s)) ++s; diff -c2 -r +new-file make-3.60/commands.h make-3.62/commands.h *** make-3.60/commands.h Wed Sep 19 03:03:18 1990 --- make-3.62/commands.h Mon Jun 3 16:37:32 1991 *************** *** 1,3 **** ! /* Copyright (C) 1988, 1989 Free Software Foundation, Inc. This file is part of GNU Make. --- 1,3 ---- ! /* Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. This file is part of GNU Make. *************** *** 4,8 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 4,8 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. diff -c2 -r +new-file make-3.60/default.c make-3.62/default.c *** make-3.60/default.c Wed Jan 23 03:19:33 1991 --- make-3.62/default.c Fri Oct 4 17:42:22 1991 *************** *** 5,9 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 5,9 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. *************** *** 30,35 **** static char default_suffixes[] ! = ".out .a .ln .o .c .cc .p .f .F .r .y .l .s .S \ ! .mod .sym .def .h .info .dvi .tex .texinfo .cweb .web .sh .elc .el"; static struct pspec default_pattern_rules[] = --- 30,35 ---- static char default_suffixes[] ! = ".out .a .ln .o .c .cc .C .p .f .F .r .y .l .s .S \ ! .mod .sym .def .h .info .dvi .tex .texinfo .texi .cweb .web .sh .elc .el"; static struct pspec default_pattern_rules[] = *************** *** 76,79 **** --- 76,81 ---- ".cc", "$(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@", + ".C", + "$(LINK.C) $^ $(LOADLIBES) $(LDLIBS) -o $@", ".f", "$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@", *************** *** 109,112 **** --- 111,116 ---- ".cc.o", "$(COMPILE.cc) $< $(OUTPUT_OPTION)", + ".C.o", + "$(COMPILE.C) $< $(OUTPUT_OPTION)", ".f.o", "$(COMPILE.f) $< $(OUTPUT_OPTION)", *************** *** 150,153 **** --- 154,160 ---- "$(MAKEINFO) $<", + ".texi.info", + "$(MAKEINFO) $<", + ".tex.dvi", "$(TEX) $<", *************** *** 154,167 **** ".texinfo.dvi", ! "$(TEXINDEX) $(wildcard $(foreach _s_,cp fn ky pg tp vr,$*.$(_s_)))\n\ ! -$(foreach _f_,$(wildcard $(foreach _s_,aux cp fn ky pg tp vr,$*.$(_s_)))\ ! ,cp $(_f_) $(_f_)O;)\n\ ! -$(TEX) $< \n\ ! $(foreach _f_,$(wildcard $(foreach _s_,aux cp fn ky pg tp vr,\ ! $*.$(_s_))),cmp -s $(_f_)O $(_f_) ||) \\\n\ ! ($(TEXINDEX) $(wildcard $(foreach _s_,cp fn ky pg tp vr,$*.$(_s_))); \\\n\ ! $(TEX) $<) \n\ ! -rm -f $(addsuffix O,$(wildcard $(foreach _s_,\ ! aux cp fn ky pg tp vr,$*.$(_s_))))", ".cweb.c", --- 161,168 ---- ".texinfo.dvi", ! "$(TEXI2DVI) $<", ! ! ".texi.dvi", ! "$(TEXI2DVI) $<", ".cweb.c", *************** *** 177,182 **** "$(WEAVE) $<", ! 0 ! }; static char *default_variables[] = --- 178,183 ---- "$(WEAVE) $<", ! 0} ! ; static char *default_variables[] = *************** *** 203,211 **** "LINT", "lint", "M2C", "m2c", "PC", "pc", "YACC", "yacc", /* Or "bison -y" */ "MAKEINFO", "makeinfo", "TEX", "tex", ! "TEXINDEX", "texindex", "WEAVE", "weave", "CWEAVE", "cweave", --- 204,216 ---- "LINT", "lint", "M2C", "m2c", + #ifdef pyr + "PC", "pascal", + #else "PC", "pc", + #endif "YACC", "yacc", /* Or "bison -y" */ "MAKEINFO", "makeinfo", "TEX", "tex", ! "TEXI2DVI", "texi2dvi", "WEAVE", "weave", "CWEAVE", "cweave", *************** *** 219,223 **** --- 224,230 ---- "LINK.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)", "COMPILE.cc", "$(C++) $(C++FLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c", + "COMPILE.C", "$(COMPILE.cc)", "LINK.cc", "$(C++) $(C++FLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)", + "LINK.C", "$(LINK.cc)", "YACC.y", "$(YACC) $(YFLAGS)", "LEX.l", "$(LEX) $(LFLAGS) -t", *************** *** 305,308 **** --- 312,321 ---- } } + } + + void + define_default_variables () + { + register char **s; for (s = default_variables; *s != 0; s += 2) diff -c2 -r +new-file make-3.60/dep.h make-3.62/dep.h *** make-3.60/dep.h Sat Mar 18 18:48:29 1989 --- make-3.62/dep.h Mon Jun 3 16:37:31 1991 *************** *** 1,3 **** ! /* Copyright (C) 1988, 1989 Free Software Foundation, Inc. This file is part of GNU Make. --- 1,3 ---- ! /* Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. This file is part of GNU Make. *************** *** 4,8 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 4,8 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. diff -c2 -r +new-file make-3.60/dir.c make-3.62/dir.c *** make-3.60/dir.c Tue Apr 2 16:20:03 1991 --- make-3.62/dir.c Fri Oct 18 15:26:24 1991 *************** *** 1,4 **** /* Directory hashing for GNU Make. ! Copyright (C) 1988, 1989 Free Software Foundation, Inc. This file is part of GNU Make. --- 1,4 ---- /* Directory hashing for GNU Make. ! Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. This file is part of GNU Make. *************** *** 5,9 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 5,9 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. *************** *** 32,36 **** #else /* not POSIX or DIRENT */ #define D_NAMLEN(d) ((d)->d_namlen) ! #ifdef USG #if defined (SYSNDIR) #include --- 32,36 ---- #else /* not POSIX or DIRENT */ #define D_NAMLEN(d) ((d)->d_namlen) ! #if defined (USG) && !defined (sgi) #if defined (SYSNDIR) #include *************** *** 43,47 **** #endif /* POSIX or DIRENT or __GNU_LIBRARY__ */ ! #if defined (_POSIX_SOURCE) /* Posix does not require that the d_ino field be present, and some systems do not provide it. */ --- 43,47 ---- #endif /* POSIX or DIRENT or __GNU_LIBRARY__ */ ! #if defined (POSIX) && !defined (__GNU_LIBRARY__) /* Posix does not require that the d_ino field be present, and some systems do not provide it. */ *************** *** 49,53 **** #else #define REAL_DIR_ENTRY(dp) (dp->d_ino != 0) ! #endif /* _POSIX_SOURCE */ /* Hash table of directories. */ --- 49,53 ---- #else #define REAL_DIR_ENTRY(dp) (dp->d_ino != 0) ! #endif /* POSIX */ /* Hash table of directories. */ diff -c2 -r +new-file make-3.60/expand.c make-3.62/expand.c *** make-3.60/expand.c Wed Sep 19 02:38:29 1990 --- make-3.62/expand.c Fri Sep 13 19:39:37 1991 *************** *** 1,4 **** /* Variable expansion functions for GNU Make. ! Copyright (C) 1988, 1989 Free Software Foundation, Inc. This file is part of GNU Make. --- 1,4 ---- /* Variable expansion functions for GNU Make. ! Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. This file is part of GNU Make. *************** *** 5,9 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 5,9 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. *************** *** 38,43 **** v->name); else ! fatal ("%s:%u: Recursive variable `%s' references itself (eventually)", ! reading_filename, *reading_lineno_ptr, v->name); } --- 38,45 ---- v->name); else ! makefile_fatal ! (reading_filename, *reading_lineno_ptr, ! "Recursive variable `%s' references itself (eventually)", ! v->name); } *************** *** 233,241 **** case '\0': - case '\t': - case ' ': break; default: /* A $ followed by a random char is a variable reference: $a is equivalent to $(a). */ --- 235,244 ---- case '\0': break; default: + if (isblank (p[-1])) + break; + /* A $ followed by a random char is a variable reference: $a is equivalent to $(a). */ diff -c2 -r +new-file make-3.60/file.c make-3.62/file.c *** make-3.60/file.c Fri Aug 3 02:11:56 1990 --- make-3.62/file.c Thu Oct 17 17:29:16 1991 *************** *** 1,3 **** ! /* Copyright (C) 1988, 1989, 1990 Free Software Foundation, Inc. This file is part of GNU Make. --- 1,3 ---- ! /* Copyright (C) 1988, 1989, 1990, 1991 Free Software Foundation, Inc. This file is part of GNU Make. *************** *** 4,8 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 4,8 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. *************** *** 80,83 **** --- 80,86 ---- abort (); + while (name[0] == '.' && name[1] == '/' && name[2] != '\0') + name += 2; + hashval = 0; for (n = name; *n != '\0'; ++n) *************** *** 194,208 **** one given in the rule explicitly mentioning this name, but give a message to let the user know what's going on. */ ! error ("%s:%u: Commands were specified for file `%s' at %s:%u,", ! file->cmds->filename, file->cmds->lineno, ! oldname, oldfile->cmds->filename, oldfile->cmds->lineno); ! error ("%s:%u: but `%s' is now considered the same file \ as `%s'.", ! file->cmds->filename, file->cmds->lineno, ! oldname, name); ! error ("%s:%u: Commands for `%s' will be ignored \ in favor of those for `%s'.", ! file->cmds->filename, file->cmds->lineno, ! name, oldname); } } --- 197,211 ---- one given in the rule explicitly mentioning this name, but give a message to let the user know what's going on. */ ! makefile_error (file->cmds->filename, file->cmds->lineno, ! "Commands were specified for file `%s' at %s:%u,", ! oldname, oldfile->cmds->filename, oldfile->cmds->lineno); ! makefile_error (file->cmds->filename, file->cmds->lineno, ! "but `%s' is now considered the same file \ as `%s'.", ! oldname, name); ! makefile_error (file->cmds->filename, file->cmds->lineno, ! "Commands for `%s' will be ignored \ in favor of those for `%s'.", ! name, oldname); } } *************** *** 230,233 **** --- 233,240 ---- oldname, name); + if (file->last_mtime > oldfile->last_mtime) + /* %%% Kludge so -W wins on a file that gets vpathized. */ + oldfile->last_mtime = file->last_mtime; + #define MERGE(field) oldfile->field |= file->field MERGE (precious); *************** *** 392,399 **** if (f->also_make != 0) { - register unsigned int i; fputs ("# Also makes:", stdout); ! for (i = 0; f->also_make[i] != 0; ++i) ! printf (" %s", f->also_make[i]); putchar ('\n'); } --- 399,405 ---- if (f->also_make != 0) { fputs ("# Also makes:", stdout); ! for (d = f->also_make; d != 0; d = d->next) ! printf (" %s", dep_name (d)); putchar ('\n'); } diff -c2 -r +new-file make-3.60/file.h make-3.62/file.h *** make-3.60/file.h Wed Jan 9 22:51:05 1991 --- make-3.62/file.h Tue Oct 8 16:04:17 1991 *************** *** 1,3 **** ! /* Copyright (C) 1988, 1989, 1990 Free Software Foundation, Inc. This file is part of GNU Make. --- 1,3 ---- ! /* Copyright (C) 1988, 1989, 1990, 1991 Free Software Foundation, Inc. This file is part of GNU Make. *************** *** 4,8 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 4,8 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. *************** *** 28,33 **** char *stem; /* Implicit stem, if an implicit rule has been used */ ! char **also_make; /* Targets that are also made by this file's ! commands, an implicit rule was used. */ time_t last_mtime; /* File's modtime, if already known. */ struct file *prev; /* Previous entry for same file name; --- 28,32 ---- char *stem; /* Implicit stem, if an implicit rule has been used */ ! struct dep *also_make; /* Targets that are made by making this. */ time_t last_mtime; /* File's modtime, if already known. */ struct file *prev; /* Previous entry for same file name; diff -c2 -r +new-file make-3.60/function.c make-3.62/function.c *** make-3.60/function.c Thu Sep 13 17:53:57 1990 --- make-3.62/function.c Mon Oct 21 17:44:24 1991 *************** *** 1,4 **** /* Variable function expansion for GNU Make. ! Copyright (C) 1988, 1989 Free Software Foundation, Inc. This file is part of GNU Make. --- 1,4 ---- /* Variable function expansion for GNU Make. ! Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. This file is part of GNU Make. *************** *** 5,9 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 5,9 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. *************** *** 64,71 **** or only at the ends of words, check that this case qualifies. */ if ((by_word ! && ((p > t && p[-1] != ' ' && p[-1] != '\t') ! || (p[slen] != '\0' && p[slen] != ' ' && p[slen] != '\t')) ! || (suffix_only ! && (p[slen] != '\0' && p[slen] != ' ' && p[slen] != '\t')))) /* Struck out. Output the rest of the string that is no longer to be replaced. */ --- 64,71 ---- or only at the ends of words, check that this case qualifies. */ if ((by_word ! && ((p > t && !isblank (p[-1])) ! || (p[slen] != '\0' && !isblank (p[slen])))) ! || (suffix_only ! && (p[slen] != '\0' && !isblank (p[slen])))) /* Struck out. Output the rest of the string that is no longer to be replaced. */ *************** *** 298,306 **** /* Note this absorbs a semicolon and is safe to use in conditionals. */ ! #define BADARGS(func) \ ! if (reading_filename != 0) \ ! fatal ("%s:%u: Insufficient arguments to function `%s'", \ ! reading_filename, *reading_lineno_ptr, func); \ ! else fatal ("insufficient arguments to function `%s'", func) static char * --- 298,308 ---- /* Note this absorbs a semicolon and is safe to use in conditionals. */ ! #define BADARGS(func) \ ! if (reading_filename != 0) \ ! makefile_fatal (reading_filename, *reading_lineno_ptr, \ ! "insufficient arguments to function `%s'", \ ! func); \ ! else \ ! fatal ("insufficient arguments to function `%s'", func) static char * *************** *** 328,332 **** extern int pipe (); char **argv; ! char buf[100]; int pipedes[2]; int pid; --- 330,334 ---- extern int pipe (); char **argv; ! char *error_prefix; int pipedes[2]; int pid; *************** *** 336,340 **** /* Construct the argument list. */ ! argv = construct_command_argv (text, (struct file *) 0); if (argv == 0) break; --- 338,342 ---- /* Construct the argument list. */ ! argv = construct_command_argv (text, (char *) NULL, (struct file *) 0); if (argv == 0) break; *************** *** 342,352 **** /* For error messages. */ if (reading_filename != 0) ! sprintf (buf, "%s:%u: ", reading_filename, *reading_lineno_ptr); else ! buf[0] = '\0'; if (pipe (pipedes) < 0) { ! perror_with_name (buf, "pipe"); break; } --- 344,358 ---- /* For error messages. */ if (reading_filename != 0) ! { ! error_prefix = (char *) alloca (strlen (reading_filename) + 100); ! sprintf (error_prefix, ! "%s:%u: ", reading_filename, *reading_lineno_ptr); ! } else ! error_prefix = ""; if (pipe (pipedes) < 0) { ! perror_with_name (error_prefix, "pipe"); break; } *************** *** 356,360 **** pid = fork (); if (pid < 0) ! perror_with_name (buf, "fork"); else if (pid == 0) child_execute_job (0, pipedes[1], argv, environ); --- 362,366 ---- pid = fork (); if (pid < 0) ! perror_with_name (error_prefix, "fork"); else if (pid == 0) child_execute_job (0, pipedes[1], argv, environ); *************** *** 606,613 **** case function_filter_out: { ! char **words; ! unsigned int nwords; ! register unsigned int wordi; ! /* Get two comma-separated arguments and expand each one. */ count = 0; --- 612,622 ---- case function_filter_out: { ! struct word ! { ! struct word *next; ! char *word; ! int matched; ! } *words, *wordtail, *wp; ! /* Get two comma-separated arguments and expand each one. */ count = 0; *************** *** 628,680 **** /* Chop TEXT up into words and then run each pattern through. */ ! nwords = 10; ! words = (char **) xmalloc (10 * sizeof (char *)); ! wordi = 0; p3 = text; while ((p = find_next_token (&p3, &len)) != 0) { ! if (wordi == nwords - 1) ! { ! nwords += 10; ! words = (char **) xrealloc ((char *) words, ! nwords * sizeof (char *)); ! } if (*p3 != '\0') ++p3; p[len] = '\0'; ! words[wordi++] = p; } ! /* Run each pattern through the words, killing words. */ ! p3 = p2; ! while ((p = find_next_token (&p3, &len)) != 0) { ! char *percent; ! char save = p[len]; ! p[len] = '\0'; ! percent = find_percent (p); ! for (i = 0; i < wordi; ++i) ! if (words[i] != 0 && ! (percent == 0 ? streq (p, words[i]) ! : pattern_matches (p, percent, words[i])) ! == (function == function_filter_out)) ! words[i] = 0; ! p[len] = save; ! } ! /* Output the words that remain. */ ! for (i = 0; i < wordi; ++i) ! if (words[i] != 0) ! { ! o = variable_buffer_output (o, words[i], strlen (words[i])); ! o = variable_buffer_output (o, " ", 1); ! doneany = 1; ! } ! if (doneany) ! /* Kill the last space. */ ! --o; ! free ((char *) words); free (p2); free (text); --- 637,691 ---- /* Chop TEXT up into words and then run each pattern through. */ ! words = wordtail = 0; p3 = text; while ((p = find_next_token (&p3, &len)) != 0) { ! struct word *w = (struct word *) alloca (sizeof (struct word)); ! if (words == 0) ! words = w; ! else ! wordtail->next = w; ! wordtail = w; ! if (*p3 != '\0') ++p3; p[len] = '\0'; ! w->word = p; ! w->matched = 0; } ! if (words != 0) { ! wordtail->next = 0; ! /* Run each pattern through the words, killing words. */ ! p3 = p2; ! while ((p = find_next_token (&p3, &len)) != 0) ! { ! char *percent; ! char save = p[len]; ! p[len] = '\0'; ! ! percent = find_percent (p); ! for (wp = words; wp != 0; wp = wp->next) ! wp->matched |= (percent == 0 ? streq (p, wp->word) ! : pattern_matches (p, percent, wp->word)); ! p[len] = save; ! } ! /* Output the words that matched (or didn't, for filter-out). */ ! for (wp = words; wp != 0; wp = wp->next) ! if (function == function_filter ? wp->matched : !wp->matched) ! { ! o = variable_buffer_output (o, wp->word, strlen (wp->word)); ! o = variable_buffer_output (o, " ", 1); ! doneany = 1; ! } ! if (doneany) ! /* Kill the last space. */ ! --o; ! } ! free (p2); free (text); *************** *** 879,884 **** { if (reading_filename != 0) ! fatal ("%s:%u: non-numeric first argument to `word' function", ! reading_filename, *reading_lineno_ptr); else fatal ("non-numeric first argument to `word' function"); --- 890,895 ---- { if (reading_filename != 0) ! makefile_fatal (reading_filename, *reading_lineno_ptr, ! "non-numeric first argument to `word' function"); else fatal ("non-numeric first argument to `word' function"); *************** *** 889,895 **** { if (reading_filename != 0) ! fatal ("%s:%u: the `word' function takes a one-origin \ ! index argument", ! reading_filename, *reading_lineno_ptr); else fatal ("the `word' function takes a one-origin index argument"); --- 900,906 ---- { if (reading_filename != 0) ! makefile_fatal (reading_filename, *reading_lineno_ptr, ! "the `word' function takes a one-origin \ ! index argument"); else fatal ("the `word' function takes a one-origin index argument"); *************** *** 1085,1089 **** continue; endref = beg + function_table[code].len; ! if ((*endref == ' ' || *endref == '\t') && !strncmp (function_table[code].name, beg, function_table[code].len)) --- 1096,1100 ---- continue; endref = beg + function_table[code].len; ! if (isblank (*endref) && !strncmp (function_table[code].name, beg, function_table[code].len)) diff -c2 -r +new-file make-3.60/glob/COPYING.LIB make-3.62/glob/COPYING.LIB *** make-3.60/glob/COPYING.LIB --- make-3.62/glob/COPYING.LIB Sat Oct 19 16:39:22 1991 *************** *** 0 **** --- 1,481 ---- + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + [This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your + freedom to share and change it. By contrast, the GNU General Public + Licenses are intended to guarantee your freedom to share and change + free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some + specially designated Free Software Foundation software, and to any + other libraries whose authors decide to use it. You can use it for + your libraries, too. + + 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 + this service 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. + + To protect your rights, we need to make restrictions that forbid + anyone to deny you these rights or to ask you to surrender the rights. + These restrictions translate to certain responsibilities for you if + you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis + or for a fee, you must give the recipients all the rights that we gave + you. You must make sure that they, too, receive or can get the source + code. If you link a program with the library, you must provide + complete object files to the recipients so that they can relink them + with the library, after making changes to the library and recompiling + it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright + the library, and (2) offer you this license which gives you legal + permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain + that everyone understands that there is no warranty for this free + library. If the library is modified by someone else and passed on, we + want its recipients to know that what they have is not the original + version, so that any problems introduced by others will not reflect on + the original authors' reputations. + + Finally, any free program is threatened constantly by software + patents. We wish to avoid the danger that companies distributing free + software will individually obtain patent licenses, thus in effect + transforming the program into proprietary software. To prevent this, + we have made it clear that any patent must be licensed for everyone's + free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary + GNU General Public License, which was designed for utility programs. This + license, the GNU Library General Public License, applies to certain + designated libraries. This license is quite different from the ordinary + one; be sure to read it in full, and don't assume that anything in it is + the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that + they blur the distinction we usually make between modifying or adding to a + program and simply using it. Linking a program with a library, without + changing the library, is in some sense simply using the library, and is + analogous to running a utility program or application program. However, in + a textual and legal sense, the linked executable is a combined work, a + derivative of the original library, and the ordinary General Public License + treats it as such. + + Because of this blurred distinction, using the ordinary General + Public License for libraries did not effectively promote software + sharing, because most developers did not use the libraries. We + concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the + users of those programs of all benefit from the free status of the + libraries themselves. This Library General Public License is intended to + permit developers of non-free programs to use free libraries, while + preserving your freedom as a user of such programs to change the free + libraries that are incorporated in them. (We have not seen how to achieve + this as regards changes in header files, but we have achieved it as regards + changes in the actual functions of the Library.) The hope is that this + will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and + modification follow. Pay close attention to the difference between a + "work based on the library" and a "work that uses the library". The + former contains code derived from the library, while the latter only + works together with the library. + + Note that it is possible for a library to be covered by the ordinary + General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which + contains a notice placed by the copyright holder or other authorized + party saying it may be distributed under the terms of this Library + General Public License (also called "this License"). Each licensee is + addressed as "you". + + A "library" means a collection of software functions and/or data + prepared so as to be conveniently linked with application programs + (which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work + which has been distributed under these terms. A "work based on the + Library" means either the Library or any derivative work under + copyright law: that is to say, a work containing the Library or a + portion of it, either verbatim or with modifications and/or translated + straightforwardly into another language. (Hereinafter, translation is + included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for + making modifications to it. For a library, complete source code means + all the source code for all modules it contains, plus any associated + interface definition files, plus the scripts used to control compilation + and installation of the library. + + Activities other than copying, distribution and modification are not + covered by this License; they are outside its scope. The act of + running a program using the Library is not restricted, and output from + such a program is covered only if its contents constitute a work based + on the Library (independent of the use of the Library in a tool for + writing it). Whether that is true depends on what the Library does + and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's + complete source code as you receive it, in any medium, provided that + you conspicuously and appropriately publish on each copy an + appropriate copyright notice and disclaimer of warranty; keep intact + all the notices that refer to this License and to the absence of any + warranty; and distribute a copy of this License along with the + Library. + + You may charge a fee for the physical act of transferring a copy, + and you may at your option offer warranty protection in exchange for a + fee. + + 2. You may modify your copy or copies of the Library or any portion + of it, thus forming a work based on the Library, and copy and + distribute such modifications or work under the terms of Section 1 + above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + + These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the Library, + and can be reasonably considered independent and separate works in + themselves, then this License, and its terms, do not apply to those + sections when you distribute them as separate works. But when you + distribute the same sections as part of a whole which is a work based + on the Library, the distribution of the whole must be on the terms of + this License, whose permissions for other licensees extend to the + entire whole, and thus to each and every part regardless of who wrote + it. + + Thus, it is not the intent of this section to claim rights or contest + your rights to work written entirely by you; rather, the intent is to + exercise the right to control the distribution of derivative or + collective works based on the Library. + + In addition, mere aggregation of another work not based on the Library + with the Library (or with a work based on the Library) on a volume of + a storage or distribution medium does not bring the other work under + the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public + License instead of this License to a given copy of the Library. To do + this, you must alter all the notices that refer to this License, so + that they refer to the ordinary GNU General Public License, version 2, + instead of to this License. (If a newer version than version 2 of the + ordinary GNU General Public License has appeared, then you can specify + that version instead if you wish.) Do not make any other change in + these notices. + + Once this change is made in a given copy, it is irreversible for + that copy, so the ordinary GNU General Public License applies to all + subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of + the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or + derivative of it, under Section 2) in object code or executable form + under the terms of Sections 1 and 2 above provided that you accompany + it with the complete corresponding machine-readable source code, which + must be distributed under the terms of Sections 1 and 2 above on a + medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy + from a designated place, then offering equivalent access to copy the + source code from the same place satisfies the requirement to + distribute the source code, even though third parties are not + compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the + Library, but is designed to work with the Library by being compiled or + linked with it, is called a "work that uses the Library". Such a + work, in isolation, is not a derivative work of the Library, and + therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library + creates an executable that is a derivative of the Library (because it + contains portions of the Library), rather than a "work that uses the + library". The executable is therefore covered by this License. + Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file + that is part of the Library, the object code for the work may be a + derivative work of the Library even though the source code is not. + Whether this is true is especially significant if the work can be + linked without the Library, or if the work is itself a library. The + threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data + structure layouts and accessors, and small macros and small inline + functions (ten lines or less in length), then the use of the object + file is unrestricted, regardless of whether it is legally a derivative + work. (Executables containing this object code plus portions of the + Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may + distribute the object code for the work under the terms of Section 6. + Any executables containing that work also fall under Section 6, + whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or + link a "work that uses the Library" with the Library to produce a + work containing portions of the Library, and distribute that work + under terms of your choice, provided that the terms permit + modification of the work for the customer's own use and reverse + engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the + Library is used in it and that the Library and its use are covered by + this License. You must supply a copy of this License. If the work + during execution displays copyright notices, you must include the + copyright notice for the Library among them, as well as a reference + directing the user to the copy of this License. Also, you must do one + of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the + Library" must include any data and utility programs needed for + reproducing the executable from it. However, as a special exception, + the source code distributed need not include anything that is normally + distributed (in either source or binary form) with the major + components (compiler, kernel, and so on) of the operating system on + which the executable runs, unless that component itself accompanies + the executable. + + It may happen that this requirement contradicts the license + restrictions of other proprietary libraries that do not normally + accompany the operating system. Such a contradiction means you cannot + use both them and the Library together in an executable that you + distribute. + + 7. You may place library facilities that are a work based on the + Library side-by-side in a single library together with other library + facilities not covered by this License, and distribute such a combined + library, provided that the separate distribution of the work based on + the Library and of the other library facilities is otherwise + permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute + the Library except as expressly provided under this License. Any + attempt otherwise to copy, modify, sublicense, link with, or + distribute the Library is void, and will automatically terminate your + rights under this License. However, parties who have received copies, + or rights, from you under this License will not have their licenses + terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not + signed it. However, nothing else grants you permission to modify or + distribute the Library or its derivative works. These actions are + prohibited by law if you do not accept this License. Therefore, by + modifying or distributing the Library (or any work based on the + Library), you indicate your acceptance of this License to do so, and + all its terms and conditions for copying, distributing or modifying + the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the + Library), the recipient automatically receives a license from the + original licensor to copy, distribute, link with or modify the Library + subject to these terms and conditions. You may not impose any further + restrictions on the recipients' exercise of the rights granted herein. + You are not responsible for enforcing compliance by third parties to + this License. + + 11. If, as a consequence of a court judgment or allegation of patent + infringement or for any other reason (not limited to patent issues), + 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 + distribute so as to satisfy simultaneously your obligations under this + License and any other pertinent obligations, then as a consequence you + may not distribute the Library at all. For example, if a patent + license would not permit royalty-free redistribution of the Library by + all those who receive copies directly or indirectly through you, then + the only way you could satisfy both it and this License would be to + refrain entirely from distribution of the Library. + + If any portion of this section is held invalid or unenforceable under any + particular circumstance, the balance of the section is intended to apply, + and the section as a whole is intended to apply in other circumstances. + + It is not the purpose of this section to induce you to infringe any + patents or other property right claims or to contest validity of any + such claims; this section has the sole purpose of protecting the + integrity of the free software distribution system which is + implemented by public license practices. Many people have made + generous contributions to the wide range of software distributed + through that system in reliance on consistent application of that + system; it is up to the author/donor to decide if he or she is willing + to distribute software through any other system and a licensee cannot + impose that choice. + + This section is intended to make thoroughly clear what is believed to + be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in + certain countries either by patents or by copyrighted interfaces, the + original copyright holder who places the Library under this License may add + an explicit geographical distribution limitation excluding those countries, + so that distribution is permitted only in or among countries not thus + excluded. In such case, this License incorporates the limitation as if + written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new + versions of the Library 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 Library + specifies a version number of this License which applies to it and + "any later version", you have the option of following the terms and + conditions either of that version or of any later version published by + the Free Software Foundation. If the Library does not specify a + license version number, you may choose any version ever published by + the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free + programs whose distribution conditions are incompatible with these, + write to the author to ask for permission. For software which is + copyrighted by the Free Software Foundation, write to the Free + Software Foundation; we sometimes make exceptions for this. Our + decision will be guided by the two goals of preserving the free status + of all derivatives of our free software and of promoting the sharing + and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO + WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. + EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR + OTHER PARTIES PROVIDE THE LIBRARY "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 + LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME + THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN + WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY + AND/OR REDISTRIBUTE THE LIBRARY 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 + LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF + SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest + possible use to the public, we recommend making it free software that + everyone can redistribute and change. You can do so by permitting + redistribution under these terms (or, alternatively, under the terms of the + ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is + safest to attach them to the start of each source file to most effectively + convey 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 library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + Also add information on how to contact you by electronic and paper mail. + + You should also get your employer (if you work as a programmer) or your + school, if any, to sign a "copyright disclaimer" for the library, if + necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + + That's all there is to it! diff -c2 -r +new-file make-3.60/glob/Makefile make-3.62/glob/Makefile *** make-3.60/glob/Makefile --- make-3.62/glob/Makefile Tue Oct 22 23:51:10 1991 *************** *** 0 **** --- 1,42 ---- + # Copyright (C) 1991 Free Software Foundation, Inc. + # This file is part of the GNU C Library. + + # The GNU C Library is free software; you can redistribute it and/or + # modify it under the terms of the GNU Library General Public License + # as published by the Free Software Foundation; either version 2 of + # the License, or (at your option) any later version. + + # The GNU C Library 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 + # Library General Public License for more details. + + # You should have received a copy of the GNU Library General Public + # License along with the GNU C Library; see the file COPYING.LIB. If + # not, write to the Free Software Foundation, Inc., 675 Mass Ave, + # Cambridge, MA 02139, USA. + + # Makefile for standalone distribution of libglob.a (fnmatch, glob). + + .PHONY: all + all: libglob.a + + libglob.a: glob.o fnmatch.o + ar rv $@ glob.o fnmatch.o + -ranlib $@ + + glob.o: glob.h fnmatch.h + fnmatch.o: fnmatch.h + + .c.o: + $(CC) $(CFLAGS) $(CPPFLAGS) -I. -c $< $(OUTPUT_OPTION) + + .PHONY: clean realclean glob-clean glob-realclean + clean glob-clean: + -rm -f libglob.a *.o core + realclean glob-realclean: clean + -rm -f TAGS tags *~ + + # For inside the C library. + glob.tar glob.tar.Z: + $(MAKE) -C .. $@ diff -c2 -r +new-file make-3.60/glob/fnmatch.c make-3.62/glob/fnmatch.c *** make-3.60/glob/fnmatch.c --- make-3.62/glob/fnmatch.c Sat Oct 19 16:39:24 1991 *************** *** 0 **** --- 1,170 ---- + /* Copyright (C) 1991 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., 675 Mass Ave, + Cambridge, MA 02139, USA. */ + + /* */ + #include + #include + + #if !defined(__GNU_LIBRARY__) && !defined(STDC_HEADERS) + extern int errno; + #endif + + /* Match STRING against the filename pattern PATTERN, returning zero if + it matches, nonzero if not. */ + int + fnmatch(pattern, string, flags) + char *pattern; + char *string; + int flags; + { + register char *p = pattern, *n = string; + register char c; + + if ((flags & ~__FNM_FLAGS) != 0) + { + errno = EINVAL; + return -1; + } + + while ((c = *p++) != '\0') + switch (c) + { + case '?': + if (*n == '\0') + return FNM_NOMATCH; + else if ((flags & FNM_PATHNAME) && *n == '/') + return FNM_NOMATCH; + else if ((flags & FNM_PERIOD) && *n == '.' && + (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/'))) + return FNM_NOMATCH; + else + ++n; + break; + + case '\\': + if (!(flags & FNM_NOESCAPE)) + c = *p++; + if (*n++ != c) + return FNM_NOMATCH; + break; + + case '*': + if ((flags & FNM_PERIOD) && *n == '.' && + (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/'))) + return FNM_NOMATCH; + + for (c = *p++; c == '?' || c == '*'; c = *p++, ++n) + if (((flags & FNM_PATHNAME) && *n == '/') || + (c == '?' && *n == '\0')) + return FNM_NOMATCH; + + if (c == '\0') + return 0; + + { + char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? *p : c; + for (--p; *n != '\0'; ++n) + if ((c == '[' || *n == c1) && + fnmatch(p, n, flags & ~FNM_PERIOD) == 0) + return 0; + return FNM_NOMATCH; + } + + case '[': + { + /* Nonzero if this if the sense of + the character class is inverted. */ + register int not; + + if (*n == '\0') + return FNM_NOMATCH; + + if ((flags & FNM_PERIOD) && *n == '.' && + (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/'))) + return FNM_NOMATCH; + + not = *p == '!'; + if (not) + ++p; + + c = *p++; + for (;;) + { + register char cstart = c, cend = c; + + if (!(flags & FNM_NOESCAPE) && c == '\\') + cstart = cend = *p++; + + if (c == '\0') + /* [ (unterminated) loses. */ + return FNM_NOMATCH; + + c = *p++; + if ((flags & FNM_PATHNAME) && c == '/') + /* [/] can never match. */ + return FNM_NOMATCH; + + if (c == '-') + { + cend = *p++; + if (!(flags & FNM_NOESCAPE) && cend == '\\') + cend = *p++; + if (cend == '\0') + return FNM_NOMATCH; + c = *p++; + } + if (*n >= cstart && *n <= cend) + goto matched; + + if (c == ']') + break; + } + if (!not) + return FNM_NOMATCH; + break; + + matched:; + /* Skip the rest of the [...] that already matched. */ + while (c != ']') + { + if (c == '\0') + /* [... (unterminated) loses. */ + return FNM_NOMATCH; + + c = *p++; + if (!(flags & FNM_NOESCAPE) && c == '\\') + /* 1003.2d11 is unclear if this is right. %%% */ + ++p; + } + if (not) + return FNM_NOMATCH; + + ++n; + } + break; + + default: + if (c != *n++) + return FNM_NOMATCH; + } + + if (*n == '\0') + return 0; + + return FNM_NOMATCH; + } diff -c2 -r +new-file make-3.60/glob/fnmatch.h make-3.62/glob/fnmatch.h *** make-3.60/glob/fnmatch.h --- make-3.62/glob/fnmatch.h Sat Oct 19 16:39:25 1991 *************** *** 0 **** --- 1,36 ---- + /* Copyright (C) 1991 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., 675 Mass Ave, + Cambridge, MA 02139, USA. */ + + #ifndef _FNMATCH_H + + #define _FNMATCH_H 1 + + /* Bits set in the FLAGS argument to `fnmatch'. */ + #define FNM_PATHNAME (1 << 0)/* No wildcard can ever match `/'. */ + #define FNM_NOESCAPE (1 << 1)/* Backslashes don't quote special chars. */ + #define FNM_PERIOD (1 << 2)/* Leading `.' is matched only explicitly. */ + #define __FNM_FLAGS (FNM_PATHNAME|FNM_NOESCAPE|FNM_PERIOD) + + /* Value returned by `fnmatch' if STRING does not match PATTERN. */ + #define FNM_NOMATCH 1 + + /* Match STRING against the filename pattern PATTERN, + returning zero if it matches, FNM_NOMATCH if not. */ + extern int fnmatch(); + + #endif /* fnmatch.h */ diff -c2 -r +new-file make-3.60/glob/glob.c make-3.62/glob/glob.c *** make-3.60/glob/glob.c --- make-3.62/glob/glob.c Sat Oct 19 16:39:23 1991 *************** *** 0 **** --- 1,521 ---- + /* Copyright (C) 1991 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., 675 Mass Ave, + Cambridge, MA 02139, USA. */ + + /* */ + + #include + #include + + #ifdef SHELL + #include "config.h" + #endif + + #include + #ifdef __GNU_LIBRARY__ + #include + #endif + + #if !defined(__GNU_LIBRARY__) && !defined(STDC_HEADERS) + extern int errno; + #endif + + #if defined (USGr3) && !defined (DIRENT) + #define DIRENT + #endif /* USGr3 and not DIRENT. */ + #if defined (Xenix) && !defined (SYSNDIR) + #define SYSNDIR + #endif /* Xenix and not SYSNDIR. */ + + #if defined (POSIX) || defined (DIRENT) || defined (__GNU_LIBRARY__) + #ifdef USG + #include + #endif + #include + #else + #if defined (USG) && !defined (sgi) + #ifdef SYSNDIR + #include + #else /* not SYSNDIR */ + #include "ndir.h" + #endif /* SYSNDIR */ + #else /* not USG */ + #include + #include + #endif /* USG */ + #undef dirent + #define dirent direct + #endif /* POSIX or DIRENT or __GNU_LIBRARY__ */ + + #if defined(__GNU_LIBRARY__) || !defined(POSIX) && !defined(USG) + #define D_NAMLEN(d) ((d)->d_namlen) + #else + #define D_NAMLEN(d) strlen((d)->d_name) + #endif + + #ifndef NULL + #define NULL 0 + #endif + + #if defined(POSIX) && !defined(__GNU_LIBRARY__) + /* Posix does not require that the d_ino field be present, and some + systems do not provide it. */ + #define REAL_DIR_ENTRY(dp) 1 + #else + #define REAL_DIR_ENTRY(dp) ((dp)->d_ino != 0) + #endif + + #if defined(__GNU_LIBRARY__) || defined(POSIX) + #include + #endif + + #if defined (STDC_HEADERS) || defined (__GNU_LIBRARY__) + + #include + #include + + #define STDC_STRINGS + + #else /* Not STDC_HEADERS and not __GNU_LIBRARY__. */ + + #ifdef USG + #include + #ifndef POSIX + #include + #endif /* Not POSIX. */ + #define STDC_STRINGS + #else /* Not USG. */ + #ifdef NeXT + #include + #else /* Not NeXT. */ + #include + #endif /* NeXT. */ + /* Declaring bcopy causes errors on systems whose declarations are different. + If the declaration is omitted, everything works fine. */ + #endif /* Not USG. */ + + extern char *malloc(); + extern char *realloc(); + extern void free(); + extern void qsort(); + + #ifdef __GNUC__ + __inline + #endif + static char * + my_realloc(p, n) + char *p; + unsigned int n; + { + if (p == NULL) + return malloc(n); + return realloc(p, n); + } + + #define realloc my_realloc + + #define strcoll strcmp + + #endif /* Not STDC_HEADERS or __GNU_LIBRARY__. */ + + #ifndef STDC_STRINGS + #define memcpy(d, s, n) bcopy((s), (d), (n)) + #define strrchr rindex + /* memset is only used for zero here, but let's be paranoid. */ + #define memset(s, better_be_zero, n) \ + ((void) ((better_be_zero) == 0 ? (bzero((s), (n)), 0) : (abort(), 0))) + #endif + + #if !defined(__alloca) && !defined(__GNU_LIBRARY__) + + #ifdef __GNUC__ + #define alloca __builtin_alloca + #else /* Not GCC. */ + #ifdef sparc + #include + #else /* Not sparc. */ + extern char *alloca(); + #endif /* sparc. */ + #endif /* GCC. */ + + #define __alloca alloca + + #endif + + #ifndef __STDC__ + #undef size_t + #define size_t unsigned int + #endif + + static int glob_pattern_p(); + static int glob_in_dir(); + static int prefix_array(); + static int collated_compare(); + + /* Do glob searching for PATTERN, placing results in PGLOB. + The bits defined above may be set in FLAGS. + If a directory cannot be opened or read and ERRFUNC is not nil, + it is called with the pathname that caused the error, and the + `errno' value from the failing call; if it returns non-zero + `glob' returns GLOB_ABEND; if it returns zero, the error is ignored. + If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned. + Otherwise, `glob' returns zero. */ + int + glob(pattern, flags, errfunc, pglob) + char *pattern; + int flags; + + int (*errfunc) (); + + glob_t *pglob; + { + char *filename; + char *dirname; + size_t dirlen; + int status; + int oldcount; + + if (pattern == NULL || pglob == NULL || (flags & ~__GLOB_FLAGS) != 0) + { + errno = EINVAL; + return -1; + } + + /* Find the filename. */ + filename = strrchr(pattern, '/'); + if (filename == NULL) + { + filename = pattern; + dirname = (char *) "."; + dirlen = 0; + } + else if (filename == pattern) + { + /* "/pattern". */ + dirname = (char *) "/"; + dirlen = 1; + ++filename; + } + else + { + dirlen = filename - pattern; + dirname = (char *) __alloca(dirlen + 1); + memcpy(dirname, pattern, dirlen); + dirname[dirlen] = '\0'; + ++filename; + } + + if (filename[0] == '\0') + /* "pattern/". Expand "pattern", appending slashes. */ + return glob(dirname, flags | GLOB_MARK, errfunc, pglob); + + if (!(flags & GLOB_APPEND)) + { + pglob->gl_pathc = 0; + pglob->gl_pathv = NULL; + } + + oldcount = pglob->gl_pathc; + + if (glob_pattern_p(dirname, !(flags & GLOB_NOESCAPE))) + { + /* The directory name contains metacharacters, so we + have to glob for the directory, and then glob for + the pattern in each directory found. */ + glob_t dirs; + register int i; + + status = glob(dirname, ((flags & (GLOB_ERR | GLOB_NOCHECK | GLOB_NOESCAPE)) | + GLOB_NOSORT), + errfunc, &dirs); + if (status != 0) + return status; + + /* We have successfully globbed the preceding directory name. + For each name we found, call glob_in_dir on it and FILENAME, + appending the results to PGLOB. */ + for (i = 0; i < dirs.gl_pathc; ++i) + { + int oldcount; + + #ifdef SHELL + { + /* Make globbing interruptible in the bash shell. */ + extern int interrupt_state; + + if (interrupt_state) + { + globfree(&dirs); + globfree(&files); + return GLOB_ABEND; + } + } + #endif /* SHELL. */ + + oldcount = pglob->gl_pathc; + status = glob_in_dir(filename, dirs.gl_pathv[i], + flags | GLOB_APPEND, errfunc, pglob); + if (status != 0) + { + globfree(&dirs); + globfree(pglob); + return status; + } + + /* Stick the directory on the front of each name. */ + if (prefix_array(dirs.gl_pathv[i], + &pglob->gl_pathv[oldcount], + pglob->gl_pathc - oldcount)) + { + globfree(&dirs); + globfree(pglob); + return GLOB_NOSPACE; + } + } + } + else + { + status = glob_in_dir(filename, dirname, flags, errfunc, pglob); + if (status != 0) + return status; + + if (dirlen > 0) + { + /* Stick the directory on the front of each name. */ + if (prefix_array(dirname, + &pglob->gl_pathv[oldcount], + pglob->gl_pathc - oldcount)) + { + globfree(pglob); + return GLOB_NOSPACE; + } + } + } + + if (!(flags & GLOB_NOSORT)) + qsort((char *) &pglob->gl_pathv[oldcount], pglob->gl_pathc - oldcount, + sizeof(char *), collated_compare); + + return 0; + } + + + /* Free storage allocated in PGLOB by a previous `glob' call. */ + void + globfree(pglob) + register glob_t *pglob; + { + if (pglob->gl_pathv != NULL) + { + register int i; + for (i = 0; i < pglob->gl_pathc; ++i) + if (pglob->gl_pathv[i] != NULL) + free((char *) pglob->gl_pathv[i]); + free((char *) pglob->gl_pathv); + } + } + + + /* Do a collated comparison of A and B. */ + static int + collated_compare(a, b) + char *a; + char *b; + { + char *s1 = *(char **) a; + char *s2 = *(char **) b; + + if (s1 == s2) + return 0; + if (s1 == NULL) + return 1; + if (s2 == NULL) + return -1; + return strcoll(s1, s2); + } + + + /* Prepend PREFIX to each of N members of ARRAY, replacing ARRAY's + elements in place. Return nonzero if out of memory, zero if successful. + A slash is inserted between PREFIX and each elt of ARRAY. + Each old element of ARRAY is freed. */ + static int + prefix_array(prefix, array, n) + char *prefix; + char **array; + size_t n; + { + register size_t i; + size_t prelen = strlen(prefix); + + for (i = 0; i < n; ++i) + { + size_t eltlen = strlen(array[i]) + 1; + char *new = (char *) malloc(prelen + 1 + eltlen); + if (new == NULL) + { + while (i > 0) + free((char *) array[--i]); + return 1; + } + + memcpy(new, prefix, prelen); + new[prelen] = '/'; + memcpy(&new[prelen + 1], array[i], eltlen); + free((char *) array[i]); + array[i] = new; + } + + return 0; + } + + + /* Return nonzero if PATTERN contains any metacharacters. + Metacharacters can be quoted with backslashes if QUOTE is nonzero. */ + static int + glob_pattern_p(pattern, quote) + char *pattern; + int quote; + { + register char *p; + int open = 0; + + for (p = pattern; *p != '\0'; ++p) + switch (*p) + { + case '?': + case '*': + return 1; + + case '\\': + if (quote) + ++p; + break; + + case '[': + open = 1; + break; + + case ']': + if (open) + return 1; + break; + } + + return 0; + } + + + /* Like `glob', but PATTERN is a final pathname component, + and matches are searched for in DIRECTORY. + The GLOB_NOSORT bit in FLAGS is ignored. No sorting is ever done. + The GLOB_APPEND flag is assumed to be set (always appends). */ + static int + glob_in_dir(pattern, directory, flags, errfunc, pglob) + char *pattern; + char *directory; + int flags; + + int (*errfunc) (); + glob_t *pglob; + { + register DIR *stream; + register struct dirent *d; + + struct globlink + { + struct globlink *next; + char *name; + }; + struct globlink *names = NULL; + size_t nfound = 0; + + if (!glob_pattern_p(pattern, !(flags & GLOB_NOESCAPE))) + flags |= GLOB_NOCHECK; + else + { + stream = opendir(directory); + if (stream == NULL) + { + if ((errfunc != NULL && (*errfunc) (directory, errno)) || + (flags & GLOB_ERR)) + return GLOB_ABEND; + } + else + while ((d = readdir(stream)) != NULL) + if (REAL_DIR_ENTRY(d) && + fnmatch(pattern, d->d_name, + (!(flags & GLOB_PERIOD) ? FNM_PERIOD : 0) | + ((flags & GLOB_NOESCAPE) ? FNM_NOESCAPE : 0)) == 0) + { + struct globlink *new = (struct globlink *) + __alloca(sizeof(struct globlink)); + size_t len = D_NAMLEN(d); + new->name = (char *) malloc(len + + ((flags & GLOB_MARK) ? 1 : 0) + 1); + if (new->name == NULL) + goto memory_error; + memcpy((char *) new->name, d->d_name, len); + if (flags & GLOB_MARK) + new->name[len++] = '/'; + new->name[len] = '\0'; + new->next = names; + names = new; + ++nfound; + } + } + + if (nfound == 0 && (flags & GLOB_NOCHECK)) + { + size_t len = strlen(pattern); + nfound = 1; + names = (struct globlink *) __alloca(sizeof(struct globlink)); + names->next = NULL; + names->name = (char *) malloc(len + ((flags & GLOB_MARK) ? 1 : 0) + 1); + memcpy(names->name, pattern, len); + if (flags & GLOB_MARK) + names->name[len++] = '/'; + names->name[len] = '\0'; + } + + pglob->gl_pathv + = (char **) realloc(pglob->gl_pathv, + (pglob->gl_pathc + + ((flags & GLOB_DOOFFS) ? pglob->gl_offs : 0) + + nfound + 1) * + sizeof(char *)); + if (pglob->gl_pathv == NULL) + goto memory_error; + + if (flags & GLOB_DOOFFS) + while (pglob->gl_pathc < pglob->gl_offs) + pglob->gl_pathv[pglob->gl_pathc++] = NULL; + + for (; names != NULL; names = names->next) + pglob->gl_pathv[pglob->gl_pathc++] = names->name; + pglob->gl_pathv[pglob->gl_pathc] = NULL; + + return nfound == 0 ? GLOB_NOMATCH : 0; + + memory_error:; + while (names != NULL) + { + free((char *) names->name); + names = names->next; + } + return GLOB_NOSPACE; + } diff -c2 -r +new-file make-3.60/glob/glob.h make-3.62/glob/glob.h *** make-3.60/glob/glob.h --- make-3.62/glob/glob.h Sat Oct 19 16:39:24 1991 *************** *** 0 **** --- 1,62 ---- + /* Copyright (C) 1991 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., 675 Mass Ave, + Cambridge, MA 02139, USA. */ + + #ifndef _GLOB_H + + #define _GLOB_H 1 + + /* Bits set in the FLAGS argument to `glob'. */ + #define GLOB_ERR (1 << 0)/* Return on read errors. */ + #define GLOB_MARK (1 << 1)/* Append a slash to each name. */ + #define GLOB_NOSORT (1 << 2)/* Don't sort the names. */ + #define GLOB_DOOFFS (1 << 3)/* Insert PGLOB->gl_offs NULLs. */ + #define GLOB_NOCHECK (1 << 4)/* If nothing matches, return the pattern. */ + #define GLOB_APPEND (1 << 5)/* Append to results of a previous call. */ + #define GLOB_NOESCAPE (1 << 6)/* Backslashes don't quote metacharacters. */ + #define GLOB_PERIOD (1 << 7)/* Leading `.' can be matched by metachars. */ + #define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \ + GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND|GLOB_PERIOD) + + /* Error returns from `glob'. */ + #define GLOB_NOSPACE 1 /* Ran out of memory. */ + #define GLOB_ABEND 2 /* Read error. */ + #define GLOB_NOMATCH 3 /* No matches found. */ + + /* Structure describing a globbing run. */ + typedef struct + { + int gl_pathc; /* Count of paths matched by the pattern. */ + char **gl_pathv; /* List of matched pathnames. */ + int gl_offs; /* Slots to reserve in `gl_pathv'. */ + } glob_t; + + /* Do glob searching for PATTERN, placing results in PGLOB. + The bits defined above may be set in FLAGS. + If a directory cannot be opened or read and ERRFUNC is not nil, + it is called with the pathname that caused the error, and the + `errno' value from the failing call; if it returns non-zero + `glob' returns GLOB_ABEND; if it returns zero, the error is ignored. + If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned. + Otherwise, `glob' returns zero. */ + extern int glob(); + + /* Free storage allocated in PGLOB by a previous `glob' call. */ + extern void globfree(); + + + #endif /* glob.h */ diff -c2 -r +new-file make-3.60/glob.c make-3.62/glob.c *** make-3.60/glob.c Tue Apr 2 16:51:24 1991 --- make-3.62/glob.c *************** *** 1,636 **** - /* File-name wildcard pattern matching for GNU. - Copyright (C) 1985, 1988, 1989, 1990, 1991 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - - /* To whomever it may concern: I have never seen the code which most - Unix programs use to perform this function. I wrote this from scratch - based on specifications for the pattern matching. --RMS. */ - - #ifdef SHELL - #include "config.h" - #endif /* SHELL */ - - #include - - #if defined (USGr3) && !defined (DIRENT) - #define DIRENT - #endif /* USGr3 */ - #if defined (Xenix) && !defined (SYSNDIR) - #define SYSNDIR - #endif /* Xenix */ - - #if defined (POSIX) || defined (DIRENT) || defined (__GNU_LIBRARY__) - #include - #define direct dirent - #define D_NAMLEN(d) strlen((d)->d_name) - #else /* not POSIX or DIRENT or __GNU_LIBRARY__ */ - #define D_NAMLEN(d) ((d)->d_namlen) - #ifdef USG - #if defined (SYSNDIR) - #include - #else /* SYSNDIR */ - #include "ndir.h" - #endif /* not SYSNDIR */ - #else /* not USG */ - #include - #endif /* USG */ - #endif /* POSIX or DIRENT or __GNU_LIBRARY__ */ - - #if defined (_POSIX_SOURCE) - /* Posix does not require that the d_ino field be present, and some - systems do not provide it. */ - #define REAL_DIR_ENTRY(dp) 1 - #else - #define REAL_DIR_ENTRY(dp) (dp->d_ino != 0) - #endif /* _POSIX_SOURCE */ - - #if defined (STDC_HEADERS) || defined (__GNU_LIBRARY__) - #include - #include - #define STDC_STRINGS - #else /* STDC_HEADERS or __GNU_LIBRARY__ */ - - #if defined (USG) - #include - #ifndef POSIX - #include - #endif /* POSIX */ - #define STDC_STRINGS - #else /* not USG */ - #ifdef NeXT - #include - #else /* NeXT */ - #include - #endif /* NeXT */ - /* Declaring bcopy causes errors on systems whose declarations are different. - If the declaration is omitted, everything works fine. */ - #endif /* not USG */ - - extern char *malloc (); - extern char *realloc (); - extern void free (); - - #ifndef NULL - #define NULL 0 - #endif - #endif /* Not STDC_HEADERS or __GNU_LIBRARY__. */ - - #ifdef STDC_STRINGS - #define bcopy(s, d, n) memcpy ((d), (s), (n)) - #define index strchr - #define rindex strrchr - #endif /* STDC_STRINGS */ - - #ifndef alloca - #ifdef __GNUC__ - #define alloca __builtin_alloca - #else /* Not GCC. */ - #ifdef sparc - #include - #else /* Not sparc. */ - extern char *alloca (); - #endif /* sparc. */ - #endif /* GCC. */ - #endif - - /* Nonzero if '*' and '?' do not match an initial '.' for glob_filename. */ - int noglob_dot_filenames = 1; - - static int glob_match_after_star (); - - /* Return nonzero if PATTERN has any special globbing chars in it. */ - - int - glob_pattern_p (pattern) - char *pattern; - { - register char *p = pattern; - register char c; - int open = 0; - - while ((c = *p++) != '\0') - switch (c) - { - case '?': - case '*': - return 1; - - case '[': /* Only accept an open brace if there is a close */ - open++; /* brace to match it. Bracket expressions must be */ - continue; /* complete, according to Posix.2 */ - case ']': - if (open) - return 1; - continue; - - case '\\': - if (*p++ == '\0') - return 0; - } - - return 0; - } - - - /* Match the pattern PATTERN against the string TEXT; - return 1 if it matches, 0 otherwise. - - A match means the entire string TEXT is used up in matching. - - In the pattern string, `*' matches any sequence of characters, - `?' matches any character, [SET] matches any character in the specified set, - [!SET] matches any character not in the specified set. - - A set is composed of characters or ranges; a range looks like - character hyphen character (as in 0-9 or A-Z). - [0-9a-zA-Z_] is the set of characters allowed in C identifiers. - Any other character in the pattern must be matched exactly. - - To suppress the special syntactic significance of any of `[]*?!-\', - and match the character exactly, precede it with a `\'. - - If DOT_SPECIAL is nonzero, - `*' and `?' do not match `.' at the beginning of TEXT. */ - - int - glob_match (pattern, text, dot_special) - char *pattern, *text; - int dot_special; - { - register char *p = pattern, *t = text; - register char c; - - while ((c = *p++) != '\0') - switch (c) - { - case '?': - if (*t == '\0' || (dot_special && t == text && *t == '.')) - return 0; - else - ++t; - break; - - case '\\': - if (*p++ != *t++) - return 0; - break; - - case '*': - if (dot_special && t == text && *t == '.') - return 0; - return glob_match_after_star (p, t); - - case '[': - { - register char c1 = *t++; - int invert; - - if (c1 == '\0') - return 0; - - invert = (*p == '!'); - - if (invert) - p++; - - c = *p++; - while (1) - { - register char cstart = c, cend = c; - - if (c == '\\') - { - cstart = *p++; - cend = cstart; - } - - if (cstart == '\0') - return 0; /* Missing ']'. */ - - c = *p++; - - if (c == '-') - { - cend = *p++; - if (cend == '\\') - cend = *p++; - if (cend == '\0') - return 0; - c = *p++; - } - if (c1 >= cstart && c1 <= cend) - goto match; - if (c == ']') - break; - } - if (!invert) - return 0; - break; - - match: - /* Skip the rest of the [...] construct that already matched. */ - while (c != ']') - { - if (c == '\0') - return 0; - c = *p++; - if (c == '\0') - return 0; - if (c == '\\') - p++; - } - if (invert) - return 0; - break; - } - - default: - if (c != *t++) - return 0; - } - - return *t == '\0'; - } - - /* Like glob_match, but match PATTERN against any final segment of TEXT. */ - - static int - glob_match_after_star (pattern, text) - char *pattern, *text; - { - register char *p = pattern, *t = text; - register char c, c1; - - while ((c = *p++) == '?' || c == '*') - if (c == '?' && *t++ == '\0') - return 0; - - if (c == '\0') - return 1; - - if (c == '\\') - c1 = *p; - else - c1 = c; - - --p; - while (1) - { - if ((c == '[' || *t == c1) && glob_match (p, t, 0)) - return 1; - if (*t++ == '\0') - return 0; - } - } - - /* Return a vector of names of files in directory DIR - whose names match glob pattern PAT. - The names are not in any particular order. - Wildcards at the beginning of PAT do not match an initial period - if noglob_dot_filenames is nonzero. - - The vector is terminated by an element that is a null pointer. - - To free the space allocated, first free the vector's elements, - then free the vector. - - Return NULL if cannot get enough memory to hold the pointer - and the names. - - Return -1 if cannot access directory DIR. - Look in errno for more information. */ - - char ** - glob_vector (pat, dir) - char *pat; - char *dir; - { - struct globval - { - struct globval *next; - char *name; - }; - - DIR *d; - register struct direct *dp; - struct globval *lastlink; - register struct globval *nextlink; - register char *nextname; - unsigned int count; - int lose; - register char **name_vector; - register unsigned int i; - - d = opendir (dir); - if (d == NULL) - return (char **) -1; - - lastlink = NULL; - count = 0; - lose = 0; - - /* Scan the directory, finding all names that match. - For each name that matches, allocate a struct globval - on the stack and store the name in it. - Chain those structs together; lastlink is the front of the chain. */ - while (1) - { - #if defined (SHELL) - /* Make globbing interruptible in the bash shell. */ - extern int interrupt_state; - - if (interrupt_state) - { - closedir (d); - lose = 1; - goto lost; - } - #endif /* SHELL */ - - dp = readdir (d); - if (dp == NULL) - break; - if (REAL_DIR_ENTRY (dp) - && glob_match (pat, dp->d_name, noglob_dot_filenames)) - { - nextlink = (struct globval *) alloca (sizeof (struct globval)); - nextlink->next = lastlink; - i = D_NAMLEN (dp) + 1; - nextname = (char *) malloc (i); - if (nextname == NULL) - { - lose = 1; - break; - } - lastlink = nextlink; - nextlink->name = nextname; - bcopy (dp->d_name, nextname, i); - count++; - } - } - closedir (d); - - if (!lose) - { - name_vector = (char **) malloc ((count + 1) * sizeof (char *)); - lose |= name_vector == NULL; - } - - /* Have we run out of memory? */ - #ifdef SHELL - lost: - #endif - if (lose) - { - /* Here free the strings we have got. */ - while (lastlink) - { - free (lastlink->name); - lastlink = lastlink->next; - } - return NULL; - } - - /* Copy the name pointers from the linked list into the vector. */ - for (i = 0; i < count; ++i) - { - name_vector[i] = lastlink->name; - lastlink = lastlink->next; - } - - name_vector[count] = NULL; - return name_vector; - } - - /* Return a new array, replacing ARRAY, which is the concatenation - of each string in ARRAY to DIR. - Return NULL if out of memory. */ - - static char ** - glob_dir_to_array (dir, array) - char *dir, **array; - { - register unsigned int i, l; - int add_slash = 0; - char **result; - - l = strlen (dir); - if (l == 0) - return array; - - if (dir[l - 1] != '/') - add_slash++; - - for (i = 0; array[i] != NULL; i++) - ; - - result = (char **) malloc ((i + 1) * sizeof (char *)); - if (result == NULL) - return NULL; - - for (i = 0; array[i] != NULL; i++) - { - result[i] = (char *) malloc (1 + l + add_slash + strlen (array[i])); - if (result[i] == NULL) - return NULL; - strcpy (result[i], dir); - if (add_slash) - result[i][l] = '/'; - strcpy (result[i] + l + add_slash, array[i]); - } - result[i] = NULL; - - /* Free the input array. */ - for (i = 0; array[i] != NULL; i++) - free (array[i]); - free ((char *) array); - return result; - } - - /* Do globbing on PATHNAME. Return an array of pathnames that match, - marking the end of the array with a null-pointer as an element. - If no pathnames match, then the array is empty (first element is null). - If there isn't enough memory, then return NULL. - If a file system error occurs, return -1; `errno' has the error code. - - Wildcards at the beginning of PAT, or following a slash, - do not match an initial period if noglob_dot_filenames is nonzero. */ - - char ** - glob_filename (pathname) - char *pathname; - { - char **result; - unsigned int result_size; - char *directory_name, *filename; - unsigned int directory_len; - - result = (char **) malloc (sizeof (char *)); - result_size = 1; - if (result == NULL) - return NULL; - - result[0] = NULL; - - /* Find the filename. */ - filename = rindex (pathname, '/'); - if (filename == NULL) - { - filename = pathname; - directory_name = ""; - directory_len = 0; - } - else - { - directory_len = (filename - pathname) + 1; - directory_name = (char *) alloca (directory_len + 1); - bcopy (pathname, directory_name, directory_len); - directory_name[directory_len] = '\0'; - ++filename; - } - - /* If directory_name contains globbing characters, then we - have to expand the previous levels. Just recurse. */ - if (glob_pattern_p (directory_name)) - { - char **directories; - register unsigned int i; - - if (directory_name[directory_len - 1] == '/') - directory_name[directory_len - 1] = '\0'; - - directories = glob_filename (directory_name); - if (directories == NULL) - goto memory_error; - else if (directories == (char **) -1) - return (char **) -1; - else if (*directories == NULL) - { - free ((char *) directories); - return (char **) -1; - } - - /* We have successfully globbed the preceding directory name. - For each name in DIRECTORIES, call glob_vector on it and - FILENAME. Concatenate the results together. */ - for (i = 0; directories[i] != NULL; i++) - { - char **temp_results = glob_vector (filename, directories[i]); - if (temp_results == NULL) - goto memory_error; - else if (temp_results == (char **) -1) - /* This filename is probably not a directory. Ignore it. */ - ; - else - { - char **array = glob_dir_to_array (directories[i], temp_results); - register unsigned int l; - - l = 0; - while (array[l] != NULL) - ++l; - - result = (char **) realloc (result, - (result_size + l) * sizeof (char *)); - if (result == NULL) - goto memory_error; - - for (l = 0; array[l] != NULL; ++l) - result[result_size++ - 1] = array[l]; - result[result_size - 1] = NULL; - free ((char *) array); - } - } - /* Free the directories. */ - for (i = 0; directories[i] != NULL; i++) - free (directories[i]); - free ((char *) directories); - - return result; - } - - /* If there is only a directory name, return it. */ - if (*filename == '\0') - { - result = (char **) realloc ((char *) result, 2 * sizeof (char *)); - if (result == NULL) - return NULL; - result[0] = (char *) malloc (directory_len + 1); - if (result[0] == NULL) - goto memory_error; - bcopy (directory_name, result[0], directory_len + 1); - result[1] = NULL; - return result; - } - else - { - /* Otherwise, just return what glob_vector - returns appended to the directory name. */ - char **temp_results = glob_vector (filename, - (directory_len == 0 - ? "." : directory_name)); - - if (temp_results == NULL || temp_results == (char **) -1) - return temp_results; - - return glob_dir_to_array (directory_name, temp_results); - } - - /* We get to memory error if the program has run out of memory, or - if this is the shell, and we have been interrupted. */ - memory_error: - if (result != NULL) - { - register unsigned int i; - for (i = 0; result[i] != NULL; ++i) - free (result[i]); - free ((char *) result); - } - #if defined (SHELL) - { - extern int interrupt_state; - - if (interrupt_state) - throw_to_top_level (); - } - #endif /* SHELL */ - return NULL; - } - - #ifdef TEST - - main (argc, argv) - int argc; - char **argv; - { - char **value; - int i, optind; - - for (optind = 1; optind < argc; optind++) - { - value = glob_filename (argv[optind]); - if (value == NULL) - puts ("virtual memory exhausted"); - else if (value == (char **) -1) - perror (argv[optind]); - else - for (i = 0; value[i] != NULL; i++) - puts (value[i]); - } - exit (0); - } - - #endif /* TEST */ --- 0 ---- diff -c2 -r +new-file make-3.60/gpl.texinfo make-3.62/gpl.texinfo *** make-3.60/gpl.texinfo --- make-3.62/gpl.texinfo Sat Jul 27 15:49:15 1991 *************** *** 0 **** --- 1,389 ---- + @unnumbered GNU GENERAL PUBLIC LICENSE + @center Version 2, June 1991 + + @display + Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + @end display + + @unnumberedsec Preamble + + The licenses for most software are designed to take away your + freedom to share and change it. By contrast, the GNU General Public + License is intended to guarantee your freedom to share and change free + software---to make sure the software is free for all its users. This + General Public License applies to most of the Free Software + Foundation's software and to any other program whose authors commit to + using it. (Some other Free Software Foundation software is covered by + the GNU Library General Public License instead.) You can apply it to + your programs, too. + + 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 + this service 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. + + To protect your rights, we need to make restrictions that forbid + anyone to deny you these rights or to ask you to surrender the rights. + These restrictions translate to certain responsibilities for you if you + distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether + gratis or for a fee, you must give the recipients all the rights that + you have. You must make sure that they, too, receive or can get the + source code. And you must show them these terms so they know their + rights. + + We protect your rights with two steps: (1) copyright the software, and + (2) offer you this license which gives you legal permission to copy, + distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain + that everyone understands that there is no warranty for this free + software. If the software is modified by someone else and passed on, we + want its recipients to know that what they have is not the original, so + that any problems introduced by others will not reflect on the original + authors' reputations. + + Finally, any free program is threatened constantly by software + patents. We wish to avoid the danger that redistributors of a free + program will individually obtain patent licenses, in effect making the + program proprietary. To prevent this, we have made it clear that any + patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and + modification follow. + + @iftex + @unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + @end iftex + @ifinfo + @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + @end ifinfo + + @enumerate + @item + This License applies to any program or other work which contains + a notice placed by the copyright holder saying it may be distributed + under the terms of this General Public License. The ``Program'', below, + refers to any such program or work, and a ``work based on the Program'' + means either the Program or any derivative work under copyright law: + that is to say, a work containing the Program or a portion of it, + either verbatim or with modifications and/or translated into another + language. (Hereinafter, translation is included without limitation in + the term ``modification''.) Each licensee is addressed as ``you''. + + Activities other than copying, distribution and modification are not + covered by this License; they are outside its scope. The act of + running the Program is not restricted, and the output from the Program + is covered only if its contents constitute a work based on the + Program (independent of having been made by running the Program). + Whether that is true depends on what the Program does. + + @item + You may copy and distribute 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 and disclaimer of warranty; keep intact all the + notices that refer to this License and to the absence of any warranty; + and give any other recipients of the Program a copy of this License + along with the Program. + + You may charge a fee for the physical act of transferring a copy, and + you may at your option offer warranty protection in exchange for a fee. + + @item + You may modify your copy or copies of the Program or any portion + of it, thus forming a work based on the Program, and copy and + distribute such modifications or work under the terms of Section 1 + above, provided that you also meet all of these conditions: + + @alphaenumerate + @item + You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + @item + You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + @item + If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + @end alphaenumerate + + These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the Program, + and can be reasonably considered independent and separate works in + themselves, then this License, and its terms, do not apply to those + sections when you distribute them as separate works. But when you + distribute the same sections as part of a whole which is a work based + on the Program, the distribution of the whole must be on the terms of + this License, whose permissions for other licensees extend to the + entire whole, and thus to each and every part regardless of who wrote it. + + Thus, it is not the intent of this section to claim rights or contest + your rights to work written entirely by you; rather, the intent is to + exercise the right to control the distribution of derivative or + collective works based on the Program. + + In addition, mere aggregation of another work not based on the Program + with the Program (or with a work based on the Program) on a volume of + a storage or distribution medium does not bring the other work under + the scope of this License. + + @item + You may copy and distribute the Program (or a work based on it, + under Section 2) in object code or executable form under the terms of + Sections 1 and 2 above provided that you also do one of the following: + + @alphaenumerate + @item + Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + @item + Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + @item + Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + @end alphaenumerate + + The source code for a work means the preferred form of the work for + making modifications to it. For an executable work, complete source + code means all the source code for all modules it contains, plus any + associated interface definition files, plus the scripts used to + control compilation and installation of the executable. However, as a + special exception, the source code distributed need not include + anything that is normally distributed (in either source or binary + form) with the major components (compiler, kernel, and so on) of the + operating system on which the executable runs, unless that component + itself accompanies the executable. + + If distribution of executable or object code is made by offering + access to copy from a designated place, then offering equivalent + access to copy the source code from the same place counts as + distribution of the source code, even though third parties are not + compelled to copy the source along with the object code. + + @item + You may not copy, modify, sublicense, or distribute the Program + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense or distribute the Program is + void, and will automatically terminate your rights under this License. + However, parties who have received copies, or rights, from you under + this License will not have their licenses terminated so long as such + parties remain in full compliance. + + @item + You are not required to accept this License, since you have not + signed it. However, nothing else grants you permission to modify or + distribute the Program or its derivative works. These actions are + prohibited by law if you do not accept this License. Therefore, by + modifying or distributing the Program (or any work based on the + Program), you indicate your acceptance of this License to do so, and + all its terms and conditions for copying, distributing or modifying + the Program or works based on it. + + @item + Each time you redistribute the Program (or any work based on the + Program), the recipient automatically receives a license from the + original licensor to copy, distribute or modify the Program subject to + these terms and conditions. You may not impose any further + restrictions on the recipients' exercise of the rights granted herein. + You are not responsible for enforcing compliance by third parties to + this License. + + @item + If, as a consequence of a court judgment or allegation of patent + infringement or for any other reason (not limited to patent issues), + 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 + distribute so as to satisfy simultaneously your obligations under this + License and any other pertinent obligations, then as a consequence you + may not distribute the Program at all. For example, if a patent + license would not permit royalty-free redistribution of the Program by + all those who receive copies directly or indirectly through you, then + the only way you could satisfy both it and this License would be to + refrain entirely from distribution of the Program. + + If any portion of this section is held invalid or unenforceable under + any particular circumstance, the balance of the section is intended to + apply and the section as a whole is intended to apply in other + circumstances. + + It is not the purpose of this section to induce you to infringe any + patents or other property right claims or to contest validity of any + such claims; this section has the sole purpose of protecting the + integrity of the free software distribution system, which is + implemented by public license practices. Many people have made + generous contributions to the wide range of software distributed + through that system in reliance on consistent application of that + system; it is up to the author/donor to decide if he or she is willing + to distribute software through any other system and a licensee cannot + impose that choice. + + This section is intended to make thoroughly clear what is believed to + be a consequence of the rest of this License. + + @item + If the distribution and/or use of the Program is restricted in + certain countries either by patents or by copyrighted interfaces, the + original copyright holder who places the Program under this License + may add an explicit geographical distribution limitation excluding + those countries, so that distribution is permitted only in or among + countries not thus excluded. In such case, this License incorporates + the limitation as if written in the body of this License. + + @item + The Free Software Foundation may publish revised and/or new versions + of the 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 a version number of this License which applies to it and ``any + later version'', you have the option of following the terms and conditions + either of that version or of any later version published by the Free + Software Foundation. If the Program does not specify a version number of + this License, you may choose any version ever published by the Free Software + Foundation. + + @item + If you wish to incorporate parts of the Program into other free + programs whose distribution conditions are different, write to the author + to ask for permission. For software which is copyrighted by the Free + Software Foundation, write to the Free Software Foundation; we sometimes + make exceptions for this. Our decision will be guided by the two goals + of preserving the free status of all derivatives of our free software and + of promoting the sharing and reuse of software generally. + + @iftex + @heading NO WARRANTY + @end iftex + @ifinfo + @center NO WARRANTY + @end ifinfo + + @item + BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. + + @item + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING + WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR + REDISTRIBUTE 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. + @end enumerate + + @iftex + @heading END OF TERMS AND CONDITIONS + @end iftex + @ifinfo + @center END OF TERMS AND CONDITIONS + @end ifinfo + + @page + @unnumberedsec 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 + convey the exclusion of warranty; and each file should have at least + the ``copyright'' line and a pointer to where the full notice is found. + + @smallexample + @var{one line to give the program's name and a brief idea of what it does.} + Copyright (C) 19@var{yy} @var{name of author} + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + @end smallexample + + Also add information on how to contact you by electronic and paper mail. + + If the program is interactive, make it output a short notice like this + when it starts in an interactive mode: + + @smallexample + Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author} + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + @end smallexample + + The hypothetical commands @samp{show w} and @samp{show c} should show + the appropriate parts of the General Public License. Of course, the + commands you use may be called something other than @samp{show w} and + @samp{show c}; they could even be mouse-clicks or menu items---whatever + suits your program. + + You should also get your employer (if you work as a programmer) or your + school, if any, to sign a ``copyright disclaimer'' for the program, if + necessary. Here is a sample; alter the names: + + @example + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + @var{signature of Ty Coon}, 1 April 1989 + Ty Coon, President of Vice + @end example + + This General Public License does not permit incorporating your program into + proprietary programs. If your program is a subroutine library, you may + consider it more useful to permit linking proprietary applications with the + library. If this is what you want to do, use the GNU Library General + Public License instead of this License. diff -c2 -r +new-file make-3.60/implicit.c make-3.62/implicit.c *** make-3.60/implicit.c Fri Jul 6 04:35:51 1990 --- make-3.62/implicit.c Tue Oct 8 16:04:11 1991 *************** *** 1,4 **** /* Implicit rule searching for GNU Make. ! Copyright (C) 1988, 1989, 1990 Free Software Foundation, Inc. This file is part of GNU Make. --- 1,4 ---- /* Implicit rule searching for GNU Make. ! Copyright (C) 1988, 1989, 1990, 1991 Free Software Foundation, Inc. This file is part of GNU Make. *************** *** 5,9 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 5,9 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. *************** *** 381,385 **** but only on the second pass. */ ! if (intermed_ok && p == depname) { if (intermediate_file == 0) --- 381,385 ---- but only on the second pass. */ ! if (intermed_ok) { if (intermediate_file == 0) *************** *** 547,585 **** /* If there was only one target, there is nothing to do. */ if (rule->targets[1] != 0) ! { ! unsigned int max_targets = 2; ! register unsigned int idx; ! ! file->also_make = (char **) xmalloc (2 * sizeof (char *)); - idx = 0; - for (i = 0; rule->targets[i] != 0; ++i) - if (i != matches[foundrule]) - { - if (idx == max_targets - 1) - { - max_targets += 5; - file->also_make - = (char **) xrealloc ((char *) file->also_make, - max_targets * sizeof (char *)); - } - - p = file->also_make[idx++] = (char *) xmalloc (rule->lens[i] + - stemlen + 1); - bcopy (rule->targets[i], p, - rule->suffixes[i] - rule->targets[i] - 1); - p += rule->suffixes[i] - rule->targets[i] - 1; - bcopy (stem, p, stemlen); - p += stemlen; - bcopy (rule->suffixes[i], p, - rule->lens[i] - - (rule->suffixes[i] - rule->targets[i] - 1) + 1); - } - - file->also_make[idx] = 0; - if (idx < max_targets - 1) - file->also_make = (char **) xrealloc ((char *) file->also_make, - (idx + 1) * sizeof (char *)); - } return 1; --- 547,568 ---- /* If there was only one target, there is nothing to do. */ if (rule->targets[1] != 0) ! for (i = 0; rule->targets[i] != 0; ++i) ! if (i != matches[foundrule]) ! { ! struct dep *new = (struct dep *) xmalloc (sizeof (struct dep)); ! new->name = p = (char *) xmalloc (rule->lens[i] + stemlen + 1); ! bcopy (rule->targets[i], p, ! rule->suffixes[i] - rule->targets[i] - 1); ! p += rule->suffixes[i] - rule->targets[i] - 1; ! bcopy (stem, p, stemlen); ! p += stemlen; ! bcopy (rule->suffixes[i], p, ! rule->lens[i] ! - (rule->suffixes[i] - rule->targets[i] - 1) + 1); ! new->file = enter_file (new->name); ! new->next = file->also_make; ! file->also_make = new; ! } return 1; diff -c2 -r +new-file make-3.60/job.c make-3.62/job.c *** make-3.60/job.c Wed May 8 14:47:02 1991 --- make-3.62/job.c Thu Oct 24 17:58:33 1991 *************** *** 5,9 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 5,9 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. *************** *** 32,44 **** extern int errno; ! #if defined(USG) && !defined(HAVE_VFORK) ! #define vfork fork ! #define VFORK_NAME "fork" ! #else /* Have vfork or not USG. */ ! #define VFORK_NAME "vfork" ! #endif /* USG and don't have vfork. */ ! extern int vfork (); ! #ifdef _POSIX_SOURCE #include --- 32,47 ---- extern int errno; ! #if defined(POSIX) || defined(__GNU_LIBRARY__) ! #include ! #include ! #define GET_NGROUPS_MAX sysconf (_SC_NGROUPS_MAX) ! #else /* Not POSIX. */ ! #ifndef USG ! #include ! #define NGROUPS_MAX NGROUPS ! #endif /* Not USG. */ ! #endif /* POSIX. */ ! #ifdef POSIX #include *************** *** 45,49 **** #define WAIT_NOHANG(status) waitpid(-1, (status), WNOHANG) ! #else /* Not _POSIX_SOURCE. */ #if defined(HAVE_SYS_WAIT) || !defined(USG) --- 48,52 ---- #define WAIT_NOHANG(status) waitpid(-1, (status), WNOHANG) ! #else /* Not POSIX. */ #if defined(HAVE_SYS_WAIT) || !defined(USG) *************** *** 55,65 **** extern int wait3 (); #endif ! #define WAIT_NOHANG(status) wait3((status), WNOHANG, (struct rusage *) 0) ! #ifndef wait extern int wait (); #endif #endif /* HAVE_SYS_WAIT || !USG */ ! #endif /* _POSIX_SOURCE. */ #if defined(WTERMSIG) || (defined(USG) && !defined(HAVE_SYS_WAIT)) --- 58,69 ---- extern int wait3 (); #endif ! #define WAIT_NOHANG(status) \ ! wait3((union wait *) (status), WNOHANG, (struct rusage *) 0) ! #if !defined (wait) && !defined (POSIX) extern int wait (); #endif #endif /* HAVE_SYS_WAIT || !USG */ ! #endif /* POSIX. */ #if defined(WTERMSIG) || (defined(USG) && !defined(HAVE_SYS_WAIT)) *************** *** 98,108 **** ! #if defined(__GNU_LIBRARY__) || defined(_POSIX_SOURCE) #include #define GID_T gid_t ! #ifdef hpux ! #include ! #define getdtablesize() NOFILE ! #endif #else /* Not GNU C library. */ --- 102,110 ---- ! #if defined(__GNU_LIBRARY__) || defined(POSIX) ! #include #define GID_T gid_t ! #else /* Not GNU C library. */ *************** *** 110,117 **** extern int dup2 (); ! extern int fork (), execve (); extern void _exit (); extern int geteuid (), getegid (); extern int setgid (), getgid (); #ifndef USG --- 112,120 ---- extern int dup2 (); ! extern int execve (); extern void _exit (); extern int geteuid (), getegid (); extern int setgid (), getgid (); + #endif /* GNU C library. */ #ifndef USG *************** *** 121,126 **** #define getdtablesize() NOFILE #endif - #endif /* GNU C library. */ - extern void wait_to_start_job (); --- 124,127 ---- *************** *** 462,466 **** /* Set the state flag to say the commands have finished. */ - c->file->command_state = cs_finished; notice_finished_file (c->file); --- 463,466 ---- *************** *** 559,571 **** { static int bad_stdin = -1; - char *end; register char *p; - int backslash; char noprint = 0, recursive; char **argv; - /* Set RECURSIVE if the unexpanded line contains $(MAKE). */ - recursive = child->file->cmds->lines_recurse[child->command_line]; - if (child->command_ptr == 0 || *child->command_ptr == '\0') { --- 559,566 ---- *************** *** 580,627 **** } else - /* Get the next line to run. */ - child->command_ptr = child->command_lines[child->command_line++]; - } - - /* Find the end of this line. Backslash-newlines don't mean the end. */ - - end = child->command_ptr; - while (*end != '\0') - { - p = index (end, '\n'); - if (p == 0) - { - end += strlen (end); - break; - } - - end = p; - backslash = 0; - while (*--p == '\\') - backslash = !backslash; - - if (backslash) { ! ++end; ! /* If there is a tab after a backslash-newline, ! remove it, since it was most likely used to line ! up the continued line with the previous one. */ ! if (*end == '\t') ! strcpy (end, end + 1); } - else - break; } - - p = child->command_ptr; - - if (*end == '\0') - child->command_ptr = 0; else ! { ! *end = '\0'; ! child->command_ptr = end + 1; ! } child->noerror = 0; while (*p != '\0') --- 575,593 ---- } else { ! /* Get the next line to run, and set RECURSIVE ! if the unexpanded line contains $(MAKE). */ ! child->command_ptr = child->command_lines[child->command_line]; ! recursive = child->file->cmds->lines_recurse[child->command_line]; ! ++child->command_line; } } else ! /* Still executing the last line we started. */ ! recursive = child->file->cmds->lines_recurse[child->command_line - 1]; + /* Find the end of this line. Backslash-newlines don't mean the end. */ + + p = child->command_ptr; child->noerror = 0; while (*p != '\0') *************** *** 633,637 **** else if (*p == '+') recursive = 1; ! else if (*p != ' ' && *p != '\t') break; ++p; --- 599,603 ---- else if (*p == '+') recursive = 1; ! else if (!isblank (*p)) break; ++p; *************** *** 646,655 **** p = next_token (p); ! if (*p == '\0') ! { ! /* There were no commands on this line. Go to the next. */ ! start_job (child); ! return; ! } /* Print out the command. */ --- 612,628 ---- p = next_token (p); ! /* Figure out an argument list from this command line. */ ! ! { ! char *end; ! argv = construct_command_argv (p, &end, child->file); ! if (end == NULL) ! child->command_ptr = NULL; ! else ! { ! *end++ = '\0'; ! child->command_ptr = end; ! } ! } /* Print out the command. */ *************** *** 658,665 **** puts (p); ! /* If -n was given, recurse to get the next line in the sequence. */ ! ! if (just_print_flag && !recursive) { start_job (child); return; --- 631,637 ---- puts (p); ! if (argv == 0) { + /* This line has no commands. Go to the next. */ start_job (child); return; *************** *** 666,680 **** } ! /* Collapse backslash-newlines in this line. */ ! ! collapse_continuations (p); ! ! /* Figure out an argument list from this command line. */ ! ! argv = construct_command_argv (p, child->file); ! if (argv == 0) { ! /* This line has no commands. Go to the next. */ start_job (child); return; --- 638,647 ---- } ! /* If -n was given, recurse to get the next line in the sequence. */ ! if (just_print_flag && !recursive) { ! free (argv[0]); ! free ((char *) argv); start_job (child); return; *************** *** 896,906 **** unsigned int len; ! #ifndef USG extern int getgroups (); ! static GID_T groups[NGROUPS]; static int ngroups = -1; ! if (ngroups == -1) ! ngroups = getgroups (NGROUPS, groups); ! #endif /* Not USG. */ len = strlen (file) + 1; --- 863,886 ---- unsigned int len; ! #if !defined (USG) || defined (POSIX) ! #ifndef POSIX extern int getgroups (); ! #endif static int ngroups = -1; ! #ifdef NGROUPS_MAX ! static GID_T groups[NGROUPS_MAX]; ! #define ngroups_max NGROUPS_MAX ! #else ! static GID_T *groups = 0; ! static int ngroups_max; ! if (groups == 0) ! { ! ngroups_max = GET_NGROUPS_MAX; ! groups = (GID_T *) malloc (ngroups_max * sizeof (GID_T)); ! } ! #endif ! if (groups != 0 && ngroups == -1) ! ngroups = getgroups (ngroups_max, groups); ! #endif /* POSIX or not USG. */ len = strlen (file) + 1; *************** *** 964,968 **** { char *shell, *path; ! char program[MAXPATHLEN]; register char **ep; --- 944,948 ---- { char *shell, *path; ! PATH_VAR (program); register char **ep; *************** *** 978,983 **** } ! /* Be the user. */ ! user_access (); if (!search_path (argv[0], path, program)) --- 958,963 ---- } ! /* Be the user, permanently. */ ! child_access (); if (!search_path (argv[0], path, program)) *************** *** 990,994 **** if (errno == ENOEXEC) { ! char shell_program[MAXPATHLEN], *shell_path; if (shell == 0) shell_path = default_shell; --- 970,975 ---- if (errno == ENOEXEC) { ! PATH_VAR (shell_program); ! char *shell_path; if (shell == 0) shell_path = default_shell; *************** *** 1039,1042 **** --- 1020,1026 ---- listed in sh_cmds[] is the first word of a line, the shell is used. + If RESTP is not NULL, *RESTP is set to point to the first newline in LINE. + If *RESTP is NULL, newlines will be ignored. + SHELL is the shell to use, or nil to use the default shell. IFS is the value of $IFS, or nil (meaning the default). */ *************** *** 1043,1048 **** static char ** ! construct_command_argv_internal (line, shell, ifs) ! char *line; char *shell, *ifs; { --- 1027,1032 ---- static char ** ! construct_command_argv_internal (line, restp, shell, ifs) ! char *line, **restp; char *shell, *ifs; { *************** *** 1078,1081 **** --- 1062,1068 ---- end = ap + i; + if (restp != NULL) + *restp = NULL; + /* I is how many complete arguments have been found. */ i = 0; *************** *** 1102,1105 **** --- 1089,1093 ---- { case '\\': + /* Backslash-newline combinations are eaten. */ if (p[1] != '\0' && p[1] != '\n') /* Copy and skip the following char. */ *************** *** 1112,1115 **** --- 1100,1114 ---- case '\n': + if (restp != NULL) + { + /* End of the command line. */ + *restp = p; + goto end_of_line; + } + else + /* Newlines are not special. */ + *ap++ = '\n'; + break; + case ' ': case '\t': *************** *** 1140,1143 **** --- 1139,1143 ---- } } + end_of_line: if (instring) *************** *** 1201,1205 **** { if (*p == '\\' || *p == '\'' ! || *p == ' ' || *p == '\t' || *p == '\n' || index (sh_chars, *p) != 0) *ap++ = '\\'; --- 1201,1205 ---- { if (*p == '\\' || *p == '\'' ! || isspace (*p) || index (sh_chars, *p) != 0) *ap++ = '\\'; *************** *** 1208,1212 **** *ap = '\0'; ! new_argv = construct_command_argv_internal (new_line, (char *) 0, (char *) 0); } --- 1208,1212 ---- *ap = '\0'; ! new_argv = construct_command_argv_internal (new_line, restp, (char *) 0, (char *) 0); } *************** *** 1221,1224 **** --- 1221,1227 ---- listed in sh_cmds[] is the first word of a line, the shell is used. + If RESTP is not NULL, *RESTP is set to point to the first newline in LINE. + If *RESTP is NULL, newlines will be ignored. + FILE is the target whose commands these are. It is used for variable expansion for $(SHELL) and $(IFS). */ *************** *** 1225,1230 **** char ** ! construct_command_argv (line, file) ! char *line; struct file *file; { --- 1228,1233 ---- char ** ! construct_command_argv (line, restp, file) ! char *line, **restp; struct file *file; { *************** *** 1233,1237 **** char **argv; ! argv = construct_command_argv_internal (line, shell, ifs); free (shell); --- 1236,1240 ---- char **argv; ! argv = construct_command_argv_internal (line, restp, shell, ifs); free (shell); diff -c2 -r +new-file make-3.60/load.c make-3.62/load.c *** make-3.60/load.c Thu Dec 13 17:45:00 1990 --- make-3.62/load.c Thu Sep 26 04:43:13 1991 *************** *** 1,3 **** ! /* Copyright (C) 1988, 1989 Free Software Foundation, Inc. This file is part of GNU Make. --- 1,3 ---- ! /* Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. This file is part of GNU Make. *************** *** 4,8 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 4,8 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. *************** *** 50,54 **** #endif ! static double load_average () { --- 50,54 ---- #endif ! double load_average () { *************** *** 118,121 **** --- 118,148 ---- #else /* Not UMAX. */ + #ifdef apollo + + /* Apollo code from lisch@mentorg.com (Ray Lischner). */ + + #define LDAV_BASED + + /* Return the current load average as a double. + + This system call is not documented. The load average is obtained as + three long integers, for the load average over the past minute, + five minutes, and fifteen minutes. Each value is a scaled integer, + with 16 bits of integer part and 16 bits of fraction part. + + I'm not sure which operating system first supported this system call, + but I know that SR10.2 supports it. */ + + double + load_average () + { + extern void proc1_$get_loadav (); + unsigned long int loadav[3]; + proc1_$get_loadav(loadav); + return loadav[0] / 65536.0; + } + + #else /* Not apollo. */ + #ifndef NO_LDAV *************** *** 122,129 **** #define LDAV_BASED ! #if defined(hp300) && defined(BSD) #define LDAV_CVT (((double) load) / 2048.0) #endif #ifndef KERNEL_FILE_NAME #define KERNEL_FILE_NAME "/vmunix" --- 149,161 ---- #define LDAV_BASED ! #if defined(hp300) && !defined(USG) #define LDAV_CVT (((double) load) / 2048.0) #endif + #if defined(ultrix) && defined(vax) + #define LDAV_TYPE double + #define LDAV_CVT (load) + #endif + #ifndef KERNEL_FILE_NAME #define KERNEL_FILE_NAME "/vmunix" *************** *** 154,158 **** /* Return the current load average as a double. */ ! static double load_average () { --- 186,190 ---- /* Return the current load average as a double. */ ! double load_average () { *************** *** 226,229 **** --- 258,262 ---- #endif /* Not NO_LDAV. */ + #endif /* Apollo. */ #endif /* UMAX. */ diff -c2 -r +new-file make-3.60/main.c make-3.62/main.c *** make-3.60/main.c Thu May 16 13:59:21 1991 --- make-3.62/main.c Mon Sep 9 19:36:14 1991 *************** *** 4,8 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 4,8 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. *************** *** 22,26 **** #include "variable.h" #include "job.h" - #include #include --- 22,25 ---- *************** *** 38,42 **** extern void print_vpath_data_base (); ! #if !defined(__GNU_LIBRARY__) && !defined(_POSIX_SOURCE) extern int chdir (); extern void exit (); --- 37,41 ---- extern void print_vpath_data_base (); ! #if !defined(__GNU_LIBRARY__) && !defined(POSIX) extern int chdir (); extern void exit (); *************** *** 291,295 **** register struct dep *lastgoal; struct dep *read_makefiles; ! char current_directory[MAXPATHLEN]; default_goal_file = 0; --- 290,294 ---- register struct dep *lastgoal; struct dep *read_makefiles; ! PATH_VAR (current_directory); default_goal_file = 0; *************** *** 343,347 **** --- 342,350 ---- #else /* Not USGr3 and not HPUX et al. */ #ifdef USG + #ifdef sgi + setvbuf (stdout, _IOLBF, xmalloc (BUFSIZ), BUFSIZ); + #else setvbuf (stdout, _IOLBF, (char *) 0, BUFSIZ); + #endif #else /* Not USG. */ setlinebuf (stdout); *************** *** 375,379 **** --- 378,386 ---- if (getwd (current_directory) == 0) { + #ifdef USG + perror_with_name ("getcwd: ", ""); + #else error ("getwd: %s", current_directory); + #endif current_directory[0] = '\0'; } *************** *** 437,441 **** while (*p != '\0') { ! if (index ("'\"*?[]$<>(){}|&~`\\ \t\r\n\f\v", *p) != 0) cmd_defs[cmd_defs_idx++] = '\\'; cmd_defs[cmd_defs_idx++] = *p++; --- 444,448 ---- while (*p != '\0') { ! if (index (";'\"*?[]$<>(){}|&~`\\ \t\r\n\f\v", *p) != 0) cmd_defs[cmd_defs_idx++] = '\\'; cmd_defs[cmd_defs_idx++] = *p++; *************** *** 596,599 **** --- 603,609 ---- define_makeflags (0, 0); + /* Define the default variables. */ + define_default_variables (); + /* Read all the makefiles. */ *************** *** 680,707 **** { register struct file *f = d->file; ! if (f->is_target && f->deps == 0 && f->cmds != 0) { ! /* This makefile is a target with commands, but has no ! dependencies. So, it will always be remade. ! This might well cause an infinite loop, so don't try to ! remake it. (This will only happen if your makefiles are ! written exceptionally stupidly; but if you work for Athena, ! that's how you write your makefiles.) */ ! ! if (debug_flag) ! printf ("Makefile `%s' might loop; not remaking it.\n", ! f->name); ! if (last == 0) ! read_makefiles = d->next; ! else ! last->next = d->next; ! /* Free the storage. */ ! free ((char *) d); ! d = last == 0 ? 0 : last->next; } ! else { if (makefile_mtimes == 0) --- 690,728 ---- { register struct file *f = d->file; ! if (f->double_colon) { ! do ! { ! if (f->deps == 0 && f->cmds != 0) ! { ! /* This makefile is a :: target with commands, but ! no dependencies. So, it will always be remade. ! This might well cause an infinite loop, so don't ! try to remake it. (This will only happen if ! your makefiles are written exceptionally ! stupidly; but if you work for Athena, that's how ! you write your makefiles.) */ ! ! if (debug_flag) ! printf ("Makefile `%s' might loop; not remaking it.\n", ! f->name); ! ! if (last == 0) ! read_makefiles = d->next; ! else ! last->next = d->next; ! /* Free the storage. */ ! free ((char *) d); ! d = last == 0 ? 0 : last->next; ! break; ! } ! f = f->prev; ! } ! while (f != NULL); } ! if (f == NULL || !f->double_colon) { if (makefile_mtimes == 0) *************** *** 1329,1333 **** { static int entered = 0; ! char pwdbuf[MAXPATHLEN]; char *message = entering ? "Entering" : "Leaving"; --- 1350,1354 ---- { static int entered = 0; ! PATH_VAR (pwdbuf); char *message = entering ? "Entering" : "Leaving"; *************** *** 1352,1356 **** #endif if (getwd (pwdbuf) == 0) ! printf ("an unknown directory (getwd: %s)\n", pwdbuf); else printf ("directory `%s'\n", pwdbuf); --- 1373,1384 ---- #endif if (getwd (pwdbuf) == 0) ! { ! #ifdef USG ! perror_with_name ("getcwd: ", ""); ! #else ! error ("getwd: %s", pwdbuf); ! #endif ! puts ("an unknown directory"); ! } else printf ("directory `%s'\n", pwdbuf); diff -c2 -r +new-file make-3.60/make.h make-3.62/make.h *** make-3.60/make.h Wed May 8 14:51:20 1991 --- make-3.62/make.h Sat Oct 26 17:19:58 1991 *************** *** 4,8 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 4,8 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. *************** *** 16,26 **** the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ! /* Some nonconformant attempt at a 1003.1 ! implementation needs this for `pid_t'. */ ! #ifdef _POSIX_SOURCE #include ! #endif ! #include #if !defined(NSIG) && defined(_NSIG) --- 16,29 ---- the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ! #define _GNU_SOURCE #include ! #include #include + #include + #include + + #ifndef isblank + #define isblank(c) ((c) == ' ' || (c) == '\t') + #endif #if !defined(NSIG) && defined(_NSIG) *************** *** 33,37 **** #define SIGHANDLER int (*)() #endif ! #define SIGNAL(sig, handler) ((SIGHANDLER) signal((sig), (handler))) #ifndef sigmask --- 36,41 ---- #define SIGHANDLER int (*)() #endif ! #define SIGNAL(sig, handler) \ ! ((SIGHANDLER) signal((sig), (SIGHANDLER) (handler))) #ifndef sigmask *************** *** 39,50 **** #endif ! #include ! #include #ifndef MAXPATHLEN #define MAXPATHLEN 1024 #endif /* No MAXPATHLEN. */ ! #include #ifndef S_ISREG --- 43,74 ---- #endif ! #if defined(POSIX) || defined(__GNU_LIBRARY__) ! #include ! #ifndef PATH_MAX ! #define GET_PATH_MAX pathconf ("/", _PC_PATH_MAX) ! #endif ! #else /* Not POSIX. */ #include + #ifndef PATH_MAX #ifndef MAXPATHLEN #define MAXPATHLEN 1024 #endif /* No MAXPATHLEN. */ + #define PATH_MAX MAXPATHLEN + #endif /* No PATH_MAX. */ + #endif /* POSIX. */ + #ifdef PATH_MAX + #define PATH_VAR(var) char var[PATH_MAX] + #else + #define PATH_VAR(var) char *var = (char *) alloca (GET_PATH_MAX) + #endif ! #ifdef uts ! #ifdef S_ISREG ! #undef S_ISREG ! #endif ! #ifdef S_ISDIR ! #undef S_ISDIR ! #endif ! #endif /* uts. */ #ifndef S_ISREG *************** *** 57,61 **** #if (defined (STDC_HEADERS) || defined (__GNU_LIBRARY__) \ ! || defined (_POSIX_SOURCE)) #include #include --- 81,85 ---- #if (defined (STDC_HEADERS) || defined (__GNU_LIBRARY__) \ ! || defined (POSIX)) #include #include *************** *** 70,77 **** #else /* Not USG. */ #include extern int bcmp (); ! extern void bzero (), bcopy (); #endif /* USG. */ --- 94,117 ---- #else /* Not USG. */ + + #ifdef NeXT + + #include + + #else /* Not NeXT. */ + #include + #ifndef bcmp extern int bcmp (); ! #endif ! #ifndef bzero ! extern void bzero (); ! #endif ! #ifndef bcopy ! extern void bcopy (); ! #endif ! ! #endif /* NeXT. */ #endif /* USG. */ *************** *** 89,93 **** #define bzero(s, n) memset ((s), 0, (n)) #define bcopy(s, d, n) memcpy ((d), (s), (n)) ! #endif ANSI_STRING #undef ANSI_STRING --- 129,133 ---- #define bzero(s, n) memset ((s), 0, (n)) #define bcopy(s, d, n) memcpy ((d), (s), (n)) ! #endif #undef ANSI_STRING *************** *** 94,100 **** #ifdef __GNUC__ ! #ifndef alloca #define alloca(n) __builtin_alloca (n) - #endif #else /* Not GCC. */ #ifdef sparc --- 134,139 ---- #ifdef __GNUC__ ! #undef alloca #define alloca(n) __builtin_alloca (n) #else /* Not GCC. */ #ifdef sparc *************** *** 126,129 **** --- 165,169 ---- extern void die (); extern void message (), fatal (), error (); + extern void makefile_error (), makefile_fatal (); extern void pfatal_with_name (), perror_with_name (); extern char *savestring (), *concat (); *************** *** 139,143 **** #ifndef NO_ARCHIVES extern int ar_name (); ! extern void ar_name_parse (); extern int ar_touch (); extern time_t ar_member_date (); --- 179,183 ---- #ifndef NO_ARCHIVES extern int ar_name (); ! extern void ar_parse_name (); extern int ar_touch (); extern time_t ar_member_date (); *************** *** 149,152 **** --- 189,193 ---- extern char *dir_name (); + extern void define_default_variables (); extern void set_default_suffixes (), install_default_implicit_rules (); extern void convert_to_pattern (), count_implicit_rule_limits (); *************** *** 162,172 **** extern void notice_finished_file (); ! extern void user_access (), make_access (); ! extern int glob_pattern_p (); ! extern char **glob_filename (); ! #ifdef __GNU_LIBRARY__ #include --- 203,217 ---- extern void notice_finished_file (); ! extern void user_access (), make_access (), child_access (); ! #if defined(USG) && !defined(HAVE_VFORK) ! #define vfork fork ! #define VFORK_NAME "fork" ! #else /* Have vfork or not USG. */ ! #define VFORK_NAME "vfork" ! #endif /* USG and don't have vfork. */ ! #if defined(__GNU_LIBRARY__) || defined(POSIX) #include *************** *** 176,184 **** #ifndef USG extern int sigsetmask (); #endif - #ifndef _POSIX_SOURCE extern int kill (); - #endif - extern int sigblock (); extern void abort (), exit (); extern int unlink (), stat (); --- 221,227 ---- #ifndef USG extern int sigsetmask (); + extern int sigblock (); #endif extern int kill (); extern void abort (), exit (); extern int unlink (), stat (); *************** *** 185,202 **** extern void qsort (); extern int atoi (); ! extern int pipe (), close (), read (); extern long int lseek (); extern char *ctime (); ! ! extern char **environ; ! #ifdef USG extern char *getcwd (); ! #define getwd(buf) getcwd (buf, MAXPATHLEN - 2) ! #else /* Not USG. */ extern char *getwd (); ! #endif /* USG. */ #endif extern char *reading_filename; --- 228,256 ---- extern void qsort (); extern int atoi (); ! extern int pipe (), close (), read (), write (), open (); extern long int lseek (); extern char *ctime (); ! #endif /* GNU C library or POSIX. */ ! #if defined(USG) || defined(POSIX) && !defined(__GNU_LIBRARY__) extern char *getcwd (); ! #ifdef PATH_MAX ! #define getwd(buf) getcwd (buf, PATH_MAX - 2) ! #else ! #define getwd(buf) getcwd (buf, GET_PATH_MAX - 2) ! #endif ! #else /* USG or POSIX and not GNU C library. */ extern char *getwd (); ! #endif /* Not USG or POSIX, or maybe GNU C library. */ ! ! #if !defined(__GNU_LIBRARY__) && (!defined(vfork) || !defined(POSIX)) ! #ifdef POSIX ! extern pid_t vfork (); ! #else ! extern int vfork (); #endif + #endif + extern char **environ; extern char *reading_filename; diff -c2 -r +new-file make-3.60/make.man make-3.62/make.man *** make-3.60/make.man Mon Sep 17 16:01:40 1990 --- make-3.62/make.man Mon Sep 23 23:33:24 1991 *************** *** 261,265 **** .TP 0.5i .B \-w ! Print a message containing the working directory before and after before and after other processing. This may be useful for tracking down errors from complicated nests of --- 261,265 ---- .TP 0.5i .B \-w ! Print a message containing the working directory before and after other processing. This may be useful for tracking down errors from complicated nests of diff -c2 -r +new-file make-3.60/make.texinfo make-3.62/make.texinfo *** make-3.60/make.texinfo Sun Dec 9 21:50:02 1990 --- make-3.62/make.texinfo Mon Sep 23 23:58:59 1991 *************** *** 16,20 **** This file documents the GNU Make utility. ! Copyright (C) 1988, 1989, 1990 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of --- 16,20 ---- This file documents the GNU Make utility. ! Copyright (C) 1988-1991 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of *************** *** 51,67 **** @center by Richard M. Stallman and Roland McGrath @sp 3 ! @center Edition 0.27 Beta, @sp 1 ! @center last updated 31 May 1990, @sp 1 ! @center for @code{make}, Version 3.59 Beta. @page @vskip 0pt plus 1filll ! Copyright @copyright{} 1988, 1989, 1990 Free Software Foundation, Inc. @sp 2 ! This is Edition 0.27 Beta of the @cite{GNU Make Manual}, @* ! last updated 31 May 1990, @* ! for @code{make} Version 3.59 Beta. @sp 2 --- 51,67 ---- @center by Richard M. Stallman and Roland McGrath @sp 3 ! @center Edition 0.28 Beta, @sp 1 ! @center last updated 23 September 1991, @sp 1 ! @center for @code{make}, Version 3.61 Beta. @page @vskip 0pt plus 1filll ! Copyright @copyright{} 1988-1991 Free Software Foundation, Inc. @sp 2 ! This is Edition 0.28 Beta of the @cite{GNU Make Manual}, @* ! last updated 23 September 1991, @* ! for @code{make} Version 3.61 Beta. @sp 2 *************** *** 69,73 **** 675 Massachusetts Avenue, @* Cambridge, MA 02139 USA @* ! Printed copies are available for $10 each. Permission is granted to make and distribute verbatim copies of --- 69,73 ---- 675 Massachusetts Avenue, @* Cambridge, MA 02139 USA @* ! Printed copies are available for $15 each. Permission is granted to make and distribute verbatim copies of *************** *** 170,470 **** @node Copying, Bugs, Overview, Top - @unnumbered GNU GENERAL PUBLIC LICENSE - @center Version 1, February 1989 ! @display ! Copyright @copyright{} 1989 Free Software Foundation, Inc. ! 675 Mass Ave, Cambridge, MA 02139, USA ! ! Everyone is permitted to copy and distribute verbatim copies ! of this license document, but changing it is not allowed. ! @end display ! ! @unnumberedsec Preamble ! ! The license agreements of most software companies try to keep users ! at the mercy of those companies. By contrast, our General Public ! License is intended to guarantee your freedom to share and change free ! software---to make sure the software is free for all its users. The ! General Public License applies to the Free Software Foundation's ! software and to any other program whose authors commit to using it. ! You can use it for your programs, too. ! ! When we speak of free software, we are referring to freedom, not ! price. Specifically, the General Public License is designed to make ! sure that you have the freedom to give away or sell copies of free ! software, 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. ! ! To protect your rights, we need to make restrictions that forbid ! anyone to deny you these rights or to ask you to surrender the rights. ! These restrictions translate to certain responsibilities for you if you ! distribute copies of the software, or if you modify it. ! ! For example, if you distribute copies of a such a program, whether ! gratis or for a fee, you must give the recipients all the rights that ! you have. You must make sure that they, too, receive or can get the ! source code. And you must tell them their rights. ! ! We protect your rights with two steps: (1) copyright the software, and ! (2) offer you this license which gives you legal permission to copy, ! distribute and/or modify the software. ! ! Also, for each author's protection and ours, we want to make certain ! that everyone understands that there is no warranty for this free ! software. If the software is modified by someone else and passed on, we ! want its recipients to know that what they have is not the original, so ! that any problems introduced by others will not reflect on the original ! authors' reputations. - The precise terms and conditions for copying, distribution and - modification follow. - - @iftex - @unnumberedsec TERMS AND CONDITIONS - @end iftex - @ifinfo - @center TERMS AND CONDITIONS - @end ifinfo - - @enumerate - @item - This License Agreement applies to any program or other work which - contains a notice placed by the copyright holder saying it may be - distributed under the terms of this General Public License. The - ``Program'', below, refers to any such program or work, and a ``work based - on the Program'' means either the Program or any work containing the - Program or a portion of it, either verbatim or with modifications. Each - licensee is addressed as ``you''. - - @item - You may copy and distribute 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 and - disclaimer of warranty; keep intact all the notices that refer to this - General Public License and to the absence of any warranty; and give any - other recipients of the Program a copy of this General Public License - along with the Program. You may charge a fee for the physical act of - transferring a copy. - - @item - You may modify your copy or copies of the Program or any portion of - it, and copy and distribute such modifications under the terms of Paragraph - 1 above, provided that you also do the following: - - @itemize @bullet - @item - cause the modified files to carry prominent notices stating that - you changed the files and the date of any change; and - - @item - cause the whole of any work that you distribute or publish, that - in whole or in part contains the Program or any part thereof, either - with or without modifications, to be licensed at no charge to all - third parties under the terms of this General Public License (except - that you may choose to grant warranty protection to some or all - third parties, at your option). - - @item - If the modified program normally reads commands interactively when - run, you must cause it, when started running for such interactive use - in the simplest and most usual way, to print or display an - announcement including an appropriate copyright notice and a notice - that there is no warranty (or else, saying that you provide a - warranty) and that users may redistribute the program under these - conditions, and telling the user how to view a copy of this General - Public License. - - @item - You may charge a fee for the physical act of transferring a - copy, and you may at your option offer warranty protection in - exchange for a fee. - @end itemize - - Mere aggregation of another independent work with the Program (or its - derivative) on a volume of a storage or distribution medium does not bring - the other work under the scope of these terms. - - @item - You may copy and distribute the Program (or a portion or derivative of - it, under Paragraph 2) in object code or executable form under the terms of - Paragraphs 1 and 2 above provided that you also do one of the following: - - @itemize @bullet - @item - accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of - Paragraphs 1 and 2 above; or, - - @item - accompany it with a written offer, valid for at least three - years, to give any third party free (except for a nominal charge - for the cost of distribution) a complete machine-readable copy of the - corresponding source code, to be distributed under the terms of - Paragraphs 1 and 2 above; or, - - @item - accompany it with the information you received as to where the - corresponding source code may be obtained. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form alone.) - @end itemize - - Source code for a work means the preferred form of the work for making - modifications to it. For an executable file, complete source code means - all the source code for all modules it contains; but, as a special - exception, it need not include source code for modules which are standard - libraries that accompany the operating system on which the executable - file runs, or for standard header files or definitions files that - accompany that operating system. - - @item - You may not copy, modify, sublicense, distribute or transfer the - Program except as expressly provided under this General Public License. - Any attempt otherwise to copy, modify, sublicense, distribute or transfer - the Program is void, and will automatically terminate your rights to use - the Program under this License. However, parties who have received - copies, or rights to use copies, from you under this General Public - License will not have their licenses terminated so long as such parties - remain in full compliance. - - @item - By copying, distributing or modifying the Program (or any work based - on the Program) you indicate your acceptance of this license to do so, - and all its terms and conditions. - - @item - Each time you redistribute the Program (or any work based on the - Program), the recipient automatically receives a license from the original - licensor to copy, distribute or modify the Program subject to these - terms and conditions. You may not impose any further restrictions on the - recipients' exercise of the rights granted herein. - - @item - The Free Software Foundation may publish revised and/or new versions - of the 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 a version number of the license which applies to it and ``any - later version'', you have the option of following the terms and conditions - either of that version or of any later version published by the Free - Software Foundation. If the Program does not specify a version number of - the license, you may choose any version ever published by the Free Software - Foundation. - - @item - If you wish to incorporate parts of the Program into other free - programs whose distribution conditions are different, write to the author - to ask for permission. For software which is copyrighted by the Free - Software Foundation, write to the Free Software Foundation; we sometimes - make exceptions for this. Our decision will be guided by the two goals - of preserving the free status of all derivatives of our free software and - of promoting the sharing and reuse of software generally. - - @iftex - @heading NO WARRANTY - @end iftex - @ifinfo - @center NO WARRANTY - @end ifinfo - - @item - BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. - - @item - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL - ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR - REDISTRIBUTE 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. - @end enumerate - - @iftex - @heading END OF TERMS AND CONDITIONS - @end iftex - @ifinfo - @center END OF TERMS AND CONDITIONS - @end ifinfo - - @page - @unnumberedsec Appendix: 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 humanity, 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 convey - the exclusion of warranty; and each file should have at least the - ``copyright'' line and a pointer to where the full notice is found. - - @smallexample - @var{one line to give the program's name and a brief idea of what it does.} - Copyright (C) 19@var{yy} @var{name of author} - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - @end smallexample - - Also add information on how to contact you by electronic and paper mail. - - If the program is interactive, make it output a short notice like this - when it starts in an interactive mode: - - @smallexample - Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author} - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - @end smallexample - - The hypothetical commands `show w' and `show c' should show the - appropriate parts of the General Public License. Of course, the - commands you use may be called something other than `show w' and `show - c'; they could even be mouse-clicks or menu items---whatever suits your - program. - - You should also get your employer (if you work as a programmer) or your - school, if any, to sign a ``copyright disclaimer'' for the program, if - necessary. Here a sample; alter the names: - - @example - Yoyodyne, Inc., hereby disclaims all copyright interest in the - program `Gnomovision' (a program to direct compilers to make passes - at assemblers) written by James Hacker. - - @var{signature of Ty Coon}, 1 April 1989 - Ty Coon, President of Vice - @end example - - That's all there is to it! - @node Bugs, Simple, Copying, Top @chapter Problems and Bugs --- 170,176 ---- @node Copying, Bugs, Overview, Top ! @include gpl.texinfo @node Bugs, Simple, Copying, Top @chapter Problems and Bugs *************** *** 1741,1750 **** commands (@pxref{Automatic}). For example: - @group @example bigoutput littleoutput : text.g generate text.g -$(subst output,,$@@) > $@@ - @end example @end group @noindent --- 1447,1456 ---- commands (@pxref{Automatic}). For example: @example + @group bigoutput littleoutput : text.g generate text.g -$(subst output,,$@@) > $@@ @end group + @end example @noindent *************** *** 1905,1913 **** @section Multiple Rules for One Target ! One file can be the target of several rules if at most one rule has commands; ! the other rules can only have dependencies. All the dependencies mentioned ! in all the rules are merged into one list of dependencies for the target. ! If the target is older than any dependency from any rule, the commands are ! executed. An extra rule with just dependencies can be used to give a few extra --- 1611,1627 ---- @section Multiple Rules for One Target ! One file can be the target of several rules. All the dependencies ! mentioned in all the rules are merged into one list of dependencies for ! the target. If the target is older than any dependency from any rule, ! the commands are executed. ! ! There can only be one set of commands to be executed for a file. ! If more than one rule gives commands for the same file, the last ! @code{make} uses the last set given and prints an error message. ! (As a special case, if the file's name begins with a dot, no ! error message is printed. This odd behavior is only for ! compatibility with other @code{make}s.) There is no reason to ! write your makefiles this way; that is why @code{make} gives you ! an error message.@refill An extra rule with just dependencies can be used to give a few extra *************** *** 1932,1941 **** (@pxref{Overriding}). For example, - @group @example extradeps= $(objects) : $(extradeps) - @end example @end group @noindent --- 1646,1655 ---- (@pxref{Overriding}). For example, @example + @group extradeps= $(objects) : $(extradeps) @end group + @end example @noindent *************** *** 2070,2080 **** following is equivalent to the preceding example: - @group @example foo : bar/lose cd bar; \ gobble lose > ../foo - @end example @end group @vindex SHELL --- 1784,1794 ---- following is equivalent to the preceding example: @example + @group foo : bar/lose cd bar; \ gobble lose > ../foo @end group + @end example @vindex SHELL *************** *** 2995,2999 **** @noindent defines a variable named @code{objects}. Whitespace around the variable ! name and after the @samp{=} is ignored. Variables defined with @samp{=} are @dfn{recursively expanded} variables. --- 2709,2713 ---- @noindent defines a variable named @code{objects}. Whitespace around the variable ! name and immediately after the @samp{=} is ignored. Variables defined with @samp{=} are @dfn{recursively expanded} variables. *************** *** 4624,4628 **** the special target @code{.SUFFIXES}). @xref{Suffix Rules}. The default suffix list is: @samp{.out}, @samp{.a}, @samp{.o}, ! @samp{.c}, @samp{.cc}, @samp{.p}, @samp{.f}, @samp{.F}, @samp{.r}, @samp{.e}, @samp{.y}, @samp{.ye}, @samp{.yr}, @samp{.l}, @samp{.s}, @samp{.S}, @samp{.h}, @samp{.info}, @samp{.dvi}, @samp{.tex}, --- 4338,4342 ---- the special target @code{.SUFFIXES}). @xref{Suffix Rules}. The default suffix list is: @samp{.out}, @samp{.a}, @samp{.o}, ! @samp{.c}, @samp{.cc}, @samp{.C}, @samp{.p}, @samp{.f}, @samp{.F}, @samp{.r}, @samp{.e}, @samp{.y}, @samp{.ye}, @samp{.yr}, @samp{.l}, @samp{.s}, @samp{.S}, @samp{.h}, @samp{.info}, @samp{.dvi}, @samp{.tex}, *************** *** 4640,4649 **** @item Compiling C++ programs ! @file{@var{n}.o} will be made automatically from @file{@var{n}.cc} ! with a command of the form @samp{$(C++) -c $(CPPFLAGS) $(C++FLAGS)}. ! Although supported by the GNU C++ compiler, the suffix used by the ! AT&T C++ preprocessor, @samp{.C}, is not supported in @code{make} ! because we encourage the use of the preferred suffix for C++ files, ! @samp{.cc}.@refill @item Compiling Pascal programs --- 4354,4361 ---- @item Compiling C++ programs ! @file{@var{n}.o} will be made automatically from @file{@var{n}.cc} or ! @file{@var{n}.C} with a command of the form @samp{$(C++) -c $(CPPFLAGS) ! $(C++FLAGS)}. We encourage you to use the suffix @samp{.cc} for C++ ! source files instead of @samp{.C}.@refill @item Compiling Pascal programs *************** *** 5999,6004 **** @chapter Missing Features in GNU @code{make} ! The @code{make} programs in various other systems support a ! few features that are not implemented in GNU @code{make}. @itemize @bullet --- 5711,5718 ---- @chapter Missing Features in GNU @code{make} ! The @code{make} programs in various other systems support a few features ! that are not implemented in GNU @code{make}. Draft 11.1 of the POSIX.2 ! standard which specifies @code{make} does not require any of these ! features.@refill @itemize @bullet *************** *** 6050,6056 **** (@pxref{Directory Search}) have their names changed inside command strings. We feel it is much cleaner to always use automatic variables ! and thus make this feature obsolete. We are still debating whether to ! implement this for the sake of compatibility or to leave it out to avoid ! such terrible ugliness.@refill @end itemize --- 5764,5786 ---- (@pxref{Directory Search}) have their names changed inside command strings. We feel it is much cleaner to always use automatic variables ! and thus make this feature obsolete.@refill ! ! @item ! In some Unix @code{make}s, implicit rule search (@pxref{Implicit}) is ! apparently done for @emph{all} targets, not just those without commands. ! This means you can do:@refill ! ! @example ! foo.o: ! cc -c foo.c ! @end example ! ! @noindent ! and Unix @code{make} will intuit that @file{foo.o} depends on ! @file{foo.c}.@refill ! ! We feel that such usage is broken. The dependency properties of ! @code{make} are well-defined (for GNU @code{make}, at least), ! and doing such a thing simply does not fit the model.@refill @end itemize diff -c2 -r +new-file make-3.60/misc.c make-3.62/misc.c *** make-3.60/misc.c Wed Apr 24 20:52:07 1991 --- make-3.62/misc.c Mon Oct 7 18:04:20 1991 *************** *** 4,8 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 4,8 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. *************** *** 85,89 **** { in = next_token (in); ! while (out > line && (out[-1] == ' ' || out[-1] == '\t')) --out; *out++ = ' '; --- 85,89 ---- { in = next_token (in); ! while (out > line && isblank (out[-1])) --out; *out++ = ' '; *************** *** 243,246 **** --- 243,271 ---- } + void + makefile_error (file, lineno, s1, s2, s3, s4, s5, s6) + char *file; + unsigned int lineno; + char *s1, *s2, *s3, *s4, *s5, *s6; + { + fprintf (stderr, "%s:%u: ", file, lineno); + fprintf (stderr, s1, s2, s3, s4, s5, s6); + putc ('\n', stderr); + fflush (stderr); + } + + void + makefile_fatal (file, lineno, s1, s2, s3, s4, s5, s6) + char *file; + unsigned int lineno; + char *s1, *s2, *s3, *s4, *s5, *s6; + { + fprintf (stderr, "%s:%u: ", file, lineno); + fprintf (stderr, s1, s2, s3, s4, s5, s6); + fputs (". Stop.\n", stderr); + + die (1); + } + /* Print an error message from errno. */ *************** *** 366,370 **** register int backslash = 0; ! while (*p != '\0' && (backslash || (*p != ' ' && *p != '\t' && *p != '\f'))) { if (*p++ == '\\') --- 391,395 ---- register int backslash = 0; ! while (*p != '\0' && (backslash || !isblank (*p))) { if (*p++ == '\\') *************** *** 392,396 **** register char *p = s; ! while (*p == ' ' || *p == '\t' || *p == '\f') ++p; return p; --- 417,421 ---- register char *p = s; ! while (isblank (*p)) ++p; return p; *************** *** 457,460 **** --- 482,494 ---- #endif + #if !defined(POSIX) && !defined(__GNU_LIBRARY__) + extern int getuid (), getgid (), geteuid (), getegid (); + #ifdef USG + extern int setuid (), setgid (); + #else + extern int setreuid (), setregid (); + #endif /* USG. */ + #endif /* Not POSIX and not GNU C library. */ + /* Keep track of the user and group IDs for user- and make- access. */ static int user_uid = -1, user_gid = -1, make_uid = -1, make_gid = -1; *************** *** 494,498 **** which are the IDs of the process that exec'd make. */ ! #ifdef USG /* System V has only the setuid/setgid calls to set user/group IDs. There is an effective ID, which can be set by setuid/setgid. --- 528,532 ---- which are the IDs of the process that exec'd make. */ ! #if defined (USG) || defined (POSIX) /* System V has only the setuid/setgid calls to set user/group IDs. There is an effective ID, which can be set by setuid/setgid. *************** *** 535,539 **** /* See comments in user_access, above. */ ! #ifdef USG if (setuid (make_uid) < 0) pfatal_with_name ("setuid"); --- 569,573 ---- /* See comments in user_access, above. */ ! #if defined (USG) || defined (POSIX) if (setuid (make_uid) < 0) pfatal_with_name ("setuid"); *************** *** 548,550 **** --- 582,598 ---- current_access = make; + } + + /* Give the process appropriate permissions for a child process. + This is like user_access, but you can't get back to make_access. */ + void + child_access () + { + /* Set both the real and effective UID and GID to the user's. + They cannot be changed back to make's. */ + + if (setuid (user_uid) < 0) + pfatal_with_name ("setuid"); + if (setgid (user_gid) < 0) + pfatal_with_name ("setgid"); } diff -c2 -r +new-file make-3.60/read.c make-3.62/read.c *** make-3.60/read.c Wed May 8 01:54:01 1991 --- make-3.62/read.c Thu Oct 10 16:20:54 1991 *************** *** 1,3 **** ! /* Copyright (C) 1988, 1989, 1990 Free Software Foundation, Inc. This file is part of GNU Make. --- 1,3 ---- ! /* Copyright (C) 1988, 1989, 1990, 1991 Free Software Foundation, Inc. This file is part of GNU Make. *************** *** 4,8 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 4,8 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. *************** *** 22,25 **** --- 22,32 ---- #include "variable.h" + /* This is POSIX.2, but most systems using -DPOSIX probably don't have it. */ + #ifdef __GNU_LIBRARY__ + #include + #else + #include "glob/glob.h" + #endif + #include struct passwd *getpwnam (); *************** *** 113,118 **** { ! char *makefiles = allocated_variable_expand ("$(MAKEFILES)"); ! char *name; unsigned int length; --- 120,125 ---- { ! char *value = allocated_variable_expand ("$(MAKEFILES)"); ! char *name, *p; unsigned int length; *************** *** 119,126 **** /* Set NAME to the start of next token and LENGTH to its length. MAKEFILES is updated for finding remaining tokens. */ ! while ((name = find_next_token (&makefiles, &length)) != 0) read_makefile (name, 1); ! free (makefiles); } --- 126,134 ---- /* Set NAME to the start of next token and LENGTH to its length. MAKEFILES is updated for finding remaining tokens. */ ! p = value; ! while ((name = find_next_token (&p, &length)) != 0) read_makefile (name, 1); ! free (value); } *************** *** 318,326 **** remove_comments (collapsed); ! p = next_token (collapsed); if (*p == '\0' && lb.buffer[0] != '\t') continue; ! #define word1eq(s, l) ((p[l] == '\0' || p[l] == ' ' || p[l] == '\t') && \ !strncmp (s, p, l)) if (word1eq ("ifdef", 5) || word1eq ("ifndef", 6) --- 326,336 ---- remove_comments (collapsed); ! p = collapsed; ! while (isspace (*p)) ! ++p; if (*p == '\0' && lb.buffer[0] != '\t') continue; ! #define word1eq(s, l) ((p[l] == '\0' || isblank (p[l])) && \ !strncmp (s, p, l)) if (word1eq ("ifdef", 5) || word1eq ("ifndef", 6) *************** *** 335,339 **** } else ! fatal ("%s:%u: invalid syntax in conditional", filename, lineno); } if (ignoring) --- 345,350 ---- } else ! makefile_fatal (filename, lineno, ! "invalid syntax in conditional"); } if (ignoring) *************** *** 345,350 **** if (filenames == 0) ! fatal ("%s:%u: commands commence before first target", ! filename, lineno); /* Add this command line to end of the line being accumulated. */ --- 356,361 ---- if (filenames == 0) ! makefile_fatal (filename, lineno, ! "commands commence before first target"); /* Add this command line to end of the line being accumulated. */ *************** *** 370,374 **** } else if (word1eq ("endef", 5)) ! fatal ("%s:%u: extraneous `endef'", filename, lineno); else if (word1eq ("override", 8)) { --- 381,385 ---- } else if (word1eq ("endef", 5)) ! makefile_fatal (filename, lineno, "extraneous `endef'"); else if (word1eq ("override", 8)) { *************** *** 375,379 **** p2 = next_token (p + 8); if (p2 == 0) ! error ("%s:%u: empty `override' directive", filename, lineno); if (!strncmp (p2, "define", 6)) { --- 386,390 ---- p2 = next_token (p + 8); if (p2 == 0) ! makefile_error (filename, lineno, "empty `override' directive"); if (!strncmp (p2, "define", 6)) { *************** *** 385,389 **** } else if (!try_variable_definition (p2, o_override)) ! error ("%s:%u: Empty `override' directive", filename, lineno); continue; } --- 396,401 ---- } else if (!try_variable_definition (p2, o_override)) ! makefile_error (filename, lineno, ! "Empty `override' directive"); continue; } *************** *** 397,401 **** if (*p == '\0') { ! error ("%s:%u: no filename for `include'", filename, lineno); continue; } --- 409,413 ---- if (*p == '\0') { ! makefile_error (filename, lineno, "no filename for `include'"); continue; } *************** *** 405,410 **** *p2++ = '\0'; if (*next_token (p2) != '\0') ! error ("%s:%u: extraneous text after `include'", ! filename, lineno); } bzero ((char *) &new_conditionals, sizeof new_conditionals); --- 417,422 ---- *p2++ = '\0'; if (*next_token (p2) != '\0') ! makefile_error (filename, lineno, ! "extraneous text after `include'"); } bzero ((char *) &new_conditionals, sizeof new_conditionals); *************** *** 434,439 **** p = savestring (p, len); if (find_next_token (&p2, (unsigned int *) 0) != 0) ! error ("%s:%u: extraneous text after `vpath' directive", ! filename, lineno); } /* No searchpath means remove all previous --- 446,451 ---- p = savestring (p, len); if (find_next_token (&p2, (unsigned int *) 0) != 0) ! makefile_error (filename, lineno, ! "extraneous text after `vpath' directive"); } /* No searchpath means remove all previous *************** *** 490,494 **** continue; else if (*p2 == ':') ! fatal ("%s:%u: missing target name", filename, lineno); filenames = multi_glob (parse_file_seq (&p2, ':', --- 502,506 ---- continue; else if (*p2 == ':') ! makefile_fatal (filename, lineno, "missing target name"); filenames = multi_glob (parse_file_seq (&p2, ':', *************** *** 496,500 **** sizeof (struct nameseq)); if (*p2++ == '\0') ! fatal ("%s:%u: missing separator", filename, lineno); /* Is this a one-colon or two-colon entry? */ two_colon = *p2 == ':'; --- 508,512 ---- sizeof (struct nameseq)); if (*p2++ == '\0') ! makefile_fatal (filename, lineno, "missing separator"); /* Is this a one-colon or two-colon entry? */ two_colon = *p2 == ':'; *************** *** 521,532 **** ++p2; if (target == 0) ! fatal ("%s:%u: missing target pattern", filename, lineno); else if (target->next != 0) ! fatal ("%s:%u: multiple target patterns", filename, lineno); pattern = target->name; pattern_percent = find_percent (pattern); if (pattern_percent == 0) ! fatal ("%s:%u: target pattern contains no `%%'", ! filename, lineno); } else --- 533,544 ---- ++p2; if (target == 0) ! makefile_fatal (filename, lineno, "missing target pattern"); else if (target->next != 0) ! makefile_fatal (filename, lineno, "multiple target patterns"); pattern = target->name; pattern_percent = find_percent (pattern); if (pattern_percent == 0) ! makefile_fatal (filename, lineno, ! "target pattern contains no `%%'"); } else *************** *** 560,564 **** if (ignoring) ! fatal ("%s:%u: missing `endif'", filename, lineno); /* At eof, record the last rule. */ --- 572,576 ---- if (ignoring) ! makefile_fatal (filename, lineno, "missing `endif'"); /* At eof, record the last rule. */ *************** *** 602,607 **** p = next_token (lb.buffer); ! if ((p[5] == '\0' || p[5] == ' ' || p[5] == '\t') ! && !strncmp (p, "endef", 5)) { p += 5; --- 614,618 ---- p = next_token (lb.buffer); ! if ((p[5] == '\0' || isblank (p[5])) && !strncmp (p, "endef", 5)) { p += 5; *************** *** 609,614 **** remove_comments (p); if (*next_token (p) != '\0') ! error ("%s:%u: Extraneous text after `endef' directive", ! filename, lineno); /* Define the variable. */ if (idx == 0) --- 620,625 ---- remove_comments (p); if (*next_token (p) != '\0') ! makefile_error (filename, lineno, ! "Extraneous text after `endef' directive"); /* Define the variable. */ if (idx == 0) *************** *** 639,643 **** /* No `endef'!! */ ! fatal ("%s:%u: missing `endef', unterminated `define'", filename, lineno); return 0; } --- 650,654 ---- /* No `endef'!! */ ! makefile_fatal (filename, lineno, "missing `endef', unterminated `define'"); return 0; } *************** *** 692,700 **** { if (*line != '\0') ! error ("%s:%u: Extraneous text after `%s' directive", ! filename, lineno, cmdname); /* "Else" or "endif". */ if (conditionals->if_cmds == 0) ! fatal ("%s:%u: extraneous `%s'\n", filename, lineno, cmdname); /* NOTDEF indicates an `endif' command. */ if (notdef) --- 703,712 ---- { if (*line != '\0') ! makefile_error (filename, lineno, ! "Extraneous text after `%s' directive", ! cmdname); /* "Else" or "endif". */ if (conditionals->if_cmds == 0) ! makefile_fatal (filename, lineno, "extraneous `%s'", cmdname); /* NOTDEF indicates an `endif' command. */ if (notdef) *************** *** 818,823 **** line = next_token (++line); if (*line != '\0') ! error ("%s:%u: Extraneous text after `%s' directive", ! filename, lineno, cmdname); s2 = variable_expand (s2); --- 830,836 ---- line = next_token (++line); if (*line != '\0') ! makefile_error (filename, lineno, ! "Extraneous text after `%s' directive", ! cmdname); s2 = variable_expand (s2); *************** *** 912,916 **** cmds = 0; - for (; filenames != 0; filenames = nextf) { --- 925,928 ---- *************** *** 928,936 **** if (implicit && pattern != 0) ! fatal ("%s:%u: mixed implicit and static pattern rules", ! filename, lineno); if (implicit && implicit_percent == 0) ! fatal ("%s:%u: mixed implicit and normal rules", filename, lineno); if (implicit) --- 940,948 ---- if (implicit && pattern != 0) ! makefile_fatal (filename, lineno, ! "mixed implicit and static pattern rules"); if (implicit && implicit_percent == 0) ! makefile_fatal (filename, lineno, "mixed implicit and normal rules"); if (implicit) *************** *** 971,976 **** { /* Give a warning if the rule is meaningless. */ ! error ("%s:%u: target `%s' doesn't match the target pattern", ! filename, lineno, name); this = 0; } --- 983,988 ---- { /* Give a warning if the rule is meaningless. */ ! makefile_error (filename, lineno, ! "target `%s' doesn't match the target pattern"); this = 0; } *************** *** 998,1010 **** { /* Single-colon. Combine these dependencies ! with any others in file's existing record, if any. */ f = enter_file (name); if (f->double_colon) ! fatal ("target file `%s' has both : and :: entries", f->name); /* If CMDS == F->CMDS, this target was listed in this rule more than once. Just give a warning since this is harmless. */ if (cmds != 0 && cmds == f->cmds) ! error ("%s:%u: target `%s' given more than once in the same rule.", ! filename, lineno, f->name); /* Check for two single-colon entries both with commands. Check is_target so that we don't lose on files such as .c.o --- 1010,1029 ---- { /* Single-colon. Combine these dependencies ! with others in file's existing record, if any. */ f = enter_file (name); + if (f->double_colon) ! makefile_fatal (filename, lineno, ! "target file `%s' has both : and :: entries", ! f->name); ! /* If CMDS == F->CMDS, this target was listed in this rule more than once. Just give a warning since this is harmless. */ if (cmds != 0 && cmds == f->cmds) ! makefile_error ! (filename, lineno, ! "target `%s' given more than once in the same rule.", ! f->name); ! /* Check for two single-colon entries both with commands. Check is_target so that we don't lose on files such as .c.o *************** *** 1011,1019 **** whose commands were preinitialized. */ else if (cmds != 0 && f->cmds != 0 && f->is_target) ! fatal ("%s:%u: commands for target `%s' were \ ! already specified at %s:%u", ! cmds->filename, cmds->lineno, ! f->name, f->cmds->filename, f->cmds->lineno); f->is_target = 1; /* Defining .DEFAULT with no deps or cmds clears it. */ if (f == default_file && this == 0 && cmds == 0) --- 1030,1044 ---- whose commands were preinitialized. */ else if (cmds != 0 && f->cmds != 0 && f->is_target) ! { ! makefile_error (cmds->filename, cmds->lineno, ! "warning: overriding commands for target `%s'", ! f->name); ! makefile_error (f->cmds->filename, f->cmds->lineno, ! "warning: ignoring old commands for target `%s'", ! f->name); ! } ! f->is_target = 1; + /* Defining .DEFAULT with no deps or cmds clears it. */ if (f == default_file && this == 0 && cmds == 0) *************** *** 1057,1061 **** we don't lose on default suffix rules or makefiles. */ if (f != 0 && f->is_target && !f->double_colon) ! fatal ("target file `%s' has both : and :: entries", f->name); f = enter_file (name); /* If there was an existing entry and it was a --- 1082,1088 ---- we don't lose on default suffix rules or makefiles. */ if (f != 0 && f->is_target && !f->double_colon) ! makefile_fatal (filename, lineno, ! "target file `%s' has both : and :: entries", ! f->name); f = enter_file (name); /* If there was an existing entry and it was a *************** *** 1243,1249 **** break; else if (c == '\\' && ! (*p == '\\' || *p == ' ' || *p == '\t' || *p == stopchar)) ++p; ! else if (c == ' ' || c == '\t' || c == stopchar) break; } --- 1270,1276 ---- break; else if (c == '\\' && ! (*p == '\\' || isblank (*p) || *p == stopchar)) ++p; ! else if (isblank (c) || c == stopchar) break; } *************** *** 1250,1257 **** p--; - /* Remove leading `./' sequences. */ - while (p - q > 2 && q[0] == '.' && q[1] == '/') - q += 2; - /* Extract the filename just found, and skip it. */ name = savestring (q, p - q); --- 1277,1280 ---- *************** *** 1432,1440 **** { register struct nameseq *new = 0; - register struct nameseq *tem; register struct nameseq *old; - register char **vec; - register unsigned int i; - unsigned int length; struct nameseq *nexto; --- 1455,1459 ---- *************** *** 1441,1447 **** for (old = chain; old != 0; old = nexto) { nexto = old->next; ! if (*old->name == '~') { if (old->name[1] == '/' || old->name[1] == '\0') --- 1460,1468 ---- for (old = chain; old != 0; old = nexto) { + glob_t gl; + nexto = old->next; ! if (old->name[0] == '~') { if (old->name[1] == '/' || old->name[1] == '\0') *************** *** 1449,1453 **** extern char *getenv (); char *home_dir = allocated_variable_expand ("$(HOME)"); ! char is_variable = *home_dir != '\0'; if (!is_variable) { --- 1470,1474 ---- extern char *getenv (); char *home_dir = allocated_variable_expand ("$(HOME)"); ! int is_variable = home_dir[0] != '\0'; if (!is_variable) { *************** *** 1455,1465 **** home_dir = getenv ("HOME"); } ! if (home_dir == 0) { ! unsigned int len = strlen (old->name + 1); ! bcopy (old->name + 1, old->name, len); ! old->name[len] = '\0'; } ! else { char *new = concat (home_dir, "", old->name + 1); --- 1476,1492 ---- home_dir = getenv ("HOME"); } ! if (home_dir == 0 || home_dir[0] == '\0') { ! extern char *getlogin (); ! char *name = getlogin (); ! home_dir = 0; ! if (name != 0) ! { ! struct passwd *p = getpwnam (name); ! if (p != 0) ! home_dir = p->pw_dir; ! } } ! if (home_dir != 0) { char *new = concat (home_dir, "", old->name + 1); *************** *** 1492,1528 **** } } } } ! if (glob_pattern_p (old->name)) { ! vec = glob_filename (old->name); ! if (vec == 0) ! fatal ("virtual memory exhausted"); ! ! free (old->name); ! ! /* NOSTRICT */ ! if (vec != (char **) -1) ! { ! i = 0; ! while (vec[i] != 0) ! ++i; ! length = i; ! qsort ((char *) vec, length, sizeof (char *), alpha_compare); ! for (i = length; i > 0; --i) ! { ! tem = (struct nameseq *) xmalloc (size); ! tem->name = vec[i - 1]; ! tem->next = new; ! new = tem; ! } ! free ((char *) vec); ! } ! free ((char *) old); ! } ! else ! { old->next = new; new = old; --- 1519,1549 ---- } } + else if (userend != 0) + *userend = '/'; } } ! switch (glob (old->name, GLOB_NOCHECK, NULL, &gl)) { ! case 0: /* Success. */ ! { ! register int i; ! for (i = 0; i < gl.gl_pathc; ++i) ! { ! struct nameseq *elt = (struct nameseq *) xmalloc (size); ! elt->name = savestring (gl.gl_pathv[i], ! strlen (gl.gl_pathv[i])); ! elt->next = new; ! new = elt; ! } ! globfree (&gl); ! break; ! } ! case GLOB_NOSPACE: ! fatal ("virtual memory exhausted"); ! break; ! ! default: old->next = new; new = old; diff -c2 -r +new-file make-3.60/remake.c make-3.62/remake.c *** make-3.60/remake.c Fri May 10 14:59:43 1991 --- make-3.62/remake.c Tue Oct 29 20:57:32 1991 *************** *** 4,8 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 4,8 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. *************** *** 22,26 **** #include "file.h" ! #ifndef USG #ifndef sgi #include --- 22,26 ---- #include "file.h" ! #if !defined (USG) && !defined (POSIX) #ifndef sgi #include *************** *** 31,35 **** ! #if !defined(__GNU_LIBRARY__) && !defined(_POSIX_SOURCE) extern int fstat (); extern time_t time (); --- 31,35 ---- ! #if !defined(__GNU_LIBRARY__) && !defined(POSIX) extern int fstat (); extern time_t time (); *************** *** 136,149 **** } ! /* This goal is finished. Remove it from the chain. */ ! if (lastgoal == 0) ! goals = g->next; ! else ! lastgoal->next = g->next; ! /* Free the storage. */ ! free ((char *) g); ! g = lastgoal == 0 ? goals : lastgoal->next; if (stop) --- 136,153 ---- } ! g->file = g->file->prev; ! if (stop || g->file == 0) ! { ! /* This goal is finished. Remove it from the chain. */ ! if (lastgoal == 0) ! goals = g->next; ! else ! lastgoal->next = g->next; ! /* Free the storage. */ ! free ((char *) g); ! g = lastgoal == 0 ? goals : lastgoal->next; ! } if (stop) *************** *** 193,201 **** --- 197,216 ---- for (f = file; f != 0; f = f->prev) { + register struct dep *d; char not_started = f->command_state == cs_not_started; + status |= update_file_1 (f, depth); check_renamed (f); + + for (d = f->also_make; d != 0; d = d->next) + { + d->file->command_state = f->command_state; + d->file->update_status = f->update_status; + d->file->updated = f->updated; + } + if (status != 0 && !keep_going_flag) return status; + commands_finished |= not_started && f->command_state == cs_finished; } *************** *** 293,297 **** file->cmds = default_file->cmds; } - file->also_make = 0; } file->tried_implicit = 1; --- 308,311 ---- *************** *** 333,338 **** check_renamed (d->file); ! running |= (d->file->command_state == cs_running ! || d->file->command_state == cs_deps_running); if (dep_status != 0 && !keep_going_flag) --- 347,360 ---- check_renamed (d->file); ! { ! register struct file *f = d->file; ! do ! { ! running |= (f->command_state == cs_running ! || f->command_state == cs_deps_running); ! f = f->prev; ! } ! while (f != 0); ! } if (dep_status != 0 && !keep_going_flag) *************** *** 360,365 **** check_renamed (d->file); ! running |= (d->file->command_state == cs_running ! || d->file->command_state == cs_deps_running); if (dep_status != 0 && !keep_going_flag) --- 382,395 ---- check_renamed (d->file); ! { ! register struct file *f = d->file; ! do ! { ! running |= (f->command_state == cs_running ! || f->command_state == cs_deps_running); ! f = f->prev; ! } ! while (f != 0); ! } if (dep_status != 0 && !keep_going_flag) *************** *** 376,379 **** --- 406,417 ---- DEBUGPR ("Finished dependencies of target file `%s'.\n"); + if (running) + { + file->command_state = cs_deps_running; + --depth; + DEBUGPR ("The dependencies of `%s' are being made.\n"); + return 0; + } + /* If any dependency failed, give up now. */ *************** *** 395,406 **** } - if (running) - { - file->command_state = cs_deps_running; - --depth; - DEBUGPR ("The dependencies of `%s' are being made.\n"); - return 0; - } - file->command_state = cs_not_started; --- 433,436 ---- *************** *** 504,507 **** --- 534,540 ---- register struct file *file; { + struct dep *d; + + file->command_state = cs_finished; file->updated = 1; *************** *** 517,533 **** } ! if (file->also_make != 0) { ! register unsigned int i; ! for (i = 0; file->also_make[i] != 0; ++i) ! { ! register struct file *f = enter_file (file->also_make[i]); ! f->updated = 1; ! f->update_status = file->update_status; ! if (just_print_flag || question_flag) ! f->last_mtime = file->last_mtime; ! else ! f->last_mtime = 0; ! } } } --- 550,562 ---- } ! for (d = file->also_make; d != 0; d = d->next) { ! d->file->command_state = cs_finished; ! d->file->updated = 1; ! d->file->update_status = file->update_status; ! if (just_print_flag || question_flag) ! d->file->last_mtime = file->last_mtime; ! else ! d->file->last_mtime = 0; } } *************** *** 714,718 **** } - file->command_state = cs_finished; notice_finished_file (file); } --- 743,746 ---- *************** *** 805,809 **** rename_file (file, name); check_renamed (file); ! mtime = name_mtime (name); } else --- 833,837 ---- rename_file (file, name); check_renamed (file); ! return file_mtime (file); } else diff -c2 -r +new-file make-3.60/remote-cstms.c make-3.62/remote-cstms.c *** make-3.60/remote-cstms.c Wed May 10 18:57:25 1989 --- make-3.62/remote-cstms.c Wed Jul 3 18:27:54 1991 *************** *** 57,61 **** extern char **environ; extern int vfork (), execve (); ! char cwd[MAXPATHLEN]; char waybill[MAX_DATA_SIZE], msg[128]; struct timeval timeout; --- 57,61 ---- extern char **environ; extern int vfork (), execve (); ! PATH_VAR (cwd); char waybill[MAX_DATA_SIZE], msg[128]; struct timeval timeout; diff -c2 -r +new-file make-3.60/rule.c make-3.62/rule.c *** make-3.60/rule.c Fri Dec 14 15:51:00 1990 --- make-3.62/rule.c Wed Aug 7 17:32:00 1991 *************** *** 1,4 **** /* Pattern and suffix rule internals for GNU Make. ! Copyright (C) 1988, 1989, 1990 Free Software Foundation, Inc. This file is part of GNU Make. --- 1,4 ---- /* Pattern and suffix rule internals for GNU Make. ! Copyright (C) 1988, 1989, 1990, 1991 Free Software Foundation, Inc. This file is part of GNU Make. *************** *** 5,9 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 5,9 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. *************** *** 199,203 **** bcopy (dep_name (d2), rulename + slen, s2len + 1); f = lookup_file (rulename); ! if (f == 0 || f->cmds == 0 || f->deps != 0) continue; --- 199,203 ---- bcopy (dep_name (d2), rulename + slen, s2len + 1); f = lookup_file (rulename); ! if (f == 0 || f->cmds == 0) continue; diff -c2 -r +new-file make-3.60/rule.h make-3.62/rule.h *** make-3.60/rule.h Sun Jun 11 17:44:40 1989 --- make-3.62/rule.h Mon Jun 3 16:37:28 1991 *************** *** 1,3 **** ! /* Copyright (C) 1988, 1989 Free Software Foundation, Inc. This file is part of GNU Make. --- 1,3 ---- ! /* Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. This file is part of GNU Make. *************** *** 4,8 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 4,8 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. diff -c2 -r +new-file make-3.60/texinfo.tex make-3.62/texinfo.tex *** make-3.60/texinfo.tex Wed May 22 15:46:17 1991 --- make-3.62/texinfo.tex Wed Oct 23 23:04:50 1991 *************** *** 5,9 **** %This texinfo.tex file is free software; you can redistribute it and/or %modify it under the terms of the GNU General Public License as ! %published by the Free Software Foundation; either version 1, or (at %your option) any later version. --- 5,9 ---- %This texinfo.tex file is free software; you can redistribute it and/or %modify it under the terms of the GNU General Public License as ! %published by the Free Software Foundation; either version 2, or (at %your option) any later version. *************** *** 23,27 **** %what you give them. Help stamp out software-hoarding! ! \def\texinfoversion{2.46} \message{Loading texinfo package [Version \texinfoversion]:} \message{} --- 23,27 ---- %what you give them. Help stamp out software-hoarding! ! \def\texinfoversion{2.55} \message{Loading texinfo package [Version \texinfoversion]:} \message{} *************** *** 239,242 **** --- 239,244 ---- \def\group{\begingroup% \inENV ??? + \ifnum\catcode13=\active \else + \errmessage{@group invalid in context where filling is enabled}\fi \def \Egroup{\egroup\endgroup} \vbox\bgroup} *************** *** 354,358 **** % Conditionals to test whether a flag is set. ! \outer\def\ifset{\begingroup\ignoresections\parsearg\ifsetxxx} \def\ifsetxxx #1{\endgroup --- 356,360 ---- % Conditionals to test whether a flag is set. ! \def\ifset{\begingroup\ignoresections\parsearg\ifsetxxx} \def\ifsetxxx #1{\endgroup *************** *** 364,368 **** \long\def\ifsetfailxxx #1\end ifset{\endgroup\ignorespaces} ! \outer\def\ifclear{\begingroup\ignoresections\parsearg\ifclearxxx} \def\ifclearxxx #1{\endgroup --- 366,370 ---- \long\def\ifsetfailxxx #1\end ifset{\endgroup\ignorespaces} ! \def\ifclear{\begingroup\ignoresections\parsearg\ifclearxxx} \def\ifclearxxx #1{\endgroup *************** *** 374,377 **** --- 376,389 ---- \long\def\ifclearfailxxx #1\end ifclear{\endgroup\ignorespaces} + % @set foo to set the flag named foo. + % @clear foo to clear the flag named foo. + \def\set{\parsearg\setxxx} + \def\setxxx #1{ + \expandafter\let\csname IF#1\endcsname=\set} + + \def\clear{\parsearg\clearxxx} + \def\clearxxx #1{ + \expandafter\let\csname IF#1\endcsname=\relax} + % Some texinfo constructs that are trivial in tex *************** *** 446,461 **** %% Try out Computer Modern fonts at \magstephalf ! \font\textrm=cmr10 scaled \magstephalf ! \font\texttt=cmtt10 scaled \magstephalf % Instead of cmb10, you many want to use cmbx10. % cmbx10 is a prettier font on its own, but cmb10 % looks better when embedded in a line with cmr10. ! \font\textbf=cmb10 scaled \magstephalf ! \font\textit=cmti10 scaled \magstephalf ! \font\textsl=cmsl10 scaled \magstephalf ! \font\textsf=cmss10 scaled \magstephalf ! \font\textsc=cmcsc10 scaled \magstephalf ! \font\texti=cmmi10 scaled \magstephalf ! \font\textsy=cmsy10 scaled \magstephalf % A few fonts for @defun, etc. --- 458,481 ---- %% Try out Computer Modern fonts at \magstephalf ! \let\mainmagstep=\magstephalf ! ! \ifx\bigger\relax ! \let\mainmagstep=\magstep1 ! \font\textrm=cmr12 ! \font\texttt=cmtt12 ! \else ! \font\textrm=cmr10 scaled \mainmagstep ! \font\texttt=cmtt10 scaled \mainmagstep ! \fi % Instead of cmb10, you many want to use cmbx10. % cmbx10 is a prettier font on its own, but cmb10 % looks better when embedded in a line with cmr10. ! \font\textbf=cmb10 scaled \mainmagstep ! \font\textit=cmti10 scaled \mainmagstep ! \font\textsl=cmsl10 scaled \mainmagstep ! \font\textsf=cmss10 scaled \mainmagstep ! \font\textsc=cmcsc10 scaled \mainmagstep ! \font\texti=cmmi10 scaled \mainmagstep ! \font\textsy=cmsy10 scaled \mainmagstep % A few fonts for @defun, etc. *************** *** 562,566 **** \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl ! \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\sectt \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \resetmathfonts} --- 582,586 ---- \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl ! \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \resetmathfonts} *************** *** 571,575 **** \resetmathfonts} \def\indexfonts{% ! \let\tenrm=\indrm \let\tenit=\tenit \let\tensl=\indsl \let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy --- 591,595 ---- \resetmathfonts} \def\indexfonts{% ! \let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl \let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy *************** *** 1007,1011 **** \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 } ! \def\enumerate{\itemizey{\the\itemno.}\Eenumerate\flushcr} % Definition of @item while inside @itemize. --- 1027,1053 ---- \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 } ! % Allow argument of `a', `A' or `1' to specify type of enumeration. ! \def\enumerate{\parsearg\enumeratezzz} ! \def\enumeratezzz #1{\enumeratey #1 \endenumeratey} ! \def\enumeratey #1 #2\endenumeratey{ ! \if#1a \alphaenumerate\else\if#1A \capsenumerate\else ! \itemizey{\the\itemno.}\Eenumerate\flushcr ! \fi\fi} ! ! \def\alphaenumerate{\itemizey{\ifcase\itemno\or ! a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or k\or l\or m\or n\or o\or ! p\or q\or r\or s\or t\or u\or v\or w\or x\or y\or z\else ! \errmessage{More than 26 items in @alphaenumerate; get a bigger alphabet.}\fi.}% ! \Eenumerate\flushcr} ! ! \def\capsenumerate{\itemizey{\ifcase\itemno\or ! A\or B\or C\or D\or E\or F\or G\or H\or I\or J\or K\or L\or M\or N\or O\or ! P\or Q\or R\or S\or T\or U\or V\or W\or X\or Y\or Z\else ! \errmessage{More than 26 items in @capsenumerate; get a bigger alphabet.}\fi.}% ! \Eenumerate\flushcr} ! ! % Allow all natural ways of terminating enumerates to work. ! \def\Ealphaenumerate{\Eenumerate} ! \def\Ecapsenumerate{\Eenumerate} % Definition of @item while inside @itemize. *************** *** 1362,1368 **** \newcount \chapno ! \newcount \secno ! \newcount \subsecno ! \newcount \subsubsecno % This counter is funny since it counts through charcodes of letters A, B, ... --- 1404,1410 ---- \newcount \chapno ! \newcount \secno \secno=0 ! \newcount \subsecno \subsecno=0 ! \newcount \subsubsecno \subsubsecno=0 % This counter is funny since it counts through charcodes of letters A, B, ... *************** *** 1427,1430 **** --- 1469,1475 ---- \write \contentsfile \temp % \donoderef % + \global\let\section = \numberedsec + \global\let\subsection = \numberedsubsec + \global\let\subsubsection = \numberedsubsubsec }} *************** *** 1443,1446 **** --- 1488,1494 ---- \write \contentsfile \temp % \appendixnoderef % + \global\let\section = \appendixsec + \global\let\subsection = \appendixsubsec + \global\let\subsubsection = \appendixsubsubsec }} *************** *** 1456,1463 **** \write \contentsfile \temp % \unnumbnoderef % }} ! \outer\def\section{\parsearg\sectionzzz} ! \def\sectionzzz #1{\seccheck{section}% \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% --- 1504,1514 ---- \write \contentsfile \temp % \unnumbnoderef % + \global\let\section = \unnumberedsec + \global\let\subsection = \unnumberedsubsec + \global\let\subsubsection = \unnumberedsubsubsec }} ! \outer\def\numberedsec{\parsearg\seczzz} ! \def\seczzz #1{\seccheck{section}% \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% *************** *** 1496,1501 **** }} ! \outer\def\subsection{\parsearg\subsectionzzz} ! \def\subsectionzzz #1{\seccheck{subsection}% \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% --- 1547,1552 ---- }} ! \outer\def\numberedsubsec{\parsearg\numberedsubseczzz} ! \def\numberedsubseczzz #1{\seccheck{subsection}% \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% *************** *** 1533,1538 **** }} ! \outer\def\subsubsection{\parsearg\subsubsectionzzz} ! \def\subsubsectionzzz #1{\seccheck{subsubsection}% \gdef\thissection{#1}\global\advance \subsubsecno by 1 % \subsubsecheading {#1} --- 1584,1589 ---- }} ! \outer\def\numberedsubsubsec{\parsearg\numberedsubsubseczzz} ! \def\numberedsubsubseczzz #1{\seccheck{subsubsection}% \gdef\thissection{#1}\global\advance \subsubsecno by 1 % \subsubsecheading {#1} *************** *** 1576,1579 **** --- 1627,1631 ---- % These are variants which are not "outer", so they can appear in @ifinfo. + % Actually, they should now be obsolete; ordinary section commands should work. \def\infotop{\parsearg\unnumberedzzz} \def\infounnumbered{\parsearg\unnumberedzzz} *************** *** 1592,1605 **** \def\infosubsubsection{\parsearg\subsubsectionzzz} % Define @majorheading, @heading and @subheading \def\majorheading{\parsearg\majorheadingzzz} \def\majorheadingzzz #1{% {\advance\chapheadingskip by 10pt \chapbreak }% ! {\chapfonts \line{\rm #1\hfill}}\bigskip \par\penalty 200} \def\chapheading{\parsearg\chapheadingzzz} \def\chapheadingzzz #1{\chapbreak % ! {\chapfonts \line{\rm #1\hfill}}\bigskip \par\penalty 200} \def\heading{\parsearg\secheadingi} --- 1644,1678 ---- \def\infosubsubsection{\parsearg\subsubsectionzzz} + % These macros control what the section commands do, according + % to what kind of chapter we are in (ordinary, appendix, or unnumbered). + % Define them by default for a numbered chapter. + \global\let\section = \numberedsec + \global\let\subsection = \numberedsubsec + \global\let\subsubsection = \numberedsubsubsec + % Define @majorheading, @heading and @subheading + % NOTE on use of \vbox for chapter headings, section headings, and + % such: + % 1) We use \vbox rather than the earlier \line to permit + % overlong headings to fold. + % 2) \hyphenpenalty is set to 10000 because hyphenation in a + % heading is obnoxious; this forbids it. + % 3) Likewise, headings look best if no \parindent is used, and + % if justification is not attempted. Hence \raggedright. + + \def\majorheading{\parsearg\majorheadingzzz} \def\majorheadingzzz #1{% {\advance\chapheadingskip by 10pt \chapbreak }% ! {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\raggedright ! \rm #1\hfill}}\bigskip \par\penalty 200} \def\chapheading{\parsearg\chapheadingzzz} \def\chapheadingzzz #1{\chapbreak % ! {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\raggedright ! \rm #1\hfill}}\bigskip \par\penalty 200} \def\heading{\parsearg\secheadingi} *************** *** 1652,1657 **** \pchapsepmacro {% ! \chapfonts ! \leftline{\rm #2\enspace #1}% }% \bigskip --- 1725,1731 ---- \pchapsepmacro {% ! \chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\raggedright ! \rm #2\enspace #1}% }% \bigskip *************** *** 1661,1665 **** \def\unnchfplain #1{% \pchapsepmacro % ! {\chapfonts \line{\rm #1\hfill}}\bigskip \par\penalty 10000 % } \CHAPFplain % The default --- 1735,1741 ---- \def\unnchfplain #1{% \pchapsepmacro % ! {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\raggedright ! \rm #1\hfill}}\bigskip \par\penalty 10000 % } \CHAPFplain % The default *************** *** 1666,1670 **** \def\unnchfopen #1{% ! \chapoddpage {\chapfonts \line{\rm #1\hfill}}\bigskip \par\penalty 10000 % } --- 1742,1748 ---- \def\unnchfopen #1{% ! \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\raggedright ! \rm #1\hfill}}\bigskip \par\penalty 10000 % } *************** *** 1694,1698 **** \def\secheadingi #1{{\advance \secheadingskip by \parskip % \secheadingbreak}% ! {\secfonts \line{\rm #1\hfill}}% \ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 } --- 1772,1778 ---- \def\secheadingi #1{{\advance \secheadingskip by \parskip % \secheadingbreak}% ! {\secfonts \vbox{\hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\raggedright ! \rm #1\hfill}}% \ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 } *************** *** 1704,1708 **** \def\subsecheadingi #1{{\advance \subsecheadingskip by \parskip % \subsecheadingbreak}% ! {\subsecfonts \line{\rm #1\hfill}}% \ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 } --- 1784,1790 ---- \def\subsecheadingi #1{{\advance \subsecheadingskip by \parskip % \subsecheadingbreak}% ! {\subsecfonts \vbox{\hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\raggedright ! \rm #1\hfill}}% \ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 } *************** *** 1713,1717 **** \def\subsubsecheadingi #1{{\advance \subsecheadingskip by \parskip % \subsecheadingbreak}% ! {\subsubsecfonts \line{\rm #1\hfill}}% \ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000} --- 1795,1801 ---- \def\subsubsecheadingi #1{{\advance \subsecheadingskip by \parskip % \subsecheadingbreak}% ! {\subsubsecfonts \vbox{\hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\raggedright ! \rm #1\hfill}}% \ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000} *************** *** 1722,1725 **** --- 1806,1810 ---- % to \contentsfile. + \newskip\contentsrightmargin \contentsrightmargin=1in \def\startcontents#1{% \ifnum \pageno>0 *************** *** 1734,1738 **** \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 \raggedbottom % Worry more about breakpoints than the bottom. ! \advance\hsize by -1in % Don't use the full line length. } --- 1819,1823 ---- \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 \raggedbottom % Worry more about breakpoints than the bottom. ! \advance\hsize by -\contentsrightmargin % Don't use the full line length. } *************** *** 1776,1781 **** % Chapter-level things, for both the long and short contents. \def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}} \def\shortchapentry#1#2#3{% ! \line{{#2\labelspace #1}\dotfill\doshortpageno{#3}}% } --- 1861,1870 ---- % Chapter-level things, for both the long and short contents. \def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}} + + % See comments in \dochapentry re vbox and related settings \def\shortchapentry#1#2#3{% ! \vbox{\hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\strut\raggedright ! {#2\labelspace #1}\dotfill\doshortpageno{#3}}% } *************** *** 1782,1786 **** \def\unnumbchapentry#1#2{\dochapentry{#1}{#2}} \def\shortunnumberedentry#1#2{% ! \line{#1\dotfill\doshortpageno{#2}}% } --- 1871,1877 ---- \def\unnumbchapentry#1#2{\dochapentry{#1}{#2}} \def\shortunnumberedentry#1#2{% ! \vbox{\hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\strut\raggedright ! #1\dotfill\doshortpageno{#2}}% } *************** *** 1809,1813 **** \def\dochapentry#1#2{% \penalty-300 \vskip\baselineskip ! \line{\chapentryfonts #1\dotfill \dopageno{#2}}% \nobreak\vskip .25\baselineskip } --- 1900,1913 ---- \def\dochapentry#1#2{% \penalty-300 \vskip\baselineskip ! % This \vbox (and similar ones in dosecentry etc.) used to be a ! % \line; changed to permit linebreaks for long headings. See ! % comments above \majorheading. Here we also use \strut to ! % keep the top end of the vbox from jamming up against the previous ! % entry in the table of contents. ! \vbox{\chapentryfonts ! \hyphenpenalty=10000\tolerance=5000 % this line and next introduced ! \parindent=0pt\strut\raggedright % with \line -> \vbox change ! #1\dotfill ! \dopageno{#2}}% \nobreak\vskip .25\baselineskip } *************** *** 1814,1826 **** \def\dosecentry#1#2{% ! \line{\secentryfonts \hskip\tocindent #1\dotfill \dopageno{#2}}% } \def\dosubsecentry#1#2{% ! \line{\subsecentryfonts \hskip2\tocindent #1\dotfill \dopageno{#2}}% } \def\dosubsubsecentry#1#2{% ! \line{\subsubsecentryfonts \hskip3\tocindent #1\dotfill \dopageno{#2}}% } --- 1914,1935 ---- \def\dosecentry#1#2{% ! \vbox{\secentryfonts \leftskip=\tocindent ! \hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\strut\raggedright #1\dotfill ! \dopageno{#2}}% } \def\dosubsecentry#1#2{% ! \vbox{\subsecentryfonts \leftskip=2\tocindent ! \hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\strut\raggedright #1\dotfill ! \dopageno{#2}}% } \def\dosubsubsecentry#1#2{% ! \vbox{\subsubsecentryfonts \leftskip=3\tocindent ! \hyphenpenalty=10000\tolerance=5000 ! \parindent=0pt\strut\raggedright #1\dotfill ! \dopageno{#2}}% } *************** *** 1944,1947 **** --- 2053,2114 ---- \removelastskip \penalty-50 \vskip\aboveenvskipamount \fi} + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % \cartouche: draw rectangle w/rounded corners around argument + \font\circle=lcircle10 + \newdimen\circthick + \newdimen\cartouter\newdimen\cartinner + \newskip\normbskip\newskip\normpskip\newskip\normlskip + \circthick=\fontdimen8\circle + % + \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth + \def\ctr{{\hskip 6pt\circle\char'010}} + \def\cbl{{\circle\char'012\hskip -6pt}} + \def\cbr{{\hskip 6pt\circle\char'011}} + \def\carttop{\hbox to \cartouter{\hskip\lskip + \ctl\leaders\hrule height\circthick\hfil\ctr + \hskip\rskip}} + \def\cartbot{\hbox to \cartouter{\hskip\lskip + \cbl\leaders\hrule height\circthick\hfil\cbr + \hskip\rskip}} + % + \newskip\lskip\newskip\rskip + + \long\def\cartouche{% + \begingroup + \lskip=\leftskip \rskip=\rightskip + \leftskip=0pt\rightskip=0pt %we want these *outside*. + \cartinner=\hsize \advance\cartinner by-\lskip + \advance\cartinner by-\rskip + \cartouter=\hsize + \advance\cartouter by 18pt % allow for 3pt kerns on either + % side, and for 6pt waste from + % each corner char + \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip + \vbox\bgroup + \baselineskip=0pt\parskip=0pt\lineskip=0pt + \carttop + \hbox\bgroup + \hskip\lskip + \vrule\kern3pt + \vbox\bgroup + \hsize=\cartinner + \kern3pt + \begingroup + \baselineskip=\normbskip + \lineskip=\normlskip + \parskip=\normpskip + \vskip -\parskip + \def\Ecartouche{% + \endgroup + \kern3pt + \egroup + \kern3pt\vrule + \hskip\rskip + \egroup + \cartbot + \egroup + \endgroup + }} + \def\lisp{\aboveenvbreak \begingroup\inENV % This group ends at the end of the @lisp body *************** *** 2137,2140 **** --- 2304,2308 ---- % Make all lines underfull and no complaints: \tolerance=10000 \hbadness=10000 + \advance\leftskip by -\defbodyindent {\df #1}\enskip % Generate function name } *************** *** 2179,2182 **** --- 2347,2387 ---- \begingroup\obeylines\activeparens\spacesplit{#3{#5}}} + % These parsing functions are similar to the preceding ones + % except that they do not make parens into active characters. + % These are used for "variables" since they have no arguments. + + \def\defvarparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody + \medbreak % + % Define the end token that this defining construct specifies + % so that it will exit this group. + \def#1{\endgraf\endgroup\medbreak}% + \def#2{\begingroup\obeylines\spacesplit#3}% + \parindent=0in + \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent + \begingroup % + \catcode 61=\active % + \obeylines\spacesplit#3} + + \def\defvrparsebody #1#2#3#4 {\begingroup\inENV % + \medbreak % + % Define the end token that this defining construct specifies + % so that it will exit this group. + \def#1{\endgraf\endgroup\medbreak}% + \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}% + \parindent=0in + \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent + \begingroup\obeylines\spacesplit{#3{#4}}} + + \def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV % + \medbreak % + % Define the end token that this defining construct specifies + % so that it will exit this group. + \def#1{\endgraf\endgroup\medbreak}% + \def#2##1 ##2 {\def#4{##1}% + \begingroup\obeylines\spacesplit{#3{##2}}}% + \parindent=0in + \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent + \begingroup\obeylines\spacesplit{#3{#5}}} + % Split up #2 at the first space token. % call #1 with two arguments: *************** *** 2326,2330 **** \def\defcv #1 {\def\defcvtype{#1}% ! \defopparsebody\Edefcv\defcvx\defcvarheader\defcvtype} \def\defcvarheader #1#2#3{% --- 2531,2535 ---- \def\defcv #1 {\def\defcvtype{#1}% ! \defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype} \def\defcvarheader #1#2#3{% *************** *** 2336,2340 **** % @defivar == @defcv {Instance Variable} ! \def\defivar{\defmethparsebody\Edefivar\defivarx\defivarheader} \def\defivarheader #1#2#3{% --- 2541,2545 ---- % @defivar == @defcv {Instance Variable} ! \def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader} \def\defivarheader #1#2#3{% *************** *** 2363,2367 **** % @defvr Counter foo-count ! \def\defvr{\defmethparsebody\Edefvr\defvrx\defvrheader} \def\defvrheader #1#2#3{\doind {vr}{\code{#2}}% --- 2568,2572 ---- % @defvr Counter foo-count ! \def\defvr{\defvrparsebody\Edefvr\defvrx\defvrheader} \def\defvrheader #1#2#3{\doind {vr}{\code{#2}}% *************** *** 2370,2374 **** % @defvar == @defvr Variable ! \def\defvar{\defparsebody\Edefvar\defvarx\defvarheader} \def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index --- 2575,2579 ---- % @defvar == @defvr Variable ! \def\defvar{\defvarparsebody\Edefvar\defvarx\defvarheader} \def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index *************** *** 2379,2383 **** % @defopt == @defvr {User Option} ! \def\defopt{\defparsebody\Edefopt\defoptx\defoptheader} \def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index --- 2584,2588 ---- % @defopt == @defvr {User Option} ! \def\defopt{\defvarparsebody\Edefopt\defoptx\defoptheader} \def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index *************** *** 2388,2392 **** % @deftypevar int foobar ! \def\deftypevar{\defparsebody\Edeftypevar\deftypevarx\deftypevarheader} % #1 is the data type. #2 is the name. --- 2593,2597 ---- % @deftypevar int foobar ! \def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader} % #1 is the data type. #2 is the name. *************** *** 2400,2404 **** % @deftypevr {Global Flag} int enable ! \def\deftypevr{\defmethparsebody\Edeftypevr\deftypevrx\deftypevrheader} \def\deftypevrheader #1#2#3{\doind {vr}{\code{#3}}% --- 2605,2609 ---- % @deftypevr {Global Flag} int enable ! \def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader} \def\deftypevrheader #1#2#3{\doind {vr}{\code{#3}}% *************** *** 2424,2428 **** % @deftp Class window height width ... ! \def\deftp{\defmethparsebody\Edeftp\deftpx\deftpheader} \def\deftpheader #1#2#3{\doind {tp}{\code{#2}}% --- 2629,2633 ---- % @deftp Class window height width ... ! \def\deftp{\defvrparsebody\Edeftp\deftpx\deftpheader} \def\deftpheader #1#2#3{\doind {tp}{\code{#2}}% *************** *** 2643,2646 **** --- 2848,2854 ---- \def\supereject{\par\penalty -20000\footnoteno =0 } + % @footnotestyle is meaningful for info output only.. + \let\footnotestyle=\comment + \let\ptexfootnote=\footnote *************** *** 2647,2651 **** {\catcode `\@=11 \long\gdef\footnote #1{\global\advance \footnoteno by \@ne ! \removelastskip \edef\thisfootno{$^{\the\footnoteno}$}% \let\@sf\empty --- 2855,2859 ---- {\catcode `\@=11 \long\gdef\footnote #1{\global\advance \footnoteno by \@ne ! \unskip \edef\thisfootno{$^{\the\footnoteno}$}% \let\@sf\empty *************** *** 2708,2711 **** --- 2916,2920 ---- \global\tolerance=700 \global\hfuzz=1pt + \global\contentsrightmargin=0pt \global\pagewidth=\hsize *************** *** 2715,2718 **** --- 2924,2953 ---- \global\let\smallexample=\smalllispx \global\def\Esmallexample{\Esmalllisp} + } + + % Use @afourpaper to print on European A4 paper. + \def\afourpaper{ + \global\tolerance=700 + \global\hfuzz=1pt + \global\baselineskip=12pt + \global\parskip 15pt plus 1pt + + \global\vsize= 53\baselineskip + \advance\vsize by \topskip + %\global\hsize= 5.85in % A4 wide 10pt + \global\hsize= 6.5 + \global\outerhsize=\hsize + \global\advance\outerhsize by 0.5in + \global\outervsize=\vsize + \global\advance\outervsize by 0.6in + \global\doublecolumnhsize=\hsize + \global\divide\doublecolumnhsize by 2 + \global\advance\doublecolumnhsize by -0.1in + \global\doublecolumnvsize=\vsize + \global\multiply\doublecolumnvsize by 2 + \global\advance\doublecolumnvsize by 0.1in + + \global\pagewidth=\hsize + \global\pageheight=\vsize } diff -c2 -r +new-file make-3.60/variable.c make-3.62/variable.c *** make-3.60/variable.c Wed Dec 12 21:44:01 1990 --- make-3.62/variable.c Mon Oct 7 18:06:26 1991 *************** *** 1,4 **** /* Internals of variables for GNU Make. ! Copyright (C) 1988, 1989, 1990 Free Software Foundation, Inc. This file is part of GNU Make. --- 1,4 ---- /* Internals of variables for GNU Make. ! Copyright (C) 1988, 1989, 1990, 1991 Free Software Foundation, Inc. This file is part of GNU Make. *************** *** 5,9 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 5,9 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. *************** *** 467,470 **** --- 467,471 ---- for (v = set->table[i]; v != 0; v = v->next) { + extern char *getenv (); unsigned int j = i % buckets; register struct variable_bucket *ov; *************** *** 582,586 **** if (!recursive) --end; ! while (end[-1] == ' ' || end[-1] == '\t') --end; p = next_token (p); --- 583,587 ---- if (!recursive) --end; ! while (isblank (end[-1])) --end; p = next_token (p); *************** *** 635,639 **** /* Is this a `define'? */ if (v->recursive && index (v->value, '\n') != 0) ! printf ("define %s\n%sendef\n", v->name, v->value); else { --- 636,640 ---- /* Is this a `define'? */ if (v->recursive && index (v->value, '\n') != 0) ! printf ("define %s\n%s\nendef\n", v->name, v->value); else { diff -c2 -r +new-file make-3.60/variable.h make-3.62/variable.h *** make-3.60/variable.h Wed Sep 19 02:38:33 1990 --- make-3.62/variable.h Mon Jun 3 16:37:27 1991 *************** *** 1,3 **** ! /* Copyright (C) 1988, 1989, 1990 Free Software Foundation, Inc. This file is part of GNU Make. --- 1,3 ---- ! /* Copyright (C) 1988, 1989, 1990, 1991 Free Software Foundation, Inc. This file is part of GNU Make. *************** *** 4,8 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 4,8 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version. diff -c2 -r +new-file make-3.60/version.c make-3.62/version.c *** make-3.60/version.c Sat May 25 02:39:51 1991 --- make-3.62/version.c Mon Oct 28 20:23:21 1991 *************** *** 1,3 **** ! char *version_string = "3.60"; /* --- 1,3 ---- ! char *version_string = "3.62"; /* diff -c2 -r +new-file make-3.60/vpath.c make-3.62/vpath.c *** make-3.60/vpath.c Tue Dec 18 06:00:22 1990 --- make-3.62/vpath.c Mon Jun 3 16:37:37 1991 *************** *** 1,3 **** ! /* Copyright (C) 1988, 1989 Free Software Foundation, Inc. This file is part of GNU Make. --- 1,3 ---- ! /* Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. This file is part of GNU Make. *************** *** 4,8 **** GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) any later version. --- 4,8 ---- GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2, or (at your option) any later version.