1 Wed Mar 8 13:10:57 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
5 * main.c (decode_switches): Reset optind to 1 instead of 0.
7 Tue Mar 7 17:31:06 1995 Roland McGrath <roland@geech.gnu.ai.mit.edu>
9 * main.c (decode_switches): If non-option arg is "-", ignore it.
11 Mon Mar 6 23:57:38 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
15 Wed Feb 22 21:26:36 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
19 Tue Feb 21 22:10:43 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
21 * main.c (main): Pass missing arg to tmpnam.
23 * configure.in: Check for strsignal.
24 * job.c (child_error): Use strsignal.
25 * main.c (main): Don't call signame_init #ifdef HAVE_STRSIGNAL.
27 * misc.c (strerror): Fix swapped args in sprintf.
29 Mon Feb 13 11:50:08 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
31 * configure.in (CFLAGS, LDFLAGS): Don't set these variables.
33 Fri Feb 10 18:44:12 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
35 * main.c (print_version): Add 95 to copyright years.
39 * job.c (start_job_command): Remember to call notice_finsihed_file
40 under -n when not recursing. To do this, consolidate that code
41 under the empty command case and goto there for the -n case.
43 Tue Feb 7 13:36:03 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
45 * make.h [! STDC_HEADERS]: Don't declare qsort. Sun headers
48 Mon Feb 6 17:37:01 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
50 * read.c (read_makefile): For bogus line starting with tab, ignore
51 it if blank after removing comments.
53 * main.c: Cast results of `alloca' to `char *'.
56 Sun Feb 5 18:35:46 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
60 * configure.in: Check for mktemp.
61 * main.c (main) [! HAVE_MKTEMP]: Use tmpnam instead of mktemp.
63 * configure.in (make_cv_sysconf_open_max): New check for `sysconf
65 * acconfig.h: Added #undef HAVE_SYSCONF_OPEN_MAX.
66 * job.c [HAVE_SYSCONF_OPEN_MAX] (getdtablesize): Define as macro
69 Fri Jan 27 04:42:09 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
71 * remake.c (update_file_1): When !MUST_MAKE, don't set
72 FILE->update_status to zero before calling notice_finished_file.
73 (notice_finished_file): Touch only when FILE->update_status is zero.
74 (remake_file): Set FILE->update_status to zero after not calling
75 execute_file_command and deciding to touch instead.
77 Thu Jan 26 01:29:32 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
79 * main.c (debug_signal_handler): New function; toggles debug_flag.
80 (main): Handle SIGUSR1 with that.
82 Mon Jan 16 15:46:56 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
84 * compatMakefile (realclean): Remove Info files.
86 Sun Jan 15 08:23:09 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
90 * job.c (start_job_command): Save and restore environ around vfork
92 (search_path): Function #if 0'd out.
93 (exec_command): Use execvp instead of search_path.
95 * expand.c (variable_expand): Rewrote computed variable name and
96 substitution reference handling to be simpler. First expand the
97 entire text between the parens if it contains any $s, then examine
98 the result of that for subtitution references and do no further
99 expansion while parsing them.
101 * job.c (construct_command_argv_internal): Handle " quoting too,
102 when no backslash, $ or ` characters appear inside the quotes.
104 * configure.in (union wait check): If WEXITSTATUS and WTERMSIG are
105 defined, just use int.
107 Tue Jan 10 06:27:27 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
109 * default.c (default_variables) [__hpux]: Remove special
110 definition of ARFLAGS. Existence of the `f' flag is not
111 consistent across HPUX versions; and one might be using GNU ar
114 * compatMakefile (clean): Don't remove Info files.
116 * compatMakefile (check): Remove gratuitous target declaration.
118 Sat Jan 7 11:38:23 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
120 * compatMakefile (ETAGS, CTAGS): Don't use -t.
122 * arscan.c (ar_name_equal) [cray]: Subtract 1 like [__hpux].
124 * main.c (decode_switches): For --help, print usage to stdout.
126 Mon Dec 5 12:42:18 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
130 * remake.c (update_file_1): Do set_command_state (FILE,
131 cs_not_started) only if old state was deps_running.
133 Mon Nov 28 14:24:03 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
135 * job.c (start_waiting_job): Use set_command_state.
137 * build.template (CPPFLAGS): New variable.
138 (prefix, exec_prefix): Set from @...@.
139 (compilation loop): Pass $CPPFLAGS to compiler.
141 * GNUmakefile (build.sh.in): Make it executable.
143 * GNUmakefile (globfiles): Add configure.in, configure.
147 * configure.in (AC_OUTPUT): Don't write glob/Makefile.
149 * configure.in (AC_CHECK_SYMBOL): Use AC_DEFINE_UNQUOTED.
151 * configure.in: Don't check for ranlib.
153 Tue Nov 22 22:42:40 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
155 * remake.c (notice_finished_file): Only mark also_make's as
156 updated if really ran cmds.
158 Tue Nov 15 06:32:46 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
160 * configure.in: Put dnls before random whitespace.
162 Sun Nov 13 05:02:25 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
164 * compatMakefile (CPPFLAGS): New variable, set from @CPPFLAGS@.
165 (RANLIB): Variable removed.
166 (prefix, exec_prefix): Set these from @...@.
167 (.c.o): Use $(CPPFLAGS).
168 (glob/libglob.a): Don't pass down variables to sub-make.
169 glob/Makefile should be configured properly by configure.
170 (distclean): Remove config.log and config.cache (autoconf stuff).
172 Mon Nov 7 13:58:06 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
174 * acconfig.h: Add #undef HAVE_UNION_WAIT.
175 * configure.in: Converted to Autoconf v2.
176 * dir.c: Test HAVE_DIRENT_H, HAVE_SYS_DIR_H, HAVE_NDIR_H instead
177 of DIRENT, SYSDIR, NDIR.
178 * build.sh.in (prefix, exec_prefix): Set these from @...@.
179 (CPPFLAGS): New variable, set from @CPPFLAGS@.
180 (compiling loop): Pass $CPPFLAGS before $CFLAGS.
181 * install.sh: File renamed to install-sh.
183 * main.c (define_makeflags): When no flags, set WORDS to zero.
185 Sun Nov 6 18:34:01 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
189 * main.c (define_makeflags): Terminate properly when FLAGSTRING is
192 Fri Nov 4 16:02:51 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
196 Tue Nov 1 01:18:10 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
200 * job.c (start_job_command): When ARGV is nil, only set
201 update_state and call notice_finished_file if job_next_command
204 * job.c (start_job_command): Call notice_finished_file for empty
207 Thu Oct 27 02:02:45 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
209 * file.c (snap_deps): Set COMMANDS_SILENT for .SILENT, not
212 Wed Oct 26 02:14:10 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
216 Tue Oct 25 22:49:24 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
218 * file.c (snap_deps): Set command_flags bits in all :: entries.
220 Mon Oct 24 18:47:50 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
222 * make.h (posix_pedantic): Declare it.
223 * main.c (main): Move checks .IGNORE, .SILENT, .POSIX to
225 * file.c (snap_deps): Check .IGNORE, .SILENT, .POSIX here instead
226 of in main. If .IGNORE has deps, OR COMMANDS_NOERROR into their
227 command_flags and don't set -i. Likewise .SILENT.
228 * job.c (start_job_command): In FLAGS initialization, OR in
229 CHILD->file->command_flags.
230 * file.h (struct file): New member `command_flags'.
232 Sun Oct 16 01:01:51 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
234 * main.c (switches): Bump flag values for --no-print-directory and
235 --warn-undefined-variables, so neither is 1 (which indicates a
238 Sat Oct 15 23:39:48 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
240 * main.c (main): Add missing code in .IGNORE test.
242 Mon Oct 10 04:09:03 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
244 * variable.c (define_automatic_variables): Define +D and +F.
246 Sat Oct 1 04:07:48 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
248 * main.c (main): Define hidden automatic variable with command
249 vars, and MAKEOVERRIDES to a reference to that.
250 (define_makeflags): If posix_pedantic, write a reference to that
253 Thu Sep 29 00:14:26 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
255 * main.c (posix_pedantic): New variable.
256 (main): Set posix_pedantic if .POSIX is a target.
257 Fix .IGNORE and .SILENT checks to require is_target.
259 * commands.c (set_file_variables): Define new automatic variable
260 $+, like $^ but before calling uniquize_deps.
262 * job.c (reap_children): Call delete_child_targets for non-signal
263 error if .DELETE_ON_ERROR is a target.
265 Tue Sep 27 01:57:14 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
269 Mon Sep 26 18:16:55 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
271 * job.c (reap_children): Don't change C->file->command_state when
272 dying. Test it only after calling start_job_command for a new
273 command line. When no more cmds, just set C->file->update_status.
274 (start_job_command): When the last line is empty or under -n, set
275 C->file->update_status.
276 (start_waiting_job): Grok cs_not_started after start_job_command
278 (new_job): Set C->file->update_status when there are no cmds.
279 (job_next_command): When out of lines, don't set
280 CHILD->file->update_status or CHILD->file->command_state.
282 * main.c (quote_as_word): Renamed from shell_quote. Take new arg;
283 if nonzero, also double $s.
284 (main): Define MAKEOVERRIDES from command_variables here.
285 (define_makeflags): Don't use command_variables here; instead write a
286 reference $(MAKEOVERRIDES) in MAKEFLAGS. Make vars recursive.
288 * dir.c [__MSDOS__]: Fixed typo.
290 * vpath.c (selective_vpath_search): Reset EXISTS when stat fails.
292 Sat Sep 10 03:01:35 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
294 * remake.c: Include <assert.h> and use assert instead of printfs
297 * main.c (decode_switches): Loop until optind hits ARGC, not just
298 until getopt_long returns EOF. Initialize C to zero before loop;
299 in loop if C is EOF, set optarg from ARGV[optind++], else call
301 (decode_env_switches): Use variable_expand instead of
302 allocated_variable_expand. Allocate a fresh buffer to copy split
303 words into; scan characters by hand to break words and
305 (shell_quote): New function.
306 (define_makeflags): Allocate doubled space for switch args, and command
307 variable names and values; use shell_quote to quote those things.
309 Fri Sep 9 01:37:47 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
313 * acconfig.h: Add HAVE_SYS_SIGLIST and HAVE__SYS_SIGLIST.
315 * main.c (decode_switches): The non-option return from getopt is
317 (command_variables): New type and variable.
318 (decode_switches, decode_env_switches): After making a variable
319 definition, record the struct variable pointer in the
320 command_variables chain.
321 (define_makeflags): If ALL, write variable definitions for
324 * main.c (other_args): Variable removed.
325 (goals, lastgoal): New static variables (moved from auto in main).
326 (main): Don't process OTHER_ARGS at all.
327 Don't set variable MAKEOVERRIDES at all; define MAKE to just
329 (init_switches): Prepend a - {return in order} instead of a +
331 (decode_switches): Don't set OTHER_ARGS at all.
332 Grok '\0' return from getopt_long as non-option argument; try
333 variable definition and (if !ENV) enter goal targets here.
334 (decode_env_switches): Use allocated_variable_expand to store value.
335 Use find_next_token to simplify word-splitting loop. Don't
336 prepend a dash to uninterpreted value. Instead, if split into
337 only one word, try variable definition and failing that prepend a
338 dash to the word and pass it to decode_switches as a single arg.
340 Wed Sep 7 03:02:46 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
342 * remake.c (notice_finished_file): Only recheck modtimes if
343 FILE->command_state was cs_running on entry (meaning the commands
345 (update_file_1): Whenever we set FILE->update_status, call
346 notice_finished_file instead of just set_command_state.
347 * job.c (start_job_command): Whenever we set
348 CHILD->file->update_status, call notice_finished_file instead of
349 just set_command_state.
351 Tue Sep 6 19:13:54 1994 Roland McGrath <roland@geech.gnu.ai.mit.edu>
353 * default.c: Add missing ".
355 * job.c: Changed all assignments of command_state members to calls
356 to set_command_state.
357 * remake.c: Likewise.
358 * file.c (set_command_state): New function.
359 * file.h: Declare set_command_state.
361 * main.c (init_switches): Put a + first in options.
363 Mon Jul 25 18:07:46 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
365 Merge MSDOS/GO32 port from DJ Delorie <dj@ctron.com>.
366 * vpath.c: Changed all uses of ':' to PATH_SEPARATOR_CHAR.
367 * main.c (directory_before_chdir): New variable, moved out of main
369 (main) [__MSDOS__]: Look for \ or : to delimit last component of
370 PROGRAM. Don't frob ARGV[0] before setting MAKE_COMMAND variable.
371 (die): Change back to `directory_before_chdir' before dying.
372 * make.h (PATH_SEPARATOR_CHAR): New macro; differing defns for
374 * job.c [__MSDOS__]: Include <process.h>.
375 [__MSDOS__] (dos_pid, dos_status, dos_bname, dos_bename,
376 dos_batch_file): New variables.
377 (reap_children) [__MSDOS__]: Don't call wait; just examine those vars.
378 (unblock_sigs) [__MSDOS__]: Do nothing.
379 (start_job_command) [__MSDOS__]: Use spawnvpe instead of vfork & exec.
380 (load_too_high) [__MSDOS__]: Always return true.
381 (search_path) [__MSDOS__]: Check for : or / in FILE to punt.
382 Use PATH_SEPARATOR_CHAR instead of ':'.
383 (construct_command_argv_internal) [__MSDOS__]: Wholly different
384 values for sh_chars and sh_cmds. Wholly new code to handle shell
386 * function.c (expand_function: `shell') [__MSDOS__]: Wholly new
388 * dir.c [__MSDOS__] (dosify): New function.
389 (dir_contents_file_exists_p) [__MSDOS__]: Call it on FILENAME and
390 process the result instead of FILENAME itself.
391 (file_impossible_p) [__MSDOS__]: Likewise.
392 * default.c [__MSDOS__]: Define GCC_IS_NATIVE.
393 (default_suffix_rules) [__MSDOS__]: Use `y_tab.c' instead of `y.tab.c'.
394 (default_variables) [GCC_IS_NATIVE]: Set CC and CXX to `gcc', YACC to
395 `bison -y', and LEX to `flex'.
396 * configure.bat, configh.dos: New files.
397 * commands.c (fatal_error_signal) [__MSDOS__]: Just remove
398 intermediates and exit.
400 * commands.c (set_file_variables): Add parens in length
401 computation in .SUFFIXES dep loop to quiet compiler warning. From
404 * read.c (read_makefile): Free FILENAME if we allocated it. From
407 Mon Jul 4 17:47:08 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
409 * misc.c (safe_stat): New function, EINTR-safe wrapper around stat.
410 * vpath.c (selective_vpath_search): Use safe_stat in place of stat.
411 * read.c (construct_include_path): Use safe_stat in place of stat.
412 * job.c (search_path): Use safe_stat in place of stat.
413 * dir.c (find_directory): Use safe_stat in place of stat.
414 * commands.c (delete_target): Use safe_stat in place of stat.
415 * arscan.c (ar_member_touch) [EINTR]: Do EINTR looping around fstat.
416 * remake.c (name_mtime): Use safe_stat in place of stat.
417 (touch_file) [EINTR]: Do EINTR looping around fstat.
419 Fri Jun 24 05:40:24 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
421 * read.c (read_makefile): Check for a shell command first, and
422 then strip leading tabs before further checking if it's not a
425 * make.h [__arm]: Undefine POSIX.
426 [!__GNU_LIBRARY__ && !POSIX && !_POSIX_VERSION]: Don't declare system
427 functions that return int.
429 * job.c (construct_command_argv_internal): After swallowing a
430 backslash-newline combination, if INSTRING is set goto string_char
431 (new label) for normal INSTRING handling code.
433 Sat Jun 4 01:11:20 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
435 * configure.in: Don't check for sys_siglist and _sys_siglist with
436 AC_HAVE_FUNCS. Instead use two AC_COMPILE_CHECKs.
438 Mon May 23 18:20:38 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
440 * Version 3.71.1 released.
442 * make.h [!__GNU_LIBRARY__ && !POSIX]: Also test #ifndef
443 _POSIX_VERSION for these declarations.
445 * misc.c [GETLOADAVG_PRIVILEGED] [POSIX]: Remove bogus #ifndefs
446 around #undefs of HAVE_SETREUID and HAVE_SETREGID.
448 Sat May 21 16:26:38 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
450 * Version 3.71 released.
452 * misc.c [GETLOADAVG_PRIVILEGED] [POSIX]: Don't test [HAVE_SETUID]
453 and [HAVE_SETGID]. Every system has those, and configure doesn't
456 * make.h [_POSIX_VERSION]: Don't #define POSIX #ifdef ultrix.
458 * compatMakefile (loadavg): Depend on and use loadavg.c instead of
460 (loadavg.c): Link or copy it from getloadavg.c.
461 (distclean): Remove loadavg.c.
463 Mon May 16 22:59:04 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
467 * misc.c [GETLOADAVG_PRIVILEGED] [! POSIX]: Undefine HAVE_SETEUID
470 * default.c (default_terminal_rules): In SCCS rules, put
471 $(SCCS_OUTPUT_OPTION) before $<. On some systems -G is grokked
472 only before the file name.
473 * configure.in (SCCS_GET_MINUS_G check): Put -G flag before file name.
475 Tue May 10 16:27:38 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
477 * job.c (construct_command_argv_internal): Swallow
478 backslash-newline combinations inside '' strings too.
480 Thu May 5 04:15:10 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
482 * read.c (do_define): Call collapse_continuations on each line
485 Mon Apr 25 19:32:02 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
487 * job.c (construct_command_argv_internal): Notice newline inside
488 '' string when RESTP is non-null.
490 Fri Apr 22 17:33:30 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
494 * remake.c (update_goal_chain): Reset FILE to G->file after the
495 double-colon loop so it is never null for following code.
497 * read.c (read_makefile): Fix `override define' parsing to skip
498 whitespace after `define' properly.
500 * compatMakefile (srcdir): Define as @srcdir@; don't reference
502 (glob/Makefile): New target.
504 Thu Apr 21 16:16:55 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
508 * misc.c (remove_comments): Use find_char_unquote.
509 * make.h (find_char_unquote): Declare it.
510 * read.c (find_char_unquote): New function, generalized from
512 (find_percent, find_semicolon, parse_file_seq): Use that.
514 Wed Apr 20 18:42:39 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
516 * implicit.c (pattern_search): Always allocate new storage for
517 FILE->stem. It is not safe to store STEM's address because it
518 might be auto storage.
520 * configure.in: Check for seteuid and setegid.
521 * misc.c [HAVE_SETEUID]: Declare seteuid.
522 [HAVE_SETEGID]: Declare setegid.
523 (make_access, user_access) [HAVE_SETEUID]: Use seteuid.
524 [HAVE_SETEGID]: Use setegid.
526 * remake.c (update_goal_chain): Set STATUS to FILE->update_status,
527 to preserve whether it's 2 for error or 1 for -q trigger. When
528 STATUS gets nonzero and -q is set, always stop immediately.
529 * main.c (main, decode_switches): Die with 2 for errors.
530 (main): Accept 2 return from update_goal_chain and die with that.
531 * misc.c (fatal, makefile_fatal): Die with 2; 1 is reserved for -q
533 * job.c (reap_children): Die with 2 for error.
534 (start_job_command): Set update_status to 2 for error. Set it to
535 1 when we would run a command and question_flag is set.
537 * read.c (read_makefile): Don't mark makefiles as precious. Just
538 like other targets, they can be left inconsistent and in need of
539 remaking by aborted commands.
541 * read.c (read_makefile): Write no error msg for -include file.
543 Tue Apr 5 05:22:19 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
545 * commands.c (fatal_error_signal): Don't unblock signals.
547 * file.h (struct file): Change member `double_colon' from flag to
549 * read.c (record_files): Set double_colon pointer instead of flag.
550 * main.c (main): When disqualifying makefiles for updating, use
551 double_colon pointer to find all entries for a file.
552 * file.c (enter_file): If there is already a double-colon entry
553 for the file, set NEW->double_colon to that pointer.
554 (file_hash_enter): Use FILE->double_colon to find all entries to
556 * remake.c (update_goal_chain): Do inner loop on double-colon entries.
557 (update_file): Use FILE->double_colon pointer to find all entries.
559 (notice_finished_file): Propagate mtime change to all entries.
561 * variable.c (try_variable_definition): Return after abort.
563 Fri Apr 1 18:44:15 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
565 * read.c (read_makefile): Remove unused variable.
566 (parse_file_seq): When removing an elt that is just `)', properly
567 fix up the previous elt's next pointer.
569 Mon Mar 28 18:31:49 1994 Roland McGrath (roland@mole.gnu.ai.mit.edu)
571 * configure.in: Do AC_SET_MAKE.
572 * GNUmakefile (Makefile.in): Edit MAKE assignment into @SET_MAKE@.
574 Fri Mar 4 00:02:32 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
576 * function.c (subst_expand): If BY_WORD or SUFFIX_ONLY is set and
577 the search string is the empty string, find a match at the end of
578 each word (using end_of_token in place of sindex).
580 * misc.c (end_of_token): Don't treat backslashes specially; you
581 can no longer escape blanks with backslashes in export, unexport,
582 and vpath. This was never documented anyway.
584 Thu Mar 3 23:53:46 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
586 * read.c (read_makefile): Variable name for `define' is not just
587 first token; use whole rest of line and strip trailing blanks.
589 Wed Feb 16 16:03:45 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
593 * read.c (read_makefile): Add -d msg stating args.
595 * read.c (read_makefile): Use isspace to skip over leading
596 whitespace, and explicitly avoid skipping over tabs. Don't want
597 to skip just spaces though; formfeeds et al should be skipped.
599 * default.c (default_variables) [__hpux]: Add f in ARFLAGS.
601 * arscan.c (ar_name_equal) [__hpux]: Subtract 2 instead of 1 from
602 sizeof ar_name for max length to compare.
604 * misc.c [GETLOADAVG_PRIVILEGED] [POSIX]: Undefine HAVE_SETREUID
605 #ifdef HAVE_SETUID; likewise HAVE_SETREGID and HAVE_SETGID.
607 * main.c (main): Call user_access after setting `program', in case
608 it needs to use it in an error message.
610 * read.c (read_makefile): Ignore an empty line starting with a tab.
612 Thu Feb 10 21:45:31 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
614 * configure.in (AC_SYS_SIGLIST_DECLARED): Use this instead of
615 AC_COMPILE_CHECK that is now its contents.
617 Fri Feb 4 16:28:54 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
619 * make.h: #undef strerror after #include <string.h>.
620 [! ANSI_STRING]: Declare strerror.
622 Thu Feb 3 02:21:22 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
624 * misc.c (strerror): #undef any macro before function definition.
626 Mon Jan 31 19:07:23 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
628 * variable.c (try_variable_definition): Calculate BEG before loop
629 to strip blanks by decrementing END. Don't decr END to before BEG.
631 * read.c (read_makefile): Skip over leading space characters, but
632 not tabs, after removing continuations and comments (it used to
635 Tue Jan 25 16:45:05 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
637 * variable.c (define_automatic_variables): In $(@D) et al, use
638 patsubst to remove trailing slash.
640 * commands.c (delete_target): New function, broken out of
641 delete_child_targets. Check for archive members and give special msg.
642 (delete_child_targets): Use delete_target.
644 Mon Jan 17 17:03:22 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
646 * default.c (default_suffix_rules): Use $(TEXI2DVI_FLAGS) in
647 texi2dvi rules. Use $(MAKEINFO_FLAGS) in makeinfo rules.
649 Tue Jan 11 19:29:55 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
651 * GNUmakefile (tarfiles): Omit make-doc.
652 (make-$(version).tar): Include make.info*.
654 Fri Jan 7 16:27:00 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
656 * compatMakefile (configure, config.h.in): Comment out rules.
658 Thu Jan 6 18:08:08 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
660 * compatMakefile (binprefix, manprefix): New variables.
661 (instname): Variable removed.
662 (install): Use $({bin,man}prefix)make in place of $(instname).
663 File targets likewised renamed.
665 Mon Jan 3 17:50:25 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
667 * Version 3.70 released.
669 Thu Dec 23 14:46:54 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
673 * read.c (parse_file_seq): Inside multi-word archive ref
674 translation loop, check NEW1==0 at end and break out of the loop.
676 * GNUmakefile (make-$(version).tar): Distribute install.sh.
677 * install.sh: New file.
679 * configure.in (SCCS_GET_MINUS_G check): Put redirection for admin
680 cmds outside subshell parens, to avoid "command not found" msgs
683 Wed Dec 22 17:00:43 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
685 * configure.in (SCCS_GET_MINUS_G check): Put -G flag last in get cmd.
686 Redirect output & error from get to /dev/null.
687 Fix reversed sense of test.
689 Fri Dec 17 15:31:36 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
691 * configure.in (SCCS_GET_MINUS_G check): Use parens instead of
692 braces inside if condition command; some shells lose.
694 Thu Dec 16 15:10:23 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
698 * arscan.c [M_UNIX]: Move #undef M_XENIX for PORTAR stuff.
699 (PORTAR) [M_XENIX]: Define to 0 instead of 1.
701 * main.c (define_makeflags): Only export MAKEFLAGS if !ALL.
703 Wed Dec 15 17:47:48 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
705 * main.c (main): Cast result of pointer arith to unsigned int
706 before passing to define_variable for envars. Matters when
707 sizeof(unsigned)!=sizeof(ptrdiff_t).
709 Tue Dec 14 14:21:16 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
711 * configure.in: Add new check for SCCS_GET_MINUS_G.
712 * config.h.in: Add #undef SCCS_GET_MINUS_G.
713 * default.c (default_terminal_rules): Use `$(SCCS_OUTPUT_OPTION)' in
714 place of `-G $@' in SCCS commands.
715 (default_variables) [SCCS_GET_MINUS_G]: Define SCCS_OUTPUT_OPTION
718 * configure.in (AC_OUTPUT): Put touch stamp-config in second arg
719 (so it goes in config.status), rather than afterward.
721 * ar.c (ar_member_date): Don't call enter_file on the archive file
722 if it doesn't exist (by file_exists_p).
724 * compatMakefile ($(infodir)/make.info): Replace `$$d/foo.info'
725 with `$$dir/make.info' in install-info invocation (oops).
727 * vpath.c (construct_vpath_list): Only set LASTPATH set PATH when
728 we do not unlink and free PATH.
730 * file.c (print_file_data_base): Fix inverted calculation for
731 average files per hash bucket.
733 * read.c (readline): When we see a NUL, give only a warning and
734 synthesize a newline to terminate the building line (used to
735 fatal). Move fgets call into the loop condition, and after the
736 loop test ferror (used to test !feof in the loop).
738 Fri Dec 3 16:40:31 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
740 * configure.in: Check for strerror in AC_HAVE_FUNCS.
742 Thu Dec 2 15:37:50 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
744 Differentiate different flavors of missing makefile error msgs,
745 removing gratuitous `fopen: ' and giving caller for included makefiles.
746 * misc.c [! HAVE_STRERROR]: Define our own strerror here.
747 (perror_with_name, pfatal_with_name): Use strerror instead of
748 replicating its functionality.
749 * read.c (read_makefile): Return int instead of void.
750 (read_all_makefiles, read_makefile): Change callers to notice zero
751 return and give error msg.
753 Thu Nov 11 11:47:36 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
757 * default.c: Put `-G $@' before $< in SCCS cmds.
759 Wed Nov 10 06:06:14 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
761 * read.c (read_makefile): After trying a variable defn, notice if
762 the line begins with a tab, and diagnose an error.
764 Sun Nov 7 08:07:37 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
768 Wed Nov 3 06:54:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
772 * implicit.c (try_implicit_rule): Look for a normal rule before an
775 Fri Oct 29 16:45:28 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
777 * function.c (expand_function: `sort'): Double NWORDS when it
778 overflows, instead of adding five.
780 * compatMakefile (clean): Remove loadavg.
782 Wed Oct 27 17:58:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
786 * file.h (NEW_MTIME): Define new macro.
787 * main.c (main): Set time of NEW_FILES to NEW_MTIME, not to
788 current time returned from system. Removed variable NOW.
789 * remake.c (notice_finished_file): Use NEW_MTIME in place of
790 current time here too.
792 Tue Oct 26 19:45:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
796 * remake.c (update_file_1): Don't clear MUST_MAKE when FILE has no
797 cmds and !DEPS_CHANGED unless also !NOEXIST.
799 Mon Oct 25 15:25:21 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
801 * read.c (parse_file_seq): When converting multi-word archive
802 refs, ignore a word beginning with a '('.
804 Fri Oct 22 02:53:38 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
806 * configure.in: Check for sys/timeb.h.
807 * make.h [HAVE_SYS_TIMEB_H]: Test this before including it.
809 Thu Oct 21 16:48:17 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
813 * rule.c (convert_suffix_rule): New local TARGPERCENT. Set it to
814 TARGNAME+1 for "(%.o)", to TARGNAME for "%.?". Use it in place of
815 TARGNAME to initialize PERCENTS[0].
817 Mon Oct 18 06:49:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
819 * configure.in: Use AC_HAVE_HEADERS(unistd.h) instead of AC_UNISTD_H.
820 Remove AC_USG; it is no longer used.
822 * file.c (print_file): New function, broken out of
823 print_file_data_base.
824 (print_file_data_base): Call it.
825 * rule.c (print_rule): New function, broken out of
826 print_rule_data_base.
827 (print_rule_data_base): Call it.
829 Thu Oct 14 14:54:03 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
831 * default.c (install_default_suffix_rules): New function, broken
832 out of install_default_implicit_rules.
833 (install_default_implicit_rules): Move suffix rule code there.
834 * make.h: Declare install_default_suffix_rules.
835 * main.c (main): Call install_default_suffix_rules before reading
836 makefiles. Move convert_to_pattern call before
837 install_default_implicit_rules.
839 * job.h (struct child): Make `pid' member type `pid_t' instead of
842 * compatMakefile (RANLIB): New variable, set by configure.
843 (glob/libglob.a): Pass RANLIB value down to submake.
845 Fixes for SCO 3.2 "devsys 4.2" from pss@tfn.com (Peter Salvitti).
846 * make.h: Include <sys/timeb.h> before <time.h> for SCO lossage.
847 * job.c [! getdtablesize] [! HAVE_GETDTABLESIZE]: If NOFILE is not
848 defined but NOFILES_MAX is, define it to be that.
850 Mon Oct 11 19:47:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
852 * GNUmakefile (make-$(version).tar): Depend on acconfig.h, so it
855 Sun Oct 3 15:15:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
857 * default.c (default_terminal_rules): Add `-G $@' to SCCS get cmds.
859 Tue Sep 28 14:18:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
861 * job.c (construct_command_argv_internal): Add ^ to SH_CHARS; it
862 is another symbol for | in some shells.
863 * main.c (main): Add it to CMD_DEFS quoting list as well.
865 Mon Sep 20 18:05:24 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
867 * job.c (construct_command_argv_internal): Remove '=' from
868 SH_CHARS. Only punt on '=' if it is unquoted in a word before the
869 first word without an unquoted '='.
871 * main.c (define_makeflags): Set v_export for MAKEFLAGS.
873 Fri Sep 17 00:37:18 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
875 * remake.c (update_file_1): Use .DEFAULT cmds for phony targets.
877 * make.h [_AIX && _POSIX_SOURCE]: Define POSIX.
879 * commands.c (delete_child_targets): Don't delete phony files.
881 * job.c (start_job_command): Set COMMANDS_RECURSE in FLAGS if we
882 see a `+' at the beginning of the command line.
884 Thu Sep 9 17:57:14 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
888 Wed Sep 8 20:14:21 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
890 * main.c (define_makeflags): Define MAKEFLAGS with o_file, not o_env.
892 Mon Aug 30 12:31:58 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
894 * expand.c (variable_expand): Fatal on an unterminated reference.
896 Thu Aug 19 16:27:53 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
900 * variable.c (define_automatic_variables): Define new o_default
901 variable `MAKE_VERSION' from version_string and remote_description.
903 * make.h (version_string, remote_description): Declare these here.
904 * main.c: Don't declare version_string.
905 (print_version): Don't declare remote_description.
907 Wed Aug 18 15:01:24 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
909 * read.c (read_makefile): Free space pointed to by CONDITIONALS
910 before restoring the old pointer.
912 Mon Aug 16 17:33:36 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
914 * compatMakefile ($(objs)): Depend on config.h.
916 * GNUmakefile (build.sh.in): Depend on compatMakefile.
918 * configure.in: Touch stamp-config after AC_OUTPUT.
920 Fri Aug 13 16:04:22 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
924 Thu Aug 12 17:18:57 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
926 * make.h: Include <config.h> instead of "config.h".
928 Wed Aug 11 02:35:25 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
930 * main.c (main): Make all variables interned from ENVP be v_export.
931 * variable.c (try_variable_definition): In v_default case, don't
932 check for an o_file variable that `getenv' finds.
934 * job.c (reap_children): New local variable ANY_LOCAL; set it
935 while setting ANY_REMOTE. If !ANY_LOCAL, don't wait for local kids.
937 * main.c (main): Don't call decode_env_switches on MFLAGS. DOC THIS.
939 * function.c (expand_function): #if 0 out freeing of ENVP since it
942 Mon Aug 9 17:37:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
946 * remote-stub.c (remote_status): Set errno to ECHILD before return.
947 * job.c (reap_children): Scan the chain for remote children and
948 never call remote_status if there are none.
950 * function.c (expand_function: `shell'): #if 0 out calling
951 target_environment; just set ENVP to environ instead.
953 * job.c (reap_children): Check for negative return from
954 remote_status and fatal for it.
955 When blocking local child wait returns 0, then try a blocking call
958 Tue Aug 3 00:19:00 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
960 * compatMakefile (clean): Delete make.info* and make.dvi here.
961 (distclean): Not here.
963 * dep.h (RM_*): Use #defines instead of enum to avoid lossage from
964 compilers that don't like enum values used as ints.
966 Mon Aug 2 16:46:34 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
968 * compatMakefile (loadavg): Add $(LOADLIBES).
970 Sun Aug 1 16:01:15 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
974 * compatMakefile (loadavg, check-loadavg): New targets.
975 (check): Depend on check-loadavg.
977 * compatMakefile (glob/libglob.a): Depend on config.h.
979 * misc.c (log_access): Write to stderr instead of stdout.
981 Fri Jul 30 00:07:02 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
985 Thu Jul 29 23:26:40 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
987 * configure.in (SYS_SIGLIST_DECLARED): In test program include
988 <unistd.h> #ifdef HAVE_UNISTD_H.
990 * compatMakefile (.PHONY): Put after `all' et al.
992 * configure.in: Add AC_IRIX_SUN.
994 Wed Jul 28 17:41:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
998 Mon Jul 26 14:36:49 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1002 Sun Jul 25 22:09:08 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1006 * compatMakefile ($(infodir)/make.info): Don't use $(instname).
1007 Run install-info script if present.
1009 Fri Jul 23 16:03:50 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1011 * make.h [STAT_MACROS_BROKEN]: Test this instead of [uts].
1013 * configure.in: Add AC_STAT_MACROS_BROKEN.
1015 Wed Jul 14 18:48:11 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1019 * read.c (read_makefile): Recognize directive `-include', like
1020 `include' but sets RM_DONTCARE flag.
1022 * variable.c (target_environment): If FILE is nil, use
1023 current_variable_set_list in place of FILE->variables.
1024 * function.c (expand_function: `shell'): Get an environment for
1025 the child from target_environment instead of using environ.
1027 * dep.h: Declare read_all_makefiles here.
1028 (RM_*): Define new enum constants.
1029 * read.c (read_makefile): Second arg is FLAGS instead of TYPE.
1030 Treat it as a bit mask containing RM_*.
1031 (read_all_makefiles): For default makefiles, set D->changed to
1032 RM_DONTCARE instead of 1.
1033 * main.c: Don't declare read_all_makefiles here.
1034 (main): Check `changed' member of read_makefiles elts for RM_*
1035 flags instead of specific integer values.
1037 Mon Jul 12 22:42:17 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1039 * make.h [sequent && i386]: #undef POSIX. From trost@cse.ogi.edu.
1041 Thu Jul 8 19:51:23 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1043 * vpath.c (construct_vpath_list): If ELEM is zero 0, free PATTERN
1045 (build_vpath_lists): Empty `vpaths' around construct_vpath_list
1046 call for $(VPATH). Expand $(strip $(VPATH)), not just $(VPATH).
1048 * rule.c (convert_suffix_rule): Use alloca instead of xmalloc for
1049 PERCENTS, whose storage is not consumed by create_pattern_rule.
1051 * make.h [__mips && _SYSTYPE_SVR3]: #undef POSIX.
1053 Wed Jun 30 18:11:40 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1057 * rule.c (max_pattern_targets): New variable.
1058 (count_implicit_rule_limits): Compute its value.
1059 * rule.h: Declare it.
1060 * implicit.c (pattern_search): Make TRYRULES max_target_patterns
1061 times bigger. Move adding new TRYRULES elt inside the inner
1062 targets loop, so each matching target gets its own elt in MATCHES
1063 and CHECKED_LASTSLASH.
1065 * file.c (remove_intermediates): If SIG!=0 say `intermediate file'
1066 instead of just `file' in error msg.
1068 Fri Jun 25 14:55:15 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1070 * job.c (construct_command_argv): Turn off
1071 --warn-undefined-variables around expansion of SHELL and IFS.
1072 * read.c (tilde_expand): Likewise for HOME.
1073 (read_all_makefiles): Likewise for MAKEFILES.
1074 * vpath.c (build_vpath_lists): Likewise for VPATH.
1076 * main.c (warn_undefined_variables_flag): New flag variable.
1077 (switches): Add --warn-undefined-variables.
1078 * make.h (warn_undefined_variables_flag): Declare it.
1079 * expand.c (warn_undefined): New function.
1080 (reference_variable): Call it if the variable is undefined.
1081 (variable_expand): In substitution ref, call warn_undefined if the
1082 variable is undefined.
1084 * default.c (default_pattern_rules): Add `%.c: %.w %.ch' and
1085 `%.tex: %.w %.ch' rules.
1086 (default_suffix_rules: .w.c, .w.tex): Pass three args: $< - $@.
1087 (default_suffixes): Add `.ch'.
1089 Mon Jun 21 17:55:39 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1091 * default.c (default_suffixes): Replace `.cweb' with `.w'.
1092 (default_suffix_rules): Rename `.cweb.c' and `.cweb.tex' to `.w.c'
1095 Fri Jun 11 14:42:09 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1097 * compatMakefile ($(bindir)/$(instname)): Add missing backslash.
1099 Thu Jun 10 18:14:08 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1103 * read.c (multi_glob): Don't free OLD and OLD->name in the
1104 FOUND!=0 fork. Use new block-local variable F instead of
1107 * ar.c (glob_pattern_p): New function, snarfed from glob/glob.c.
1108 (ar_glob): Call it; return nil immediately if MEMBER_PATTERN
1109 contains no metacharacters.
1111 Wed Jun 9 16:25:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1113 * ar.c (ar_glob{_match,_alphacompare}): New function.
1115 * dep.h [! NO_ARCHIVES]: Declare it.
1116 * read.c (multi_glob) [! NO_ARCHIVES]: Use it on archive member elts.
1118 * read.c (read_makefile): Pass flag (1) to parse_file_seq, not to
1119 multi_glob (which doesn't take a 3rd arg).
1120 * rule.c (install_pattern_rule): Likewise.
1121 * default.c (set_default_suffixes): Here too.
1122 * function.c (string_glob): Don't pass gratuitous arg to multi_glob.
1124 * read.c (parse_file_seq) [! NO_ARCHIVES]: Add post-processing
1125 loop to translate archive refs "lib(a b)" into "lib(a) lib(b)".
1127 Mon Jun 7 19:26:51 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1129 * compatMakefile (installdirs): Actually pass directory names.
1130 ($(bindir)/$(instname)): Test chgrp&&chmod exit status with `if';
1131 if it fails, echo a warning msg, but don't make the rule fail.
1133 * read.c (tilde_expand): New function, broken out of tilde_expand.
1134 (multi_glob): Call it.
1135 (construct_include_path): Expand ~ in directory names.
1136 * dep.h: Declare tilde_expand.
1137 * main.c (enter_command_line_file): Expand ~ at the start of NAME.
1138 (main): Expand ~ in -C args.
1139 * read.c (read_makefile): Expand ~ in FILENAME unless TYPE==2.
1141 Fri Jun 4 13:34:47 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1143 * main.c (decode_env_switches): Use xmalloc instead of alloca for ARGS.
1145 * main.c (main): Put result of alloca in temporary variable with
1146 simple assignment, to make SGI compiler happy.
1148 Thu Jun 3 20:15:46 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1152 * main.c (main): Before re-execing, remove intermediate files, and
1153 print the data base under -p. Sexier debugging message.
1155 * implicit.c (pattern_search): Allocate an extra copy of the name
1156 of a winning intermediate file when putting it in FOUND_FILES.
1158 Wed Jun 2 16:38:08 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1160 * read.c (read_makefile): Pass flag (1) to parse_file_seq, not to
1161 multi_glob (which doesn't take a 3rd arg).
1163 * dir.c (dir_contents_file_exists_p): When reading dirents, ignore
1164 chars within D_NAMLEN that are NULs.
1166 * main.c (decode_switches): Don't savestring ARGV[0] to put it
1168 For string switch, don't savestring `optarg'.
1169 (main): Don't free elts of makefiles->list that are "-".
1170 Use alloca'd rather than savestring'd storage for elts of
1171 makefiles->list that are temporary file names.
1172 * read.c (read_all_makefiles): Don't free *MAKEFILES.
1173 * file.c (enter_file): Don't strip `./'s.
1174 * main.c (enter_command_line_file): New function.
1175 (main): Use it in place of enter_file for command-line goals from
1176 other_files, and for old_files and new_files.
1178 Mon May 31 18:41:40 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1182 * compatMakefile (.SUFFIXES): Add .info.
1183 ($(infodir)/$(instname).info): Find make.info* in cwd if there,
1184 else in $srcdir. Use basename to remove dir name from installed name.
1186 Thu May 27 17:35:02 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1188 * implicit.c (pattern_search): When interning FOUND_FILES, try
1189 lookup_file first; if found, free the storage for our copy of the name.
1191 Wed May 26 14:31:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1195 * main.c (decode_switches): In usage msg, write `--switch=ARG' or
1196 `--switch[=OPTARG]' rather than `--switch ARG' or `--switch [ARG]'.
1198 Mon May 24 16:17:31 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1200 * rule.c (convert_suffix_rule): New function.
1201 (convert_to_pattern): Use it instead of doing all the work here
1203 For target suffix `.a', generate both the archive magic rule and
1206 * compatMakefile (distclean): Remove stamp-config.
1208 Sat May 22 16:15:18 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1212 * file.c (remove_intermediates): Don't write extra space after `rm'.
1214 * main.c (struct command_switch.type): Remove `usage_and_exit'.
1215 (print_usage_flag): New variable.
1216 (switches: --help): Make type `flag', to set print_usage_flag.
1217 (init_switches): Remove `usage_and_exit' case.
1218 (decode_switches): Likewise.
1219 (decode_switches): Print usage if print_usage_flag is set.
1220 When printing usage, die with status of BAD.
1221 (main): Die with 0 if print_version_flag.
1223 Fri May 21 16:09:28 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1227 Wed May 19 21:30:44 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1229 * compatMakefile (installdirs): New target.
1230 (install): Depend on it.
1232 Sun May 16 20:15:07 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1236 Fri May 14 16:40:09 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1238 * vpath.c (construct_vpath_list): In removal loop for DIRPATH==0,
1239 set LASTPATH to PATH, not NEXT.
1241 * dir.c (read_dirstream): Break out of loop after incrementing
1242 DS->buckets such that it reaches DIRFILE_BUCKETS; avoid trying to
1243 dereference DS->contents->files[DIRFILE_BUCKETS].
1245 * read.c (read_makefile): Clear no_targets after reading a
1246 targetful rule line.
1248 * main.c (main): If print_version_flag is set, exit after printing
1250 (switches): Change --version docstring to say it exits.
1252 * make.h [butterfly]: #undef POSIX.
1254 Wed May 12 15:20:21 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1258 * arscan.c (ar_scan) [! AIAMAG]: Don't declare LONG_NAME.
1259 [AIAMAG]: Pass TRUNCATE flag arg to (*FUNCTION), always zero.
1261 * function.c (handle_function): Use fatal instead of
1262 makefile_fatal when reading_filename is nil.
1264 * configure.in: Add AC_GETGROUPS_T.
1265 * job.c (search_path): Use GETGROUPS_T in place of gid_t.
1267 Sun May 9 15:41:25 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1271 Fri May 7 18:34:56 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1273 * function.c (handle_function): Fatal for unmatched paren.
1275 Thu May 6 16:13:41 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1279 * commands.c (handling_fatal_signal): New variable.
1280 (fatal_error_signal): Set it.
1281 * job.c (reap_children): Avoid nonreentrant operations if that is set.
1282 * make.h: Declare handling_fatal_signal.
1284 * expand.c (reference_variable): New function, snippet of code
1285 broken out of simple-reference case of variable_expand.
1286 (variable_expand): Use it for simple refs.
1287 (variable_expand): When checking for a computed variable name,
1288 notice a colon that comes before the final CLOSEPAREN. Expand
1289 only up to the colon, and then replace the pending text with a
1290 copy containing the expanded name and fall through to subst ref
1292 (variable_expand): Don't bother expanding the name if a colon
1293 appears before the first $.
1294 (expand_argument): Use alloca instead of savestring.
1295 (variable_expand): For subst ref, expand both sides of = before
1296 passing to [pat]subst_expand. Use find_percent instead of lindex
1297 to check the lhs for a %.
1299 Wed May 5 14:45:52 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1303 Mon May 3 17:00:32 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1305 * arscan.c (ar_name_equal) [AIAMAG]: Abort if TRUNCATED is nonzero.
1307 * read.c (read_makefile): Pass extra arg of 1 to parse_file_seq,
1310 Thu Apr 29 19:47:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1314 * arscan.c (ar_scan): New local flag var LONG_NAME. Set it when
1315 we read the member name in any of the fashions that allow it to be
1316 arbitrarily long. Pass its negation to FUNCTION.
1317 (describe_member): Take TRUNCATED from ar_scan and print it.
1318 (ar_name_equal): Take new arg TRUNCATED; if nonzero, compare only
1319 the first sizeof (struct ar_hdr.ar_name) chars.
1320 (ar_member_pos): Take TRUNCATED from ar_scan, pass to ar_name_equal.
1321 * ar.c (ar_member_date_1): Likewise.
1323 Wed Apr 28 21:18:22 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1325 * job.c (reap_children): Before calling start_job_command to start
1326 the next command line, reset C->remote by calling start_remote_job_p.
1328 Mon Apr 26 15:56:15 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1330 * arscan.c (ar_scan): New local var NAMEMAP.
1331 In loop, rename NAME to NAMEBUF; new var NAME is a pointer; new
1332 flag IS_NAMEMAP. When extracting the member name, always put a
1333 null at its end first. If the name is "//" or "/ARFILENAMES", set
1334 IS_NAMEMAP. If we have already read in NAMEMAP, and NAME looks
1335 like " /N", get full name from NAMEMAP+N.
1336 Else if NAME looks like "#1/N", read N chars from the
1337 elt data to be the full name. At end of loop, if IS_NAMEMAP, read
1338 the elt's data into alloca'd NAMEMAP.
1339 (ar_name_equal): #if 0 truncating code.
1341 * make.h: Don't declare vfork at all. It returns int anyway,
1342 unless <unistd.h> declared it; and we conflicted with some systems.
1344 * main.c (define_makeflags): If FLAGSTRING[1] is '-', define
1345 MAKEFLAGS to all of FLAGSTRING, not &FLAGSTRING[1]. Don't want to
1346 define it to something like "-no-print-directory".
1347 Use %g format instead of %f for floating-valued things.
1349 Thu Apr 22 18:40:58 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1351 * GNUmakefile (Makefile.in): Use a substitution ref on nolib-deps
1352 to change remote-%.dep to remote-stub.dep.
1354 Wed Apr 21 15:17:54 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1358 Fri Apr 16 14:22:22 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1360 * compatMakefile (install): Remove - prefix from chgrp+chmod.
1364 Thu Apr 15 18:24:07 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1366 * acconfig.h: New file; contains "#undef SCCS_GET" for autoheader.
1367 * configure.in: If /usr/sccs/get exists, define SCCS_GET to that,
1369 * default.c (default_variables): Set GET to macro SCCS_GET.
1371 * read.c (parse_file_seq): Take extra arg STRIP; strip `./' only
1372 if nonzero. I hope this is the last time this argument is added
1374 (read_makefile): Pass it 1 when parsing include file names.
1375 Pass it 1 when parsing target file names.
1376 Pass it 1 when parsing static pattern target pattern names.
1377 * rule.c (install_pattern_rule): Pass it 1 when parsing rule deps.
1378 * default.c (set_default_suffixes): Pass it 1 when parsing
1380 * function.c (string_glob): Pass it 0 here.
1382 Wed Apr 14 11:32:05 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1384 * misc.c (log_access): New function.
1385 ({init,user,make,child}_access): Call it.
1386 (child_access): Abort if !access_inited.
1388 * main.c (switches: --no-print-directory): Use 1 instead of -1 for
1389 single-letter option.
1390 (init_switches, decode_switches, define_makeflags): An option with
1391 no single-letter version is no longer indicated by a value of -1;
1392 instead a value that is !isalnum.
1393 (init_switches): Don't put such switches into the string, only
1394 into the long_option table.
1396 * make.h [!NSIG] [!_NSIG]: #define NSIG 32.
1398 * job.c [HAVE_WAITPID]: Remove #undef HAVE_UNION_WAIT. AIX's
1399 bsdcc defined WIF* to use union wait.
1401 * main.c (struct command_switch): Change member `c' to type int.
1402 (switches): Make const.
1403 (decode_switches): Use `const struct command_switch *'.
1404 (define_makeflags): Likewise.
1406 * default.c (default_suffix_rules): Add `-o $@' to makeinfo rules.
1408 Mon Apr 12 12:30:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1412 * configure.in (AC_HAVE_HEADERS): Check for string.h and memory.h.
1413 Removed AC_MEMORY_H.
1414 * make.h [USG, NeXT]: Don't test these.
1415 [HAVE_STRING_H]: Test this to include string.h and define ANSI_STRING.
1416 [HAVE_MEMORY_H]: Test this instead of NEED_MEMORY_H.
1417 [! ANSI_STRING]: Put decls of bcopy et al here.
1418 [sparc]: Don't test this for alloca.h; HAVE_ALLOCA_H is sufficient.
1419 [HAVE_SIGSETMASK]: Test this rather than USG.
1420 [__GNU_LIBRARY__ || POSIX]: Don't #include <unistd.h> again.
1421 * main.c (main): Handle SIGCHLD if defined, and SIGCLD if defined.
1422 It doesn't hurt to do both if they are both defined, and testing
1424 * dir.c: Rationalize directory header conditionals.
1425 * arscan.c [HAVE_FCNTL_H]: Test this rather than USG || POSIX.
1427 * default.c (default_suffixes): Add `.txinfo'.
1428 (default_suffix_rules): Add `.txinfo.info' and `.txinfo.dvi' rules.
1430 * variable.c (try_variable_definition): Replace RECURSIVE flag
1431 with enum FLAVOR, which can be simple, recursive, or append.
1432 Recognize += as append flavor. Set new variable VALUE in a switch
1433 on FLAVOR. For append flavor, prepend the variable's old value.
1434 If the variable was previously defined recursive, set FLAVOR to
1435 recursive; if it was defined simple, expand the new value before
1436 appending it to the old value. Pass RECURSIVE flag to
1437 define_variable iff FLAVOR == recursive.
1439 * variable.c (try_variable_definition): Use alloca and bcopy for
1440 NAME, instead of savestring. Might as well use stack storage
1441 since we free it immediately anyway.
1443 Thu Apr 8 18:04:43 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1445 * job.c (start_waiting_jobs): Move decl of JOB outside of loop.
1447 * main.c (define_makeflags): Rename `struct flag' member `switch'
1448 to `cs', which is not a reserved word.
1450 Wed Apr 7 15:30:51 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1452 * job.c (new_job): Call start_waiting_jobs first thing.
1453 (start_waiting_job): Changed return type from void to int.
1454 Return 0 when putting the child on the waiting_jobs chain.
1455 (start_waiting_jobs): Don't check load and job_slots here.
1456 Always take a job off the chain and call start_waiting_job on it;
1457 give up and return when start_waiting_job returns zero.
1459 * main.c (define_makeflags: struct flag): Change member `char c' to
1460 `struct command_switch *switch'.
1461 (ADD_FLAG): Set that to CS instead of CS->c.
1462 If CS->c is -1, increment FLAGSLEN for the long name.
1463 When writing out FLAGS, handle FLAGS->switch->c == -1 and write
1464 the long name instead.
1466 * compatMakefile (stamp-config): New target of old config.h rule.
1467 Touch stamp-config after running config.status.
1468 (config.h): Just depend on stamp-config, and have empty commands.
1470 Mon Apr 5 20:14:02 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1472 * job.c [HAVE_WAITPID]: #undef HAVE_UNION_WAIT.
1474 * configure.in (AC_HAVE_FUNCS): Check for psignal.
1476 Fri Apr 2 17:15:46 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1478 * main.c (long_option_aliases): Remove "new"; it is already an
1479 unambiguous prefix of "new-file".
1481 Sun Mar 28 16:57:17 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1485 Wed Mar 24 14:26:19 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1487 * vpath.c (selective_vpath_search): When adding the
1488 name-within-directory at the end of NAME, and we don't add a
1489 slash, don't copy FILENAME in one char too far into NAME.
1491 * variable.c (define_automatic_variables): Find default_shell's
1492 length with strlen, not numerology.
1494 Wed Mar 17 20:02:27 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1496 * main.c (define_makeflags): Add the elts of a string option in
1497 reverse order, so they come out right when reversed again.
1499 Fri Mar 12 15:38:45 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1501 * compatMakefile (make.info): Use `-o make.info'.
1503 Thu Mar 11 14:13:00 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1505 * compatMakefile (REMOTE): Set to @REMOTE@; change comments to
1507 (objs): Replace remote.o with remote-$(REMOTE).o.
1508 (srcs): Replace remote.c with remote-$(REMOTE).c.
1509 (remote.o): Rule removed.
1511 * configure.in (REMOTE): Subst this in Makefile et al; default "stub".
1512 Use AC_WITH to grok --with-customs arg to set REMOTE=cstms.
1513 * GNUmakefile (build.sh.in): Filter out remote-% from objs list.
1514 * build.template (REMOTE): New var; set to @REMOTE@.
1515 (objs): Add remote-${REMOTE}.o.
1517 Wed Mar 10 15:12:24 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1521 * implicit.c (pattern_search): Fix "dependent"->"dependency" in
1522 "Rejecting impossible" -d msg.
1524 * file.c (file_hash_enter): New local vars {OLD,NEW}BUCKET. Store
1525 mod'd values there; never mod {OLD,NEW}HASH.
1527 Mon Mar 8 13:32:48 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1529 * remake.c [eta10]: Include <fcntl.h> instead of <sys/file.h>.
1531 * compatMakefile (VPATH): Set this to @srcdir@.
1532 (srcdir): Set this to $(VPATH).
1534 * main.c (main): New local var DIRECTORY_BEFORE_CHDIR. Save in it
1535 a copy of CURRENT_DIRECTORY after the first getcwd. Use it
1536 instead of CURRENT_DIRECTORY when chdir'ing back before re-execing.
1538 * remake.c (notice_finished_file): Pass missing SEARCH arg to f_mtime.
1540 * read.c (read_makefile): Remove extraneous arg to parse_file_seq.
1542 Mon Feb 22 14:19:38 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1544 * compatMakefile ($(infodir)/$(instname).info): Use , instead of /
1545 as the sed delimiter char.
1547 Sun Feb 21 14:11:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1551 * rule.h (struct rule): Removed `subdir' member.
1552 * rule.c (new_pattern_rule): No need to clear it.
1553 (count_implicit_rule_limits): Set the `changed' flag in each dep
1554 that refers to a nonexistent directory. No longer set rule-global
1555 `subdir' flag with that information.
1556 (print_rule_data_base): Don't record info on `subdir' flags.
1558 * implicit.c (pattern_search): Check the DEP->changed flag rather
1559 than the (now gone) RULE->subdir flag. Also test CHECK_LASTSLASH;
1560 if it is set, the file might exist even though the DEP->changed
1563 * rule.c (count_implicit_rule_limits): Pass "", not ".", as file
1564 name arg to dir_file_exists_p to check for existence of directory.
1566 * implicit.c (pattern_search): Inside dep-finding loop, set
1567 CHECK_LASTSLASH from the value recorded in CHECKED_LASTSLASH[I],
1568 rather than computing it anew.
1570 * commands.c (set_file_variables): Must alloca space for PERCENT
1571 and copy it, to avoid leaving the trailing `)' in the value.
1573 * misc.c (remove_comments): Fixed backslash-checking loop
1574 condition to allow it to look at the first char on the line.
1575 P2 >= LINE, not P2 > LINE.
1577 * compatMakefile ($(bindir)/$(instname)): Before moving $@.new to
1578 $@, rm $@.old and mv $@ to $@.old.
1580 * variable.c (try_variable_definition): Take new args FILENAME and
1581 LINENO. Fatal if the variable name is empty.
1582 * read.c (read_makefile): Change callers.
1583 * main.c (main): Likewise.
1585 * compatMakefile (group): Define to @KMEM_GROUP@, autoconf magic
1586 that configure will replace with the group owning /dev/kmem.
1588 Mon Feb 8 14:26:43 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1590 * vpath.c (vpath_search): Take second arg MTIME_PTR, pass thru to
1591 selective_vpath_search.
1592 (selective_vpath_search): Take second arg MTIME_PTR.
1593 If the dir cache thinks a file exists, stat it to make sure, and
1594 put the modtime in *MTIME_PTR.
1595 * remake.c (library_search): Take second arg MTIME_PTR.
1596 When we find a match, record its mtime there.
1597 Pass MTIME_PTR through to vpath_search to do same.
1598 (f_mtime): Pass &MTIME as new 2nd arg to {vpath,library}_search;
1599 store it in FILE->last_mtime if set nonzero.
1600 * implicit.c (pattern_search): Pass nil 2nd arg to vpath_search.
1602 * compatMakefile (remote.o): Prepend `$(srcdir)/' to `remote-*.c',
1603 so globbing looks somewhere it will find things.
1605 * compatMakefile ($(infodir)/$(instname).info): Install `make.info*'
1606 not `$(srcdir)/make.info*'; no need to use basename.
1608 Fri Feb 5 12:52:43 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1612 * compatMakefile (install): Add missing ;\s.
1614 Make -, @, and + prefixes on a pre-expanded command line affect
1615 all lines in the expansion, not just the first.
1616 * commands.h (struct commands): Replace `lines_recurse' member
1618 (COMMANDS_{RECURSE,SILENT,NOERROR}): New macros, bits to set in
1620 * commands.c (chop_commands): Set `lines_flags' instead of
1621 `lines_recurse'. Record not only + but also @ and - prefixes.
1622 * remake.c (notice_finished_file): Check the COMMANDS_RECURSE bit
1623 in FILE->cmds->lines_flags, rather than FILE->cmds->lines_recurse.
1624 * job.c (start_job_command): Replaced RECURSIVE and NOPRINT local
1625 var with FLAGS; initialize it to the appropriate `lines_flags' byte.
1626 Set CHILD->noerror if the COMMANDS_NOERROR bit is set in FLAGS.
1627 Set the COMMANDS_SILENT bit in FLAGS for a @ prefix.
1629 * remake.c (update_goal_chain): Set G->file to its prev after
1630 checking for G being finished, since that check needs to examine
1633 * configure.in (union wait check) [HAVE_WAITPID]: Try using
1634 waitpid with a `union wait' STATUS arg. If waitpid and union wait
1635 don't work together, we should not use union wait.
1639 * remake.c (update_goal_chain): When G->file->updated, move
1640 G->file to its prev. We aren't finished until G->file is nil.
1642 Thu Feb 4 12:53:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1644 * main.c (starting_directory): New global variable.
1645 (main): Set it to cwd after doing -Cs.
1646 (log_working_directory): Use it, rather than computing each time.
1647 * make.h: Declare it.
1649 * compatMakefile (SHELL): Define to /bin/sh for losing Unix makes.
1651 * main.c (decode_env_switches): Allocate (1 + LEN + 1) words for
1652 ARGV, rather than LEN words plus one byte.
1654 Wed Feb 3 18:13:52 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1656 * compatMakefile ($(bindir)/$(instname)): Put - before
1657 install_setgid command line, so its failure won't be an error.
1658 (infodir): New variable.
1659 (install): Depend on $(infodir)/$(instname).info.
1660 ($(infodir)/$(instname).info): New target.
1662 * read.c (read_makefile): If FILENAMES is nil when we see a line
1663 starting with a tab, don't treat it as a command. Just fall
1664 through, rather than giving an error.
1666 * read.c (read_makefile): If the NO_TARGETS flag is set when we see a
1667 command line, don't clear it before continuing. We want
1668 subsequent command lines to be ignored as well.
1670 * job.c (new_job): Before expanding each command line, collapse
1671 backslash-newline combinations that are inside var or fn references.
1673 Mon Feb 1 16:00:13 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1675 * compatMakefile (exec_prefix): Default to $(prefix), not /usr/local.
1677 * compatMakefile (make.info): Pass -I$(srcdir) to makeinfo.
1679 * job.c [POSIX] (unblock_sigs): Made global.
1680 [!POSIX] (unblock_sigs): Move defns to job.h.
1681 * job.h [POSIX] (unblock_sigs): Declare.
1683 Sun Jan 31 19:11:05 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1685 * read.c (read_makefile): In vpath parsing, after finding the
1686 pattern token, take entire rest of line as the search path, not
1687 just the next token.
1689 * compatMakefile (remote.o): Depend on remote-*.c.
1691 Thu Jan 28 16:40:29 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1693 * commands.c (set_file_variables): Don't define any F or D versions.
1694 * variable.c (define_automatic_variables): Define them here as
1695 recursively-expanded variables that use the dir and notdir funcs.
1697 * variable.c (target_environment): In v_default case, don't export
1698 o_default or o_automatic variables.
1700 * configure.in (union wait check): Remove ` and ' inside C code;
1701 they confuse the shell script.
1703 Mon Jan 25 13:10:42 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1707 * vpath.c (construct_vpath_list): When skipping further processing
1708 of an elt that is ".", don't also skip the code that pushes P past
1711 * compatMakefile (distclean): Don't remove make-*.
1713 * configure.in (HAVE_UNION_WAIT): Try to use WEXITSTATUS if it's
1714 defined. If one cannot use WEXITSTATUS with a `union wait'
1715 argument, we don't want to believe the system has `union wait' at all.
1717 * remake.c (update_file): Do nothing to print "up to date" msgs.
1718 (update_goal_chain): Do it here instead.
1719 Use the `changed' flag of each goal's `struct dep' to keep track
1720 of whether files_remade (now commands_started) changed around a
1721 call to update_file for that goal.
1722 When a goal is finished, and its file's update_status is zero (i.e.,
1723 success or nothing done), test the `changed' flag and give an "up
1724 to date" msg iff it is clear.
1725 * make.h (files_remade): Renamed to commands_started.
1726 * remake.c: Changed defn.
1727 (update_goal_chain): Changed uses.
1728 * job.c (start_job_command): Increment commands_started here.
1729 (reap_children): Not here.
1731 * remake.c (update_goal_chain): Don't do anything with files'
1732 `prev' members. update_file now completely handles this.
1734 * variable.c (target_environment): Don't expand recursive
1735 variables if they came from the environment.
1737 * main.c (define_makeflags): For flags with omitted optional args,
1738 store {"", 0} with ADD_FLAG. When constructing FLAGSTRING, a flag
1739 so stored cannot have more flags appended to the same word.
1741 Fri Jan 22 14:46:16 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1743 * variable.c (print_variable_set): In vars/bucket calculation,
1744 don't spuriously multiply by 100.
1748 * job.c [!HAVE_UNION_WAIT] (WTERMSIG, WCOREDUMP, WEXITSTATUS):
1749 Don't define if already defined.
1751 * remake.c (update_file): Don't keep track of the command_state before
1752 calling update_file_1. Remove local variable COMMANDS_FINISHED,
1753 and don't test it to decide to print the "is up to date" msg.
1754 Testing for files_remade having changed should always be sufficient.
1755 The old method lost when we are called in the goal chain run on a
1756 makefile, because the makefile's command_state is already
1757 `cs_finished' from the makefile chain run.
1759 * misc.c [HAVE_SETRE[GU]ID]: Test these to decl setre[gu]id.
1761 * configure.in: Rewrote wait checking.
1762 Use AC_HAVE_HEADERS to check for <sys/wait.h>.
1763 Use AC_HAVE_FUNCS to check for waitpid and wait3.
1764 Use a compile check to test just for `union wait'.
1765 * job.c: Rewrote conditionals accordingly.
1766 [HAVE_WAITPID]: Test this only to define WAIT_NOHANG.
1767 [HAVE_WAIT3]: Likewise.
1768 [HAVE_UNION_WAIT]: Test this to define WAIT_T and W*.
1770 * configure.in: Set CFLAGS and LDFLAGS before all checks.
1772 * dir.c: Add static forward decls of {open,read}_dirstream.
1774 Thu Jan 21 17:18:00 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1778 * job.c [NGROUPS_MAX && NGROUPS_MAX==0]: #undef NGROUPS_MAX.
1780 * compatMakefile (CFLAGS, LDFLAGS): Set to @CFLAGS@/@LDFLAGS@.
1781 * build.template (CFLAGS, LDFLAGS): Same here.
1782 * configure.in: AC_SUBST(CFLAGS) and LDFLAGS.
1783 Set them to -g if not defined in the environment.
1785 * remake.c (library_search): Use LIBNAME consistently, setting it
1786 only once, to be the passed name sans `-l'.
1787 Pass new var FILE to be modified by vpath_search.
1789 Mon Jan 18 14:53:54 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1793 * job.c (start_waiting_jobs): Return when job_slots_used is equal to
1796 * configure.in: Add AC_CONST for the sake of getopt.
1798 * read.c (read_makefile): Continue after parsing `override'
1799 directive, rather than falling through to lossage.
1800 Check for EOL or blank after "override define".
1802 * compatMakefile (.c.o, remote.o): Put $(CFLAGS) after other switches.
1804 Fri Jan 15 12:52:52 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1808 * main.c (define_makeflags): After writing everything into
1809 FLAGSTRING, only back up two chars if [-1] is a dash, meaning we
1810 just wrote " -". Always terminate the string at *P.
1812 * remake.c (library_search): When constructing names in std dirs,
1813 use &(*LIB)[2] for the stem, not LIBNAME (which points at the
1814 buffer we are writing into!).
1816 Thu Jan 14 13:50:06 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1818 * read.c (read_makefile): Set IN_IGNORED_DEFINE for "override
1819 define" when IGNORING is true.
1821 * compatMakefile (distclean): Remove config.status and build.sh.
1823 Wed Jan 13 16:01:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1827 * misc.c (xmalloc, xrealloc): Cast result of malloc/realloc to
1830 * arscan.c (ar_scan) [AIAMAG]: Cast read arg to (char *).
1832 * variable.c (define_automatic_variables): Override SHELL value for
1833 origin o_env_override as well as o_env.
1835 * GNUmakefile (build.sh.in): Don't replace %globobjs%. Instead,
1836 add the names of the glob objects (w/subdir) to %objs%.
1837 * build.template (globobjs): Removed.
1838 Take basename of $objs before linking.
1840 Tue Jan 12 12:31:06 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1844 * configure.in (AC_OUTPUT): Also edit build.sh.
1845 * build.template: New file.
1846 * GNUmakefile (build.sh.in): New rule to create it from build.template.
1847 (make-$(version).tar.Z): Depend on build.sh.in.
1849 * main.c (die): Call print_data_base if -p.
1850 (main): Don't call it here.
1852 * compatMakefile (defines): Add @DEFS@. configure should turn this
1853 into -DHAVE_CONFIG_H.
1855 Mon Jan 11 14:39:23 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1859 * misc.c (init_access): Surround with #ifdef GETLOADAVG_PRIVILEGED.
1860 ({make,user,child}_access) [! GETLOADAVG_PRIVILEGED]: Make no-op.
1861 * compatMakefile (install_setgid): New var, set by configure.
1862 (install): Install setgid $(group) only if $(install_setgid) is true.
1864 Fri Jan 8 15:31:55 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1866 * job.c (load_too_high): If getloadavg fails with errno==0, give a
1867 message saying that load limits are not supported.
1869 * vpath.c (construct_vpath_list): Rewrote path deletion code to
1870 not try to use PATH's next link after freeing PATH.
1872 * main.c (define_makeflags): Rewritten; now handles string-valued
1873 option, and has no arbitrary limits.
1874 (switches): Set `toenv' flag for -I and -v.
1876 * main.c (decode_env_switches): Cast return value of alloca to char *.
1878 * misc.c (child_access) [HAVE_SETREUID, HAVE_SETREGID]: Use
1879 setre[gu]id in place of set[gu]id.
1881 Wed Jan 6 15:06:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1883 * main.c (main): Define MAKEOVERRIDES, MAKE, and MAKE_COMMAND with
1886 * make.h [POSIX]: Don't test this to use ANSI_STRING.
1887 Testing STDC_HEADERS should be sufficient.
1889 * job.h: Declare start_waiting_jobs.
1891 * read.c (read_makefile): Add missing parens in if stmt that find
1892 conditional directives.
1894 * main.c (main): Declare init_dir.
1895 * implicit.c (pattern_search): Always use two % specs in a
1896 DEBUGP2, and always pass two non-nil args.
1897 Cast field width args to int.
1898 Add missing parens in !RULE->subdir if stmt.
1899 * function.c (expand_function, patsubst_expand): Add parens around
1900 assignments inside `while' stmts.
1901 * commands.c (print_commands): Cast field width args to int.
1903 * read.c (do_define): Cast return value of alloca to (char *).
1905 * main.c (init_switches): New function, broken out of decode_switches.
1906 (decode_switches): Take new arg ENV. If set, ignore non-option
1907 args; print no error msgs; ignore options with clear `env' flags.
1908 (decode_env_switches): Rewritten to chop envar value into words
1909 and pass them to decode_switches.
1910 (switches): Set `env' flag for -I and -v.
1912 * dir.c (init_dir): Cast free to __glob_closedir_hook's type.
1914 Tue Jan 5 14:52:15 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1918 * job.c [HAVE_SYS_WAIT || !USG]: Don't #include <sys/time.h> and
1919 <sys/resource.h>. <sys/time.h> interacts badly with <time.h>, and
1920 we don't need these anyway.
1922 * configure.in (AC_HAVE_FUNCS): Check for setre[gu]id.
1923 * misc.c ({user,make}_access): Test #ifndef HAVE_SETRE[GU]ID, not
1924 #ifdef POSIX || USG. SunOS 4.1 is supposedly POSIX.1 compliant,
1925 but its set[gu]id functions aren't; its setre[gu]id functions work.
1927 * misc.c ({user,make,child}_access): Give name of caller in error msgs.
1929 * job.c (load_too_high): Say "cannot enforce load limit" in error msg.
1931 * configure.in: Call AC_PROG_CC.
1932 * compatMakefile (CC): Define to @CC@ (autoconf magic).
1934 * compatMakefile: Add .NOEXPORT magic target.
1936 Mon Jan 4 17:00:03 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1938 * main.c (print_version): Updated copyright to include 93.
1940 Thu Dec 31 12:26:15 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1942 * make.h [_AIX]: Don't declare alloca.
1944 Tue Dec 29 13:45:13 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1948 * compatMakefile (objs): Add signame.o.
1949 (srcs): Add signame.[ch].
1951 * compatMakefile (srcs): Add config.h.in.
1952 (remote.o): Add -I. before -I$(srcdir).
1954 Mon Dec 28 15:51:26 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1958 * read.c (readline): Fatal when LEN==0, indicating a line starting
1960 (readline): Take new arg LINENO, for use in error msg.
1961 (read_makefile, do_define): Pass it.
1963 * compatMakefile (glob/libglob.a): Pass -DHAVE_CONFIG_H in CPPFLAGS.
1964 (.c.o): Add -I. before -I$(srcdir).
1966 Wed Dec 23 12:12:04 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1968 * read.c (read_makefile): Accept and ignore a rule with no targets.
1970 * compatMakefile (ALLOCA_SRC): New variable.
1971 (srcs): Include its value.
1973 * read.c (struct conditional): Renamed member `max_ignoring' to
1974 `allocated'; added new member `seen_else'.
1975 (conditional_line): Initialize seen_else flag when starting an `if...';
1976 set it when we see an `else'; fatal if set when we see `else'.
1977 (read_makefile): Fatal "missing `endif'" if there are any pending
1978 conditionals, not just if we are still ignoring.
1980 Tue Dec 22 15:36:28 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1982 * compatMakefile (manext): Set to 1, not l.
1983 ($(mandir)/$(instname).$(manext)): Use $(srcdir) for make.man in cmds.
1985 * file.c (file_hash_enter): Don't call uniquize_deps here.
1986 * read.c (record_files): Likewise.
1987 * implicit.c (pattern_search): Likewise.
1988 * commands.c (set_file_variables): Call it only here.
1990 * default.c (default_variables) [__convex__]: FC=fc.
1992 * variable.c (target_environment): Expand the values of recursively
1993 expanded variables when putting them into the environment.
1994 * expand.c (recursively_expand): Made global.
1995 * make.h (recursively_expand): Declare it.
1997 * remake.c (check_dep): Set FILE->command_state to cs_deps_running
1998 when a dep's command_state is cs_running or cs_deps_running.
2000 * read.c (read_makefile): Changed error msg for spurious cmds to
2001 not say "first target".
2003 Sun Dec 20 17:56:09 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2005 * configure.in: Do AC_CONFIG_HEADER right after AC_INIT.
2006 * make.h (HAVE_CONFIG_H): #include "config.h", then #define this.
2007 * compatMakefile (config.h, configure, config.h.in): New rules.
2008 (defines): Removed @DEFS@.
2010 Thu Dec 17 16:11:40 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2012 * compatMakefile (realclean): Just depend on distclean; no cmds.
2013 (distclean): Do what realclean did before; also remove Makefile and
2014 config.h; don't remove configure.
2015 (info, dvi): New targets; depend on make.{info,dvi}.
2016 (doc): Removed target.
2017 (MAKEINFO, TEXI2DVI): New vars.
2018 (make.info, make.dvi): Use them instead of explicit cmds.
2020 Wed Dec 16 16:25:24 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2022 * configure.in: Added fcntl.h to AC_HAVE_HEADERS. getloadavg cares.
2024 Wed Dec 9 15:21:01 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2026 * main.c (long_option_aliases): Add --new-file alias for -W.
2028 * default.c (default_variables): Change all C++ to CXX and C++FLAGS
2031 * read.c (do_define): Expand the variable name before using it.
2033 * main.c (main): Define variable "MAKE_COMMAND" to argv[0];
2034 define "MAKE=$(MAKE_COMMAND) $(MAKEOVERRIDES)" always.
2036 * remake.c (library_search): Search for libNAME.a in cwd; look in
2037 vpath before looking in standard dirs, not after.
2038 Changed order of std dirs to: /lib, /usr/lib, ${prefix}/lib.
2040 Mon Nov 23 14:57:34 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2042 * default.c (default_pattern_rules, default_terminal_rules): Added
2043 brackets around initializers.
2045 * variable.c (try_variable_definition): Don't check for LINE[0]=='\t'.
2046 (try_variable_definition): Expand the name before defining the var.
2048 * job.c (init_siglist): Removed function.
2049 Removed decl of `sys_siglist'.
2050 * make.h [! HAVE_SYS_SIGLIST]: #include "signame.h".
2051 [HAVE_SYS_SIGLIST && !SYS_SIGLIST_DECLARED]: Declare sys_siglist
2052 only under these conditions.
2053 * main.c (main): Don't declare init_siglist.
2054 (main) [! HAVE_SYS_SIGLIST]: Call signame_init instead of init_siglist.
2056 Wed Nov 18 14:52:51 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2058 * read.c (record_files): Don't try to append to FIRSTDEPS if it's
2059 nil; instead just set it to MOREDEPS.
2061 Mon Nov 16 17:49:17 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2063 * vpath.c (construct_vpath_list): Initialize P to DIRPATH before
2064 loop that sets MAXELEM.
2066 Fri Nov 13 18:23:18 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2070 Thu Nov 12 15:45:31 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2072 * job.c (start_job_command): Under -n, increment files_remade after
2073 processing (i.e., printing) all command lines.
2075 Tue Nov 10 15:33:53 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2077 * read.c (record_files): Append new deps if this rule has no
2078 commands; prepend them to existing deps if this rule has no commands.
2080 * dir.c (open_dirstream): Return nil if DIR->contents->files is nil.
2082 * read.c (parse_file_seq): Removed last arg STRIP. Always strip `./'s.
2083 (read_makefile): Changed callers.
2084 * function.c (string_glob): Likewise.
2085 * rule.c (install_pattern_rule): Likewise.
2087 Mon Nov 9 17:50:16 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2089 * remake.c (files_remade): Made global.
2090 (notice_finished_file): Don't increment files_remade here; this
2091 function gets called in many situations where no remaking was in
2093 * job.c (reap_children): Do it here instead, when we know that
2094 actual commands have been run for the file.
2095 * make.h (files_remade): Declare it.
2097 Thu Nov 5 18:26:10 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2099 * vpath.c (construct_vpath_list): Allow blanks as well as colons to
2100 separate elts in the search path.
2102 * read.c (read_makefile): Don't fatal on extra tokens in `vpath'.
2103 The search path can contain spaces now.
2105 Tue Nov 3 20:44:32 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2107 * compatMakefile (check): New target; no-op.
2109 * file.c (file_hash_enter): Mod OLDHASH by FILE_BUCKETS after
2110 testing for OLDHASH==0 but before using the value.
2111 (rename_file): Don't mod OLDHASH by FILE_BUCKETS before passing it
2114 * file.c (rename_file): Notice when OLDFILE->cmds came from
2115 default.c, and don't try to print ->filename in that case.
2117 Sun Oct 25 01:48:23 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2119 * remake.c (update_file): Don't process F->also_make here.
2120 (notice_finished_file): Don't process FILE->also_make if no attempt
2121 to update FILE was actually made.
2122 Fixed to call f_mtime directly to refresh their modtimes.
2124 Sat Oct 24 22:08:59 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2126 * read.c (find_percent): Don't increment P again after skipping
2129 * expand.c (variable_expand): In call to patsubst_expand, don't
2130 find `%'s ourselves; let that function do it.
2132 * read.c (read_makefile: record_waiting_files): Don't call
2133 record_files if FILENAMES is nil.
2134 (read_makefile): All alternatives in the parsing, except for rule
2135 lines, fall through to the end of the loop. At the end of the
2136 loop, do record_waiting_files so we notice later spurious cmds.
2138 Fri Oct 23 15:57:37 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2140 * variable.c (define_automatic_variables): Free old value of SHELL
2141 before replacing it.
2143 Thu Oct 15 18:57:56 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2145 * compatMakefile (.c.o): Add -I$(srcdir)/glob to flags.
2147 * dir.c (open_dirstream): Cast return value to __ptr_t.
2149 * default.c (default_variables: "GET") [_IBMR2]: Use USG defn.
2151 * make.h (MAXPATHLEN): Moved out of #ifndef POSIX.
2152 (GET_PATH_MAX): Moved from #ifdef POSIX to #ifdef PATH_MAX #else.
2153 Define as (get_path_max ()).
2154 [! PATH_MAX] (NEED_GET_PATH_MAX): Define.
2155 [! PATH_MAX] (get_path_max): Declare fn.
2156 * misc.c [NEED_GET_PATH_MAX] (get_path_max): New function.
2158 Mon Oct 12 13:34:45 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2162 * job.c (sys_siglist): Only declare #ifndef SYS_SIGLIST_DECLARED.
2163 * make.h [! HAVE_SYS_SIGLIST && HAVE__SYS_SIGLIST]: #define
2164 SYS_SIGLIST_DECLARED.
2166 * dir.c (file_impossible): When initializing DIR->contents, set
2167 DIR->contents->dirstream to nil.
2169 * compatMakefile (GLOB): Define new variable.
2170 (objs): Use it, rather than glob/libglob.a explicitly.
2172 * read.c (parse_file_seq): When stripping "./", handle cases like
2173 ".///foo" and "./////".
2174 * file.c (lookup_file, enter_file): Likewise.
2176 Sun Oct 11 17:00:35 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2178 * dir.c (struct dirstream, {open,read}_dirstream): New
2179 data type and functions to read a directory sequentially.
2180 (init_dir): New function to hook it into glob.
2181 * main.c (main): Call init_dir.
2183 * compatMakefile (objs): Added glob/libglob.a.
2184 * configure.in: Remove code to test for glob.
2186 Fri Oct 9 12:08:30 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2188 * read.c (record_files): Generalized test for NAME pointing
2189 somewhere into F->name.
2191 * variable.c (define_variable_in_set): Free old value when replacing.
2193 * read.c (do_define): Free the linebuffer before returning.
2194 (record_files): When clearing .SUFFIXES deps, free their data.
2195 (multi_glob): Free OLD and its data when replacing it with results
2198 * commands.c (set_file_variables): Use alloca in place of xmalloc
2199 for temp space for $^, $?, et al.
2201 * dir.c (struct directory): New member `contents' replaces `files'
2203 (struct directory_contents): New type.
2204 (directories_contents): New hash table.
2205 (dir_struct_file_exists_p): Take a struct directory_contents.
2206 (dir_file_exists_p): Pass it the `contents' member of the dir found.
2207 (dir_struct_file_exists_p): Renamed to dir_contents_file_exists_p;
2208 made static. Return 0 if DIR is nil (meaning it couldn't be stat'd).
2209 (dir_file_exists_p, find_directory): Change all callers.
2210 (file_impossible): Use DIR->contents, initializing it if nil.
2211 (print_dir_data_base): Use DIR->contents, and print out device and
2212 inode numbers with each directory.
2214 * Changes for performance win from John Gilmore <gnu@cygnus.com>:
2215 * dir.c (DIRECTORY_BUCKETS): Increase to 199.
2216 (DIRFILE_BUCKETS): Decrease to 107.
2217 (find_directory): Allocate and zero a multiple of
2218 sizeof (struct dirfile *), not of sizeof (struct dirfile).
2219 (dir_struct_file_exists_p): New function, nearly all code from
2221 (dir_file_exists_p): Just call find_directory+dir_struct_file_exists_p.
2222 * vpath.c (selective_vpath_search): Remove redundant
2223 dir_file_exists_p call.
2225 * configure.in: Comment out glob check; always use our code.
2227 Fri Oct 2 19:41:20 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2229 * make.h [! HAVE_SYS_SIGLIST && HAVE__SYS_SIGLIST]: #define
2230 HAVE_SYS_SIGLIST; after doing #define sys_siglist _sys_siglist, we
2233 Wed Sep 30 19:21:01 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2235 * main.c (main): Don't do -w automatically if -s.
2237 Tue Sep 29 21:07:55 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2239 * main.c (printed_version): Move variable inside print_version.
2240 (print_version): Return immediately if printed_version is set.
2241 (die): Don't test printed_version here.
2242 (decode_switches): Under -v, do print_version before giving usage.
2243 (DESCRIPTION_COLUMN): New macro.
2244 (decode_switches): Use it when printing the usage message.
2245 Leave at least two spaces between options and their descriptions.
2247 Fri Sep 25 13:12:42 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2251 Wed Sep 16 16:15:22 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2253 * read.c (read_makefile): Save errno value from trying to open
2254 FILENAME, and restore it before erring; otherwise we get the errno
2255 value from the last elt of the search path.
2257 Tue Sep 15 15:12:47 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2259 * main.c (long_option_aliases): Add --stop for -S.
2261 * read.c (word1eq): Do strncmp before dereferencing someplace that
2262 may be out in space.
2264 Wed Sep 9 15:50:41 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2266 * remake.c (notice_finished_file): If all the command lines were
2267 recursive, don't do the touching.
2269 * job.c (start_job_command): Don't check for + here.
2270 * commands.c (chop_commands): Do it here instead.
2272 * default.c (default_terminal_rules): Prepend + to cmds for RCS.
2274 Wed Sep 2 17:53:08 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2276 * compatMakefile (objs): Include $(ALLOCA).
2278 * make.h [CRAY]: Move #define signal bsdsignal to before #includes.
2280 Thu Aug 27 17:45:43 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
2282 * read.c (default_include_directories): Add INCLUDEDIR first.
2283 * compatMakefile (includedir): Define.
2284 (defines): Add -D for INCLUDEDIR="$(includedir)".
2286 * read.c (read_makefile): Grok multiple files in `include';
2289 * remake.c (library_search): New function.
2290 (library_file_mtime): Remove function.
2291 (f_mtime): Use library_search instead of library_file_mtime.
2292 * compatMakefile (libdir): Define.
2293 (defines): Add -D for LIBDIR="$(libdir)".
2294 * make.texinfo (Libraries/Search): Document change.
2296 * file.c (rename_file): Fix file_hash_enter call with missing arg.
2298 Wed Aug 26 17:10:46 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2302 * main.c (main): Set command_state to cs_finished for temp files
2303 made for stdin makefiles.
2305 * main.c (decode_switches): Don't tell getopt to return non-option
2307 Ignore an argument of `-'.
2309 Thu Aug 20 13:36:04 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2311 * job.c (start_job_command): If (touch_flag && !RECURSIVE), ignore
2312 the command line and go to the next.
2313 (notice_finished_file): Under -t, touch FILE.
2314 * remake.c (remake_file): Don't touch it here.
2316 Wed Aug 19 16:06:09 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2318 * function.c (pattern_matches): Use temporary for strlen (WORD)
2319 instead of two function calls.
2321 * compatMakefile (LOAD_AVG): Remove variable and comments.
2323 Tue Aug 18 14:58:58 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2325 * make.texinfo (Running): Node renamed to `make Invocation'.
2327 Fri Aug 14 12:27:10 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2329 * arscan.c (ar_name_equal): Don't compare [MAX-3..MAX] if
2332 Thu Aug 13 17:50:09 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2336 * main.c: Don't #include <time.h>; make.h already does.
2338 Mon Aug 10 17:03:01 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2340 * implicit.c (pattern_search): Fixed copying of suffix when building
2343 * function.c (expand_function: `shell'): Make sure BUFFER is
2344 null-terminated before replacing newlines.
2346 * compatMakefile (mandir): Use man$(manext), not always manl.
2348 Sun Aug 2 01:42:50 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2350 * rule.c (new_pattern_rule): Not static.
2351 * rule.h: Declare it.
2353 * file.c (file_hash_enter): New function, most code from rename_file.
2354 (rename_file): Call it.
2355 * file.h (file_hash_enter): Declare it.
2359 Thu Jul 30 15:40:48 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2361 * main.c (decode_switches): Handle usage_and_exit when building
2362 long options vector.
2364 * default.c (default_terminal_rules): Make RCS rules use $(CHECKOUT,v).
2365 (default_variables): Define CHECKOUT,v (hairy).
2367 * make.h [!HAVE_SYS_SIGLIST && HAVE__SYS_SIGLIST]: #define
2368 sys_siglist to _sys_siglist.
2370 Sun Jul 26 16:56:32 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2372 * NEWS: Add header and tail copyright info like Emacs NEWS.
2374 * make.h [ANSI_STRING]: Don't #define index, rindex, bcmp, bzero,
2375 bcopy if already #define'd.
2376 [STDC_HEADERS] (qsort, abort, exit): Declare here.
2377 [! __GNU_LIBRARY__ && !POSIX]: Not here.
2379 * make.h [_AIX]: #pragma alloca first thing.
2381 * job.c (start_waiting_job): Set the command_state to cs_running
2382 when we queue a job on waiting_jobs.
2384 Fri Jul 24 02:16:28 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2386 * variable.c (define_automatic_variables): Use "" instead of nil
2389 Thu Jul 23 22:31:18 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2393 * main.c (struct command_switch.type): Add alternative usage_and_exit.
2394 (command_switches): Add -h/--help.
2396 Thu Jul 16 14:27:50 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2398 * GNUmakefile (make-$(version).tar.Z): Include NEWS, not CHANGES.
2399 * README.template: Mention NEWS.
2400 * CHANGES: Renamed to NEWS.
2402 * main.c [! STDC_HEADERS] [sun]: Don't declare exit.
2404 Tue Jul 14 18:48:41 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2406 * main.c (main): Set -o files' command_states to cs_finished.
2408 * rule.c (count_implicit_rule_limits): Decrement num_pattern_rules
2409 when tossing a rule.
2411 * main.c (main): Use alloca only in simple local var assignment,
2412 for braindead SGI compiler.
2414 * rule.c (print_rule_data_base): Barf if num_pattern_rules is
2415 inconsistent with the number computed when listing them.
2417 Mon Jul 13 17:51:53 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2419 * commands.c (set_file_variables): For $? and $^ elts that are archive
2420 member refs, use member name only.
2422 Fri Jul 10 00:05:04 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2424 * variable.h (struct variable.export): Add new alternative v_ifset.
2425 * variable.c (target_environment): Check for it.
2426 (define_automatic_variables): Set it for MAKEFILES.
2428 Thu Jul 9 21:24:28 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2430 * compatMakefile (objs): Remove getloadavg.o; $(extras) gets it.
2431 (remote.o): Use $(srcdir)/remote.c, not $remote.c<.
2432 (distclean, mostlyclean): New targets.
2434 Tue Jul 7 19:12:49 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2438 * compatMakefile (config.status): Remove rule.
2440 * job.c (start_waiting_job): Free C after using C->file, not before.
2442 Sat Jul 4 20:51:49 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2444 * commands.c, job.c, main.c, make.h, remote-cstms.c: Use #ifdef
2445 HAVE_* instead of #ifndef *_MISSING.
2446 * configure.in: Use AC_HAVE_FUNCS instead of AC_MISSING_FUNCS (gone).
2448 Thu Jul 2 18:47:52 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2450 * main.c (main): makelevel>0 or -C implies -w.
2452 Tue Jun 30 20:50:17 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2454 * file.c, job.c, function.c: Don't #include <errno.h>.
2455 make.h: Do it here instead.
2456 * arscan.c (ar_member_touch): Don't declare errno.
2458 Thu Jun 25 17:06:55 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2460 * GNUmakefile (make-$(version).tar.Z): Depend on INSTALL, configure.in.
2462 * remake.c (update_file): If commands or deps are running after
2463 update_file_1 returns, break out of the :: rule (->prev) loop and
2466 * job.c (job_next_command): New function; code from start_job.
2467 (start_job_command): Renamed from start_job. Call job_next_command
2468 and recurse for empty command lines and -n.
2469 (start_waiting_job): Call start_job_command, not start_job.
2470 (new_job): Call job_next_command to prime the child structure, and
2471 then call start_waiting_job.
2472 (reap_children): Use job_next_command and start_job_command.
2473 (start_waiting_job): Call start_remote_job_p here, and store its
2474 result in C->remote. If zero, check the load average and
2475 maybe put C on waiting_jobs.
2476 (start_job_command): Test CHILD->remote rather than calling
2477 start_remote_job_p. Don't do load avg checking at all here.
2479 * main.c (main): Don't handle SIGILL, SIGIOT, SIGEMT, SIGBUS,
2480 SIGSEGV, SIGFPE or SIGTRAP.
2482 * compatMakefile (glob/libglob.a): Don't pass srcdir to sub-make.
2483 configure will set it in glob/Makefile.
2485 Wed Jun 24 19:40:34 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2487 * dir.c [DIRENT] (direct): Don't define to dirent.
2488 [! DIRENT] (direct): Define to dirent.
2489 (dir_file_exists_p): Use struct dirent instead of struct direct.
2491 * make.h (getcwd): No space between macro and ( for args!
2493 * job.c (start_job): Don't put the job on waiting_jobs if
2496 * make.texinfo (Missing): Shortened title.
2498 Tue Jun 23 18:42:21 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2500 * file.c (remove_intermediates): Print "rm" commands under -n.
2502 Mon Jun 22 16:20:02 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2506 Fri Jun 19 16:20:26 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2508 * arscan.c [M_UNIX]: #undef M_XENIX.
2510 Wed Jun 17 17:59:28 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2512 * default.c (default_terminal_rules): Put @ prefix on RCS cmds.
2514 Tue Jun 16 19:24:17 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2516 * compatMakefile (getloadavg.o): Removed special rule.
2517 (CFLAGS): Don't include $(defines).
2518 (.c.o): Define suffix rule.
2519 (glob/libglob.a): Pass CPPFLAGS=$(defines) to submake.
2520 (GETOPT_SRC, srcs, tagsrcs): Prefix files with $(srcdir)/.
2522 * arscan.c (ar_name_equal): Moved local vars inside #if'd block.
2524 * make.h (max): Removed.
2525 * expand.c (variable_buffer_output): Don't use it.
2527 * compatMakefile (INSTALL): Define.
2528 (Makefile): New rule to make from Makefile.in.
2531 (getloadavg.o, remote.o): Use autoconf $foo< hack.
2533 * commands.c (fatal_error_signal): Removed return.
2535 Mon Jun 15 17:42:51 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2539 * make.texinfo (Summary): New node.
2540 (Special Targets): Mention .EXPORT_ALL_VARIABLES here.
2542 * variable.c (max): Moved to make.h.
2544 * compatMakefile (objs, srcs): Added ar & arscan.
2546 * job.c (start_waiting_job): New function, 2nd half of new_job.
2548 (start_waiting_jobs): New function.
2549 * remake.c (update_goal_chain): Call start_waiting_jobs at the top
2551 * compatMakefile (objs, srcs): Removed load, added getloadavg.
2553 Fri Jun 12 19:33:16 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2555 * job.c (load_too_high): New function. Uses getloadavg.
2556 (waiting_jobs): New variable.
2557 (start_job): Don't call wait_to_start_job. Instead, if
2558 load_too_high returns nonzero, add the child to the
2559 `waiting_jobs' chain and return without starting the job.
2561 Thu Jun 11 00:05:28 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2563 * expand.c (variable_buffer_output): Made global again.
2564 * variable.h: And declare it.
2566 * arscan.c (PORTAR): Define for all systems if PORT5AR is not defined.
2567 (AR_NAMELEN, AR_TRAILING_SLASH): Removed.
2568 (ar_scan): Don't use it. Don't #ifdef AR_TRAILING_SLASH; just look
2569 for a slash in the archive at run time.
2570 (ar_name_equal): Rewrote .o hacking to not use AR_NAMELEN, and to
2571 cope with trailing-slash and non-trailing-slash archives.
2573 * main.c (main) [! SETVBUF_REVERSED]: Test this instead of USGr3 et al.
2574 [SETVBUF_REVERSED]: Always allocate a buffer ourselves.
2576 * load.c (load_average) [sgi]: Use sysmp call.
2578 * compatMakefile (INSTALL_DATA, INSTALL_PROGRAM): Define.
2579 ($(bindir)/$(instname), $(mandir)/make.$(manext)): Use them.
2581 * make.h [HAVE_VFORK_H]: #include <vfork.h>.
2582 (vfork, VFORK_NAME): Don't define.
2583 * job.c (start_job): Use "vfork" in place of VFORK_NAME.
2585 * make.h [HAVE_LIMITS_H, HAVE_SYS_PARAM_H]: If #define'd, #include
2586 the each file. Rearranged PATH_MAX hacking.
2587 * job.c: Rearranged NGROUPS_MAX hacking.
2589 * remake.c (fstat, time): Don't declare.
2591 * compatMakefile (defines): Value is @DEFS@.
2592 (LOADLIBES): Value is @LIBS@.
2593 (extras): Value is @LIBOBJS@.
2594 (ARCHIVES, ARCHIVES_SRC, ALLOCASRC): Removed.
2595 * arscan.c, ar.c: Surround body with #ifndef NO_ARCHIVES.
2597 * misc.c [! HAVE_UNISTD_H]: Test instead of !POSIX to decl get*id.
2599 * make.h [GETCWD_MISSING]: Test instead of !USG && !POSIX et al.
2600 (getcwd): Just declare if present. If not, declare as a macro
2601 using getwd, and declare getwd.
2602 [PATH_MAX] (GET_PATH_MAX): #define to PATH_MAX.
2603 * main.c (main, log_working_directory): Use getcwd instead of getwd.
2605 * main.c (main) [SETLINEBUF_MISSING]: Test this instead of USG.
2607 * make.h (SIGHANDLER, SIGNAL): Removed.
2608 (RETSIGTYPE): Define if not #define'd.
2609 * main.c (main): Use signal in place of SIGNAL.
2611 * main.c [SYS_SIGLIST_MISSING]: Test instead of USG.
2613 * job.c (search_path) [GETGROUPS_MISSING]: Test instead of USG.
2614 [HAVE_UNISTD_H]: Test instead of POSIX to not decl getgroups.
2616 * main.c [! HAVE_UNISTD_H]: Test instead of !POSIX to decl chdir.
2617 [! STDC_HEADERS]: Test instead of !POSIX to decl exit & atof.
2619 * job.c (child_handler), commands.c (fatal_error_signal): Return
2620 RETSIGTYPE instead of int.
2621 * main.c (main): Declare fatal_error_signal and child_handler here
2622 to return RETSIGTYPE; removed top-level decl of former.
2624 * commands.c (fatal_error_signal), job.c (unblock_sigs, start_job),
2625 main.c [SIGSETMASK_MISSING]: Test this instead of USG.
2627 Wed Jun 10 22:06:13 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2629 * job.c [HAVE_WAITPID]: Test this instead of USG.
2630 [! HAVE_UNISTD_H]: Test this instead of !POSIX to declare misc fns.
2631 (GID_T): Don't #define.
2632 (search_path): Use gid_t instead of GID_T.
2633 [GETDTABLESIZE_MISSING, SYS_SIGLIST_MISSING, DUP2_MISSING]: Test
2634 these individually instead of USG for all.
2635 * make.h (ctime): Don't declare. #include time.h instead.
2636 [HAVE_UNISTD_H]: #include <unistd.h> and #define POSIX #ifdef
2638 * dir.c [__GNU_LIBRARY__] (D_NAMLEN): Define to use d_namlen member.
2639 * make.h [NEED_MEMORY_H]: Only include memory.h #ifdef this.
2641 * arscan.c: Removed #ifdef mess about string.h et al.
2642 Just #include make.h instead.
2643 * make.h (fstat, atol): Declare.
2645 * commands.c (fatal_error_signal): Don't use sigmask to check for
2646 propagated signals; use ||s instead.
2647 (PROPAGATED_SIGNAL_MASK): Removed.
2648 (fatal_error_signal) [POSIX]: Use sigprocmask in place of sigsetmask.
2650 * variable.c (variable_buffer, variable_buffer_length,
2651 initialize_variable_output, variable_output): Moved to expand.c;
2653 (struct output_state, save_variable_output,
2654 restore_variable_output): Removed.
2655 * expand.c (initialize_variable_output): Put a NUL at the beginning
2656 of the new buffer after allocating it.
2657 (allocated_variable_expand_for_file): Don't use
2658 {save,restore}_variable_output. Do it by hand instead, keeping
2659 state on the stack instead of malloc'ing it.
2660 (allocated_variable_expand): Removed.
2661 * variable.h (allocated_variable_expand): Define here as macro.
2662 (variable_buffer_output, initialize_variable_output,
2663 save_variable_output, restore_variable_output): Removed decls.
2665 * read.c (conditional_line): For an if cmd, if any elt of the
2666 conditionals stack is ignoring, just push a new level that ignores
2667 and return 1; don't evaluate the condition.
2669 Thu Jun 4 21:01:20 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2671 * main.c (main): Put #ifdef's around frobbing SIGSYS and SIGBUS.
2673 * job.c (getdtablesize): Don't declare or #define if already #define'd.
2675 Wed Jun 3 23:42:36 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2677 * file.c (snap_deps): If `.EXPORT_ALL_VARIABLES' is a target, set
2678 export_all_variables.
2679 * make.texinfo (Variables/Recursion): Document .EXPORT_ALL_VARIABLES.
2681 Tue Jun 2 21:08:35 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2685 * commands.c (set_file_variables): Calculate length for ^D and ?D
2686 individually, making sure to give them at least enough space for "./".
2688 * make.h [CRAY]: #define signal to bsdsignal.
2690 * default.c (default_variables) [CRAY]: Define PC, SEGLDR,
2691 CF77PPFLAGS, CF77PP, CFT, CF, and FC.
2693 * arscan.c (AR_HDR_SIZE): Define to sizeof (struct ar_hdr), if it
2694 wasn't defined by <ar.h>.
2696 Thu May 28 00:56:53 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2700 Tue May 26 01:26:30 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2702 * rule.c (new_pattern_rule): Initialize LASTRULE to nil, not
2705 Mon May 25 19:02:15 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2707 * main.c (decode_switches): Initialize all the long_option elt members.
2709 Thu May 21 16:34:24 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
2711 * make.texinfo (Text Functions): Correct filter-out description.
2713 Tue May 19 20:50:01 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2715 * compatMakefile (realclean): Don't remove backup files.
2717 * main.c (decode_switches): Allocate ARGC+1 elts in `other_args'.
2719 Sun May 17 16:38:48 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2723 Thu May 14 16:42:33 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2725 * job.c (reap_children): Don't die if wait returns EINTR.
2727 Wed May 13 18:28:25 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2729 * job.c (reap_children): Always run the next command for a
2730 successful target. If we are going to die, we don't want to leave
2731 the target partially made.
2733 Tue May 12 00:39:19 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2735 * job.c (construct_command_argv_internal): After loop, if we only
2736 have one word, check it for being a shell command.
2738 * main.c (decode_switches): Allocate ARGC slots in other_args to
2739 begin with, so we never need to worry about growing it.
2740 If we get a non-option arg and POSIXLY_CORRECT is in the
2741 environment, break out of the loop. After the loop, add all remaining
2742 args to other_args list.
2744 * main.c (decode_switches): For positive_int and floating switches
2745 when optarg is nil, use next arg if it looks right (start with a
2746 digit, or maybe decimal point for floating).
2748 * variable.c (define_automatic_variables): Always set SHELL to
2749 default if it comes from the environment. Set its export bit.
2750 * make.texinfo (Environment): Document change.
2752 Mon May 11 00:32:46 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2756 * compatMakefile (tags, TAGS): Use vars for cmds.
2757 (ETAGS, CTAGS): Define.
2759 * main.c (decode_switches): If a switches elt has a nil long_name,
2760 make the long option name elt be "".
2761 Fixed loop to not ignore all the options.
2763 * make.texinfo (Option Summary): Added long options.
2765 * main.c (switches): Changed -m's description to "-b".
2766 (decode_switches): When printing the usage message, don't print
2767 switches whose descriptions start with -.
2768 When constructing the list of names for switch -C, search the
2769 switches vector for switches whose descriptions are "-C".
2771 * main.c (switches): Call -S --no-keep-going, not --dont-keep-going.
2772 Call -I --include-dir, not --include-path.
2773 (long_option_aliases): Added --new == -W, --assume-new == -W,
2774 --assume-old == -o, --max-load == -l, --dry-run == -n, --recon == -n,
2777 * main.c (switches): Removed bogus "silent" elt.
2778 (long_option_aliases): Define new var.
2779 (decode_switches): Add long_option_aliases onto the end of the long
2780 options vector created for getopt_long.
2781 Look through long_option_aliases for extra names to list
2784 Sat May 9 00:21:05 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2786 * main.c (log_working_directory): Fixed to properly not print the
2787 leaving message when we haven't printed the entering message.
2789 Fri May 8 21:55:35 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2791 * main.c (struct command_switch): Added elts `long_name',
2792 `description', and `argdesc'.
2793 (switches): Added initializers for new members.
2794 (decode_switches): Rewritten to use getopt_long.
2795 * compatMakefile (GETOPT, GETOPT_SRC): Define.
2796 (objs, srcs): Include them.
2798 * job.c (child_died): Renamed to dead_children; made static.
2799 (child_handler): Increment dead_children instead of setting child_died.
2800 (reap_children): Decrement dead_children instead of clearing
2801 child_died. The point of all this is to avoid printing "waiting
2802 for unfinished jobs" when we don't actually need to block.
2803 This happened when multiple SIGCHLDs before reap_children was called.
2805 * job.c (reap_children): If ERR is set, so we don't call start_job
2806 on the child being reaped, instead set its command_state to
2808 (reap_children, child_handler, new_job): I added several
2809 debugging printf's while fixing this. I left them in if (debug_flag)
2810 because they may be useful for debugging this stuff again.
2812 Wed May 6 22:02:37 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2814 * read.c (read_makefile): v_export is not 1.
2816 Mon May 4 17:27:37 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2820 * variable.c (export_all_variables): New variable.
2821 (target_environment): Export variables whose `export' member is
2822 v_default if export_all_variables is set and their names are benign.
2823 * variable.h: Declare export_all_variables.
2824 * read.c (read_makefile): If export or unexport is given with no
2825 args, set or clear export_all_variables, respectively.
2827 * variable.c (target_environment): Exclude MAKELEVEL in the loop,
2828 so it isn't duplicated when we add it at the end.
2830 Sun May 3 17:44:48 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2834 * variable.h (struct variable): Added new member `export'.
2835 * variable.c (define_variable_in_set): Initialize it to v_default.
2836 (target_environment): Don't check for .NOEXPORT.
2837 Export variables whose `export' member is v_default and that would
2838 have been exported under .NOEXPORT, and variables whose `export'
2840 (try_variable_definition): Return the variable defined.
2841 * variable.h (try_variable_definition): Changed decl.
2842 * read.c (read_makefile): Recognize `export' and `unexport' directives.
2844 Fri May 1 11:39:38 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2846 * main.c (main) [POSIX]: Reversed args to sigaddset.
2848 Thu Apr 30 17:33:32 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2850 * job.c [POSIX || !USG] (unblock_sigs): New fn.
2851 (start_job): Block signals before forking.
2852 (new_job): Unblock signals after putting the new child on the chain.
2853 * main.c (main) [POSIX]: Use sigset_t fatal_signal_set instead of
2854 int fatal_signal_mask.
2856 * load.c [sgi] (LDAV_CVT): Define.
2858 Wed Apr 29 17:15:59 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2862 * load.c (load_average) [sgi]: Clear the high bit of the address
2863 from the symbol table before looking it up in kmem.
2865 * misc.c (fatal, makefile_fatal): Put *** in fatal error messages.
2866 (remake_file): No longer needed in message here.
2868 * main.c (die): Call reap_children with BLOCK==1.
2870 Tue Apr 28 20:44:35 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2872 * rule.c (freerule): Don't set LASTRULE->next if LASTRULE is nil.
2874 Sun Apr 26 15:09:51 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2876 * rule.c (count_implicit_rule_limits): Initialize LASTRULE to nil,
2877 not to head of chain. Extract next ptr before we might do
2878 freerule, and use that for next iteration.
2879 (freerule): Still do next ptr frobbing if LASTRULE is nil.
2881 Tue Apr 21 03:16:29 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2883 * job.c (child_error): Removed extra %s from error msg format.
2887 * job.c (reap_children): Don't start later commands in a sequence
2890 * job.c (new_job): Always call reap_children with BLOCK==0 first thing.
2892 * job.c (reap_children): New function; work that used to be done in
2894 (child_died): New global var.
2895 (child_handler): Now just sets child_died.
2896 (wait_for_children): Removed.
2897 (unknown_children_possible, block_signals, unblock_signals,
2898 push_signals_blocked_p, pop_signals_blocked_p): Removed.
2899 (child_execute_job): Removed call to unblock_signals.
2900 (new_job): Removed calls to push_signals_blocked_p and
2901 pop_signals_blocked_p.
2902 * job.h: Declare reap_children, not wait_for_children.
2903 * commands.c (fatal_error_signal), job.c (new_job),
2904 load.c [LDAV_BASED] (wait_to_start_job), main.c (die),
2905 remake.c (update_goal_chain), function.c (expand_function: `shell'):
2906 Changed wait_for_children calls to reap_children.
2907 Some needed to be loops to wait for all children to die.
2908 * commands.c (fatal_error_signal), main.c (main,
2909 log_working_directory), function.c (expand_function): Removed calls
2910 to push_signals_blocked_p and pop_signals_blocked_p.
2911 * job.h: Removed decls.
2913 * job.h: Added copyright notice.
2915 Wed Apr 15 02:02:40 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2917 * job.c (child_error): No *** for ignored error.
2919 Tue Apr 14 18:31:21 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2921 * implicit.c (DEBUGP2): Use do ... while (0) instead of if ... else to
2922 avoid compiler warnings.
2924 * read.c (parse_file_seq): Don't remove ./ when it is followed by a
2927 Mon Apr 13 21:56:15 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2929 * make.h (DEBUGPR): Use do ... while (0) instead of if ... else to
2930 avoid compiler warnings.
2932 * remake.c (notice_finished_file): Run file_mtime on the also_make
2933 files, so vpath_search can happen.
2935 * GNUmakefile (tests): Use perl test suite from csa@sw.stratus.com.
2936 (alpha-files): Include test suite tar file.
2938 Fri Apr 3 00:50:13 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2942 Wed Apr 1 05:31:18 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2944 * remake.c (update_file, update_file_1): Do check_renamed on elts
2945 of dep chains when traversing them. Something unrelated might have
2946 renamed one of the files the dep chain points to.
2948 * file.c (rename_file): If FILE has been renamed, follow its
2949 `renamed' ptr, so we get to the final real FILE. Using the renamed
2950 ones loses because they are not in the hash table, so the removal
2951 code loops infinitely.
2953 * read.c (read_all_makefiles): Clobber null terminator into
2954 MAKEFILES expansion, so string passed to read_makefile is properly
2957 Mon Mar 30 20:18:02 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2959 * commands.c (set_file_variables): $* for archive member with
2960 explicit cmds is stem of member, not of whole `lib(member)'.
2962 Thu Mar 26 15:24:38 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2966 Tue Mar 24 05:20:51 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2968 * rule.c (new_pattern_rule): Rules are identical only if all their
2969 targets match (regardless of order).
2971 Wed Mar 11 13:49:54 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2973 * remake.c (remake_file): Changed error "no way to make" to "no
2974 rule to make". Fiat Hugh.
2976 * make.texinfo (Last Resort): Describe %:: rules and new .DEFAULT
2979 * remake.c (update_file_1): Only use .DEFAULT cmds if FILE is not a
2982 Tue Mar 10 18:13:13 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
2984 * remote-stub.c, remote-cstms.c (start_remote_job): Take new arg,
2985 environment to pass to child.
2986 * job.c (start_job): Pass it.
2988 Mon Mar 9 19:00:11 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2990 * file.c (enter_file): Also strip ./s here, to get command-line
2993 * remote-cstms.c: Add comment telling people to leave me alone.
2995 * compatMakefile (manpage install): Remove target before copying.
2997 Tue Mar 3 18:43:21 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2999 * make.texinfo (Missing): Renamed to "Incompatibilities and ...".
3000 Added paragraph describing $? incompatibility with Unix and POSIX.2.
3002 Sun Mar 1 15:50:54 1992 Roland McGrath (roland@nutrimat.gnu.ai.mit.edu)
3004 * function.c (expand_function: `shell'): Don't declare fork or pipe.
3005 Use vfork instead of fork.
3007 Tue Feb 25 22:05:32 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3009 * make.texinfo (Chained Rules): Clarify .PRECIOUS to save
3012 * load.c [sun] (LDAV_CVT): Define to divide by FSCALE.
3014 Sun Feb 16 02:05:16 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3018 Sat Feb 15 17:12:20 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3020 * compatMakefile (makeinfo): Use emacs batch-texinfo-format fn.
3022 Fri Feb 14 00:11:55 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3024 * read.c (read_makefile): Correctly handle define & endef in ifdefs.
3026 * read.c (record_files): Pass arg for %s in error msg.
3028 * main.c (main) [__IBMR2, POSIX]: Use correct (a la USGr3) setvbuf
3031 Wed Feb 12 12:07:39 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3033 * make.texinfo (Libraries/Search): Say it does /usr/local/lib too.
3035 Sun Feb 9 23:06:24 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3037 * read.c (read_makefile): Check for extraneous `endef' when ignoring.
3039 Thu Feb 6 16:15:48 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3043 Tue Feb 4 20:04:46 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3045 * job.c (construct_command_argv_internal): Correctly ignore
3046 whitespace after backslash-NL.
3048 Fri Jan 31 18:30:05 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3050 * compatMakefile: Ignore errors from chgrp and chmod when installing.
3052 Wed Jan 29 18:13:30 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3054 * main.c (main): When setting MAKELEVEL in the env to re-exec,
3055 allocate space so as not to clobber past the end of the old string.
3057 * make.h [HAVE_ALLOCA_H]: Include <alloca.h>
3058 * compatMakefile (defines): Document HAVE_ALLOCA_H.
3060 Mon Jan 20 13:40:05 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3062 * make.h [VFORK_MISSING]: Use fork instead.
3063 * compatMakefile (defines): Document same.
3065 * job.c (construct_command_argv_internal): Don't create an empty
3066 arg if backslash-NL is at beginning of word.
3068 Sun Jan 19 16:26:53 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3070 * main.c [DGUX]: Call setvbuf as for USGr3.
3072 * job.c (construct_command_argv_internal): Notice correctly that
3073 backslash-NL is the end of the arg (because it is replaced with a
3076 Thu Jan 16 18:42:38 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3078 * job.c (construct_command_argv_internal): If SHELL is nil, set it
3079 to default_shell before proceeding.
3081 * make.h [sgi]: No alloca.h, after all.
3083 Wed Jan 15 12:30:04 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3085 * read.c (multi_glob): Cons up the chain of the results of glob
3086 from back to front, so it comes out in forward order.
3088 * job.c (construct_command_argv_internal): Don't eat char following
3091 Mon Jan 13 19:16:56 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3095 * default.c (default_variables) [ultrix]: GET=get, like USG.
3097 * job.c (construct_command_argv_internal): Remove tabs following
3098 backslash-NL combos in the input line, so they don't show up when
3099 that line is printed.
3101 * read.c (read_makefile): Don't collapse_continuations the line on
3102 input; do it on the copy we do remove_comments on.
3103 For rule lines, collapse_continuations the line after chopping
3104 ";cmds" off the end, so we don't eat conts in the cmds.
3105 Give error for ";cmds" with no rule.
3106 * job.c (construct_command_argv_internal): Eat backslash-NL combos
3107 when constructing the line to recurse on for slow, too.
3109 Sat Jan 11 02:20:27 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3111 * file.c (enter_file): Don't strip leading `./'s.
3112 * read.c (parse_file_seq): Take new arg STRIP; if nonzero, do it here.
3113 * default.c (set_default_suffixes), function.c (string_glob),
3114 read.c (read_makefile), rule.c (install_pattern_rule): Change callers.
3116 * default.c (default_variables) [_IBMR2]: FC=xlf
3118 * job.c (construct_command_argv_internal): Turn backslash-NL and
3119 following whitespace into a single space, rather than just eating
3122 * make.texinfo (Copying): @include gpl.texinfo, rather than
3123 duplicating its contents.
3125 Fri Nov 8 20:06:03 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3127 * job.c (construct_command_argv_internal): Make sure not to bother
3128 processing an empty line.
3132 * job.c (construct_command_argv_internal): Always recurse for slow;
3133 simple case didn't handle finding newlines.
3135 Tue Nov 5 18:51:10 1991 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3137 * job.c (construct_command_argv_internal): Set RESTP properly when
3138 slow; don't \ify past a newline.
3140 Fri Nov 1 19:34:28 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3142 * make.h [sgi]: #include <alloca.h>.
3144 Tue Oct 29 20:57:36 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3148 * remake.c (update_file_1): Check for deps still running before
3149 giving up if any dep has failed.
3151 Sat Oct 26 16:20:00 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3153 * make.h [uts]: #undef S_ISREG and S_ISDIR if defined.
3155 Fri Oct 25 19:50:39 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3159 Thu Oct 24 16:58:36 1991 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3161 * job.c (start_job): Don't check for empty cmds before tweaking the
3162 command_ptr. Just let construct_command_argv do it.
3164 Tue Oct 22 20:21:03 1991 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3166 * remake.c, arscan.c [POSIX]: <fcntl.h> instead of <sys/file.h>.
3168 * make.h [POSIX]: Declare vfork as pid_t.
3170 Mon Oct 21 15:37:30 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3174 * job.c (construct_command_argv, construct_command_argv_internal):
3175 Take new 2nd arg RESTP. If non-NULL, stop parsing at newline, and
3176 store addr of the NL in *RESTP.
3177 (start_job): Don't chop expanded cmd lines up; use above code to do it.
3178 * function.c (expand_function: `shell'): Pass RESTP==NULL.
3180 Sat Oct 19 15:36:34 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3184 Fri Oct 18 15:26:55 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3186 * job.c (start_job): If on the same cmds->command_lines elt, look
3187 at cmds->lines_recurse[CHILD->command_line - 1] instead of
3188 [CHILD->command_line].
3190 * dir.c [sgi]: <sys/dir.h>, not ndir or anything else.
3192 Thu Oct 17 16:28:55 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3194 * file.c (print_file_data_base): Remove unused var.
3196 * make.h [NeXT]: No #define ANSI_STRING.
3198 Tue Oct 15 20:08:41 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3202 Fri Oct 11 16:23:52 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3204 * make.h: Use PATH_MAX for getwd defn.
3206 * make.h: Move getcwd/getwd outside of #ifndef POSIX, and make it
3209 Thu Oct 10 11:53:31 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3213 * read.c (read_all_makefiles): When processing MAKEFILES, save the
3214 malloc'd ptr to be freed, instead of freeing part-way thru it.
3216 * remake.c (update_file_1): Don't tweak FILE->also_make.
3217 (update_file): Do it here. After calling update_file_1, set the
3218 command_state, update_status, and updated members of each also_make
3219 elt to FILE's values.
3221 Tue Oct 8 14:56:04 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3225 * remake.c (notice_finished_file): Set command_state of FILE and
3226 its also_make chain to cs_finished here.
3227 * commands.c (execute_file_commands), job.c (child_handler),
3228 remake.c (remake_file): Don't set it before calling
3229 notice_finished_file.
3231 * file.h (struct file): Changed `also_make' to struct dep *.
3232 * job.c (delete_child_targets), file.c (print_file_data_base),
3233 remake.c (notice_finished_file), implicit.c (pattern_search):
3234 Use dep chain instead of array of file names.
3236 Mon Oct 7 17:04:33 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3240 * arscan.c: Declare open.
3241 * misc.c: Declare {get,set}{re,}[ug]id.
3242 * variable.c (target_environment): Declare getenv.
3244 Sat Oct 5 15:13:03 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3246 * make.h [NeXT]: <string.h> instead of <strings.h>.
3248 Fri Oct 4 16:05:41 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3250 * default.c (default_suffixes, defualt_suffix_rules): Add .texi
3255 * job.c: Move vfork decl into make.h.
3257 Fri Sep 27 18:45:30 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3259 * compatMakefile (glob/libglob.a): Pass CC value to submake.
3261 Thu Sep 26 00:08:15 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3263 * load.c (load_average): Made not static.
3265 * load.c [ultrix && vax]: Define LDAV_TYPE and LDAV_CVT for Ultrix 4.2.
3267 Tue Sep 24 00:17:20 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3271 * read.c (record_files): Warn about extra cmds even if the target's
3272 name begins with a dot. I think the lusers can handle this.
3274 Mon Sep 23 22:33:26 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3276 * make.h, arscan.c: Don't declare bcmp, bzero, or bcopy if they're
3278 * make.h: Declare write and open.
3280 * default.c (default_suffixes, default_suffix_rules,
3281 default_variables): Add .C just like .cc.
3282 * make.texinfo (Catalogue of Rules): Document .C.
3284 * make.man (-w): Fix gramo.
3286 Fri Sep 20 17:18:16 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3288 * make.h: No text after #endif.
3290 Sun Sep 15 16:20:46 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3294 * implicit.c (pattern_search): In the second pass, recurse on rule
3295 deps that don't have a %. Why did I make it not do this?
3297 Fri Sep 14 18:29:39 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3299 * read.c (record_files): For extra cmds, use the last ones given.
3300 If the target's name doesn't begin with a dot (bletch!!), emit a
3301 two-line warning, one line giving the old cmds' location and the
3302 other the new cmds' location.
3304 * misc.c (makefile_error, makefile_fatal): New fns.
3305 * make.h: Declare them.
3306 * Use them instead of error/fatal for all msgs including a file
3307 name and line number.
3309 Thu Sep 13 16:35:54 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3311 * make.h: Declare define_default_variables.
3312 Declare ar_parse_name, instead of ar_name_parse (M-t).
3314 Mon Sep 10 18:35:40 1991 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3318 * make.texinfo (Variables: Setting): Say whitespace is removed if
3319 "immediately after =", rather than simply "after =".
3321 * job.c: Don't declare wait #ifdef POSIX.
3323 * make.h [__GNUC__]: #undef alloca and then #define it.
3325 * main.c (main): When pruning makefiles which might loop from the
3326 read_makefiles chain, look at all `prev' entries of double-colon rules.
3328 Fri Sep 7 00:41:53 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3330 * main.c (main): Only remove makefiles with cmds but no deps from
3331 the list of makefiles to be rebuilt if they are :: targets.
3332 : targets with cmds and no deps are not dangerous.
3334 Wed Sep 5 17:35:51 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3336 * compatMakefile (defines): Add comment that some compilers take
3337 ENUM_BITFIELDS but produce bogus code.
3338 (LOAD_AVG): Fix examples to \ "s.
3339 (LOADLIBES): Add comment that SGI Irix needs -lmld for nlist.
3341 Tue Sep 4 20:26:26 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3345 Fri Aug 30 19:34:04 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3347 * remake.c (update_file_1): When checking the command_state of
3348 deps, check through the prev chain.
3349 (update_goal_chain): When a target is finished, start checking its
3350 prev (if it has one) instead.
3352 Wed Aug 7 17:32:03 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3354 * rule.c (convert_to_pattern): Allow files with deps to define
3355 suffix rules (really this time).
3357 Mon Aug 5 17:09:21 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3359 * misc.c (user_access, make_access): Do saved-IDs (USG) flavor
3362 * file.c (enter_file): Strip ./s here.
3363 * read.c (parse_file_seq): Not here.
3365 Tue Jul 23 23:34:30 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3367 * compatMakefile: Added comment that -lPW alloca is broken on HPUX.
3369 Thu Jul 18 03:10:41 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3373 * read.c (read_makefile): Ignore lines containing chars that are
3374 all isspace, not just all isblank.
3376 * make.texinfo (Copying): @include gpl.texinfo, rather than copying
3378 * gpl.texinfo: New file (symlink to /gd/gnu/doc/gpl.texinfo).
3379 * GNUmakefile: Put gpl.texinfo in distribution.
3381 Tue Jul 16 12:50:35 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3383 * make.h: #define _GNU_SOURCE before including headers.
3384 Include <ctype.h> and define isblank if <ctype.h> doesn't.
3385 * commands.c: Don't include <ctype.h> here.
3386 * *.c: Use isblank instead of explicit ' ' || '\t'.
3388 Mon Jul 15 17:43:38 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3390 * function.c (expand_function: `filter'/`filter-out'): Fixed to not
3393 Fri Jul 12 12:18:12 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3395 * function.c (expand_function: `filter'/`filter-out'): Rewritten to
3396 handle filter-out of multiple patterns properly. Also no longer
3397 mallocs and reallocs for temp array; uses alloca and a linked-list
3400 Wed Jul 10 22:34:54 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3404 * make.texinfo: Moved some @groups that were outside @examples to
3407 * load.c [apollo] (load_average): Define using special syscall for
3408 Apollo DOMAIN/OS SR10.n.
3410 Thu Jul 4 12:32:53 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3412 * make.texinfo (Missing): Added Unix excessive implicit rule
3413 search; mention that POSIX.2 doesn't require any of the missing
3415 (Top): Updated printed manual price to $15.
3417 Wed Jul 3 18:17:50 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3419 * file.c (rename_file): Carry over last_mtime when merging files.
3420 * remake.c (f_mtime): Tail-recurse after renaming VPATH file, to
3421 check for saved date in existing renamed-to file.
3423 * remote-cstms.c (start_remote_job): Use PATH_VAR.
3425 * commands.c [POSIX || __GNU_LIBRARY__]: Don't declare getpid.
3427 * compatMakefile (glob-{clean,realclean}): Run clean/realclean in glob.
3428 (clean, realclean): Require those.
3430 * make.h: Always declare environ.
3431 Don't declare old glob functions.
3433 * GNUmakefile: Make no-lib deps for load.c and remote.c.
3435 Tue Jul 2 18:35:20 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3439 Mon Jul 1 16:58:30 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3441 * read.c (multi_glob): Don't pass GLOB_QUOTE flag to glob.
3443 * make.h [POSIX]: Include <unistd.h>, and don't declare things that
3446 * main.c (main) [USG && sgi]: malloc a buffer for broken sgi stdio.
3448 Sat Jun 29 11:22:21 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3450 * function.c (expand_function: `shell'): Use alloca for the error
3451 msg buffer, instead of assuming an arbitrary max size.
3453 Fri Jun 28 18:15:08 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3455 * job.c [POSIX] (search_path): Do real 1003.1 goop to get NGROUPS_MAX.
3457 Wed Jun 26 11:04:44 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3459 * default.c (define_default_variables): New fn.
3460 (install_default_implicit_rules): Code for above fn moved there.
3461 * main.c (main): Do define_default_variables before reading the
3464 Tue Jun 25 17:30:46 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3466 * main.c (main): Quote ; in MAKEOVERRIDES.
3468 Tue Jun 18 13:56:30 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3470 * compatMakefile: Fixed typo in comment.
3472 Tue Jun 11 00:14:59 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3476 Mon Jun 10 14:46:37 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3478 * make.h: Always include <sys/types.h>.
3479 [POSIX]: Include <limits.h> and #define MAXPATHLEN to be PATH_MAX.
3481 * default.c (default_suffix_rules: .texinfo.dvi): Use $(TEXI2DVI).
3482 (default_variables): Define TEXI2DVI.
3484 Thu Jun 6 16:49:19 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3488 * make.h (SIGNAL): Cast handler arg to SIGHANDLER type.
3490 Wed Jun 5 06:00:43 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3492 * read.c (multi_glob): Use POSIX.2 `glob' function.
3493 If a glob pattern matches nothing, leave it as is (a la sh, bash).
3494 Also, if can't find USER for ~USER, leave it as is (a la bash).
3496 Mon Jun 3 16:36:00 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3498 * compatMakefile: Rewrote comments about -Ds to be easier to use.
3500 * make.h, arscan.c, remake.c, main.c, dir.c, job.c: Changed tests
3501 of _POSIX_SOURCE to POSIX.
3503 * job.c: Take getdtablesize out of #ifdef __GNU_LIBRARY__.
3504 Put separately #ifdef USG.
3506 * COPYING: Replaced with version 2.
3507 * Changed copyright notices to refer to GPL v2.
3509 Thu May 30 00:31:11 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3511 * make.h: Don't declare sigblock for POSIX.
3513 * main.c (main, log_working_directory) [USG]: Get getcwd failure
3514 mode from errno, not passed buffer like BSD getwd.
3516 * misc.c (child_access): New fn to set access for a child process;
3517 like user_access, but you can't change back.
3518 * make.h: Declare it.
3519 * job.c (exec_command): Use it in place of user_access.
3521 Wed May 29 23:28:48 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3523 * default.c (default_variables) [pyr]: PC = pascal.
3525 Tue May 28 20:24:56 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3527 * variable.c (print_variable): Put a newline before `endef'.
3529 Sat May 25 02:39:52 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3533 Wed May 22 19:41:37 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3537 Thu May 16 13:59:24 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3539 * main.c (main): Do USGr3 setvbuf behavior #ifdef APOLLO.
3540 Don't handle SIGCHLD #ifdef USG (Apollo is USG but defines SIGCHLD).
3542 Fri May 10 14:59:33 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3544 * remake.c [sgi]: Don't include <sys/file.h>.
3546 Wed May 8 01:54:08 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3548 * make.h (SIGHANDLER): #define as (void *) #if __STDC__,
3550 (SIGNAL): Use it to cast return value.
3551 * main.c (main): Cast SIG_IGN to SIGHANDLER when comparing.
3552 * job.c (block_signals, unblock_signals): Use SIGNAL instead of signal.
3554 * main.c: Declare mktemp to return char*, not int.
3556 * job.c (new_job): Don't increment files_remade.
3557 * remake.c (notice_finished_file): Do it here.
3559 * read.c (do_define): Don't clobber DEFINITION[-1] on empty defns.
3560 Free storage that is no longer needed.
3562 Wed Apr 24 20:49:48 1991 Roland McGrath (roland at churchy.gnu.ai.mit.edu)
3564 * misc.c (message): New fn to print informational msgs with
3565 leading "make: " or "make[N]: ".
3566 * make.h: Declare it.
3567 * remake.c (update_file): Use it instead of printf.
3569 Fri Apr 19 05:52:45 1991 Roland McGrath (roland at churchy.gnu.ai.mit.edu)
3571 * main.c (main): When there are no targets, if there were no
3572 makefiles, print a different error message, which mentions makefiles.
3574 Tue Apr 16 03:22:45 1991 Roland McGrath (roland at geech.gnu.ai.mit.edu)
3576 * remake.c (update_file): Print "nothing to be done" instead of "is
3577 up to date" if FILE->cmds == 0.
3579 * job.c [!WIFEXITED]: Define if not already defined.
3581 Thu Apr 11 18:00:50 1991 Roland McGrath (roland at wookumz.gnu.ai.mit.edu)
3583 * arscan.c (ar_name_equal): Fixed truncation comparison.
3585 Tue Apr 2 16:17:35 1991 Roland McGrath (roland at churchy.gnu.ai.mit.edu)
3587 * glob.c: Use common version from djm.
3588 * dir.c: Snarfed #ifdef mess for <dirent.h> or whatever from glob.c.
3589 (dir_file_exists_p): Ignore directory entries with d_ino==0.
3591 Mon Apr 1 20:49:45 1991 Roland McGrath (roland at albert.gnu.ai.mit.edu)
3595 Fri Mar 29 19:16:18 1991 Roland McGrath (roland at albert.gnu.ai.mit.edu)
3597 * job.c (free_child): Free CHILD->environment and its elts.
3599 Sat Mar 23 14:08:09 1991 Roland McGrath (roland at albert.gnu.ai.mit.edu)
3601 * read.c (read_makefile): Don't ignore lines containing only
3602 comments if they start with a tab. Such lines should be passed to
3603 the shell for it to decide about the comments.
3605 * job.c (free_child): Free CHILD->command_lines and its elts, not
3606 CHILD->commands (which is obsolete).
3607 * job.h, job.c: Remove obsolete `commands' member of `struct child'.
3609 Sun Mar 17 18:40:53 1991 Roland McGrath (roland at albert.ai.mit.edu)
3611 * remake.c (update_file): Print a msg for a top-level up-to-date
3612 phony target (a different one than for a real file).
3614 * read.c (conditional_line): Boundary check so we don't check the
3615 value of the -1th elt of the stack (which is bogus).
3617 Sat Mar 16 16:58:47 1991 Roland McGrath (roland at albert.ai.mit.edu)
3619 * read.c (conditional_line): Don't evaluate an if* when we're
3620 already ignoring. Instead, just push a new level, with a value of
3621 1, to keep ignoring.
3623 Tue Mar 12 00:16:52 1991 Roland McGrath (roland at geech.ai.mit.edu)
3627 Mon Mar 11 23:56:57 1991 Roland McGrath (roland at geech.ai.mit.edu)
3629 * job.c (construct_command_argv_internal): Quote backslashes
3630 when building the shell -c line.
3632 Fri Mar 8 01:40:18 1991 Roland McGrath (roland at geech.ai.mit.edu)
3634 * job.c (exec_command): Call user_access rather than setgid(getgid()).
3636 * misc.c (remove_comments): Renamed from collapse_line; took out
3637 collapse_continuations call.
3638 * make.h: Change decl.
3639 * read.c (read_makefile): Collapse continuations on the line buffer
3640 immediately after reading it. Call remove_comments rather than
3641 collapse_line (which is now defunct).
3643 Thu Feb 21 18:06:51 1991 Roland McGrath (mcgrath at cygint.cygnus.com)
3645 * misc.c (user_access, make_access): New fns to toggle btwn permissions
3646 for user data (files and spawning children), and permissions for make
3647 (for taking the load average, mostly).
3648 * make.h: Declare them.
3649 * job.c (start_job): Call make_access before wait_to_start_job, and
3651 * main.c (main): Call user_access before doing much.
3653 Mon Feb 3 15:02:03 1991 Roland McGrath (roland at albert.ai.mit.edu)
3657 Tue Jan 29 20:30:50 1991 Roland McGrath (roland at cygint.cygnus.com)
3659 * read.c (read_all_makefiles): Use allocated_variable_expand to expand
3660 `$(MAKEFILES)', since the results are used across calls to
3661 read_makefile, which could clobber them.
3663 Wed Jan 23 00:24:10 1991 Roland McGrath (roland at cygint.cygnus.com)
3665 * main.c (main): Call install_default_implicit_rules after reading
3666 makefiles, not before.
3667 * default.c (install_default_implicit_rules): If a suffix-rule file
3668 entry has cmds, don't give it any from default_suffix_rules.
3670 Fri Jan 17 17:39:49 1991 Roland McGrath (roland at albert.ai.mit.edu)
3672 * arscan.c: Added support for AIX archives.
3674 * remake.c: Don't include ar.h.
3675 * main.c: Removed unused atol decl.
3676 * arscan.c (ar_scan): Declare arg FUNCTION to return long int.
3677 * ar.c (ar_touch): Don't perror for an invalid archive.
3678 * make.h: Declare lseek as long int.
3680 * job.c [hpux]: Define getdtablesize a la USG.
3682 Sun Jan 12 21:08:34 1991 Roland McGrath (roland at albert.ai.mit.edu)
3686 Fri Jan 10 03:48:08 1991 Roland McGrath (roland at albert.ai.mit.edu)
3688 * job.c (search_path): Take new arg, place to put full pathname (rather
3690 (exec_command): Pass it, using auto storage.
3692 * main.c (print_version): Updated copyright years.
3694 Wed Jan 8 19:46:19 1991 Roland McGrath (roland at albert.ai.mit.edu)
3696 * job.c [_POSIX_SOURCE]: Just #include <sys/wait.h>, and define macro
3697 WAIT_NOHANG in terms of waitpid.
3698 [!_POSIX_SOURCE && (HAVE_SYS_WAIT || !USG)]: Don't #include <signal.h>
3700 Define macro WAIT_NOHANG in terms of wait3.
3701 (child_handler): #ifdef on WAIT_NOHANG, not HAVE_SYS_WAIT || !USG.
3702 Use WAIT_NOHANG macro instead of wait3.
3704 * file.h (struct file.command_state): Remove unused elt.
3706 Wed Dec 26 18:10:26 1990 Roland McGrath (roland at albert.ai.mit.edu)
3708 * commands.c (set_file_variables): If FILE got its commands from
3709 .DEFAULT, make $< == $@ (4.3 BSD/POSIX.2d11 compat).
3711 Mon Dec 24 17:36:27 1990 Roland McGrath (roland at albert.ai.mit.edu)
3713 * default.c (default_variables): Rename 2nd LINK.s defn to LINK.S.
3715 Fri Dec 14 15:05:25 1990 Roland McGrath (roland at albert.ai.mit.edu)
3717 * vpath.c (selective_vpath_search): Check for makefile-mentioned before
3718 checking for actual existence. The old order loses if the containing
3719 directory doesn't exist (but a rule might make it).
3721 * make.h [__GNUC__]: Don't #define alloca if already #define'd.
3723 * rule.c (convert_to_pattern): Don't look at the target constructed for
3724 the empty rule when making the null-suffix rule. Construct it over
3725 again, since the former may have been freed already.
3727 Thu Dec 13 17:21:03 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3729 * make.h [__GNU_LIBRARY__]: Include <unistd.h> to get random fn decls.
3731 Wed Dec 12 17:12:59 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3733 * make.h, arscan.c, glob.c: Only include <memory.h> #ifdef USG.
3735 * variable.c (define_variable_in_set): Replace env_overrides check that
3736 wasn't really redundant (undoing Sep 28 change). Add comment saying
3737 why this check is necessary.
3739 * job.c, main.c [DGUX]: Needs siglist like USG.
3741 Mon Dec 11 01:19:29 1990 Roland McGrath (roland at albert.ai.mit.edu)
3743 * default.c [M_XENIX]: For rules that are different for Xenix, use the
3744 generic Unix version #ifdef __GNUC__.
3746 * main.c [M_XENIX]: Use USGr3-style setvbuf call.
3748 * read.c (find_percent): Do backslash folding correctly, not leaving
3749 extra crud on the end of the string.
3751 Sun Dec 10 21:48:36 1990 Roland McGrath (roland at albert.ai.mit.edu)
3753 * job.c: Don't declare wait3 if it's #defined.
3755 * GNUmakefile, compatMakefile, make.texinfo: Change make-info
3758 Thu Dec 7 21:20:01 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3760 * make.h [STDC_HEADERS || __GNU_LIBRARY__ || _POSIX_SOURCE]: Use
3761 ANSI <string.h> and names for str/mem functions.
3762 Use <stdlib.h> to declare misc fns rather than explicit decls.
3763 [_POSIX_SOURCE]: Don't declare kill (<signal.h> will).
3764 Include <sys/types.h> before <signal.h> because some braindead
3765 nonconformant 1003.1 implementation needs it.
3766 * misc.c: Don't declare malloc, realloc. Do it in make.h.
3767 * arscan.c, glob.c: Use sequence for string fns from make.h verbatim.
3768 * make.h (S_ISDIR, S_ISREG): Declare if necessary.
3769 * commands.c (delete_child_targets), job.c (search_path), read.c
3770 (construct_include_path): Use S_ISfoo(m) instead of
3771 (m & S_IFMT) == S_IFfoo.
3772 * dir.c, glob.c [_POSIX_SOURCE]: Use dirent.
3774 Wed Nov 29 22:53:32 1990 Roland McGrath (roland at geech.ai.mit.edu)
3778 Tue Nov 28 16:00:04 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3780 * arscan.c (ar_name_equal) [APOLLO]: Don't do `.o' hacking. On Apollos
3781 the full file name is elsewhere, and there is no length restriction (or
3784 Thu Nov 23 17:33:11 1990 Roland McGrath (roland at albert.ai.mit.edu)
3786 * load.c [hp300 && BSD] (LDAV_CVT): Define for this system.
3788 Tue Nov 21 07:58:40 1990 Roland McGrath (roland at albert.ai.mit.edu)
3790 * read.c (record_files): Fix trivial bug with deciding to free storage
3793 Thu Nov 16 06:21:38 1990 Roland McGrath (roland at geech.ai.mit.edu)
3795 * compatMakefile ($(bindir)/make): Install it setgid kmem.
3797 Thu Nov 1 16:12:55 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3799 * GNUmakefile (make-*.tar.Z): Use `h' option to tar (dereference
3800 symlinks), to grab texinfo.tex from wherever it lives.
3802 Tue Oct 30 16:15:20 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3806 Fri Oct 26 14:33:34 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3808 * GNUmakefile: make-*.tar.Z: Include texinfo.tex.
3810 Tue Oct 23 19:34:33 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3812 * main.c (define_makeflags): When there are no flags to write, make
3813 sure the array has two leading nulls, since `MAKEFLAGS' is defined from
3816 * main.c (default_keep_going_flag): New variable (constant one).
3817 (command_switches: -k, -S): Use above for default value.
3818 (define_makeflags): Only write flag/flag_off switches if they are on,
3819 and either there is no default value, or they are not the default.
3821 Mon Oct 22 16:14:44 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3823 * main.c (struct command_switch): New member `no_makefile'.
3824 (command_switches: -n, -q, -t): Set no_makefile == 1.
3825 (define_makeflags): Take new arg MAKEFILE: if nonzero, don't use
3826 options whose `no_makefile' flags are set.
3827 (main): Call define_makeflags with MAKEFILE==1 before remaking
3828 makefiles, and again with MAKEFILE==0 before remaking goals.
3830 Tue Oct 2 17:16:45 1990 Roland McGrath (roland at geech.ai.mit.edu)
3834 Mon Oct 1 15:43:23 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3836 * arscan.c [HPUX]: Use PORTAR==1 format.
3838 Sat Sep 29 16:38:05 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3840 * make.h, remake.c, arscan.c: Don't declare `open'.
3842 Fri Sep 28 04:46:23 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3844 * variable.c (define_variable_in_set): Remove redundant -e check.
3846 Wed Sep 26 00:28:59 1990 Roland McGrath (roland at geech.ai.mit.edu)
3848 * job.c (start_job): Set RECURSIVE from the right elt of
3849 CHILD->file->cmds->lines_recurse.
3851 * commands.c (chop_commands): Don't botch the line count for allocating
3852 CMDS->lines_recurse.
3856 * job.c (start_job): Don't always increment CHILD->command_line! Only
3857 do it when CHILD->command_ptr has run out! (Dumb bug. Sigh.)
3859 Thu Sep 20 02:18:51 1990 Roland McGrath (roland at geech.ai.mit.edu)
3861 * GNUmakefile [ARCH]: Give explicit rule for remote.{c,dep} to use
3862 variable `REMOTE' for more flags.
3863 ($(prog)): Link in $(LOADLIBES).
3865 Wed Sep 19 02:30:36 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3867 * commands.h (struct commands): New member `ncommand_lines', the number
3868 of elts in `command_lines' et al.
3869 * commands.c (chop_commands): Set `ncommand_lines' elt of CMDS, and
3870 don't put a nil pointer at the end of `command_lines'.
3871 * job.h (struct child): New member `command_lines' to hold
3872 variable-expanded command lines.
3873 * job.c (new_job): Store expanded command lines in `command_lines'
3874 member of new child. Don't clobber FILE->cmds.
3875 (start_job): Use CHILD->command_lines in place of
3876 CHILD->file->cmds->command_lines.
3878 * variable.h, variable.c, job.c, expand.c: Undo yesterday's change,
3879 which is no longer necessary since we have cleverly avoided the issue.
3881 * job.c (start_job): Don't variable-expand each command line.
3882 (new_job): Do them all here, storing the expansions in the array.
3884 Tue Sep 18 01:23:13 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3886 * variable.h (struct variable): Remove `expanding' member.
3887 * variable.c (define_variable_in_set): Don't initialize it.
3888 * expand.c (struct variable_expanding): New type, a linked list
3889 containing `struct variable' pointers.
3890 (variables_expanding): New variable, the chain of variables currently
3892 (recursively_expand): Don't test and set `expanding' member.
3893 Instead, run through the `variables_expanding' chain looking for a link
3894 referring to V to find self-reference. Add a new link to the chain,
3895 describing V, before recursive expansion, and pop it off afterward.
3896 * job.c (child_handler): Save `variables_expanding' and clear it before
3897 calling start_job, and restore it afterward. This avoids major lossage
3898 when the SIGCHLD comes in the middle of variable expansion.
3900 Mon Sep 17 14:46:26 1990 Roland McGrath (roland at geech.ai.mit.edu)
3902 * job.c, commands.c: Don't define sigmask.
3903 * make.h: Put it here instead.
3905 * variable.c (target_environment): If `.NOEXPORT' was specified as a
3906 target, only export command-line and environment variables, and
3907 file-origin variables that were in the original environment.
3909 * make.man: Add missing ?roff control for `-I' option description.
3911 Thu Sep 13 14:10:02 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3913 * load.c [UMAX]: Move #include <sys/sysdefs.h> to [not UMAX_43].
3915 Wed Sep 12 15:10:15 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3917 * expand.c (recursively_expand): Don't use `reading_filename' and
3918 `reading_lineno_ptr' if they're nil.
3920 Thu Aug 30 17:32:50 1990 Roland McGrath (roland at geech)
3924 Tue Aug 28 04:06:29 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3926 * job.c [USG] (unknown_children_possible): New variable, set nonzero
3927 when it's possible for children not in the `children' chain to die.
3928 (block_signals) [USG]: Set it.
3929 (unblock_signals) [USG]: Clear it.
3930 (child_handler) [USG]: Don't complain about unknown children if
3931 `unknown_children_possible' is set.
3933 * read.c (do_define): Make sure there's enough space for the newline,
3934 so we don't write off the end of allocated space.
3936 * arscan.c (ar_name_equal): Fixed to work when MEM is AR_NAMELEN-1 but
3937 NAME is not the same length.
3939 Sat Aug 25 16:17:14 1990 Roland McGrath (roland at geech)
3941 * job.c (construct_command_argv_internal): Use a static char array for
3942 a constant, since old C has no auto aggregate initializers.
3944 Thu Aug 23 16:11:03 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3946 * job.c (search_path): If PATH is nil or "" use a default path.
3948 Wed Aug 22 01:05:32 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3952 * job.c (exec_command): Don't take PATH and SHELL args. Get them from
3954 (child_execute_job): Don't take FILE arg, and don't pass path and shell
3956 (start_job): Don't pass FILE arg to child_execute_job.
3957 * function.c (expand_function: `shell'): Ditto.
3958 * main.c (main): Don't pass path and shell to exec_command.
3960 Fri Aug 17 23:17:27 1990 Roland McGrath (roland at geech)
3962 * job.c (construct_command_argv_internal): New fn broken out of
3963 construct_command_argv. Takes strings SHELL and IFS instead of doing
3964 variable expansion for them. Recurse to make an argv for SHELL,
3965 passing SHELL==0. When SHELL==0, don't recurse for shell argv; make a
3966 simple one using /bin/sh.
3967 (construct_command_argv): Do the variable expansions and call above.
3969 Thu Aug 16 19:03:14 1990 Roland McGrath (roland at geech)
3971 * read.c (multi_glob): For ~USER/FILE, if USER isn't found, don't
3972 change the file name at all.
3974 Tue Aug 7 18:33:28 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
3976 * function.c (expand_function: `suffix'/`notdir'): Don't kill the last
3977 space if we never wrote one.
3979 * function.c (expand_function: `suffix'): Retain the dot, like the
3982 Mon Aug 6 14:35:06 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
3986 * main.c (decode_switches): For positive_int and floating cases, move
3987 SW past the arg (and don't set it to ""), so another switch can follow.
3989 Fri Aug 3 00:43:15 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
3991 * job.c (child_execute_job): Use unblock_signals instead of
3992 push_signals_blocked_p (0).
3994 * main.c (fatal_signal_mask): New variable, mask of signals caught with
3997 * job.c ({block,unblock}_children): Renamed to {block,unblock}_signals.
3998 Block/unblock both child signal and signals in fatal_signal_mask.
3999 (children_blocked_p_{stack,max,depth}, {push,pop}_children_blocked_p):
4000 Renamed from children to signals. Use {block,unblock}_signals instead
4001 of {block,unblock}_children.
4002 * commands.c (fatal_error_signal), job.c (wait_for_children, new_job,
4003 child_execute_job, main, log_working_directory), function.c
4004 (expand_function: `shell'), job.h: Rename {push,pop}_children_blocked_p
4005 to {push,pop}_signals_blocked_p.
4006 * job.c (child_handler): Call {block,unblock}_signals instead of just
4007 {block,unblock}_remote_children. We need to block the fatal signals.
4009 Thu Aug 2 22:41:06 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4011 * main.c, function.c: Fixed typos in comments.
4013 * file.c (print_file_data_base): Fix computation of avg files/bucket.
4015 Tue Jul 31 22:11:14 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4019 Wed Jul 25 16:32:38 1990 Roland McGrath (mcgrath at tully.Berkeley.EDU)
4021 * arscan.c (ar_name_equal): Fixed to really do it right.
4022 (ar_member_pos): Fixed order of args.
4023 * ar.c (ar_member_date_1): Ditto.
4025 Fri Jul 20 15:30:26 1990 Roland McGrath (mcgrath at tully.Berkeley.EDU)
4027 * arscan.c (ar_name_equal): Rewritten. Accounts for a possible
4028 trailing slash in MEM.
4030 * remake.c (f_mtime): Keep track of whether ARNAME is used and free it
4031 if not. Also free MEMNAME.
4032 * ar.c (ar_member_date, ar_touch): Ditto.
4034 * arscan.c (arscan) [HPUX or hpux]: Treat same as USGr3 PORTAR==1.
4036 * make.h: If NSIG is not defined, but _NSIG is, #define NSIG _NSIG.
4038 * compatMakefile: Don't use $* in explicit rules.
4040 * default.c (default_variables: "PREPROCESS.S"): Include $(CPPFLAGS).
4042 * remake.c (f_mtime): If FILE is an ar ref, get the member modtime.
4044 * function.c (string_glob): Terminate the string properly when it's
4047 Wed Jul 18 11:26:56 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4051 * commands.c (set_file_variables): Fixed computation for ^F/?F elt len.
4053 Sat Jul 14 13:41:24 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4055 * job.c (construct_command_argv): Always use
4056 allocated_variable_expand_for_file instead of variable_expand_for_file
4057 because we might be called from inside a variable expansion (for the
4060 * function.c (expand_function: `shell'): Free the arglist's storage
4061 correctly. construct_command_argv only allocates ARGV and ARGV[0].
4063 * job.c (children_blocked_p_idx): Renamed to children_blocked_p_depth.
4064 (push_children_blocked_p, pop_children_blocked_p): Use ..._depth
4065 instead of ..._idx, and do it right!
4067 Wed Jul 11 15:35:43 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4069 * make.h (SIGNAL): New macro to replace `signal' calls. Does arg and
4070 ret value casts to (void *) #ifdef __STDC__ to avoid conflicts btwn
4071 ANSI and BSD `signal' and handler types.
4072 * main.c (main), job.c (child_handler): Use it.
4074 Fri Jul 6 00:00:38 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4076 * ar.c (ar_member_date, ar_touch): Pass 2nd arg to f_mtime.
4078 * read.c (read_makefile): Search the include path for MAKEFILES
4079 variable makefiles (TYPE == 1), like it says in the manual.
4081 * file.h (struct file), main.c (struct command_switch): Remove trailing
4084 * commands.c (execute_file_commands): Remove unused variables.
4085 * commands.h: Declare chop_commands.
4086 * make.h: Declare uniquize_deps.
4087 * main.c (main): Remove unused variable.
4088 (decode_switches): Remove unused label.
4089 * remake.c: Include "ar.h" for ar_parse_name decl.
4090 * implicit.c (try_implicit_rule): Remove unused variable.
4091 * function.c (expand_function: `shell'): Declare fork, pipe.
4092 * ar.c: Declare ar_name_equal.
4094 * GNUmakefile: If using gcc, add warning flags to CFLAGS.
4096 * remake.c: Remove decl of ar_member_date, since it's done in make.h.
4098 * remake.c (f_mtime): For ar refs, allow the archive to be found via
4099 VPATH search if we're searching, and change the ar ref accordingly.
4101 * ar.c (ar_parse_name): New global fn to parse archive-member
4102 references into the archive and member names.
4103 (ar_member_date, ar_touch): Use it.
4104 * make.h: Declare it.
4106 * remake.c (f_mtime): After doing rename_file, do check_renamed instead
4107 of assuming rename_file will always set FILE->renamed (which it won't).
4109 * vpath.c (selective_vpath_search): Only accept prospective files that
4110 don't actually exist yet are mentioned in a makefile if the file we are
4111 searching for isn't a target.
4113 Wed Jul 4 04:11:55 1990 Roland McGrath (mcgrath at helen.Berkeley.EDU)
4115 * remake.c (update_goal_chain): Do check_renamed after calling
4117 (check_dep): Ditto after update_file.
4119 * file.c (rename_file): Prettied up long message for merging cmds.
4121 * remake.c (update_file_1): Get each dep file's modtime, and allow for
4122 it being renamed, before checking for a circular dep, since a renaming
4123 may have introduced one.
4125 Tue Jul 3 18:15:01 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4127 * ar.c (ar_touch): Don't free ARNAME since enter_file holds onto the
4130 * function.c (string_glob): Don't leave a trailing space.
4132 * read.c (do_define): Allow leading whitespace before `endef'.
4134 Mon Jul 2 14:10:16 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4136 * implicit.c (pattern_search): No longer take NAME arg. Instead take
4137 ARCHIVE flag. If ARCHIVE is nonzero, FILE->name is of the form
4138 "LIB(MEMBER)"; rule for "(MEMBER)" is searched for, and LASTSLASH is
4139 set to nil. Since NAME was only non-nil when it was the archive member
4140 name passed by try_implicit_rule, this change easily allows turning off
4141 LASTSLASH checking for archive members without excessive kludgery.
4142 (try_implicit_rule): Pass ARCHIVE flag instead of file name.
4146 * commands./c (set_file_variables): Don't kill last char of $(^D) elts.
4148 Sat Jun 30 00:53:38 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4150 * ar.c (ar_member_date): Don't free ARNAME since enter_file holds onto
4153 * arscan.c (ar_scan) [sun386 && PORTAR == 1]: Treat like USGr3.
4155 Wed Jun 27 14:38:49 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4157 * main.c (main): Put a newline on the debugging message when deciding
4158 not to remake a makefile to avoid a possible loop.
4159 Only decide not to remake makefiles that have commands (as well as
4160 being targets and having no deps).
4162 Fri Jun 22 12:35:37 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4164 * default.c (default_variables): Define `LINK.s' and `LINK.S'.
4165 (default_suffix_rules): Define .S.o rule.
4167 * job.c (construct_command_argv): If we decide to go the slow route,
4168 free all storage for the chopped args.
4169 (start_job): Free the argument list's storage correctly.
4170 construct_command_argv only allocates ARGV and ARGV[0].
4172 Tue Jun 19 18:27:43 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4176 Fri Jun 15 21:12:10 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4178 * glob.c: New version from ai-lab which doesn't do [^abc].
4180 Thu Jun 7 00:30:46 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4182 * dir.c: Copied dirent vs direct et al mess from glob.c.
4184 * glob.c: Replaced with updated version from djm.
4185 * glob.c: Check macro DIRENT instead of _POSIX_SOURCE for <dirent.h>.
4186 __GNU_LIBRARY__ implies DIRENT and STDC_HEADERS.
4188 Thu May 31 22:19:49 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4190 * vpath.c (vpath_search): Don't stop the loop if a pattern matches but
4191 the search fails. All matching patterns have their paths searched
4192 (like it says in the manual).
4194 * make.texinfo (Rules: Directory Search: Selective Search): Say that
4195 multiple `vpath' directives with the same pattern DO accumulate, not
4196 supersede earlier ones.
4198 * vpath.c (print_vpath_data_base): Increment the count of vpaths on
4199 each loop iteration, rather than letting it stay zero.
4203 * job.c (block_children, unblock_children): Made static.
4204 (push_children_blocked_p, pop_children_blocked_p): New functions to
4205 push and pop whether children are blocked or not.
4206 * job.h: Declare push_children_blocked_p, pop_children_blocked_p and
4207 not block_children, unblock_children.
4208 * commands.c (fatal_error_signal), job.c (wait_for_children, new_job,
4209 child_execute_job), main.c (main, log_working_directory): Use sequences
4210 of push_children_blocked_p (1) and pop_children_blocked_p () instead of
4211 explicitly blocking and unblocking children.
4212 * function.c (expand_function: `shell'): Don't unblock children. The
4213 push-pop sequence in wait_for_children makes it unnecessary.
4215 Tue May 29 21:30:00 1990 Roland McGrath (mcgrath at helen.Berkeley.EDU)
4217 * read.c (do_define): Don't include the last newline in the definition.
4219 * function.c (expand_function: `shell'): Call construct_command_argv
4220 before forking and don't fork if it returns nil. Free the argument
4221 list's storage before finishing.
4223 * job.c (start_job): Free the storage for the child's argument list
4224 in the parent side of the fork after the child has been spawned.
4226 * job.c (start_job): If construct_command_argv returns nil, go to the
4229 * job.c (construct_command_argv): Use the shell if the command contains
4230 an unterminated quote.
4232 Wed May 23 19:54:10 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4236 * read.c (read_makefile): Parse "override define" correctly.
4238 Thu May 17 15:25:58 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4240 * arscan.c [USG]: Don't declare memcpy and memcmp. <memory.h> should
4241 do this anyway (and lack of declarations is harmless).
4243 * remote-customs.c: Renamed to remote-cstms.c for System V.
4244 * remote.c [CUSTOMS]: Changed accordingly.
4246 Sun May 13 14:38:39 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4248 * GNUmakefile: Use same cmds for doc tar.Z as for dist tar.Z (so the
4249 contents go in make-N.NN).
4251 Thu Apr 26 19:33:25 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4255 Wed Apr 25 20:27:52 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4257 * job.c (init_siglist): Don't do SIGUSR1 and SIGUSR2 if they are the
4258 same as SIGIO and SIGURG (true on Cray).
4260 Tue Apr 24 20:26:41 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4262 * arscan.c (ar_scan): Do behavior for PORTAR == 1 and USGr3 also
4265 Wed Apr 11 10:00:39 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4267 * job.c (exec_command): Set the effective GID to the real GID. Somehow
4270 * implicit.c (pattern_search): Use the right index variable when
4271 seeing if we need to expand FILE->also_make.
4273 Sun Mar 4 09:18:58 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4277 * remake.c (remake_file): Treat non-targets without commands under -t
4278 the same as anything else without commands.
4280 Sat Feb 24 17:46:04 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4282 * default.c (default_variables: PREPROCESS.S): Removed $< from defn.
4284 * main.c (main): Ignore arguments that are the empty string, rather
4285 than feeding them to enter_file and barfing therein.
4287 Wed Feb 14 16:28:37 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4289 * main.c (main): Call construct_include_path after doing chdirs.
4291 Thu Feb 8 13:43:44 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4295 Sat Feb 3 22:06:55 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4299 * make.texinfo (Implicit: Catalogue of Rules): For RCS, noted that
4300 working files are never overwritten by the default rule.
4302 Thu Feb 1 17:27:54 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4304 * rule.c (count_implicit_rule_limits): Redid loop control to not run
4305 twice on freed rules.
4307 * GNUmakefile: Made `.dep' files be architecture-specific too.
4309 * main.c (main, log_working_directory) [USG]: Block children around
4310 calls to `getwd' (actually `getcwd' on USG), because that function
4311 sometimes spawns a child running /bin/pwd on USG.
4313 Tue Jan 30 14:02:50 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4315 * function.c (subst_expand): Pay attention to SUFFIX_ONLY, putz.
4317 Wed Jan 24 21:03:29 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4319 * make.man: Fixed repeated word.
4321 * make.texinfo (Missing): Reworded a buggy sentence.
4323 Mon Jan 22 12:39:22 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4325 * main.c (print_version): Added 1990 to copyright notice.
4329 Sat Jan 20 11:52:01 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4331 * file.c (rename_file): Don't free the storage for the old name, since
4332 it might not have been malloc'd.
4334 * job.c (construct_command_argv): Call
4335 allocated_variable_expand_for_file instead of variable_expand_for_file
4336 to expand `$(SHELL)'.
4338 * make.texinfo (Bugs): Change address from roland@wheaties.ai.mit.edu
4339 to roland@prep.ai.mit.edu.
4341 Tue Jan 16 19:22:33 1990 Roland McGrath (mcgrath at tully.Berkeley.EDU)
4345 Sun Jan 14 16:48:01 1990 Roland McGrath (mcgrath at helen.Berkeley.EDU)
4347 * job.c (start_job): Only call wait_to_start_job for the first command
4348 line in each sequence.
4350 Thu Jan 4 14:27:20 1990 Roland McGrath (mcgrath at helen.Berkeley.EDU)
4352 * load.c [LDAV_BASED] (wait_to_start_job): Loop while job_slots_used >
4355 * job.c (search_path): Don't return a pointer to local storage.
4356 Allocate data space for the pathname instead.
4358 * function.c (expand_function: `shell'): Don't write garbage if the
4359 child wrote no output.
4361 Wed Jan 3 15:28:30 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4365 * file.h (struct file): New member `renamed', a `struct file *' that is
4366 the place this file has been renamed to (or nil).
4367 (check_renamed): Macro to check for a file having been renamed.
4368 Dereferences the renaming and sets the given variable.
4369 * file.c (rename_file): Completely rewritten. Renames in place if
4370 possible, or moves FILE to a different hash bucket if there is no
4371 existing file with the new name. If there is an existing file with the
4372 new name, FILE is merged into it and FILE->renamed is set to point to
4374 * variable.c (merge_variable_sets): New fn to merge two variable sets.
4375 (merge_variable_set_lists): New fn to merge two variable set lists.
4376 * variable.h: Declare merge_variable_set_lists.
4377 * remake.c (update_file_1, check_dep): Run `check_renamed' after
4378 calling file_mtime, check_dep.
4379 (update_file): Same after update_file_1.
4380 (update_goal_chain, update_file_1, check_dep): Same after update_file.
4382 * read.c (uniquize_deps): New fn, broken out of record_files, to remove
4383 duplicate deps from a chain.
4384 (record_files): Use it.
4385 * implicit.c (pattern_search): Use uniquize_deps.
4387 * file.h (file_mtime_1): New macro, like file_mtime, but take second
4388 arg, passed to f_mtime.
4389 (file_mtime): Implement as file_mtime_1 (file, 1).
4390 (file_mtime_no_search): New macro: file_mtime (file, 0).
4391 * remake.c (f_mtime): Take new arg SEARCH. Only do VPATH and `-lNAME'
4392 searching if it is nonzero.
4393 * main.c (main): Use file_mtime_no_search for makefiles.
4394 * remake.c (update_goal_chain): Use file_mtime_no_search if MAKEFILES.
4396 * main.c (printed_version): New variable, init'd to zero.
4397 (print_version): Set it to nonzero before returning.
4398 (die): If -v and !printed_version, call print_version before clean up
4401 * main.c (log_working_directory): Keep track of whether or not the
4402 "Entering" message has been printed, and return without printing the
4403 "Leaving" message if not.
4405 * main.c (decode_switches): Don't complain about missing args before
4406 checking for a noarg_value elt in the command_switch structure.
4408 Tue Jan 2 15:41:08 1990 Roland McGrath (mcgrath at tully.Berkeley.EDU)
4410 * make.texinfo (Commands: Recursion: Options/Recursion): Document
4413 * make.texinfo, main.c, job.c: Changed copyright notices to include
4416 * make.texinfo (Top): Fixed introductory paragraph, which said that
4417 `make' itself (instead of the manual) has various chapters.
4418 (Variables: Advanced: Substitution Refs): When pxref'ing about
4419 `patsubst', use node `Text Functions', not `Functions'.
4420 Add an xref about `patsubst' after description of $(var:a%b=c%d).
4421 (Functions: Syntax of Functions): Explain why mixing delimiters in
4422 function/var refs is unwise. Clarify fn arg evaluation order.
4423 (Options): Reworded sentence about `-e'.
4424 (Implicit: Implicit Variables): Don't say `RM' is unused.
4425 Say the dflt values for the flag vars is empty unless otherwise noted,
4426 since some have defaults.
4427 (Implicit: Pattern Rules: Pattern Examples): Clarified use of $< and $@
4429 (Implicit: Last Resort): Don't say the .DEFAULT example creates files
4430 "silently". It's automatic, but not silent.
4431 (Implicit: Search Algorithm): Fixed confusing ungrammatical sentence
4433 (Archives: Archive Update): Added missing `next' pointer.
4434 (Archives: Archive Symbols): Note that GNU `ar' deals with this
4437 * job.c (search_path): New fn, to search for an executable file in a
4438 search path (broken out of exec_command).
4439 (exec_command): Take fourth arg, the shell program to use (if
4440 necessary). Use search_path for the program, and the shell program.
4441 Pass args "file args ..." to shell program (with no -c), where FILE is
4442 the full pathname of the program (script) to be run.
4443 (child_execute_job): Pass shell program to exec_command.
4444 * main.c (main): Ditto.
4446 * main.c (main): Don't write a message if exec_command returns, because
4447 it will never return.
4449 Fri Dec 22 16:19:58 1989 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
4451 * default.c (default_variables: "LINK.cc"): Use $(C++FLAGS) instead of
4454 Wed Dec 20 09:58:48 1989 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
4456 * job.c (new_job): If start_job set the child's `command_state' to
4457 `cs_finished', call notice_finished_file.
4459 Sun Dec 17 19:45:41 1989 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
4463 Wed Dec 13 17:57:12 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4465 * rule.c (convert_to_pattern): Accept files with dependencies as
4468 Thu Nov 30 15:47:13 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4472 * function.c (expand_function: `shell'): Don't clobber BUFFER and then
4475 * remake.c (update_file_1): Took code to force remake of nonexistent
4476 deps out of #if 0, and changed the test to nonexistent non-intermediate
4477 deps. In version 4, I think removing this test completely will
4478 implement the new feature that if a: b and b: c and c is newer than a,
4479 b need not be remade.
4481 Sun Nov 26 16:12:41 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4483 * compatMakefile (load.o, remote.o): Use $*.c instead of explicit file
4484 names so that using VPATH works.
4486 Tue Nov 21 14:57:18 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4490 Fri Nov 10 03:28:40 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4492 * remake.c (check_dep): Set *MUST_MAKE_PTR if FILE does not exist after
4493 being updated. (The exact opposite test was here before; why???)
4494 (update_file_1): Set a dep's `changed' member after updating it if it
4495 is phony and has commands (because they will then always be executed).
4497 Thu Nov 9 13:47:12 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4499 * load.c [UMAX]: #ifdef UMAX_43 include different headers for the
4501 * compatMakefile (LOAD_AVG): Document UMAX_43.
4505 * commands.c (chop_commands): New function to chop commands into lines.
4506 * job.c (new_job): Break that code out, and call chop_commands.
4507 * remake.c (remake_file): Call chop_commands before looking at
4508 FILE->cmds->any_recurse.
4510 * make.texinfo (Running: Goals): Don't say that the default target
4511 won't be taken from an included makefile.
4513 * remake.c (update_file_1): #if 0 out setting MUST_MAKE if a dep
4516 Fri Nov 3 15:53:03 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
4520 * variable.c (try_variable_definition): Don't calculate useless value.
4522 * main.c (define_makeflags): Fixed -j propagation.
4524 * commands.c (execute_file_commands): Removed unused variable.
4526 Sun Oct 29 11:11:15 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4528 * commands.c (execute_file_commands): If the commands are empty, call
4529 notice_finished_file before returning.
4531 Sat Oct 28 23:06:32 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4533 * remake.c (update_file_1): Don't always update a target that has no
4534 deps. Only do this for double-colon targets.
4536 Wed Oct 25 16:36:16 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4538 * main.c (main) [hpux]: hpux == HPUX.
4539 * compatMakefile (defines): Document that HPUX should be defined.
4541 Tue Oct 24 19:19:48 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4545 * job.c (exec_command): Fixed what mode bits are checked.
4547 * remake.c (update_file_1): "No cmds and no deps actually changed"
4548 loses if ! FILE->is_target.
4550 * make.texinfo (Variables: Setting): Don't say that spaces after a
4551 variable definition are ignored (since they aren't).
4553 Mon Oct 23 14:34:23 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4557 * remake.c (update_file_1): If, after being updated, any dependency
4558 does not exist, remake the target.
4560 * remake.c (update_file_1): Always update if FILE has commands but no
4563 * commands.c (execute_file_commands): If we return early because there
4564 are no commands, set FILE->updated.
4566 Thu Oct 19 18:47:37 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4568 * arscan.c (ar_scan) [M_XENIX]: Don't run atoi or atol on the
4569 `struct ar_hdr' members that are int or long int on Xenix.
4571 Sat Oct 14 10:43:03 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4573 * arscan.c (ar_scan): Cosmetic clean ups.
4574 (ar_name_equal): New function to compare names, handling truncated
4575 member names and special `.o' truncation.
4576 (ar_member_pos): Use ar_name_equal.
4577 * ar.c (ar_member_date_1): Use ar_name_equal.
4581 * file.h (struct file): Made `update_status' a `short int', and moved
4582 it before `command_state' so the bitfields can be packed better.
4584 * remake.c (files_remade): Made global.
4585 (notice_finished_file): Don't increment files_remade.
4586 * job.c (new_job): Do.
4588 * job.c (start_job): Don't return a value. Always set
4589 CHILD->file->command_state to either cs_running or cs_finished.
4590 (new_job, child_handler): Don't expect start_job to return a value.
4591 Instead, look at the file's command_state.
4593 * commands.c (chop_commands): Merged into job.c (new_job).
4594 * commands.h: Don't declare chop_commands.
4596 * job.c (start_job): Made static.
4597 (new_job): New function to create a `struct child' and call start_job.
4598 (free_child): New function to free a `struct child'.
4599 (child_handler, new_job): Call it.
4600 * job.h: Don't declare start_job. Do declare new_job.
4601 * commands.c (execute_file_commands): Call new_job.
4603 * commands.c (execute_file_commands): Don't set FILE->update_status if
4606 * function.c (expand_function): Don't use `reading_filename' and
4607 `reading_lineno_ptr' if they're nil.
4609 Fri Oct 13 18:16:00 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4611 * read.c (find_semicolon): New function to look for an unquoted ; not
4612 preceded by an unquoted # in a string.
4613 (read_makefile): Call it before expanding the line. If it finds a ;,
4614 cut the line short there before expanding it. If not, call it again
4617 * commands.c (execute_file_commands): Don't check FILE->command_state.
4618 We won't get called unless it's cs_not_started.
4620 * read.c (read_makefile): Call collapse_line on the variable-expanded
4621 rule line after checking for ; and #.
4623 * job.c (start_job): When there are no more commands, always return 0.
4624 * commands.c (execute_file_commands): Don't put the new child in the
4625 `children' chain unless FILE->command_state is cs_running.
4627 * read.c (read_makefile): Rewrote ;-handling to only do it once (why
4628 did I do it twice??) and to check for a # before the ;.
4630 * job.c (start_job): Set CHILD->file->update_status to 0 when we run
4631 out of commands. Set it to 1 before returning failure.
4632 (child_handler): Don't set C->file->update_status to 0 when start_job
4633 returns success and commands are not running.
4635 * read.c (read_makefile): If there is a # before the ; for commands,
4636 forget the ; and commands.
4638 Thu Oct 12 15:48:16 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4640 * job.c (child_execute_job): Pass -c to the shell.
4642 Wed Oct 11 18:41:10 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4646 * main.c (define_makeflags): Cleaned up to keep better track of dashes
4649 * function.c (expand_function: `shell'): When converting newlines to
4650 spaces in output, search with `index' calls rather than a simple loop.
4652 * main.c (main): Make sure stdout is line-buffered.
4654 * main.c (decode_switches): Always check for missing switch arg.
4656 Mon Oct 9 17:17:23 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4660 Sat Oct 7 00:32:25 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4662 * commands.c (set_file_variables): #ifdef NO_ARCHIVES, still set $@ and
4665 * commands.c (set_file_variables): Include a trailing slash in the
4666 directory variables (@D, etc.).
4668 * job.c (child_handler): Call notice_finished_file after changing a
4669 child's state to `cs_finished'.
4670 * remake.c (update_file_1): Don't call notice_finished_file if
4671 FILE->command_state == cs_finished.
4673 Wed Oct 4 16:09:33 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4677 Tue Oct 3 21:09:51 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4679 * read.c (read_all_makefiles): When setting elements of MAKEFILES from
4680 the contents of read_makefiles, make sure we're using the right
4683 * dir.c, glob.c [USGr3 || DIRENT]: Don't define d_ino as d_fileno.
4687 * remake.c (update_file_1): Return zero after calling remake_file if
4688 FILE->command_state != cs_finished. Test update_status thoroughly.
4690 * commands.c (execute_file_commands): Don't call notice_finished_file.
4692 * remake.c (remake_file): Return immediately after calling
4693 execute_file_commands.
4695 Sat Sep 30 14:57:05 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4697 * Version 3.56.1 (alpha).
4699 * file.h (struct file): Made `update_status' not be a bitfield, since
4700 some broken compilers don't handle it right.
4702 * function.c (expand_function: `join'): Don't clobber the pointers and
4703 then try to free them.
4705 * job.c (exec_command): Fixed & vs = precedence problem.
4707 Thu Sep 28 17:29:56 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4709 * remake.c (update_file_1): Fixed typo in debugging output.
4711 * remake.c (library_file_mtime): Search for /usr/local/lib/libLIB.a
4712 after /usr/lib/libLIB.a.
4714 Tue Sep 26 16:07:58 1989 Roland McGrath (mcgrath at helen.Berkeley.EDU)
4716 * read.c (conditional_line): For `ifeq (a, b)', swallow space after the
4719 Sun Sep 24 13:25:32 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4721 * function.c (patsubst_function): If BY_WORD and the match is not a
4722 full word, update the text pointer correctly.
4724 * function.c (expand_function: `word'): Don't lose track of the second
4725 arg's expansion and free something else instead.
4727 Fri Sep 22 16:15:29 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4731 Thu Sep 21 14:28:42 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4733 * main.c (main): Make an array of the mtimes of the makefiles before
4734 updating them, and compare their file_mtimes against this later. Don't
4735 re-exec if a makefile was successfully updated but didn't change. If a
4736 makefile failed to be remade and no longer exists, die. If a makefile
4737 failed to be remade, but changed anyway, re-exec. If a makefile failed
4738 to be remade, but is unchanged, continue on.
4740 Wed Sep 20 18:02:07 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4744 * implicit.c (pattern_search): Maintain an array CHECK_LASTSLASH of the
4745 CHECK_LASTSLASH flag values used to match each member of TRYRULES.
4746 When making FILE->stem, if CHECKED_LASTSLASH[FOUNDRULE], prepend the
4747 part of FILENAME before LASTSLASH.
4749 Tue Sep 19 17:44:08 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4751 * dir.c (dir_file_exists_p): Check for FILENAME being nil before
4752 checking for it being "".
4754 * main.c (define_makeflags): Fixed test for whether a flag/flag_off
4755 option was non-default. Also changed to generate a string that Unix
4756 Make will grok (except for FP/int values and new flags).
4758 * job.c (child_execute_job): Don't use the shell's -c option.
4759 Also fixed an off-by-one bug in the ARGV -> shell arg list copying.
4761 Mon Sep 18 15:17:31 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4765 * read.c (parse_file_seq): Check the beginning of the file name for a
4766 `./', not the two chars after the end of the name (Q rather than P).
4768 * job.c (child_execute_job): Include all of ARGV in the arg list for
4771 * main.c (define_makeflags): Don't include floating and positive_int
4774 * job.c (exec_command): Set the effective gid to the real gid before
4777 * job.c (child_execute_job): Don't clobber the arg list when execing
4780 Sun Sep 17 15:27:19 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4782 * main.c (define_makeflags): Moved all the checking inside the switch.
4784 * load.c [LDAV_BASED] (load_average): When we can't get the load
4785 average, return zero instead of running off the end.
4787 * file.c: Include variables.h.
4788 * job.c: Declare dup2 and {block,unblock}_remote_children.
4789 * file.h: Declare f_mtime.
4790 * job.c: Don't declare construct_command_argv, since job.h does.
4791 * function.c, main.c, load.c, remake.c: Include job.h.
4792 * load.c [LDAV_BASED] (load_average): Declare nlist.
4793 * variable.h: Declare print_file_variables.
4794 * job.c [!USG]: Don't declare sigsetmask.
4795 [!USG]: Declare getdtablesize.
4796 Don't declare load_average. Do declare wait_to_start_job.
4797 Declare vfork, gete[gu]id, execve.
4798 * commands.c: Declare remote_kill, getpid.
4799 * make.h: Declare kill, exit, sigblock, pipe, close, ctime, open,
4801 * make.h [not USG]: Declare sigsetmask.
4802 * job.h: Declare wait_for_children and {block,unblock}_children.
4804 * dir.c (dir_file_exists_p): If FILENAME is nil, read in the whole
4806 (find_directory): When we want to read in the whole directory, call
4807 dir_file_exists_p with nil instead of "".
4809 * file.h (struct file), job.h (struct child),
4810 variable.h (struct variable): Use bitfields for flags.
4811 * make.h (ENUM_BITFIELD): If GCC or #ifdef ENUM_BITFIELDS, define as
4813 * compatMakefile (defines): Document ENUM_BITFIELDS.
4815 Sat Sep 16 12:38:58 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4817 * Version 3.55.4 (alpha).
4819 * GNUmakefile (dist): Depend on default and doc.
4821 * load.c [LDAV_BASED]: Include <nlist.h> rather than <a.out.h>; #ifdef
4822 NLIST_NAME_UNION, use n_un.n_name instead of n_name.
4823 * compatMakefile (LOAD_AVG): Document NLIST_NAME_UNION.
4825 * job.c [USG-ish]: Don't redefine WIF{SIGNALED,EXITED} if they're
4828 Fri Sep 15 13:59:42 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4830 * glob.c, dir.c [USGr3 or DIRENT]: If neither d_ino, nor d_fileno is
4831 defined, define d_ino as d_fileno.
4833 Thu Sep 14 18:29:38 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4835 * job.c: Don't declare exec_command static.
4837 * make.texinfo (Name Index): Changed title to include directives.
4839 * Version 3.55.3 (alpha).
4841 * make.texinfo (Running: Options): Document -e.
4843 * main.c (main): Always give imported environment variables origin
4845 * variable.c (define_variable_in_set): Under -e, if ORIGIN, or an
4846 existing variable's origin, is `o_env', make it `o_env_override'.
4848 * load.c: Use the symbol KERNEL_FILE_NAME instead of KERNEL_FILE.
4849 * compatMakefile: Changed the comment for `LOAD_AVG' accordinly.
4851 Thu Sep 7 16:46:26 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4853 * Version 3.55.2 (alpha).
4855 * variable.c (print_variable_set), rule.c (print_rule_data_base),
4856 file.c (print_file_data_base): If NO_FLOAT is defined, don't use
4857 floating-point for printing statistics.
4858 * compatMakefile (defines): Document NO_FLOAT.
4860 * make.h (HASH): New macro to add the hashing value of one char to a
4862 * file.c (lookup_file, enter_file, rename_file): Use it.
4863 * dir.c (find_directory, dir_file_exists_p, file_impossible_p): Ditto.
4864 * variable.c (define_variable_in_set, lookup_variable): Same here.
4866 * variable.c, file.c, dir.c: Don't define *_BUCKETS if they are already
4869 * compatMakefile (defines): Added comment about defining NO_ARCHIVES.
4870 (ARCHIVES, ARCHIVES_SRC): New variables for {ar,arscan}.[oc].
4871 (objs, srcs): Use $(ARCHIVES) and $(ARCHIVES_SRC).
4872 * commands.c (set_file_variables), dir.c (file_exists_p),
4873 remake.c (touch_file, name_mtime), implicit.c (try_implicit_rule,
4874 pattern_search), make.h: If NO_ARCHIVES is #defined, don't do any
4877 * commands.c (set_file_variables): Don't kill the last char of
4878 directory names in $([@*<%?^]D).
4880 Wed Sep 6 15:23:11 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4882 * default.c (default_terminal_rules {%:: %,v}, {%:: RCS/%,v}): Don't
4883 run co if the target exists.
4885 * glob.c (glob_match): [!xyz], rather than [^xyz], means none of [xyz].
4887 * glob.c: Misc minor cosmetic changes.
4889 Tue Sep 5 14:49:56 1989 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
4891 * load.c [LDAV_BASED] (load_average): Check for == -1, rather than < 0
4892 to see if lseek fails. On some systems, `avenrun' is at an offset >
4893 (2**31)-1, and lseek succeeds, returning a negative value.
4895 Mon Sep 4 11:07:58 1989 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
4897 * rule.c (new_pattern_rule): Return `int' instead of `void': nonzero if
4898 the passed rule was used, zero if not.
4899 (install_pattern_rule): Pay attention to the return from
4900 new_pattern_rule, and don't set the rule's `terminal' flag or give it
4901 commands unless it's used.
4902 (create_pattern_rule): Same idea.
4904 * dir.c (find_directory): Removed unused variable.
4906 * commands.c (execute_file_commands): Removed unused variable.
4908 * read.c (record_files): Don't use NAME after freeing it.
4910 Sat Sep 2 00:33:19 1989 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
4912 * Version 3.55.1 (alpha).
4914 * function.c (string_glob): Don't add spaces after file names that
4915 aren't added. (Also means don't add spaces without checking the size
4918 * remake.c (update_goal_chain): Don't remove makefiles with cmds and no
4919 deps from the chain.
4920 * main.c (main): Do it here, before calling update_goal_chain.
4922 * remake.c (update_goal_chain): When updating fails, change STATUS even
4923 if MAKEFILES is set. Also stop remaking when updating fails if not
4924 under -k and MAKEFILES is not set.
4926 * remake.c (remake_file, update_file_1, notice_finished_file),
4927 commands.c (execute_file_commands), make.h, commands.h: The functions
4928 remake_file, notice_finished_file, and execute_file_commands no longer
4929 return values, and their callers no longer expect values returned.
4931 * remake.c (notice_finished_file): Don't set FILE's modtime to now if
4932 it is a non-target with no commands.
4934 Fri Sep 1 00:04:39 1989 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
4936 * read.c (read_all_makefiles): After freeing each element on MAKEFILES,
4937 replace it with the name stored in read_makefiles by read_makefile.
4939 * remake.c (update_file_1): Don't decide not to remake if FILE has no
4940 cmds and no deps actually changed if FILE doesn't have any deps.
4942 * file.c (remove_intermediate): Remove precious files that also have
4943 the `dontcare' flag set.
4945 * remake.c (update_file_1): Don't always remake if FILE has cmds but no
4946 deps; only if FILE is double-colon. (I don't know why this should be
4947 done for double-colon targets, but that's what Unix make does.)
4949 * load.c [LDAV_BASED] (load_average): Write error messages if the
4950 various system calls fail. Keep track of if we've failed before.
4951 The first time we fail, write a message saying -l won't be enforced.
4952 The first time we succeed after having failed, write a message saying
4953 -l will be enforced again.
4955 * remake.c [USG]: Don't #include <sys/file.h>
4957 * load.c [generic Unix LDAV_BASED]: #include <fcntl.h> #ifdef USG,
4958 else <sys/file.h> instead.
4960 * job.c [USG && !USGr3 && !HAVE_DUP2]: Remove redundant
4961 #include <errno.h> and declaration of `errno'.
4962 [...] (dup2): Fixed so it won't always lose.
4964 * default.c (default_suffix_rules: .texinfo.dvi): Copy, rather than
4965 move, the aux and index files, so the TeX run can use them.
4967 * compatMakefile: Remove redundant comment.
4969 * load.c [generic Unix LDAV_BASED]: Include <a.out.h> instead of
4970 <nlist.h>, since the `struct nlist' declaration in <nlist.h> varies
4971 more than the one in <a.out.h>.
4972 (load_average): Use the `n_un.n_name' field of the `struct nlist',
4973 since the <a.out.h> declaration uses the union.
4975 * main.c (main): For the temporary files made for stdin makefiles, set
4976 the `intermediate' and `dontcare' flags.
4977 * file.c (remove_intermediates): Don't print any messages for files
4978 whose `dontcare' flag is set. (The only files that will be
4979 intermediate and `dontcare' will be the temporary files made for stdin
4982 * job.c (exec_command): Made global.
4983 * job.h: Declare it.
4984 * main.c (main): Use exec_command when re-execing.
4986 * make.h: Declare environ.
4989 * job.c (child_execute_job): New function to perform everything done in
4990 the child side of a fork (for a job or `shell' function).
4991 (start_job): Call it.
4992 * job.h: Declare construct_command_argv and child_execute_job.
4993 * function.c (expand_function: `shell'): Use child_execute_job.
4995 Thu Aug 31 18:42:51 1989 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
4997 * function.c (expand_function: `shell'): Remove a trailing newline
4998 instead of turning it into a space.
5000 * main.c (main): Do init_siglist #ifdef HAVE_SIGLIST.
5002 * job.c [WTERMSIG || (USG && !HAVE_SYS_WAIT)]: Test each W* macro
5003 separately and define all those that aren't defined.
5005 Sat Aug 26 15:13:21 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5007 * ar.c (ar_name): Return zero for `(foo)'.
5011 * make.texinfo (Rules: Multiple Targets): Make this node's `next'
5012 pointer point to `Static Pattern'.
5013 * make.texinfo (Makefiles: MAKEFILES Variable): Make this node's `prev'
5014 pointer point to `Makefile Names'.
5016 * make.1: Renamed to make.man.
5017 * compatMakefile: Define `mandir' and `manext'.
5018 (install): Depend on $(mandir)/make.$(manext).
5019 ($(mandir)/make.$(manext)): Depend on make.man and copy it to $@.
5020 ($(bindir)/make): Use `make' rather than $<; so Unix make can grok it.
5022 Thu Aug 24 03:35:48 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5024 * variable.c (target_environment): Allow variables that start with
5027 Wed Aug 23 22:50:32 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5029 * variable.c (target_environment): Reject variables that don't start
5032 Tue Aug 22 04:14:29 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5034 * GNUmakefile (make-$(version).tar.Z): Put make.1 (the Unix manual
5035 page) in the tar file.
5037 * variable.c (target_environment): Don't write variables with origin
5038 o_default (i.e., ones from default.c).
5039 * make.texinfo (Commands: Recursion: Variables/Recursion): Document
5040 that default variables are not put in the environment.
5042 * remake.c (update_file_1): Remake all targets with commands but no
5045 Sat Aug 19 06:03:16 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5047 * remake.c (update_file_1): In the final loop, set the deps'
5048 `changed' members if they are newer than FILE.
5050 * remake.c (update_goal_chain): Under -d, print a message if we decide
5051 not to remake a makefile so as to avoid a possible infinite loop.
5053 Fri Aug 18 20:30:14 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5055 * remake.c (remake_file): Cleaned up.
5057 * commands.c (execute_file_commands): If the commands are empty, set
5058 FILE->update_status to zero before returning.
5060 * remake.c (notice_finished_file): Set `last_mtime' fields to zero
5061 instead of calling name_mtime; file_mtime will do that later if anybody
5064 Thu Aug 17 10:01:11 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5066 * make.texinfo (Rules: Wildcards: Wildcard Examples): Give this node a
5069 * Version 3.54.9 (alpha).
5071 * make.texinfo: Fixed some @nodes.
5073 * remake.c (check_dep): Don't set *MUST_MAKE_PTR if FILE doesn't exist
5074 after running update_file.
5076 * remake.c (notice_finished_file): If FILE has no commands, pretend its
5079 * remake.c (update_file_1): In the loops that call update_file on the
5080 deps, compare modtimes before and after (unless deps are still being
5081 made) and set the deps' `changed' members. Do not set the `changed'
5082 members in the loop that prints the newer/older debugging messages.
5083 * remake.c (update_file_1): If no deps changed and FILE has no
5084 commands, decide it doesn't need remaking.
5086 * remake.c (update_file_1): Print a debugging message if we take
5087 commands from default_file.
5089 * make.texinfo (Rules: Directory Search: Selective Search): Removed
5090 note about warning for `vpath' with a constant pathname, since it isn't
5091 warned about anymore.
5093 * remake.c (update_goal_chain): If MAKEFILES, remove makefiles which
5094 are targets and have no deps.
5095 * make.texinfo (Makefiles: Remaking Makefiles): Document that makefiles
5096 will not be remade if they are targets but have no dependencies.
5098 Tue Aug 15 00:00:08 1989 Roland McGrath (roland at apple-gunkies.ai.mit.edu)
5100 * remake.c (notice_finished_file): Increment files_remade for non-phony
5101 files if they didn't exist before (even if they still don't).
5103 * job.c: Include <errno.h> and declare errno.
5105 * job.c (exec_command): If the execve fails with ENOEXEC (Exec format
5106 error), return instead of exiting the child process.
5108 * job.c (start_job): In the child side, if exec_command fails, try
5111 * job.c (start_job): In the child side, call unblock_children instead
5114 * remake.c (notice_finished_file): Under -n or -q, always increment
5115 files_remade for non-phony files.
5117 * rule.c (intall_pattern_rule): Use find_percent.
5119 * vpath.c (vpath_search): Pass the `percent' members to
5122 Mon Aug 14 23:30:24 1989 Roland McGrath (roland at apple-gunkies.ai.mit.edu)
5124 * vpath.c (struct vpath): New member `percent', to hold a pointer into
5125 the pattern where the % is.
5126 (construct_vpath_list): Call find_percent on the pattern and set the
5127 new `percent' member.
5128 * read.c (read_makefile): Don't run find_percent on `vpath' directive
5131 * function.c (pattern_matches): Take new arg PERCENT, a pointer into
5132 PATTERN where the % is. If PERCENT is nil, copy PATTERN into local
5133 space and run find_percent on it.
5134 (expand_function: `filter', `filter-out'): Pass new arg to
5136 * read.c (record_files): Pass PATTERN_PERCENT to pattern_matches for
5137 static pattern rules. Save the percent pointer into implicit rule
5138 targets, and pass them to create_pattern_rule.
5139 * rule.c (convert_to_pattern): Pass new arg to create_pattern_rule.
5140 (create_pattern_rule): Take new arg TARGET_PERCENTS, nil or an array of
5141 pointers into the corresponding elements of TARGETS, where the %s are.
5143 Sun Aug 13 00:29:19 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5147 * README.templatate, README-doc.template: New files, turned into README
5148 and README-doc to go into the two distribution tar files.
5149 * GNUmakefile: Added a rule to edit the version number in
5150 README.template and README-doc.template, producing README and
5153 * remake.c (update_goal_chain): If -n or -q is in effect for a
5154 makefile, and it got updated, don't change STATUS, so we can still
5155 return -1 (meaning nothing was done). This avoids an infinite loop on
5158 Sat Aug 12 23:14:24 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5160 * remake.c (notice_finished_file): Treat -q the same as -n.
5162 * remake.c (update_goal_chain): Fixed handling of return from
5163 update_file. If -n or -q is in effect, ignore it.
5165 * job.c (start_job): Don't test for -t. We should never get called in
5168 Fri Aug 11 04:09:14 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5170 * function.c (expand_function): Removed unused variables.
5171 (handle_function): Removed unused variable.
5173 * main.c (main): Removed unused variable.
5175 Wed Aug 9 09:37:10 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5179 * remake.c (notice_finished_file): If FILE's modtime actually changed,
5180 increment files_remade.
5181 (remake_file): Don't increment files_remade.
5183 * remake.c (update_file): Don't print "up to date" messages for
5186 * job.c (child_handler): Don't set C->file->update_status to 1 if
5187 start_job returns nonzero under -n or -t.
5189 * expand.c (variable_expand): Count parens in $(foo:a=b) refs.
5191 * main.c: Removed old declaration of `glob_tilde' (which hasn't existed
5194 Tue Aug 8 23:53:43 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5196 * job.c (exec_command): Fixed to not ignore the last path component and
5197 to do the right thing with an empty path.
5199 Fri Aug 4 15:58:19 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5201 * remake.c (library_file_mtime): Look for libLIB.a, not /libLIB.a.
5202 Do VPATH search on libLIB.a, not /usr/lib/libLIB.a
5204 Thu Aug 3 20:42:00 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5206 * job.c [HAVE_SYS_WAIT or not USG]: If WIFSIGNALED is not defined by
5207 <sys/wait.h>, define it as (WTERMSIG != 0).
5209 Tue Aug 1 19:25:34 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5211 * remake.c (remake_file): If FILE has no commands and is a target,
5212 don't set its time to now. The time gets reset by notice_finished_file
5213 anyway, and it isn't needed since check_dep checks for nonexistence.
5217 * read.c (read_makefile): Don't read off the end of the string after an
5220 * job.c (exec_command): New function to search the path for a file and
5222 (start_job): Use exec_command rather than execvp.
5224 * read.c (read_makefile): Expand `include' directive args before
5225 parsing them. Allow trailing whitespace after filename.
5227 * variable.c (target_environment): Put makelevel + 1, rather than
5228 makelevel, in the `MAKELEVEL' envariable.
5230 Sat Jul 29 10:27:04 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5232 * remake.c (notice_finished_file): Don't get the new modtime of phony
5235 * remake.c (remake_file): Run commands instead of touching under -t if
5236 FILE->cmds->any_recurse is set.
5238 * commands.h (struct commands): Add new member `any_recurse', to be set
5239 nonzero if any `lines_recurse' element is nonzero.
5240 * commands.c (chop_commands): Set the `any_recurse' member.
5242 * commands.c (execute_file_commands): Split chopping of commands into
5243 lines into new function chop_commands.
5244 * commands.h: Declare chop_commands.
5246 * read.c (read_makefile): Test for a line beginning with a tab after
5247 checking for conditional lines, but before all other checks.
5249 Fri Jul 28 18:10:29 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5251 * read.c (read_makefile): Match directives against collapsed line
5252 and use that for their args.
5254 * read.c (read_makefile): Warn about extra text after `include'.
5256 Tue Jul 25 14:34:25 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5258 * make.texinfo (Rules: Directory Search: Selective Search): Fixed
5259 example to use correct `vpath' syntax.
5261 Mon Jul 24 12:10:58 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5265 * job.c (start_job): In the child side, unblock SIGCHLD.
5267 Fri Jul 21 18:25:59 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5269 * make.h: Don't include <sys/types.h> #ifdef sun.
5271 Mon Jul 17 14:29:10 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5273 * implicit.c (pattern_search): If ar_name (FILENAME), don't check for
5276 * job.c (wait_for_children): Changed "waiting for children" message to
5277 "waiting for unfinished jobs".
5279 Fri Jul 14 13:17:13 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5281 * load.c (load_average): Use an unsigned offset into kmem.
5283 Thu Jul 13 18:44:49 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5285 * variable.c (pop_variable_scope): Don't free the head of the chain of
5286 variables in each bucket twice.
5288 Tue Jul 11 06:45:24 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5290 * GNUmakefile: Include COPYING in the doc tar file.
5292 * variable.c, read.c, misc.c, job.c, function.c: Replace some identical
5293 "for" loops with next_token or end_of_token calls.
5295 Mon Jul 10 16:55:08 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5299 * compatMakefile: Documented new conditionals.
5301 * job.c: Don't define sys_siglist if HAVE_SIGLIST is defined.
5302 Don't define dup2 if HAVE_DUP2 is defined.
5304 * job.c (child_handler): Interpret the return from start_job correctly.
5306 * remake.c (update_file_1): Don't write "target not remade because of
5307 errors" message under -n or -q.
5309 * read.c: Declare getpwnam.
5311 * glob.c: Use <dirent.h> if DIRENT is defined.
5312 [USG]: Don't declare memcpy, since <memory.h> does.
5314 Fri Jul 7 20:53:13 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5316 * misc.c (collapse_line): Copy the line over in the right place.
5318 Fri Jul 7 18:33:24 1989 Roland McGrath (fsf at void.ai.mit.edu)
5320 * remake.c: Conditionalize inclusion of <sys/file.h> on not
5321 USG, since HP-UX defines a `struct file' there.
5323 Fri Jul 7 12:11:30 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5325 * job.c: If WTERMSIG is defined by <sys/wait.h>, define WAIT_T as int,
5326 and don't define other macros; this covers HP-UX.
5327 If WTERMSIG is not defined, use int or union wait based on USG and
5328 HAVE_SYS_WAIT; this covers BSD and SysV.
5330 * Version 3.54.3 (alpha).
5332 * job.c [USG and not USGr3]: Include <errno.h> and declare errno.
5334 * job.c (unblock_children [USG]): Declare child_handler.
5336 * job.c: Renamed WRETCODE to WEXITSTATUS.
5337 [HAVE_SYS_WAIT or not USG]: Undefine WTERMSIG, WCOREDUMP, and
5338 WEXITSTATUS before defining them. The HP-UX <sys/wait.h> defines them.
5340 * main.c (main): If there are no goals, fatal AFTER printing the data
5343 Thu Jul 6 22:43:33 1989 Roland McGrath (roland at apple-gunkies.ai.mit.edu)
5345 * glob.c [USG]: #define rindex as strrchr.
5347 * job.c [USG]: Include <sys/param.h> and #define getdtablesize() as
5350 Wed Jul 5 09:36:00 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5352 * Version 3.54.2 (alpha).
5354 * expand.c (variable_expand): When expanding recursive variable
5355 references (${${a}}), use the correct delimiters in the constructed
5358 Mon Jul 3 18:29:26 1989 Roland McGrath (roland at apple-gunkies.ai.mit.edu)
5360 * compatMakefile: Clear out and redefine the .SUFFIXES list because
5361 silly Sun 4 make defines .cps.h.
5363 * compatMakefile: Fix comment about -DNO_MINUS_C_MINUS_O.
5365 * remake.c: Include <sys/file.h> for O_* on 4.2.
5367 * commands.c: Define sigmask if it's not defined.
5369 Fri Jun 30 07:33:08 1989 Roland McGrath (roland at apple-gunkies.ai.mit.edu)
5371 * remake.c (remake_file): Don't always increment files_remade.
5373 * variable.c (push_new_variable_scope): Zero the new variable hash
5376 Thu Jun 29 17:14:32 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5378 * expand.c (variable_expand): When terminating the variable expansion
5379 buffer, use variable_buffer_output instead of a simply zero store,
5380 because the buffer may need to be enlarged.
5382 Wed Jun 28 16:53:47 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5386 * default.c (default_suffixes): Added `.ln'.
5387 (default_suffix_rules): Changed lint rules to use -C.
5389 Thu Jun 22 20:49:35 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5391 * job.c (start_job): Set `environ' to CHILD->environment before execing
5392 in the child process!
5394 Tue Jun 20 17:23:13 1989 Roland McGrath (roland at spiff.ai.mit.edu)
5396 * compatMakefile: Put job.h and rule.h in `srcs'.
5400 Mon Jun 19 16:25:18 1989 Roland McGrath (roland at spiff.ai.mit.edu)
5402 * job.c (start_job): If there are no more commands, return nonzero
5405 * compatMakefile (make): Pass `-f' to mv.
5407 * GNUmakefile: If `ARCH' or `machine' is defined, make $(ARCH)/*.o and
5408 $(ARCH)/make instead of *.o and make.
5410 * function.c (string_glob): Don't try to use freed storage!
5412 * read.c (readline): If there is only one byte of space in the buffer,
5413 enlarge the buffer before reading more.
5415 * arscan.c [M_XENIX]: Miscellaneous minor changes for Xenix.
5417 Sun Jun 18 13:07:45 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5419 * GNUmakefile (depend): Split commands into two lines so they won't be
5420 so long when variable-expanded.
5422 * compatMakefile: Documented MINUS_C_MINUS_O meaning. The line
5423 describing it got removed when the USG/wait stuff was documented.
5425 Sat Jun 17 22:56:54 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5429 Mon Jun 12 17:45:11 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5431 * remake.c (check_dep): Drop circular dependencies instead of fataling.
5432 (update_file_1 already does this.)
5434 * default.c (default_suffix_rules): For .s -> .o, put the -o flag to
5435 the assembler before the source file name.
5437 Sun Jun 11 12:00:52 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
5441 * make.texinfo (Features): Noted 1003.2 requirement of `+' meaning.
5443 * file.c (remove_intermediates): If !SIG, write a single "rm" command
5444 line, listing all files.
5446 * read.c (read_makefile): Don't free the storage for the passed
5447 filename, since it might not be malloc'd. When doing an included
5448 makefile, free the name's storage.
5449 (read_all_makefiles): Use variable_expand to find the value of
5450 `MAKEFILES'. Free the storage for the names of -f makefiles.
5451 (read_makefile): Allocate storage for the makefile name in the
5452 `struct file' in read_makefiles.
5454 * make.texinfo (Running: Instead of Execution): Document the effect of
5455 + and $(MAKE)/${MAKE}.
5457 * make.texinfo (Functions: Foreach Function): Document that if the
5458 iteration variable was undefined before the `foreach' call, it will be
5459 undefined after the call.
5461 * commands.c: Split into commands.c, job.h, and job.c.
5463 * rule.c (try_implicit_rule, pattern_search): Moved to new file
5466 * rule.c: Split into rule.h, rule.c, and default.c.
5467 * default.c (install_default_pattern_rules): Renamed to
5468 install_default_implicit_rules.
5469 * make.h, main.c (main): Renamed uses.
5471 * make.c: Renamed to misc.c.
5473 * make.c (main, log_working_directory, decode_switches,
5474 decode_env_switches, define_makeflags, die, print_version,
5475 print_data_base): Moved to new file main.c.
5477 * commands.c (execute_file_commands): Don't collapse backslash-newlines
5478 here. When chopping the commands up into lines, don't chop at
5480 (start_job): Collapse backslash-newlines after printing the line.
5482 * commands.c (start_job): Don't collapse backslash-newlines here.
5483 (execute_file_commands): Collapse backslash-newlines before chopping
5484 the commands up into lines.
5486 * commands.c (set_file_variables): Initialize the length counters for
5489 * commands.c (start_job): Use vfork instead of fork. Someone else says
5490 the child and parent DO have separate file descriptors.
5492 * variable.c: Split internals into variable.c, function expansion into
5493 function.c, and variable expansion into expand.c.
5494 * function.c (handle_function): New function to check for a function
5495 invocation and expand it.
5496 * expand.c (variable_expand): Use handle_function.
5497 * variable.c (push_new_variable_scope): New function to push a new
5498 empty variable set onto the current setlist.
5499 (pop_variable_scope): New function to pop the topmost set from the
5500 current setlist and free its storage.
5501 * function.c (expand_function: `foreach'): Push a new variable scope
5502 for the iteration variable and pop the scope when finished.
5503 * variable.h: Declare new functions.
5504 * variable.c (initialize_variable_output): New function to return a
5505 pointer to the beginning of the output buffer.
5506 (save_variable_output): New function to save the variable output state.
5507 (restore_variable_output): New function to restore it.
5508 * expand.c (variable_expand): Use initialize_variable_output.
5509 (allocated_variable_expand): Use {save,restore}_variable_output.
5510 * variable.c (current_setlist): Renamed to current_variable_set_list
5513 Sat Jun 10 00:11:25 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5515 * remake.c (library_file_mtime): Check for libNAME.a in the current
5516 directory before doing VPATH search.
5518 * variable.c (print_variable_set): Don't write "# Variables", and write
5520 (print_variable_data_base): Precede the variables with "# Variables".
5522 * make.c (main): Print the data base under -p after doing everything
5523 else, just before exitting. This way it gets info determined in
5524 updating the goal targets.
5526 * variable.c (print_variable_data_base): Split into print_variable,
5527 which prints one variable, and print_variable_set, which prints a set.
5528 Replaced with a call to print_variable_set for the global set.
5529 (print_file_variables): New function to print a given file's local
5532 * file.c (print_file_data_base): Call print_file_variables to print
5533 each file's local variables.
5535 * commands.c (set_file_variables): Actually define the values for
5536 the $^ and $? variables!!!
5538 * make.texinfo (Implicit: Pattern Rules: Automatic): Document new D and
5539 F versions of $^ and $?.
5541 * commands.c (start_job): In the child fork, use getdtablesize and a
5542 loop to close all file descriptors other than 0, 1, and 2. We need to
5543 do this since not only the bad stdin pipe, but also some directories,
5546 * commands.c (start_job): Use fork instead of vfork, because a vfork
5547 parent and child share file descriptors, and our child needs to diddle
5550 * variable.c (initialize_file_variables): When created a new variable
5551 set, zero out the hash table.
5553 * variable.c (target_environment): Don't use variables whose names are
5554 not made up of alphanumerics and underscores.
5556 * remake.c (update_file_1): Set the `parent' member of each dependency
5557 to FILE before updating it.
5559 * file.h (struct file): Add `parent' member.
5561 * variable.c (initialize_file_variables): Don't take second arg PARENT.
5562 Use FILE->parent instead. If FILE->parent->variables is nil, recurse
5565 * variable.h: Declare {allocated_}variable_expand_for_file.
5567 * variable.c (allocated_variable_expand): Now
5568 allocated_variable_expand_for_file, calling variable_expand_for_file,
5569 and taking second arg FILE.
5570 (allocated_variable_expand): New function, a wrapper around
5571 allocated_variable_expand_for_file, passing a nil second arg.
5573 Fri Jun 9 12:11:45 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5575 * commands.c (start_job): On the child side of the fork, always close
5576 the bad stdin file descriptor.
5578 * commands.c (struct child): New member `environment', to hold the
5579 environment for the child.
5580 (execute_file_commands): Set the new childs `environment' member to nil
5581 before calling start_job.
5582 (start_job): Set up CHILD->environment before running the commands if
5585 * make.c (main): Don't call new_environ. `shell' functions will now be
5586 run with the environment make was called with.
5588 * commands.c (child_handler): Don't check C->command_ptr before calling
5589 start_job since we now have to check C->file->cmds->command_lines and
5590 it's easier to let start_job handle all that.
5592 * commands.c (struct child): New member `command_line', to hold an
5593 index into file->cmds->command_lines.
5594 (execute_file_commands): Set the new child's `command_line' to 0 and
5595 its `commands' and `commands_ptr' to nil.
5596 (start_job): When CHILD->command_ptr runs out, increment
5597 CHILD->command_line and run the corresponding line from
5598 CHILD->file->cmds->command_lines. Run it even under -t, -q, or -n if
5599 the CHILD->file->cmds->lines_recurse element for that line is set.
5601 * commands.c (execute_file_commands): Chop CMDS up into lines, setting
5602 its `command_lines' and `lines_recurse' members, if it wasn't already
5605 * commands.h (struct commands): New members `command_lines' and
5606 `lines_recurse'. The first is an array of chopped-up lines; the second
5607 is an array of flags, each nonzero if the corresponding line is
5610 * variable.c (variable_expand_for_file): If FILE is nil, just do a
5611 vanilla variable_expand.
5612 (expand_function: `shell'): Pass second arg (as nil) to
5613 construct_command_argv.
5615 * commands.c (construct_command_argv): Use variable_expand_for_file on
5616 `$(SHELL)' and `$(IFS)' instead of lookup_variable to check those
5617 variables. This handles file-local and recursive values correctly.
5618 To support this, take an additional argument FILE.
5620 * variable.c (initialize_file_variables): New function to initialize
5621 FILE's variable set list from PARENT's setlist. PARENT is the
5622 immediate dependent that caused FILE to be remade, or nil if FILE is a
5623 goal. (When user-level per-file variables are implemented, PARENT
5624 should be passed as nil when defining per-file variables.)
5626 * variable.c (variable_expand_for_file): New function to expand a line
5627 using the variable set of a given file, and reporting error messages
5628 for the file and line number of that file's commands.
5630 * variable.h: Don't declare lookup_variable_for_file.
5632 * variable.c (lookup_variable_*): Turned back into lookup_variable. It
5633 now uses current_setlist.
5634 (global_setlist): New static `struct variable_set_list', a setlist
5635 containing global_variable_set.
5636 (current_setlist): New static `struct variable_set_list *', a pointer
5637 to the current variable set list.
5638 (define_variable): Define in the current top-level set, not the global
5641 * commands.c (set_file_variables): New function to set up the automatic
5642 variables for a file in its own variable set.
5643 (execute_file_commands): Use set_file_variables.
5645 * variable.c (new_environ): Replaced with target_environment, taking an
5646 argument FILE, and returning an environment for FILE's commands.
5648 * variable.c, variable.h: Remove all global special variable pointers.
5650 * variable.c (define_variable_for_file): New function like
5651 define_variable, but takes additional arg FILE, and defines the
5652 variable in the variable set at the top of FILE's chain.
5653 (lookup_variable_for_file): New function like lookup_variable, but
5654 takes additional arg FILE, and looks the variable up in all of FILE's
5657 * file.h (struct file): New member `variables', a `struct
5658 variable_set_list' containing the list of variable sets used in the
5659 expansion of the file's commands.
5661 * variable.c (variables): Replaced with static `struct variable_set'
5662 global_variable_set.
5663 (define_variable): Now define_variable_in_set, taking additional
5664 argument SET, the `struct variable_set' to define it in.
5665 (define_variable): Use define_variable_in_set with global_variable_set.
5666 (lookup_variable): Now lookup_variable_in_set, taking additional
5667 argument SET, the `struct variable_set' to look it up in.
5668 (lookup_variable): Use lookup_variable_in_set with global_variable_set.
5669 (lookup_variable_in_setlist): New function to look up a variable in a
5670 `struct variable_set_list' using lookup_variable_in_set.
5672 * variable.h (struct variable_set): New structure, containing a hash
5673 table and the number of hash buckets.
5674 (struct variable_set_list): New structure, containing a link for a
5675 linked-list, and a `struct variable_set'.
5677 * commands.c (start_job): Under -n, return what the recursive start_job
5678 call returns, since it might actually start a child.
5680 * make.texinfo (Rules: Wildcards): Document ~ and ~USER expansion.
5682 * commands.c (execute_file_commands): If start_job returns
5683 failure, but -t is set, set FILE->update_status to success.
5684 (start_job): If -t is set, and the commands are not recursive, return
5685 failure (is is done for -q).
5687 * remake.c (touch_file): New function to touch FILE.
5688 (remake_file): Use touch_file. When touching a file, still do
5689 execute_file_commands.
5691 * remake.c (remake_file): Don't check question_flag (-q), since we
5692 can't know here if the commands are recursive.
5694 * commands.c (start_job): Don't use the `recursive' member of
5695 CHILD->file->cmds. Instead, check for leading +s and $(MAKE) or
5696 ${MAKE} in the command line here.
5698 * commands.h (struct commands): Remove `recursive' member.
5700 * rule.c (install_default_pattern_rules): Remove use of `recursive'
5703 * read.c (record_files): Don't check commands from $(MAKE) and set
5704 their `recursive' member.
5706 * commands.c (fatal_error_signal): Treat SIGQUIT like SIGINT, SIGHUP,
5707 and SIGTERM, but don't send it to ourselves because it will cause a
5710 Thu Jun 8 20:30:04 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5714 * variable.c (variable_expand): Use allocated_variable_expand instead
5715 of expand_argument in a few places.
5717 * variable.c (allocated_variable_expand): Do static variable shuffling
5718 here instead of using expand_argument.
5719 (expand_argument): Use allocated_variable_expand.
5721 * variable.c (recursively_expand): New function to recursively expand
5722 its argument (a `struct variable'), returning the malloc'd value.
5723 (variable_expand): Use recursively_expand.
5725 Sun May 28 12:49:27 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
5727 * make.c (main): Fixed buggy fix in deciding to increase space for
5728 command-line variable definitions. (First it never did it, then it
5729 always did it; now it does it when necessary.)
5731 Sat May 27 14:01:54 1989 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
5733 * make.c (main): Fixed bug in deciding to increase space for
5734 command-line variable definitions.
5736 Fri May 26 15:48:01 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5738 * read.c (multi_glob): Use allocated_expand_variable for checking
5739 `HOME' variable for ~ expansion, since this may be called from inside a
5740 `wildcard' function expansion.
5742 * variable.h: Declare allocated_expand_variable.
5744 * variable.c (allocated_expand_variable): New function to do variable
5745 expansion in an allocated buffer, rather than the static one.
5747 * make.c (main): Don't set glob_tilde (it no longer exists).
5749 * variable.c (string_glob): Use multi_glob and parse_file_seq.
5751 * read.c (multi_glob): Do ~ expansion here.
5753 * glob.c (glob_tilde, glob_filename): Removed ~ expansion.
5755 * variable.c (define_variable, lookup_variable): Use a smarter hashing
5756 algorithm (the same one used for files and directories).
5757 (VARIABLE_BUCKETS): Increased to 523.
5759 * file.c (enter_file, lookup_file, rename_file): Use a smarter hashing
5760 algorithm, spreading the bits about somewhat.
5762 * make.c (log_working_directory): Under `-p', precede the directory
5765 * make.c (print_version): Under `-p', precede each line with a `#'.
5766 (print_data_base): Precede the header line with a `#' and include the
5767 date and time on it.
5769 * vpath.c (print_vpath_data_base): Precede non-directive
5772 * commands.c (print_commands): Precede the non-command line with a `#'.
5774 * rule.c (print_rule_data_base), file.c (print_file_data_base): Precede
5775 non-rule lines with `#'s.
5777 * dir.c (print_dir_data_base): Precede all lines with `#'s.
5779 * variable.c (print_variable_data_base): Changed format so that it can
5780 be makefile input. Lines that are not variable definitions are
5781 preceded with `#'. Nonrecursive variable definitions are made with all
5782 dollar signs doubled to reproduce the initial value. Recursive
5783 variable definitions containing newlines are done with `define'
5784 directives. Nonrecursive variable definitions containing newlines, and
5785 variable names containing :, =, or newlines, will come out garbled.
5787 Wed May 24 00:20:04 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5791 Tue May 23 19:18:00 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5793 * variable.c (expand_function: `filter'/`filter-out'): Use
5794 find_percent instead of pattern_p.
5796 * variable.c (expand_function: `patsubst'): Pass new args (both nil)
5798 (variable_expand): For $(var:pat%=rep%) references, pass new args to
5799 patsubst_expand so as to avoid find_percent and thus disallow
5802 * read.c (record_files): Pass new args to patsubst_expand.
5804 * variable.c (patsubst_expand): Take two new args: PATTERN_PERCENT
5805 and REPLACE_PERCENT. Each of these, if non-nil, means that PATTERN
5806 (or REPLACE) has already been run through find_percent, and
5807 PATTERN_PERCENT (or REPLACE_PERCENT) is the result.
5809 * make.h: Declare find_percent instead of pattern_p.
5811 * read.c (pattern_p): Changed to find_percent, returning a pointer
5812 to the %, or nil if there is none.
5813 (record_files): Take another arg, PATTERN_PERCENT, a pointer to the
5815 (read_makefile): Pass PATTERN_PERCENT to record_files.
5817 * make.texinfo (Rules: Static Pattern: Static Usage,
5818 Rules: Directory Search: Selective Search,
5819 Functions: Text Functions): Documented that `%' can be quoted.
5821 * variable.c (expand_function: `filter'/`filter-out'): Use pattern_p
5822 to allow quoted %s in patterns.
5824 * variable.c (patsubst_expand): Use pattern_p on PATTERN and REPLACE
5825 to allow quoted %s. Quoting backslashes are removed from REPLACE
5826 even if PATTERN contains no unquoted %.
5828 * read.c (pattern_p): Made global.
5829 * make.h: Declare pattern_p.
5831 * read.c (pattern_p): New function to search for an unquoted % in a
5832 string. Backslashes quote %s and backslashes. Quoting backslashes
5833 are removed from the string by compacting it into itself. Returns
5834 nonzero if an unquoted % was found, zero if not.
5835 (record_files): Use pattern_p to check for implicit rules.
5836 (read_makefile): Use pattern_p to check for static pattern rules.
5837 Also use it to allow quoted %s in `vpath' patterns; warn about
5838 `vpath' patterns with no %s.
5840 Mon May 22 16:31:52 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
5842 * glob.c (glob_filename): Replace a `1' with the `l' that should
5843 have been there. This incidentally stops it from dumping core.
5845 * glob.c (glob_filename): If the path is just a directory, with no
5846 file name pattern, return the directory alone.
5848 * glob.c (glob_tilde): New global variable (int), defaults to zero.
5849 (glob_filename): If glob_tilde is nonzero, expand ~ or ~USER.
5851 * variable.c (string_glob): Keep a static allocated buffer for file
5852 names taken from the list, instead of allocating and freeing one
5855 Fri May 19 18:06:26 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5857 * make.c (decode_switches): Get floating numbers from the right string.
5859 Sun May 14 13:48:04 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
5861 * commands.c (delete_child_targets): When deleting `also_make'
5862 files, include the target's name in the message:
5863 make: *** [foo] Deleting file `bar'
5865 Sat May 13 17:34:26 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
5867 * make.c (max_load_average, default_load_average): Default to -1.
5869 * load.c (wait_to_start_job): Return if max_load_average is < 0.0,
5872 Fri May 12 16:08:05 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
5874 * variable.c (variable_buffer_output): Don't try to do pointer
5875 arithmetic between objects not in the same array.
5877 Wed May 10 15:55:29 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5879 * rule.c [M_XENIX] (default_suffix_rules, default_variables): Minor
5880 changes to allow for strange compiler syntax.
5882 * rule.c (default_variables): Don't include "> $@" in
5883 $(PREPROCESS.S), since it's already in the .S.s rule.
5885 * file.c (enter_file): Make a new double-colon file the `prev'
5886 member of the bottom `prev' file (the one whose `prev' is nil).
5888 * read.c (do_define): Append newlines after copying the lines into
5889 the value buffer, so we end up with a trailing newline.
5891 * make.c (print_version): If the global variable
5892 `remote_description' is not nil or "", append "-%s" (its value) to
5894 * remote-*.c: Define remote_description appropriately.
5896 Sun May 7 15:15:53 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5898 * commands.c (error_status): Converted to new function child_error,
5899 taking new arguments TARGET_NAME and IGNORED, and writing an error
5900 message: "*** [target] Error 1" (or signal #, etc.), appending
5901 " (ignored)" if IGNORED is nonzero.
5902 (child_handler): Use child_error instead of error_status.
5904 * compatMakefile (all): Don't depend on `doc'.
5906 * compatMakefile (clean): Don't remove make-info*.
5907 (realclean): New rule, depends on `clean', removes tags, TAGS,
5908 and all Info and TeX files.
5910 Thu May 4 17:00:46 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5912 * variable.c (print_variable_data_base), file.c
5913 (print_file_data_base), rule.c (print_rule_data_base),
5914 Use floating-point for averages and percentages.
5916 * make.c (print_data_base): Print messages before and after the data
5919 * commands.c (print_commands): Changed output format to separate
5920 lines in commands and prefix them with tabs.
5922 * dir.c (print_dir_data_base): Changed output format slightly.
5924 * vpath.c (struct vpath, construct_vpath_list,
5925 selective_vpath_search): Remove the `exists' member and its uses.
5927 * vpath.c (print_vpath_data_base): New function to print all
5928 selective and general VPATH search paths (for -p).
5930 * make.c (print_data_base): Call print_vpath_data_base.
5932 * file.c (print_file_data_base): Changed format to look more like a
5933 makefile rule. Now reports all information in the `struct file'.
5935 * rule.c (print_rule_data_base): Changed format of display from:
5941 references nonexistent subdirectory.
5942 Also include number and percent that refer to nonexistent
5945 Thu Apr 27 15:45:40 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5947 * make.c (main): Figure out the level of recursion before writing
5948 the `Entering directory' message.
5949 * variable.c (define_automatic_variables): Don't figure out the
5950 level of recursion from `MAKELEVEL'. It's now done in main.
5954 Wed Apr 26 16:39:17 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5956 * commands.c (child_handler): Set `update_status' to zero when there
5957 are no more commands.
5959 * make.c (log_working_directory): If MAKELEVEL > 0, indicate the
5960 recurson in the message (make[1]: ...).
5962 * commands.c (child_handler): Change status to `cs_finished' when
5965 * commands.c (start_job): Return 0 (success) if there were no more
5966 commands for the child.
5967 (child_handler): Change the status to `cs_finished' when start_job
5968 fails to start the commands.
5970 * make.c (main): Don't handle SIGEMT if it's not defined.
5971 Do handle SIGDANGER if it is defined.
5973 * commands.c (child_handler): Reorganized inner loop so that it
5974 doesn't try to inspect the child before finding it.
5976 Tue Apr 25 16:28:24 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5978 * make.c (end_of_token): Fixed bug wherein backslashes caused
5983 * make.texinfo (Implicit: Pattern Rules: Automatic): Document
5984 setting of `$*' for explicit rules. Add note clarifying that
5985 automatic variables, though referred to in the documentation as
5986 `$<', etc. are no different than `$(<)', etc.
5988 Fri Apr 21 18:00:12 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5990 * file.c (enter_file): Don't strip leading `./'s.
5992 * read.c (parse_file_seq): Strip leading `./'s.
5994 Thu Apr 13 17:26:41 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5996 * make.texinfo (Commands: Parallel, Running: Options): Document that
5997 -l with no argument removes a previous load limit.
5999 * make.c (struct command_switch): New member `default_value'.
6000 (default_job_slots): Default value (of 1) for -j.
6001 (default_load_average): Default value (of 0, unlimited) for -l.
6002 (command_switches): Use default values for -j and -l.
6003 Also, -l without an arg now means no load limit.
6004 (define_makeflags): Don't write positive_int or floating options
6005 whose values are their defaults.
6007 * make.c (main): Under -w, write a `Leaving directory' message
6010 Tue Apr 11 16:46:29 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6014 * Makefile: Provide an easy place for system-specific definitions
6015 (-DUSG, etc.) and extra object files (for whatever).
6017 * make.texinfo: Miscellaneous fixes from RMS.
6019 Mon Apr 10 19:31:34 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6021 * rule.c (pattern_search): Put rules with `subdir' flags set in
6022 TRYRULES, since these might be valid with VPATHs. In the TRYRULES
6023 loop, don't do lookup_file or file_exists_p calls for dependencies
6024 of rules with `subdir' flags set, but still do vpath_search calls
6025 and intermediate-file searches.
6027 Thu Apr 6 16:33:00 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6029 * make.texinfo (Implicit: Pattern Rules: Automatic): Document the
6030 new definition of $* for explicit rules.
6032 * commands.c (execute_file_commands): If FILE->stem is nil, figure
6033 out if FILE->name ends in a suffix in the .SUFFIXES list; if so,
6034 store the name sans suffix in FILE->stem (and $*).
6036 Wed Apr 5 15:24:48 1989 Roland McGrath (mcgrath at helen.Berkeley.EDU)
6038 * file.c (remove_intermediates): Don't use `file_exists_p' to check
6039 for the existence of intermediate files, because the hashed
6040 directories will probably be out of date.
6042 * commands.c (child_handler): Free the good stdin before running the
6045 * commands.c [USG] (init_siglist): Don't case SIGEMT if it's not
6046 defined. Do case SIGDANGER (for IBM RT) if it is defined.
6048 * commands.c: Changed `SYS_WAIT' to `HAVE_SYS_WAIT'.
6049 (child_handler): Use `wait3' if HAVE_SYS_WAIT is #defined.
6051 * file.c (enter_file): If any `./'s are stripped off, allocate a new
6052 copy of the shortened name.
6054 * rule.c (pattern_search): Allocate the right length strings for
6055 `also_make' members.
6057 Sat Apr 1 13:28:38 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6061 * GNUmakefile: Make a separate tarfile of the DVI and info files.
6063 * make.c (define_makeflags): If a switch that takes an argument has
6064 its default value, put the switch in MAKEFLAGS with no arguments.
6066 * make.c (command_switches): Pass `-l' in MAKEFLAGS.
6068 Wed Mar 29 17:50:05 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6070 * GNUmakefile: Don't include the DVI and info files in the dist.
6072 * commands.c (child_handler): Don't call
6073 check_changed_{directories,vpaths}.
6075 * make.h: Don't declare check_changed_{directories,vpaths}.
6077 * vpath.c (check_changed_vpaths): Removed this function.
6079 * dir.c (struct directory): Remove `modtime' member.
6080 (find_directory): Don't set `modtime' member.
6081 (check_changed_directories): Removed this function.
6083 * remake.c (update_file_1): Set FILE->command_state to cs_finished
6084 if it didn't need to be remade.
6086 * remake.c (update_file): Only write the "up to date" message if the
6087 target went from `not_started' state to `finished' state without
6088 incrementing the count of files remade.
6090 * commands.c [USG] (init_siglist): If both SIGCHLD and SIGCLD are
6091 defined, don't put them both in the `switch'.
6093 Tue Mar 28 15:37:02 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6095 * file.c (rename_file): Change FILE's name!!!
6097 * rule.c (create_pattern_rule): Set the `terminal' member of the new
6098 rule after calling new_pattern_rule, which zeros it.
6100 * rule.c (default_variables): Use $(C++) in $(COMPILE.cc)!
6102 Sun Mar 26 15:52:30 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6104 * Makefile: Added a `clean' target.
6106 Fri Mar 24 15:08:46 1989 Roland McGrath (mcgrath at helen.Berkeley.EDU)
6110 * file.c (rename_file): If a `struct file' for the renamed-to name
6111 exists, and it is a target or has deps or commands, barf.
6112 If not just remove the old one for put in the new one.
6114 * remake.c (update_file_1, check_dep): Changed it back so that equal
6115 modtimes to NOT make dependencies be considered newer. RCS checks
6116 out files with equal modtimes as the RCS files, so this screws it.
6118 * make.h, glob.c: If __GNUC__ is defined, use __builtin_alloca.
6120 * Makefile: Use variables `ALLOCA' and `ALLOCASRC' so systems
6121 without a good standard alloca can get it from the Emacs
6122 distribution (or somewhere).
6124 * dir.c: Don't include <sys/stat.h>, since make.h does.
6126 * make.c: Removed debugging version of getwd.
6128 Thu Mar 23 16:16:27 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6132 * remake.c (update_file_1): If a dependency loop is found, don't
6133 fatal. Emit an error message and remove the dependency.
6135 * remake.c (library_file_mtime): Fixed to use the right names.
6136 (update_file_1, check_dep): Consider a dependency "newer" than its
6137 dependent if they have the same modification time.
6139 Wed Mar 22 19:31:35 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6141 * file.c (remove_intermediates): Don't try to remove nonexistent files.
6143 Mon Mar 20 10:21:22 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6147 * rule.c (default_variables): Set F77 to $(FC) and F77FLAGS to
6148 $(FFLAGS) so explicit rules expecting these (which are in System V)
6149 will work. However, there is no way to make setting these affect
6150 the implicit rules, unless we trash FC and FFLAGS (which BSD uses).
6151 [USG]: Set GET to `get' rather than `/usr/sccs/get'.
6153 Sun Mar 19 20:00:27 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6155 * vpath.c (construct_vpath_list): Don't replace VPATH[ELEM] with
6156 dir_name (V), because the latter may get freed.
6158 Sat Mar 18 15:01:39 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6162 * make.texinfo: Cleaned-up edition 0.1 Beta from RMS and Bob Chassell.
6164 * file.c (rename_file): If a file with the new name already existed,
6165 use the same storage space, after freeing the old file's name, deps,
6166 and `also_make' member, preserving the link in the chain.
6167 Also write an error message telling the user to report the incident;
6168 I don't think this should be able to happen, but I'm not sure.
6170 * file.c (rename_file): Don't add the hash values of the old and new
6171 names together! Reset HASHVAL before computing the second value.
6173 * dir.c (check_changed_directories): Zero the new file hash table
6174 after allocating it.
6176 * dir.c (dir_file_exists_p): If FILENAME is "", return 1 if the
6179 * vpath.c (check_changed_vpaths): New function to run through the
6180 search paths of all VPATHs, making the `exists' members correspond
6183 * commands.c (child_handler): Call check_changed_vpaths.
6185 * make.h: Declare check_changed_vpaths.
6187 * vpath.c (struct vpath): New element `exists', an array of char
6188 flags; exists[N] is nonzero if searchpath[N] exists.
6189 (construct_vpath_list): Set the `exists' member.
6190 (selective_vpath_search): Don't search directories whose `exists'
6193 * read.c (read_makefile): Set the `dontcare' flag of makefiles
6194 from the MAKEFILES variable if they were not mentioned anywhere but
6195 in the MAKEFILES variable.
6197 * read.c (read_makefile): Don't write an error message if fopen
6198 fails for a makefile from the MAKEFILES variable.
6200 * dir.c (struct directory): Add `modtime' member to record the
6201 modification time of the directory when it was opened.
6202 (check_changed_directories): New function to check all known
6203 directories; if their modtimes have changed since they were opened,
6204 their file tables are cleared and they are reset to be read in.
6206 * commands.c (child_handler): Call check_changed_directories before
6208 make.h: Declare check_changed_directories.
6210 Tue Mar 14 20:07:13 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6214 * make.c (print_version): Made the copyright say 1988, 1989.
6216 * read.c (read_all_makefiles): Don't set *MAKEFILES to the name of
6217 the end of the read_makefiles chain, since the latter may be from an
6218 included makefile. (Why did I do this before?)
6220 * make.c (main): Set argv[0] to "" if it was nil. Don't put the
6221 command-line variable definitions into argv[0], only into the MAKE
6224 Sun Mar 5 20:44:08 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6226 * ar.c (ar_member_date, ar_touch): Remove the trailing ) from the
6229 Fri Mar 3 18:15:15 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6231 * commands.c (construct_command_argv): Initialize NEW_ARGV to 0. At
6232 `slow' label, if NEW_ARGV is not 0, free it; then allocate 4 strings.
6234 Tue Feb 28 14:29:39 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6238 * COPYING, make.texinfo: New GNU General Public License, version 1.
6240 * *.c, *.h, Makefile: New copyright notices for the new GNU General
6241 Public License, version 1.
6243 * commands.c [USG]: Define WRETCODE correctly (again).
6245 * variable.c (expand_function: `shell'): Don't capture the standard
6246 error output of the shell command.
6248 * ar.c (ar_touch, ar_member_date): Allocate MEMNAME with the right
6251 * load.c [not UMAX] (load_average): Don't clobber the first nlist
6252 member when trying to set the second!
6254 Thu Feb 23 13:13:53 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6256 * commands.c (child_handler): Really ignore errors under -i and for
6257 - lines, don't just print a different message.
6259 * make.c (decode_switches): Fixed handling of arguments (or lack
6260 thereof) to switches.
6262 Wed Feb 22 16:25:39 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6264 * commands.c (construct_command_argv): Don't clobber LINE when
6265 checking the IFS variable.
6267 Sun Feb 19 11:17:07 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6269 * load.c [UMAX, not NO_LDAV] (load_average): Return 0.0 rather than
6270 randomness when calls fail.
6274 * commands.c (fatal_error_signal): If handling a user kill signal
6275 (TERM, INT, HUP), wait for the children without printing the
6276 "Waiting for children" message, since they will die quickly.
6280 * remote-stub.c (remote_status): Take another arg, BLOCK. If this
6281 is nonzero block waiting for remote children. If not, return 0 if
6282 we would have to block.
6284 * commands.c (child_handler) [not USG]: If called as a signal
6285 handler, use wait3 and don't block.
6286 [USG]: If called as a signal handler, return after handling one child.
6288 Sat Feb 18 13:37:04 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6290 * file.c (snap_deps): Process all double-colon entries of each file,
6291 not just the first one.
6295 * remote-stub.c: remote.c renamed.
6296 remote.c: Just include remote-stub.c
6298 * commands.c (child_handler): If we were called as a signal handler,
6299 return after handling one child.
6301 * commands.c [not USG]: Include <signal.h> and define `sigmask' if
6303 (block_children, unblock_children): Use sigmask rather than
6304 bitshifting explicitly (and incorrectly).
6306 * remote.c (remote_kill): New function to send a signal to a
6309 * commands.c (fatal_error_signal): If we get a SIGTERM, send one to
6310 each living child. If we get a SIGTERM, SIGINT, or SIGHUP, delete
6311 all pending targets before waiting for children.
6312 (struct child): Add new member `deleted'.
6313 (start_job): Initialize `deleted' member to 0.
6314 (delete_child_targets): New function to delete a given child's
6315 targets, unless the `deleted' flag in the `struct child' says they
6316 have already been deleted. Sets this flag before returning.
6318 Thu Feb 16 18:32:07 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6320 * commands.c [USG]: Define `WRETCODE' correctly (X & 0xff00).
6322 Tue Feb 14 16:05:00 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6324 * commands.c (construct_command_argv): Don't make the 0th element of
6325 the argument list be "sh" when executing /bin/sh, because start_job
6326 uses the 0th element as the program name.
6328 Sun Feb 12 17:42:05 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6332 * read.c (readline): Put a null in the beginning of the buffer
6333 before starting the reading loop.
6335 * read.c (read_makefile): Made main reading loop while
6336 !feof (infile), and removed EOF check after calling readline.
6338 Sun Feb 5 19:52:38 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6340 * remote.c (block_remote_children, unblock_remote_children): New
6341 (stub) functions to block and restore asynchronous notification of
6344 * commands.c (block_children): Call block_remote_children.
6345 (unblock_children): Call unblock_remote_children.
6346 (child_handler): If called as a signal handler, block remote
6347 children on entry and unblock them before returning.
6349 * commands.c (child_handler): For unknown children, if they are
6350 remote, give their remote ID; if local, give their PID and make's.
6352 * commands.c (execute_file_command): Don't put a new child in the
6353 chain unless start_job succeeds. Block children before calling
6354 start_job, and unblock them after putting the child in the chain and
6355 incrementing `job_slots_used' (if start_job succeeded).
6357 * commands.c (block_children, unblock_children): Make these globally
6358 visible (not `static').
6359 commands.h: Declare block_children and unblock_children.
6361 * variable.c (expand_function: `shell'): Use
6362 `shell_function_completed'. Block children before forking and
6363 unblock after `shell_function_pid' is set properly and
6364 `shell_functon_completed' is reset to 0.
6366 * commands.c (child_handler): When the child of the `shell' function
6367 completes, set `shell_function_completed' to 1 if it actually ran,
6368 or -1 if it didn't (due to fork or exec failure).
6370 * commands.c (block_children, unblock_children): New functions to
6371 block and unblock the child termination signal.
6372 (wait_for_children): Use block_children and unblock_children.
6373 (execute_file_commands): Block children around the critical section
6374 wherein a new child is put on the chain.
6376 * make.c (main): Change the environment to contain the correct
6377 MAKELEVEL before re-execing.
6379 Sat Feb 4 18:28:48 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6383 Fri Feb 3 16:36:49 1989 Roland McGrath (mcgrath at helen.Berkeley.EDU)
6385 * rule.c (default_variables): Fixed $(LINK.c).
6387 Wed Feb 1 18:05:07 1989 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
6391 * version.c: Removed copyright notice, since this is a one-line file.
6393 * commands.c (error_status): Made it return BUF, rather than running
6394 off the end (this apparently worked on Sun 3s for some reason).
6396 * ar.c, commands.c, dep.h, load.c, make.c, make.h, read.c, remake.c,
6397 rule.c, variable.c, Makefile: Changed copyrght notices to cover 1989.
6399 Mon Jan 30 15:51:28 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6403 Fri Jan 27 20:09:24 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6405 * remake.c (remake_file): Don't touch phony targets.
6407 * rule.c (convert_to_pattern): Fixed an incorrect length passed to
6410 * variable.c (expand_function: `shell'): Close the read side of the
6411 pipe on the parent side of the fork.
6413 * commands.c (start_job): On the child of the fork, close the
6414 BAD_STDIN fd if we're not using it.
6416 * read.c (record_files): A file beginning with a dot can be a
6417 default target if it also contains a slash (as in `../foo').
6419 * commands.c (wait_for_children): For BSD, block SIGCHLD rather than
6420 ignoring it to avoid a race condition when child_handler is returning.
6422 * commands.c (child_handler): Do blocking waits.
6423 (error_status): Return a string describing exit status. (Split out
6426 * read.c (multi_glob): Change VECTOR to VEC for Alliant.
6428 Thu Jan 5 00:06:51 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6432 * make.texinfo (Features): Noted $(foo:PAT=SUB) from SunOS 4.0.
6434 * make.texinfo (Options/Recursion): -d and -p go in the environment.
6436 * load.c: Include "commands.h".
6438 Wed Jan 4 17:49:25 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6440 * make.c (switches): -d and -p can come from the environment and are
6443 * read.c (record_files): Fixed the checking for duplicate deps so it
6444 doesn't clobber the first one.
6446 * make.texinfo: Documented default implicit rule changes.
6448 * rule.c: Revamped default suffix rules. They now use Sun's style
6449 of using variables `COMPILE.c', `LINK.c', etc. for each suffix, and
6450 use `TARGET_ARCH' and `TARGET_MACH' variable where appropriate.
6451 Also support Modula-2 compilation (suffixes .sym, .def, and .mod).
6452 Ratfor Yacc support is gone, since nobody has yacc -r.
6453 All EFL support is gone, since nobody uses EFL.
6455 * ar.c, arscan.c: Don't assume `long int' and `int' are the same.
6457 * commands.c [USG]: Fixed wait status bit encoding.
6458 [USG and not USGr3] (dup2): Define this for SysVr2.
6460 * make.h, dep.h, make.c [iAPX286]: Make allowances for this
6461 brain-damaged compiler.
6463 * make.texinfo (Variables: Flavors): Fixed a typo.
6465 Tue Jan 3 18:09:31 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6467 * ar.c (ar_member_date, ar_touch): Truncate member names to 15 chars.
6471 * commands.c [SYS_WAIT]: If this is defined, use BSD <sys/wait.h>
6472 and wait3 even if USG.
6474 * read.c (record_files): Defining .DEFAULT with no deps or commands
6475 clears its commands.
6477 * rule.c (default_suffixes): Added `.sh'.
6478 (default_suffix_rules): Added single-suffix .sh rule, copies source
6479 to target and makes target executable.
6480 make.texinfo (Catalogue of Rules): Documented .sh rule and its use
6481 in conjunction with SCCS.
6483 * rule.c (set_default_suffixes): Define variable `SUFFIXES' to the
6484 default list ("" under -r).
6485 make.texinfo (Suffix Rules): Document `SUFFIXES' variable.
6487 * rule.c (default_variables), make.texinfo (Implicit Variables):
6488 Variable AR defaults to `ar', ARFLAGS to `rv', and RM to `rm -f'.
6490 * rule.c (install_default_pattern_rules): Default variables are made
6492 (default_variables): Added "CPP", defined to "$(CC) -E".
6493 (default_suffixes): Added `.S', before `.s'.
6494 (default_suffix_rules): New rule for .S to .s, runs CPP.
6495 All rules that use CPP now include "$(CPPFLAGS)".
6496 make.texinfo (Catalogue of Implicit Rules, Implicit Variables):
6497 Documented above changes.
6499 * commands.c [USG] (sys_siglist): Don't define.
6500 [USG] (init_siglist): New function to initialize sys_siglist.
6502 * make.texinfo (Variables: Reference): Documented `$(foo:PAT=SUB)'
6505 * variable.c (variable_expand): A reference `$(foo:PAT=SUB)' is
6506 equivalent to `$(patsubst PAT,SUB,$(foo))'.
6508 * variable.c (variable_expand): Free the storage for the expansion
6509 of a recursive variable when it is nod longer needed.
6511 * variable.c (variable_expand): When checking for `$($(foo))', use
6512 lindex so as not to search for the second `$' outside the parens.
6514 * make.c (struct stringlist, main, decode_switches): Changed `index'
6517 Sat Dec 24 16:02:32 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6519 * commands.c (wait_for_children [USG]): Handle SIGCLD with SIG_DFL,
6520 rather than SIG_IGN. Ignoring SIGCLD reportedly makes wait return -1.
6522 * arscan.c [USGr3]: Define PORTAR to 1 (as with sun386).
6523 (ar_scan [USGr3]): Remove trailing slashes from member names.
6525 Thu Dec 22 17:54:05 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6527 * make.texinfo (Makefiles: Overriding Makefiles): New node
6528 documenting use of .DEFAULT to have one makefile defer unmakeable
6531 * make.texinfo (Implicit: Using Implicit, Implicit: Last Resort):
6532 Mention empty commands and xref node `Empty Commands'.
6534 Wed Dec 21 20:12:40 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6538 * make.c (struct command_switch, command_switches, et al): New
6539 member `noarg_value', if not nil, ptr to value to use if no arg is
6540 given to a switch that would otherwise require one. The -j option
6541 can now be given w/o an arg, to mean infinite jobs.
6542 * commands.c: If job_slots is zero, infinite jobs.
6544 * read.c (read_all_makefiles, read_makefile): Make makefiles precious.
6546 * make.c (decode_switches): For a positive_int or floating option,
6547 if we moved to the next argument word, but found no argument for the
6548 option, move back to the correct word.
6550 * make.c (decode_switches): If we got any unknown options, die after
6551 processing all arguments.
6553 * GNUmakefile: Moved `include depend' to the end, so the default
6554 goal will be set before then.
6556 * load.c (wait_to_start_job [Unix, UMAX]): Merged into one version
6557 under #ifdef LDAV_BASED. Only loop while we have jobs running.
6558 Sleep for increasing amounts (increase one second per iteration)
6559 before checking the load average (after the first check).
6560 Get the load average from function load_average.
6561 (wait_to_start_job [not LDAV_BASED]): Always return.
6562 (load_average [UMAX]): Fetch load average for Encore UMAX.
6563 (load_average [not NO_LDAV]): Fetch load average from /dev/kmem.
6564 [not NO_LDAV]: Define LDAV_BASED.
6566 Tue Dec 20 18:54:50 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6570 * commands.c (wait_for_children): Take second arg, ERROR. If
6571 nonzero, and there are children, print a message on stderr.
6572 (execute_file_commands, fatal_error_signal): Pass second arg.
6573 * make.c (die), remake.c (update_goal_chain), variable.c
6574 (expand_function: `shell'): Ditto.
6576 Sat Dec 17 01:05:38 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6578 * commands.c (start_job): Call wait_to_start_job before forking.
6580 * load.c (load_average): Converted to wait_to_start_job.
6582 * remote.c: New file for remote execution functions.
6583 (start_remote_job_p): Return nonzero if the next job should be run
6585 (start_remote_job): Start a remote job and return an ID for it.
6586 (remote_status): Get status of dead remote children.
6588 Fri Dec 16 16:51:07 1988 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
6590 * commands.c (start_job): If start_remote_job_p () returns nonzero,
6591 call start_remote_job to start the job rather than fork and exec.
6594 * commands.c (execute_file_commands): Moved load average checking to
6597 * commands.c (child_handler: USG): Record the pid wait returns.
6599 * load.c (UMAX): Added some #include's needed for UMAX.
6601 * read.c (multi_glob), variable.c (string_glob): Ignore a (char **)
6602 -1 return from glob_filename.
6604 * variable.c (variable_expand): Make sure we don't increment past
6605 the end of the string we were passed.
6607 * variable.c (variable_expand): Terminate the expansion.
6609 * file.c (rename_file): If there is already a file under the new
6610 name, set its contents equal to FILE's (ick).
6612 * variable.c (define_automatic_variables): Pass all the args to
6613 define_variable when defining MAKELEVEL!
6615 * commands.c (execute_file_commands): If max_load_average > 0, and
6616 we have children running, don't start up another child until the
6617 load average goes below max_load_average.
6619 * make.c: New variable `max_load_average'.
6620 (struct command_switch, decode_switches, decode_env_switches):
6621 Handle floating-point (double) args.
6622 (command_switches): Added `-l' switch to set `max_load_average'.
6624 * load.c (load_average): New file and function to return a double
6625 that is the current load average (1.00 scale).
6626 * GNUmakefile, oldMakefile: Pass flags in $(LOAD_AVG) for load.c.
6628 Thu Dec 15 15:22:08 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6630 * Makefile: Renamed to oldMakefile.
6631 * GNUmakefile: Make Makefile from oldMakefile and depend.
6633 * read.c (read_all_makefiles): When putting the default makefiles in
6634 the read_makefiles chain so they will be remade, put them in the
6637 * remake.c (update_goal_chain): If MAKEFILES is nonzero, always make
6638 in serial, and return as soon as one goal whose `changed' member is
6639 nonzero is successfully remade.
6641 * commands.c: Don't include <sys/fcntl.h>.
6643 * commands.c (construct_command_argv): Added ` to sh_chars.
6645 * make.h: Don't declare construct_makeflags.
6647 * make.c (main): Set up MAKEFLAGS and MFLAGS and make an environment
6648 both before and after reading the makefiles, so the makefiles can
6649 use them and possible change them, and later children will get the
6651 (construct_makeflags): Replaced with define_makeflags (static void),
6652 which defines the two variables.
6653 * variable.c (define_automatic_variables): Don't define MAKEFLAGS
6656 Mon Dec 12 14:40:31 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
6660 * commands.c (child_handler): Reset the handler to ourselves when
6661 called for USG, since it has no safe signals.
6663 * commands.c: For USG, use an int rather than a `union wait' for
6664 wait calls, and dissect it with bitmasks.
6665 (child_handler): No wait3 system call in USG. Since we can't
6666 protect from hanging, always return immediately if we have no
6667 children we know about and we're not running a `shell' function.
6668 (There is still the danger of hanging waiting for a child that died
6669 without our being notified.)
6671 * remake.c: Include <fcntl.h> instead of <sys/file.h>. What we need
6672 is really in <fcntl.h>, and while BSD <sys/file.h> includes
6673 <fcntl.h>, USG doesn't.
6675 * make.c (main): Figure out the program name before doing anything
6676 which might need it (in a call to error or fatal).
6678 * dir.c, glob.c: Use `struct dirent' and <dirent.h> for USGr3.
6680 * arscan.c (ar_scan): Added missing & before buf (which is an int)
6681 if SARMAG is not defined (SysV).
6683 Fri Dec 9 18:44:13 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
6687 * dir.c (find_directory, dir_file_exists_p): Keep track of how many
6688 directories we have open and don't let it be more than
6689 MAX_OPEN_DIRECTORIES (currently 10).
6691 * variable.c (expand_function: `foreach'): Use expand_argument
6692 rather than variable_expand so each repetition doesn't clobber the
6695 Mon Dec 5 15:58:46 1988 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
6699 * Makefile: Define `install' target.
6701 * GNUmakefile: Don't include GNUmakefile or depend in the
6704 Wed Nov 30 15:53:42 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
6706 * commands.c (execute_file_commands): Don't clobber a null into
6707 random storage if there were no $^ and/or $? words.
6709 * remake.c (check_dep): Set *MUST_MAKE_PTR nonzero if a dependency
6712 * ar.c (ar_member_date, ar_touch): Make sure the modtime of the
6713 archive file itself is known before we fetch or change the modtime
6714 of one of its members.
6716 * read.c (read_makefile): Expand variable and function references
6717 before parsing rules so variable can contain special characters
6718 (colons and semicolons).
6720 Sat Nov 26 11:36:31 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6722 * variable.c (expand_function: `filter', `filter-out'): Fixed so
6723 that filter-out works right.
6725 * variable.c (expand_function: `filter', `filter-out'): Made these
6726 functions use each word of their first argument as a pattern.
6728 Fri Nov 25 10:51:47 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6732 * read.c (record_files): If a target is listed more than once in a
6733 single rule (that defines commands), give a warning message rather
6734 than the counter-intuitive message saying commands were already
6735 defined (in the same place).
6737 * make.c (fatal, error): Made them both take 6 args since there is
6738 at least one error message that need that many. Too bad vfprintf is
6743 * read.c (read_makefile): Moved the construction of the `struct
6744 commands' into record_files. Call record_files before recursing for an
6745 included makefile so the higher-up will determine the default goal.
6746 (record_files): Take arguments COMMANDS, COMMANDS_IDX and
6747 COMMANDS_STARTED and construct a `struct commands.
6749 Thu Nov 24 14:36:33 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6753 * make.c (main): Made it a fatal error if we can't move back to the
6754 directory we started in before re-execing.
6756 * make.c (main): Get the current directory before doing anything
6757 else, so we know it even if we don't need it for the value of
6758 `MAKE', since we might want it when re-execing.
6760 Wed Nov 23 13:34:44 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6764 * read.c (record_files): Eliminate duplicate deps in a chain.
6766 * variable.c (expand_function: `sort'): Pass the right number to
6767 qsort, not one less.
6769 * remake.c (remake_file): Always call notice_finished_file if
6770 FILE->command_state == cs_finished.
6772 * commands.c (execute_file_commands): Call notice_finished_file to
6773 set FILE's status correctly when start_job fails (because it's out
6774 of commands or running under -n).
6776 Fri Nov 18 15:31:12 1988 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
6780 * remake.c (update_file_1): Set the `update_status' of FILE to
6781 nonzero and set FILE's `updated' bit if we have decided to give up
6782 on remaking FILE because of errors in the dependencies.
6784 * rule.c (pattern_search): Debugging messages use `dependency' (vs.
6785 `dependent') properly.
6787 * make.texinfo (Conditionals: Conditional Syntax): Function index
6788 entries for `ifndef' and `ifneq'.
6790 * variable.c (define_automatic_variables): Define `MAKELEVEL' to the
6791 decimal number of the makelevel, since it may be malformed or blank.
6793 * remake.c (remake_file): Call notice_finished_file after touching.
6795 Sat Nov 12 19:29:34 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6799 * GNUmakefile (dist): Pass the `-f' flag to compress.
6801 * vpath.c (build_vpath_lists): Check for VPATHS being nil after
6802 constructing the general VPATH list from the `VPATH' variable.
6804 Fri Nov 11 08:02:26 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6806 * make.c (fatal, error): Made error messages for recursive runs be
6809 Thu Nov 10 16:51:36 1988 Roland McGrath (mcgrath at basil.Berkeley.EDU)
6813 * read.c (read_makefile): Made it eat leading spaces and formfeeds
6814 (but not tabs), like it's documented to.
6816 * read.c (read_makefile): Let included makefiles determine the
6817 default goal, as is done by System V Make.
6819 Tue Nov 1 19:03:08 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6821 * variable.c (new_environ): Don't increment VCNT when a variable is
6824 Fri Oct 28 16:54:15 1988 Roland McGrath (mcgrath at basil.Berkeley.EDU)
6828 * rule.c (convert_to_pattern): Don't use the same storage for a name
6829 in two rules since new_pattern_rule may free this storage when a
6832 * rule.c (new_pattern_rule): Undid useless change I made Oct 25.
6834 Thu Oct 27 19:17:53 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6838 * GNUmakefile, Makefile: Fixed a typo in a comment.
6839 * Makefile: Removed malloc.o from object file list.
6841 * variable.c: Removed old debugging #define's for xmalloc and
6842 xrealloc so non-ANSI cpp's won't barf.
6844 * make.c (main): Made local array for temp file name static so
6845 compilers that don't do auto aggregate initialization won't barf.
6847 * read.c: Removed static declaration of copy_dep_chain since it is
6850 Tue Oct 25 16:59:30 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
6852 * rule.c (new_pattern_rule): If we threw out the new rule because it
6853 matched an old one and OVERRIDE was zero, don't put the freed
6854 pointer in the chain!
6856 Wed Oct 19 15:07:43 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
6860 * variable.c (expand_function: `sort'): Don't do the sorting and
6861 writing out if there were no words in the first place.
6863 * remake.c (remake_file): Only fail with a "no way to make" message
6864 for a dependency (non-target) file. If we don't know how to remake
6865 a target file, pretend it was successfully remade and is very new.
6867 * remake.c (remake_file): Don't increment `files_remade' for a
6868 non-target file we don't know how to remake.
6870 * read.c (record_files): Don't die with "both : and :: entries" for
6871 a file whose `is_target' flag is not set.
6873 Tue Oct 18 17:24:11 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6875 * variable.c (expand_function: `patsubst', `subst'): Free the right
6878 * variable.c (expand_function: `subst'): Don't clobber the
6879 pointer to the end of the second arg and then try to use it!!!
6881 Mon Oct 17 16:44:45 1988 Roland McGrath (mcgrath at catnip.Berkeley.EDU)
6883 * variable.c (expand_function: `patsubst'): Don't clobber the
6884 pointer to the end of the second arg and then try to use it!!!
6886 * variable.c (expand_function: `word' function): Made it parse its
6887 second argument correctly.
6889 * ar.c (ar_touch): Return 1 rather than -1 for on errors.
6891 Sat Oct 15 15:12:16 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6895 * GNUmakefile: Removed explicit rule for make.dvi since the built-in
6896 implicit rule now works.
6898 * rule.c (default_suffix_rules): Fixed .texinfo.dvi rule yet again
6899 so that it really works, now that parens are counted.
6901 * remake.c (update_file_1): Set FILE's `updated' flag after calling
6902 remake_file if it failed or finished immediately.
6904 * remake.c (update_file): Use the `updated' flag rather than the
6905 command state to decide if a file was fully considered, and
6906 therefore might give an "up to date" message.
6908 * variable.c (expand_function): Made all functions that take more
6909 than one argument count parens of the appropriate flavor in their
6910 args and ignore commands nested in parens.
6912 Fri Oct 14 18:35:00 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6914 * read.c (read_all_makefiles): Pass second arg to read_makefile for
6917 Thu Oct 13 16:40:08 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6921 * GNUmakefile: Added an explicit rule for make.dvi since the
6922 built-in .texinfo.dvi implicit rule is screwed up.
6924 * rule.c (default_suffix_rules): Added a comment that the
6925 .texinfo.dvi rule does not work because of an ahem, feature of Make
6926 that at some point will be fixed--er, enhanced to alleviate this
6929 * rule.c (default_suffix_rules): Fixed Texinfo -> DVI rule (again).
6931 * make.texinfo (Commands: Execution): Documented new competing for
6932 standard input among children.
6934 * commands.c (struct child): Added `good_stdin' flag to tell if this
6935 child has the stdin that doesn't point into nirvana.
6936 (good_stdin_used): New variable to tell if any child has the good
6938 (child_handler): Reset `good_stdin_used' if a dead child's
6939 `good_stdin' flag is set.
6940 (start_job): Give the new child the good standard input if
6941 `good_stdin_used' is no set, and set the child's `good_stdin' flag
6944 * rule.c (default_suffix_rules): Changed Texinfo -> DVI rule to work
6947 * read.c (read_all_makefiles): Stop reading default makefiles after
6950 * read.c (read_makefile): Reset `reading_filename' and
6951 `reading_lineno_ptr' after recursing for an included makefile.
6953 * GNUmakefile: New GNU Make-specific makefile that does everything
6954 Makefile does plus distribution stuff, and doesn't contain any hacks
6955 to try to work with Unix make.
6957 * Makefile: Removed distribution stuff.
6959 * make.c (main): Use mktemp to construct the names of temporary
6960 files used for standard input makefiles.
6962 * make.c (main): Don't turn standard input into a broken pipe.
6964 * commands.c (start_job): Keep two extra file descriptors around: a
6965 good standard input, and a bad one that reads from a broken pipe.
6966 On the child side of the fork, if there are other children, give
6967 this one the broken pipe so they won't compete; if this is the only
6968 one, give it the good standard input.
6970 * make.h: Declare notice_finished_file.
6972 * commands.c (execute_file_commands): Use noticed_finished_file
6973 after waiting for the child when there is only one job slot.
6975 * remake.c (notice_finished_file): New function to re-check mtime's
6976 and such things to be done when commands finish.
6977 (update_file_1): Use notice_finished_file.
6979 * commands.c (child_handler, execute_file_commands): Use new
6980 variable `job_slots_used' to record the number of jobs currently
6981 running, rather than diddling with `job_slots'.
6982 (execute_file_commands): Increment `job_slots_used' before calling
6983 start_job and decrement it on failure to avoid race condition.
6984 If there is only one job slot, wait for the child to finish and
6985 return its status so commands are run in linear order, as if there
6986 were no parallelism.
6988 Wed Oct 12 15:59:03 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6990 * remake.c (remake_file): Don't print a "No way to make" message for
6991 targets whose `dontcare' flags are set.
6993 * read.c (read_all_makefiles): Set the `dontcare' flag of the
6994 `struct file' each default makefile added to the chain.
6996 * file.h (struct file): Add `dontcare' member.
6998 * read.c (read_all_makefiles): When no default makefiles are found,
6999 put the names of all those tried in the `read_makefiles' chain so
7000 they will be updated if possible, giving their `struct dep's'
7001 `changed' members the value of 0 so we won't care if they cannot be
7004 * make.texinfo (Makefiles: Remaking Makefiles): Documented that
7005 default makefiles will be remade if not found.
7007 * read.c (read_all_makefiles): If no default makefiles can be found,
7008 go through the list of default names, trying to make one, stopping
7011 * remake.c (remake_file): Set STATUS to 0 after successfully touching.
7013 * dir.c (file_impossible, file_impossible_p): Don't clobber FILENAME
7014 to "" and then try to to a strcmp on it!!!
7016 Mon Oct 10 16:09:18 1988 Roland McGrath (mcgrath at cinnamon.Berkeley.EDU)
7018 * make.c (main): Don't do `dir_load (".")'.
7020 * rule.c (count_implicit_rule_limits), vpath.c
7021 (construct_vpath_list): Test the existence of a given directory by
7022 `dir_file_exists_p (DIR, ".")' and assume that if this returns zero,
7023 it means the directory really does not exist.
7025 * dir.c (struct dirdata): Replaced with `struct directory' for
7026 directories, each containing a chain of `struct dirfiles', one for
7027 each file (real or impossible).
7028 (dir_load): Removed.
7029 (find_directory): New function to find the `struct directory' for a
7030 named directory and return it (possibly creating a new one).
7031 (dir_file_exists_p): Read the directory on the fly if its stream is
7032 still valid (and ever was) if the file we're looking for is not
7033 already in the hash tables.
7034 (file_impossible, file_impossible_p, dir_name, print_dir_data_base):
7035 Use the new directory/file scheme.
7037 * make.texinfo: Miscellaneous editorial changes and clarifiactions.
7039 * commands.c (struct child): Remove `environ' member.
7040 (child_handler, start_job, execute_file_commands): Remove use of
7041 `environ' member and new_environ.
7043 * make.c (main): Call new_environ after reading makefiles.
7045 * variable.h: Declare `new_environ' to return void.
7047 * variable.c (new_environ): Put the environment in `environ' and
7050 Fri Oct 7 15:48:39 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
7054 * Makefile: Don't make the uncompressed tar file.
7056 * variable.c (expand_function: `shell' function): Made it not expect
7057 read to null-terminate the buffer.
7059 * Makefile: Made it use a temporary symlink to . rather than a
7060 temporary directory to make the distribution tar file.
7062 Thu Oct 6 17:52:35 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
7066 * make.texinfo: Fixed a line that got garbaged somehow.
7068 Mon Oct 3 16:14:39 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
7070 * make.c (main): Try to move back to the directory we started in
7071 before re-exec ourself.
7073 * remake.c (update_file_1): A double-colon target with no deps
7074 always needs to be remade.
7076 * remake.c (remake_file): Changed "No way to make" message to say
7077 `target' rather than `file'.
7079 Sun Oct 2 12:50:47 1988 Roland McGrath (mcgrath at catnip.Berkeley.EDU)
7081 * remake.c (update_file_1): Set FILE->update_status to the return
7082 value of remake_file.
7084 * rule.c (convert_to_pattern): Fixed swapped lengths passed to
7085 xmalloc for source/target suffixes.
7087 * make.texinfo: Documented that MAKEFLAGS and MFLAGS are read in
7088 from makefiles. Updated the `Features' section a bit.
7090 * make.c (main): Read switches from MAKEFLAGS and MFLAGS variables
7091 after reading in makefiles.
7093 * make.c (main): Put a line "/tmp/foo:;" rather than ".PHONY:
7094 /tmp/foo" in front of temp files made for stdin makefiles.
7096 * remake.c (update_file): Test the state of the right `struct file'
7097 for double-colon files.
7099 * make.c (main): Put a ".PHONY: /tmp/foo" line in front of temp
7100 files made for stdin makefiles so they won't be remade when we
7101 re-exec. Kludge-o-matic!!
7103 * remake.c (update_goal_chain): Judge files as being finished based
7104 on their `updated' flag, not their state.
7106 * read.c (read_makefile): Don't check for FILENAME being "-".
7107 (read_all_makefiles): Set each element of MAKEFILES to the name put
7108 in READ_MAKEFILES by read_makefile, since read_makefile may free the
7109 storage for the name it is passed, and someone might want to look at
7110 the elements of MAKEFILES again.
7112 * make.c (main): For each `-f' flag with arg `-' (standard input),
7113 read standard input into a temp file and pass the temp file's name
7114 to read_all_makefiles, after making sure it will not be remade.
7116 * make.c (construct_makeflags): Always put out `-j1'.
7118 Sat Oct 1 00:19:59 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7120 * commands.c (execute_file_commands): If commands are nothing but
7121 whitespace, set the state to `cs_finished' before returning 0.
7123 * make.c (decode_switches): Allocate space for args in stringlists
7124 so they can be freed later.
7126 * make.h: Declare `makelevel'.
7128 * variable.c (makelevel): Moved to make.c (and made global).
7130 * make.c (fatal, error): Print the makelevel if it's > 0.
7131 (perror_with_name): Use error rather than calling fprintf directly.
7132 (pfatal_with_name): Use fatal rather than fprintf and die.
7134 * variable.c (new_environ): Don't put default variables (origin
7135 `o_default') into the environment; they just take up space.
7137 * read.c (read_makefile): Don't add FILENAME to the chain of read
7138 makefiles if it's "-" (standard input).
7140 * remake.c (update_goal_chain): Set STATUS correctly when nothing
7141 happens (as well as in all other situations).
7143 * make.c (construct_makeflags): Put a `-' before each switch and
7144 spaces between them.
7148 * commands.c (wait_for_children): Don't check if `children' is nil.
7149 This is the case when waiting for the child of a `shell' function.
7151 * dir.c (dir_load): Don't add a hash-table entry for directory
7152 DIRNAME and filename "" if DIRNAME doesn't exist.
7154 * commands.c (execute_file_commands): Return 0 after start_job
7155 returns 1 (failure) under the -n flag.
7157 * remake.c (remake_file): Set the state to `cs_finished' when not
7158 calling execute_file_commands.
7160 * remake.c (update_goal_chain): Second arg is now MAKEFILES, nonzero
7161 meaning to disable -t, -q, and -n for each target unless the target
7162 was also given on the command-line.
7164 * read.c (read_makefile): Enter the `struct file's for the makefiles
7165 added to the `read_makefiles' `struct dep' chain.
7167 * remake.c (update_goal_chain): Made it not enter the files for the
7168 goals in the chain. It will already have been done.
7170 * rule.c (convert_to_pattern): Null-terminate the names of targets
7171 and deps of the pattern rules properly.
7173 Fri Sep 30 18:56:20 1988 Roland McGrath (mcgrath at nutmeg.Berkeley.EDU)
7175 * make.c (main): Call install_default_pattern_rules.
7177 * make.h: Declare copy_dep_chain.
7179 * read.c (copy_dep_chain): Moved to make.c (and made global).
7181 * make.c (main): Call update_goal_chain to update goals.
7182 Update read makefiles and re-exec self if they change.
7184 * remake.c (update_file): Make this function static.
7185 (update_goal_chain): New function to update a `struct dep' chain of
7186 goals, waiting until they are all finished before returning.
7188 * make.h: Don't declare update_file. Declare update_goal_chain.
7190 * make.c (main): Call snap_deps, etc. that were in read_all_makefiles.
7192 * read.c (find_makefile): Removed this function.
7193 (read_all_makefiles): Don't update makefiles, don't diddle with
7194 pattern rules, don't call snap_deps, etc. Return a `struct dep'
7195 chain of all makefiles read.
7196 (read_makefile): Now takes two args: FILENAME and TYPE, which is 0
7197 for a normal makefile, 1 for MAKEFILES variable or 2 for an included
7198 makefile. Add a `struct dep' containing the name of the makefile
7199 (as it was found in the search path for type 2s), and TYPE in the
7200 `changed' member to the global `read_makefiles' chain.
7202 * make.h, rule.c (displace_pattern_rules,
7203 add_displaced_pattern_rules): Removed these functions.
7205 * read.c (read_makefile): Variable-expand the name of an `include'd
7206 makefile before calling find_makefile on it.
7208 * file.c (snap_deps): If the `struct file' for a `struct dep'
7209 already exists, free the `struct dep's `name' member before setting
7210 it to nil (since this info is in the `struct file').
7212 * read.c (copy_dep_chain): Made it copy each name rather than
7213 leaving multiple `struct dep's with the same pointers.
7215 Thu Sep 29 19:08:13 1988 Roland McGrath (mcgrath at catnip.Berkeley.EDU)
7217 * make.c (decode_switches): Fixed second decode_env_switches call to
7218 use correct length of "MFLAGS" (6, not 5).
7220 * read.c (read_makefile): Don't stop reading when readline returns
7221 zero lines read. Only stop when the stream reaches EOF. This makes
7222 it recognize the last line of a makefile without a newline.
7224 * remake.c (remake_file): If we don't know how to make FILE, set its
7225 command state to `cs_finished'.
7227 * remake.c (update_file): Don't write the "up to date" message if
7228 update_file_1 returned a nonzero status.
7230 Wed Sep 28 16:30:07 1988 Roland McGrath (mcgrath at catnip.Berkeley.EDU)
7232 * commands.c (child_handler): Set the `update_status' member
7233 properly for ignored errors.
7235 * rule.c (convert_to_pattern): Made it not care about if the target
7236 suffix comes before the source suffix in the .SUFFIXES list.
7238 * make.texinfo: Misc editorial changes.
7240 * commands.c (wait_for_children): Return immediately if `children'
7241 is nil (there are no children).
7243 Tue Sep 27 15:33:14 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
7247 * commands.c (struct child): New member `command_ptr' to hold the
7248 current position in the commands. The `commands' member is never
7250 (start_job, child_handler, execute_file_commands): Use new method
7251 for `commands' and `command_ptr' members.
7253 * make.c (decode_env_switches): Skip past an invalid letter (instead
7254 of looping forever).
7256 * commands.c (struct child): Add `environ' member to hold the
7257 environment for this child.
7258 (execute_file_commands): Get a new environment from new_environ and
7259 put in the the new `struct child's `environ' member.
7260 (child_handler): When freeing a child, free its `commands' member, the
7261 elements of its `environ' array and its `environ' member itself.
7262 (start_job): Set `environ' to the child's `environ' member before
7263 exec'ing the command.
7265 * variable.h, variable.c (new_environ): Made it return the new
7266 environment, not putting it in `environ'.
7268 * remake.c (update_file): Don't give a "is up to date" message
7269 unless no files were remade and the state went from `cs_not_started'
7270 to `cs_finished', so repeat calls to finish jobs won't get the message.
7272 Mon Sep 26 16:26:08 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7276 * make.texinfo (Commands: Execution): Documented that children will
7277 be waited for rather than killed.
7279 * commands.c (fatal_error_signal): Wait for children.
7280 (kill_children): Removed this function.
7282 * make.c (main, die): Wait for children to die, don't kill them.
7284 * variable.c (expand_function): Use wait_for_children.
7286 * make.c (main): Use wait_for_children rather than child_handler.
7288 * commands.c (wait_for_children): New function to block waiting for
7289 children, insuring that child_handler is not called recursively.
7290 (execute_file_commands, kill_children): Use wait_for_children.
7292 * commands.c (child_handler): Start up additional commands in a
7293 sequence after an ignored error.
7295 * remake.c (update_file): Don't print "`foo' is up to date" messages
7296 when update_file_1 returns while commands are executing.
7298 * remake.c (update_file_1): Pass the file name to name_mtime, not
7299 the bloody `struct file', dammit!!
7301 * commands.c (child_handler): Print out the "*** ..." error message
7302 when not under -i. (I somehow forgot this.)
7304 * remake.c (update_file_1): Use name_mtime rather than file_mtime to
7305 re-get the mtime of a file whose commands have finished.
7307 * make.c (command_switches, decode_switches, decode_env_switches):
7308 Make all switches that take string args allow them right after the
7311 * commands.c (child_handler): Check for a child being the `shell'
7312 function's command returning and set the global variable for
7313 expand_function to check.
7315 * variable.c (expand_function): For the `shell' function, instead of
7316 waiting for the child shell ourselves, let child_handler do it and
7317 loop around waiting for something to happen.
7319 * make.c (print_version): Made the copyright year static, not dynamic.
7321 * make.h, make.c: Remove construct_argv function.
7323 * make.c (main): Say "no goal target" instead of "no target".
7325 * make.texinfo (Commands: Parallel): Don't send SIGKILL.
7327 * commands.c (kill_children): Don't send SIGKILL to children that
7328 aren't killed by the first signal.
7330 * make.c (main), commands.c (kill_children): Decide between SIGCHLD
7331 and SIGCLD based on whether or not SIGCHLD is defined, not on USG.
7333 * Makefile: Link make with $(LOADLIBES).
7335 * read.c (construct_include_path): Fixed another bad xrealloc call.
7337 * make.c (decode_switches): Fixed an xrealloc call with no first arg.
7339 Sat Sep 24 01:16:21 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
7343 * remake.c (update_file_1): If deps are running, set state to
7344 `cs_deps_running' and return 0. If deps are done, run commands.
7346 * commands.c (child_handler): Made it delete non-precious targets
7347 killed by fatal signals.
7349 * make.texinfo: Documented parallelism.
7351 Fri Sep 23 16:52:27 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7353 * remake.c (update_file_1): Don't return if FILE's state is
7354 `cs_deps_running'. In that case, we need to run through and check
7355 the states of all our dependencies.
7357 * commands.c (execute_file_commands): Decrement `job_slots' after
7358 starting a new job to run file commands.
7360 * commands.c (start_job): Made it set the state to `cs_running'.
7362 * make.c (main): Fixed usage of `g', `lastgoal', and `goals' in the
7365 * commands.c (child_handler): When commands finish, set the
7366 corresponding file's `update_status' and `updated' flags as
7367 appropriate, and reset the modtimes of the file and any `also_make'
7370 * remake.c (remake_file): Don't re-set `last_mtime' and set `updated'.
7372 * commands.c (fatal_error_signal): Don't swallow all the children
7373 with a loop around `wait ((union wait *) 0)'!!!
7375 * make.c (struct command_switch): Added `positive_int' type.
7376 (switches): Added -j (job_slots).
7377 (construct_makeflags, decode_switches, decode_env_switches):
7378 Handle`positive_int'-type switches.
7380 * glob.c (glob_vector): Rename local variable `vector' to `VeCtOr'.
7381 This is said to avoid a conflict with some system's global `vector'
7384 * variable.c (expand_function): Made the `shell' function use
7385 construct_command_argv and do its own child control and piping.
7387 * make.c (main): Turn standard input into a broken pipe after
7388 reading in all makefiles (the last time it will be needed).
7390 * commands.c (struct child): Remove `pipe_fd' member. We don't use
7392 (start_job): Return 0 for success, 1 or failure (rather than void).
7393 Don't use pipes. Don't turn the child's stdin into a broken pipe.
7394 (child_handler): Print "*** Error" messages when necessary.
7395 Die on failed commands when -k was not given.
7396 (execute_file_commands): Check the return of start_job and remove
7397 the child from the chain and return failure if it is nonzero.
7399 * make.c (die): New function to clean up and exit.
7400 (fatal, pfatal_with_name): Use die.
7402 Thu Sep 22 14:27:11 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7404 * commands.c (struct child): Added `commands', `pipe_fd', and
7405 `noerror' members to keep track of info about a command thread.
7406 (start_job): New function to start a job and update the argument
7407 `struct child' to reflect its status.
7408 (execute_file_commands): Merged run_file_commands back in.
7409 Made it use new start_job function.
7411 * rule.c (freerule): Don't free the `struct commands' of the
7412 discarded rule. It may be used in more than one place.
7414 * commands.c (execute_command_line): Made it not try to delete the
7415 possibly partly-made file. The child_handler function will do this.
7416 (fatal_error_signal): Ditto + call kill_children.
7418 * make.h: Declare job_slots.
7420 * make.c (main): Collect goals in a dep chain and run through this
7421 chain waiting for a child, eliminating finished goals, updating all
7422 remaining goals, and quitting if they fail and not -k.
7424 * commands.c (child_handler): If called with SIG < 0, - SIG is the
7425 max number of children to bury.
7427 * commands.c (child_handler): If called with SIG as zero,
7428 block waiting for running children.
7429 (kill_children): Call child_handler with zero rather than SIGCHLD.
7431 * remake.c (update_file_1): Use the `command_state' member of FILE
7432 and its dependencies to determine what commands are running, what to
7433 do, etc. If commands or dep commands are running when we are
7434 called, return success (0). If commands finished since the last
7435 time we were called, return their status.
7437 * commands.h: Declare kill_children.
7439 * commands.c: Define `struct child' to keep track of child
7440 processes, with the chain in `children'.
7441 (child_handler): New function to catch child-termination signals
7442 (SIGCHLD, or SIGCLD for USG), store the returned status in the
7443 appropriate structure, take the now-obsolete `struct child' out of
7444 the chain, and free its storage.
7445 (execute_file_commands): Put all of the stuff invloving running the
7446 commands into new function run_file_commands. Execute_file_commands
7447 now does process management for the commands, while
7448 run_file_commands (which is run in a subprocess) runs the commands.
7449 (kill_children): New function to kill all running children by
7450 sending them signal SIG. If there are any children still living
7451 after they are all sent SIG, they are all sent SIGKILL.
7453 * make.c (main): Catch SIGCHLD (SIGCLD for USG) with child_handler.
7455 * commands.h: Declare child_handler function.
7457 * commands.c (execute_file_commands): Check the `command_state'
7458 member of FILE and return 0 if it is `cs_running' or
7459 `cs_deps_running' and return the stored status if it is `cs_finished'.
7461 * file.h (struct file): Added `command_state' member.
7463 * commands.c (execute_command_line): Add `$' to the list of
7464 characters special to the shell.
7466 Wed Sep 21 15:57:41 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7468 * read.c (read_all_makefiles): Call convert_to_pattern before
7469 recomputing the limits after adding the displaced rules.
7471 * make.c (main): Move calls to snap_deps, convert_to_pattern, and
7472 build_vpath_lists to read_all_makefiles.
7474 * read.c (read_all_makefiles): Install the default pattern rules
7475 before checking to remake the makefiles, displace these rules before
7476 reading in the makefiles, and then add the displaced rules to the
7477 chain after reading in all the makefiles.
7479 * make.c (main): Don't call install_default_pattern_rules or
7480 count_implicit_rule_limits.
7482 * make.h: Declare displace_pattern_rules and
7483 add_displaced_pattern_rules.
7485 * rule.c (displace_pattern_rules, add_displaced_pattern_rules): New
7486 functions to stow the chain and add the stowed chain on the end of
7489 * make.texinfo (Implicit: Search Algorithm): Fixed PREV reference.
7491 * make.c (main): Call construct_include_path right after decoding
7494 * read.c (find_makefile): Use rename_file.
7496 * file.h: Declare rename_file.
7498 * file.c (rename_file): New function to rename a `struct file' and
7499 put it in the correct hash bucket.
7501 * read.c (find_makefile): New function to find and update a makefile.
7502 (read_all_makefilese): Use find_makefile.
7503 (read_makefile): Don't do updating. Removed UPDATEIT arg.
7505 * remake.c (update_file_1): Took out setting the `updated' member to
7506 -1 rather than 1 sometimes.
7508 * make.c (main): Made it print version info before doing anything else.
7510 * remake.c (library_file_mtime, f_mtime): Removed use of last two
7511 arguments to vpath_search.
7513 * rule.c (pattern_search): Removed use of last two arguments
7516 * vpath.c (vpath_search, selective_vpath_search): Removed unused
7517 DIRPREFIX and DPLEN args.
7519 * read.c (read_makefile): Also turn off -n when updating makefiles.
7521 Tue Sep 20 17:01:10 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
7523 * Makefile: Put tags files in the tarfile.
7525 * read.c (read_makefile): Get the modtime of the makefile via a stat
7526 call so that a later file_mtime call won't do VPATH search for it.
7528 * read.c (read_makefile): Don't turn off -t and -q if the makefile
7529 was a command-line target.
7531 * make.c (main): Enter command-line targets as files and set their
7532 `cmd_target' members.
7534 * file.h (struct file): Added `cmd_target' member.
7536 * read.c (read_makefile): Temporarily turn off -t and -q while
7539 * make.c (main): Don't use arg 0 from other_args (which is now
7540 argv[0]; i.e., the program's name).
7542 * read.c (read_makefile): Only return nonzero if commands were
7543 actually run to remake the makefile.
7545 * remake.c (update_file_1): Set FILE->updated to -1 if no commands
7546 were actually run (because no update was done or -t was given).
7548 * make.c (decode_switches): Fixed bug wherein xrealloc was passed
7549 bad args if it tried to expand other_args->list.
7551 * read.c (read_all_makefiles): Made it not look at the `MAKE'
7552 variable, just use argv[0].
7554 Sun Sep 18 17:34:11 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
7556 * read.c (rerun_make): New function to re-exec make.
7558 * make.c (construct_makeflags, construct_argv): New functions to
7559 construct the `MAKEFLAGS' variable and to construct an arg list from
7562 * read.c (read_makefile): New arg UPDATEIT, if nonzero, says to
7563 update the makefile as a target before reading it in. When reading
7564 included makefiles, pass this as zero. Now returns nonzero if the
7565 makefile was updated, zero if not.
7566 (read_all_makefiles): Pass a nonzero UPDATEIT arg to read_makefile
7567 for all default and -f makefiles and all makefiles from the
7568 `MAKEFILES' variable. If any of the makefiles has changed, re-exec
7569 self to re-read them.
7571 * remake.c (update_file): Print a "File `foo' up to date'" message
7574 * commands.c (execute_file_commands): Allocate one byte for each of
7575 $^ and $< rather than zero if they are to be empty.
7577 Fri Sep 16 13:59:59 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7581 * make.c (command_switches): Fixed entry for `-o' switch.
7583 * make.texinfo: Renamed -c switch to -C.
7585 * make.c: Renamed -c switch to -C.
7587 * Miscellaneous de-linting.
7589 * read.c (record_files): Made it not free the storage for the name
7590 if it started with `./' and was therefore not quite the same as in
7593 * read.c (record_files): If commands were specified twice, the error
7594 message specifies in what files and at what line numbers.
7596 * make.c (main): If any of the signals we usually fatal on were
7597 ignored by the parent (probably a shell), ignore them.
7599 * make.c (main): Print version info for -v, -p, or -d.
7600 (print_data_base): Don't print version info. It will be done in main.
7602 * variable.c: Increased number of hash buckets to 257.
7604 * file.c: Increased number of hash buckets to 1007.
7606 * rule.c (count_implicit_rule_limits): Moved comptation of
7607 `maxsuffix' to convert_to_pattern, since that function uses
7608 `maxsuffix', and must be called before count_implicit_rule_limits.
7610 * rule.c (pattern_search): If an existent (non-intermediate)
7611 dependendency was found via a terminal rule, set its
7612 `tried_implicit' flag, so it will never have implicit rule search done.
7614 * glob.c: Bug fix to avoid alloca(0).
7616 * arscan.c: USG and Sun386i fixes.
7618 Thu Sep 15 19:40:26 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7620 * make.texinfo: Fixed some typos and spelling errors.
7622 Wed Sep 7 14:20:39 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7624 * make.c (decode_switches): Fixed bug wherein a bad option would
7625 give a useless error message and loop forever.
7627 Tue Sep 6 14:36:02 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7629 * make.texinfo: Documented `shell' function.
7631 * variable.c (expand_function): New function `shell', does
7632 backquote-style command expansion of its arg.
7634 * commands.c (execute_command_line): Second arg OUTBUF, if not nil,
7635 gets filled in with a malloc'd buffer containing the piped stdout of
7637 (execute_file_commands): Use above (pass nil).
7639 Mon Sep 5 17:03:49 1988 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
7641 * Makefile: Added copyright notice.
7642 Added a comment about defining `NO_MINUS_C_MINUS_O' if necessary.
7646 * rule.c (default_suffix_rules): Don't pass `-o' switches with `-c'
7647 switches if `NO_MINUS_C_MINUS_O' is #define'd.
7649 * make.texinfo: Documented `GNUmakefile'.
7651 * read.c (read_all_makefiles): Made it try default makefile
7652 `GNUmakefile' before others.
7654 * make.texinfo: Added new-style Texinfo header thingies.
7656 Sat Sep 3 18:09:39 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
7660 * make.texinfo (Chained Rules): Added a @cindex about using
7661 .PRECIOUS to preserve intermediate files.
7663 * remake.c (update_file_1): Made it not just return before executing
7666 * rule.c (default_pattern_rules, default_variables): Made it use
7667 `$(AR)' for `ar r' (to put files in archives).
7669 * vpath.c (build_vpath_lists): Made it recursively expand the
7670 `VPATH' variable (by using variable_expand instead of lookup_variable).
7672 * read.c (conditional_line): Made it not swallow whitespace after
7673 the comma in an `ifeq' using the `(a,b)' syntax.
7675 * rule.c (count_implicit_rule_limits): Made it not crash if a
7676 pattern rule dep begins with `/'.
7678 Sun Aug 28 15:51:12 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
7680 * make.texinfo: Clarified that the arg to the `origin' function is a
7681 variable *name*, not a reference.
7683 * make.texinfo: Clarified that both -Idir and -I dir are allowed.
7685 Sat Aug 27 13:49:28 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7687 * remake.c (remake_file): Made touching phonies work right.
7689 Wed Aug 24 20:40:48 1988 Roland McGrath (mcgrath at nutmeg.Berkeley.EDU)
7691 * make.texinfo: Removed reference to `RANLIB' variable.
7695 * variables.c (expand_function): Added `origin' function.
7696 * make.texinfo: Documented same.
7698 * read.c (record_files): Made double-colon entries work.
7700 Sat Aug 20 21:09:39 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7702 * make.c (collapse_continuations): Bug fix from RMS.
7704 * rule.c (install_default_pattern_rules): Made it set the
7705 `in_use' flag of the created rules to zero, rather than letting
7706 it be random garbage.
7708 * rule.c (pattern_search): Fixed putting `also make' targets into
7711 * read.c (record_files): Fixed bug which made double-colon entries
7712 make it read off into space.
7714 * make.c (decode_switches): Made it understand `ignored' switches
7715 rather than dumping core.
7717 Sun Aug 14 16:49:00 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7719 * read.c (read_makefile): Made `include' filenames be
7722 * read.c (read_makefile): Fixed an error message.
7724 * read.c (read_makefile): Made it accept ^L's as whitespace.
7725 * make.c (next_token, end_of_token): Ditto.
7727 * vpath.c (vpath_search): Fixed it so that the general VPATH (from
7728 the variable) is always checked, even if a selective VPATH (from a
7729 directive) matched the filename.
7731 Sat Aug 13 14:20:46 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7733 * make.c (decode_switches, main): Made the command switches be
7734 processed from a table of switches, variables, and types. No
7735 functions are passed argc and argv any more. They are passed arrays
7736 of strings they need to process.
7737 * read.c (read_all_makefiles): Made it take an array rather than
7739 (construct_include_path): Ditto.
7741 * make.c (collapse_continuations): Made it work right (I hope).
7743 * make.texinfo: Minor editorial changes.
7745 * read.c (read_makefile): Minor speed improvement by freeing and
7746 then mallocing something rather than reallocing it to avoid the
7749 Thu Aug 11 00:10:43 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7751 * make.texinfo: Fixed some unquoted @'s.
7753 * make.texinfo: Documented multiple-target pattern rules.
7754 Miscellaneous minor editorial changes and corrections.
7756 * make.texinfo (Implicit: Catalogue of Rules): Removed the list of
7757 variables. That's what the next section is for.
7758 (Implicit: Implicit Variables): Made it agree with reality.
7760 Wed Aug 10 00:55:39 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7762 * variable.c (print_variable_data_base): Fixed bug which made -p
7763 dump core. (This was a really idiotic bug.)
7765 * rule.c (pattern_search): Fixed a bug which made it make the
7766 `also_make' member of the file in question nil if the first of
7767 the successful rule's targets was the matching one.
7768 Made it use only as much storage as necessary in the `also_make'
7770 (create_pattern): Made it use only as much storage as necessary in
7771 the `lens' and `suffixes' members of the created rule.
7773 * remake.c (library_file_mtime): Made it `static'.
7775 * file.c: Added a declaration for `errno', which is declared in some
7776 <errno.h>'s, but not all.
7778 * file.h (struct file): Added `also_make' member for multiple-target
7780 * rule.c (pattern_search): Made it put the names of files updated by
7781 the given file's commands in its `also_make' member.
7782 * remake.c (update_file_1): Made it mark the files in a file's
7783 `also_make' member as updated when the file is updated.
7785 * variable.c (try_variable_definition): Fixed a bug which made it
7786 define a variable with the name of the whole definition when there
7787 was no space before the = or :=.
7789 * make.texinfo (Features): Made the changes which were made in RCS
7790 revision 2.7 but somehow lost since then. Added -W.
7792 Tue Aug 9 10:04:50 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7794 * variable.h: Added `o_default' to `enum variable_origin'.
7795 * variable.c (print_variable_data_base): Made it print the origins of
7797 * rule.c (install_default_pattern_rules): Made it define the default
7798 variables with origin `o_default'.
7800 * make.texinfo: Documented -W.
7802 * make.c (decode_switches, main): Added the -W flag to give files a
7803 time-stamp of now, for a `what if' effect when used with -n.
7805 * commands.c (print_commands): Made it say `(built-in)' for commands
7806 that are built into the default ruleset.
7808 * read.c (record_file): Made .SUFFIXES get its deps frontwards (again).
7809 * rule.c (set_default_suffixes, convert_to_pattern): Made it read
7810 .SUFFIXES's deps frontwards, so the converted rules will not be in
7813 * rule.c (new_pattern_rule): Fixed a bug wherein it would keep
7814 searching after it had removed a matching rule and ended up diddling
7817 * rule.c (freerule): Made it take the given rule off the chain.
7818 (new_pattern_rule, count_implicit_rule_limits): Use freerule to
7819 remove rules from the chain.
7821 * vpath.c (construct_vpath_list): Made it return after cleaning out
7822 all previous searchpaths when given a nil DIRPATH arg, so it won't
7823 go into the construction code and dump core dereferencing a nil
7826 * variable.c (patsubst_expand): Fixed a bug which made it not match
7827 correctly and sometimes dump core.
7829 Mon Aug 8 16:35:48 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7831 * rule.c (default_suffix_rules): Made the .texinfo.dvi rule remove
7832 the files used in the comparison to determine whether or not a
7833 second TeX run is necessary.
7835 * make.texinfo: Fixed some overfull TeX hboxes.
7837 * make.texinfo (Implicit: Catalogue of Rules): Fixed a Texinfo error.
7839 * rule.c (create_pattern_rule): Fixed bug wherein index was not
7840 being passed its second arg.
7842 * read.c (getline): Merged back into readline.
7844 * rule.c (default_suffixes, default_suffix_rules,
7845 default_variables): Added .texinfo.info rule.
7846 * make.texinfo (Implicit: Catalogue of Rules): Documented
7847 .texinfo.dvi and .texinfo.info rules.
7849 * make.texinfo (Top): Changed `last updated' date to be correct (for
7850 the last time it was updated, not today). Changed `for version
7851 3.00' since it's not going to be called that.
7853 Sat Aug 6 19:51:10 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7855 * commands.c (print_commands): Added this function to print the
7856 contents of a `struct commands' for -p.
7857 * rule.c (print_rule_data_base): Use above.
7858 * file.c (print_file_data_base): Ditto.
7860 * rule.c (count_implicit_rule_limits, new_pattern_rule,
7861 install_pattern_rule, print_rule_data_base): Made it understand the
7862 changed `struct rule' and act accordingly.
7863 (freerule): Added this function to free all the storage used by a rule.
7865 * rule.c (pattern_search): Made it grok multiple targets of pattern
7866 rules. The matching is done properly, but at present, only the
7867 matching pattern's target is used to give deps and commands.
7869 Fri Aug 5 18:00:29 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7871 * rule.c (struct rule): Changed name, namelen, and patsuffix members
7872 to targets, lens, and suffixes, which are arrays, for multiple targets.
7873 (create_pattern_rule): Now takes first arg TARGETS, a nil-terminated
7874 array of targets, rather than a single target and patsuffix pointer.
7876 * read.c (record_files): If it finds an implicit pattern rule, it
7877 collects all the targets into an array and passes the whole thing to
7878 create_pattern_rule. If there are non-pattern targets, it is a
7881 Tue Aug 2 15:06:38 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7883 * make.c (readline): Split backslash-newline checking from reading
7884 and buffer-expanding.
7885 (getline): Created to do the reading and buffer-expanding formerly
7888 * rule.c (pattern_search): Made it reject nonterminal match-anything
7889 rules when a specific rule has matched, rather than rejecting
7890 terminal match-anything rules in this case.
7892 * rule.c (convert_to_pattern): Fixed a bug caused when the change to
7893 make it only recognize two-suffix rules whose target suffixes
7894 precede their dependency suffixes which made it work in the opposite
7895 direction (even worse than it started out).
7897 * rule.c (pattern_search): Made it reject nonterminal match-anything
7898 rules as intermediate targets when searching for both real and
7899 intermediate dependencies, rather than only when searching for
7902 Sun Jul 31 00:33:56 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7904 * rule.c (convert_to_pattern): Made it only recognize two-suffix
7905 rules whose target suffix comes before the dependency suffix in the
7908 * variable.c (define_automatic_variables): Made all automatic
7909 variables be defined with origin `o_automatic'.
7911 * variable.h: Added `o_automatic' to `enum variable_origin'
7913 * file.c (remove_intermediates): Made it not print an error message
7914 if the error was that the file does not exist.
7916 * rule.c: Removed `recursive' member from `struct rule'.
7918 * remake.c (library_file_mtime): Made it not use the directory hash
7919 functions, as reading in and hashing /usr/lib and /lib is slow and
7920 most likely unnecessary.
7922 * remake.c (remake_file): Changed message from ``No specification
7923 for making'' to ``No way to make'' so it will be short enough that
7924 most filenames will fit on a line.
7925 Made it look at the `recursive' member of the `struct commands',
7926 rather than of the `struct file' (which no longer has one).
7928 * commands.c (execute_file_commands): Made it look at the
7929 `recursive' member of the `struct commands', rather than of the
7930 `struct file' (which no longer has one).
7932 * file.h: Removed `recursive' member from `struct file'.
7934 * commands.h: Added `recursive' member to `struct commands'.
7936 * dep.h: Removed unused `quotedparen' member from `struct nameseq'
7939 * read.c (dequote): Removed this function.
7940 (multi_glob): Removed reference to `quotedparen' member of
7941 a `struct nameseq' and calls to dequote.
7943 * read.c (record_files): Made it set the stem for $* for all static
7944 pattern rules, not just those with commands given at that time.
7945 Removed check for recursive commands.
7946 Made it check for pairs of .SUFFIXES dependencies to reject as
7947 default goals as well as single ones (that don't start with dots).
7948 (read_makefile): Added checks for recursive commands to set
7949 the `recursive' flag in the `struct commands'.
7951 Sat Jul 30 15:47:23 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7953 * make.c (find_next_token): Made the LENGTHPTR arg optionally nil.
7955 * make.c: Removed `files_made' variable which is defined static in
7956 remake.c and used only there.
7957 (main): Cleaned up somewhat.
7958 (decode_switches): Cleaned up a bit. Made an unknown option be a
7960 (decode_env_switches): Made LEN arg unsigned. Cleaned up.
7961 (print_version): Made it say ``see the source'' rather than ``see
7962 the source file'', since there is more than one.
7964 * file.h: Made `num_intermediates' declared unsigned.
7966 * file.c: Made `num_intermediates' variable unsigned.
7967 (remove_intermediates): Removed unused FORMAT arg.
7968 (enter_file): Made it handle double-colon files properly, adding the
7969 new entry as the old entry's prev pointer.
7971 * dir.c: Re-indented the `struct dir' definition to be right.
7972 (dir_load): Cleaned up slighty.
7973 (file_exists_p): Removed comment saying we could use `access', since
7974 that is a bad idea (except for setuid programs). Cleaned up slightly.
7976 * commands.c: Changed some comments slightly.
7977 (execute_file_commands): Cleaned up a bit. Changed some comments,
7978 added others. Moved freeing of storage for $^ and $? to the same
7979 place as for the other automatic variables.
7980 (execute_command_line): Made `#' trigger a shell.
7981 Added some comments. Cleaned up a bit. Put all the special chars
7982 that trigger shells into an array easily changeable at the top.
7984 * ar.c: Added comments explaining each function.
7985 (ar_scan_1): Merged into ar_member_date.
7986 (ar_member_date): Changed call to ar_scan_1 to the body of that
7988 (ar_member_date_1): Simplified to a ?: expression rather than an
7990 (ar_member_touch): Changed error handling around a bit.
7991 None of these errors are fatal now.
7993 * variable.c (subst_expand): Added a new arg BY_WORD, to do substs
7995 (patsubst_expand): Fixed bug which made calls whose patterns
7996 contained no `%' to not work correctly, by using above.
7997 (variable_expand): Pass extra arg to `subst_expand'.
7999 * variable.c (expand_function): Fixed bug which made `foreach' calls
8000 with one-word lists run off into never-never land.
8002 Fri Jul 29 20:12:36 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8004 * variable.c (expand_function): Made a very minor speed improvement
8005 by avoiding an unnecessary strlen call.
8007 Wed Jul 27 16:01:47 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8009 * rule.c (default_suffixes): Rearranged the list somewhat; added
8010 `.el' and `.elc' to speed things up (especially when building
8011 Emacs), for the same reason `.h' is there.
8013 * read.c (record_files): Changed `lineno' from `long' to
8016 Sun Jul 24 02:15:30 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8018 * variable.c (expand_function): Eliminated use of `wstok'
8019 because it is non-reentrant and unreliable.
8020 Fixed a minor bug which would cause something not to be freed.
8021 * make.c (wstok): Removed `wstok' because it is no longer used.
8023 * variable.c (expand_function): Made `foreach' function put
8024 spaces between output texts like it's supposed to.
8026 Sat Jul 23 17:32:55 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8028 * rule.c (default_suffixes, default_suffix_rules): Added rule
8029 to make %.dvi from %.texinfo.
8031 * dir.c (print_dir_data_base): Made it say a bit more.
8033 Fri Jul 22 23:13:16 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8035 * make.c (print_data_base): Split this function up into one
8037 * variable.c (print_variable_data_base): One of the above.
8038 * rule.c (print_rule_data_base): Ditto.
8039 * file.c (print_file_data_base): Ditto.
8040 * dir.c (print_dir_data_base): Ditto.
8042 * rule.c (install_pattern_rule): Fixed a bug which caused the
8043 terminal and recursive flags to always be zero for rules
8044 entered by this function.
8046 * make.texinfo (Rules: Double-colon): Added a paragraph
8047 explaining the purpose of double-colon rules.
8049 * make.texinfo (Implicit: Catalogue of Rules): Updated to
8050 reflect new C++, TeX, Web, and Texinfo rules. Other slight
8053 * commands.c (execute_file_commands): Fixed a bug wherein
8054 random memory could get written for files with no deps.
8056 Wed Jul 20 19:30:31 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8058 * read.c (readline): Fix bug wherein it would not recognize a
8059 backslash-newline if the buffer filled up and was enlarged
8060 right before reading the newline.
8062 Tue Jul 19 19:55:02 1988 Roland McGrath (mcgrath at chilli.Berkeley.EDU)
8064 * read.c: Added default suffix rules for .cc (using $(C++),
8065 which defaults to `g++', and $(C++FLAGS)), .tex, .dvi, .web
8066 and .cweb (using $(TEX), $(WEAVE), $(TANGLE), $(CWEAVE) and
8069 Sat Jul 16 21:24:28 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8071 * Made error formats use %u rather than %ld for line numbers,
8072 which are now unsigned int's rather than long's.
8074 * read.c (conditional_line): Fixed some bugs caused by use of
8075 unsigned int rather than int in one place.
8077 * read.c (conditional_line): Put the info about active
8078 conditionals in a struct.
8079 (read_makefile): Make a new struct of info about conditionals
8080 for included makefiles and restore the old one after the
8081 included makefile has been read.
8083 * read.c (read_makefile): Don't try to read a makefile with
8084 name "" after giving an error message because an `include'
8085 directive gave no filename.
8087 * read.c (read_makefile): Give an error message for
8088 non-whitespace text after the filename in an `include' directive.
8090 * make.c (error): Take five args, like `fatal'. It managed to
8091 lose with only two. Is there a better way to do this without vfprintf?
8093 * read.c (read_makefile): Commands consisting of only
8094 whitespace are not the same as no commands. I thought I'd
8095 fixed this bug months ago; it seems to have come back.
8097 * make.c (collapse_continuations): All whitespace around a
8098 backslash-newline combination is turned into a single space.
8100 * Added COPYING file and copyright notices to all files.
8102 * make.texinfo (Running: Goals): Fix a typo.
8104 * read.c (do_define): Take an arg for the origin of the
8105 variable being defined.
8106 (read_makefile): Grok `override define'.
8108 * make.texinfo (Variables: Override Directive, Defining):
8109 Document the `override define' combination directive.
8111 * ar.c (ar_member_date): Make a 0 return from `ar_scan' return
8112 (time_t) -1 (nonexistent file), rather than (time_t) 0, which,
8113 when put in the `struct file', makes `file_mtime' try to get
8114 the mtime over and over again.
8116 * variable.c (pattern_matches): Fix a bug that made patterns
8117 not beginning with `%' never match.
8119 Fri Jul 15 21:01:44 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8121 * Took Make out of RCS.
8123 * Split the monolithic `make.c' into several smaller files.