On BSD, realpath(3) doesn't fail if the target doesn't exist, so test
[make.git] / ChangeLog.1
blobd579521ffe8872ac4e762a1cd66e098e788eb041
1 Tue Oct 29 20:57:36 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
3         * Version 3.62.
5         * remake.c (update_file_1): Check for deps still running before
6         giving up if any dep has failed.
8 Sat Oct 26 16:20:00 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
10         * make.h [uts]: #undef S_ISREG and S_ISDIR if defined.
12 Fri Oct 25 19:50:39 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
14         * Version 3.60.17.
16 Thu Oct 24 16:58:36 1991  Roland McGrath  (roland@wookumz.gnu.ai.mit.edu)
18         * job.c (start_job): Don't check for empty cmds before tweaking the
19         command_ptr.  Just let construct_command_argv do it.
21 Tue Oct 22 20:21:03 1991  Roland McGrath  (roland@wookumz.gnu.ai.mit.edu)
23         * remake.c, arscan.c [POSIX]: <fcntl.h> instead of <sys/file.h>.
25         * make.h [POSIX]: Declare vfork as pid_t.
27 Mon Oct 21 15:37:30 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
29         * Version 3.60.16.
31         * job.c (construct_command_argv, construct_command_argv_internal):
32         Take new 2nd arg RESTP.  If non-NULL, stop parsing at newline, and
33         store addr of the NL in *RESTP.
34         (start_job): Don't chop expanded cmd lines up; use above code to do it.
35         * function.c (expand_function: `shell'): Pass RESTP==NULL.
37 Sat Oct 19 15:36:34 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
39         * Version 3.60.15.
41 Fri Oct 18 15:26:55 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
43         * job.c (start_job): If on the same cmds->command_lines elt, look
44         at cmds->lines_recurse[CHILD->command_line - 1] instead of
45         [CHILD->command_line].
47         * dir.c [sgi]: <sys/dir.h>, not ndir or anything else.
49 Thu Oct 17 16:28:55 1991  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
51         * file.c (print_file_data_base): Remove unused var.
53         * make.h [NeXT]: No #define ANSI_STRING.
55 Tue Oct 15 20:08:41 1991  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
57         * Version 3.60.14.
59 Fri Oct 11 16:23:52 1991  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
61         * make.h: Use PATH_MAX for getwd defn.
63         * make.h: Move getcwd/getwd outside of #ifndef POSIX, and make it
64         #if USG||POSIX.
66 Thu Oct 10 11:53:31 1991  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
68         * Version 3.60.13.
70         * read.c (read_all_makefiles): When processing MAKEFILES, save the
71         malloc'd ptr to be freed, instead of freeing part-way thru it.
73         * remake.c (update_file_1): Don't tweak FILE->also_make.
74         (update_file): Do it here.  After calling update_file_1, set the
75         command_state, update_status, and updated members of each also_make
76         elt to FILE's values.
78 Tue Oct  8 14:56:04 1991  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
80         * Version 3.60.12.
82         * remake.c (notice_finished_file): Set command_state of FILE and
83         its also_make chain to cs_finished here.
84         * commands.c (execute_file_commands), job.c (child_handler),
85         remake.c (remake_file): Don't set it before calling
86         notice_finished_file.
88         * file.h (struct file): Changed `also_make' to struct dep *.
89         * job.c (delete_child_targets), file.c (print_file_data_base),
90         remake.c (notice_finished_file), implicit.c (pattern_search):
91         Use dep chain instead of array of file names.
93 Mon Oct  7 17:04:33 1991  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
95         * Version 3.60.11.
97         * arscan.c: Declare open.
98         * misc.c: Declare {get,set}{re,}[ug]id.
99         * variable.c (target_environment): Declare getenv.
101 Sat Oct  5 15:13:03 1991  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
103         * make.h [NeXT]: <string.h> instead of <strings.h>.
105 Fri Oct  4 16:05:41 1991  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
107         * default.c (default_suffixes, defualt_suffix_rules): Add .texi
108         just like .texinfo.
110         * Version 3.60.10.
112         * job.c: Move vfork decl into make.h.
114 Fri Sep 27 18:45:30 1991  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
116         * compatMakefile (glob/libglob.a): Pass CC value to submake.
118 Thu Sep 26 00:08:15 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
120         * load.c (load_average): Made not static.
122         * load.c [ultrix && vax]: Define LDAV_TYPE and LDAV_CVT for Ultrix 4.2.
124 Tue Sep 24 00:17:20 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
126         * Version 3.60.9.
128         * read.c (record_files): Warn about extra cmds even if the target's
129         name begins with a dot.  I think the lusers can handle this.
131 Mon Sep 23 22:33:26 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
133         * make.h, arscan.c: Don't declare bcmp, bzero, or bcopy if they're
134         #define'd.
135         * make.h: Declare write and open.
137         * default.c (default_suffixes, default_suffix_rules,
138         default_variables): Add .C just like .cc.
139         * make.texinfo (Catalogue of Rules): Document .C.
141         * make.man (-w): Fix gramo.
143 Fri Sep 20 17:18:16 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
145         * make.h: No text after #endif.
147 Sun Sep 15 16:20:46 1991  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
149         * Version 3.60.8.
151         * implicit.c (pattern_search): In the second pass, recurse on rule
152         deps that don't have a %.  Why did I make it not do this?
154 Fri Sep 14 18:29:39 1991  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
156         * read.c (record_files): For extra cmds, use the last ones given.
157         If the target's name doesn't begin with a dot (bletch!!), emit a
158         two-line warning, one line giving the old cmds' location and the
159         other the new cmds' location.
161         * misc.c (makefile_error, makefile_fatal): New fns.
162         * make.h: Declare them.
163         * Use them instead of error/fatal for all msgs including a file
164         name and line number.
166 Thu Sep 13 16:35:54 1991  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
168         * make.h: Declare define_default_variables.
169         Declare ar_parse_name, instead of ar_name_parse (M-t).
171 Mon Sep 10 18:35:40 1991  Roland McGrath  (roland@wookumz.gnu.ai.mit.edu)
173         * Version 3.60.7.
175         * make.texinfo (Variables: Setting): Say whitespace is removed if
176         "immediately after =", rather than simply "after =".
178         * job.c: Don't declare wait #ifdef POSIX.
180         * make.h [__GNUC__]: #undef alloca and then #define it.
182         * main.c (main): When pruning makefiles which might loop from the
183         read_makefiles chain, look at all `prev' entries of double-colon rules.
185 Fri Sep  7 00:41:53 1991  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
187         * main.c (main): Only remove makefiles with cmds but no deps from
188         the list of makefiles to be rebuilt if they are :: targets.
189         : targets with cmds and no deps are not dangerous.
191 Wed Sep  5 17:35:51 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
193         * compatMakefile (defines): Add comment that some compilers take
194         ENUM_BITFIELDS but produce bogus code.
195         (LOAD_AVG): Fix examples to \ "s.
196         (LOADLIBES): Add comment that SGI Irix needs -lmld for nlist.
198 Tue Sep  4 20:26:26 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
200         * Version 3.60.6.
202 Fri Aug 30 19:34:04 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
204         * remake.c (update_file_1): When checking the command_state of
205         deps, check through the prev chain.
206         (update_goal_chain): When a target is finished, start checking its
207         prev (if it has one) instead.
209 Wed Aug  7 17:32:03 1991  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
211         * rule.c (convert_to_pattern): Allow files with deps to define
212         suffix rules (really this time).
214 Mon Aug  5 17:09:21 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
216         * misc.c (user_access, make_access): Do saved-IDs (USG) flavor
217         #ifdef POSIX.
219         * file.c (enter_file): Strip ./s here.
220         * read.c (parse_file_seq): Not here.
222 Tue Jul 23 23:34:30 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
224         * compatMakefile: Added comment that -lPW alloca is broken on HPUX.
226 Thu Jul 18 03:10:41 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
228         * Version 3.60.5.
230         * read.c (read_makefile): Ignore lines containing chars that are
231         all isspace, not just all isblank.
233         * make.texinfo (Copying): @include gpl.texinfo, rather than copying
234         the text.
235         * gpl.texinfo: New file (symlink to /gd/gnu/doc/gpl.texinfo).
236         * GNUmakefile: Put gpl.texinfo in distribution.
238 Tue Jul 16 12:50:35 1991  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
240         * make.h: #define _GNU_SOURCE before including headers.
241         Include <ctype.h> and define isblank if <ctype.h> doesn't.
242         * commands.c: Don't include <ctype.h> here.
243         * *.c: Use isblank instead of explicit ' ' || '\t'.
245 Mon Jul 15 17:43:38 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
247         * function.c (expand_function: `filter'/`filter-out'): Fixed to not
248         loop infinitely.
250 Fri Jul 12 12:18:12 1991  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
252         * function.c (expand_function: `filter'/`filter-out'): Rewritten to
253         handle filter-out of multiple patterns properly.  Also no longer
254         mallocs and reallocs for temp array; uses alloca and a linked-list
255         instead.
257 Wed Jul 10 22:34:54 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
259         * Version 3.60.4.
261         * make.texinfo: Moved some @groups that were outside @examples to
262         be inside them.
264         * load.c [apollo] (load_average): Define using special syscall for
265         Apollo DOMAIN/OS SR10.n.
267 Thu Jul  4 12:32:53 1991  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
269         * make.texinfo (Missing): Added Unix excessive implicit rule
270         search; mention that POSIX.2 doesn't require any of the missing
271         features.
272         (Top): Updated printed manual price to $15.
274 Wed Jul  3 18:17:50 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
276         * file.c (rename_file): Carry over last_mtime when merging files.
277         * remake.c (f_mtime): Tail-recurse after renaming VPATH file, to
278         check for saved date in existing renamed-to file.
280         * remote-cstms.c (start_remote_job): Use PATH_VAR.
282         * commands.c [POSIX || __GNU_LIBRARY__]: Don't declare getpid.
284         * compatMakefile (glob-{clean,realclean}): Run clean/realclean in glob.
285         (clean, realclean): Require those.
287         * make.h: Always declare environ.
288         Don't declare old glob functions.
290         * GNUmakefile: Make no-lib deps for load.c and remote.c.
292 Tue Jul  2 18:35:20 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
294         * Version 3.60.3.
296 Mon Jul  1 16:58:30 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
298         * read.c (multi_glob): Don't pass GLOB_QUOTE flag to glob.
300         * make.h [POSIX]: Include <unistd.h>, and don't declare things that
301         should be there.
303         * main.c (main) [USG && sgi]: malloc a buffer for broken sgi stdio.
305 Sat Jun 29 11:22:21 1991  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
307         * function.c (expand_function: `shell'): Use alloca for the error
308         msg buffer, instead of assuming an arbitrary max size.
310 Fri Jun 28 18:15:08 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
312         * job.c [POSIX] (search_path): Do real 1003.1 goop to get NGROUPS_MAX.
314 Wed Jun 26 11:04:44 1991  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
316         * default.c (define_default_variables): New fn.
317         (install_default_implicit_rules): Code for above fn moved there.
318         * main.c (main): Do define_default_variables before reading the
319         makefile.
321 Tue Jun 25 17:30:46 1991  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
323         * main.c (main): Quote ; in MAKEOVERRIDES.
325 Tue Jun 18 13:56:30 1991  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
327         * compatMakefile: Fixed typo in comment.
329 Tue Jun 11 00:14:59 1991  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
331         * Version 3.60.2.
333 Mon Jun 10 14:46:37 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
335         * make.h: Always include <sys/types.h>.
336         [POSIX]: Include <limits.h> and #define MAXPATHLEN to be PATH_MAX.
338         * default.c (default_suffix_rules: .texinfo.dvi): Use $(TEXI2DVI).
339         (default_variables): Define TEXI2DVI.
341 Thu Jun  6 16:49:19 1991  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
343         * Version 3.60.1.
345         * make.h (SIGNAL): Cast handler arg to SIGHANDLER type.
347 Wed Jun  5 06:00:43 1991  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
349         * read.c (multi_glob): Use POSIX.2 `glob' function.
350         If a glob pattern matches nothing, leave it as is (a la sh, bash).
351         Also, if can't find USER for ~USER, leave it as is (a la bash).
353 Mon Jun  3 16:36:00 1991  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
355         * compatMakefile: Rewrote comments about -Ds to be easier to use.
357         * make.h, arscan.c, remake.c, main.c, dir.c, job.c: Changed tests
358         of _POSIX_SOURCE to POSIX.
360         * job.c: Take getdtablesize out of #ifdef __GNU_LIBRARY__.
361         Put separately #ifdef USG.
363         * COPYING: Replaced with version 2.
364         * Changed copyright notices to refer to GPL v2.
366 Thu May 30 00:31:11 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
368         * make.h: Don't declare sigblock for POSIX.
370         * main.c (main, log_working_directory) [USG]: Get getcwd failure
371         mode from errno, not passed buffer like BSD getwd.
373         * misc.c (child_access): New fn to set access for a child process;
374         like user_access, but you can't change back.
375         * make.h: Declare it.
376         * job.c (exec_command): Use it in place of user_access.
378 Wed May 29 23:28:48 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
380         * default.c (default_variables) [pyr]: PC = pascal.
382 Tue May 28 20:24:56 1991  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
384         * variable.c (print_variable): Put a newline before `endef'.
386 Sat May 25 02:39:52 1991  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
388         * Version 3.60.
390 Wed May 22 19:41:37 1991  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
392         * Version 3.59.5.
394 Thu May 16 13:59:24 1991  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
396         * main.c (main): Do USGr3 setvbuf behavior #ifdef APOLLO.
397         Don't handle SIGCHLD #ifdef USG (Apollo is USG but defines SIGCHLD).
399 Fri May 10 14:59:33 1991  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
401         * remake.c [sgi]: Don't include <sys/file.h>.
403 Wed May  8 01:54:08 1991  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
405         * make.h (SIGHANDLER): #define as (void *) #if __STDC__,
406         else (int (*)()).
407         (SIGNAL): Use it to cast return value.
408         * main.c (main): Cast SIG_IGN to SIGHANDLER when comparing.
409         * job.c (block_signals, unblock_signals): Use SIGNAL instead of signal.
411         * main.c: Declare mktemp to return char*, not int.
413         * job.c (new_job): Don't increment files_remade.
414         * remake.c (notice_finished_file): Do it here.
416         * read.c (do_define): Don't clobber DEFINITION[-1] on empty defns.
417         Free storage that is no longer needed.
419 Wed Apr 24 20:49:48 1991  Roland McGrath  (roland at churchy.gnu.ai.mit.edu)
421         * misc.c (message): New fn to print informational msgs with
422         leading "make: " or "make[N]: ".
423         * make.h: Declare it.
424         * remake.c (update_file): Use it instead of printf.
426 Fri Apr 19 05:52:45 1991  Roland McGrath  (roland at churchy.gnu.ai.mit.edu)
428         * main.c (main): When there are no targets, if there were no
429         makefiles, print a different error message, which mentions makefiles.
431 Tue Apr 16 03:22:45 1991  Roland McGrath  (roland at geech.gnu.ai.mit.edu)
433         * remake.c (update_file): Print "nothing to be done" instead of "is
434         up to date" if FILE->cmds == 0.
436         * job.c [!WIFEXITED]: Define if not already defined.
438 Thu Apr 11 18:00:50 1991  Roland McGrath  (roland at wookumz.gnu.ai.mit.edu)
440         * arscan.c (ar_name_equal): Fixed truncation comparison.
442 Tue Apr  2 16:17:35 1991  Roland McGrath  (roland at churchy.gnu.ai.mit.edu)
444         * glob.c: Use common version from djm.
445         * dir.c: Snarfed #ifdef mess for <dirent.h> or whatever from glob.c.
446         (dir_file_exists_p): Ignore directory entries with d_ino==0.
448 Mon Apr  1 20:49:45 1991  Roland McGrath  (roland at albert.gnu.ai.mit.edu)
450         * Version 3.59.4.
452 Fri Mar 29 19:16:18 1991  Roland McGrath  (roland at albert.gnu.ai.mit.edu)
454         * job.c (free_child): Free CHILD->environment and its elts.
456 Sat Mar 23 14:08:09 1991  Roland McGrath  (roland at albert.gnu.ai.mit.edu)
458         * read.c (read_makefile): Don't ignore lines containing only
459         comments if they start with a tab.  Such lines should be passed to
460         the shell for it to decide about the comments.
462         * job.c (free_child): Free CHILD->command_lines and its elts, not
463         CHILD->commands (which is obsolete).
464         * job.h, job.c: Remove obsolete `commands' member of `struct child'.
466 Sun Mar 17 18:40:53 1991  Roland McGrath  (roland at albert.ai.mit.edu)
468         * remake.c (update_file): Print a msg for a top-level up-to-date
469         phony target (a different one than for a real file).
471         * read.c (conditional_line): Boundary check so we don't check the
472         value of the -1th elt of the stack (which is bogus).
474 Sat Mar 16 16:58:47 1991  Roland McGrath  (roland at albert.ai.mit.edu)
476         * read.c (conditional_line): Don't evaluate an if* when we're
477         already ignoring.  Instead, just push a new level, with a value of
478         1, to keep ignoring.
480 Tue Mar 12 00:16:52 1991  Roland McGrath  (roland at geech.ai.mit.edu)
482         * Version 3.59.3.
484 Mon Mar 11 23:56:57 1991  Roland McGrath  (roland at geech.ai.mit.edu)
486         * job.c (construct_command_argv_internal): Quote backslashes
487         when building the shell -c line.
489 Fri Mar  8 01:40:18 1991  Roland McGrath  (roland at geech.ai.mit.edu)
491         * job.c (exec_command): Call user_access rather than setgid(getgid()).
493         * misc.c (remove_comments): Renamed from collapse_line; took out
494         collapse_continuations call.
495         * make.h: Change decl.
496         * read.c (read_makefile): Collapse continuations on the line buffer
497         immediately after reading it.  Call remove_comments rather than
498         collapse_line (which is now defunct).
500 Thu Feb 21 18:06:51 1991  Roland McGrath  (mcgrath at cygint.cygnus.com)
502         * misc.c (user_access, make_access): New fns to toggle btwn permissions
503         for user data (files and spawning children), and permissions for make
504         (for taking the load average, mostly).
505         * make.h: Declare them.
506         * job.c (start_job): Call make_access before wait_to_start_job, and
507         user_access after.
508         * main.c (main): Call user_access before doing much.
510 Mon Feb  3 15:02:03 1991  Roland McGrath  (roland at albert.ai.mit.edu)
512         * Version 3.59.2.
514 Tue Jan 29 20:30:50 1991  Roland McGrath  (roland at cygint.cygnus.com)
516         * read.c (read_all_makefiles): Use allocated_variable_expand to expand
517         `$(MAKEFILES)', since the results are used across calls to
518         read_makefile, which could clobber them.
520 Wed Jan 23 00:24:10 1991  Roland McGrath  (roland at cygint.cygnus.com)
522         * main.c (main): Call install_default_implicit_rules after reading
523         makefiles, not before.
524         * default.c (install_default_implicit_rules): If a suffix-rule file
525         entry has cmds, don't give it any from default_suffix_rules.
527 Fri Jan 17 17:39:49 1991  Roland McGrath  (roland at albert.ai.mit.edu)
529         * arscan.c: Added support for AIX archives.
531         * remake.c: Don't include ar.h.
532         * main.c: Removed unused atol decl.
533         * arscan.c (ar_scan): Declare arg FUNCTION to return long int.
534         * ar.c (ar_touch): Don't perror for an invalid archive.
535         * make.h: Declare lseek as long int.
537         * job.c [hpux]: Define getdtablesize a la USG.
539 Sun Jan 12 21:08:34 1991  Roland McGrath  (roland at albert.ai.mit.edu)
541         * Version 3.59.1.
543 Fri Jan 10 03:48:08 1991  Roland McGrath  (roland at albert.ai.mit.edu)
545         * job.c (search_path): Take new arg, place to put full pathname (rather
546         than mallocing it).
547         (exec_command): Pass it, using auto storage.
549         * main.c (print_version): Updated copyright years.
551 Wed Jan  8 19:46:19 1991  Roland McGrath  (roland at albert.ai.mit.edu)
553         * job.c [_POSIX_SOURCE]: Just #include <sys/wait.h>, and define macro
554         WAIT_NOHANG in terms of waitpid.
555         [!_POSIX_SOURCE && (HAVE_SYS_WAIT || !USG)]: Don't #include <signal.h>
556         (make.h does).
557         Define macro WAIT_NOHANG in terms of wait3.
558         (child_handler): #ifdef on WAIT_NOHANG, not HAVE_SYS_WAIT || !USG.
559         Use WAIT_NOHANG macro instead of wait3.
561         * file.h (struct file.command_state): Remove unused elt.
563 Wed Dec 26 18:10:26 1990  Roland McGrath  (roland at albert.ai.mit.edu)
565         * commands.c (set_file_variables): If FILE got its commands from
566         .DEFAULT, make $< == $@ (4.3 BSD/POSIX.2d11 compat).
568 Mon Dec 24 17:36:27 1990  Roland McGrath  (roland at albert.ai.mit.edu)
570         * default.c (default_variables): Rename 2nd LINK.s defn to LINK.S.
572 Fri Dec 14 15:05:25 1990  Roland McGrath  (roland at albert.ai.mit.edu)
574         * vpath.c (selective_vpath_search): Check for makefile-mentioned before
575         checking for actual existence.  The old order loses if the containing
576         directory doesn't exist (but a rule might make it).
578         * make.h [__GNUC__]: Don't #define alloca if already #define'd.
580         * rule.c (convert_to_pattern): Don't look at the target constructed for
581         the empty rule when making the null-suffix rule.  Construct it over
582         again, since the former may have been freed already.
584 Thu Dec 13 17:21:03 1990  Roland McGrath  (roland at churchy.ai.mit.edu)
586         * make.h [__GNU_LIBRARY__]: Include <unistd.h> to get random fn decls.
588 Wed Dec 12 17:12:59 1990  Roland McGrath  (roland at churchy.ai.mit.edu)
590         * make.h, arscan.c, glob.c: Only include <memory.h> #ifdef USG.
592         * variable.c (define_variable_in_set): Replace env_overrides check that
593         wasn't really redundant (undoing Sep 28 change).  Add comment saying
594         why this check is necessary.
596         * job.c, main.c [DGUX]: Needs siglist like USG.
598 Mon Dec 11 01:19:29 1990  Roland McGrath  (roland at albert.ai.mit.edu)
600         * default.c [M_XENIX]: For rules that are different for Xenix, use the
601         generic Unix version #ifdef __GNUC__.
603         * main.c [M_XENIX]: Use USGr3-style setvbuf call.
605         * read.c (find_percent): Do backslash folding correctly, not leaving
606         extra crud on the end of the string.
608 Sun Dec 10 21:48:36 1990  Roland McGrath  (roland at albert.ai.mit.edu)
610         * job.c: Don't declare wait3 if it's #defined.
612         * GNUmakefile, compatMakefile, make.texinfo: Change make-info
613         to make.info.
615 Thu Dec  7 21:20:01 1990  Roland McGrath  (roland at churchy.ai.mit.edu)
617         * make.h [STDC_HEADERS || __GNU_LIBRARY__ || _POSIX_SOURCE]: Use
618         ANSI <string.h> and names for str/mem functions.
619         Use <stdlib.h> to declare misc fns rather than explicit decls.
620         [_POSIX_SOURCE]: Don't declare kill (<signal.h> will).
621         Include <sys/types.h> before <signal.h> because some braindead
622         nonconformant 1003.1 implementation needs it.
623         * misc.c: Don't declare malloc, realloc.  Do it in make.h.
624         * arscan.c, glob.c: Use sequence for string fns from make.h verbatim.
625         * make.h (S_ISDIR, S_ISREG): Declare if necessary.
626         * commands.c (delete_child_targets), job.c (search_path), read.c
627         (construct_include_path): Use S_ISfoo(m) instead of
628         (m & S_IFMT) == S_IFfoo.
629         * dir.c, glob.c [_POSIX_SOURCE]: Use dirent.
631 Wed Nov 29 22:53:32 1990  Roland McGrath  (roland at geech.ai.mit.edu)
633         * Version 3.59.
635 Tue Nov 28 16:00:04 1990  Roland McGrath  (roland at churchy.ai.mit.edu)
637         * arscan.c (ar_name_equal) [APOLLO]: Don't do `.o' hacking.  On Apollos
638         the full file name is elsewhere, and there is no length restriction (or
639         so I'm told).
641 Thu Nov 23 17:33:11 1990  Roland McGrath  (roland at albert.ai.mit.edu)
643         * load.c [hp300 && BSD] (LDAV_CVT): Define for this system.
645 Tue Nov 21 07:58:40 1990  Roland McGrath  (roland at albert.ai.mit.edu)
647         * read.c (record_files): Fix trivial bug with deciding to free storage
648         for a file name.
650 Thu Nov 16 06:21:38 1990  Roland McGrath  (roland at geech.ai.mit.edu)
652         * compatMakefile ($(bindir)/make): Install it setgid kmem.
654 Thu Nov  1 16:12:55 1990  Roland McGrath  (roland at churchy.ai.mit.edu)
656         * GNUmakefile (make-*.tar.Z): Use `h' option to tar (dereference
657         symlinks), to grab texinfo.tex from wherever it lives.
659 Tue Oct 30 16:15:20 1990  Roland McGrath  (roland at churchy.ai.mit.edu)
661         * Version 3.58.13.
663 Fri Oct 26 14:33:34 1990  Roland McGrath  (roland at churchy.ai.mit.edu)
665         * GNUmakefile: make-*.tar.Z: Include texinfo.tex.
667 Tue Oct 23 19:34:33 1990  Roland McGrath  (roland at churchy.ai.mit.edu)
669         * main.c (define_makeflags): When there are no flags to write, make
670         sure the array has two leading nulls, since `MAKEFLAGS' is defined from
671         &flags[1].
673         * main.c (default_keep_going_flag): New variable (constant one).
674         (command_switches: -k, -S): Use above for default value.
675         (define_makeflags): Only write flag/flag_off switches if they are on,
676         and either there is no default value, or they are not the default.
678 Mon Oct 22 16:14:44 1990  Roland McGrath  (roland at churchy.ai.mit.edu)
680         * main.c (struct command_switch): New member `no_makefile'.
681         (command_switches: -n, -q, -t): Set no_makefile == 1.
682         (define_makeflags): Take new arg MAKEFILE: if nonzero, don't use
683         options whose `no_makefile' flags are set.
684         (main): Call define_makeflags with MAKEFILE==1 before remaking
685         makefiles, and again with MAKEFILE==0 before remaking goals.
687 Tue Oct  2 17:16:45 1990  Roland McGrath  (roland at geech.ai.mit.edu)
689         * Version 3.58.12.
691 Mon Oct  1 15:43:23 1990  Roland McGrath  (roland at churchy.ai.mit.edu)
693         * arscan.c [HPUX]: Use PORTAR==1 format.
695 Sat Sep 29 16:38:05 1990  Roland McGrath  (roland at churchy.ai.mit.edu)
697         * make.h, remake.c, arscan.c: Don't declare `open'.
699 Fri Sep 28 04:46:23 1990  Roland McGrath  (roland at churchy.ai.mit.edu)
701         * variable.c (define_variable_in_set): Remove redundant -e check.
703 Wed Sep 26 00:28:59 1990  Roland McGrath  (roland at geech.ai.mit.edu)
705         * job.c (start_job): Set RECURSIVE from the right elt of
706         CHILD->file->cmds->lines_recurse.
708         * commands.c (chop_commands): Don't botch the line count for allocating
709         CMDS->lines_recurse.
711         * Version 3.58.11.
713         * job.c (start_job): Don't always increment CHILD->command_line!  Only
714         do it when CHILD->command_ptr has run out!  (Dumb bug.  Sigh.)
716 Thu Sep 20 02:18:51 1990  Roland McGrath  (roland at geech.ai.mit.edu)
718         * GNUmakefile [ARCH]: Give explicit rule for remote.{c,dep} to use
719         variable `REMOTE' for more flags.
720         ($(prog)): Link in $(LOADLIBES).
722 Wed Sep 19 02:30:36 1990  Roland McGrath  (roland at churchy.ai.mit.edu)
724         * commands.h (struct commands): New member `ncommand_lines', the number
725         of elts in `command_lines' et al.
726         * commands.c (chop_commands): Set `ncommand_lines' elt of CMDS, and
727         don't put a nil pointer at the end of `command_lines'.
728         * job.h (struct child): New member `command_lines' to hold
729         variable-expanded command lines.
730         * job.c (new_job): Store expanded command lines in `command_lines'
731         member of new child.  Don't clobber FILE->cmds.
732         (start_job): Use CHILD->command_lines in place of
733         CHILD->file->cmds->command_lines.
735         * variable.h, variable.c, job.c, expand.c: Undo yesterday's change,
736         which is no longer necessary since we have cleverly avoided the issue.
738         * job.c (start_job): Don't variable-expand each command line.
739         (new_job): Do them all here, storing the expansions in the array.
741 Tue Sep 18 01:23:13 1990  Roland McGrath  (roland at churchy.ai.mit.edu)
743         * variable.h (struct variable): Remove `expanding' member.
744         * variable.c (define_variable_in_set): Don't initialize it.
745         * expand.c (struct variable_expanding): New type, a linked list
746         containing `struct variable' pointers.
747         (variables_expanding): New variable, the chain of variables currently
748         being expanded.
749         (recursively_expand): Don't test and set `expanding' member.
750         Instead, run through the `variables_expanding' chain looking for a link
751         referring to V to find self-reference.  Add a new link to the chain,
752         describing V, before recursive expansion, and pop it off afterward.
753         * job.c (child_handler): Save `variables_expanding' and clear it before
754         calling start_job, and restore it afterward.  This avoids major lossage
755         when the SIGCHLD comes in the middle of variable expansion.
757 Mon Sep 17 14:46:26 1990  Roland McGrath  (roland at geech.ai.mit.edu)
759         * job.c, commands.c: Don't define sigmask.
760         * make.h: Put it here instead.
762         * variable.c (target_environment): If `.NOEXPORT' was specified as a
763         target, only export command-line and environment variables, and
764         file-origin variables that were in the original environment.
766         * make.man: Add missing ?roff control for `-I' option description.
768 Thu Sep 13 14:10:02 1990  Roland McGrath  (roland at churchy.ai.mit.edu)
770         * load.c [UMAX]: Move #include <sys/sysdefs.h> to [not UMAX_43].
772 Wed Sep 12 15:10:15 1990  Roland McGrath  (roland at churchy.ai.mit.edu)
774         * expand.c (recursively_expand): Don't use `reading_filename' and
775         `reading_lineno_ptr' if they're nil.
777 Thu Aug 30 17:32:50 1990  Roland McGrath  (roland at geech)
779         * Version 3.58.10.
781 Tue Aug 28 04:06:29 1990  Roland McGrath  (roland at churchy.ai.mit.edu)
783         * job.c [USG] (unknown_children_possible): New variable, set nonzero
784         when it's possible for children not in the `children' chain to die.
785         (block_signals) [USG]: Set it.
786         (unblock_signals) [USG]: Clear it.
787         (child_handler) [USG]: Don't complain about unknown children if
788         `unknown_children_possible' is set.
790         * read.c (do_define): Make sure there's enough space for the newline,
791         so we don't write off the end of allocated space.
793         * arscan.c (ar_name_equal): Fixed to work when MEM is AR_NAMELEN-1 but
794         NAME is not the same length.
796 Sat Aug 25 16:17:14 1990  Roland McGrath  (roland at geech)
798         * job.c (construct_command_argv_internal): Use a static char array for
799         a constant, since old C has no auto aggregate initializers.
801 Thu Aug 23 16:11:03 1990  Roland McGrath  (roland at churchy.ai.mit.edu)
803         * job.c (search_path): If PATH is nil or "" use a default path.
805 Wed Aug 22 01:05:32 1990  Roland McGrath  (roland at churchy.ai.mit.edu)
807         * Version 3.58.9.
809         * job.c (exec_command): Don't take PATH and SHELL args.  Get them from
810         ENVP.
811         (child_execute_job): Don't take FILE arg, and don't pass path and shell
812         to exec_command.
813         (start_job): Don't pass FILE arg to child_execute_job.
814         * function.c (expand_function: `shell'): Ditto.
815         * main.c (main): Don't pass path and shell to exec_command.
817 Fri Aug 17 23:17:27 1990  Roland McGrath  (roland at geech)
819         * job.c (construct_command_argv_internal): New fn broken out of
820         construct_command_argv.  Takes strings SHELL and IFS instead of doing
821         variable expansion for them.  Recurse to make an argv for SHELL,
822         passing SHELL==0.  When SHELL==0, don't recurse for shell argv; make a
823         simple one using /bin/sh.
824         (construct_command_argv): Do the variable expansions and call above.
826 Thu Aug 16 19:03:14 1990  Roland McGrath  (roland at geech)
828         * read.c (multi_glob): For ~USER/FILE, if USER isn't found, don't
829         change the file name at all.
831 Tue Aug  7 18:33:28 1990  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
833         * function.c (expand_function: `suffix'/`notdir'): Don't kill the last
834         space if we never wrote one.
836         * function.c (expand_function: `suffix'): Retain the dot, like the
837         documentation says.
839 Mon Aug  6 14:35:06 1990  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
841         * Version 3.58.8.
843         * main.c (decode_switches): For positive_int and floating cases, move
844         SW past the arg (and don't set it to ""), so another switch can follow.
846 Fri Aug  3 00:43:15 1990  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
848         * job.c (child_execute_job): Use unblock_signals instead of
849         push_signals_blocked_p (0).
851         * main.c (fatal_signal_mask): New variable, mask of signals caught with
852         fatal_error_signal.
853         (main): Set it.
854         * job.c ({block,unblock}_children): Renamed to {block,unblock}_signals.
855         Block/unblock both child signal and signals in fatal_signal_mask.
856         (children_blocked_p_{stack,max,depth}, {push,pop}_children_blocked_p):
857         Renamed from children to signals.  Use {block,unblock}_signals instead
858         of {block,unblock}_children.
859         * commands.c (fatal_error_signal), job.c (wait_for_children, new_job,
860         child_execute_job, main, log_working_directory), function.c
861         (expand_function: `shell'), job.h: Rename {push,pop}_children_blocked_p
862         to {push,pop}_signals_blocked_p.
863         * job.c (child_handler): Call {block,unblock}_signals instead of just
864         {block,unblock}_remote_children.  We need to block the fatal signals.
866 Thu Aug  2 22:41:06 1990  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
868         * main.c, function.c: Fixed typos in comments.
870         * file.c (print_file_data_base): Fix computation of avg files/bucket.
872 Tue Jul 31 22:11:14 1990  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
874         * Version 3.58.7.
876 Wed Jul 25 16:32:38 1990  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
878         * arscan.c (ar_name_equal): Fixed to really do it right.
879         (ar_member_pos): Fixed order of args.
880         * ar.c (ar_member_date_1): Ditto.
882 Fri Jul 20 15:30:26 1990  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
884         * arscan.c (ar_name_equal): Rewritten.  Accounts for a possible
885         trailing slash in MEM.
887         * remake.c (f_mtime): Keep track of whether ARNAME is used and free it
888         if not.  Also free MEMNAME.
889         * ar.c (ar_member_date, ar_touch): Ditto.
891         * arscan.c (arscan) [HPUX or hpux]: Treat same as USGr3 PORTAR==1.
893         * make.h: If NSIG is not defined, but _NSIG is, #define NSIG _NSIG.
895         * compatMakefile: Don't use $* in explicit rules.
897         * default.c (default_variables: "PREPROCESS.S"): Include $(CPPFLAGS).
899         * remake.c (f_mtime): If FILE is an ar ref, get the member modtime.
901         * function.c (string_glob): Terminate the string properly when it's
902         empty.
904 Wed Jul 18 11:26:56 1990  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
906         * Version 3.58.6.
908         * commands.c (set_file_variables): Fixed computation for ^F/?F elt len.
910 Sat Jul 14 13:41:24 1990  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
912         * job.c (construct_command_argv): Always use
913         allocated_variable_expand_for_file instead of variable_expand_for_file
914         because we might be called from inside a variable expansion (for the
915         `shell' function).
917         * function.c (expand_function: `shell'): Free the arglist's storage
918         correctly.  construct_command_argv only allocates ARGV and ARGV[0].
920         * job.c (children_blocked_p_idx): Renamed to children_blocked_p_depth.
921         (push_children_blocked_p, pop_children_blocked_p): Use ..._depth
922         instead of ..._idx, and do it right!
924 Wed Jul 11 15:35:43 1990  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
926         * make.h (SIGNAL): New macro to replace `signal' calls.  Does arg and
927         ret value casts to (void *) #ifdef __STDC__ to avoid conflicts btwn
928         ANSI and BSD `signal' and handler types.
929         * main.c (main), job.c (child_handler): Use it.
931 Fri Jul  6 00:00:38 1990  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
933         * ar.c (ar_member_date, ar_touch): Pass 2nd arg to f_mtime.
935         * read.c (read_makefile): Search the include path for MAKEFILES
936         variable makefiles (TYPE == 1), like it says in the manual.
938         * file.h (struct file), main.c (struct command_switch): Remove trailing
939         commas from enums.
941         * commands.c (execute_file_commands): Remove unused variables.
942         * commands.h: Declare chop_commands.
943         * make.h: Declare uniquize_deps.
944         * main.c (main): Remove unused variable.
945         (decode_switches): Remove unused label.
946         * remake.c: Include "ar.h" for ar_parse_name decl.
947         * implicit.c (try_implicit_rule): Remove unused variable.
948         * function.c (expand_function: `shell'): Declare fork, pipe.
949         * ar.c: Declare ar_name_equal.
951         * GNUmakefile: If using gcc, add warning flags to CFLAGS.
953         * remake.c: Remove decl of ar_member_date, since it's done in make.h.
955         * remake.c (f_mtime): For ar refs, allow the archive to be found via
956         VPATH search if we're searching, and change the ar ref accordingly.
958         * ar.c (ar_parse_name): New global fn to parse archive-member
959         references into the archive and member names.
960         (ar_member_date, ar_touch): Use it.
961         * make.h: Declare it.
963         * remake.c (f_mtime): After doing rename_file, do check_renamed instead
964         of assuming rename_file will always set FILE->renamed (which it won't).
966         * vpath.c (selective_vpath_search): Only accept prospective files that
967         don't actually exist yet are mentioned in a makefile if the file we are
968         searching for isn't a target.
970 Wed Jul  4 04:11:55 1990  Roland McGrath  (mcgrath at helen.Berkeley.EDU)
972         * remake.c (update_goal_chain): Do check_renamed after calling
973         file_mtime.
974         (check_dep): Ditto after update_file.
976         * file.c (rename_file): Prettied up long message for merging cmds.
978         * remake.c (update_file_1): Get each dep file's modtime, and allow for
979         it being renamed, before checking for a circular dep, since a renaming
980         may have introduced one.
982 Tue Jul  3 18:15:01 1990  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
984         * ar.c (ar_touch): Don't free ARNAME since enter_file holds onto the
985         storage.
987         * function.c (string_glob): Don't leave a trailing space.
989         * read.c (do_define): Allow leading whitespace before `endef'.
991 Mon Jul  2 14:10:16 1990  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
993         * implicit.c (pattern_search): No longer take NAME arg.  Instead take
994         ARCHIVE flag.  If ARCHIVE is nonzero, FILE->name is of the form
995         "LIB(MEMBER)"; rule for "(MEMBER)" is searched for, and LASTSLASH is
996         set to nil.  Since NAME was only non-nil when it was the archive member
997         name passed by try_implicit_rule, this change easily allows turning off
998         LASTSLASH checking for archive members without excessive kludgery.
999         (try_implicit_rule): Pass ARCHIVE flag instead of file name.
1001         * Version 3.58.5.
1003         * commands./c (set_file_variables): Don't kill last char of $(^D) elts.
1005 Sat Jun 30 00:53:38 1990  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
1007         * ar.c (ar_member_date): Don't free ARNAME since enter_file holds onto
1008         the storage.
1010         * arscan.c (ar_scan) [sun386 && PORTAR == 1]: Treat like USGr3.
1012 Wed Jun 27 14:38:49 1990  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1014         * main.c (main): Put a newline on the debugging message when deciding
1015         not to remake a makefile to avoid a possible loop.
1016         Only decide not to remake makefiles that have commands (as well as
1017         being targets and having no deps).
1019 Fri Jun 22 12:35:37 1990  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1021         * default.c (default_variables): Define `LINK.s' and `LINK.S'.
1022         (default_suffix_rules): Define .S.o rule.
1024         * job.c (construct_command_argv): If we decide to go the slow route,
1025         free all storage for the chopped args.
1026         (start_job): Free the argument list's storage correctly.
1027         construct_command_argv only allocates ARGV and ARGV[0].
1029 Tue Jun 19 18:27:43 1990  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1031         * Version 3.58.4.
1033 Fri Jun 15 21:12:10 1990  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1035         * glob.c: New version from ai-lab which doesn't do [^abc].
1037 Thu Jun  7 00:30:46 1990  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1039         * dir.c: Copied dirent vs direct et al mess from glob.c.
1041         * glob.c: Replaced with updated version from djm.
1042         * glob.c: Check macro DIRENT instead of _POSIX_SOURCE for <dirent.h>.
1043         __GNU_LIBRARY__ implies DIRENT and STDC_HEADERS.
1045 Thu May 31 22:19:49 1990  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1047         * vpath.c (vpath_search): Don't stop the loop if a pattern matches but
1048         the search fails.  All matching patterns have their paths searched
1049         (like it says in the manual).
1051         * make.texinfo (Rules: Directory Search: Selective Search): Say that
1052         multiple `vpath' directives with the same pattern DO accumulate, not
1053         supersede earlier ones.
1055         * vpath.c (print_vpath_data_base): Increment the count of vpaths on
1056         each loop iteration, rather than letting it stay zero.
1058         * Version 3.58.3.
1060         * job.c (block_children, unblock_children): Made static.
1061         (push_children_blocked_p, pop_children_blocked_p): New functions to
1062         push and pop whether children are blocked or not.
1063         * job.h: Declare push_children_blocked_p, pop_children_blocked_p and
1064         not block_children, unblock_children.
1065         * commands.c (fatal_error_signal), job.c (wait_for_children, new_job,
1066         child_execute_job), main.c (main, log_working_directory): Use sequences
1067         of push_children_blocked_p (1) and pop_children_blocked_p () instead of
1068         explicitly blocking and unblocking children.
1069         * function.c (expand_function: `shell'): Don't unblock children.  The
1070         push-pop sequence in wait_for_children makes it unnecessary.
1072 Tue May 29 21:30:00 1990  Roland McGrath  (mcgrath at helen.Berkeley.EDU)
1074         * read.c (do_define): Don't include the last newline in the definition.
1076         * function.c (expand_function: `shell'): Call construct_command_argv
1077         before forking and don't fork if it returns nil.  Free the argument
1078         list's storage before finishing.
1080         * job.c (start_job): Free the storage for the child's argument list
1081         in the parent side of the fork after the child has been spawned.
1083         * job.c (start_job): If construct_command_argv returns nil, go to the
1084         next command line.
1086         * job.c (construct_command_argv): Use the shell if the command contains
1087         an unterminated quote.
1089 Wed May 23 19:54:10 1990  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1091         * Version 3.58.2.
1093         * read.c (read_makefile): Parse "override define" correctly.
1095 Thu May 17 15:25:58 1990  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1097         * arscan.c [USG]: Don't declare memcpy and memcmp.  <memory.h> should
1098         do this anyway (and lack of declarations is harmless).
1100         * remote-customs.c: Renamed to remote-cstms.c for System V.
1101         * remote.c [CUSTOMS]: Changed accordingly.
1103 Sun May 13 14:38:39 1990  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1105         * GNUmakefile: Use same cmds for doc tar.Z as for dist tar.Z (so the
1106         contents go in make-N.NN).
1108 Thu Apr 26 19:33:25 1990  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
1110         * Version 3.58.1.
1112 Wed Apr 25 20:27:52 1990  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
1114         * job.c (init_siglist): Don't do SIGUSR1 and SIGUSR2 if they are the
1115         same as SIGIO and SIGURG (true on Cray).
1117 Tue Apr 24 20:26:41 1990  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
1119         * arscan.c (ar_scan): Do behavior for PORTAR == 1 and USGr3 also
1120         #ifdef APOLLO.
1122 Wed Apr 11 10:00:39 1990  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1124         * job.c (exec_command): Set the effective GID to the real GID.  Somehow
1125         this code got lost.
1127         * implicit.c (pattern_search): Use the right index variable when
1128         seeing if we need to expand FILE->also_make.
1130 Sun Mar  4 09:18:58 1990  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
1132         * Version 3.58.0.
1134         * remake.c (remake_file): Treat non-targets without commands under -t
1135         the same as anything else without commands.
1137 Sat Feb 24 17:46:04 1990  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
1139         * default.c (default_variables: PREPROCESS.S): Removed $< from defn.
1141         * main.c (main): Ignore arguments that are the empty string, rather
1142         than feeding them to enter_file and barfing therein.
1144 Wed Feb 14 16:28:37 1990  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
1146         * main.c (main): Call construct_include_path after doing chdirs.
1148 Thu Feb  8 13:43:44 1990  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
1150         * Version 3.58.
1152 Sat Feb  3 22:06:55 1990  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
1154         * Version 3.57.7.
1156         * make.texinfo (Implicit: Catalogue of Rules): For RCS, noted that
1157         working files are never overwritten by the default rule.
1159 Thu Feb  1 17:27:54 1990  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
1161         * rule.c (count_implicit_rule_limits): Redid loop control to not run
1162         twice on freed rules.
1164         * GNUmakefile: Made `.dep' files be architecture-specific too.
1166         * main.c (main, log_working_directory) [USG]: Block children around
1167         calls to `getwd' (actually `getcwd' on USG), because that function
1168         sometimes spawns a child running /bin/pwd on USG.
1170 Tue Jan 30 14:02:50 1990  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
1172         * function.c (subst_expand): Pay attention to SUFFIX_ONLY, putz.
1174 Wed Jan 24 21:03:29 1990  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
1176         * make.man: Fixed repeated word.
1178         * make.texinfo (Missing): Reworded a buggy sentence.
1180 Mon Jan 22 12:39:22 1990  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
1182         * main.c (print_version): Added 1990 to copyright notice.
1184         * Version 3.57.6.
1186 Sat Jan 20 11:52:01 1990  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
1188         * file.c (rename_file): Don't free the storage for the old name, since
1189         it might not have been malloc'd.
1191         * job.c (construct_command_argv): Call
1192         allocated_variable_expand_for_file instead of variable_expand_for_file
1193         to expand `$(SHELL)'.
1195         * make.texinfo (Bugs): Change address from roland@wheaties.ai.mit.edu
1196         to roland@prep.ai.mit.edu.
1198 Tue Jan 16 19:22:33 1990  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
1200         * Version 3.57.5.
1202 Sun Jan 14 16:48:01 1990  Roland McGrath  (mcgrath at helen.Berkeley.EDU)
1204         * job.c (start_job): Only call wait_to_start_job for the first command
1205         line in each sequence.
1207 Thu Jan  4 14:27:20 1990  Roland McGrath  (mcgrath at helen.Berkeley.EDU)
1209         * load.c [LDAV_BASED] (wait_to_start_job): Loop while job_slots_used >
1210         0, not > 1.
1212         * job.c (search_path): Don't return a pointer to local storage.
1213         Allocate data space for the pathname instead.
1215         * function.c (expand_function: `shell'): Don't write garbage if the
1216         child wrote no output.
1218 Wed Jan  3 15:28:30 1990  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1220         * Version 3.57.4.
1222         * file.h (struct file): New member `renamed', a `struct file *' that is
1223         the place this file has been renamed to (or nil).
1224         (check_renamed): Macro to check for a file having been renamed.
1225         Dereferences the renaming and sets the given variable.
1226         * file.c (rename_file): Completely rewritten.  Renames in place if
1227         possible, or moves FILE to a different hash bucket if there is no
1228         existing file with the new name.  If there is an existing file with the
1229         new name, FILE is merged into it and FILE->renamed is set to point to
1230         it.
1231         * variable.c (merge_variable_sets): New fn to merge two variable sets.
1232         (merge_variable_set_lists): New fn to merge two variable set lists.
1233         * variable.h: Declare merge_variable_set_lists.
1234         * remake.c (update_file_1, check_dep): Run `check_renamed' after
1235         calling file_mtime, check_dep.
1236         (update_file): Same after update_file_1.
1237         (update_goal_chain, update_file_1, check_dep): Same after update_file.
1239         * read.c (uniquize_deps): New fn, broken out of record_files, to remove
1240         duplicate deps from a chain.
1241         (record_files): Use it.
1242         * implicit.c (pattern_search): Use uniquize_deps.
1244         * file.h (file_mtime_1): New macro, like file_mtime, but take second
1245         arg, passed to f_mtime.
1246         (file_mtime): Implement as file_mtime_1 (file, 1).
1247         (file_mtime_no_search): New macro: file_mtime (file, 0).
1248         * remake.c (f_mtime): Take new arg SEARCH.  Only do VPATH and `-lNAME'
1249         searching if it is nonzero.
1250         * main.c (main): Use file_mtime_no_search for makefiles.
1251         * remake.c (update_goal_chain): Use file_mtime_no_search if MAKEFILES.
1253         * main.c (printed_version): New variable, init'd to zero.
1254         (print_version): Set it to nonzero before returning.
1255         (die): If -v and !printed_version, call print_version before clean up
1256         and death.
1258         * main.c (log_working_directory): Keep track of whether or not the
1259         "Entering" message has been printed, and return without printing the
1260         "Leaving" message if not.
1262         * main.c (decode_switches): Don't complain about missing args before
1263         checking for a noarg_value elt in the command_switch structure.
1265 Tue Jan  2 15:41:08 1990  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
1267         * make.texinfo (Commands: Recursion: Options/Recursion): Document
1268         special case of -j.
1270         * make.texinfo, main.c, job.c: Changed copyright notices to include
1271         1990.
1273         * make.texinfo (Top): Fixed introductory paragraph, which said that
1274         `make' itself (instead of the manual) has various chapters.
1275         (Variables: Advanced: Substitution Refs): When pxref'ing about
1276         `patsubst', use node `Text Functions', not `Functions'.
1277         Add an xref about `patsubst' after description of $(var:a%b=c%d).
1278         (Functions: Syntax of Functions): Explain why mixing delimiters in
1279         function/var refs is unwise.  Clarify fn arg evaluation order.
1280         (Options): Reworded sentence about `-e'.
1281         (Implicit: Implicit Variables): Don't say `RM' is unused.
1282         Say the dflt values for the flag vars is empty unless otherwise noted,
1283         since some have defaults.
1284         (Implicit: Pattern Rules: Pattern Examples): Clarified use of $< and $@
1285         in first example.
1286         (Implicit: Last Resort): Don't say the .DEFAULT example creates files
1287         "silently".  It's automatic, but not silent.
1288         (Implicit: Search Algorithm): Fixed confusing ungrammatical sentence
1289         for item 5.1.
1290         (Archives: Archive Update): Added missing `next' pointer.
1291         (Archives: Archive Symbols): Note that GNU `ar' deals with this
1292         automatically.
1294         * job.c (search_path): New fn, to search for an executable file in a
1295         search path (broken out of exec_command).
1296         (exec_command): Take fourth arg, the shell program to use (if
1297         necessary).  Use search_path for the program, and the shell program.
1298         Pass args "file args ..." to shell program (with no -c), where FILE is
1299         the full pathname of the program (script) to be run.
1300         (child_execute_job): Pass shell program to exec_command.
1301         * main.c (main): Ditto.
1303         * main.c (main): Don't write a message if exec_command returns, because
1304         it will never return.
1306 Fri Dec 22 16:19:58 1989  Roland McGrath  (mcgrath at hecuba.Berkeley.EDU)
1308         * default.c (default_variables: "LINK.cc"): Use $(C++FLAGS) instead of
1309         $(CFLAGS).
1311 Wed Dec 20 09:58:48 1989  Roland McGrath  (mcgrath at hecuba.Berkeley.EDU)
1313         * job.c (new_job): If start_job set the child's `command_state' to
1314         `cs_finished', call notice_finished_file.
1316 Sun Dec 17 19:45:41 1989  Roland McGrath  (mcgrath at hecuba.Berkeley.EDU)
1318         * Version 3.57.3.
1320 Wed Dec 13 17:57:12 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1322         * rule.c (convert_to_pattern): Accept files with dependencies as
1323         suffix rules.
1325 Thu Nov 30 15:47:13 1989  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
1327         * Version 3.57.2.
1329         * function.c (expand_function: `shell'): Don't clobber BUFFER and then
1330         try to free it.
1332         * remake.c (update_file_1): Took code to force remake of nonexistent
1333         deps out of #if 0, and changed the test to nonexistent non-intermediate
1334         deps.  In version 4, I think removing this test completely will
1335         implement the new feature that if a: b and b: c and c is newer than a,
1336         b need not be remade.
1338 Sun Nov 26 16:12:41 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1340         * compatMakefile (load.o, remote.o): Use $*.c instead of explicit file
1341         names so that using VPATH works.
1343 Tue Nov 21 14:57:18 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1345         * Version 3.57.1.
1347 Fri Nov 10 03:28:40 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1349         * remake.c (check_dep): Set *MUST_MAKE_PTR if FILE does not exist after
1350         being updated.  (The exact opposite test was here before; why???)
1351         (update_file_1): Set a dep's `changed' member after updating it if it
1352         is phony and has commands (because they will then always be executed).
1354 Thu Nov  9 13:47:12 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1356         * load.c [UMAX]: #ifdef UMAX_43 include different headers for the
1357         `inq_stats' call.
1358         * compatMakefile (LOAD_AVG): Document UMAX_43.
1360         * Version 3.57.0.
1362         * commands.c (chop_commands): New function to chop commands into lines.
1363         * job.c (new_job): Break that code out, and call chop_commands.
1364         * remake.c (remake_file): Call chop_commands before looking at
1365         FILE->cmds->any_recurse.
1367         * make.texinfo (Running: Goals): Don't say that the default target
1368         won't be taken from an included makefile.
1370         * remake.c (update_file_1): #if 0 out setting MUST_MAKE if a dep
1371         doesn't exist.
1373 Fri Nov  3 15:53:03 1989  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
1375         * Version 3.57.
1377         * variable.c (try_variable_definition): Don't calculate useless value.
1379         * main.c (define_makeflags): Fixed -j propagation.
1381         * commands.c (execute_file_commands): Removed unused variable.
1383 Sun Oct 29 11:11:15 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1385         * commands.c (execute_file_commands): If the commands are empty, call
1386         notice_finished_file before returning.
1388 Sat Oct 28 23:06:32 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1390         * remake.c (update_file_1): Don't always update a target that has no
1391         deps.  Only do this for double-colon targets.
1393 Wed Oct 25 16:36:16 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1395         * main.c (main) [hpux]: hpux == HPUX.
1396         * compatMakefile (defines): Document that HPUX should be defined.
1398 Tue Oct 24 19:19:48 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1400         * Version 3.56.8.
1402         * job.c (exec_command): Fixed what mode bits are checked.
1404         * remake.c (update_file_1): "No cmds and no deps actually changed"
1405         loses if ! FILE->is_target.
1407         * make.texinfo (Variables: Setting): Don't say that spaces after a
1408         variable definition are ignored (since they aren't).
1410 Mon Oct 23 14:34:23 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1412         * Version 3.56.7.
1414         * remake.c (update_file_1): If, after being updated, any dependency
1415         does not exist, remake the target.
1417         * remake.c (update_file_1): Always update if FILE has commands but no
1418         deps.
1420         * commands.c (execute_file_commands): If we return early because there
1421         are no commands, set FILE->updated.
1423 Thu Oct 19 18:47:37 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1425         * arscan.c (ar_scan) [M_XENIX]: Don't run atoi or atol on the
1426         `struct ar_hdr' members that are int or long int on Xenix.
1428 Sat Oct 14 10:43:03 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1430         * arscan.c (ar_scan): Cosmetic clean ups.
1431         (ar_name_equal): New function to compare names, handling truncated
1432         member names and special `.o' truncation.
1433         (ar_member_pos): Use ar_name_equal.
1434         * ar.c (ar_member_date_1): Use ar_name_equal.
1436         * Version 3.56.6.
1438         * file.h (struct file): Made `update_status' a `short int', and moved
1439         it before `command_state' so the bitfields can be packed better.
1441         * remake.c (files_remade): Made global.
1442         (notice_finished_file): Don't increment files_remade.
1443         * job.c (new_job): Do.
1445         * job.c (start_job): Don't return a value.  Always set
1446         CHILD->file->command_state to either cs_running or cs_finished.
1447         (new_job, child_handler): Don't expect start_job to return a value.
1448         Instead, look at the file's command_state.
1450         * commands.c (chop_commands): Merged into job.c (new_job).
1451         * commands.h: Don't declare chop_commands.
1453         * job.c (start_job): Made static.
1454         (new_job): New function to create a `struct child' and call start_job.
1455         (free_child): New function to free a `struct child'.
1456         (child_handler, new_job): Call it.
1457         * job.h: Don't declare start_job.  Do declare new_job.
1458         * commands.c (execute_file_commands): Call new_job.
1460         * commands.c (execute_file_commands): Don't set FILE->update_status if
1461         start_job fails.
1463         * function.c (expand_function): Don't use `reading_filename' and
1464         `reading_lineno_ptr' if they're nil.
1466 Fri Oct 13 18:16:00 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1468         * read.c (find_semicolon): New function to look for an unquoted ; not
1469         preceded by an unquoted # in a string.
1470         (read_makefile): Call it before expanding the line.  If it finds a ;,
1471         cut the line short there before expanding it.  If not, call it again
1472         after expanding.
1474         * commands.c (execute_file_commands): Don't check FILE->command_state.
1475         We won't get called unless it's cs_not_started.
1477         * read.c (read_makefile): Call collapse_line on the variable-expanded
1478         rule line after checking for ; and #.
1480         * job.c (start_job): When there are no more commands, always return 0.
1481         * commands.c (execute_file_commands): Don't put the new child in the
1482         `children' chain unless FILE->command_state is cs_running.
1484         * read.c (read_makefile): Rewrote ;-handling to only do it once (why
1485         did I do it twice??) and to check for a # before the ;.
1487         * job.c (start_job): Set CHILD->file->update_status to 0 when we run
1488         out of commands.  Set it to 1 before returning failure.
1489         (child_handler): Don't set C->file->update_status to 0 when start_job
1490         returns success and commands are not running.
1492         * read.c (read_makefile): If there is a # before the ; for commands,
1493         forget the ; and commands.
1495 Thu Oct 12 15:48:16 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1497         * job.c (child_execute_job): Pass -c to the shell.
1499 Wed Oct 11 18:41:10 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1501         * Version 3.56.5.
1503         * main.c (define_makeflags): Cleaned up to keep better track of dashes
1504         written, etc.
1506         * function.c (expand_function: `shell'): When converting newlines to
1507         spaces in output, search with `index' calls rather than a simple loop.
1509         * main.c (main): Make sure stdout is line-buffered.
1511         * main.c (decode_switches): Always check for missing switch arg.
1513 Mon Oct  9 17:17:23 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1515         * Version 3.56.4.
1517 Sat Oct  7 00:32:25 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1519         * commands.c (set_file_variables): #ifdef NO_ARCHIVES, still set $@ and
1520         $%.
1522         * commands.c (set_file_variables): Include a trailing slash in the
1523         directory variables (@D, etc.).
1525         * job.c (child_handler): Call notice_finished_file after changing a
1526         child's state to `cs_finished'.
1527         * remake.c (update_file_1): Don't call notice_finished_file if
1528         FILE->command_state == cs_finished.
1530 Wed Oct  4 16:09:33 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1532         * Version 3.56.3.
1534 Tue Oct  3 21:09:51 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1536         * read.c (read_all_makefiles): When setting elements of MAKEFILES from
1537         the contents of read_makefiles, make sure we're using the right
1538         element.
1540         * dir.c, glob.c [USGr3 || DIRENT]: Don't define d_ino as d_fileno.
1542         * Version 3.56.2.
1544         * remake.c (update_file_1): Return zero after calling remake_file if
1545         FILE->command_state != cs_finished.  Test update_status thoroughly.
1547         * commands.c (execute_file_commands): Don't call notice_finished_file.
1549         * remake.c (remake_file): Return immediately after calling
1550         execute_file_commands.
1552 Sat Sep 30 14:57:05 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1554         * Version 3.56.1 (alpha).
1556         * file.h (struct file): Made `update_status' not be a bitfield, since
1557         some broken compilers don't handle it right.
1559         * function.c (expand_function: `join'): Don't clobber the pointers and
1560         then try to free them.
1562         * job.c (exec_command): Fixed & vs = precedence problem.
1564 Thu Sep 28 17:29:56 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1566         * remake.c (update_file_1): Fixed typo in debugging output.
1568         * remake.c (library_file_mtime): Search for /usr/local/lib/libLIB.a
1569         after /usr/lib/libLIB.a.
1571 Tue Sep 26 16:07:58 1989  Roland McGrath  (mcgrath at helen.Berkeley.EDU)
1573         * read.c (conditional_line): For `ifeq (a, b)', swallow space after the
1574         comma.
1576 Sun Sep 24 13:25:32 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1578         * function.c (patsubst_function): If BY_WORD and the match is not a
1579         full word, update the text pointer correctly.
1581         * function.c (expand_function: `word'): Don't lose track of the second
1582         arg's expansion and free something else instead.
1584 Fri Sep 22 16:15:29 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1586         * Version 3.56.
1588 Thu Sep 21 14:28:42 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1590         * main.c (main): Make an array of the mtimes of the makefiles before
1591         updating them, and compare their file_mtimes against this later.  Don't
1592         re-exec if a makefile was successfully updated but didn't change.  If a
1593         makefile failed to be remade and no longer exists, die.  If a makefile
1594         failed to be remade, but changed anyway, re-exec.  If a makefile failed
1595         to be remade, but is unchanged, continue on.
1597 Wed Sep 20 18:02:07 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1599         * Version 3.55.6.
1601         * implicit.c (pattern_search): Maintain an array CHECK_LASTSLASH of the
1602         CHECK_LASTSLASH flag values used to match each member of TRYRULES.
1603         When making FILE->stem, if CHECKED_LASTSLASH[FOUNDRULE], prepend the
1604         part of FILENAME before LASTSLASH.
1606 Tue Sep 19 17:44:08 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1608         * dir.c (dir_file_exists_p): Check for FILENAME being nil before
1609         checking for it being "".
1611         * main.c (define_makeflags): Fixed test for whether a flag/flag_off
1612         option was non-default.  Also changed to generate a string that Unix
1613         Make will grok (except for FP/int values and new flags).
1615         * job.c (child_execute_job): Don't use the shell's -c option.
1616         Also fixed an off-by-one bug in the ARGV -> shell arg list copying.
1618 Mon Sep 18 15:17:31 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1620         * Version 3.55.5.
1622         * read.c (parse_file_seq): Check the beginning of the file name for a
1623         `./', not the two chars after the end of the name (Q rather than P).
1625         * job.c (child_execute_job): Include all of ARGV in the arg list for
1626         the shell.
1628         * main.c (define_makeflags): Don't include floating and positive_int
1629         options in !PF.
1631         * job.c (exec_command): Set the effective gid to the real gid before
1632         execing.
1634         * job.c (child_execute_job): Don't clobber the arg list when execing
1635         the shell.
1637 Sun Sep 17 15:27:19 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1639         * main.c (define_makeflags): Moved all the checking inside the switch.
1641         * load.c [LDAV_BASED] (load_average): When we can't get the load
1642         average, return zero instead of running off the end.
1644         * file.c: Include variables.h.
1645         * job.c: Declare dup2 and {block,unblock}_remote_children.
1646         * file.h: Declare f_mtime.
1647         * job.c: Don't declare construct_command_argv, since job.h does.
1648         * function.c, main.c, load.c, remake.c: Include job.h.
1649         * load.c [LDAV_BASED] (load_average): Declare nlist.
1650         * variable.h: Declare print_file_variables.
1651         * job.c [!USG]: Don't declare sigsetmask.
1652         [!USG]: Declare getdtablesize.
1653         Don't declare load_average.  Do declare wait_to_start_job.
1654         Declare vfork, gete[gu]id, execve.
1655         * commands.c: Declare remote_kill, getpid.
1656         * make.h: Declare kill, exit, sigblock, pipe, close, ctime, open,
1657         lseek, read.
1658         * make.h [not USG]: Declare sigsetmask.
1659         * job.h: Declare wait_for_children and {block,unblock}_children.
1661         * dir.c (dir_file_exists_p): If FILENAME is nil, read in the whole
1662         directory.
1663         (find_directory): When we want to read in the whole directory, call
1664         dir_file_exists_p with nil instead of "".
1666         * file.h (struct file), job.h (struct child),
1667           variable.h (struct variable): Use bitfields for flags.
1668         * make.h (ENUM_BITFIELD): If GCC or #ifdef ENUM_BITFIELDS, define as
1669         :BITS, else empty.
1670         * compatMakefile (defines): Document ENUM_BITFIELDS.
1672 Sat Sep 16 12:38:58 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1674         * Version 3.55.4 (alpha).
1676         * GNUmakefile (dist): Depend on default and doc.
1678         * load.c [LDAV_BASED]: Include <nlist.h> rather than <a.out.h>; #ifdef
1679         NLIST_NAME_UNION, use n_un.n_name instead of n_name.
1680         * compatMakefile (LOAD_AVG): Document NLIST_NAME_UNION.
1682         * job.c [USG-ish]: Don't redefine WIF{SIGNALED,EXITED} if they're
1683         already defined.
1685 Fri Sep 15 13:59:42 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1687         * glob.c, dir.c [USGr3 or DIRENT]: If neither d_ino, nor d_fileno is
1688         defined, define d_ino as d_fileno.
1690 Thu Sep 14 18:29:38 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1692         * job.c: Don't declare exec_command static.
1694         * make.texinfo (Name Index): Changed title to include directives.
1696         * Version 3.55.3 (alpha).
1698         * make.texinfo (Running: Options): Document -e.
1700         * main.c (main): Always give imported environment variables origin
1701         `o_env'.
1702         * variable.c (define_variable_in_set): Under -e, if ORIGIN, or an
1703         existing variable's origin, is `o_env', make it `o_env_override'.
1705         * load.c: Use the symbol KERNEL_FILE_NAME instead of KERNEL_FILE.
1706         * compatMakefile: Changed the comment for `LOAD_AVG' accordinly.
1708 Thu Sep  7 16:46:26 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1710         * Version 3.55.2 (alpha).
1712         * variable.c (print_variable_set), rule.c (print_rule_data_base),
1713         file.c (print_file_data_base): If NO_FLOAT is defined, don't use
1714         floating-point for printing statistics.
1715         * compatMakefile (defines): Document NO_FLOAT.
1717         * make.h (HASH): New macro to add the hashing value of one char to a
1718         variable.c.
1719         * file.c (lookup_file, enter_file, rename_file): Use it.
1720         * dir.c (find_directory, dir_file_exists_p, file_impossible_p): Ditto.
1721         * variable.c (define_variable_in_set, lookup_variable): Same here.
1723         * variable.c, file.c, dir.c: Don't define *_BUCKETS if they are already
1724         defined.
1726         * compatMakefile (defines): Added comment about defining NO_ARCHIVES.
1727         (ARCHIVES, ARCHIVES_SRC): New variables for {ar,arscan}.[oc].
1728         (objs, srcs): Use $(ARCHIVES) and $(ARCHIVES_SRC).
1729         * commands.c (set_file_variables), dir.c (file_exists_p),
1730         remake.c (touch_file, name_mtime), implicit.c (try_implicit_rule,
1731         pattern_search), make.h: If NO_ARCHIVES is #defined, don't do any
1732         archive stuff.
1734         * commands.c (set_file_variables): Don't kill the last char of
1735         directory names in $([@*<%?^]D).
1737 Wed Sep  6 15:23:11 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
1739         * default.c (default_terminal_rules {%:: %,v}, {%:: RCS/%,v}): Don't
1740         run co if the target exists.
1742         * glob.c (glob_match): [!xyz], rather than [^xyz], means none of [xyz].
1744         * glob.c: Misc minor cosmetic changes.
1746 Tue Sep  5 14:49:56 1989  Roland McGrath  (mcgrath at saffron.Berkeley.EDU)
1748         * load.c [LDAV_BASED] (load_average): Check for == -1, rather than < 0
1749         to see if lseek fails.  On some systems, `avenrun' is at an offset >
1750         (2**31)-1, and lseek succeeds, returning a negative value.
1752 Mon Sep  4 11:07:58 1989  Roland McGrath  (mcgrath at saffron.Berkeley.EDU)
1754         * rule.c (new_pattern_rule): Return `int' instead of `void': nonzero if
1755         the passed rule was used, zero if not.
1756         (install_pattern_rule): Pay attention to the return from
1757         new_pattern_rule, and don't set the rule's `terminal' flag or give it
1758         commands unless it's used.
1759         (create_pattern_rule): Same idea.
1761         * dir.c (find_directory): Removed unused variable.
1763         * commands.c (execute_file_commands): Removed unused variable.
1765         * read.c (record_files): Don't use NAME after freeing it.
1767 Sat Sep  2 00:33:19 1989  Roland McGrath  (mcgrath at saffron.Berkeley.EDU)
1769         * Version 3.55.1 (alpha).
1771         * function.c (string_glob): Don't add spaces after file names that
1772         aren't added.  (Also means don't add spaces without checking the size
1773         of the buffer.)
1775         * remake.c (update_goal_chain): Don't remove makefiles with cmds and no
1776         deps from the chain.
1777         * main.c (main): Do it here, before calling update_goal_chain.
1779         * remake.c (update_goal_chain): When updating fails, change STATUS even
1780         if MAKEFILES is set.  Also stop remaking when updating fails if not
1781         under -k and MAKEFILES is not set.
1783         * remake.c (remake_file, update_file_1, notice_finished_file),
1784         commands.c (execute_file_commands), make.h, commands.h: The functions
1785         remake_file, notice_finished_file, and execute_file_commands no longer
1786         return values, and their callers no longer expect values returned.
1788         * remake.c (notice_finished_file): Don't set FILE's modtime to now if
1789         it is a non-target with no commands.
1791 Fri Sep  1 00:04:39 1989  Roland McGrath  (mcgrath at saffron.Berkeley.EDU)
1793         * read.c (read_all_makefiles): After freeing each element on MAKEFILES,
1794         replace it with the name stored in read_makefiles by read_makefile.
1796         * remake.c (update_file_1): Don't decide not to remake if FILE has no
1797         cmds and no deps actually changed if FILE doesn't have any deps.
1799         * file.c (remove_intermediate): Remove precious files that also have
1800         the `dontcare' flag set.
1802         * remake.c (update_file_1): Don't always remake if FILE has cmds but no
1803         deps; only if FILE is double-colon.  (I don't know why this should be
1804         done for double-colon targets, but that's what Unix make does.)
1806         * load.c [LDAV_BASED] (load_average): Write error messages if the
1807         various system calls fail.  Keep track of if we've failed before.
1808         The first time we fail, write a message saying -l won't be enforced.
1809         The first time we succeed after having failed, write a message saying
1810         -l will be enforced again.
1812         * remake.c [USG]: Don't #include <sys/file.h>
1814         * load.c [generic Unix LDAV_BASED]: #include <fcntl.h> #ifdef USG,
1815         else <sys/file.h> instead.
1817         * job.c [USG && !USGr3 && !HAVE_DUP2]: Remove redundant
1818         #include <errno.h> and declaration of `errno'.
1819         [...] (dup2): Fixed so it won't always lose.
1821         * default.c (default_suffix_rules: .texinfo.dvi): Copy, rather than
1822         move, the aux and index files, so the TeX run can use them.
1824         * compatMakefile: Remove redundant comment.
1826         * load.c [generic Unix LDAV_BASED]: Include <a.out.h> instead of
1827         <nlist.h>, since the `struct nlist' declaration in <nlist.h> varies
1828         more than the one in <a.out.h>.
1829         (load_average): Use the `n_un.n_name' field of the `struct nlist',
1830         since the <a.out.h> declaration uses the union.
1832         * main.c (main): For the temporary files made for stdin makefiles, set
1833         the `intermediate' and `dontcare' flags.
1834         * file.c (remove_intermediates): Don't print any messages for files
1835         whose `dontcare' flag is set.  (The only files that will be
1836         intermediate and `dontcare' will be the temporary files made for stdin
1837         makefiles.)
1839         * job.c (exec_command): Made global.
1840         * job.h: Declare it.
1841         * main.c (main): Use exec_command when re-execing.
1843         * make.h: Declare environ.
1844         * make.c: Don't.
1846         * job.c (child_execute_job): New function to perform everything done in
1847         the child side of a fork (for a job or `shell' function).
1848         (start_job): Call it.
1849         * job.h: Declare construct_command_argv and child_execute_job.
1850         * function.c (expand_function: `shell'): Use child_execute_job.
1852 Thu Aug 31 18:42:51 1989  Roland McGrath  (mcgrath at saffron.Berkeley.EDU)
1854         * function.c (expand_function: `shell'): Remove a trailing newline
1855         instead of turning it into a space.
1857         * main.c (main): Do init_siglist #ifdef HAVE_SIGLIST.
1859         * job.c [WTERMSIG || (USG && !HAVE_SYS_WAIT)]: Test each W* macro
1860         separately and define all those that aren't defined.
1862 Sat Aug 26 15:13:21 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
1864         * ar.c (ar_name): Return zero for `(foo)'.
1866         * Version 3.55.
1868         * make.texinfo (Rules: Multiple Targets): Make this node's `next'
1869         pointer point to `Static Pattern'.
1870         * make.texinfo (Makefiles: MAKEFILES Variable): Make this node's `prev'
1871         pointer point to `Makefile Names'.
1873         * make.1: Renamed to make.man.
1874         * compatMakefile: Define `mandir' and `manext'.
1875         (install): Depend on $(mandir)/make.$(manext).
1876         ($(mandir)/make.$(manext)): Depend on make.man and copy it to $@.
1877         ($(bindir)/make): Use `make' rather than $<; so Unix make can grok it.
1879 Thu Aug 24 03:35:48 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
1881         * variable.c (target_environment): Allow variables that start with
1882         underscores.
1884 Wed Aug 23 22:50:32 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
1886         * variable.c (target_environment): Reject variables that don't start
1887         with letters.
1889 Tue Aug 22 04:14:29 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
1891         * GNUmakefile (make-$(version).tar.Z): Put make.1 (the Unix manual
1892         page) in the tar file.
1894         * variable.c (target_environment): Don't write variables with origin
1895         o_default (i.e., ones from default.c).
1896         * make.texinfo (Commands: Recursion: Variables/Recursion): Document
1897         that default variables are not put in the environment.
1899         * remake.c (update_file_1): Remake all targets with commands but no
1900         deps.
1902 Sat Aug 19 06:03:16 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
1904         * remake.c (update_file_1): In the final loop, set the deps'
1905         `changed' members if they are newer than FILE.
1907         * remake.c (update_goal_chain): Under -d, print a message if we decide
1908         not to remake a makefile so as to avoid a possible infinite loop.
1910 Fri Aug 18 20:30:14 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
1912         * remake.c (remake_file): Cleaned up.
1914         * commands.c (execute_file_commands): If the commands are empty, set
1915         FILE->update_status to zero before returning.
1917         * remake.c (notice_finished_file): Set `last_mtime' fields to zero
1918         instead of calling name_mtime; file_mtime will do that later if anybody
1919         cares.
1921 Thu Aug 17 10:01:11 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
1923         * make.texinfo (Rules: Wildcards: Wildcard Examples): Give this node a
1924         `prev' pointer.
1926         * Version 3.54.9 (alpha).
1928         * make.texinfo: Fixed some @nodes.
1930         * remake.c (check_dep): Don't set *MUST_MAKE_PTR if FILE doesn't exist
1931         after running update_file.
1933         * remake.c (notice_finished_file): If FILE has no commands, pretend its
1934         modtime is now.
1936         * remake.c (update_file_1): In the loops that call update_file on the
1937         deps, compare modtimes before and after (unless deps are still being
1938         made) and set the deps' `changed' members.  Do not set the `changed'
1939         members in the loop that prints the newer/older debugging messages.
1940         * remake.c (update_file_1): If no deps changed and FILE has no
1941         commands, decide it doesn't need remaking.
1943         * remake.c (update_file_1): Print a debugging message if we take
1944         commands from default_file.
1946         * make.texinfo (Rules: Directory Search: Selective Search): Removed
1947         note about warning for `vpath' with a constant pathname, since it isn't
1948         warned about anymore.
1950         * remake.c (update_goal_chain): If MAKEFILES, remove makefiles which
1951         are targets and have no deps.
1952         * make.texinfo (Makefiles: Remaking Makefiles): Document that makefiles
1953         will not be remade if they are targets but have no dependencies.
1955 Tue Aug 15 00:00:08 1989  Roland McGrath  (roland at apple-gunkies.ai.mit.edu)
1957         * remake.c (notice_finished_file): Increment files_remade for non-phony
1958         files if they didn't exist before (even if they still don't).
1960         * job.c: Include <errno.h> and declare errno.
1962         * job.c (exec_command): If the execve fails with ENOEXEC (Exec format
1963         error), return instead of exiting the child process.
1965         * job.c (start_job): In the child side, if exec_command fails, try
1966         using the shell.
1968         * job.c (start_job): In the child side, call unblock_children instead
1969         of sigsetmask.
1971         * remake.c (notice_finished_file): Under -n or -q, always increment
1972         files_remade for non-phony files.
1974         * rule.c (intall_pattern_rule): Use find_percent.
1976         * vpath.c (vpath_search): Pass the `percent' members to
1977         pattern_matches.
1979 Mon Aug 14 23:30:24 1989  Roland McGrath  (roland at apple-gunkies.ai.mit.edu)
1981         * vpath.c (struct vpath): New member `percent', to hold a pointer into
1982         the pattern where the % is.
1983         (construct_vpath_list): Call find_percent on the pattern and set the
1984         new `percent' member.
1985         * read.c (read_makefile): Don't run find_percent on `vpath' directive
1986         patterns.
1988         * function.c (pattern_matches): Take new arg PERCENT, a pointer into
1989         PATTERN where the % is.  If PERCENT is nil, copy PATTERN into local
1990         space and run find_percent on it.
1991         (expand_function: `filter', `filter-out'): Pass new arg to
1992         pattern_matches.
1993         * read.c (record_files): Pass PATTERN_PERCENT to pattern_matches for
1994         static pattern rules.  Save the percent pointer into implicit rule
1995         targets, and pass them to create_pattern_rule.
1996         * rule.c (convert_to_pattern): Pass new arg to create_pattern_rule.
1997         (create_pattern_rule): Take new arg TARGET_PERCENTS, nil or an array of
1998         pointers into the corresponding elements of TARGETS, where the %s are.
2000 Sun Aug 13 00:29:19 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2002         * Version 3.54.8.
2004         * README.templatate, README-doc.template: New files, turned into README
2005         and README-doc to go into the two distribution tar files.
2006         * GNUmakefile: Added a rule to edit the version number in
2007         README.template and README-doc.template, producing README and
2008         README-doc.
2010         * remake.c (update_goal_chain): If -n or -q is in effect for a
2011         makefile, and it got updated, don't change STATUS, so we can still
2012         return -1 (meaning nothing was done).  This avoids an infinite loop on
2013         "make -n Makefile".
2015 Sat Aug 12 23:14:24 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2017         * remake.c (notice_finished_file): Treat -q the same as -n.
2019         * remake.c (update_goal_chain): Fixed handling of return from
2020         update_file.  If -n or -q is in effect, ignore it.
2022         * job.c (start_job): Don't test for -t.  We should never get called in
2023         that case.
2025 Fri Aug 11 04:09:14 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2027         * function.c (expand_function): Removed unused variables.
2028         (handle_function): Removed unused variable.
2030         * main.c (main): Removed unused variable.
2032 Wed Aug  9 09:37:10 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2034         * Version 3.54.7.
2036         * remake.c (notice_finished_file): If FILE's modtime actually changed,
2037         increment files_remade.
2038         (remake_file): Don't increment files_remade.
2040         * remake.c (update_file): Don't print "up to date" messages for
2041         phony files.
2043         * job.c (child_handler): Don't set C->file->update_status to 1 if
2044         start_job returns nonzero under -n or -t.
2046         * expand.c (variable_expand): Count parens in $(foo:a=b) refs.
2048         * main.c: Removed old declaration of `glob_tilde' (which hasn't existed
2049         for a few months).
2051 Tue Aug  8 23:53:43 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2053         * job.c (exec_command): Fixed to not ignore the last path component and
2054         to do the right thing with an empty path.
2056 Fri Aug  4 15:58:19 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2058         * remake.c (library_file_mtime): Look for libLIB.a, not /libLIB.a.
2059         Do VPATH search on libLIB.a, not /usr/lib/libLIB.a
2061 Thu Aug  3 20:42:00 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2063         * job.c [HAVE_SYS_WAIT or not USG]: If WIFSIGNALED is not defined by
2064         <sys/wait.h>, define it as (WTERMSIG != 0).
2066 Tue Aug  1 19:25:34 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2068         * remake.c (remake_file): If FILE has no commands and is a target,
2069         don't set its time to now.  The time gets reset by notice_finished_file
2070         anyway, and it isn't needed since check_dep checks for nonexistence.
2072         * Version 3.54.6.
2074         * read.c (read_makefile): Don't read off the end of the string after an
2075         `include'.
2077         * job.c (exec_command): New function to search the path for a file and
2078         execute it.
2079         (start_job): Use exec_command rather than execvp.
2081         * read.c (read_makefile): Expand `include' directive args before
2082         parsing them.  Allow trailing whitespace after filename.
2084         * variable.c (target_environment): Put makelevel + 1, rather than
2085         makelevel, in the `MAKELEVEL' envariable.
2087 Sat Jul 29 10:27:04 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2089         * remake.c (notice_finished_file): Don't get the new modtime of phony
2090         files.
2092         * remake.c (remake_file): Run commands instead of touching under -t if
2093         FILE->cmds->any_recurse is set.
2095         * commands.h (struct commands): Add new member `any_recurse', to be set
2096         nonzero if any `lines_recurse' element is nonzero.
2097         * commands.c (chop_commands): Set the `any_recurse' member.
2099         * commands.c (execute_file_commands): Split chopping of commands into
2100         lines into new function chop_commands.
2101         * commands.h: Declare chop_commands.
2103         * read.c (read_makefile): Test for a line beginning with a tab after
2104         checking for conditional lines, but before all other checks.
2106 Fri Jul 28 18:10:29 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2108         * read.c (read_makefile): Match directives against collapsed line
2109         and use that for their args.
2111         * read.c (read_makefile): Warn about extra text after `include'.
2113 Tue Jul 25 14:34:25 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2115         * make.texinfo (Rules: Directory Search: Selective Search): Fixed
2116         example to use correct `vpath' syntax.
2118 Mon Jul 24 12:10:58 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2120         * Version 3.54.5.
2122         * job.c (start_job): In the child side, unblock SIGCHLD.
2124 Fri Jul 21 18:25:59 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2126         * make.h: Don't include <sys/types.h> #ifdef sun.
2128 Mon Jul 17 14:29:10 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2130         * implicit.c (pattern_search): If ar_name (FILENAME), don't check for
2131         directory names.
2133         * job.c (wait_for_children): Changed "waiting for children" message to
2134         "waiting for unfinished jobs".
2136 Fri Jul 14 13:17:13 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2138         * load.c (load_average): Use an unsigned offset into kmem.
2140 Thu Jul 13 18:44:49 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2142         * variable.c (pop_variable_scope): Don't free the head of the chain of
2143         variables in each bucket twice.
2145 Tue Jul 11 06:45:24 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2147         * GNUmakefile: Include COPYING in the doc tar file.
2149         * variable.c, read.c, misc.c, job.c, function.c: Replace some identical
2150         "for" loops with next_token or end_of_token calls.
2152 Mon Jul 10 16:55:08 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2154         * Version 3.54.4.
2156         * compatMakefile: Documented new conditionals.
2158         * job.c: Don't define sys_siglist if HAVE_SIGLIST is defined.
2159         Don't define dup2 if HAVE_DUP2 is defined.
2161         * job.c (child_handler): Interpret the return from start_job correctly.
2163         * remake.c (update_file_1): Don't write "target not remade because of
2164         errors" message under -n or -q.
2166         * read.c: Declare getpwnam.
2168         * glob.c: Use <dirent.h> if DIRENT is defined.
2169         [USG]: Don't declare memcpy, since <memory.h> does.
2171 Fri Jul  7 20:53:13 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2173         * misc.c (collapse_line): Copy the line over in the right place.
2175 Fri Jul  7 18:33:24 1989  Roland McGrath    (fsf at void.ai.mit.edu)
2177         * remake.c: Conditionalize inclusion of <sys/file.h> on not
2178         USG, since HP-UX defines a `struct file' there.
2180 Fri Jul  7 12:11:30 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2182         * job.c: If WTERMSIG is defined by <sys/wait.h>, define WAIT_T as int,
2183         and don't define other macros; this covers HP-UX.
2184         If WTERMSIG is not defined, use int or union wait based on USG and
2185         HAVE_SYS_WAIT; this covers BSD and SysV.
2187         * Version 3.54.3 (alpha).
2189         * job.c [USG and not USGr3]: Include <errno.h> and declare errno.
2191         * job.c (unblock_children [USG]): Declare child_handler.
2193         * job.c: Renamed WRETCODE to WEXITSTATUS.
2194         [HAVE_SYS_WAIT or not USG]: Undefine WTERMSIG, WCOREDUMP, and
2195         WEXITSTATUS before defining them.  The HP-UX <sys/wait.h> defines them.
2197         * main.c (main): If there are no goals, fatal AFTER printing the data
2198         base under -p.
2200 Thu Jul  6 22:43:33 1989  Roland McGrath  (roland at apple-gunkies.ai.mit.edu)
2202         * glob.c [USG]: #define rindex as strrchr.
2204         * job.c [USG]: Include <sys/param.h> and #define getdtablesize() as
2205         NOFILE.
2207 Wed Jul  5 09:36:00 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2209         * Version 3.54.2 (alpha).
2211         * expand.c (variable_expand): When expanding recursive variable
2212         references (${${a}}), use the correct delimiters in the constructed
2213         variable reference.
2215 Mon Jul  3 18:29:26 1989  Roland McGrath  (roland at apple-gunkies.ai.mit.edu)
2217         * compatMakefile: Clear out and redefine the .SUFFIXES list because
2218         silly Sun 4 make defines .cps.h.
2220         * compatMakefile: Fix comment about -DNO_MINUS_C_MINUS_O.
2222         * remake.c: Include <sys/file.h> for O_* on 4.2.
2224         * commands.c: Define sigmask if it's not defined.
2226 Fri Jun 30 07:33:08 1989  Roland McGrath  (roland at apple-gunkies.ai.mit.edu)
2228         * remake.c (remake_file): Don't always increment files_remade.
2230         * variable.c (push_new_variable_scope): Zero the new variable hash
2231         table.
2233 Thu Jun 29 17:14:32 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2235         * expand.c (variable_expand): When terminating the variable expansion
2236         buffer, use variable_buffer_output instead of a simply zero store,
2237         because the buffer may need to be enlarged.
2239 Wed Jun 28 16:53:47 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2241         * Version 3.54.
2243         * default.c (default_suffixes): Added `.ln'.
2244         (default_suffix_rules): Changed lint rules to use -C.
2246 Thu Jun 22 20:49:35 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2248         * job.c (start_job): Set `environ' to CHILD->environment before execing
2249         in the child process!
2251 Tue Jun 20 17:23:13 1989  Roland McGrath  (roland at spiff.ai.mit.edu)
2253         * compatMakefile: Put job.h and rule.h in `srcs'.
2255         * Version 3.53.
2257 Mon Jun 19 16:25:18 1989  Roland McGrath  (roland at spiff.ai.mit.edu)
2259         * job.c (start_job): If there are no more commands, return nonzero
2260         under -n or -t.
2262         * compatMakefile (make): Pass `-f' to mv.
2264         * GNUmakefile: If `ARCH' or `machine' is defined, make $(ARCH)/*.o and
2265         $(ARCH)/make instead of *.o and make.
2267         * function.c (string_glob): Don't try to use freed storage!
2269         * read.c (readline): If there is only one byte of space in the buffer,
2270         enlarge the buffer before reading more.
2272         * arscan.c [M_XENIX]: Miscellaneous minor changes for Xenix.
2274 Sun Jun 18 13:07:45 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2276         * GNUmakefile (depend): Split commands into two lines so they won't be
2277         so long when variable-expanded.
2279         * compatMakefile: Documented MINUS_C_MINUS_O meaning.  The line
2280         describing it got removed when the USG/wait stuff was documented.
2282 Sat Jun 17 22:56:54 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
2284         * Version 3.52.
2286 Mon Jun 12 17:45:11 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2288         * remake.c (check_dep): Drop circular dependencies instead of fataling.
2289         (update_file_1 already does this.)
2291         * default.c (default_suffix_rules): For .s -> .o, put the -o flag to
2292         the assembler before the source file name.
2294 Sun Jun 11 12:00:52 1989  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
2296         * Version 3.51.
2298         * make.texinfo (Features): Noted 1003.2 requirement of `+' meaning.
2300         * file.c (remove_intermediates): If !SIG, write a single "rm" command
2301         line, listing all files.
2303         * read.c (read_makefile): Don't free the storage for the passed
2304         filename, since it might not be malloc'd.  When doing an included
2305         makefile, free the name's storage.
2306         (read_all_makefiles): Use variable_expand to find the value of
2307         `MAKEFILES'.  Free the storage for the names of -f makefiles.
2308         (read_makefile): Allocate storage for the makefile name in the
2309         `struct file' in read_makefiles.
2311         * make.texinfo (Running: Instead of Execution): Document the effect of
2312         + and $(MAKE)/${MAKE}.
2314         * make.texinfo (Functions: Foreach Function): Document that if the
2315         iteration variable was undefined before the `foreach' call, it will be
2316         undefined after the call.
2318         * commands.c: Split into commands.c, job.h, and job.c.
2320         * rule.c (try_implicit_rule, pattern_search): Moved to new file
2321         implicit.c.
2323         * rule.c: Split into rule.h, rule.c, and default.c.
2324         * default.c (install_default_pattern_rules): Renamed to
2325         install_default_implicit_rules.
2326         * make.h, main.c (main): Renamed uses.
2328         * make.c: Renamed to misc.c.
2330         * make.c (main, log_working_directory, decode_switches,
2331         decode_env_switches, define_makeflags, die, print_version,
2332         print_data_base): Moved to new file main.c.
2334         * commands.c (execute_file_commands): Don't collapse backslash-newlines
2335         here.  When chopping the commands up into lines, don't chop at
2336         backslash-newlines.
2337         (start_job): Collapse backslash-newlines after printing the line.
2339         * commands.c (start_job): Don't collapse backslash-newlines here.
2340         (execute_file_commands): Collapse backslash-newlines before chopping
2341         the commands up into lines.
2343         * commands.c (set_file_variables): Initialize the length counters for
2344         $^ and $? to zero!
2346         * commands.c (start_job): Use vfork instead of fork.  Someone else says
2347         the child and parent DO have separate file descriptors.
2349         * variable.c: Split internals into variable.c, function expansion into
2350         function.c, and variable expansion into expand.c.
2351         * function.c (handle_function): New function to check for a function
2352         invocation and expand it.
2353         * expand.c (variable_expand): Use handle_function.
2354         * variable.c (push_new_variable_scope): New function to push a new
2355         empty variable set onto the current setlist.
2356         (pop_variable_scope): New function to pop the topmost set from the
2357         current setlist and free its storage.
2358         * function.c (expand_function: `foreach'): Push a new variable scope
2359         for the iteration variable and pop the scope when finished.
2360         * variable.h: Declare new functions.
2361         * variable.c (initialize_variable_output): New function to return a
2362         pointer to the beginning of the output buffer.
2363         (save_variable_output): New function to save the variable output state.
2364         (restore_variable_output): New function to restore it.
2365         * expand.c (variable_expand): Use initialize_variable_output.
2366         (allocated_variable_expand): Use {save,restore}_variable_output.
2367         * variable.c (current_setlist): Renamed to current_variable_set_list
2368         and made global.
2370 Sat Jun 10 00:11:25 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2372         * remake.c (library_file_mtime): Check for libNAME.a in the current
2373         directory before doing VPATH search.
2375         * variable.c (print_variable_set): Don't write "# Variables", and write
2376         fewer blank lines.
2377         (print_variable_data_base): Precede the variables with "# Variables".
2379         * make.c (main): Print the data base under -p after doing everything
2380         else, just before exitting.  This way it gets info determined in
2381         updating the goal targets.
2383         * variable.c (print_variable_data_base): Split into print_variable,
2384         which prints one variable, and print_variable_set, which prints a set.
2385         Replaced with a call to print_variable_set for the global set.
2386         (print_file_variables): New function to print a given file's local
2387         variables.
2389         * file.c (print_file_data_base): Call print_file_variables to print
2390         each file's local variables.
2392         * commands.c (set_file_variables): Actually define the values for
2393         the $^ and $? variables!!!
2395         * make.texinfo (Implicit: Pattern Rules: Automatic): Document new D and
2396         F versions of $^ and $?.
2398         * commands.c (start_job): In the child fork, use getdtablesize and a
2399         loop to close all file descriptors other than 0, 1, and 2.  We need to
2400         do this since not only the bad stdin pipe, but also some directories,
2401         may be open.
2403         * commands.c (start_job): Use fork instead of vfork, because a vfork
2404         parent and child share file descriptors, and our child needs to diddle
2405         with stdin.
2407         * variable.c (initialize_file_variables): When created a new variable
2408         set, zero out the hash table.
2410         * variable.c (target_environment): Don't use variables whose names are
2411         not made up of alphanumerics and underscores.
2413         * remake.c (update_file_1): Set the `parent' member of each dependency
2414         to FILE before updating it.
2416         * file.h (struct file): Add `parent' member.
2418         * variable.c (initialize_file_variables): Don't take second arg PARENT.
2419         Use FILE->parent instead.  If FILE->parent->variables is nil, recurse
2420         to initialize it.
2422         * variable.h: Declare {allocated_}variable_expand_for_file.
2424         * variable.c (allocated_variable_expand): Now
2425         allocated_variable_expand_for_file, calling variable_expand_for_file,
2426         and taking second arg FILE.
2427         (allocated_variable_expand): New function, a wrapper around
2428         allocated_variable_expand_for_file, passing a nil second arg.
2430 Fri Jun  9 12:11:45 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2432         * commands.c (start_job): On the child side of the fork, always close
2433         the bad stdin file descriptor.
2435         * commands.c (struct child): New member `environment', to hold the
2436         environment for the child.
2437         (execute_file_commands): Set the new childs `environment' member to nil
2438         before calling start_job.
2439         (start_job): Set up CHILD->environment before running the commands if
2440         it is nil.
2442         * make.c (main): Don't call new_environ.  `shell' functions will now be
2443         run with the environment make was called with.
2445         * commands.c (child_handler): Don't check C->command_ptr before calling
2446         start_job since we now have to check C->file->cmds->command_lines and
2447         it's easier to let start_job handle all that.
2449         * commands.c (struct child): New member `command_line', to hold an
2450         index into file->cmds->command_lines.
2451         (execute_file_commands): Set the new child's `command_line' to 0 and
2452         its `commands' and `commands_ptr' to nil.
2453         (start_job): When CHILD->command_ptr runs out, increment
2454         CHILD->command_line and run the corresponding line from
2455         CHILD->file->cmds->command_lines.  Run it even under -t, -q, or -n if
2456         the CHILD->file->cmds->lines_recurse element for that line is set.
2458         * commands.c (execute_file_commands): Chop CMDS up into lines, setting
2459         its `command_lines' and `lines_recurse' members, if it wasn't already
2460         chopped.
2462         * commands.h (struct commands): New members `command_lines' and
2463         `lines_recurse'.  The first is an array of chopped-up lines; the second
2464         is an array of flags, each nonzero if the corresponding line is
2465         recursive.
2467         * variable.c (variable_expand_for_file): If FILE is nil, just do a
2468         vanilla variable_expand.
2469         (expand_function: `shell'): Pass second arg (as nil) to
2470         construct_command_argv.
2472         * commands.c (construct_command_argv): Use variable_expand_for_file on
2473         `$(SHELL)' and `$(IFS)' instead of lookup_variable to check those
2474         variables.  This handles file-local and recursive values correctly.
2475         To support this, take an additional argument FILE.
2477         * variable.c (initialize_file_variables): New function to initialize
2478         FILE's variable set list from PARENT's setlist.  PARENT is the
2479         immediate dependent that caused FILE to be remade, or nil if FILE is a
2480         goal.  (When user-level per-file variables are implemented, PARENT
2481         should be passed as nil when defining per-file variables.)
2483         * variable.c (variable_expand_for_file): New function to expand a line
2484         using the variable set of a given file, and reporting error messages
2485         for the file and line number of that file's commands.
2487         * variable.h: Don't declare lookup_variable_for_file.
2489         * variable.c (lookup_variable_*): Turned back into lookup_variable.  It
2490         now uses current_setlist.
2491         (global_setlist): New static `struct variable_set_list', a setlist
2492         containing global_variable_set.
2493         (current_setlist): New static `struct variable_set_list *', a pointer
2494         to the current variable set list.
2495         (define_variable): Define in the current top-level set, not the global
2496         set.
2498         * commands.c (set_file_variables): New function to set up the automatic
2499         variables for a file in its own variable set.
2500         (execute_file_commands): Use set_file_variables.
2502         * variable.c (new_environ): Replaced with target_environment, taking an
2503         argument FILE, and returning an environment for FILE's commands.
2505         * variable.c, variable.h: Remove all global special variable pointers.
2507         * variable.c (define_variable_for_file): New function like
2508         define_variable, but takes additional arg FILE, and defines the
2509         variable in the variable set at the top of FILE's chain.
2510         (lookup_variable_for_file): New function like lookup_variable, but
2511         takes additional arg FILE, and looks the variable up in all of FILE's
2512         variable sets.
2514         * file.h (struct file): New member `variables', a `struct
2515         variable_set_list' containing the list of variable sets used in the
2516         expansion of the file's commands.
2518         * variable.c (variables): Replaced with static `struct variable_set'
2519         global_variable_set.
2520         (define_variable): Now define_variable_in_set, taking additional
2521         argument SET, the `struct variable_set' to define it in.
2522         (define_variable): Use define_variable_in_set with global_variable_set.
2523         (lookup_variable): Now lookup_variable_in_set, taking additional
2524         argument SET, the `struct variable_set' to look it up in.
2525         (lookup_variable): Use lookup_variable_in_set with global_variable_set.
2526         (lookup_variable_in_setlist): New function to look up a variable in a
2527         `struct variable_set_list' using lookup_variable_in_set.
2529         * variable.h (struct variable_set): New structure, containing a hash
2530         table and the number of hash buckets.
2531         (struct variable_set_list): New structure, containing a link for a
2532         linked-list, and a `struct variable_set'.
2534         * commands.c (start_job): Under -n, return what the recursive start_job
2535         call returns, since it might actually start a child.
2537         * make.texinfo (Rules: Wildcards): Document ~ and ~USER expansion.
2539         * commands.c (execute_file_commands): If start_job returns
2540         failure, but -t is set, set FILE->update_status to success.
2541         (start_job): If -t is set, and the commands are not recursive, return
2542         failure (is is done for -q).
2544         * remake.c (touch_file): New function to touch FILE.
2545         (remake_file): Use touch_file.  When touching a file, still do
2546         execute_file_commands.
2548         * remake.c (remake_file): Don't check question_flag (-q), since we
2549         can't know here if the commands are recursive.
2551         * commands.c (start_job): Don't use the `recursive' member of
2552         CHILD->file->cmds.  Instead, check for leading +s and $(MAKE) or
2553         ${MAKE} in the command line here.
2555         * commands.h (struct commands): Remove `recursive' member.
2557         * rule.c (install_default_pattern_rules): Remove use of `recursive'
2558         member.
2560         * read.c (record_files): Don't check commands from $(MAKE) and set
2561         their `recursive' member.
2563         * commands.c (fatal_error_signal): Treat SIGQUIT like SIGINT, SIGHUP,
2564         and SIGTERM, but don't send it to ourselves because it will cause a
2565         core dump.
2567 Thu Jun  8 20:30:04 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2569         * Version 3.50.
2571         * variable.c (variable_expand): Use allocated_variable_expand instead
2572         of expand_argument in a few places.
2574         * variable.c (allocated_variable_expand): Do static variable shuffling
2575         here instead of using expand_argument.
2576         (expand_argument): Use allocated_variable_expand.
2578         * variable.c (recursively_expand): New function to recursively expand
2579         its argument (a `struct variable'), returning the malloc'd value.
2580         (variable_expand): Use recursively_expand.
2582 Sun May 28 12:49:27 1989  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
2584         * make.c (main): Fixed buggy fix in deciding to increase space for
2585         command-line variable definitions.  (First it never did it, then it
2586         always did it; now it does it when necessary.)
2588 Sat May 27 14:01:54 1989  Roland McGrath  (mcgrath at hecuba.Berkeley.EDU)
2590         * make.c (main): Fixed bug in deciding to increase space for
2591         command-line variable definitions.
2593 Fri May 26 15:48:01 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2595         * read.c (multi_glob): Use allocated_expand_variable for checking
2596         `HOME' variable for ~ expansion, since this may be called from inside a
2597         `wildcard' function expansion.
2599         * variable.h: Declare allocated_expand_variable.
2601         * variable.c (allocated_expand_variable): New function to do variable
2602         expansion in an allocated buffer, rather than the static one.
2604         * make.c (main): Don't set glob_tilde (it no longer exists).
2606         * variable.c (string_glob): Use multi_glob and parse_file_seq.
2608         * read.c (multi_glob): Do ~ expansion here.
2610         * glob.c (glob_tilde, glob_filename): Removed ~ expansion.
2612         * variable.c (define_variable, lookup_variable): Use a smarter hashing
2613         algorithm (the same one used for files and directories).
2614         (VARIABLE_BUCKETS): Increased to 523.
2616         * file.c (enter_file, lookup_file, rename_file): Use a smarter hashing
2617         algorithm, spreading the bits about somewhat.
2619         * make.c (log_working_directory): Under `-p', precede the directory
2620         message with a `#'.
2622         * make.c (print_version): Under `-p', precede each line with a `#'.
2623         (print_data_base): Precede the header line with a `#' and include the
2624         date and time on it.
2626         * vpath.c (print_vpath_data_base): Precede non-directive
2627         lines with `#'s.
2629         * commands.c (print_commands): Precede the non-command line with a `#'.
2631         * rule.c (print_rule_data_base), file.c (print_file_data_base): Precede
2632         non-rule lines with `#'s.
2634         * dir.c (print_dir_data_base): Precede all lines with `#'s.
2636         * variable.c (print_variable_data_base): Changed format so that it can
2637         be makefile input.  Lines that are not variable definitions are
2638         preceded with `#'.  Nonrecursive variable definitions are made with all
2639         dollar signs doubled to reproduce the initial value.  Recursive
2640         variable definitions containing newlines are done with `define'
2641         directives.  Nonrecursive variable definitions containing newlines, and
2642         variable names containing :, =, or newlines, will come out garbled.
2644 Wed May 24 00:20:04 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2646         * Version 3.49.
2648 Tue May 23 19:18:00 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2650         * variable.c (expand_function: `filter'/`filter-out'): Use
2651         find_percent instead of pattern_p.
2653         * variable.c (expand_function: `patsubst'): Pass new args (both nil)
2654         to patsubst_expand.
2655         (variable_expand): For $(var:pat%=rep%) references, pass new args to
2656         patsubst_expand so as to avoid find_percent and thus disallow
2657         quoting the %s.
2659         * read.c (record_files): Pass new args to patsubst_expand.
2661         * variable.c (patsubst_expand): Take two new args: PATTERN_PERCENT
2662         and REPLACE_PERCENT.  Each of these, if non-nil, means that PATTERN
2663         (or REPLACE) has already been run through find_percent, and
2664         PATTERN_PERCENT (or REPLACE_PERCENT) is the result.
2666         * make.h: Declare find_percent instead of pattern_p.
2668         * read.c (pattern_p): Changed to find_percent, returning a pointer
2669         to the %, or nil if there is none.
2670         (record_files): Take another arg, PATTERN_PERCENT, a pointer to the
2671         % in PATTERN.
2672         (read_makefile): Pass PATTERN_PERCENT to record_files.
2674         * make.texinfo (Rules: Static Pattern: Static Usage,
2675         Rules: Directory Search: Selective Search,
2676         Functions: Text Functions): Documented that `%' can be quoted.
2678         * variable.c (expand_function: `filter'/`filter-out'): Use pattern_p
2679         to allow quoted %s in patterns.
2681         * variable.c (patsubst_expand): Use pattern_p on PATTERN and REPLACE
2682         to allow quoted %s.  Quoting backslashes are removed from REPLACE
2683         even if PATTERN contains no unquoted %.
2685         * read.c (pattern_p): Made global.
2686         * make.h: Declare pattern_p.
2688         * read.c (pattern_p): New function to search for an unquoted % in a
2689         string.  Backslashes quote %s and backslashes.  Quoting backslashes
2690         are removed from the string by compacting it into itself.  Returns
2691         nonzero if an unquoted % was found, zero if not.
2692         (record_files): Use pattern_p to check for implicit rules.
2693         (read_makefile): Use pattern_p to check for static pattern rules.
2694         Also use it to allow quoted %s in `vpath' patterns; warn about
2695         `vpath' patterns with no %s.
2697 Mon May 22 16:31:52 1989  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
2699         * glob.c (glob_filename): Replace a `1' with the `l' that should
2700         have been there.  This incidentally stops it from dumping core.
2702         * glob.c (glob_filename): If the path is just a directory, with no
2703         file name pattern, return the directory alone.
2705         * glob.c (glob_tilde): New global variable (int), defaults to zero.
2706         (glob_filename): If glob_tilde is nonzero, expand ~ or ~USER.
2708         * variable.c (string_glob): Keep a static allocated buffer for file
2709         names taken from the list, instead of allocating and freeing one
2710         every time.
2712 Fri May 19 18:06:26 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2714         * make.c (decode_switches): Get floating numbers from the right string.
2716 Sun May 14 13:48:04 1989  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
2718         * commands.c (delete_child_targets): When deleting `also_make'
2719         files, include the target's name in the message:
2720                 make: *** [foo] Deleting file `bar'
2722 Sat May 13 17:34:26 1989  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
2724         * make.c (max_load_average, default_load_average): Default to -1.
2726         * load.c (wait_to_start_job): Return if max_load_average is < 0.0,
2727         not equal.
2729 Fri May 12 16:08:05 1989  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
2731         * variable.c (variable_buffer_output): Don't try to do pointer
2732         arithmetic between objects not in the same array.
2734 Wed May 10 15:55:29 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2736         * rule.c [M_XENIX] (default_suffix_rules, default_variables): Minor
2737         changes to allow for strange compiler syntax.
2739         * rule.c (default_variables): Don't include "> $@" in
2740         $(PREPROCESS.S), since it's already in the .S.s rule.
2742         * file.c (enter_file): Make a new double-colon file the `prev'
2743         member of the bottom `prev' file (the one whose `prev' is nil).
2745         * read.c (do_define): Append newlines after copying the lines into
2746         the value buffer, so we end up with a trailing newline.
2748         * make.c (print_version): If the global variable
2749         `remote_description' is not nil or "", append "-%s" (its value) to
2750         the version number.
2751         * remote-*.c: Define remote_description appropriately.
2753 Sun May  7 15:15:53 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2755         * commands.c (error_status): Converted to new function child_error,
2756         taking new arguments TARGET_NAME and IGNORED, and writing an error
2757         message: "*** [target] Error 1" (or signal #, etc.), appending
2758         " (ignored)" if IGNORED is nonzero.
2759         (child_handler): Use child_error instead of error_status.
2761         * compatMakefile (all): Don't depend on `doc'.
2763         * compatMakefile (clean): Don't remove make-info*.
2764         (realclean): New rule, depends on `clean', removes tags, TAGS,
2765         and all Info and TeX files.
2767 Thu May  4 17:00:46 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2769         * variable.c (print_variable_data_base), file.c
2770         (print_file_data_base), rule.c (print_rule_data_base),
2771         Use floating-point for averages and percentages.
2773         * make.c (print_data_base): Print messages before and after the data
2774         base information.
2776         * commands.c (print_commands): Changed output format to separate
2777         lines in commands and prefix them with tabs.
2779         * dir.c (print_dir_data_base): Changed output format slightly.
2781         * vpath.c (struct vpath, construct_vpath_list,
2782         selective_vpath_search): Remove the `exists' member and its uses.
2784         * vpath.c (print_vpath_data_base): New function to print all
2785         selective and general VPATH search paths (for -p).
2787         * make.c (print_data_base): Call print_vpath_data_base.
2789         * file.c (print_file_data_base): Changed format to look more like a
2790         makefile rule.  Now reports all information in the `struct file'.
2792         * rule.c (print_rule_data_base): Changed format of display from:
2793           %: (terminal)
2794            depends on: RCS/%,v
2795         to:
2796           %: RCS/%,v
2797             is terminal.
2798             references nonexistent subdirectory.
2799         Also include number and percent that refer to nonexistent
2800         subdirectories.
2802 Thu Apr 27 15:45:40 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2804         * make.c (main): Figure out the level of recursion before writing
2805         the `Entering directory' message.
2806         * variable.c (define_automatic_variables): Don't figure out the
2807         level of recursion from `MAKELEVEL'.  It's now done in main.
2809         * Version 3.48.
2811 Wed Apr 26 16:39:17 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2813         * commands.c (child_handler): Set `update_status' to zero when there
2814         are no more commands.
2816         * make.c (log_working_directory): If MAKELEVEL > 0, indicate the
2817         recurson in the message (make[1]: ...).
2819         * commands.c (child_handler): Change status to `cs_finished' when
2820         commands fail.
2822         * commands.c (start_job): Return 0 (success) if there were no more
2823         commands for the child.
2824         (child_handler): Change the status to `cs_finished' when start_job
2825         fails to start the commands.
2827         * make.c (main): Don't handle SIGEMT if it's not defined.
2828         Do handle SIGDANGER if it is defined.
2830         * commands.c (child_handler): Reorganized inner loop so that it
2831         doesn't try to inspect the child before finding it.
2833 Tue Apr 25 16:28:24 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2835         * make.c (end_of_token): Fixed bug wherein backslashes caused
2836         immediate return.
2838         * Version 3.47.
2840         * make.texinfo (Implicit: Pattern Rules: Automatic): Document
2841         setting of `$*' for explicit rules.  Add note clarifying that
2842         automatic variables, though referred to in the documentation as
2843         `$<', etc. are no different than `$(<)', etc.
2845 Fri Apr 21 18:00:12 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2847         * file.c (enter_file): Don't strip leading `./'s.
2849         * read.c (parse_file_seq): Strip leading `./'s.
2851 Thu Apr 13 17:26:41 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2853         * make.texinfo (Commands: Parallel, Running: Options): Document that
2854         -l with no argument removes a previous load limit.
2856         * make.c (struct command_switch): New member `default_value'.
2857         (default_job_slots): Default value (of 1) for -j.
2858         (default_load_average): Default value (of 0, unlimited) for -l.
2859         (command_switches): Use default values for -j and -l.
2860         Also, -l without an arg now means no load limit.
2861         (define_makeflags): Don't write positive_int or floating options
2862         whose values are their defaults.
2864         * make.c (main): Under -w, write a `Leaving directory' message
2865         before re-execing.
2867 Tue Apr 11 16:46:29 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2869         * Version 3.46.
2871         * Makefile: Provide an easy place for system-specific definitions
2872         (-DUSG, etc.) and extra object files (for whatever).
2874         * make.texinfo: Miscellaneous fixes from RMS.
2876 Mon Apr 10 19:31:34 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2878         * rule.c (pattern_search): Put rules with `subdir' flags set in
2879         TRYRULES, since these might be valid with VPATHs.  In the TRYRULES
2880         loop, don't do lookup_file or file_exists_p calls for dependencies
2881         of rules with `subdir' flags set, but still do vpath_search calls
2882         and intermediate-file searches.
2884 Thu Apr  6 16:33:00 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2886         * make.texinfo (Implicit: Pattern Rules: Automatic): Document the
2887         new definition of $* for explicit rules.
2889         * commands.c (execute_file_commands): If FILE->stem is nil, figure
2890         out if FILE->name ends in a suffix in the .SUFFIXES list; if so,
2891         store the name sans suffix in FILE->stem (and $*).
2893 Wed Apr  5 15:24:48 1989  Roland McGrath  (mcgrath at helen.Berkeley.EDU)
2895         * file.c (remove_intermediates): Don't use `file_exists_p' to check
2896         for the existence of intermediate files, because the hashed
2897         directories will probably be out of date.
2899         * commands.c (child_handler): Free the good stdin before running the
2900         next command line.
2902         * commands.c [USG] (init_siglist): Don't case SIGEMT if it's not
2903         defined.  Do case SIGDANGER (for IBM RT) if it is defined.
2905         * commands.c: Changed `SYS_WAIT' to `HAVE_SYS_WAIT'.
2906         (child_handler): Use `wait3' if HAVE_SYS_WAIT is #defined.
2908         * file.c (enter_file): If any `./'s are stripped off, allocate a new
2909         copy of the shortened name.
2911         * rule.c (pattern_search): Allocate the right length strings for
2912         `also_make' members.
2914 Sat Apr  1 13:28:38 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2916         * Version 3.45.
2918         * GNUmakefile: Make a separate tarfile of the DVI and info files.
2920         * make.c (define_makeflags): If a switch that takes an argument has
2921         its default value, put the switch in MAKEFLAGS with no arguments.
2923         * make.c (command_switches): Pass `-l' in MAKEFLAGS.
2925 Wed Mar 29 17:50:05 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2927         * GNUmakefile: Don't include the DVI and info files in the dist.
2929         * commands.c (child_handler): Don't call
2930         check_changed_{directories,vpaths}.
2932         * make.h: Don't declare check_changed_{directories,vpaths}.
2934         * vpath.c (check_changed_vpaths): Removed this function.
2936         * dir.c (struct directory): Remove `modtime' member.
2937         (find_directory): Don't set `modtime' member.
2938         (check_changed_directories): Removed this function.
2940         * remake.c (update_file_1): Set FILE->command_state to cs_finished
2941         if it didn't need to be remade.
2943         * remake.c (update_file): Only write the "up to date" message if the
2944         target went from `not_started' state to `finished' state without
2945         incrementing the count of files remade.
2947         * commands.c [USG] (init_siglist): If both SIGCHLD and SIGCLD are
2948         defined, don't put them both in the `switch'.
2950 Tue Mar 28 15:37:02 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2952         * file.c (rename_file): Change FILE's name!!!
2954         * rule.c (create_pattern_rule): Set the `terminal' member of the new
2955         rule after calling new_pattern_rule, which zeros it.
2957         * rule.c (default_variables): Use $(C++) in $(COMPILE.cc)!
2959 Sun Mar 26 15:52:30 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2961         * Makefile: Added a `clean' target.
2963 Fri Mar 24 15:08:46 1989  Roland McGrath  (mcgrath at helen.Berkeley.EDU)
2965         * Version 3.44.
2967         * file.c (rename_file): If a `struct file' for the renamed-to name
2968         exists, and it is a target or has deps or commands, barf.
2969         If not just remove the old one for put in the new one.
2971         * remake.c (update_file_1, check_dep): Changed it back so that equal
2972         modtimes to NOT make dependencies be considered newer.  RCS checks
2973         out files with equal modtimes as the RCS files, so this screws it.
2975         * make.h, glob.c: If __GNUC__ is defined, use __builtin_alloca.
2977         * Makefile: Use variables `ALLOCA' and `ALLOCASRC' so systems
2978         without a good standard alloca can get it from the Emacs
2979         distribution (or somewhere).
2981         * dir.c: Don't include <sys/stat.h>, since make.h does.
2983         * make.c: Removed debugging version of getwd.
2985 Thu Mar 23 16:16:27 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2987         * Version 3.43.
2989         * remake.c (update_file_1): If a dependency loop is found, don't
2990         fatal.  Emit an error message and remove the dependency.
2992         * remake.c (library_file_mtime): Fixed to use the right names.
2993         (update_file_1, check_dep): Consider a dependency "newer" than its
2994         dependent if they have the same modification time.
2996 Wed Mar 22 19:31:35 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
2998         * file.c (remove_intermediates): Don't try to remove nonexistent files.
3000 Mon Mar 20 10:21:22 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
3002         * Version 3.42.
3004         * rule.c (default_variables): Set F77 to $(FC) and F77FLAGS to
3005         $(FFLAGS) so explicit rules expecting these (which are in System V)
3006         will work.  However, there is no way to make setting these affect
3007         the implicit rules, unless we trash FC and FFLAGS (which BSD uses).
3008         [USG]: Set GET to `get' rather than `/usr/sccs/get'.
3010 Sun Mar 19 20:00:27 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
3012         * vpath.c (construct_vpath_list): Don't replace VPATH[ELEM] with
3013         dir_name (V), because the latter may get freed.
3015 Sat Mar 18 15:01:39 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
3017         * Version 3.41.
3019         * make.texinfo: Cleaned-up edition 0.1 Beta from RMS and Bob Chassell.
3021         * file.c (rename_file): If a file with the new name already existed,
3022         use the same storage space, after freeing the old file's name, deps,
3023         and `also_make' member, preserving the link in the chain.
3024         Also write an error message telling the user to report the incident;
3025         I don't think this should be able to happen, but I'm not sure.
3027         * file.c (rename_file): Don't add the hash values of the old and new
3028         names together!  Reset HASHVAL before computing the second value.
3030         * dir.c (check_changed_directories): Zero the new file hash table
3031         after allocating it.
3033         * dir.c (dir_file_exists_p): If FILENAME is "", return 1 if the
3034         directory exists.
3036         * vpath.c (check_changed_vpaths): New function to run through the
3037         search paths of all VPATHs, making the `exists' members correspond
3038         to reality.
3040         * commands.c (child_handler): Call check_changed_vpaths.
3042         * make.h: Declare check_changed_vpaths.
3044         * vpath.c (struct vpath): New element `exists', an array of char
3045         flags; exists[N] is nonzero if searchpath[N] exists.
3046         (construct_vpath_list): Set the `exists' member.
3047         (selective_vpath_search): Don't search directories whose `exists'
3048         elements are zero.
3050         * read.c (read_makefile): Set the `dontcare' flag of makefiles
3051         from the MAKEFILES variable if they were not mentioned anywhere but
3052         in the MAKEFILES variable.
3054         * read.c (read_makefile): Don't write an error message if fopen
3055         fails for a makefile from the MAKEFILES variable.
3057         * dir.c (struct directory): Add `modtime' member to record the
3058         modification time of the directory when it was opened.
3059         (check_changed_directories): New function to check all known
3060         directories; if their modtimes have changed since they were opened,
3061         their file tables are cleared and they are reset to be read in.
3063         * commands.c (child_handler): Call check_changed_directories before
3064         returning.
3065         make.h: Declare check_changed_directories.
3067 Tue Mar 14 20:07:13 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
3069         * Version 3.40.
3071         * make.c (print_version): Made the copyright say 1988, 1989.
3073         * read.c (read_all_makefiles): Don't set *MAKEFILES to the name of
3074         the end of the read_makefiles chain, since the latter may be from an
3075         included makefile.  (Why did I do this before?)
3077         * make.c (main): Set argv[0] to "" if it was nil.  Don't put the
3078         command-line variable definitions into argv[0], only into the MAKE
3079         variable!
3081 Sun Mar  5 20:44:08 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
3083         * ar.c (ar_member_date, ar_touch): Remove the trailing ) from the
3084         member name.
3086 Fri Mar  3 18:15:15 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
3088         * commands.c (construct_command_argv): Initialize NEW_ARGV to 0.  At
3089         `slow' label, if NEW_ARGV is not 0, free it; then allocate 4 strings.
3091 Tue Feb 28 14:29:39 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
3093         * Version 3.39.
3095         * COPYING, make.texinfo: New GNU General Public License, version 1.
3097         * *.c, *.h, Makefile: New copyright notices for the new GNU General
3098         Public License, version 1.
3100         * commands.c [USG]: Define WRETCODE correctly (again).
3102         * variable.c (expand_function: `shell'): Don't capture the standard
3103         error output of the shell command.
3105         * ar.c (ar_touch, ar_member_date): Allocate MEMNAME with the right
3106         length.
3108         * load.c [not UMAX] (load_average): Don't clobber the first nlist
3109         member when trying to set the second!
3111 Thu Feb 23 13:13:53 1989  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
3113         * commands.c (child_handler): Really ignore errors under -i and for
3114         - lines, don't just print a different message.
3116         * make.c (decode_switches): Fixed handling of arguments (or lack
3117         thereof) to switches.
3119 Wed Feb 22 16:25:39 1989  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
3121         * commands.c (construct_command_argv): Don't clobber LINE when
3122         checking the IFS variable.
3124 Sun Feb 19 11:17:07 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
3126         * load.c [UMAX, not NO_LDAV] (load_average): Return 0.0 rather than
3127         randomness when calls fail.
3129         * Version 3.38.
3131         * commands.c (fatal_error_signal): If handling a user kill signal
3132         (TERM, INT, HUP), wait for the children without printing the
3133         "Waiting for children" message, since they will die quickly.
3135         * Version 3.37.
3137         * remote-stub.c (remote_status): Take another arg, BLOCK.  If this
3138         is nonzero block waiting for remote children.  If not, return 0 if
3139         we would have to block.
3141         * commands.c (child_handler) [not USG]: If called as a signal
3142         handler, use wait3 and don't block.
3143         [USG]: If called as a signal handler, return after handling one child.
3145 Sat Feb 18 13:37:04 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
3147         * file.c (snap_deps): Process all double-colon entries of each file,
3148         not just the first one.
3150         * Version 3.36.
3152         * remote-stub.c: remote.c renamed.
3153         remote.c: Just include remote-stub.c
3155         * commands.c (child_handler): If we were called as a signal handler,
3156         return after handling one child.
3158         * commands.c [not USG]: Include <signal.h> and define `sigmask' if
3159         <signal.h> doesn't.
3160         (block_children, unblock_children): Use sigmask rather than
3161         bitshifting explicitly (and incorrectly).
3163         * remote.c (remote_kill): New function to send a signal to a
3164         remote child.
3166         * commands.c (fatal_error_signal): If we get a SIGTERM, send one to
3167         each living child.  If we get a SIGTERM, SIGINT, or SIGHUP, delete
3168         all pending targets before waiting for children.
3169         (struct child): Add new member `deleted'.
3170         (start_job): Initialize `deleted' member to 0.
3171         (delete_child_targets): New function to delete a given child's
3172         targets, unless the `deleted' flag in the `struct child' says they
3173         have already been deleted.  Sets this flag before returning.
3175 Thu Feb 16 18:32:07 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
3177         * commands.c [USG]: Define `WRETCODE' correctly (X & 0xff00).
3179 Tue Feb 14 16:05:00 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
3181         * commands.c (construct_command_argv): Don't make the 0th element of
3182         the argument list be "sh" when executing /bin/sh, because start_job
3183         uses the 0th element as the program name.
3185 Sun Feb 12 17:42:05 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
3187         * Version 3.35.
3189         * read.c (readline): Put a null in the beginning of the buffer
3190         before starting the reading loop.
3192         * read.c (read_makefile): Made main reading loop while
3193         !feof (infile), and removed EOF check after calling readline.
3195 Sun Feb  5 19:52:38 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
3197         * remote.c (block_remote_children, unblock_remote_children): New
3198         (stub) functions to block and restore asynchronous notification of
3199         remote child death.
3201         * commands.c (block_children): Call block_remote_children.
3202         (unblock_children): Call unblock_remote_children.
3203         (child_handler): If called as a signal handler, block remote
3204         children on entry and unblock them before returning.
3206         * commands.c (child_handler): For unknown children, if they are
3207         remote, give their remote ID; if local, give their PID and make's.
3209         * commands.c (execute_file_command): Don't put a new child in the
3210         chain unless start_job succeeds.  Block children before calling
3211         start_job, and unblock them after putting the child in the chain and
3212         incrementing `job_slots_used' (if start_job succeeded).
3214         * commands.c (block_children, unblock_children): Make these globally
3215         visible (not `static').
3216         commands.h: Declare block_children and unblock_children.
3218         * variable.c (expand_function: `shell'): Use
3219         `shell_function_completed'.  Block children before forking and
3220         unblock after `shell_function_pid' is set properly and
3221         `shell_functon_completed' is reset to 0.
3223         * commands.c (child_handler): When the child of the `shell' function
3224         completes, set `shell_function_completed' to 1 if it actually ran,
3225         or -1 if it didn't (due to fork or exec failure).
3227         * commands.c (block_children, unblock_children): New functions to
3228         block and unblock the child termination signal.
3229         (wait_for_children): Use block_children and unblock_children.
3230         (execute_file_commands): Block children around the critical section
3231         wherein a new child is put on the chain.
3233         * make.c (main): Change the environment to contain the correct
3234         MAKELEVEL before re-execing.
3236 Sat Feb  4 18:28:48 1989  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
3238         * Version 3.34.
3240 Fri Feb  3 16:36:49 1989  Roland McGrath  (mcgrath at helen.Berkeley.EDU)
3242         * rule.c (default_variables): Fixed $(LINK.c).
3244 Wed Feb  1 18:05:07 1989  Roland McGrath  (mcgrath at pepper.Berkeley.EDU)
3246         * Version 3.33.
3248         * version.c: Removed copyright notice, since this is a one-line file.
3250         * commands.c (error_status): Made it return BUF, rather than running
3251         off the end (this apparently worked on Sun 3s for some reason).
3253         * ar.c, commands.c, dep.h, load.c, make.c, make.h, read.c, remake.c,
3254         rule.c, variable.c, Makefile: Changed copyrght notices to cover 1989.
3256 Mon Jan 30 15:51:28 1989  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
3258         * Version 3.32.
3260 Fri Jan 27 20:09:24 1989  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
3262         * remake.c (remake_file): Don't touch phony targets.
3264         * rule.c (convert_to_pattern): Fixed an incorrect length passed to
3265         savestring.
3267         * variable.c (expand_function: `shell'): Close the read side of the
3268         pipe on the parent side of the fork.
3270         * commands.c (start_job): On the child of the fork, close the
3271         BAD_STDIN fd if we're not using it.
3273         * read.c (record_files): A file beginning with a dot can be a
3274         default target if it also contains a slash (as in `../foo').
3276         * commands.c (wait_for_children): For BSD, block SIGCHLD rather than
3277         ignoring it to avoid a race condition when child_handler is returning.
3279         * commands.c (child_handler): Do blocking waits.
3280         (error_status): Return a string describing exit status.  (Split out
3281         of child_handler).
3283         * read.c (multi_glob): Change VECTOR to VEC for Alliant.
3285 Thu Jan  5 00:06:51 1989  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
3287         * Version 3.31.
3289         * make.texinfo (Features): Noted $(foo:PAT=SUB) from SunOS 4.0.
3291         * make.texinfo (Options/Recursion): -d and -p go in the environment.
3293         * load.c: Include "commands.h".
3295 Wed Jan  4 17:49:25 1989  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
3297         * make.c (switches): -d and -p can come from the environment and are
3298         put into it.
3300         * read.c (record_files): Fixed the checking for duplicate deps so it
3301         doesn't clobber the first one.
3303         * make.texinfo: Documented default implicit rule changes.
3305         * rule.c: Revamped default suffix rules.  They now use Sun's style
3306         of using variables `COMPILE.c', `LINK.c', etc. for each suffix, and
3307         use `TARGET_ARCH' and `TARGET_MACH' variable where appropriate.
3308         Also support Modula-2 compilation (suffixes .sym, .def, and .mod).
3309         Ratfor Yacc support is gone, since nobody has yacc -r.
3310         All EFL support is gone, since nobody uses EFL.
3312         * ar.c, arscan.c: Don't assume `long int' and `int' are the same.
3314         * commands.c [USG]: Fixed wait status bit encoding.
3315         [USG and not USGr3] (dup2): Define this for SysVr2.
3317         * make.h, dep.h, make.c [iAPX286]: Make allowances for this
3318         brain-damaged compiler.
3320         * make.texinfo (Variables: Flavors): Fixed a typo.
3322 Tue Jan  3 18:09:31 1989  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
3324         * ar.c (ar_member_date, ar_touch): Truncate member names to 15 chars.
3326         * Version 3.30.
3328         * commands.c [SYS_WAIT]: If this is defined, use BSD <sys/wait.h>
3329         and wait3 even if USG.
3331         * read.c (record_files): Defining .DEFAULT with no deps or commands
3332         clears its commands.
3334         * rule.c (default_suffixes): Added `.sh'.
3335         (default_suffix_rules): Added single-suffix .sh rule, copies source
3336         to target and makes target executable.
3337         make.texinfo (Catalogue of Rules): Documented .sh rule and its use
3338         in conjunction with SCCS.
3340         * rule.c (set_default_suffixes): Define variable `SUFFIXES' to the
3341         default list ("" under -r).
3342         make.texinfo (Suffix Rules): Document `SUFFIXES' variable.
3344         * rule.c (default_variables), make.texinfo (Implicit Variables):
3345         Variable AR defaults to `ar', ARFLAGS to `rv', and RM to `rm -f'.
3347         * rule.c (install_default_pattern_rules): Default variables are made
3348         recursive.
3349         (default_variables): Added "CPP", defined to "$(CC) -E".
3350         (default_suffixes): Added `.S', before `.s'.
3351         (default_suffix_rules): New rule for .S to .s, runs CPP.
3352         All rules that use CPP now include "$(CPPFLAGS)".
3353         make.texinfo (Catalogue of Implicit Rules, Implicit Variables):
3354         Documented above changes.
3356         * commands.c [USG] (sys_siglist): Don't define.
3357         [USG] (init_siglist): New function to initialize sys_siglist.
3359         * make.texinfo (Variables: Reference): Documented `$(foo:PAT=SUB)'
3360         references.
3362         * variable.c (variable_expand): A reference `$(foo:PAT=SUB)' is
3363         equivalent to `$(patsubst PAT,SUB,$(foo))'.
3365         * variable.c (variable_expand): Free the storage for the expansion
3366         of a recursive variable when it is nod longer needed.
3368         * variable.c (variable_expand): When checking for `$($(foo))', use
3369         lindex so as not to search for the second `$' outside the parens.
3371         * make.c (struct stringlist, main, decode_switches): Changed `index'
3372         member to `idx'.
3374 Sat Dec 24 16:02:32 1988  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
3376         * commands.c (wait_for_children [USG]): Handle SIGCLD with SIG_DFL,
3377         rather than SIG_IGN.  Ignoring SIGCLD reportedly makes wait return -1.
3379         * arscan.c [USGr3]: Define PORTAR to 1 (as with sun386).
3380         (ar_scan [USGr3]): Remove trailing slashes from member names.
3382 Thu Dec 22 17:54:05 1988  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
3384         * make.texinfo (Makefiles: Overriding Makefiles): New node
3385         documenting use of .DEFAULT to have one makefile defer unmakeable
3386         targets to another.
3388         * make.texinfo (Implicit: Using Implicit, Implicit: Last Resort):
3389         Mention empty commands and xref node `Empty Commands'.
3391 Wed Dec 21 20:12:40 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
3393         * Version 3.29.
3395         * make.c (struct command_switch, command_switches, et al): New
3396         member `noarg_value', if not nil, ptr to value to use if no arg is
3397         given to a switch that would otherwise require one.  The -j option
3398         can now be given w/o an arg, to mean infinite jobs.
3399         * commands.c: If job_slots is zero, infinite jobs.
3401         * read.c (read_all_makefiles, read_makefile): Make makefiles precious.
3403         * make.c (decode_switches): For a positive_int or floating option,
3404         if we moved to the next argument word, but found no argument for the
3405         option, move back to the correct word.
3407         * make.c (decode_switches): If we got any unknown options, die after
3408         processing all arguments.
3410         * GNUmakefile: Moved `include depend' to the end, so the default
3411         goal will be set before then.
3413         * load.c (wait_to_start_job [Unix, UMAX]): Merged into one version
3414         under #ifdef LDAV_BASED.  Only loop while we have jobs running.
3415         Sleep for increasing amounts (increase one second per iteration)
3416         before checking the load average (after the first check).
3417         Get the load average from function load_average.
3418         (wait_to_start_job [not LDAV_BASED]): Always return.
3419         (load_average [UMAX]): Fetch load average for Encore UMAX.
3420         (load_average [not NO_LDAV]): Fetch load average from /dev/kmem.
3421         [not NO_LDAV]: Define LDAV_BASED.
3423 Tue Dec 20 18:54:50 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
3425         * Version 3.28.
3427         * commands.c (wait_for_children): Take second arg, ERROR.  If
3428         nonzero, and there are children, print a message on stderr.
3429         (execute_file_commands, fatal_error_signal): Pass second arg.
3430         * make.c (die), remake.c (update_goal_chain), variable.c
3431         (expand_function: `shell'): Ditto.
3433 Sat Dec 17 01:05:38 1988  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
3435         * commands.c (start_job): Call wait_to_start_job before forking.
3437         * load.c (load_average): Converted to wait_to_start_job.
3439         * remote.c: New file for remote execution functions.
3440         (start_remote_job_p): Return nonzero if the next job should be run
3441         remotely.
3442         (start_remote_job): Start a remote job and return an ID for it.
3443         (remote_status): Get status of dead remote children.
3445 Fri Dec 16 16:51:07 1988  Roland McGrath  (mcgrath at hecuba.Berkeley.EDU)
3447         * commands.c (start_job): If start_remote_job_p () returns nonzero,
3448         call start_remote_job to start the job rather than fork and exec.
3449         (child_handler):
3451         * commands.c (execute_file_commands): Moved load average checking to
3452         start_job.
3454         * commands.c (child_handler: USG): Record the pid wait returns.
3456         * load.c (UMAX): Added some #include's needed for UMAX.
3458         * read.c (multi_glob), variable.c (string_glob): Ignore a (char **)
3459         -1 return from glob_filename.
3461         * variable.c (variable_expand): Make sure we don't increment past
3462         the end of the string we were passed.
3464         * variable.c (variable_expand): Terminate the expansion.
3466         * file.c (rename_file): If there is already a file under the new
3467         name, set its contents equal to FILE's (ick).
3469         * variable.c (define_automatic_variables): Pass all the args to
3470         define_variable when defining MAKELEVEL!
3472         * commands.c (execute_file_commands): If max_load_average > 0, and
3473         we have children running, don't start up another child until the
3474         load average goes below max_load_average.
3476         * make.c: New variable `max_load_average'.
3477         (struct command_switch, decode_switches, decode_env_switches):
3478         Handle floating-point (double) args.
3479         (command_switches): Added `-l' switch to set `max_load_average'.
3481         * load.c (load_average): New file and function to return a double
3482         that is the current load average (1.00 scale).
3483         * GNUmakefile, oldMakefile: Pass flags in $(LOAD_AVG) for load.c.
3485 Thu Dec 15 15:22:08 1988  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
3487         * Makefile: Renamed to oldMakefile.
3488         * GNUmakefile: Make Makefile from oldMakefile and depend.
3490         * read.c (read_all_makefiles): When putting the default makefiles in
3491         the read_makefiles chain so they will be remade, put them in the
3492         right order.
3494         * remake.c (update_goal_chain): If MAKEFILES is nonzero, always make
3495         in serial, and return as soon as one goal whose `changed' member is
3496         nonzero  is successfully remade.
3498         * commands.c: Don't include <sys/fcntl.h>.
3500         * commands.c (construct_command_argv): Added ` to sh_chars.
3502         * make.h: Don't declare construct_makeflags.
3504         * make.c (main): Set up MAKEFLAGS and MFLAGS and make an environment
3505         both before and after reading the makefiles, so the makefiles can
3506         use them and possible change them, and later children will get the
3507         right information.
3508         (construct_makeflags): Replaced with define_makeflags (static void),
3509         which defines the two variables.
3510         * variable.c (define_automatic_variables): Don't define MAKEFLAGS
3511         and MFLAGS.
3513 Mon Dec 12 14:40:31 1988  Roland McGrath  (mcgrath at helen.Berkeley.EDU)
3515         * Version 3.27.
3517         * commands.c (child_handler): Reset the handler to ourselves when
3518         called for USG, since it has no safe signals.
3520         * commands.c: For USG, use an int rather than a `union wait' for
3521         wait calls, and dissect it with bitmasks.
3522         (child_handler): No wait3 system call in USG.  Since we can't
3523         protect from hanging, always return immediately if we have no
3524         children we know about and we're not running a `shell' function.
3525         (There is still the danger of hanging waiting for a child that died
3526         without our being notified.)
3528         * remake.c: Include <fcntl.h> instead of <sys/file.h>.  What we need
3529         is really in <fcntl.h>, and while BSD <sys/file.h> includes
3530         <fcntl.h>, USG doesn't.
3532         * make.c (main): Figure out the program name before doing anything
3533         which might need it (in a call to error or fatal).
3535         * dir.c, glob.c: Use `struct dirent' and <dirent.h> for USGr3.
3537         * arscan.c (ar_scan): Added missing & before buf (which is an int)
3538         if SARMAG is not defined (SysV).
3540 Fri Dec  9 18:44:13 1988  Roland McGrath  (mcgrath at pepper.Berkeley.EDU)
3542         * Version 3.26.
3544         * dir.c (find_directory, dir_file_exists_p): Keep track of how many
3545         directories we have open and don't let it be more than
3546         MAX_OPEN_DIRECTORIES (currently 10).
3548         * variable.c (expand_function: `foreach'): Use expand_argument
3549         rather than variable_expand so each repetition doesn't clobber the
3550         last!!!
3552 Mon Dec  5 15:58:46 1988  Roland McGrath  (mcgrath at hecuba.Berkeley.EDU)
3554         * Version 3.25.
3556         * Makefile: Define `install' target.
3558         * GNUmakefile: Don't include GNUmakefile or depend in the
3559         distribution file.
3561 Wed Nov 30 15:53:42 1988  Roland McGrath  (mcgrath at helen.Berkeley.EDU)
3563         * commands.c (execute_file_commands): Don't clobber a null into
3564         random storage if there were no $^ and/or $? words.
3566         * remake.c (check_dep): Set *MUST_MAKE_PTR nonzero if a dependency
3567         doesn't exist.
3569         * ar.c (ar_member_date, ar_touch): Make sure the modtime of the
3570         archive file itself is known before we fetch or change the modtime
3571         of one of its members.
3573         * read.c (read_makefile): Expand variable and function references
3574         before parsing rules so variable can contain special characters
3575         (colons and semicolons).
3577 Sat Nov 26 11:36:31 1988  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
3579         * variable.c (expand_function: `filter', `filter-out'): Fixed so
3580         that filter-out works right.
3582         * variable.c (expand_function: `filter', `filter-out'): Made these
3583         functions use each word of their first argument as a pattern.
3585 Fri Nov 25 10:51:47 1988  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
3587         * Version 3.24.
3589         * read.c (record_files): If a target is listed more than once in a
3590         single rule (that defines commands), give a warning message rather
3591         than the counter-intuitive message saying commands were already
3592         defined (in the same place).
3594         * make.c (fatal, error): Made them both take 6 args since there is
3595         at least one error message that need that many.  Too bad vfprintf is
3596         not universal!
3598         * Version 3.23.
3600         * read.c (read_makefile): Moved the construction of the `struct
3601         commands' into record_files.  Call record_files before recursing for an
3602         included makefile so the higher-up will determine the default goal.
3603         (record_files): Take arguments COMMANDS, COMMANDS_IDX and
3604         COMMANDS_STARTED and construct a `struct commands.
3606 Thu Nov 24 14:36:33 1988  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
3608         * Version 3.22.
3610         * make.c (main): Made it a fatal error if we can't move back to the
3611         directory we started in before re-execing.
3613         * make.c (main): Get the current directory before doing anything
3614         else, so we know it even if we don't need it for the value of
3615         `MAKE', since we might want it when re-execing.
3617 Wed Nov 23 13:34:44 1988  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
3619         * Version 3.21.
3621         * read.c (record_files): Eliminate duplicate deps in a chain.
3623         * variable.c (expand_function: `sort'): Pass the right number to
3624         qsort, not one less.
3626         * remake.c (remake_file): Always call notice_finished_file if
3627         FILE->command_state == cs_finished.
3629         * commands.c (execute_file_commands): Call notice_finished_file to
3630         set FILE's status correctly when start_job fails (because it's out
3631         of commands or running under -n).
3633 Fri Nov 18 15:31:12 1988  Roland McGrath  (mcgrath at saffron.Berkeley.EDU)
3635         * Version 3.20.
3637         * remake.c (update_file_1): Set the `update_status' of FILE to
3638         nonzero and set FILE's `updated' bit if we have decided to give up
3639         on remaking FILE because of errors in the dependencies.
3641         * rule.c (pattern_search): Debugging messages use `dependency' (vs.
3642         `dependent') properly.
3644         * make.texinfo (Conditionals: Conditional Syntax): Function index
3645         entries for `ifndef' and `ifneq'.
3647         * variable.c (define_automatic_variables): Define `MAKELEVEL' to the
3648         decimal number of the makelevel, since it may be malformed or blank.
3650         * remake.c (remake_file): Call notice_finished_file after touching.
3652 Sat Nov 12 19:29:34 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
3654         * Version 3.19.
3656         * GNUmakefile (dist): Pass the `-f' flag to compress.
3658         * vpath.c (build_vpath_lists): Check for VPATHS being nil after
3659         constructing the general VPATH list from the `VPATH' variable.
3661 Fri Nov 11 08:02:26 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
3663         * make.c (fatal, error): Made error messages for recursive runs be
3664         shorter.
3666 Thu Nov 10 16:51:36 1988  Roland McGrath  (mcgrath at basil.Berkeley.EDU)
3668         * Version 3.18.
3670         * read.c (read_makefile): Made it eat leading spaces and formfeeds
3671         (but not tabs), like it's documented to.
3673         * read.c (read_makefile): Let included makefiles determine the
3674         default goal, as is done by System V Make.
3676 Tue Nov  1 19:03:08 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
3678         * variable.c (new_environ): Don't increment VCNT when a variable is
3679         rejected.
3681 Fri Oct 28 16:54:15 1988  Roland McGrath  (mcgrath at basil.Berkeley.EDU)
3683         * Version 3.17.
3685         * rule.c (convert_to_pattern): Don't use the same storage for a name
3686         in two rules since new_pattern_rule may free this storage when a
3687         rule is discarded.
3689         * rule.c (new_pattern_rule): Undid useless change I made Oct 25.
3691 Thu Oct 27 19:17:53 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
3693         * Version 3.16.
3695         * GNUmakefile, Makefile: Fixed a typo in a comment.
3696         * Makefile: Removed malloc.o from object file list.
3698         * variable.c: Removed old debugging #define's for xmalloc and
3699         xrealloc so non-ANSI cpp's won't barf.
3701         * make.c (main): Made local array for temp file name static so
3702         compilers that don't do auto aggregate initialization won't barf.
3704         * read.c: Removed static declaration of copy_dep_chain since it is
3705         no longer static.
3707 Tue Oct 25 16:59:30 1988  Roland McGrath  (mcgrath at pepper.Berkeley.EDU)
3709         * rule.c (new_pattern_rule): If we threw out the new rule because it
3710         matched an old one and OVERRIDE was zero, don't put the freed
3711         pointer in the chain!
3713 Wed Oct 19 15:07:43 1988  Roland McGrath  (mcgrath at pepper.Berkeley.EDU)
3715         * Version 3.15.
3717         * variable.c (expand_function: `sort'): Don't do the sorting and
3718         writing out if there were no words in the first place.
3720         * remake.c (remake_file): Only fail with a "no way to make" message
3721         for a dependency (non-target) file.  If we don't know how to remake
3722         a target file, pretend it was successfully remade and is very new.
3724         * remake.c (remake_file): Don't increment `files_remade' for a
3725         non-target file we don't know how to remake.
3727         * read.c (record_files): Don't die with "both : and :: entries" for
3728         a file whose `is_target' flag is not set.
3730 Tue Oct 18 17:24:11 1988  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
3732         * variable.c (expand_function: `patsubst', `subst'): Free the right
3733         things!
3735         * variable.c (expand_function: `subst'): Don't clobber the
3736         pointer to the end of the second arg and then try to use it!!!
3738 Mon Oct 17 16:44:45 1988  Roland McGrath  (mcgrath at catnip.Berkeley.EDU)
3740         * variable.c (expand_function: `patsubst'): Don't clobber the
3741         pointer to the end of the second arg and then try to use it!!!
3743         * variable.c (expand_function: `word' function): Made it parse its
3744         second argument correctly.
3746         * ar.c (ar_touch): Return 1 rather than -1 for on errors.
3748 Sat Oct 15 15:12:16 1988  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
3750         * Version 3.14.
3752         * GNUmakefile: Removed explicit rule for make.dvi since the built-in
3753         implicit rule now works.
3755         * rule.c (default_suffix_rules): Fixed .texinfo.dvi rule yet again
3756         so that it really works, now that parens are counted.
3758         * remake.c (update_file_1): Set FILE's `updated' flag after calling
3759         remake_file if it failed or finished immediately.
3761         * remake.c (update_file): Use the `updated' flag rather than the
3762         command state to decide if a file was fully considered, and
3763         therefore might give an "up to date" message.
3765         * variable.c (expand_function): Made all functions that take more
3766         than one argument count parens of the appropriate flavor in their
3767         args and ignore commands nested in parens.
3769 Fri Oct 14 18:35:00 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
3771         * read.c (read_all_makefiles): Pass second arg to read_makefile for
3772         default makefiles.
3774 Thu Oct 13 16:40:08 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
3776         * Version 3.13.
3778         * GNUmakefile: Added an explicit rule for make.dvi since the
3779         built-in .texinfo.dvi implicit rule is screwed up.
3781         * rule.c (default_suffix_rules): Added a comment that the
3782         .texinfo.dvi rule does not work because of an ahem, feature of Make
3783         that at some point will be fixed--er, enhanced to alleviate this
3784         difficulty.
3786         * rule.c (default_suffix_rules): Fixed Texinfo -> DVI rule (again).
3788         * make.texinfo (Commands: Execution): Documented new competing for
3789         standard input among children.
3791         * commands.c (struct child): Added `good_stdin' flag to tell if this
3792         child has the stdin that doesn't point into nirvana.
3793         (good_stdin_used): New variable to tell if any child has the good
3794         standard input.
3795         (child_handler): Reset `good_stdin_used' if a dead child's
3796         `good_stdin' flag is set.
3797         (start_job): Give the new child the good standard input if
3798         `good_stdin_used' is no set, and set the child's `good_stdin' flag
3799         appropriately.
3801         * rule.c (default_suffix_rules): Changed Texinfo -> DVI rule to work
3802         better (I hope).
3804         * read.c (read_all_makefiles): Stop reading default makefiles after
3805         one is found.
3807         * read.c (read_makefile): Reset `reading_filename' and
3808         `reading_lineno_ptr' after recursing for an included makefile.
3810         * GNUmakefile: New GNU Make-specific makefile that does everything
3811         Makefile does plus distribution stuff, and doesn't contain any hacks
3812         to try to work with Unix make.
3814         * Makefile: Removed distribution stuff.
3816         * make.c (main): Use mktemp to construct the names of temporary
3817         files used for standard input makefiles.
3819         * make.c (main): Don't turn standard input into a broken pipe.
3821         * commands.c (start_job): Keep two extra file descriptors around: a
3822         good standard input, and a bad one that reads from a broken pipe.
3823         On the child side of the fork, if there are other children, give
3824         this one the broken pipe so they won't compete; if this is the only
3825         one, give it the good standard input.
3827         * make.h: Declare notice_finished_file.
3829         * commands.c (execute_file_commands): Use noticed_finished_file
3830         after waiting for the child when there is only one job slot.
3832         * remake.c (notice_finished_file): New function to re-check mtime's
3833         and such things to be done when commands finish.
3834         (update_file_1): Use notice_finished_file.
3836         * commands.c (child_handler, execute_file_commands): Use new
3837         variable `job_slots_used' to record the number of jobs currently
3838         running, rather than diddling with `job_slots'.
3839         (execute_file_commands): Increment `job_slots_used' before calling
3840         start_job and decrement it on failure to avoid race condition.
3841         If there is only one job slot, wait for the child to finish and
3842         return its status so commands are run in linear order, as if there
3843         were no parallelism.
3845 Wed Oct 12 15:59:03 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
3847         * remake.c (remake_file): Don't print a "No way to make" message for
3848         targets whose `dontcare' flags are set.
3850         * read.c (read_all_makefiles): Set the `dontcare' flag of the
3851         `struct file' each default makefile added to the chain.
3853         * file.h (struct file): Add `dontcare' member.
3855         * read.c (read_all_makefiles): When no default makefiles are found,
3856         put the names of all those tried in the `read_makefiles' chain so
3857         they will be updated if possible, giving their `struct dep's'
3858         `changed' members the value of 0 so we won't care if they cannot be
3859         found or remade.
3861         * make.texinfo (Makefiles: Remaking Makefiles): Documented that
3862         default makefiles will be remade if not found.
3864         * read.c (read_all_makefiles): If no default makefiles can be found,
3865         go through the list of default names, trying to make one, stopping
3866         if one is made.
3868         * remake.c (remake_file): Set STATUS to 0 after successfully touching.
3870         * dir.c (file_impossible, file_impossible_p): Don't clobber FILENAME
3871         to "" and then try to to a strcmp on it!!!
3873 Mon Oct 10 16:09:18 1988  Roland McGrath  (mcgrath at cinnamon.Berkeley.EDU)
3875         * make.c (main): Don't do `dir_load (".")'.
3877         * rule.c (count_implicit_rule_limits), vpath.c
3878         (construct_vpath_list): Test the existence of a given directory by
3879         `dir_file_exists_p (DIR, ".")' and assume that if this returns zero,
3880         it means the directory really does not exist.
3882         * dir.c (struct dirdata): Replaced with `struct directory' for
3883         directories, each containing a chain of `struct dirfiles', one for
3884         each file (real or impossible).
3885         (dir_load): Removed.
3886         (find_directory): New function to find the `struct directory' for a
3887         named directory and return it (possibly creating a new one).
3888         (dir_file_exists_p): Read the directory on the fly if its stream is
3889         still valid (and ever was) if the file we're looking for is not
3890         already in the hash tables.
3891         (file_impossible, file_impossible_p, dir_name, print_dir_data_base):
3892         Use the new directory/file scheme.
3894         * make.texinfo: Miscellaneous editorial changes and clarifiactions.
3896         * commands.c (struct child): Remove `environ' member.
3897         (child_handler, start_job, execute_file_commands): Remove use of
3898         `environ' member and new_environ.
3900         * make.c (main): Call new_environ after reading makefiles.
3902         * variable.h: Declare `new_environ' to return void.
3904         * variable.c (new_environ): Put the environment in `environ' and
3905         return void.
3907 Fri Oct  7 15:48:39 1988  Roland McGrath  (mcgrath at pepper.Berkeley.EDU)
3909         * Version 3.12.
3911         * Makefile: Don't make the uncompressed tar file.
3913         * variable.c (expand_function: `shell' function): Made it not expect
3914         read to null-terminate the buffer.
3916         * Makefile: Made it use a temporary symlink to . rather than a
3917         temporary directory to make the distribution tar file.
3919 Thu Oct  6 17:52:35 1988  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
3921         * Version 3.11.
3923         * make.texinfo: Fixed a line that got garbaged somehow.
3925 Mon Oct  3 16:14:39 1988  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
3927         * make.c (main): Try to move back to the directory we started in
3928         before re-exec ourself.
3930         * remake.c (update_file_1): A double-colon target with no deps
3931         always needs to be remade.
3933         * remake.c (remake_file): Changed "No way to make" message to say
3934         `target' rather than `file'.
3936 Sun Oct  2 12:50:47 1988  Roland McGrath  (mcgrath at catnip.Berkeley.EDU)
3938         * remake.c (update_file_1): Set FILE->update_status to the return
3939         value of remake_file.
3941         * rule.c (convert_to_pattern): Fixed swapped lengths passed to
3942         xmalloc for source/target suffixes.
3944         * make.texinfo: Documented that MAKEFLAGS and MFLAGS are read in
3945         from makefiles.  Updated the `Features' section a bit.
3947         * make.c (main): Read switches from MAKEFLAGS and MFLAGS variables
3948         after reading in makefiles.
3950         * make.c (main): Put a line "/tmp/foo:;" rather than ".PHONY:
3951         /tmp/foo" in front of temp files made for stdin makefiles.
3953         * remake.c (update_file): Test the state of the right `struct file'
3954         for double-colon files.
3956         * make.c (main): Put a ".PHONY: /tmp/foo" line in front of temp
3957         files made for stdin makefiles so they won't be remade when we
3958         re-exec.  Kludge-o-matic!!
3960         * remake.c (update_goal_chain): Judge files as being finished based
3961         on their `updated' flag, not their state.
3963         * read.c (read_makefile): Don't check for FILENAME being "-".
3964         (read_all_makefiles): Set each element of MAKEFILES to the name put
3965         in READ_MAKEFILES by read_makefile, since read_makefile may free the
3966         storage for the name it is passed, and someone might want to look at
3967         the elements of MAKEFILES again.
3969         * make.c (main): For each `-f' flag with arg `-' (standard input),
3970         read standard input into a temp file and pass the temp file's name
3971         to read_all_makefiles, after making sure it will not be remade.
3973         * make.c (construct_makeflags): Always put out `-j1'.
3975 Sat Oct  1 00:19:59 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
3977         * commands.c (execute_file_commands): If commands are nothing but
3978         whitespace, set the state to `cs_finished' before returning 0.
3980         * make.c (decode_switches): Allocate space for args in stringlists
3981         so they can be freed later.
3983         * make.h: Declare `makelevel'.
3985         * variable.c (makelevel): Moved to make.c (and made global).
3987         * make.c (fatal, error): Print the makelevel if it's > 0.
3988         (perror_with_name): Use error rather than calling fprintf directly.
3989         (pfatal_with_name): Use fatal rather than fprintf and die.
3991         * variable.c (new_environ): Don't put default variables (origin
3992         `o_default') into the environment; they just take up space.
3994         * read.c (read_makefile): Don't add FILENAME to the chain of read
3995         makefiles if it's "-" (standard input).
3997         * remake.c (update_goal_chain): Set STATUS correctly when nothing
3998         happens (as well as in all other situations).
4000         * make.c (construct_makeflags): Put a `-' before each switch and
4001         spaces between them.
4003         * Version 3.10.
4005         * commands.c (wait_for_children): Don't check if `children' is nil.
4006         This is the case when waiting for the child of a `shell' function.
4008         * dir.c (dir_load): Don't add a hash-table entry for directory
4009         DIRNAME and filename "" if DIRNAME doesn't exist.
4011         * commands.c (execute_file_commands): Return 0 after start_job
4012         returns 1 (failure) under the -n flag.
4014         * remake.c (remake_file): Set the state to `cs_finished' when not
4015         calling execute_file_commands.
4017         * remake.c (update_goal_chain): Second arg is now MAKEFILES, nonzero
4018         meaning to disable -t, -q, and -n for each target unless the target
4019         was also given on the command-line.
4021         * read.c (read_makefile): Enter the `struct file's for the makefiles
4022         added to the `read_makefiles' `struct dep' chain.
4024         * remake.c (update_goal_chain): Made it not enter the files for the
4025         goals in the chain.  It will already have been done.
4027         * rule.c (convert_to_pattern): Null-terminate the names of targets
4028         and deps of the pattern rules properly.
4030 Fri Sep 30 18:56:20 1988  Roland McGrath  (mcgrath at nutmeg.Berkeley.EDU)
4032         * make.c (main): Call install_default_pattern_rules.
4034         * make.h: Declare copy_dep_chain.
4036         * read.c (copy_dep_chain): Moved to make.c (and made global).
4038         * make.c (main): Call update_goal_chain to update goals.
4039         Update read makefiles and re-exec self if they change.
4041         * remake.c (update_file): Make this function static.
4042         (update_goal_chain): New function to update a `struct dep' chain of
4043         goals, waiting until they are all finished before returning.
4045         * make.h: Don't declare update_file.  Declare update_goal_chain.
4047         * make.c (main): Call snap_deps, etc. that were in read_all_makefiles.
4049         * read.c (find_makefile): Removed this function.
4050         (read_all_makefiles): Don't update makefiles, don't diddle with
4051         pattern rules, don't call snap_deps, etc.  Return a `struct dep'
4052         chain of all makefiles read.
4053         (read_makefile): Now takes two args: FILENAME and TYPE, which is 0
4054         for a normal makefile, 1 for MAKEFILES variable or 2 for an included
4055         makefile.  Add a `struct dep' containing the name of the makefile
4056         (as it was found in the search path for type 2s), and TYPE in the
4057         `changed' member to the global `read_makefiles' chain.
4059         * make.h, rule.c (displace_pattern_rules,
4060         add_displaced_pattern_rules): Removed these functions.
4062         * read.c (read_makefile): Variable-expand the name of an `include'd
4063         makefile before calling find_makefile on it.
4065         * file.c (snap_deps): If the `struct file' for a `struct dep'
4066         already exists, free the `struct dep's `name' member before setting
4067         it to nil (since this info is in the `struct file').
4069         * read.c (copy_dep_chain): Made it copy each name rather than
4070         leaving multiple `struct dep's with the same pointers.
4072 Thu Sep 29 19:08:13 1988  Roland McGrath  (mcgrath at catnip.Berkeley.EDU)
4074         * make.c (decode_switches): Fixed second decode_env_switches call to
4075         use correct length of "MFLAGS" (6, not 5).
4077         * read.c (read_makefile): Don't stop reading when readline returns
4078         zero lines read.  Only stop when the stream reaches EOF.  This makes
4079         it recognize the last line of a makefile without a newline.
4081         * remake.c (remake_file): If we don't know how to make FILE, set its
4082         command state to `cs_finished'.
4084         * remake.c (update_file): Don't write the "up to date" message if
4085         update_file_1 returned a nonzero status.
4087 Wed Sep 28 16:30:07 1988  Roland McGrath  (mcgrath at catnip.Berkeley.EDU)
4089         * commands.c (child_handler): Set the `update_status' member
4090         properly for ignored errors.
4092         * rule.c (convert_to_pattern): Made it not care about if the target
4093         suffix comes before the source suffix in the .SUFFIXES list.
4095         * make.texinfo: Misc editorial changes.
4097         * commands.c (wait_for_children): Return immediately if `children'
4098         is nil (there are no children).
4100 Tue Sep 27 15:33:14 1988  Roland McGrath  (mcgrath at pepper.Berkeley.EDU)
4102         * Version 3.09.
4104         * commands.c (struct child): New member `command_ptr' to hold the
4105         current position in the commands.  The `commands' member is never
4106         changed.
4107         (start_job, child_handler, execute_file_commands): Use new method
4108         for `commands' and `command_ptr' members.
4110         * make.c (decode_env_switches): Skip past an invalid letter (instead
4111         of looping forever).
4113         * commands.c (struct child): Add `environ' member to hold the
4114         environment for this child.
4115         (execute_file_commands): Get a new environment from new_environ and
4116         put in the the new `struct child's `environ' member.
4117         (child_handler): When freeing a child, free its `commands' member, the
4118         elements of its `environ' array and its `environ' member itself.
4119         (start_job): Set `environ' to the child's `environ' member before
4120         exec'ing the command.
4122         * variable.h, variable.c (new_environ): Made it return the new
4123         environment, not putting it in `environ'.
4125         * remake.c (update_file): Don't give a "is up to date" message
4126         unless no files were remade and the state went from `cs_not_started'
4127         to `cs_finished', so repeat calls to finish jobs won't get the message.
4129 Mon Sep 26 16:26:08 1988  Roland McGrath  (mcgrath at helen.Berkeley.EDU)
4131         * Version 3.08.
4133         * make.texinfo (Commands: Execution): Documented that children will
4134         be waited for rather than killed.
4136         * commands.c (fatal_error_signal): Wait for children.
4137         (kill_children): Removed this function.
4139         * make.c (main, die): Wait for children to die, don't kill them.
4141         * variable.c (expand_function): Use wait_for_children.
4143         * make.c (main): Use wait_for_children rather than child_handler.
4145         * commands.c (wait_for_children): New function to block waiting for
4146         children, insuring that child_handler is not called recursively.
4147         (execute_file_commands, kill_children): Use wait_for_children.
4149         * commands.c (child_handler): Start up additional commands in a
4150         sequence after an ignored error.
4152         * remake.c (update_file): Don't print "`foo' is up to date" messages
4153         when update_file_1 returns while commands are executing.
4155         * remake.c (update_file_1): Pass the file name to name_mtime, not
4156         the bloody `struct file', dammit!!
4158         * commands.c (child_handler): Print out the "*** ..." error message
4159         when not under -i.  (I somehow forgot this.)
4161         * remake.c (update_file_1): Use name_mtime rather than file_mtime to
4162         re-get the mtime of a file whose commands have finished.
4164         * make.c (command_switches, decode_switches, decode_env_switches):
4165         Make all switches that take string args allow them right after the
4166         switch letter.
4168         * commands.c (child_handler): Check for a child being the `shell'
4169         function's command returning and set the global variable for
4170         expand_function to check.
4172         * variable.c (expand_function): For the `shell' function, instead of
4173         waiting for the child shell ourselves, let child_handler do it and
4174         loop around waiting for something to happen.
4176         * make.c (print_version): Made the copyright year static, not dynamic.
4178         * make.h, make.c: Remove construct_argv function.
4180         * make.c (main): Say "no goal target" instead of "no target".
4182         * make.texinfo (Commands: Parallel): Don't send SIGKILL.
4184         * commands.c (kill_children): Don't send SIGKILL to children that
4185         aren't killed by the first signal.
4187         * make.c (main), commands.c (kill_children): Decide between SIGCHLD
4188         and SIGCLD based on whether or not SIGCHLD is defined, not on USG.
4190         * Makefile: Link make with $(LOADLIBES).
4192         * read.c (construct_include_path): Fixed another bad xrealloc call.
4194         * make.c (decode_switches): Fixed an xrealloc call with no first arg.
4196 Sat Sep 24 01:16:21 1988  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
4198         * Version 3.07.
4200         * remake.c (update_file_1): If deps are running, set state to
4201         `cs_deps_running' and return 0.  If deps are done, run commands.
4203         * commands.c (child_handler): Made it delete non-precious targets
4204         killed by fatal signals.
4206         * make.texinfo: Documented parallelism.
4208 Fri Sep 23 16:52:27 1988  Roland McGrath  (mcgrath at helen.Berkeley.EDU)
4210         * remake.c (update_file_1): Don't return if FILE's state is
4211         `cs_deps_running'.  In that case, we need to run through and check
4212         the states of all our dependencies.
4214         * commands.c (execute_file_commands): Decrement `job_slots' after
4215         starting a new job to run file commands.
4217         * commands.c (start_job): Made it set the state to `cs_running'.
4219         * make.c (main): Fixed usage of `g', `lastgoal', and `goals' in the
4220         goal-making loop.
4222         * commands.c (child_handler): When commands finish, set the
4223         corresponding file's `update_status' and `updated' flags as
4224         appropriate, and reset the modtimes of the file and any `also_make'
4225         files it has.
4227         * remake.c (remake_file): Don't re-set `last_mtime' and set `updated'.
4229         * commands.c (fatal_error_signal): Don't swallow all the children
4230         with a loop around `wait ((union wait *) 0)'!!!
4232         * make.c (struct command_switch): Added `positive_int' type.
4233         (switches): Added -j (job_slots).
4234         (construct_makeflags, decode_switches, decode_env_switches):
4235         Handle`positive_int'-type switches.
4237         * glob.c (glob_vector): Rename local variable `vector' to `VeCtOr'.
4238         This is said to avoid a conflict with some system's global `vector'
4239         variable.
4241         * variable.c (expand_function): Made the `shell' function use
4242         construct_command_argv and do its own child control and piping.
4244         * make.c (main): Turn standard input into a broken pipe after
4245         reading in all makefiles (the last time it will be needed).
4247         * commands.c (struct child): Remove `pipe_fd' member.  We don't use
4248         pipes any more.
4249         (start_job): Return 0 for success, 1 or failure (rather than void).
4250         Don't use pipes.  Don't turn the child's stdin into a broken pipe.
4251         (child_handler): Print "*** Error" messages when necessary.
4252         Die on failed commands when -k was not given.
4253         (execute_file_commands): Check the return of start_job and remove
4254         the child from the chain and return failure if it is nonzero.
4256         * make.c (die): New function to clean up and exit.
4257         (fatal, pfatal_with_name): Use die.
4259 Thu Sep 22 14:27:11 1988  Roland McGrath  (mcgrath at helen.Berkeley.EDU)
4261         * commands.c (struct child): Added `commands', `pipe_fd', and
4262         `noerror' members to keep track of info about a command thread.
4263         (start_job): New function to start a job and update the argument
4264         `struct child' to reflect its status.
4265         (execute_file_commands): Merged run_file_commands back in.
4266         Made it use new start_job function.
4268         * rule.c (freerule): Don't free the `struct commands' of the
4269         discarded rule.  It may be used in more than one place.
4271         * commands.c (execute_command_line): Made it not try to delete the
4272         possibly partly-made file.  The child_handler function will do this.
4273         (fatal_error_signal): Ditto + call kill_children.
4275         * make.h: Declare job_slots.
4277         * make.c (main): Collect goals in a dep chain and run through this
4278         chain waiting for a child, eliminating finished goals, updating all
4279         remaining goals, and quitting if they fail and not -k.
4281         * commands.c (child_handler): If called with SIG < 0, - SIG is the
4282         max number of children to bury.
4284         * commands.c (child_handler): If called with SIG as zero,
4285         block waiting for running children.
4286         (kill_children): Call child_handler with zero rather than SIGCHLD.
4288         * remake.c (update_file_1): Use the `command_state' member of FILE
4289         and its dependencies to determine what commands are running, what to
4290         do, etc.  If commands or dep commands are running when we are
4291         called, return success (0).  If commands finished since the last
4292         time we were called, return their status.
4294         * commands.h: Declare kill_children.
4296         * commands.c: Define `struct child' to keep track of child
4297         processes, with the chain in `children'.
4298         (child_handler): New function to catch child-termination signals
4299         (SIGCHLD, or SIGCLD for USG), store the returned status in the
4300         appropriate structure, take the now-obsolete `struct child' out of
4301         the chain, and free its storage.
4302         (execute_file_commands): Put all of the stuff invloving running the
4303         commands into new function run_file_commands.  Execute_file_commands
4304         now does process management for the commands, while
4305         run_file_commands (which is run in a subprocess) runs the commands.
4306         (kill_children): New function to kill all running children by
4307         sending them signal SIG.  If there are any children still living
4308         after they are all sent SIG, they are all sent SIGKILL.
4310         * make.c (main): Catch SIGCHLD (SIGCLD for USG) with child_handler.
4312         * commands.h: Declare child_handler function.
4314         * commands.c (execute_file_commands): Check the `command_state'
4315         member of FILE and return 0 if it is `cs_running' or
4316         `cs_deps_running' and return the stored status if it is `cs_finished'.
4318         * file.h (struct file): Added `command_state' member.
4320         * commands.c (execute_command_line): Add `$' to the list of
4321         characters special to the shell.
4323 Wed Sep 21 15:57:41 1988  Roland McGrath  (mcgrath at helen.Berkeley.EDU)
4325         * read.c (read_all_makefiles): Call convert_to_pattern before
4326         recomputing the limits after adding the displaced rules.
4328         * make.c (main): Move calls to snap_deps, convert_to_pattern, and
4329         build_vpath_lists to read_all_makefiles.
4331         * read.c (read_all_makefiles): Install the default pattern rules
4332         before checking to remake the makefiles, displace these rules before
4333         reading in the makefiles, and then add the displaced rules to the
4334         chain after reading in all the makefiles.
4336         * make.c (main): Don't call install_default_pattern_rules or
4337         count_implicit_rule_limits.
4339         * make.h: Declare displace_pattern_rules and
4340         add_displaced_pattern_rules.
4342         * rule.c (displace_pattern_rules, add_displaced_pattern_rules): New
4343         functions to stow the chain and add the stowed chain on the end of
4344         the current chain.
4346         * make.texinfo (Implicit: Search Algorithm): Fixed PREV reference.
4348         * make.c (main): Call construct_include_path right after decoding
4349         the switches.
4351         * read.c (find_makefile): Use rename_file.
4353         * file.h: Declare rename_file.
4355         * file.c (rename_file): New function to rename a `struct file' and
4356         put it in the correct hash bucket.
4358         * read.c (find_makefile): New function to find and update a makefile.
4359          (read_all_makefilese): Use find_makefile.
4360          (read_makefile): Don't do updating.  Removed UPDATEIT arg.
4362         * remake.c (update_file_1): Took out setting the `updated' member to
4363         -1 rather than 1 sometimes.
4365         * make.c (main): Made it print version info before doing anything else.
4367         * remake.c (library_file_mtime, f_mtime): Removed use of last two
4368         arguments to vpath_search.
4370         * rule.c (pattern_search): Removed use of last two arguments
4371         to vpath_search.
4373         * vpath.c (vpath_search, selective_vpath_search): Removed unused
4374         DIRPREFIX and DPLEN args.
4376         * read.c (read_makefile): Also turn off -n when updating makefiles.
4378 Tue Sep 20 17:01:10 1988  Roland McGrath  (mcgrath at pepper.Berkeley.EDU)
4380         * Makefile: Put tags files in the tarfile.
4382         * read.c (read_makefile): Get the modtime of the makefile via a stat
4383         call so that a later file_mtime call won't do VPATH search for it.
4385         * read.c (read_makefile): Don't turn off -t and -q if the makefile
4386         was a command-line target.
4388         * make.c (main): Enter command-line targets as files and set their
4389         `cmd_target' members.
4391         * file.h (struct file): Added `cmd_target' member.
4393         * read.c (read_makefile): Temporarily turn off -t and -q while
4394         updating makefiles.
4396         * make.c (main): Don't use arg 0 from other_args (which is now
4397         argv[0]; i.e., the program's name).
4399         * read.c (read_makefile): Only return nonzero if commands were
4400         actually run to remake the makefile.
4402         * remake.c (update_file_1): Set FILE->updated to -1 if no commands
4403         were actually run (because no update was done or -t was given).
4405         * make.c (decode_switches): Fixed bug wherein xrealloc was passed
4406         bad args if it tried to expand other_args->list.
4408         * read.c (read_all_makefiles): Made it not look at the `MAKE'
4409         variable, just use argv[0].
4411 Sun Sep 18 17:34:11 1988  Roland McGrath  (mcgrath at paris.Berkeley.EDU)
4413         * read.c (rerun_make): New function to re-exec make.
4415         * make.c (construct_makeflags, construct_argv): New functions to
4416         construct the `MAKEFLAGS' variable and to construct an arg list from
4417         parsed info.
4419         * read.c (read_makefile): New arg UPDATEIT, if nonzero, says to
4420         update the makefile as a target before reading it in.  When reading
4421         included makefiles, pass this as zero.  Now returns nonzero if the
4422         makefile was updated, zero if not.
4423         (read_all_makefiles): Pass a nonzero UPDATEIT arg to read_makefile
4424         for all default and -f makefiles and all makefiles from the
4425         `MAKEFILES' variable.  If any of the makefiles has changed, re-exec
4426         self to re-read them.
4428         * remake.c (update_file): Print a "File `foo' up to date'" message
4429         under -p.
4431         * commands.c (execute_file_commands): Allocate one byte for each of
4432         $^ and $< rather than zero if they are to be empty.
4434 Fri Sep 16 13:59:59 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4436         * Version 3.06.
4438         * make.c (command_switches): Fixed entry for `-o' switch.
4440         * make.texinfo: Renamed -c switch to -C.
4442         * make.c: Renamed -c switch to -C.
4444         * Miscellaneous de-linting.
4446         * read.c (record_files): Made it not free the storage for the name
4447         if it started with `./' and was therefore not quite the same as in
4448         the `struct file'.
4450         * read.c (record_files): If commands were specified twice, the error
4451         message specifies in what files and at what line numbers.
4453         * make.c (main): If any of the signals we usually fatal on were
4454         ignored by the parent (probably a shell), ignore them.
4456         * make.c (main): Print version info for -v, -p, or -d.
4457         (print_data_base): Don't print version info.  It will be done in main.
4459         * variable.c: Increased number of hash buckets to 257.
4461         * file.c: Increased number of hash buckets to 1007.
4463         * rule.c (count_implicit_rule_limits): Moved comptation of
4464         `maxsuffix' to convert_to_pattern, since that function uses
4465         `maxsuffix', and must be called before count_implicit_rule_limits.
4467         * rule.c (pattern_search): If an existent (non-intermediate)
4468         dependendency was found via a terminal rule, set its
4469         `tried_implicit' flag, so it will never have implicit rule search done.
4471         * glob.c: Bug fix to avoid alloca(0).
4473         * arscan.c: USG and Sun386i fixes.
4475 Thu Sep 15 19:40:26 1988  Roland McGrath  (mcgrath at helen.Berkeley.EDU)
4477         * make.texinfo: Fixed some typos and spelling errors.
4479 Wed Sep  7 14:20:39 1988  Roland McGrath  (mcgrath at helen.Berkeley.EDU)
4481         * make.c (decode_switches): Fixed bug wherein a bad option would
4482         give a useless error message and loop forever.
4484 Tue Sep  6 14:36:02 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4486         * make.texinfo: Documented `shell' function.
4488         * variable.c (expand_function): New function `shell', does
4489         backquote-style command expansion of its arg.
4491         * commands.c (execute_command_line): Second arg OUTBUF, if not nil,
4492         gets filled in with a malloc'd buffer containing the piped stdout of
4493         the command.
4494         (execute_file_commands): Use above (pass nil).
4496 Mon Sep  5 17:03:49 1988  Roland McGrath  (mcgrath at hecuba.Berkeley.EDU)
4498         * Makefile: Added copyright notice.
4499         Added a comment about defining `NO_MINUS_C_MINUS_O' if necessary.
4501         * Version 3.05.
4503         * rule.c (default_suffix_rules): Don't pass `-o' switches with `-c'
4504         switches if `NO_MINUS_C_MINUS_O' is #define'd.
4506         * make.texinfo: Documented `GNUmakefile'.
4508         * read.c (read_all_makefiles): Made it try default makefile
4509         `GNUmakefile' before others.
4511         * make.texinfo: Added new-style Texinfo header thingies.
4513 Sat Sep  3 18:09:39 1988  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
4515         * Version 3.04.
4517         * make.texinfo (Chained Rules): Added a @cindex about using
4518         .PRECIOUS to preserve intermediate files.
4520         * remake.c (update_file_1): Made it not just return before executing
4521         commands under -p.
4523         * rule.c (default_pattern_rules, default_variables): Made it use
4524         `$(AR)' for `ar r' (to put files in archives).
4526         * vpath.c (build_vpath_lists): Made it recursively expand the
4527         `VPATH' variable (by using variable_expand instead of lookup_variable).
4529         * read.c (conditional_line): Made it not swallow whitespace after
4530         the comma in an `ifeq' using the `(a,b)' syntax.
4532         * rule.c (count_implicit_rule_limits): Made it not crash if a
4533         pattern rule dep begins with `/'.
4535 Sun Aug 28 15:51:12 1988  Roland McGrath  (mcgrath at homer.Berkeley.EDU)
4537         * make.texinfo: Clarified that the arg to the `origin' function is a
4538         variable *name*, not a reference.
4540         * make.texinfo: Clarified that both -Idir and -I dir are allowed.
4542 Sat Aug 27 13:49:28 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4544         * remake.c (remake_file): Made touching phonies work right.
4546 Wed Aug 24 20:40:48 1988  Roland McGrath  (mcgrath at nutmeg.Berkeley.EDU)
4548         * make.texinfo: Removed reference to `RANLIB' variable.
4550         * Version 3.03.
4552         * variables.c (expand_function): Added `origin' function.
4553         * make.texinfo: Documented same.
4555         * read.c (record_files): Made double-colon entries work.
4557 Sat Aug 20 21:09:39 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4559         * make.c (collapse_continuations): Bug fix from RMS.
4561         * rule.c (install_default_pattern_rules): Made it set the
4562         `in_use' flag of the created rules to zero, rather than letting
4563         it be random garbage.
4565         * rule.c (pattern_search): Fixed putting `also make' targets into
4566         file strucutres.
4568         * read.c (record_files): Fixed bug which made double-colon entries
4569         make it read off into space.
4571         * make.c (decode_switches): Made it understand `ignored' switches
4572         rather than dumping core.
4574 Sun Aug 14 16:49:00 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4576         * read.c (read_makefile): Made `include' filenames be
4577         variable-expanded.
4579         * read.c (read_makefile): Fixed an error message.
4581         * read.c (read_makefile): Made it accept ^L's as whitespace.
4582         * make.c (next_token, end_of_token): Ditto.
4584         * vpath.c (vpath_search): Fixed it so that the general VPATH (from
4585         the variable) is always checked, even if a selective VPATH (from a
4586         directive) matched the filename.
4588 Sat Aug 13 14:20:46 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4590         * make.c (decode_switches, main): Made the command switches be
4591         processed from a table of switches, variables, and types.  No
4592         functions are passed argc and argv any more.  They are passed arrays
4593         of strings they need to process.
4594         * read.c (read_all_makefiles): Made it take an array rather than
4595         argc and argv.
4596         (construct_include_path): Ditto.
4598         * make.c (collapse_continuations): Made it work right (I hope).
4600         * make.texinfo: Minor editorial changes.
4602         * read.c (read_makefile): Minor speed improvement by freeing and
4603         then mallocing something rather than reallocing it to avoid the
4604         unnecessary bcopy.
4606 Thu Aug 11 00:10:43 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4608         * make.texinfo: Fixed some unquoted @'s.
4610         * make.texinfo: Documented multiple-target pattern rules.
4611         Miscellaneous minor editorial changes and corrections.
4613         * make.texinfo (Implicit: Catalogue of Rules): Removed the list of
4614         variables.  That's what the next section is for.
4615         (Implicit: Implicit Variables): Made it agree with reality.
4617 Wed Aug 10 00:55:39 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4619         * variable.c (print_variable_data_base): Fixed bug which made -p
4620         dump core.  (This was a really idiotic bug.)
4622         * rule.c (pattern_search): Fixed a bug which made it make the
4623         `also_make' member of the file in question nil if the first of
4624         the successful rule's targets was the matching one.
4625         Made it use only as much storage as necessary in the `also_make'
4626         member.
4627         (create_pattern): Made it use only as much storage as necessary in
4628         the `lens' and `suffixes' members of the created rule.
4630         * remake.c (library_file_mtime): Made it `static'.
4632         * file.c: Added a declaration for `errno', which is declared in some
4633         <errno.h>'s, but not all.
4635         * file.h (struct file): Added `also_make' member for multiple-target
4636         implicit rules.
4637         * rule.c (pattern_search): Made it put the names of files updated by
4638         the given file's commands in its `also_make' member.
4639         * remake.c (update_file_1): Made it mark the files in a file's
4640         `also_make' member as updated when the file is updated.
4642         * variable.c (try_variable_definition): Fixed a bug which made it
4643         define a variable with the name of the whole definition when there
4644         was no space before the = or :=.
4646         * make.texinfo (Features): Made the changes which were made in RCS
4647         revision 2.7 but somehow lost since then.  Added -W.
4649 Tue Aug  9 10:04:50 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4651         * variable.h: Added `o_default' to `enum variable_origin'.
4652         * variable.c (print_variable_data_base): Made it print the origins of
4653         the variables.
4654         * rule.c (install_default_pattern_rules): Made it define the default
4655         variables with origin `o_default'.
4657         * make.texinfo: Documented -W.
4659         * make.c (decode_switches, main): Added the -W flag to give files a
4660         time-stamp of now, for a `what if' effect when used with -n.
4662         * commands.c (print_commands): Made it say `(built-in)' for commands
4663         that are built into the default ruleset.
4665         * read.c (record_file): Made .SUFFIXES get its deps frontwards (again).
4666         * rule.c (set_default_suffixes, convert_to_pattern): Made it read
4667         .SUFFIXES's deps frontwards, so the converted rules will not be in
4668         reverse order.
4670         * rule.c (new_pattern_rule): Fixed a bug wherein it would keep
4671         searching after it had removed a matching rule and ended up diddling
4672         with freed storage.
4674         * rule.c (freerule): Made it take the given rule off the chain.
4675         (new_pattern_rule, count_implicit_rule_limits): Use freerule to
4676         remove rules from the chain.
4678         * vpath.c (construct_vpath_list): Made it return after cleaning out
4679         all previous searchpaths when given a nil DIRPATH arg, so it won't
4680         go into the construction code and dump core dereferencing a nil
4681         pointer.
4683         * variable.c (patsubst_expand): Fixed a bug which made it not match
4684         correctly and sometimes dump core.
4686 Mon Aug  8 16:35:48 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4688         * rule.c (default_suffix_rules): Made the .texinfo.dvi rule remove
4689         the files used in the comparison to determine whether or not a
4690         second TeX run is necessary.
4692         * make.texinfo: Fixed some overfull TeX hboxes.
4694         * make.texinfo (Implicit: Catalogue of Rules): Fixed a Texinfo error.
4696         * rule.c (create_pattern_rule): Fixed bug wherein index was not
4697         being passed its second arg.
4699         * read.c (getline): Merged back into readline.
4701         * rule.c (default_suffixes, default_suffix_rules,
4702         default_variables): Added .texinfo.info rule.
4703         * make.texinfo (Implicit: Catalogue of Rules): Documented
4704         .texinfo.dvi and .texinfo.info rules.
4706         * make.texinfo (Top): Changed `last updated' date to be correct (for
4707         the last time it was updated, not today).  Changed `for version
4708         3.00' since it's not going to be called that.
4710 Sat Aug  6 19:51:10 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4712         * commands.c (print_commands): Added this function to print the
4713         contents of a `struct commands' for -p.
4714         * rule.c (print_rule_data_base): Use above.
4715         * file.c (print_file_data_base): Ditto.
4717         * rule.c (count_implicit_rule_limits, new_pattern_rule,
4718         install_pattern_rule, print_rule_data_base): Made it understand the
4719         changed `struct rule' and act accordingly.
4720         (freerule): Added this function to free all the storage used by a rule.
4722         * rule.c (pattern_search): Made it grok multiple targets of pattern
4723         rules.  The matching is done properly, but at present, only the
4724         matching pattern's target is used to give deps and commands.
4726 Fri Aug  5 18:00:29 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4728         * rule.c (struct rule): Changed name, namelen, and patsuffix members
4729         to targets, lens, and suffixes, which are arrays, for multiple targets.
4730         (create_pattern_rule): Now takes first arg TARGETS, a nil-terminated
4731         array of targets, rather than a single target and patsuffix pointer.
4733         * read.c (record_files): If it finds an implicit pattern rule, it
4734         collects all the targets into an array and passes the whole thing to
4735         create_pattern_rule.  If there are non-pattern targets, it is a
4736         fatal error.
4738 Tue Aug  2 15:06:38 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4740         * make.c (readline): Split backslash-newline checking from reading
4741         and buffer-expanding.
4742         (getline): Created to do the reading and buffer-expanding formerly
4743         done in readline.
4745         * rule.c (pattern_search): Made it reject nonterminal match-anything
4746         rules when a specific rule has matched, rather than rejecting
4747         terminal match-anything rules in this case.
4749         * rule.c (convert_to_pattern): Fixed a bug caused when the change to
4750         make it only recognize two-suffix rules whose target suffixes
4751         precede their dependency suffixes which made it work in the opposite
4752         direction (even worse than it started out).
4754         * rule.c (pattern_search): Made it reject nonterminal match-anything
4755         rules as intermediate targets when searching for both real and
4756         intermediate dependencies, rather than only when searching for
4757         intermediate ones.
4759 Sun Jul 31 00:33:56 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4761         * rule.c (convert_to_pattern): Made it only recognize two-suffix
4762         rules whose target suffix comes before the dependency suffix in the
4763         .SUFFIXES list.
4765         * variable.c (define_automatic_variables): Made all automatic
4766         variables be defined with origin `o_automatic'.
4768         * variable.h: Added `o_automatic' to `enum variable_origin'
4770         * file.c (remove_intermediates): Made it not print an error message
4771         if the error was that the file does not exist.
4773         * rule.c: Removed `recursive' member from `struct rule'.
4775         * remake.c (library_file_mtime): Made it not use the directory hash
4776         functions, as reading in and hashing /usr/lib and /lib is slow and
4777         most likely unnecessary.
4779         * remake.c (remake_file): Changed message from ``No specification
4780         for making'' to ``No way to make'' so it will be short enough that
4781         most filenames will fit on a line.
4782         Made it look at the `recursive' member of the `struct commands',
4783         rather than of the `struct file' (which no longer has one).
4785         * commands.c (execute_file_commands): Made it look at the
4786         `recursive' member of the `struct commands', rather than of the
4787         `struct file' (which no longer has one).
4789         * file.h: Removed `recursive' member from `struct file'.
4791         * commands.h: Added `recursive' member to `struct commands'.
4793         * dep.h: Removed unused `quotedparen' member from `struct nameseq'
4794         and `struct dep'.
4796         * read.c (dequote): Removed this function.
4797         (multi_glob): Removed reference to `quotedparen' member of
4798         a `struct nameseq' and calls to dequote.
4800         * read.c (record_files): Made it set the stem for $* for all static
4801         pattern rules, not just those with commands given at that time.
4802         Removed check for recursive commands.
4803         Made it check for pairs of .SUFFIXES dependencies to reject as
4804         default goals as well as single ones (that don't start with dots).
4805         (read_makefile): Added checks for recursive commands to set
4806         the `recursive' flag in the `struct commands'.
4808 Sat Jul 30 15:47:23 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4810         * make.c (find_next_token): Made the LENGTHPTR arg optionally nil.
4812         * make.c: Removed `files_made' variable which is defined static in
4813         remake.c and used only there.
4814         (main): Cleaned up somewhat.
4815         (decode_switches): Cleaned up a bit.  Made an unknown option be a
4816         non-fatal error.
4817         (decode_env_switches): Made LEN arg unsigned.  Cleaned up.
4818         (print_version): Made it say ``see the source'' rather than ``see
4819         the source file'', since there is more than one.
4821         * file.h: Made `num_intermediates' declared unsigned.
4823         * file.c: Made `num_intermediates' variable unsigned.
4824         (remove_intermediates): Removed unused FORMAT arg.
4825         (enter_file): Made it handle double-colon files properly, adding the
4826         new entry as the old entry's prev pointer.
4828         * dir.c: Re-indented the `struct dir' definition to be right.
4829         (dir_load): Cleaned up slighty.
4830         (file_exists_p): Removed comment saying we could use `access', since
4831         that is a bad idea (except for setuid programs).  Cleaned up slightly.
4833         * commands.c: Changed some comments slightly.
4834         (execute_file_commands): Cleaned up a bit.  Changed some comments,
4835         added others.  Moved freeing of storage for $^ and $? to the same
4836         place as for the other automatic variables.
4837         (execute_command_line): Made `#' trigger a shell.
4838         Added some comments.  Cleaned up a bit.  Put all the special chars
4839         that trigger shells into an array easily changeable at the top.
4841         * ar.c: Added comments explaining each function.
4842         (ar_scan_1): Merged into ar_member_date.
4843         (ar_member_date): Changed call to ar_scan_1 to the body of that
4844         function.
4845         (ar_member_date_1): Simplified to a ?: expression rather than an
4846         if-else statement.
4847         (ar_member_touch): Changed error handling around a bit.
4848         None of these errors are fatal now.
4850         * variable.c (subst_expand): Added a new arg BY_WORD, to do substs
4851         only on full words.
4852         (patsubst_expand): Fixed bug which made calls whose patterns
4853         contained no `%' to not work correctly, by using above.
4854         (variable_expand): Pass extra arg to `subst_expand'.
4856         * variable.c (expand_function): Fixed bug which made `foreach' calls
4857         with one-word lists run off into never-never land.
4859 Fri Jul 29 20:12:36 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4861         * variable.c (expand_function): Made a very minor speed improvement
4862         by avoiding an unnecessary strlen call.
4864 Wed Jul 27 16:01:47 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4866         * rule.c (default_suffixes): Rearranged the list somewhat; added
4867         `.el' and `.elc' to speed things up (especially when building
4868         Emacs), for the same reason `.h' is there.
4870         * read.c (record_files): Changed `lineno' from `long' to
4871         `unsigned int'.
4873 Sun Jul 24 02:15:30 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4875         * variable.c (expand_function): Eliminated use of `wstok'
4876         because it is non-reentrant and unreliable.
4877         Fixed a minor bug which would cause something not to be freed.
4878         * make.c (wstok): Removed `wstok' because it is no longer used.
4880         * variable.c (expand_function): Made `foreach' function put
4881         spaces between output texts like it's supposed to.
4883 Sat Jul 23 17:32:55 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4885         * rule.c (default_suffixes, default_suffix_rules): Added rule
4886         to make %.dvi from %.texinfo.
4888         * dir.c (print_dir_data_base): Made it say a bit more.
4890 Fri Jul 22 23:13:16 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4892         * make.c (print_data_base): Split this function up into one
4893         for each thing.
4894         * variable.c (print_variable_data_base): One of the above.
4895         * rule.c (print_rule_data_base): Ditto.
4896         * file.c (print_file_data_base): Ditto.
4897         * dir.c (print_dir_data_base): Ditto.
4899         * rule.c (install_pattern_rule): Fixed a bug which caused the
4900         terminal and recursive flags to always be zero for rules
4901         entered by this function.
4903         * make.texinfo (Rules: Double-colon): Added a paragraph
4904         explaining the purpose of double-colon rules.
4906         * make.texinfo (Implicit: Catalogue of Rules): Updated to
4907         reflect new C++, TeX, Web, and Texinfo rules.  Other slight
4908         editorial changes.
4910         * commands.c (execute_file_commands): Fixed a bug wherein
4911         random memory could get written for files with no deps.
4913 Wed Jul 20 19:30:31 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4915         * read.c (readline): Fix bug wherein it would not recognize a
4916         backslash-newline if the buffer filled up and was enlarged
4917         right before reading the newline.
4919 Tue Jul 19 19:55:02 1988  Roland McGrath  (mcgrath at chilli.Berkeley.EDU)
4921         * read.c: Added default suffix rules for .cc (using $(C++),
4922         which defaults to `g++', and $(C++FLAGS)), .tex, .dvi, .web
4923         and .cweb (using $(TEX), $(WEAVE), $(TANGLE), $(CWEAVE) and
4924         $(CTANGLE)).
4926 Sat Jul 16 21:24:28 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4928         * Made error formats use %u rather than %ld for line numbers,
4929         which are now unsigned int's rather than long's.
4931         * read.c (conditional_line): Fixed some bugs caused by use of
4932         unsigned int rather than int in one place.
4934         * read.c (conditional_line): Put the info about active
4935         conditionals in a struct.
4936         (read_makefile): Make a new struct of info about conditionals
4937         for included makefiles and restore the old one after the
4938         included makefile has been read.
4940         * read.c (read_makefile): Don't try to read a makefile with
4941         name "" after giving an error message because an `include'
4942         directive gave no filename.
4944         * read.c (read_makefile): Give an error message for
4945         non-whitespace text after the filename in an `include' directive.
4947         * make.c (error): Take five args, like `fatal'.  It managed to
4948         lose with only two.  Is there a better way to do this without vfprintf?
4950         * read.c (read_makefile): Commands consisting of only
4951         whitespace are not the same as no commands.  I thought I'd
4952         fixed this bug months ago; it seems to have come back.
4954         * make.c (collapse_continuations): All whitespace around a
4955         backslash-newline combination is turned into a single space.
4957         * Added COPYING file and copyright notices to all files.
4959         * make.texinfo (Running: Goals): Fix a typo.
4961         * read.c (do_define): Take an arg for the origin of the
4962         variable being defined.
4963         (read_makefile): Grok `override define'.
4965         * make.texinfo (Variables: Override Directive, Defining):
4966         Document the `override define' combination directive.
4968         * ar.c (ar_member_date): Make a 0 return from `ar_scan' return
4969         (time_t) -1 (nonexistent file), rather than (time_t) 0, which,
4970         when put in the `struct file', makes `file_mtime' try to get
4971         the mtime over and over again.
4973         * variable.c (pattern_matches): Fix a bug that made patterns
4974         not beginning with `%' never match.
4976 Fri Jul 15 21:01:44 1988  Roland McGrath  (mcgrath at tully.Berkeley.EDU)
4978         * Took Make out of RCS.
4980         * Split the monolithic `make.c' into several smaller files.
4984 Copyright (C) 1988-2009 Free Software Foundation, Inc.
4985 This file is part of GNU Make.
4987 GNU Make is free software; you can redistribute it and/or modify it under the
4988 terms of the GNU General Public License as published by the Free Software
4989 Foundation; either version 3 of the License, or (at your option) any later
4990 version.
4992 GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
4993 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
4994 A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
4996 You should have received a copy of the GNU General Public License along with
4997 this program.  If not, see <http://www.gnu.org/licenses/>.