1 Fri Mar 24 00:32:32 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
3 * main.c (handle_non_switch_argument): New function, broken out of
5 (decode_switches): Set optind to 0 to reinitialize getopt, not to 1.
6 When getopt_long returns EOF, break the loop and handle remaining args
7 with a simple second loop.
9 * remake.c (remake_file): Set update_status to 2 instead of 1 for
10 no rule to make. Mention parent (dependent) in error message.
11 (update_file_1): Handle FILE->update_status == 2 in -d printout.
12 * job.c (start_job_command, reap_children): Set update_status to 2
13 instead of 1 for failed commands.
15 Tue Mar 21 16:23:38 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
17 * job.c (search_path): Function removed (was already #if 0'd out).
18 * configure.in: Remove AC_TYPE_GETGROUPS; nothing needs it any more.
20 Fri Mar 17 15:57:40 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
22 * configure.bat: Write @CPPFLAGS@ translation.
24 Mon Mar 13 00:45:59 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
26 * read.c (parse_file_seq): Rearranged `l(a b)' -> `l(a) l(b)' loop
27 to not skip the elt immediately preceding `l(...'.
29 Fri Mar 10 13:56:49 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
33 * read.c (find_char_unquote): Make second arg a string of stop
34 chars instead of a single stop char. Stop when any char in the
35 string is hit. All callers changed.
36 (find_semicolon): Pass stop chars "#;" to one find_char_unquote call,
37 instead of using two calls. If the match is not a ; but a #,
39 * misc.c: Changed find_char_unquote callers here too.
43 * read.c (read_makefile, parse_file_seq): Fix typo __MS_DOS__ ->
46 * GNUmakefile (globfiles): Add glob/configure.bat.
47 (distfiles): Add configh.dos, configure.bat.
49 Wed Mar 8 13:10:57 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
51 Fixes for MS-DOS from DJ Delorie.
52 * read.c (read_makefile, parse_file_seq) [__MS_DOS__]: Don't see :
53 as separator in "C:\...".
54 * configh.dos (STDC_HEADERS): Define only if undefined.
55 (HAVE_SYS_PARAM_H): Don't define this.
56 (HAVE_STRERROR): Define this.
57 * job.c (construct_command_argv_internal) [__MSDOS__]: Fix typos.
61 * main.c (decode_switches): Reset optind to 1 instead of 0.
63 Tue Mar 7 17:31:06 1995 Roland McGrath <roland@geech.gnu.ai.mit.edu>
65 * main.c (decode_switches): If non-option arg is "-", ignore it.
67 Mon Mar 6 23:57:38 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
71 Wed Feb 22 21:26:36 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
75 Tue Feb 21 22:10:43 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
77 * main.c (main): Pass missing arg to tmpnam.
79 * configure.in: Check for strsignal.
80 * job.c (child_error): Use strsignal.
81 * main.c (main): Don't call signame_init #ifdef HAVE_STRSIGNAL.
83 * misc.c (strerror): Fix swapped args in sprintf.
85 Mon Feb 13 11:50:08 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
87 * configure.in (CFLAGS, LDFLAGS): Don't set these variables.
89 Fri Feb 10 18:44:12 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
91 * main.c (print_version): Add 95 to copyright years.
95 * job.c (start_job_command): Remember to call notice_finished_file
96 under -n when not recursing. To do this, consolidate that code
97 under the empty command case and goto there for the -n case.
99 Tue Feb 7 13:36:03 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
101 * make.h [! STDC_HEADERS]: Don't declare qsort. Sun headers
104 Mon Feb 6 17:37:01 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
106 * read.c (read_makefile): For bogus line starting with tab, ignore
107 it if blank after removing comments.
109 * main.c: Cast results of `alloca' to `char *'.
110 * expand.c: Likewise.
112 Sun Feb 5 18:35:46 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
116 * configure.in: Check for mktemp.
117 * main.c (main) [! HAVE_MKTEMP]: Use tmpnam instead of mktemp.
119 * configure.in (make_cv_sysconf_open_max): New check for `sysconf
121 * acconfig.h: Added #undef HAVE_SYSCONF_OPEN_MAX.
122 * job.c [HAVE_SYSCONF_OPEN_MAX] (getdtablesize): Define as macro
125 Fri Jan 27 04:42:09 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
127 * remake.c (update_file_1): When !MUST_MAKE, don't set
128 FILE->update_status to zero before calling notice_finished_file.
129 (notice_finished_file): Touch only when FILE->update_status is zero.
130 (remake_file): Set FILE->update_status to zero after not calling
131 execute_file_command and deciding to touch instead.
133 Thu Jan 26 01:29:32 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
135 * main.c (debug_signal_handler): New function; toggles debug_flag.
136 (main): Handle SIGUSR1 with that.
138 Mon Jan 16 15:46:56 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
140 * compatMakefile (realclean): Remove Info files.
142 Sun Jan 15 08:23:09 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
146 * job.c (start_job_command): Save and restore environ around vfork
148 (search_path): Function #if 0'd out.
149 (exec_command): Use execvp instead of search_path.
151 * expand.c (variable_expand): Rewrote computed variable name and
152 substitution reference handling to be simpler. First expand the
153 entire text between the parens if it contains any $s, then examine
154 the result of that for subtitution references and do no further
155 expansion while parsing them.
157 * job.c (construct_command_argv_internal): Handle " quoting too,
158 when no backslash, $ or ` characters appear inside the quotes.
160 * configure.in (union wait check): If WEXITSTATUS and WTERMSIG are
161 defined, just use int.
163 Tue Jan 10 06:27:27 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
165 * default.c (default_variables) [__hpux]: Remove special
166 definition of ARFLAGS. Existence of the `f' flag is not
167 consistent across HPUX versions; and one might be using GNU ar
170 * compatMakefile (clean): Don't remove Info files.
172 * compatMakefile (check): Remove gratuitous target declaration.
174 Sat Jan 7 11:38:23 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
176 * compatMakefile (ETAGS, CTAGS): Don't use -t.
178 * arscan.c (ar_name_equal) [cray]: Subtract 1 like [__hpux].
180 * main.c (decode_switches): For --help, print usage to stdout.
182 Mon Dec 5 12:42:18 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
186 * remake.c (update_file_1): Do set_command_state (FILE,
187 cs_not_started) only if old state was deps_running.
189 Mon Nov 28 14:24:03 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
191 * job.c (start_waiting_job): Use set_command_state.
193 * build.template (CPPFLAGS): New variable.
194 (prefix, exec_prefix): Set from @...@.
195 (compilation loop): Pass $CPPFLAGS to compiler.
197 * GNUmakefile (build.sh.in): Make it executable.
199 * GNUmakefile (globfiles): Add configure.in, configure.
203 * configure.in (AC_OUTPUT): Don't write glob/Makefile.
205 * configure.in (AC_CHECK_SYMBOL): Use AC_DEFINE_UNQUOTED.
207 * configure.in: Don't check for ranlib.
209 Tue Nov 22 22:42:40 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
211 * remake.c (notice_finished_file): Only mark also_make's as
212 updated if really ran cmds.
214 Tue Nov 15 06:32:46 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
216 * configure.in: Put dnls before random whitespace.
218 Sun Nov 13 05:02:25 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
220 * compatMakefile (CPPFLAGS): New variable, set from @CPPFLAGS@.
221 (RANLIB): Variable removed.
222 (prefix, exec_prefix): Set these from @...@.
223 (.c.o): Use $(CPPFLAGS).
224 (glob/libglob.a): Don't pass down variables to sub-make.
225 glob/Makefile should be configured properly by configure.
226 (distclean): Remove config.log and config.cache (autoconf stuff).
228 Mon Nov 7 13:58:06 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
230 * acconfig.h: Add #undef HAVE_UNION_WAIT.
231 * configure.in: Converted to Autoconf v2.
232 * dir.c: Test HAVE_DIRENT_H, HAVE_SYS_DIR_H, HAVE_NDIR_H instead
233 of DIRENT, SYSDIR, NDIR.
234 * build.sh.in (prefix, exec_prefix): Set these from @...@.
235 (CPPFLAGS): New variable, set from @CPPFLAGS@.
236 (compiling loop): Pass $CPPFLAGS before $CFLAGS.
237 * install.sh: File renamed to install-sh.
239 * main.c (define_makeflags): When no flags, set WORDS to zero.
241 Sun Nov 6 18:34:01 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
245 * main.c (define_makeflags): Terminate properly when FLAGSTRING is
248 Fri Nov 4 16:02:51 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
252 Tue Nov 1 01:18:10 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
256 * job.c (start_job_command): When ARGV is nil, only set
257 update_state and call notice_finished_file if job_next_command
260 * job.c (start_job_command): Call notice_finished_file for empty
263 Thu Oct 27 02:02:45 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
265 * file.c (snap_deps): Set COMMANDS_SILENT for .SILENT, not
268 Wed Oct 26 02:14:10 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
272 Tue Oct 25 22:49:24 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
274 * file.c (snap_deps): Set command_flags bits in all :: entries.
276 Mon Oct 24 18:47:50 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
278 * make.h (posix_pedantic): Declare it.
279 * main.c (main): Move checks .IGNORE, .SILENT, .POSIX to
281 * file.c (snap_deps): Check .IGNORE, .SILENT, .POSIX here instead
282 of in main. If .IGNORE has deps, OR COMMANDS_NOERROR into their
283 command_flags and don't set -i. Likewise .SILENT.
284 * job.c (start_job_command): In FLAGS initialization, OR in
285 CHILD->file->command_flags.
286 * file.h (struct file): New member `command_flags'.
288 Sun Oct 16 01:01:51 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
290 * main.c (switches): Bump flag values for --no-print-directory and
291 --warn-undefined-variables, so neither is 1 (which indicates a
294 Sat Oct 15 23:39:48 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
296 * main.c (main): Add missing code in .IGNORE test.
298 Mon Oct 10 04:09:03 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
300 * variable.c (define_automatic_variables): Define +D and +F.
302 Sat Oct 1 04:07:48 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
304 * main.c (main): Define hidden automatic variable with command
305 vars, and MAKEOVERRIDES to a reference to that.
306 (define_makeflags): If posix_pedantic, write a reference to that
309 Thu Sep 29 00:14:26 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
311 * main.c (posix_pedantic): New variable.
312 (main): Set posix_pedantic if .POSIX is a target.
313 Fix .IGNORE and .SILENT checks to require is_target.
315 * commands.c (set_file_variables): Define new automatic variable
316 $+, like $^ but before calling uniquize_deps.
318 * job.c (reap_children): Call delete_child_targets for non-signal
319 error if .DELETE_ON_ERROR is a target.
321 Tue Sep 27 01:57:14 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
325 Mon Sep 26 18:16:55 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
327 * job.c (reap_children): Don't change C->file->command_state when
328 dying. Test it only after calling start_job_command for a new
329 command line. When no more cmds, just set C->file->update_status.
330 (start_job_command): When the last line is empty or under -n, set
331 C->file->update_status.
332 (start_waiting_job): Grok cs_not_started after start_job_command
334 (new_job): Set C->file->update_status when there are no cmds.
335 (job_next_command): When out of lines, don't set
336 CHILD->file->update_status or CHILD->file->command_state.
338 * main.c (quote_as_word): Renamed from shell_quote. Take new arg;
339 if nonzero, also double $s.
340 (main): Define MAKEOVERRIDES from command_variables here.
341 (define_makeflags): Don't use command_variables here; instead write a
342 reference $(MAKEOVERRIDES) in MAKEFLAGS. Make vars recursive.
344 * dir.c [__MSDOS__]: Fixed typo.
346 * vpath.c (selective_vpath_search): Reset EXISTS when stat fails.
348 Sat Sep 10 03:01:35 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
350 * remake.c: Include <assert.h> and use assert instead of printfs
353 * main.c (decode_switches): Loop until optind hits ARGC, not just
354 until getopt_long returns EOF. Initialize C to zero before loop;
355 in loop if C is EOF, set optarg from ARGV[optind++], else call
357 (decode_env_switches): Use variable_expand instead of
358 allocated_variable_expand. Allocate a fresh buffer to copy split
359 words into; scan characters by hand to break words and
361 (shell_quote): New function.
362 (define_makeflags): Allocate doubled space for switch args, and command
363 variable names and values; use shell_quote to quote those things.
365 Fri Sep 9 01:37:47 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
369 * acconfig.h: Add HAVE_SYS_SIGLIST and HAVE__SYS_SIGLIST.
371 * main.c (decode_switches): The non-option return from getopt is
373 (command_variables): New type and variable.
374 (decode_switches, decode_env_switches): After making a variable
375 definition, record the struct variable pointer in the
376 command_variables chain.
377 (define_makeflags): If ALL, write variable definitions for
380 * main.c (other_args): Variable removed.
381 (goals, lastgoal): New static variables (moved from auto in main).
382 (main): Don't process OTHER_ARGS at all.
383 Don't set variable MAKEOVERRIDES at all; define MAKE to just
385 (init_switches): Prepend a - {return in order} instead of a +
387 (decode_switches): Don't set OTHER_ARGS at all.
388 Grok '\0' return from getopt_long as non-option argument; try
389 variable definition and (if !ENV) enter goal targets here.
390 (decode_env_switches): Use allocated_variable_expand to store value.
391 Use find_next_token to simplify word-splitting loop. Don't
392 prepend a dash to uninterpreted value. Instead, if split into
393 only one word, try variable definition and failing that prepend a
394 dash to the word and pass it to decode_switches as a single arg.
396 Wed Sep 7 03:02:46 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
398 * remake.c (notice_finished_file): Only recheck modtimes if
399 FILE->command_state was cs_running on entry (meaning the commands
401 (update_file_1): Whenever we set FILE->update_status, call
402 notice_finished_file instead of just set_command_state.
403 * job.c (start_job_command): Whenever we set
404 CHILD->file->update_status, call notice_finished_file instead of
405 just set_command_state.
407 Tue Sep 6 19:13:54 1994 Roland McGrath <roland@geech.gnu.ai.mit.edu>
409 * default.c: Add missing ".
411 * job.c: Changed all assignments of command_state members to calls
412 to set_command_state.
413 * remake.c: Likewise.
414 * file.c (set_command_state): New function.
415 * file.h: Declare set_command_state.
417 * main.c (init_switches): Put a + first in options.
419 Mon Jul 25 18:07:46 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
421 Merge MSDOS/GO32 port from DJ Delorie <dj@ctron.com>.
422 * vpath.c: Changed all uses of ':' to PATH_SEPARATOR_CHAR.
423 * main.c (directory_before_chdir): New variable, moved out of main
425 (main) [__MSDOS__]: Look for \ or : to delimit last component of
426 PROGRAM. Don't frob ARGV[0] before setting MAKE_COMMAND variable.
427 (die): Change back to `directory_before_chdir' before dying.
428 * make.h (PATH_SEPARATOR_CHAR): New macro; differing defns for
430 * job.c [__MSDOS__]: Include <process.h>.
431 [__MSDOS__] (dos_pid, dos_status, dos_bname, dos_bename,
432 dos_batch_file): New variables.
433 (reap_children) [__MSDOS__]: Don't call wait; just examine those vars.
434 (unblock_sigs) [__MSDOS__]: Do nothing.
435 (start_job_command) [__MSDOS__]: Use spawnvpe instead of vfork & exec.
436 (load_too_high) [__MSDOS__]: Always return true.
437 (search_path) [__MSDOS__]: Check for : or / in FILE to punt.
438 Use PATH_SEPARATOR_CHAR instead of ':'.
439 (construct_command_argv_internal) [__MSDOS__]: Wholly different
440 values for sh_chars and sh_cmds. Wholly new code to handle shell
442 * function.c (expand_function: `shell') [__MSDOS__]: Wholly new
444 * dir.c [__MSDOS__] (dosify): New function.
445 (dir_contents_file_exists_p) [__MSDOS__]: Call it on FILENAME and
446 process the result instead of FILENAME itself.
447 (file_impossible_p) [__MSDOS__]: Likewise.
448 * default.c [__MSDOS__]: Define GCC_IS_NATIVE.
449 (default_suffix_rules) [__MSDOS__]: Use `y_tab.c' instead of `y.tab.c'.
450 (default_variables) [GCC_IS_NATIVE]: Set CC and CXX to `gcc', YACC to
451 `bison -y', and LEX to `flex'.
452 * configure.bat, configh.dos: New files.
453 * commands.c (fatal_error_signal) [__MSDOS__]: Just remove
454 intermediates and exit.
456 * commands.c (set_file_variables): Add parens in length
457 computation in .SUFFIXES dep loop to quiet compiler warning. From
460 * read.c (read_makefile): Free FILENAME if we allocated it. From
463 Mon Jul 4 17:47:08 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
465 * misc.c (safe_stat): New function, EINTR-safe wrapper around stat.
466 * vpath.c (selective_vpath_search): Use safe_stat in place of stat.
467 * read.c (construct_include_path): Use safe_stat in place of stat.
468 * job.c (search_path): Use safe_stat in place of stat.
469 * dir.c (find_directory): Use safe_stat in place of stat.
470 * commands.c (delete_target): Use safe_stat in place of stat.
471 * arscan.c (ar_member_touch) [EINTR]: Do EINTR looping around fstat.
472 * remake.c (name_mtime): Use safe_stat in place of stat.
473 (touch_file) [EINTR]: Do EINTR looping around fstat.
475 Fri Jun 24 05:40:24 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
477 * read.c (read_makefile): Check for a shell command first, and
478 then strip leading tabs before further checking if it's not a
481 * make.h [__arm]: Undefine POSIX.
482 [!__GNU_LIBRARY__ && !POSIX && !_POSIX_VERSION]: Don't declare system
483 functions that return int.
485 * job.c (construct_command_argv_internal): After swallowing a
486 backslash-newline combination, if INSTRING is set goto string_char
487 (new label) for normal INSTRING handling code.
489 Sat Jun 4 01:11:20 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
491 * configure.in: Don't check for sys_siglist and _sys_siglist with
492 AC_HAVE_FUNCS. Instead use two AC_COMPILE_CHECKs.
494 Mon May 23 18:20:38 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
496 * Version 3.71.1 released.
498 * make.h [!__GNU_LIBRARY__ && !POSIX]: Also test #ifndef
499 _POSIX_VERSION for these declarations.
501 * misc.c [GETLOADAVG_PRIVILEGED] [POSIX]: Remove bogus #ifndefs
502 around #undefs of HAVE_SETREUID and HAVE_SETREGID.
504 Sat May 21 16:26:38 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
506 * Version 3.71 released.
508 * misc.c [GETLOADAVG_PRIVILEGED] [POSIX]: Don't test [HAVE_SETUID]
509 and [HAVE_SETGID]. Every system has those, and configure doesn't
512 * make.h [_POSIX_VERSION]: Don't #define POSIX #ifdef ultrix.
514 * compatMakefile (loadavg): Depend on and use loadavg.c instead of
516 (loadavg.c): Link or copy it from getloadavg.c.
517 (distclean): Remove loadavg.c.
519 Mon May 16 22:59:04 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
523 * misc.c [GETLOADAVG_PRIVILEGED] [! POSIX]: Undefine HAVE_SETEUID
526 * default.c (default_terminal_rules): In SCCS rules, put
527 $(SCCS_OUTPUT_OPTION) before $<. On some systems -G is grokked
528 only before the file name.
529 * configure.in (SCCS_GET_MINUS_G check): Put -G flag before file name.
531 Tue May 10 16:27:38 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
533 * job.c (construct_command_argv_internal): Swallow
534 backslash-newline combinations inside '' strings too.
536 Thu May 5 04:15:10 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
538 * read.c (do_define): Call collapse_continuations on each line
541 Mon Apr 25 19:32:02 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
543 * job.c (construct_command_argv_internal): Notice newline inside
544 '' string when RESTP is non-null.
546 Fri Apr 22 17:33:30 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
550 * remake.c (update_goal_chain): Reset FILE to G->file after the
551 double-colon loop so it is never null for following code.
553 * read.c (read_makefile): Fix `override define' parsing to skip
554 whitespace after `define' properly.
556 * compatMakefile (srcdir): Define as @srcdir@; don't reference
558 (glob/Makefile): New target.
560 Thu Apr 21 16:16:55 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
564 * misc.c (remove_comments): Use find_char_unquote.
565 * make.h (find_char_unquote): Declare it.
566 * read.c (find_char_unquote): New function, generalized from
568 (find_percent, find_semicolon, parse_file_seq): Use that.
570 Wed Apr 20 18:42:39 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
572 * implicit.c (pattern_search): Always allocate new storage for
573 FILE->stem. It is not safe to store STEM's address because it
574 might be auto storage.
576 * configure.in: Check for seteuid and setegid.
577 * misc.c [HAVE_SETEUID]: Declare seteuid.
578 [HAVE_SETEGID]: Declare setegid.
579 (make_access, user_access) [HAVE_SETEUID]: Use seteuid.
580 [HAVE_SETEGID]: Use setegid.
582 * remake.c (update_goal_chain): Set STATUS to FILE->update_status,
583 to preserve whether it's 2 for error or 1 for -q trigger. When
584 STATUS gets nonzero and -q is set, always stop immediately.
585 * main.c (main, decode_switches): Die with 2 for errors.
586 (main): Accept 2 return from update_goal_chain and die with that.
587 * misc.c (fatal, makefile_fatal): Die with 2; 1 is reserved for -q
589 * job.c (reap_children): Die with 2 for error.
590 (start_job_command): Set update_status to 2 for error. Set it to
591 1 when we would run a command and question_flag is set.
593 * read.c (read_makefile): Don't mark makefiles as precious. Just
594 like other targets, they can be left inconsistent and in need of
595 remaking by aborted commands.
597 * read.c (read_makefile): Write no error msg for -include file.
599 Tue Apr 5 05:22:19 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
601 * commands.c (fatal_error_signal): Don't unblock signals.
603 * file.h (struct file): Change member `double_colon' from flag to
605 * read.c (record_files): Set double_colon pointer instead of flag.
606 * main.c (main): When disqualifying makefiles for updating, use
607 double_colon pointer to find all entries for a file.
608 * file.c (enter_file): If there is already a double-colon entry
609 for the file, set NEW->double_colon to that pointer.
610 (file_hash_enter): Use FILE->double_colon to find all entries to
612 * remake.c (update_goal_chain): Do inner loop on double-colon entries.
613 (update_file): Use FILE->double_colon pointer to find all entries.
615 (notice_finished_file): Propagate mtime change to all entries.
617 * variable.c (try_variable_definition): Return after abort.
619 Fri Apr 1 18:44:15 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
621 * read.c (read_makefile): Remove unused variable.
622 (parse_file_seq): When removing an elt that is just `)', properly
623 fix up the previous elt's next pointer.
625 Mon Mar 28 18:31:49 1994 Roland McGrath (roland@mole.gnu.ai.mit.edu)
627 * configure.in: Do AC_SET_MAKE.
628 * GNUmakefile (Makefile.in): Edit MAKE assignment into @SET_MAKE@.
630 Fri Mar 4 00:02:32 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
632 * function.c (subst_expand): If BY_WORD or SUFFIX_ONLY is set and
633 the search string is the empty string, find a match at the end of
634 each word (using end_of_token in place of sindex).
636 * misc.c (end_of_token): Don't treat backslashes specially; you
637 can no longer escape blanks with backslashes in export, unexport,
638 and vpath. This was never documented anyway.
640 Thu Mar 3 23:53:46 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
642 * read.c (read_makefile): Variable name for `define' is not just
643 first token; use whole rest of line and strip trailing blanks.
645 Wed Feb 16 16:03:45 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
649 * read.c (read_makefile): Add -d msg stating args.
651 * read.c (read_makefile): Use isspace to skip over leading
652 whitespace, and explicitly avoid skipping over tabs. Don't want
653 to skip just spaces though; formfeeds et al should be skipped.
655 * default.c (default_variables) [__hpux]: Add f in ARFLAGS.
657 * arscan.c (ar_name_equal) [__hpux]: Subtract 2 instead of 1 from
658 sizeof ar_name for max length to compare.
660 * misc.c [GETLOADAVG_PRIVILEGED] [POSIX]: Undefine HAVE_SETREUID
661 #ifdef HAVE_SETUID; likewise HAVE_SETREGID and HAVE_SETGID.
663 * main.c (main): Call user_access after setting `program', in case
664 it needs to use it in an error message.
666 * read.c (read_makefile): Ignore an empty line starting with a tab.
668 Thu Feb 10 21:45:31 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
670 * configure.in (AC_SYS_SIGLIST_DECLARED): Use this instead of
671 AC_COMPILE_CHECK that is now its contents.
673 Fri Feb 4 16:28:54 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
675 * make.h: #undef strerror after #include <string.h>.
676 [! ANSI_STRING]: Declare strerror.
678 Thu Feb 3 02:21:22 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
680 * misc.c (strerror): #undef any macro before function definition.
682 Mon Jan 31 19:07:23 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
684 * variable.c (try_variable_definition): Calculate BEG before loop
685 to strip blanks by decrementing END. Don't decr END to before BEG.
687 * read.c (read_makefile): Skip over leading space characters, but
688 not tabs, after removing continuations and comments (it used to
691 Tue Jan 25 16:45:05 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
693 * variable.c (define_automatic_variables): In $(@D) et al, use
694 patsubst to remove trailing slash.
696 * commands.c (delete_target): New function, broken out of
697 delete_child_targets. Check for archive members and give special msg.
698 (delete_child_targets): Use delete_target.
700 Mon Jan 17 17:03:22 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
702 * default.c (default_suffix_rules): Use $(TEXI2DVI_FLAGS) in
703 texi2dvi rules. Use $(MAKEINFO_FLAGS) in makeinfo rules.
705 Tue Jan 11 19:29:55 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
707 * GNUmakefile (tarfiles): Omit make-doc.
708 (make-$(version).tar): Include make.info*.
710 Fri Jan 7 16:27:00 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
712 * compatMakefile (configure, config.h.in): Comment out rules.
714 Thu Jan 6 18:08:08 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
716 * compatMakefile (binprefix, manprefix): New variables.
717 (instname): Variable removed.
718 (install): Use $({bin,man}prefix)make in place of $(instname).
719 File targets likewised renamed.
721 Mon Jan 3 17:50:25 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
723 * Version 3.70 released.
725 Thu Dec 23 14:46:54 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
729 * read.c (parse_file_seq): Inside multi-word archive ref
730 translation loop, check NEW1==0 at end and break out of the loop.
732 * GNUmakefile (make-$(version).tar): Distribute install.sh.
733 * install.sh: New file.
735 * configure.in (SCCS_GET_MINUS_G check): Put redirection for admin
736 cmds outside subshell parens, to avoid "command not found" msgs
739 Wed Dec 22 17:00:43 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
741 * configure.in (SCCS_GET_MINUS_G check): Put -G flag last in get cmd.
742 Redirect output & error from get to /dev/null.
743 Fix reversed sense of test.
745 Fri Dec 17 15:31:36 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
747 * configure.in (SCCS_GET_MINUS_G check): Use parens instead of
748 braces inside if condition command; some shells lose.
750 Thu Dec 16 15:10:23 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
754 * arscan.c [M_UNIX]: Move #undef M_XENIX for PORTAR stuff.
755 (PORTAR) [M_XENIX]: Define to 0 instead of 1.
757 * main.c (define_makeflags): Only export MAKEFLAGS if !ALL.
759 Wed Dec 15 17:47:48 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
761 * main.c (main): Cast result of pointer arith to unsigned int
762 before passing to define_variable for envars. Matters when
763 sizeof(unsigned)!=sizeof(ptrdiff_t).
765 Tue Dec 14 14:21:16 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
767 * configure.in: Add new check for SCCS_GET_MINUS_G.
768 * config.h.in: Add #undef SCCS_GET_MINUS_G.
769 * default.c (default_terminal_rules): Use `$(SCCS_OUTPUT_OPTION)' in
770 place of `-G $@' in SCCS commands.
771 (default_variables) [SCCS_GET_MINUS_G]: Define SCCS_OUTPUT_OPTION
774 * configure.in (AC_OUTPUT): Put touch stamp-config in second arg
775 (so it goes in config.status), rather than afterward.
777 * ar.c (ar_member_date): Don't call enter_file on the archive file
778 if it doesn't exist (by file_exists_p).
780 * compatMakefile ($(infodir)/make.info): Replace `$$d/foo.info'
781 with `$$dir/make.info' in install-info invocation (oops).
783 * vpath.c (construct_vpath_list): Only set LASTPATH set PATH when
784 we do not unlink and free PATH.
786 * file.c (print_file_data_base): Fix inverted calculation for
787 average files per hash bucket.
789 * read.c (readline): When we see a NUL, give only a warning and
790 synthesize a newline to terminate the building line (used to
791 fatal). Move fgets call into the loop condition, and after the
792 loop test ferror (used to test !feof in the loop).
794 Fri Dec 3 16:40:31 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
796 * configure.in: Check for strerror in AC_HAVE_FUNCS.
798 Thu Dec 2 15:37:50 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
800 Differentiate different flavors of missing makefile error msgs,
801 removing gratuitous `fopen: ' and giving caller for included makefiles.
802 * misc.c [! HAVE_STRERROR]: Define our own strerror here.
803 (perror_with_name, pfatal_with_name): Use strerror instead of
804 replicating its functionality.
805 * read.c (read_makefile): Return int instead of void.
806 (read_all_makefiles, read_makefile): Change callers to notice zero
807 return and give error msg.
809 Thu Nov 11 11:47:36 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
813 * default.c: Put `-G $@' before $< in SCCS cmds.
815 Wed Nov 10 06:06:14 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
817 * read.c (read_makefile): After trying a variable defn, notice if
818 the line begins with a tab, and diagnose an error.
820 Sun Nov 7 08:07:37 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
824 Wed Nov 3 06:54:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
828 * implicit.c (try_implicit_rule): Look for a normal rule before an
831 Fri Oct 29 16:45:28 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
833 * function.c (expand_function: `sort'): Double NWORDS when it
834 overflows, instead of adding five.
836 * compatMakefile (clean): Remove loadavg.
838 Wed Oct 27 17:58:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
842 * file.h (NEW_MTIME): Define new macro.
843 * main.c (main): Set time of NEW_FILES to NEW_MTIME, not to
844 current time returned from system. Removed variable NOW.
845 * remake.c (notice_finished_file): Use NEW_MTIME in place of
846 current time here too.
848 Tue Oct 26 19:45:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
852 * remake.c (update_file_1): Don't clear MUST_MAKE when FILE has no
853 cmds and !DEPS_CHANGED unless also !NOEXIST.
855 Mon Oct 25 15:25:21 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
857 * read.c (parse_file_seq): When converting multi-word archive
858 refs, ignore a word beginning with a '('.
860 Fri Oct 22 02:53:38 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
862 * configure.in: Check for sys/timeb.h.
863 * make.h [HAVE_SYS_TIMEB_H]: Test this before including it.
865 Thu Oct 21 16:48:17 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
869 * rule.c (convert_suffix_rule): New local TARGPERCENT. Set it to
870 TARGNAME+1 for "(%.o)", to TARGNAME for "%.?". Use it in place of
871 TARGNAME to initialize PERCENTS[0].
873 Mon Oct 18 06:49:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
875 * configure.in: Use AC_HAVE_HEADERS(unistd.h) instead of AC_UNISTD_H.
876 Remove AC_USG; it is no longer used.
878 * file.c (print_file): New function, broken out of
879 print_file_data_base.
880 (print_file_data_base): Call it.
881 * rule.c (print_rule): New function, broken out of
882 print_rule_data_base.
883 (print_rule_data_base): Call it.
885 Thu Oct 14 14:54:03 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
887 * default.c (install_default_suffix_rules): New function, broken
888 out of install_default_implicit_rules.
889 (install_default_implicit_rules): Move suffix rule code there.
890 * make.h: Declare install_default_suffix_rules.
891 * main.c (main): Call install_default_suffix_rules before reading
892 makefiles. Move convert_to_pattern call before
893 install_default_implicit_rules.
895 * job.h (struct child): Make `pid' member type `pid_t' instead of
898 * compatMakefile (RANLIB): New variable, set by configure.
899 (glob/libglob.a): Pass RANLIB value down to submake.
901 Fixes for SCO 3.2 "devsys 4.2" from pss@tfn.com (Peter Salvitti).
902 * make.h: Include <sys/timeb.h> before <time.h> for SCO lossage.
903 * job.c [! getdtablesize] [! HAVE_GETDTABLESIZE]: If NOFILE is not
904 defined but NOFILES_MAX is, define it to be that.
906 Mon Oct 11 19:47:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
908 * GNUmakefile (make-$(version).tar): Depend on acconfig.h, so it
911 Sun Oct 3 15:15:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
913 * default.c (default_terminal_rules): Add `-G $@' to SCCS get cmds.
915 Tue Sep 28 14:18:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
917 * job.c (construct_command_argv_internal): Add ^ to SH_CHARS; it
918 is another symbol for | in some shells.
919 * main.c (main): Add it to CMD_DEFS quoting list as well.
921 Mon Sep 20 18:05:24 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
923 * job.c (construct_command_argv_internal): Remove '=' from
924 SH_CHARS. Only punt on '=' if it is unquoted in a word before the
925 first word without an unquoted '='.
927 * main.c (define_makeflags): Set v_export for MAKEFLAGS.
929 Fri Sep 17 00:37:18 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
931 * remake.c (update_file_1): Use .DEFAULT cmds for phony targets.
933 * make.h [_AIX && _POSIX_SOURCE]: Define POSIX.
935 * commands.c (delete_child_targets): Don't delete phony files.
937 * job.c (start_job_command): Set COMMANDS_RECURSE in FLAGS if we
938 see a `+' at the beginning of the command line.
940 Thu Sep 9 17:57:14 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
944 Wed Sep 8 20:14:21 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
946 * main.c (define_makeflags): Define MAKEFLAGS with o_file, not o_env.
948 Mon Aug 30 12:31:58 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
950 * expand.c (variable_expand): Fatal on an unterminated reference.
952 Thu Aug 19 16:27:53 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
956 * variable.c (define_automatic_variables): Define new o_default
957 variable `MAKE_VERSION' from version_string and remote_description.
959 * make.h (version_string, remote_description): Declare these here.
960 * main.c: Don't declare version_string.
961 (print_version): Don't declare remote_description.
963 Wed Aug 18 15:01:24 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
965 * read.c (read_makefile): Free space pointed to by CONDITIONALS
966 before restoring the old pointer.
968 Mon Aug 16 17:33:36 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
970 * compatMakefile ($(objs)): Depend on config.h.
972 * GNUmakefile (build.sh.in): Depend on compatMakefile.
974 * configure.in: Touch stamp-config after AC_OUTPUT.
976 Fri Aug 13 16:04:22 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
980 Thu Aug 12 17:18:57 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
982 * make.h: Include <config.h> instead of "config.h".
984 Wed Aug 11 02:35:25 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
986 * main.c (main): Make all variables interned from ENVP be v_export.
987 * variable.c (try_variable_definition): In v_default case, don't
988 check for an o_file variable that `getenv' finds.
990 * job.c (reap_children): New local variable ANY_LOCAL; set it
991 while setting ANY_REMOTE. If !ANY_LOCAL, don't wait for local kids.
993 * main.c (main): Don't call decode_env_switches on MFLAGS. DOC THIS.
995 * function.c (expand_function): #if 0 out freeing of ENVP since it
998 Mon Aug 9 17:37:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1002 * remote-stub.c (remote_status): Set errno to ECHILD before return.
1003 * job.c (reap_children): Scan the chain for remote children and
1004 never call remote_status if there are none.
1006 * function.c (expand_function: `shell'): #if 0 out calling
1007 target_environment; just set ENVP to environ instead.
1009 * job.c (reap_children): Check for negative return from
1010 remote_status and fatal for it.
1011 When blocking local child wait returns 0, then try a blocking call
1014 Tue Aug 3 00:19:00 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1016 * compatMakefile (clean): Delete make.info* and make.dvi here.
1017 (distclean): Not here.
1019 * dep.h (RM_*): Use #defines instead of enum to avoid lossage from
1020 compilers that don't like enum values used as ints.
1022 Mon Aug 2 16:46:34 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1024 * compatMakefile (loadavg): Add $(LOADLIBES).
1026 Sun Aug 1 16:01:15 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1030 * compatMakefile (loadavg, check-loadavg): New targets.
1031 (check): Depend on check-loadavg.
1033 * compatMakefile (glob/libglob.a): Depend on config.h.
1035 * misc.c (log_access): Write to stderr instead of stdout.
1037 Fri Jul 30 00:07:02 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1041 Thu Jul 29 23:26:40 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1043 * configure.in (SYS_SIGLIST_DECLARED): In test program include
1044 <unistd.h> #ifdef HAVE_UNISTD_H.
1046 * compatMakefile (.PHONY): Put after `all' et al.
1048 * configure.in: Add AC_IRIX_SUN.
1050 Wed Jul 28 17:41:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1054 Mon Jul 26 14:36:49 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1058 Sun Jul 25 22:09:08 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1062 * compatMakefile ($(infodir)/make.info): Don't use $(instname).
1063 Run install-info script if present.
1065 Fri Jul 23 16:03:50 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1067 * make.h [STAT_MACROS_BROKEN]: Test this instead of [uts].
1069 * configure.in: Add AC_STAT_MACROS_BROKEN.
1071 Wed Jul 14 18:48:11 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1075 * read.c (read_makefile): Recognize directive `-include', like
1076 `include' but sets RM_DONTCARE flag.
1078 * variable.c (target_environment): If FILE is nil, use
1079 current_variable_set_list in place of FILE->variables.
1080 * function.c (expand_function: `shell'): Get an environment for
1081 the child from target_environment instead of using environ.
1083 * dep.h: Declare read_all_makefiles here.
1084 (RM_*): Define new enum constants.
1085 * read.c (read_makefile): Second arg is FLAGS instead of TYPE.
1086 Treat it as a bit mask containing RM_*.
1087 (read_all_makefiles): For default makefiles, set D->changed to
1088 RM_DONTCARE instead of 1.
1089 * main.c: Don't declare read_all_makefiles here.
1090 (main): Check `changed' member of read_makefiles elts for RM_*
1091 flags instead of specific integer values.
1093 Mon Jul 12 22:42:17 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1095 * make.h [sequent && i386]: #undef POSIX. From trost@cse.ogi.edu.
1097 Thu Jul 8 19:51:23 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1099 * vpath.c (construct_vpath_list): If ELEM is zero 0, free PATTERN
1101 (build_vpath_lists): Empty `vpaths' around construct_vpath_list
1102 call for $(VPATH). Expand $(strip $(VPATH)), not just $(VPATH).
1104 * rule.c (convert_suffix_rule): Use alloca instead of xmalloc for
1105 PERCENTS, whose storage is not consumed by create_pattern_rule.
1107 * make.h [__mips && _SYSTYPE_SVR3]: #undef POSIX.
1109 Wed Jun 30 18:11:40 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1113 * rule.c (max_pattern_targets): New variable.
1114 (count_implicit_rule_limits): Compute its value.
1115 * rule.h: Declare it.
1116 * implicit.c (pattern_search): Make TRYRULES max_target_patterns
1117 times bigger. Move adding new TRYRULES elt inside the inner
1118 targets loop, so each matching target gets its own elt in MATCHES
1119 and CHECKED_LASTSLASH.
1121 * file.c (remove_intermediates): If SIG!=0 say `intermediate file'
1122 instead of just `file' in error msg.
1124 Fri Jun 25 14:55:15 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1126 * job.c (construct_command_argv): Turn off
1127 --warn-undefined-variables around expansion of SHELL and IFS.
1128 * read.c (tilde_expand): Likewise for HOME.
1129 (read_all_makefiles): Likewise for MAKEFILES.
1130 * vpath.c (build_vpath_lists): Likewise for VPATH.
1132 * main.c (warn_undefined_variables_flag): New flag variable.
1133 (switches): Add --warn-undefined-variables.
1134 * make.h (warn_undefined_variables_flag): Declare it.
1135 * expand.c (warn_undefined): New function.
1136 (reference_variable): Call it if the variable is undefined.
1137 (variable_expand): In substitution ref, call warn_undefined if the
1138 variable is undefined.
1140 * default.c (default_pattern_rules): Add `%.c: %.w %.ch' and
1141 `%.tex: %.w %.ch' rules.
1142 (default_suffix_rules: .w.c, .w.tex): Pass three args: $< - $@.
1143 (default_suffixes): Add `.ch'.
1145 Mon Jun 21 17:55:39 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1147 * default.c (default_suffixes): Replace `.cweb' with `.w'.
1148 (default_suffix_rules): Rename `.cweb.c' and `.cweb.tex' to `.w.c'
1151 Fri Jun 11 14:42:09 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1153 * compatMakefile ($(bindir)/$(instname)): Add missing backslash.
1155 Thu Jun 10 18:14:08 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1159 * read.c (multi_glob): Don't free OLD and OLD->name in the
1160 FOUND!=0 fork. Use new block-local variable F instead of
1163 * ar.c (glob_pattern_p): New function, snarfed from glob/glob.c.
1164 (ar_glob): Call it; return nil immediately if MEMBER_PATTERN
1165 contains no metacharacters.
1167 Wed Jun 9 16:25:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1169 * ar.c (ar_glob{_match,_alphacompare}): New function.
1171 * dep.h [! NO_ARCHIVES]: Declare it.
1172 * read.c (multi_glob) [! NO_ARCHIVES]: Use it on archive member elts.
1174 * read.c (read_makefile): Pass flag (1) to parse_file_seq, not to
1175 multi_glob (which doesn't take a 3rd arg).
1176 * rule.c (install_pattern_rule): Likewise.
1177 * default.c (set_default_suffixes): Here too.
1178 * function.c (string_glob): Don't pass gratuitous arg to multi_glob.
1180 * read.c (parse_file_seq) [! NO_ARCHIVES]: Add post-processing
1181 loop to translate archive refs "lib(a b)" into "lib(a) lib(b)".
1183 Mon Jun 7 19:26:51 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1185 * compatMakefile (installdirs): Actually pass directory names.
1186 ($(bindir)/$(instname)): Test chgrp&&chmod exit status with `if';
1187 if it fails, echo a warning msg, but don't make the rule fail.
1189 * read.c (tilde_expand): New function, broken out of tilde_expand.
1190 (multi_glob): Call it.
1191 (construct_include_path): Expand ~ in directory names.
1192 * dep.h: Declare tilde_expand.
1193 * main.c (enter_command_line_file): Expand ~ at the start of NAME.
1194 (main): Expand ~ in -C args.
1195 * read.c (read_makefile): Expand ~ in FILENAME unless TYPE==2.
1197 Fri Jun 4 13:34:47 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1199 * main.c (decode_env_switches): Use xmalloc instead of alloca for ARGS.
1201 * main.c (main): Put result of alloca in temporary variable with
1202 simple assignment, to make SGI compiler happy.
1204 Thu Jun 3 20:15:46 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1208 * main.c (main): Before re-execing, remove intermediate files, and
1209 print the data base under -p. Sexier debugging message.
1211 * implicit.c (pattern_search): Allocate an extra copy of the name
1212 of a winning intermediate file when putting it in FOUND_FILES.
1214 Wed Jun 2 16:38:08 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1216 * read.c (read_makefile): Pass flag (1) to parse_file_seq, not to
1217 multi_glob (which doesn't take a 3rd arg).
1219 * dir.c (dir_contents_file_exists_p): When reading dirents, ignore
1220 chars within D_NAMLEN that are NULs.
1222 * main.c (decode_switches): Don't savestring ARGV[0] to put it
1224 For string switch, don't savestring `optarg'.
1225 (main): Don't free elts of makefiles->list that are "-".
1226 Use alloca'd rather than savestring'd storage for elts of
1227 makefiles->list that are temporary file names.
1228 * read.c (read_all_makefiles): Don't free *MAKEFILES.
1229 * file.c (enter_file): Don't strip `./'s.
1230 * main.c (enter_command_line_file): New function.
1231 (main): Use it in place of enter_file for command-line goals from
1232 other_files, and for old_files and new_files.
1234 Mon May 31 18:41:40 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1238 * compatMakefile (.SUFFIXES): Add .info.
1239 ($(infodir)/$(instname).info): Find make.info* in cwd if there,
1240 else in $srcdir. Use basename to remove dir name from installed name.
1242 Thu May 27 17:35:02 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1244 * implicit.c (pattern_search): When interning FOUND_FILES, try
1245 lookup_file first; if found, free the storage for our copy of the name.
1247 Wed May 26 14:31:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1251 * main.c (decode_switches): In usage msg, write `--switch=ARG' or
1252 `--switch[=OPTARG]' rather than `--switch ARG' or `--switch [ARG]'.
1254 Mon May 24 16:17:31 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1256 * rule.c (convert_suffix_rule): New function.
1257 (convert_to_pattern): Use it instead of doing all the work here
1259 For target suffix `.a', generate both the archive magic rule and
1262 * compatMakefile (distclean): Remove stamp-config.
1264 Sat May 22 16:15:18 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1268 * file.c (remove_intermediates): Don't write extra space after `rm'.
1270 * main.c (struct command_switch.type): Remove `usage_and_exit'.
1271 (print_usage_flag): New variable.
1272 (switches: --help): Make type `flag', to set print_usage_flag.
1273 (init_switches): Remove `usage_and_exit' case.
1274 (decode_switches): Likewise.
1275 (decode_switches): Print usage if print_usage_flag is set.
1276 When printing usage, die with status of BAD.
1277 (main): Die with 0 if print_version_flag.
1279 Fri May 21 16:09:28 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1283 Wed May 19 21:30:44 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1285 * compatMakefile (installdirs): New target.
1286 (install): Depend on it.
1288 Sun May 16 20:15:07 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1292 Fri May 14 16:40:09 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1294 * vpath.c (construct_vpath_list): In removal loop for DIRPATH==0,
1295 set LASTPATH to PATH, not NEXT.
1297 * dir.c (read_dirstream): Break out of loop after incrementing
1298 DS->buckets such that it reaches DIRFILE_BUCKETS; avoid trying to
1299 dereference DS->contents->files[DIRFILE_BUCKETS].
1301 * read.c (read_makefile): Clear no_targets after reading a
1302 targetful rule line.
1304 * main.c (main): If print_version_flag is set, exit after printing
1306 (switches): Change --version docstring to say it exits.
1308 * make.h [butterfly]: #undef POSIX.
1310 Wed May 12 15:20:21 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1314 * arscan.c (ar_scan) [! AIAMAG]: Don't declare LONG_NAME.
1315 [AIAMAG]: Pass TRUNCATE flag arg to (*FUNCTION), always zero.
1317 * function.c (handle_function): Use fatal instead of
1318 makefile_fatal when reading_filename is nil.
1320 * configure.in: Add AC_GETGROUPS_T.
1321 * job.c (search_path): Use GETGROUPS_T in place of gid_t.
1323 Sun May 9 15:41:25 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1327 Fri May 7 18:34:56 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1329 * function.c (handle_function): Fatal for unmatched paren.
1331 Thu May 6 16:13:41 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1335 * commands.c (handling_fatal_signal): New variable.
1336 (fatal_error_signal): Set it.
1337 * job.c (reap_children): Avoid nonreentrant operations if that is set.
1338 * make.h: Declare handling_fatal_signal.
1340 * expand.c (reference_variable): New function, snippet of code
1341 broken out of simple-reference case of variable_expand.
1342 (variable_expand): Use it for simple refs.
1343 (variable_expand): When checking for a computed variable name,
1344 notice a colon that comes before the final CLOSEPAREN. Expand
1345 only up to the colon, and then replace the pending text with a
1346 copy containing the expanded name and fall through to subst ref
1348 (variable_expand): Don't bother expanding the name if a colon
1349 appears before the first $.
1350 (expand_argument): Use alloca instead of savestring.
1351 (variable_expand): For subst ref, expand both sides of = before
1352 passing to [pat]subst_expand. Use find_percent instead of lindex
1353 to check the lhs for a %.
1355 Wed May 5 14:45:52 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1359 Mon May 3 17:00:32 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1361 * arscan.c (ar_name_equal) [AIAMAG]: Abort if TRUNCATED is nonzero.
1363 * read.c (read_makefile): Pass extra arg of 1 to parse_file_seq,
1366 Thu Apr 29 19:47:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1370 * arscan.c (ar_scan): New local flag var LONG_NAME. Set it when
1371 we read the member name in any of the fashions that allow it to be
1372 arbitrarily long. Pass its negation to FUNCTION.
1373 (describe_member): Take TRUNCATED from ar_scan and print it.
1374 (ar_name_equal): Take new arg TRUNCATED; if nonzero, compare only
1375 the first sizeof (struct ar_hdr.ar_name) chars.
1376 (ar_member_pos): Take TRUNCATED from ar_scan, pass to ar_name_equal.
1377 * ar.c (ar_member_date_1): Likewise.
1379 Wed Apr 28 21:18:22 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1381 * job.c (reap_children): Before calling start_job_command to start
1382 the next command line, reset C->remote by calling start_remote_job_p.
1384 Mon Apr 26 15:56:15 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1386 * arscan.c (ar_scan): New local var NAMEMAP.
1387 In loop, rename NAME to NAMEBUF; new var NAME is a pointer; new
1388 flag IS_NAMEMAP. When extracting the member name, always put a
1389 null at its end first. If the name is "//" or "/ARFILENAMES", set
1390 IS_NAMEMAP. If we have already read in NAMEMAP, and NAME looks
1391 like " /N", get full name from NAMEMAP+N.
1392 Else if NAME looks like "#1/N", read N chars from the
1393 elt data to be the full name. At end of loop, if IS_NAMEMAP, read
1394 the elt's data into alloca'd NAMEMAP.
1395 (ar_name_equal): #if 0 truncating code.
1397 * make.h: Don't declare vfork at all. It returns int anyway,
1398 unless <unistd.h> declared it; and we conflicted with some systems.
1400 * main.c (define_makeflags): If FLAGSTRING[1] is '-', define
1401 MAKEFLAGS to all of FLAGSTRING, not &FLAGSTRING[1]. Don't want to
1402 define it to something like "-no-print-directory".
1403 Use %g format instead of %f for floating-valued things.
1405 Thu Apr 22 18:40:58 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1407 * GNUmakefile (Makefile.in): Use a substitution ref on nolib-deps
1408 to change remote-%.dep to remote-stub.dep.
1410 Wed Apr 21 15:17:54 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1414 Fri Apr 16 14:22:22 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1416 * compatMakefile (install): Remove - prefix from chgrp+chmod.
1420 Thu Apr 15 18:24:07 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1422 * acconfig.h: New file; contains "#undef SCCS_GET" for autoheader.
1423 * configure.in: If /usr/sccs/get exists, define SCCS_GET to that,
1425 * default.c (default_variables): Set GET to macro SCCS_GET.
1427 * read.c (parse_file_seq): Take extra arg STRIP; strip `./' only
1428 if nonzero. I hope this is the last time this argument is added
1430 (read_makefile): Pass it 1 when parsing include file names.
1431 Pass it 1 when parsing target file names.
1432 Pass it 1 when parsing static pattern target pattern names.
1433 * rule.c (install_pattern_rule): Pass it 1 when parsing rule deps.
1434 * default.c (set_default_suffixes): Pass it 1 when parsing
1436 * function.c (string_glob): Pass it 0 here.
1438 Wed Apr 14 11:32:05 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1440 * misc.c (log_access): New function.
1441 ({init,user,make,child}_access): Call it.
1442 (child_access): Abort if !access_inited.
1444 * main.c (switches: --no-print-directory): Use 1 instead of -1 for
1445 single-letter option.
1446 (init_switches, decode_switches, define_makeflags): An option with
1447 no single-letter version is no longer indicated by a value of -1;
1448 instead a value that is !isalnum.
1449 (init_switches): Don't put such switches into the string, only
1450 into the long_option table.
1452 * make.h [!NSIG] [!_NSIG]: #define NSIG 32.
1454 * job.c [HAVE_WAITPID]: Remove #undef HAVE_UNION_WAIT. AIX's
1455 bsdcc defined WIF* to use union wait.
1457 * main.c (struct command_switch): Change member `c' to type int.
1458 (switches): Make const.
1459 (decode_switches): Use `const struct command_switch *'.
1460 (define_makeflags): Likewise.
1462 * default.c (default_suffix_rules): Add `-o $@' to makeinfo rules.
1464 Mon Apr 12 12:30:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1468 * configure.in (AC_HAVE_HEADERS): Check for string.h and memory.h.
1469 Removed AC_MEMORY_H.
1470 * make.h [USG, NeXT]: Don't test these.
1471 [HAVE_STRING_H]: Test this to include string.h and define ANSI_STRING.
1472 [HAVE_MEMORY_H]: Test this instead of NEED_MEMORY_H.
1473 [! ANSI_STRING]: Put decls of bcopy et al here.
1474 [sparc]: Don't test this for alloca.h; HAVE_ALLOCA_H is sufficient.
1475 [HAVE_SIGSETMASK]: Test this rather than USG.
1476 [__GNU_LIBRARY__ || POSIX]: Don't #include <unistd.h> again.
1477 * main.c (main): Handle SIGCHLD if defined, and SIGCLD if defined.
1478 It doesn't hurt to do both if they are both defined, and testing
1480 * dir.c: Rationalize directory header conditionals.
1481 * arscan.c [HAVE_FCNTL_H]: Test this rather than USG || POSIX.
1483 * default.c (default_suffixes): Add `.txinfo'.
1484 (default_suffix_rules): Add `.txinfo.info' and `.txinfo.dvi' rules.
1486 * variable.c (try_variable_definition): Replace RECURSIVE flag
1487 with enum FLAVOR, which can be simple, recursive, or append.
1488 Recognize += as append flavor. Set new variable VALUE in a switch
1489 on FLAVOR. For append flavor, prepend the variable's old value.
1490 If the variable was previously defined recursive, set FLAVOR to
1491 recursive; if it was defined simple, expand the new value before
1492 appending it to the old value. Pass RECURSIVE flag to
1493 define_variable iff FLAVOR == recursive.
1495 * variable.c (try_variable_definition): Use alloca and bcopy for
1496 NAME, instead of savestring. Might as well use stack storage
1497 since we free it immediately anyway.
1499 Thu Apr 8 18:04:43 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1501 * job.c (start_waiting_jobs): Move decl of JOB outside of loop.
1503 * main.c (define_makeflags): Rename `struct flag' member `switch'
1504 to `cs', which is not a reserved word.
1506 Wed Apr 7 15:30:51 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1508 * job.c (new_job): Call start_waiting_jobs first thing.
1509 (start_waiting_job): Changed return type from void to int.
1510 Return 0 when putting the child on the waiting_jobs chain.
1511 (start_waiting_jobs): Don't check load and job_slots here.
1512 Always take a job off the chain and call start_waiting_job on it;
1513 give up and return when start_waiting_job returns zero.
1515 * main.c (define_makeflags: struct flag): Change member `char c' to
1516 `struct command_switch *switch'.
1517 (ADD_FLAG): Set that to CS instead of CS->c.
1518 If CS->c is -1, increment FLAGSLEN for the long name.
1519 When writing out FLAGS, handle FLAGS->switch->c == -1 and write
1520 the long name instead.
1522 * compatMakefile (stamp-config): New target of old config.h rule.
1523 Touch stamp-config after running config.status.
1524 (config.h): Just depend on stamp-config, and have empty commands.
1526 Mon Apr 5 20:14:02 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1528 * job.c [HAVE_WAITPID]: #undef HAVE_UNION_WAIT.
1530 * configure.in (AC_HAVE_FUNCS): Check for psignal.
1532 Fri Apr 2 17:15:46 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1534 * main.c (long_option_aliases): Remove "new"; it is already an
1535 unambiguous prefix of "new-file".
1537 Sun Mar 28 16:57:17 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1541 Wed Mar 24 14:26:19 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1543 * vpath.c (selective_vpath_search): When adding the
1544 name-within-directory at the end of NAME, and we don't add a
1545 slash, don't copy FILENAME in one char too far into NAME.
1547 * variable.c (define_automatic_variables): Find default_shell's
1548 length with strlen, not numerology.
1550 Wed Mar 17 20:02:27 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1552 * main.c (define_makeflags): Add the elts of a string option in
1553 reverse order, so they come out right when reversed again.
1555 Fri Mar 12 15:38:45 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1557 * compatMakefile (make.info): Use `-o make.info'.
1559 Thu Mar 11 14:13:00 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1561 * compatMakefile (REMOTE): Set to @REMOTE@; change comments to
1563 (objs): Replace remote.o with remote-$(REMOTE).o.
1564 (srcs): Replace remote.c with remote-$(REMOTE).c.
1565 (remote.o): Rule removed.
1567 * configure.in (REMOTE): Subst this in Makefile et al; default "stub".
1568 Use AC_WITH to grok --with-customs arg to set REMOTE=cstms.
1569 * GNUmakefile (build.sh.in): Filter out remote-% from objs list.
1570 * build.template (REMOTE): New var; set to @REMOTE@.
1571 (objs): Add remote-${REMOTE}.o.
1573 Wed Mar 10 15:12:24 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1577 * implicit.c (pattern_search): Fix "dependent"->"dependency" in
1578 "Rejecting impossible" -d msg.
1580 * file.c (file_hash_enter): New local vars {OLD,NEW}BUCKET. Store
1581 mod'd values there; never mod {OLD,NEW}HASH.
1583 Mon Mar 8 13:32:48 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1585 * remake.c [eta10]: Include <fcntl.h> instead of <sys/file.h>.
1587 * compatMakefile (VPATH): Set this to @srcdir@.
1588 (srcdir): Set this to $(VPATH).
1590 * main.c (main): New local var DIRECTORY_BEFORE_CHDIR. Save in it
1591 a copy of CURRENT_DIRECTORY after the first getcwd. Use it
1592 instead of CURRENT_DIRECTORY when chdir'ing back before re-execing.
1594 * remake.c (notice_finished_file): Pass missing SEARCH arg to f_mtime.
1596 * read.c (read_makefile): Remove extraneous arg to parse_file_seq.
1598 Mon Feb 22 14:19:38 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1600 * compatMakefile ($(infodir)/$(instname).info): Use , instead of /
1601 as the sed delimiter char.
1603 Sun Feb 21 14:11:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1607 * rule.h (struct rule): Removed `subdir' member.
1608 * rule.c (new_pattern_rule): No need to clear it.
1609 (count_implicit_rule_limits): Set the `changed' flag in each dep
1610 that refers to a nonexistent directory. No longer set rule-global
1611 `subdir' flag with that information.
1612 (print_rule_data_base): Don't record info on `subdir' flags.
1614 * implicit.c (pattern_search): Check the DEP->changed flag rather
1615 than the (now gone) RULE->subdir flag. Also test CHECK_LASTSLASH;
1616 if it is set, the file might exist even though the DEP->changed
1619 * rule.c (count_implicit_rule_limits): Pass "", not ".", as file
1620 name arg to dir_file_exists_p to check for existence of directory.
1622 * implicit.c (pattern_search): Inside dep-finding loop, set
1623 CHECK_LASTSLASH from the value recorded in CHECKED_LASTSLASH[I],
1624 rather than computing it anew.
1626 * commands.c (set_file_variables): Must alloca space for PERCENT
1627 and copy it, to avoid leaving the trailing `)' in the value.
1629 * misc.c (remove_comments): Fixed backslash-checking loop
1630 condition to allow it to look at the first char on the line.
1631 P2 >= LINE, not P2 > LINE.
1633 * compatMakefile ($(bindir)/$(instname)): Before moving $@.new to
1634 $@, rm $@.old and mv $@ to $@.old.
1636 * variable.c (try_variable_definition): Take new args FILENAME and
1637 LINENO. Fatal if the variable name is empty.
1638 * read.c (read_makefile): Change callers.
1639 * main.c (main): Likewise.
1641 * compatMakefile (group): Define to @KMEM_GROUP@, autoconf magic
1642 that configure will replace with the group owning /dev/kmem.
1644 Mon Feb 8 14:26:43 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1646 * vpath.c (vpath_search): Take second arg MTIME_PTR, pass thru to
1647 selective_vpath_search.
1648 (selective_vpath_search): Take second arg MTIME_PTR.
1649 If the dir cache thinks a file exists, stat it to make sure, and
1650 put the modtime in *MTIME_PTR.
1651 * remake.c (library_search): Take second arg MTIME_PTR.
1652 When we find a match, record its mtime there.
1653 Pass MTIME_PTR through to vpath_search to do same.
1654 (f_mtime): Pass &MTIME as new 2nd arg to {vpath,library}_search;
1655 store it in FILE->last_mtime if set nonzero.
1656 * implicit.c (pattern_search): Pass nil 2nd arg to vpath_search.
1658 * compatMakefile (remote.o): Prepend `$(srcdir)/' to `remote-*.c',
1659 so globbing looks somewhere it will find things.
1661 * compatMakefile ($(infodir)/$(instname).info): Install `make.info*'
1662 not `$(srcdir)/make.info*'; no need to use basename.
1664 Fri Feb 5 12:52:43 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1668 * compatMakefile (install): Add missing ;\s.
1670 Make -, @, and + prefixes on a pre-expanded command line affect
1671 all lines in the expansion, not just the first.
1672 * commands.h (struct commands): Replace `lines_recurse' member
1674 (COMMANDS_{RECURSE,SILENT,NOERROR}): New macros, bits to set in
1676 * commands.c (chop_commands): Set `lines_flags' instead of
1677 `lines_recurse'. Record not only + but also @ and - prefixes.
1678 * remake.c (notice_finished_file): Check the COMMANDS_RECURSE bit
1679 in FILE->cmds->lines_flags, rather than FILE->cmds->lines_recurse.
1680 * job.c (start_job_command): Replaced RECURSIVE and NOPRINT local
1681 var with FLAGS; initialize it to the appropriate `lines_flags' byte.
1682 Set CHILD->noerror if the COMMANDS_NOERROR bit is set in FLAGS.
1683 Set the COMMANDS_SILENT bit in FLAGS for a @ prefix.
1685 * remake.c (update_goal_chain): Set G->file to its prev after
1686 checking for G being finished, since that check needs to examine
1689 * configure.in (union wait check) [HAVE_WAITPID]: Try using
1690 waitpid with a `union wait' STATUS arg. If waitpid and union wait
1691 don't work together, we should not use union wait.
1695 * remake.c (update_goal_chain): When G->file->updated, move
1696 G->file to its prev. We aren't finished until G->file is nil.
1698 Thu Feb 4 12:53:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1700 * main.c (starting_directory): New global variable.
1701 (main): Set it to cwd after doing -Cs.
1702 (log_working_directory): Use it, rather than computing each time.
1703 * make.h: Declare it.
1705 * compatMakefile (SHELL): Define to /bin/sh for losing Unix makes.
1707 * main.c (decode_env_switches): Allocate (1 + LEN + 1) words for
1708 ARGV, rather than LEN words plus one byte.
1710 Wed Feb 3 18:13:52 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1712 * compatMakefile ($(bindir)/$(instname)): Put - before
1713 install_setgid command line, so its failure won't be an error.
1714 (infodir): New variable.
1715 (install): Depend on $(infodir)/$(instname).info.
1716 ($(infodir)/$(instname).info): New target.
1718 * read.c (read_makefile): If FILENAMES is nil when we see a line
1719 starting with a tab, don't treat it as a command. Just fall
1720 through, rather than giving an error.
1722 * read.c (read_makefile): If the NO_TARGETS flag is set when we see a
1723 command line, don't clear it before continuing. We want
1724 subsequent command lines to be ignored as well.
1726 * job.c (new_job): Before expanding each command line, collapse
1727 backslash-newline combinations that are inside var or fn references.
1729 Mon Feb 1 16:00:13 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1731 * compatMakefile (exec_prefix): Default to $(prefix), not /usr/local.
1733 * compatMakefile (make.info): Pass -I$(srcdir) to makeinfo.
1735 * job.c [POSIX] (unblock_sigs): Made global.
1736 [!POSIX] (unblock_sigs): Move defns to job.h.
1737 * job.h [POSIX] (unblock_sigs): Declare.
1739 Sun Jan 31 19:11:05 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1741 * read.c (read_makefile): In vpath parsing, after finding the
1742 pattern token, take entire rest of line as the search path, not
1743 just the next token.
1745 * compatMakefile (remote.o): Depend on remote-*.c.
1747 Thu Jan 28 16:40:29 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1749 * commands.c (set_file_variables): Don't define any F or D versions.
1750 * variable.c (define_automatic_variables): Define them here as
1751 recursively-expanded variables that use the dir and notdir funcs.
1753 * variable.c (target_environment): In v_default case, don't export
1754 o_default or o_automatic variables.
1756 * configure.in (union wait check): Remove ` and ' inside C code;
1757 they confuse the shell script.
1759 Mon Jan 25 13:10:42 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1763 * vpath.c (construct_vpath_list): When skipping further processing
1764 of an elt that is ".", don't also skip the code that pushes P past
1767 * compatMakefile (distclean): Don't remove make-*.
1769 * configure.in (HAVE_UNION_WAIT): Try to use WEXITSTATUS if it's
1770 defined. If one cannot use WEXITSTATUS with a `union wait'
1771 argument, we don't want to believe the system has `union wait' at all.
1773 * remake.c (update_file): Do nothing to print "up to date" msgs.
1774 (update_goal_chain): Do it here instead.
1775 Use the `changed' flag of each goal's `struct dep' to keep track
1776 of whether files_remade (now commands_started) changed around a
1777 call to update_file for that goal.
1778 When a goal is finished, and its file's update_status is zero (i.e.,
1779 success or nothing done), test the `changed' flag and give an "up
1780 to date" msg iff it is clear.
1781 * make.h (files_remade): Renamed to commands_started.
1782 * remake.c: Changed defn.
1783 (update_goal_chain): Changed uses.
1784 * job.c (start_job_command): Increment commands_started here.
1785 (reap_children): Not here.
1787 * remake.c (update_goal_chain): Don't do anything with files'
1788 `prev' members. update_file now completely handles this.
1790 * variable.c (target_environment): Don't expand recursive
1791 variables if they came from the environment.
1793 * main.c (define_makeflags): For flags with omitted optional args,
1794 store {"", 0} with ADD_FLAG. When constructing FLAGSTRING, a flag
1795 so stored cannot have more flags appended to the same word.
1797 Fri Jan 22 14:46:16 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1799 * variable.c (print_variable_set): In vars/bucket calculation,
1800 don't spuriously multiply by 100.
1804 * job.c [!HAVE_UNION_WAIT] (WTERMSIG, WCOREDUMP, WEXITSTATUS):
1805 Don't define if already defined.
1807 * remake.c (update_file): Don't keep track of the command_state before
1808 calling update_file_1. Remove local variable COMMANDS_FINISHED,
1809 and don't test it to decide to print the "is up to date" msg.
1810 Testing for files_remade having changed should always be sufficient.
1811 The old method lost when we are called in the goal chain run on a
1812 makefile, because the makefile's command_state is already
1813 `cs_finished' from the makefile chain run.
1815 * misc.c [HAVE_SETRE[GU]ID]: Test these to decl setre[gu]id.
1817 * configure.in: Rewrote wait checking.
1818 Use AC_HAVE_HEADERS to check for <sys/wait.h>.
1819 Use AC_HAVE_FUNCS to check for waitpid and wait3.
1820 Use a compile check to test just for `union wait'.
1821 * job.c: Rewrote conditionals accordingly.
1822 [HAVE_WAITPID]: Test this only to define WAIT_NOHANG.
1823 [HAVE_WAIT3]: Likewise.
1824 [HAVE_UNION_WAIT]: Test this to define WAIT_T and W*.
1826 * configure.in: Set CFLAGS and LDFLAGS before all checks.
1828 * dir.c: Add static forward decls of {open,read}_dirstream.
1830 Thu Jan 21 17:18:00 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1834 * job.c [NGROUPS_MAX && NGROUPS_MAX==0]: #undef NGROUPS_MAX.
1836 * compatMakefile (CFLAGS, LDFLAGS): Set to @CFLAGS@/@LDFLAGS@.
1837 * build.template (CFLAGS, LDFLAGS): Same here.
1838 * configure.in: AC_SUBST(CFLAGS) and LDFLAGS.
1839 Set them to -g if not defined in the environment.
1841 * remake.c (library_search): Use LIBNAME consistently, setting it
1842 only once, to be the passed name sans `-l'.
1843 Pass new var FILE to be modified by vpath_search.
1845 Mon Jan 18 14:53:54 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1849 * job.c (start_waiting_jobs): Return when job_slots_used is equal to
1852 * configure.in: Add AC_CONST for the sake of getopt.
1854 * read.c (read_makefile): Continue after parsing `override'
1855 directive, rather than falling through to lossage.
1856 Check for EOL or blank after "override define".
1858 * compatMakefile (.c.o, remote.o): Put $(CFLAGS) after other switches.
1860 Fri Jan 15 12:52:52 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1864 * main.c (define_makeflags): After writing everything into
1865 FLAGSTRING, only back up two chars if [-1] is a dash, meaning we
1866 just wrote " -". Always terminate the string at *P.
1868 * remake.c (library_search): When constructing names in std dirs,
1869 use &(*LIB)[2] for the stem, not LIBNAME (which points at the
1870 buffer we are writing into!).
1872 Thu Jan 14 13:50:06 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1874 * read.c (read_makefile): Set IN_IGNORED_DEFINE for "override
1875 define" when IGNORING is true.
1877 * compatMakefile (distclean): Remove config.status and build.sh.
1879 Wed Jan 13 16:01:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1883 * misc.c (xmalloc, xrealloc): Cast result of malloc/realloc to
1886 * arscan.c (ar_scan) [AIAMAG]: Cast read arg to (char *).
1888 * variable.c (define_automatic_variables): Override SHELL value for
1889 origin o_env_override as well as o_env.
1891 * GNUmakefile (build.sh.in): Don't replace %globobjs%. Instead,
1892 add the names of the glob objects (w/subdir) to %objs%.
1893 * build.template (globobjs): Removed.
1894 Take basename of $objs before linking.
1896 Tue Jan 12 12:31:06 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1900 * configure.in (AC_OUTPUT): Also edit build.sh.
1901 * build.template: New file.
1902 * GNUmakefile (build.sh.in): New rule to create it from build.template.
1903 (make-$(version).tar.Z): Depend on build.sh.in.
1905 * main.c (die): Call print_data_base if -p.
1906 (main): Don't call it here.
1908 * compatMakefile (defines): Add @DEFS@. configure should turn this
1909 into -DHAVE_CONFIG_H.
1911 Mon Jan 11 14:39:23 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1915 * misc.c (init_access): Surround with #ifdef GETLOADAVG_PRIVILEGED.
1916 ({make,user,child}_access) [! GETLOADAVG_PRIVILEGED]: Make no-op.
1917 * compatMakefile (install_setgid): New var, set by configure.
1918 (install): Install setgid $(group) only if $(install_setgid) is true.
1920 Fri Jan 8 15:31:55 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1922 * job.c (load_too_high): If getloadavg fails with errno==0, give a
1923 message saying that load limits are not supported.
1925 * vpath.c (construct_vpath_list): Rewrote path deletion code to
1926 not try to use PATH's next link after freeing PATH.
1928 * main.c (define_makeflags): Rewritten; now handles string-valued
1929 option, and has no arbitrary limits.
1930 (switches): Set `toenv' flag for -I and -v.
1932 * main.c (decode_env_switches): Cast return value of alloca to char *.
1934 * misc.c (child_access) [HAVE_SETREUID, HAVE_SETREGID]: Use
1935 setre[gu]id in place of set[gu]id.
1937 Wed Jan 6 15:06:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1939 * main.c (main): Define MAKEOVERRIDES, MAKE, and MAKE_COMMAND with
1942 * make.h [POSIX]: Don't test this to use ANSI_STRING.
1943 Testing STDC_HEADERS should be sufficient.
1945 * job.h: Declare start_waiting_jobs.
1947 * read.c (read_makefile): Add missing parens in if stmt that find
1948 conditional directives.
1950 * main.c (main): Declare init_dir.
1951 * implicit.c (pattern_search): Always use two % specs in a
1952 DEBUGP2, and always pass two non-nil args.
1953 Cast field width args to int.
1954 Add missing parens in !RULE->subdir if stmt.
1955 * function.c (expand_function, patsubst_expand): Add parens around
1956 assignments inside `while' stmts.
1957 * commands.c (print_commands): Cast field width args to int.
1959 * read.c (do_define): Cast return value of alloca to (char *).
1961 * main.c (init_switches): New function, broken out of decode_switches.
1962 (decode_switches): Take new arg ENV. If set, ignore non-option
1963 args; print no error msgs; ignore options with clear `env' flags.
1964 (decode_env_switches): Rewritten to chop envar value into words
1965 and pass them to decode_switches.
1966 (switches): Set `env' flag for -I and -v.
1968 * dir.c (init_dir): Cast free to __glob_closedir_hook's type.
1970 Tue Jan 5 14:52:15 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1974 * job.c [HAVE_SYS_WAIT || !USG]: Don't #include <sys/time.h> and
1975 <sys/resource.h>. <sys/time.h> interacts badly with <time.h>, and
1976 we don't need these anyway.
1978 * configure.in (AC_HAVE_FUNCS): Check for setre[gu]id.
1979 * misc.c ({user,make}_access): Test #ifndef HAVE_SETRE[GU]ID, not
1980 #ifdef POSIX || USG. SunOS 4.1 is supposedly POSIX.1 compliant,
1981 but its set[gu]id functions aren't; its setre[gu]id functions work.
1983 * misc.c ({user,make,child}_access): Give name of caller in error msgs.
1985 * job.c (load_too_high): Say "cannot enforce load limit" in error msg.
1987 * configure.in: Call AC_PROG_CC.
1988 * compatMakefile (CC): Define to @CC@ (autoconf magic).
1990 * compatMakefile: Add .NOEXPORT magic target.
1992 Mon Jan 4 17:00:03 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1994 * main.c (print_version): Updated copyright to include 93.
1996 Thu Dec 31 12:26:15 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1998 * make.h [_AIX]: Don't declare alloca.
2000 Tue Dec 29 13:45:13 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2004 * compatMakefile (objs): Add signame.o.
2005 (srcs): Add signame.[ch].
2007 * compatMakefile (srcs): Add config.h.in.
2008 (remote.o): Add -I. before -I$(srcdir).
2010 Mon Dec 28 15:51:26 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2014 * read.c (readline): Fatal when LEN==0, indicating a line starting
2016 (readline): Take new arg LINENO, for use in error msg.
2017 (read_makefile, do_define): Pass it.
2019 * compatMakefile (glob/libglob.a): Pass -DHAVE_CONFIG_H in CPPFLAGS.
2020 (.c.o): Add -I. before -I$(srcdir).
2022 Wed Dec 23 12:12:04 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2024 * read.c (read_makefile): Accept and ignore a rule with no targets.
2026 * compatMakefile (ALLOCA_SRC): New variable.
2027 (srcs): Include its value.
2029 * read.c (struct conditional): Renamed member `max_ignoring' to
2030 `allocated'; added new member `seen_else'.
2031 (conditional_line): Initialize seen_else flag when starting an `if...';
2032 set it when we see an `else'; fatal if set when we see `else'.
2033 (read_makefile): Fatal "missing `endif'" if there are any pending
2034 conditionals, not just if we are still ignoring.
2036 Tue Dec 22 15:36:28 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2038 * compatMakefile (manext): Set to 1, not l.
2039 ($(mandir)/$(instname).$(manext)): Use $(srcdir) for make.man in cmds.
2041 * file.c (file_hash_enter): Don't call uniquize_deps here.
2042 * read.c (record_files): Likewise.
2043 * implicit.c (pattern_search): Likewise.
2044 * commands.c (set_file_variables): Call it only here.
2046 * default.c (default_variables) [__convex__]: FC=fc.
2048 * variable.c (target_environment): Expand the values of recursively
2049 expanded variables when putting them into the environment.
2050 * expand.c (recursively_expand): Made global.
2051 * make.h (recursively_expand): Declare it.
2053 * remake.c (check_dep): Set FILE->command_state to cs_deps_running
2054 when a dep's command_state is cs_running or cs_deps_running.
2056 * read.c (read_makefile): Changed error msg for spurious cmds to
2057 not say "first target".
2059 Sun Dec 20 17:56:09 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2061 * configure.in: Do AC_CONFIG_HEADER right after AC_INIT.
2062 * make.h (HAVE_CONFIG_H): #include "config.h", then #define this.
2063 * compatMakefile (config.h, configure, config.h.in): New rules.
2064 (defines): Removed @DEFS@.
2066 Thu Dec 17 16:11:40 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2068 * compatMakefile (realclean): Just depend on distclean; no cmds.
2069 (distclean): Do what realclean did before; also remove Makefile and
2070 config.h; don't remove configure.
2071 (info, dvi): New targets; depend on make.{info,dvi}.
2072 (doc): Removed target.
2073 (MAKEINFO, TEXI2DVI): New vars.
2074 (make.info, make.dvi): Use them instead of explicit cmds.
2076 Wed Dec 16 16:25:24 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2078 * configure.in: Added fcntl.h to AC_HAVE_HEADERS. getloadavg cares.
2080 Wed Dec 9 15:21:01 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2082 * main.c (long_option_aliases): Add --new-file alias for -W.
2084 * default.c (default_variables): Change all C++ to CXX and C++FLAGS
2087 * read.c (do_define): Expand the variable name before using it.
2089 * main.c (main): Define variable "MAKE_COMMAND" to argv[0];
2090 define "MAKE=$(MAKE_COMMAND) $(MAKEOVERRIDES)" always.
2092 * remake.c (library_search): Search for libNAME.a in cwd; look in
2093 vpath before looking in standard dirs, not after.
2094 Changed order of std dirs to: /lib, /usr/lib, ${prefix}/lib.
2096 Mon Nov 23 14:57:34 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2098 * default.c (default_pattern_rules, default_terminal_rules): Added
2099 brackets around initializers.
2101 * variable.c (try_variable_definition): Don't check for LINE[0]=='\t'.
2102 (try_variable_definition): Expand the name before defining the var.
2104 * job.c (init_siglist): Removed function.
2105 Removed decl of `sys_siglist'.
2106 * make.h [! HAVE_SYS_SIGLIST]: #include "signame.h".
2107 [HAVE_SYS_SIGLIST && !SYS_SIGLIST_DECLARED]: Declare sys_siglist
2108 only under these conditions.
2109 * main.c (main): Don't declare init_siglist.
2110 (main) [! HAVE_SYS_SIGLIST]: Call signame_init instead of init_siglist.
2112 Wed Nov 18 14:52:51 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2114 * read.c (record_files): Don't try to append to FIRSTDEPS if it's
2115 nil; instead just set it to MOREDEPS.
2117 Mon Nov 16 17:49:17 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2119 * vpath.c (construct_vpath_list): Initialize P to DIRPATH before
2120 loop that sets MAXELEM.
2122 Fri Nov 13 18:23:18 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2126 Thu Nov 12 15:45:31 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2128 * job.c (start_job_command): Under -n, increment files_remade after
2129 processing (i.e., printing) all command lines.
2131 Tue Nov 10 15:33:53 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2133 * read.c (record_files): Append new deps if this rule has no
2134 commands; prepend them to existing deps if this rule has no commands.
2136 * dir.c (open_dirstream): Return nil if DIR->contents->files is nil.
2138 * read.c (parse_file_seq): Removed last arg STRIP. Always strip `./'s.
2139 (read_makefile): Changed callers.
2140 * function.c (string_glob): Likewise.
2141 * rule.c (install_pattern_rule): Likewise.
2143 Mon Nov 9 17:50:16 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2145 * remake.c (files_remade): Made global.
2146 (notice_finished_file): Don't increment files_remade here; this
2147 function gets called in many situations where no remaking was in
2149 * job.c (reap_children): Do it here instead, when we know that
2150 actual commands have been run for the file.
2151 * make.h (files_remade): Declare it.
2153 Thu Nov 5 18:26:10 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2155 * vpath.c (construct_vpath_list): Allow blanks as well as colons to
2156 separate elts in the search path.
2158 * read.c (read_makefile): Don't fatal on extra tokens in `vpath'.
2159 The search path can contain spaces now.
2161 Tue Nov 3 20:44:32 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2163 * compatMakefile (check): New target; no-op.
2165 * file.c (file_hash_enter): Mod OLDHASH by FILE_BUCKETS after
2166 testing for OLDHASH==0 but before using the value.
2167 (rename_file): Don't mod OLDHASH by FILE_BUCKETS before passing it
2170 * file.c (rename_file): Notice when OLDFILE->cmds came from
2171 default.c, and don't try to print ->filename in that case.
2173 Sun Oct 25 01:48:23 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2175 * remake.c (update_file): Don't process F->also_make here.
2176 (notice_finished_file): Don't process FILE->also_make if no attempt
2177 to update FILE was actually made.
2178 Fixed to call f_mtime directly to refresh their modtimes.
2180 Sat Oct 24 22:08:59 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2182 * read.c (find_percent): Don't increment P again after skipping
2185 * expand.c (variable_expand): In call to patsubst_expand, don't
2186 find `%'s ourselves; let that function do it.
2188 * read.c (read_makefile: record_waiting_files): Don't call
2189 record_files if FILENAMES is nil.
2190 (read_makefile): All alternatives in the parsing, except for rule
2191 lines, fall through to the end of the loop. At the end of the
2192 loop, do record_waiting_files so we notice later spurious cmds.
2194 Fri Oct 23 15:57:37 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2196 * variable.c (define_automatic_variables): Free old value of SHELL
2197 before replacing it.
2199 Thu Oct 15 18:57:56 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2201 * compatMakefile (.c.o): Add -I$(srcdir)/glob to flags.
2203 * dir.c (open_dirstream): Cast return value to __ptr_t.
2205 * default.c (default_variables: "GET") [_IBMR2]: Use USG defn.
2207 * make.h (MAXPATHLEN): Moved out of #ifndef POSIX.
2208 (GET_PATH_MAX): Moved from #ifdef POSIX to #ifdef PATH_MAX #else.
2209 Define as (get_path_max ()).
2210 [! PATH_MAX] (NEED_GET_PATH_MAX): Define.
2211 [! PATH_MAX] (get_path_max): Declare fn.
2212 * misc.c [NEED_GET_PATH_MAX] (get_path_max): New function.
2214 Mon Oct 12 13:34:45 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2218 * job.c (sys_siglist): Only declare #ifndef SYS_SIGLIST_DECLARED.
2219 * make.h [! HAVE_SYS_SIGLIST && HAVE__SYS_SIGLIST]: #define
2220 SYS_SIGLIST_DECLARED.
2222 * dir.c (file_impossible): When initializing DIR->contents, set
2223 DIR->contents->dirstream to nil.
2225 * compatMakefile (GLOB): Define new variable.
2226 (objs): Use it, rather than glob/libglob.a explicitly.
2228 * read.c (parse_file_seq): When stripping "./", handle cases like
2229 ".///foo" and "./////".
2230 * file.c (lookup_file, enter_file): Likewise.
2232 Sun Oct 11 17:00:35 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2234 * dir.c (struct dirstream, {open,read}_dirstream): New
2235 data type and functions to read a directory sequentially.
2236 (init_dir): New function to hook it into glob.
2237 * main.c (main): Call init_dir.
2239 * compatMakefile (objs): Added glob/libglob.a.
2240 * configure.in: Remove code to test for glob.
2242 Fri Oct 9 12:08:30 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2244 * read.c (record_files): Generalized test for NAME pointing
2245 somewhere into F->name.
2247 * variable.c (define_variable_in_set): Free old value when replacing.
2249 * read.c (do_define): Free the linebuffer before returning.
2250 (record_files): When clearing .SUFFIXES deps, free their data.
2251 (multi_glob): Free OLD and its data when replacing it with results
2254 * commands.c (set_file_variables): Use alloca in place of xmalloc
2255 for temp space for $^, $?, et al.
2257 * dir.c (struct directory): New member `contents' replaces `files'
2259 (struct directory_contents): New type.
2260 (directories_contents): New hash table.
2261 (dir_struct_file_exists_p): Take a struct directory_contents.
2262 (dir_file_exists_p): Pass it the `contents' member of the dir found.
2263 (dir_struct_file_exists_p): Renamed to dir_contents_file_exists_p;
2264 made static. Return 0 if DIR is nil (meaning it couldn't be stat'd).
2265 (dir_file_exists_p, find_directory): Change all callers.
2266 (file_impossible): Use DIR->contents, initializing it if nil.
2267 (print_dir_data_base): Use DIR->contents, and print out device and
2268 inode numbers with each directory.
2270 * Changes for performance win from John Gilmore <gnu@cygnus.com>:
2271 * dir.c (DIRECTORY_BUCKETS): Increase to 199.
2272 (DIRFILE_BUCKETS): Decrease to 107.
2273 (find_directory): Allocate and zero a multiple of
2274 sizeof (struct dirfile *), not of sizeof (struct dirfile).
2275 (dir_struct_file_exists_p): New function, nearly all code from
2277 (dir_file_exists_p): Just call find_directory+dir_struct_file_exists_p.
2278 * vpath.c (selective_vpath_search): Remove redundant
2279 dir_file_exists_p call.
2281 * configure.in: Comment out glob check; always use our code.
2283 Fri Oct 2 19:41:20 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2285 * make.h [! HAVE_SYS_SIGLIST && HAVE__SYS_SIGLIST]: #define
2286 HAVE_SYS_SIGLIST; after doing #define sys_siglist _sys_siglist, we
2289 Wed Sep 30 19:21:01 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2291 * main.c (main): Don't do -w automatically if -s.
2293 Tue Sep 29 21:07:55 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2295 * main.c (printed_version): Move variable inside print_version.
2296 (print_version): Return immediately if printed_version is set.
2297 (die): Don't test printed_version here.
2298 (decode_switches): Under -v, do print_version before giving usage.
2299 (DESCRIPTION_COLUMN): New macro.
2300 (decode_switches): Use it when printing the usage message.
2301 Leave at least two spaces between options and their descriptions.
2303 Fri Sep 25 13:12:42 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2307 Wed Sep 16 16:15:22 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2309 * read.c (read_makefile): Save errno value from trying to open
2310 FILENAME, and restore it before erring; otherwise we get the errno
2311 value from the last elt of the search path.
2313 Tue Sep 15 15:12:47 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2315 * main.c (long_option_aliases): Add --stop for -S.
2317 * read.c (word1eq): Do strncmp before dereferencing someplace that
2318 may be out in space.
2320 Wed Sep 9 15:50:41 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2322 * remake.c (notice_finished_file): If all the command lines were
2323 recursive, don't do the touching.
2325 * job.c (start_job_command): Don't check for + here.
2326 * commands.c (chop_commands): Do it here instead.
2328 * default.c (default_terminal_rules): Prepend + to cmds for RCS.
2330 Wed Sep 2 17:53:08 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2332 * compatMakefile (objs): Include $(ALLOCA).
2334 * make.h [CRAY]: Move #define signal bsdsignal to before #includes.
2336 Thu Aug 27 17:45:43 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
2338 * read.c (default_include_directories): Add INCLUDEDIR first.
2339 * compatMakefile (includedir): Define.
2340 (defines): Add -D for INCLUDEDIR="$(includedir)".
2342 * read.c (read_makefile): Grok multiple files in `include';
2345 * remake.c (library_search): New function.
2346 (library_file_mtime): Remove function.
2347 (f_mtime): Use library_search instead of library_file_mtime.
2348 * compatMakefile (libdir): Define.
2349 (defines): Add -D for LIBDIR="$(libdir)".
2350 * make.texinfo (Libraries/Search): Document change.
2352 * file.c (rename_file): Fix file_hash_enter call with missing arg.
2354 Wed Aug 26 17:10:46 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2358 * main.c (main): Set command_state to cs_finished for temp files
2359 made for stdin makefiles.
2361 * main.c (decode_switches): Don't tell getopt to return non-option
2363 Ignore an argument of `-'.
2365 Thu Aug 20 13:36:04 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2367 * job.c (start_job_command): If (touch_flag && !RECURSIVE), ignore
2368 the command line and go to the next.
2369 (notice_finished_file): Under -t, touch FILE.
2370 * remake.c (remake_file): Don't touch it here.
2372 Wed Aug 19 16:06:09 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2374 * function.c (pattern_matches): Use temporary for strlen (WORD)
2375 instead of two function calls.
2377 * compatMakefile (LOAD_AVG): Remove variable and comments.
2379 Tue Aug 18 14:58:58 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2381 * make.texinfo (Running): Node renamed to `make Invocation'.
2383 Fri Aug 14 12:27:10 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2385 * arscan.c (ar_name_equal): Don't compare [MAX-3..MAX] if
2388 Thu Aug 13 17:50:09 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2392 * main.c: Don't #include <time.h>; make.h already does.
2394 Mon Aug 10 17:03:01 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2396 * implicit.c (pattern_search): Fixed copying of suffix when building
2399 * function.c (expand_function: `shell'): Make sure BUFFER is
2400 null-terminated before replacing newlines.
2402 * compatMakefile (mandir): Use man$(manext), not always manl.
2404 Sun Aug 2 01:42:50 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2406 * rule.c (new_pattern_rule): Not static.
2407 * rule.h: Declare it.
2409 * file.c (file_hash_enter): New function, most code from rename_file.
2410 (rename_file): Call it.
2411 * file.h (file_hash_enter): Declare it.
2415 Thu Jul 30 15:40:48 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2417 * main.c (decode_switches): Handle usage_and_exit when building
2418 long options vector.
2420 * default.c (default_terminal_rules): Make RCS rules use $(CHECKOUT,v).
2421 (default_variables): Define CHECKOUT,v (hairy).
2423 * make.h [!HAVE_SYS_SIGLIST && HAVE__SYS_SIGLIST]: #define
2424 sys_siglist to _sys_siglist.
2426 Sun Jul 26 16:56:32 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2428 * NEWS: Add header and tail copyright info like Emacs NEWS.
2430 * make.h [ANSI_STRING]: Don't #define index, rindex, bcmp, bzero,
2431 bcopy if already #define'd.
2432 [STDC_HEADERS] (qsort, abort, exit): Declare here.
2433 [! __GNU_LIBRARY__ && !POSIX]: Not here.
2435 * make.h [_AIX]: #pragma alloca first thing.
2437 * job.c (start_waiting_job): Set the command_state to cs_running
2438 when we queue a job on waiting_jobs.
2440 Fri Jul 24 02:16:28 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2442 * variable.c (define_automatic_variables): Use "" instead of nil
2445 Thu Jul 23 22:31:18 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2449 * main.c (struct command_switch.type): Add alternative usage_and_exit.
2450 (command_switches): Add -h/--help.
2452 Thu Jul 16 14:27:50 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2454 * GNUmakefile (make-$(version).tar.Z): Include NEWS, not CHANGES.
2455 * README.template: Mention NEWS.
2456 * CHANGES: Renamed to NEWS.
2458 * main.c [! STDC_HEADERS] [sun]: Don't declare exit.
2460 Tue Jul 14 18:48:41 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2462 * main.c (main): Set -o files' command_states to cs_finished.
2464 * rule.c (count_implicit_rule_limits): Decrement num_pattern_rules
2465 when tossing a rule.
2467 * main.c (main): Use alloca only in simple local var assignment,
2468 for braindead SGI compiler.
2470 * rule.c (print_rule_data_base): Barf if num_pattern_rules is
2471 inconsistent with the number computed when listing them.
2473 Mon Jul 13 17:51:53 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2475 * commands.c (set_file_variables): For $? and $^ elts that are archive
2476 member refs, use member name only.
2478 Fri Jul 10 00:05:04 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2480 * variable.h (struct variable.export): Add new alternative v_ifset.
2481 * variable.c (target_environment): Check for it.
2482 (define_automatic_variables): Set it for MAKEFILES.
2484 Thu Jul 9 21:24:28 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2486 * compatMakefile (objs): Remove getloadavg.o; $(extras) gets it.
2487 (remote.o): Use $(srcdir)/remote.c, not $remote.c<.
2488 (distclean, mostlyclean): New targets.
2490 Tue Jul 7 19:12:49 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2494 * compatMakefile (config.status): Remove rule.
2496 * job.c (start_waiting_job): Free C after using C->file, not before.
2498 Sat Jul 4 20:51:49 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2500 * commands.c, job.c, main.c, make.h, remote-cstms.c: Use #ifdef
2501 HAVE_* instead of #ifndef *_MISSING.
2502 * configure.in: Use AC_HAVE_FUNCS instead of AC_MISSING_FUNCS (gone).
2504 Thu Jul 2 18:47:52 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2506 * main.c (main): makelevel>0 or -C implies -w.
2508 Tue Jun 30 20:50:17 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2510 * file.c, job.c, function.c: Don't #include <errno.h>.
2511 make.h: Do it here instead.
2512 * arscan.c (ar_member_touch): Don't declare errno.
2514 Thu Jun 25 17:06:55 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2516 * GNUmakefile (make-$(version).tar.Z): Depend on INSTALL, configure.in.
2518 * remake.c (update_file): If commands or deps are running after
2519 update_file_1 returns, break out of the :: rule (->prev) loop and
2522 * job.c (job_next_command): New function; code from start_job.
2523 (start_job_command): Renamed from start_job. Call job_next_command
2524 and recurse for empty command lines and -n.
2525 (start_waiting_job): Call start_job_command, not start_job.
2526 (new_job): Call job_next_command to prime the child structure, and
2527 then call start_waiting_job.
2528 (reap_children): Use job_next_command and start_job_command.
2529 (start_waiting_job): Call start_remote_job_p here, and store its
2530 result in C->remote. If zero, check the load average and
2531 maybe put C on waiting_jobs.
2532 (start_job_command): Test CHILD->remote rather than calling
2533 start_remote_job_p. Don't do load avg checking at all here.
2535 * main.c (main): Don't handle SIGILL, SIGIOT, SIGEMT, SIGBUS,
2536 SIGSEGV, SIGFPE or SIGTRAP.
2538 * compatMakefile (glob/libglob.a): Don't pass srcdir to sub-make.
2539 configure will set it in glob/Makefile.
2541 Wed Jun 24 19:40:34 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2543 * dir.c [DIRENT] (direct): Don't define to dirent.
2544 [! DIRENT] (direct): Define to dirent.
2545 (dir_file_exists_p): Use struct dirent instead of struct direct.
2547 * make.h (getcwd): No space between macro and ( for args!
2549 * job.c (start_job): Don't put the job on waiting_jobs if
2552 * make.texinfo (Missing): Shortened title.
2554 Tue Jun 23 18:42:21 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2556 * file.c (remove_intermediates): Print "rm" commands under -n.
2558 Mon Jun 22 16:20:02 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2562 Fri Jun 19 16:20:26 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2564 * arscan.c [M_UNIX]: #undef M_XENIX.
2566 Wed Jun 17 17:59:28 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2568 * default.c (default_terminal_rules): Put @ prefix on RCS cmds.
2570 Tue Jun 16 19:24:17 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2572 * compatMakefile (getloadavg.o): Removed special rule.
2573 (CFLAGS): Don't include $(defines).
2574 (.c.o): Define suffix rule.
2575 (glob/libglob.a): Pass CPPFLAGS=$(defines) to submake.
2576 (GETOPT_SRC, srcs, tagsrcs): Prefix files with $(srcdir)/.
2578 * arscan.c (ar_name_equal): Moved local vars inside #if'd block.
2580 * make.h (max): Removed.
2581 * expand.c (variable_buffer_output): Don't use it.
2583 * compatMakefile (INSTALL): Define.
2584 (Makefile): New rule to make from Makefile.in.
2587 (getloadavg.o, remote.o): Use autoconf $foo< hack.
2589 * commands.c (fatal_error_signal): Removed return.
2591 Mon Jun 15 17:42:51 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2595 * make.texinfo (Summary): New node.
2596 (Special Targets): Mention .EXPORT_ALL_VARIABLES here.
2598 * variable.c (max): Moved to make.h.
2600 * compatMakefile (objs, srcs): Added ar & arscan.
2602 * job.c (start_waiting_job): New function, 2nd half of new_job.
2604 (start_waiting_jobs): New function.
2605 * remake.c (update_goal_chain): Call start_waiting_jobs at the top
2607 * compatMakefile (objs, srcs): Removed load, added getloadavg.
2609 Fri Jun 12 19:33:16 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2611 * job.c (load_too_high): New function. Uses getloadavg.
2612 (waiting_jobs): New variable.
2613 (start_job): Don't call wait_to_start_job. Instead, if
2614 load_too_high returns nonzero, add the child to the
2615 `waiting_jobs' chain and return without starting the job.
2617 Thu Jun 11 00:05:28 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2619 * expand.c (variable_buffer_output): Made global again.
2620 * variable.h: And declare it.
2622 * arscan.c (PORTAR): Define for all systems if PORT5AR is not defined.
2623 (AR_NAMELEN, AR_TRAILING_SLASH): Removed.
2624 (ar_scan): Don't use it. Don't #ifdef AR_TRAILING_SLASH; just look
2625 for a slash in the archive at run time.
2626 (ar_name_equal): Rewrote .o hacking to not use AR_NAMELEN, and to
2627 cope with trailing-slash and non-trailing-slash archives.
2629 * main.c (main) [! SETVBUF_REVERSED]: Test this instead of USGr3 et al.
2630 [SETVBUF_REVERSED]: Always allocate a buffer ourselves.
2632 * load.c (load_average) [sgi]: Use sysmp call.
2634 * compatMakefile (INSTALL_DATA, INSTALL_PROGRAM): Define.
2635 ($(bindir)/$(instname), $(mandir)/make.$(manext)): Use them.
2637 * make.h [HAVE_VFORK_H]: #include <vfork.h>.
2638 (vfork, VFORK_NAME): Don't define.
2639 * job.c (start_job): Use "vfork" in place of VFORK_NAME.
2641 * make.h [HAVE_LIMITS_H, HAVE_SYS_PARAM_H]: If #define'd, #include
2642 the each file. Rearranged PATH_MAX hacking.
2643 * job.c: Rearranged NGROUPS_MAX hacking.
2645 * remake.c (fstat, time): Don't declare.
2647 * compatMakefile (defines): Value is @DEFS@.
2648 (LOADLIBES): Value is @LIBS@.
2649 (extras): Value is @LIBOBJS@.
2650 (ARCHIVES, ARCHIVES_SRC, ALLOCASRC): Removed.
2651 * arscan.c, ar.c: Surround body with #ifndef NO_ARCHIVES.
2653 * misc.c [! HAVE_UNISTD_H]: Test instead of !POSIX to decl get*id.
2655 * make.h [GETCWD_MISSING]: Test instead of !USG && !POSIX et al.
2656 (getcwd): Just declare if present. If not, declare as a macro
2657 using getwd, and declare getwd.
2658 [PATH_MAX] (GET_PATH_MAX): #define to PATH_MAX.
2659 * main.c (main, log_working_directory): Use getcwd instead of getwd.
2661 * main.c (main) [SETLINEBUF_MISSING]: Test this instead of USG.
2663 * make.h (SIGHANDLER, SIGNAL): Removed.
2664 (RETSIGTYPE): Define if not #define'd.
2665 * main.c (main): Use signal in place of SIGNAL.
2667 * main.c [SYS_SIGLIST_MISSING]: Test instead of USG.
2669 * job.c (search_path) [GETGROUPS_MISSING]: Test instead of USG.
2670 [HAVE_UNISTD_H]: Test instead of POSIX to not decl getgroups.
2672 * main.c [! HAVE_UNISTD_H]: Test instead of !POSIX to decl chdir.
2673 [! STDC_HEADERS]: Test instead of !POSIX to decl exit & atof.
2675 * job.c (child_handler), commands.c (fatal_error_signal): Return
2676 RETSIGTYPE instead of int.
2677 * main.c (main): Declare fatal_error_signal and child_handler here
2678 to return RETSIGTYPE; removed top-level decl of former.
2680 * commands.c (fatal_error_signal), job.c (unblock_sigs, start_job),
2681 main.c [SIGSETMASK_MISSING]: Test this instead of USG.
2683 Wed Jun 10 22:06:13 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2685 * job.c [HAVE_WAITPID]: Test this instead of USG.
2686 [! HAVE_UNISTD_H]: Test this instead of !POSIX to declare misc fns.
2687 (GID_T): Don't #define.
2688 (search_path): Use gid_t instead of GID_T.
2689 [GETDTABLESIZE_MISSING, SYS_SIGLIST_MISSING, DUP2_MISSING]: Test
2690 these individually instead of USG for all.
2691 * make.h (ctime): Don't declare. #include time.h instead.
2692 [HAVE_UNISTD_H]: #include <unistd.h> and #define POSIX #ifdef
2694 * dir.c [__GNU_LIBRARY__] (D_NAMLEN): Define to use d_namlen member.
2695 * make.h [NEED_MEMORY_H]: Only include memory.h #ifdef this.
2697 * arscan.c: Removed #ifdef mess about string.h et al.
2698 Just #include make.h instead.
2699 * make.h (fstat, atol): Declare.
2701 * commands.c (fatal_error_signal): Don't use sigmask to check for
2702 propagated signals; use ||s instead.
2703 (PROPAGATED_SIGNAL_MASK): Removed.
2704 (fatal_error_signal) [POSIX]: Use sigprocmask in place of sigsetmask.
2706 * variable.c (variable_buffer, variable_buffer_length,
2707 initialize_variable_output, variable_output): Moved to expand.c;
2709 (struct output_state, save_variable_output,
2710 restore_variable_output): Removed.
2711 * expand.c (initialize_variable_output): Put a NUL at the beginning
2712 of the new buffer after allocating it.
2713 (allocated_variable_expand_for_file): Don't use
2714 {save,restore}_variable_output. Do it by hand instead, keeping
2715 state on the stack instead of malloc'ing it.
2716 (allocated_variable_expand): Removed.
2717 * variable.h (allocated_variable_expand): Define here as macro.
2718 (variable_buffer_output, initialize_variable_output,
2719 save_variable_output, restore_variable_output): Removed decls.
2721 * read.c (conditional_line): For an if cmd, if any elt of the
2722 conditionals stack is ignoring, just push a new level that ignores
2723 and return 1; don't evaluate the condition.
2725 Thu Jun 4 21:01:20 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2727 * main.c (main): Put #ifdef's around frobbing SIGSYS and SIGBUS.
2729 * job.c (getdtablesize): Don't declare or #define if already #define'd.
2731 Wed Jun 3 23:42:36 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2733 * file.c (snap_deps): If `.EXPORT_ALL_VARIABLES' is a target, set
2734 export_all_variables.
2735 * make.texinfo (Variables/Recursion): Document .EXPORT_ALL_VARIABLES.
2737 Tue Jun 2 21:08:35 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2741 * commands.c (set_file_variables): Calculate length for ^D and ?D
2742 individually, making sure to give them at least enough space for "./".
2744 * make.h [CRAY]: #define signal to bsdsignal.
2746 * default.c (default_variables) [CRAY]: Define PC, SEGLDR,
2747 CF77PPFLAGS, CF77PP, CFT, CF, and FC.
2749 * arscan.c (AR_HDR_SIZE): Define to sizeof (struct ar_hdr), if it
2750 wasn't defined by <ar.h>.
2752 Thu May 28 00:56:53 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2756 Tue May 26 01:26:30 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2758 * rule.c (new_pattern_rule): Initialize LASTRULE to nil, not
2761 Mon May 25 19:02:15 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2763 * main.c (decode_switches): Initialize all the long_option elt members.
2765 Thu May 21 16:34:24 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
2767 * make.texinfo (Text Functions): Correct filter-out description.
2769 Tue May 19 20:50:01 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2771 * compatMakefile (realclean): Don't remove backup files.
2773 * main.c (decode_switches): Allocate ARGC+1 elts in `other_args'.
2775 Sun May 17 16:38:48 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2779 Thu May 14 16:42:33 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2781 * job.c (reap_children): Don't die if wait returns EINTR.
2783 Wed May 13 18:28:25 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2785 * job.c (reap_children): Always run the next command for a
2786 successful target. If we are going to die, we don't want to leave
2787 the target partially made.
2789 Tue May 12 00:39:19 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2791 * job.c (construct_command_argv_internal): After loop, if we only
2792 have one word, check it for being a shell command.
2794 * main.c (decode_switches): Allocate ARGC slots in other_args to
2795 begin with, so we never need to worry about growing it.
2796 If we get a non-option arg and POSIXLY_CORRECT is in the
2797 environment, break out of the loop. After the loop, add all remaining
2798 args to other_args list.
2800 * main.c (decode_switches): For positive_int and floating switches
2801 when optarg is nil, use next arg if it looks right (start with a
2802 digit, or maybe decimal point for floating).
2804 * variable.c (define_automatic_variables): Always set SHELL to
2805 default if it comes from the environment. Set its export bit.
2806 * make.texinfo (Environment): Document change.
2808 Mon May 11 00:32:46 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2812 * compatMakefile (tags, TAGS): Use vars for cmds.
2813 (ETAGS, CTAGS): Define.
2815 * main.c (decode_switches): If a switches elt has a nil long_name,
2816 make the long option name elt be "".
2817 Fixed loop to not ignore all the options.
2819 * make.texinfo (Option Summary): Added long options.
2821 * main.c (switches): Changed -m's description to "-b".
2822 (decode_switches): When printing the usage message, don't print
2823 switches whose descriptions start with -.
2824 When constructing the list of names for switch -C, search the
2825 switches vector for switches whose descriptions are "-C".
2827 * main.c (switches): Call -S --no-keep-going, not --dont-keep-going.
2828 Call -I --include-dir, not --include-path.
2829 (long_option_aliases): Added --new == -W, --assume-new == -W,
2830 --assume-old == -o, --max-load == -l, --dry-run == -n, --recon == -n,
2833 * main.c (switches): Removed bogus "silent" elt.
2834 (long_option_aliases): Define new var.
2835 (decode_switches): Add long_option_aliases onto the end of the long
2836 options vector created for getopt_long.
2837 Look through long_option_aliases for extra names to list
2840 Sat May 9 00:21:05 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2842 * main.c (log_working_directory): Fixed to properly not print the
2843 leaving message when we haven't printed the entering message.
2845 Fri May 8 21:55:35 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2847 * main.c (struct command_switch): Added elts `long_name',
2848 `description', and `argdesc'.
2849 (switches): Added initializers for new members.
2850 (decode_switches): Rewritten to use getopt_long.
2851 * compatMakefile (GETOPT, GETOPT_SRC): Define.
2852 (objs, srcs): Include them.
2854 * job.c (child_died): Renamed to dead_children; made static.
2855 (child_handler): Increment dead_children instead of setting child_died.
2856 (reap_children): Decrement dead_children instead of clearing
2857 child_died. The point of all this is to avoid printing "waiting
2858 for unfinished jobs" when we don't actually need to block.
2859 This happened when multiple SIGCHLDs before reap_children was called.
2861 * job.c (reap_children): If ERR is set, so we don't call start_job
2862 on the child being reaped, instead set its command_state to
2864 (reap_children, child_handler, new_job): I added several
2865 debugging printf's while fixing this. I left them in if (debug_flag)
2866 because they may be useful for debugging this stuff again.
2868 Wed May 6 22:02:37 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2870 * read.c (read_makefile): v_export is not 1.
2872 Mon May 4 17:27:37 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2876 * variable.c (export_all_variables): New variable.
2877 (target_environment): Export variables whose `export' member is
2878 v_default if export_all_variables is set and their names are benign.
2879 * variable.h: Declare export_all_variables.
2880 * read.c (read_makefile): If export or unexport is given with no
2881 args, set or clear export_all_variables, respectively.
2883 * variable.c (target_environment): Exclude MAKELEVEL in the loop,
2884 so it isn't duplicated when we add it at the end.
2886 Sun May 3 17:44:48 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2890 * variable.h (struct variable): Added new member `export'.
2891 * variable.c (define_variable_in_set): Initialize it to v_default.
2892 (target_environment): Don't check for .NOEXPORT.
2893 Export variables whose `export' member is v_default and that would
2894 have been exported under .NOEXPORT, and variables whose `export'
2896 (try_variable_definition): Return the variable defined.
2897 * variable.h (try_variable_definition): Changed decl.
2898 * read.c (read_makefile): Recognize `export' and `unexport' directives.
2900 Fri May 1 11:39:38 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2902 * main.c (main) [POSIX]: Reversed args to sigaddset.
2904 Thu Apr 30 17:33:32 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2906 * job.c [POSIX || !USG] (unblock_sigs): New fn.
2907 (start_job): Block signals before forking.
2908 (new_job): Unblock signals after putting the new child on the chain.
2909 * main.c (main) [POSIX]: Use sigset_t fatal_signal_set instead of
2910 int fatal_signal_mask.
2912 * load.c [sgi] (LDAV_CVT): Define.
2914 Wed Apr 29 17:15:59 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2918 * load.c (load_average) [sgi]: Clear the high bit of the address
2919 from the symbol table before looking it up in kmem.
2921 * misc.c (fatal, makefile_fatal): Put *** in fatal error messages.
2922 (remake_file): No longer needed in message here.
2924 * main.c (die): Call reap_children with BLOCK==1.
2926 Tue Apr 28 20:44:35 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2928 * rule.c (freerule): Don't set LASTRULE->next if LASTRULE is nil.
2930 Sun Apr 26 15:09:51 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2932 * rule.c (count_implicit_rule_limits): Initialize LASTRULE to nil,
2933 not to head of chain. Extract next ptr before we might do
2934 freerule, and use that for next iteration.
2935 (freerule): Still do next ptr frobbing if LASTRULE is nil.
2937 Tue Apr 21 03:16:29 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2939 * job.c (child_error): Removed extra %s from error msg format.
2943 * job.c (reap_children): Don't start later commands in a sequence
2946 * job.c (new_job): Always call reap_children with BLOCK==0 first thing.
2948 * job.c (reap_children): New function; work that used to be done in
2950 (child_died): New global var.
2951 (child_handler): Now just sets child_died.
2952 (wait_for_children): Removed.
2953 (unknown_children_possible, block_signals, unblock_signals,
2954 push_signals_blocked_p, pop_signals_blocked_p): Removed.
2955 (child_execute_job): Removed call to unblock_signals.
2956 (new_job): Removed calls to push_signals_blocked_p and
2957 pop_signals_blocked_p.
2958 * job.h: Declare reap_children, not wait_for_children.
2959 * commands.c (fatal_error_signal), job.c (new_job),
2960 load.c [LDAV_BASED] (wait_to_start_job), main.c (die),
2961 remake.c (update_goal_chain), function.c (expand_function: `shell'):
2962 Changed wait_for_children calls to reap_children.
2963 Some needed to be loops to wait for all children to die.
2964 * commands.c (fatal_error_signal), main.c (main,
2965 log_working_directory), function.c (expand_function): Removed calls
2966 to push_signals_blocked_p and pop_signals_blocked_p.
2967 * job.h: Removed decls.
2969 * job.h: Added copyright notice.
2971 Wed Apr 15 02:02:40 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2973 * job.c (child_error): No *** for ignored error.
2975 Tue Apr 14 18:31:21 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2977 * implicit.c (DEBUGP2): Use do ... while (0) instead of if ... else to
2978 avoid compiler warnings.
2980 * read.c (parse_file_seq): Don't remove ./ when it is followed by a
2983 Mon Apr 13 21:56:15 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2985 * make.h (DEBUGPR): Use do ... while (0) instead of if ... else to
2986 avoid compiler warnings.
2988 * remake.c (notice_finished_file): Run file_mtime on the also_make
2989 files, so vpath_search can happen.
2991 * GNUmakefile (tests): Use perl test suite from csa@sw.stratus.com.
2992 (alpha-files): Include test suite tar file.
2994 Fri Apr 3 00:50:13 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2998 Wed Apr 1 05:31:18 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3000 * remake.c (update_file, update_file_1): Do check_renamed on elts
3001 of dep chains when traversing them. Something unrelated might have
3002 renamed one of the files the dep chain points to.
3004 * file.c (rename_file): If FILE has been renamed, follow its
3005 `renamed' ptr, so we get to the final real FILE. Using the renamed
3006 ones loses because they are not in the hash table, so the removal
3007 code loops infinitely.
3009 * read.c (read_all_makefiles): Clobber null terminator into
3010 MAKEFILES expansion, so string passed to read_makefile is properly
3013 Mon Mar 30 20:18:02 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3015 * commands.c (set_file_variables): $* for archive member with
3016 explicit cmds is stem of member, not of whole `lib(member)'.
3018 Thu Mar 26 15:24:38 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3022 Tue Mar 24 05:20:51 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3024 * rule.c (new_pattern_rule): Rules are identical only if all their
3025 targets match (regardless of order).
3027 Wed Mar 11 13:49:54 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3029 * remake.c (remake_file): Changed error "no way to make" to "no
3030 rule to make". Fiat Hugh.
3032 * make.texinfo (Last Resort): Describe %:: rules and new .DEFAULT
3035 * remake.c (update_file_1): Only use .DEFAULT cmds if FILE is not a
3038 Tue Mar 10 18:13:13 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3040 * remote-stub.c, remote-cstms.c (start_remote_job): Take new arg,
3041 environment to pass to child.
3042 * job.c (start_job): Pass it.
3044 Mon Mar 9 19:00:11 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3046 * file.c (enter_file): Also strip ./s here, to get command-line
3049 * remote-cstms.c: Add comment telling people to leave me alone.
3051 * compatMakefile (manpage install): Remove target before copying.
3053 Tue Mar 3 18:43:21 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3055 * make.texinfo (Missing): Renamed to "Incompatibilities and ...".
3056 Added paragraph describing $? incompatibility with Unix and POSIX.2.
3058 Sun Mar 1 15:50:54 1992 Roland McGrath (roland@nutrimat.gnu.ai.mit.edu)
3060 * function.c (expand_function: `shell'): Don't declare fork or pipe.
3061 Use vfork instead of fork.
3063 Tue Feb 25 22:05:32 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3065 * make.texinfo (Chained Rules): Clarify .PRECIOUS to save
3068 * load.c [sun] (LDAV_CVT): Define to divide by FSCALE.
3070 Sun Feb 16 02:05:16 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3074 Sat Feb 15 17:12:20 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3076 * compatMakefile (makeinfo): Use emacs batch-texinfo-format fn.
3078 Fri Feb 14 00:11:55 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3080 * read.c (read_makefile): Correctly handle define & endef in ifdefs.
3082 * read.c (record_files): Pass arg for %s in error msg.
3084 * main.c (main) [__IBMR2, POSIX]: Use correct (a la USGr3) setvbuf
3087 Wed Feb 12 12:07:39 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3089 * make.texinfo (Libraries/Search): Say it does /usr/local/lib too.
3091 Sun Feb 9 23:06:24 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3093 * read.c (read_makefile): Check for extraneous `endef' when ignoring.
3095 Thu Feb 6 16:15:48 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3099 Tue Feb 4 20:04:46 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3101 * job.c (construct_command_argv_internal): Correctly ignore
3102 whitespace after backslash-NL.
3104 Fri Jan 31 18:30:05 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3106 * compatMakefile: Ignore errors from chgrp and chmod when installing.
3108 Wed Jan 29 18:13:30 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3110 * main.c (main): When setting MAKELEVEL in the env to re-exec,
3111 allocate space so as not to clobber past the end of the old string.
3113 * make.h [HAVE_ALLOCA_H]: Include <alloca.h>
3114 * compatMakefile (defines): Document HAVE_ALLOCA_H.
3116 Mon Jan 20 13:40:05 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3118 * make.h [VFORK_MISSING]: Use fork instead.
3119 * compatMakefile (defines): Document same.
3121 * job.c (construct_command_argv_internal): Don't create an empty
3122 arg if backslash-NL is at beginning of word.
3124 Sun Jan 19 16:26:53 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3126 * main.c [DGUX]: Call setvbuf as for USGr3.
3128 * job.c (construct_command_argv_internal): Notice correctly that
3129 backslash-NL is the end of the arg (because it is replaced with a
3132 Thu Jan 16 18:42:38 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3134 * job.c (construct_command_argv_internal): If SHELL is nil, set it
3135 to default_shell before proceeding.
3137 * make.h [sgi]: No alloca.h, after all.
3139 Wed Jan 15 12:30:04 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3141 * read.c (multi_glob): Cons up the chain of the results of glob
3142 from back to front, so it comes out in forward order.
3144 * job.c (construct_command_argv_internal): Don't eat char following
3147 Mon Jan 13 19:16:56 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3151 * default.c (default_variables) [ultrix]: GET=get, like USG.
3153 * job.c (construct_command_argv_internal): Remove tabs following
3154 backslash-NL combos in the input line, so they don't show up when
3155 that line is printed.
3157 * read.c (read_makefile): Don't collapse_continuations the line on
3158 input; do it on the copy we do remove_comments on.
3159 For rule lines, collapse_continuations the line after chopping
3160 ";cmds" off the end, so we don't eat conts in the cmds.
3161 Give error for ";cmds" with no rule.
3162 * job.c (construct_command_argv_internal): Eat backslash-NL combos
3163 when constructing the line to recurse on for slow, too.
3165 Sat Jan 11 02:20:27 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3167 * file.c (enter_file): Don't strip leading `./'s.
3168 * read.c (parse_file_seq): Take new arg STRIP; if nonzero, do it here.
3169 * default.c (set_default_suffixes), function.c (string_glob),
3170 read.c (read_makefile), rule.c (install_pattern_rule): Change callers.
3172 * default.c (default_variables) [_IBMR2]: FC=xlf
3174 * job.c (construct_command_argv_internal): Turn backslash-NL and
3175 following whitespace into a single space, rather than just eating
3178 * make.texinfo (Copying): @include gpl.texinfo, rather than
3179 duplicating its contents.
3181 Fri Nov 8 20:06:03 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3183 * job.c (construct_command_argv_internal): Make sure not to bother
3184 processing an empty line.
3188 * job.c (construct_command_argv_internal): Always recurse for slow;
3189 simple case didn't handle finding newlines.
3191 Tue Nov 5 18:51:10 1991 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3193 * job.c (construct_command_argv_internal): Set RESTP properly when
3194 slow; don't \ify past a newline.
3196 Fri Nov 1 19:34:28 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3198 * make.h [sgi]: #include <alloca.h>.
3200 Tue Oct 29 20:57:36 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3204 * remake.c (update_file_1): Check for deps still running before
3205 giving up if any dep has failed.
3207 Sat Oct 26 16:20:00 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3209 * make.h [uts]: #undef S_ISREG and S_ISDIR if defined.
3211 Fri Oct 25 19:50:39 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3215 Thu Oct 24 16:58:36 1991 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3217 * job.c (start_job): Don't check for empty cmds before tweaking the
3218 command_ptr. Just let construct_command_argv do it.
3220 Tue Oct 22 20:21:03 1991 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3222 * remake.c, arscan.c [POSIX]: <fcntl.h> instead of <sys/file.h>.
3224 * make.h [POSIX]: Declare vfork as pid_t.
3226 Mon Oct 21 15:37:30 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3230 * job.c (construct_command_argv, construct_command_argv_internal):
3231 Take new 2nd arg RESTP. If non-NULL, stop parsing at newline, and
3232 store addr of the NL in *RESTP.
3233 (start_job): Don't chop expanded cmd lines up; use above code to do it.
3234 * function.c (expand_function: `shell'): Pass RESTP==NULL.
3236 Sat Oct 19 15:36:34 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3240 Fri Oct 18 15:26:55 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3242 * job.c (start_job): If on the same cmds->command_lines elt, look
3243 at cmds->lines_recurse[CHILD->command_line - 1] instead of
3244 [CHILD->command_line].
3246 * dir.c [sgi]: <sys/dir.h>, not ndir or anything else.
3248 Thu Oct 17 16:28:55 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3250 * file.c (print_file_data_base): Remove unused var.
3252 * make.h [NeXT]: No #define ANSI_STRING.
3254 Tue Oct 15 20:08:41 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3258 Fri Oct 11 16:23:52 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3260 * make.h: Use PATH_MAX for getwd defn.
3262 * make.h: Move getcwd/getwd outside of #ifndef POSIX, and make it
3265 Thu Oct 10 11:53:31 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3269 * read.c (read_all_makefiles): When processing MAKEFILES, save the
3270 malloc'd ptr to be freed, instead of freeing part-way thru it.
3272 * remake.c (update_file_1): Don't tweak FILE->also_make.
3273 (update_file): Do it here. After calling update_file_1, set the
3274 command_state, update_status, and updated members of each also_make
3275 elt to FILE's values.
3277 Tue Oct 8 14:56:04 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3281 * remake.c (notice_finished_file): Set command_state of FILE and
3282 its also_make chain to cs_finished here.
3283 * commands.c (execute_file_commands), job.c (child_handler),
3284 remake.c (remake_file): Don't set it before calling
3285 notice_finished_file.
3287 * file.h (struct file): Changed `also_make' to struct dep *.
3288 * job.c (delete_child_targets), file.c (print_file_data_base),
3289 remake.c (notice_finished_file), implicit.c (pattern_search):
3290 Use dep chain instead of array of file names.
3292 Mon Oct 7 17:04:33 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3296 * arscan.c: Declare open.
3297 * misc.c: Declare {get,set}{re,}[ug]id.
3298 * variable.c (target_environment): Declare getenv.
3300 Sat Oct 5 15:13:03 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3302 * make.h [NeXT]: <string.h> instead of <strings.h>.
3304 Fri Oct 4 16:05:41 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3306 * default.c (default_suffixes, defualt_suffix_rules): Add .texi
3311 * job.c: Move vfork decl into make.h.
3313 Fri Sep 27 18:45:30 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3315 * compatMakefile (glob/libglob.a): Pass CC value to submake.
3317 Thu Sep 26 00:08:15 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3319 * load.c (load_average): Made not static.
3321 * load.c [ultrix && vax]: Define LDAV_TYPE and LDAV_CVT for Ultrix 4.2.
3323 Tue Sep 24 00:17:20 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3327 * read.c (record_files): Warn about extra cmds even if the target's
3328 name begins with a dot. I think the lusers can handle this.
3330 Mon Sep 23 22:33:26 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3332 * make.h, arscan.c: Don't declare bcmp, bzero, or bcopy if they're
3334 * make.h: Declare write and open.
3336 * default.c (default_suffixes, default_suffix_rules,
3337 default_variables): Add .C just like .cc.
3338 * make.texinfo (Catalogue of Rules): Document .C.
3340 * make.man (-w): Fix gramo.
3342 Fri Sep 20 17:18:16 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3344 * make.h: No text after #endif.
3346 Sun Sep 15 16:20:46 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3350 * implicit.c (pattern_search): In the second pass, recurse on rule
3351 deps that don't have a %. Why did I make it not do this?
3353 Fri Sep 14 18:29:39 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3355 * read.c (record_files): For extra cmds, use the last ones given.
3356 If the target's name doesn't begin with a dot (bletch!!), emit a
3357 two-line warning, one line giving the old cmds' location and the
3358 other the new cmds' location.
3360 * misc.c (makefile_error, makefile_fatal): New fns.
3361 * make.h: Declare them.
3362 * Use them instead of error/fatal for all msgs including a file
3363 name and line number.
3365 Thu Sep 13 16:35:54 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3367 * make.h: Declare define_default_variables.
3368 Declare ar_parse_name, instead of ar_name_parse (M-t).
3370 Mon Sep 10 18:35:40 1991 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3374 * make.texinfo (Variables: Setting): Say whitespace is removed if
3375 "immediately after =", rather than simply "after =".
3377 * job.c: Don't declare wait #ifdef POSIX.
3379 * make.h [__GNUC__]: #undef alloca and then #define it.
3381 * main.c (main): When pruning makefiles which might loop from the
3382 read_makefiles chain, look at all `prev' entries of double-colon rules.
3384 Fri Sep 7 00:41:53 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3386 * main.c (main): Only remove makefiles with cmds but no deps from
3387 the list of makefiles to be rebuilt if they are :: targets.
3388 : targets with cmds and no deps are not dangerous.
3390 Wed Sep 5 17:35:51 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3392 * compatMakefile (defines): Add comment that some compilers take
3393 ENUM_BITFIELDS but produce bogus code.
3394 (LOAD_AVG): Fix examples to \ "s.
3395 (LOADLIBES): Add comment that SGI Irix needs -lmld for nlist.
3397 Tue Sep 4 20:26:26 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3401 Fri Aug 30 19:34:04 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3403 * remake.c (update_file_1): When checking the command_state of
3404 deps, check through the prev chain.
3405 (update_goal_chain): When a target is finished, start checking its
3406 prev (if it has one) instead.
3408 Wed Aug 7 17:32:03 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3410 * rule.c (convert_to_pattern): Allow files with deps to define
3411 suffix rules (really this time).
3413 Mon Aug 5 17:09:21 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3415 * misc.c (user_access, make_access): Do saved-IDs (USG) flavor
3418 * file.c (enter_file): Strip ./s here.
3419 * read.c (parse_file_seq): Not here.
3421 Tue Jul 23 23:34:30 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3423 * compatMakefile: Added comment that -lPW alloca is broken on HPUX.
3425 Thu Jul 18 03:10:41 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3429 * read.c (read_makefile): Ignore lines containing chars that are
3430 all isspace, not just all isblank.
3432 * make.texinfo (Copying): @include gpl.texinfo, rather than copying
3434 * gpl.texinfo: New file (symlink to /gd/gnu/doc/gpl.texinfo).
3435 * GNUmakefile: Put gpl.texinfo in distribution.
3437 Tue Jul 16 12:50:35 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3439 * make.h: #define _GNU_SOURCE before including headers.
3440 Include <ctype.h> and define isblank if <ctype.h> doesn't.
3441 * commands.c: Don't include <ctype.h> here.
3442 * *.c: Use isblank instead of explicit ' ' || '\t'.
3444 Mon Jul 15 17:43:38 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3446 * function.c (expand_function: `filter'/`filter-out'): Fixed to not
3449 Fri Jul 12 12:18:12 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3451 * function.c (expand_function: `filter'/`filter-out'): Rewritten to
3452 handle filter-out of multiple patterns properly. Also no longer
3453 mallocs and reallocs for temp array; uses alloca and a linked-list
3456 Wed Jul 10 22:34:54 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3460 * make.texinfo: Moved some @groups that were outside @examples to
3463 * load.c [apollo] (load_average): Define using special syscall for
3464 Apollo DOMAIN/OS SR10.n.
3466 Thu Jul 4 12:32:53 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3468 * make.texinfo (Missing): Added Unix excessive implicit rule
3469 search; mention that POSIX.2 doesn't require any of the missing
3471 (Top): Updated printed manual price to $15.
3473 Wed Jul 3 18:17:50 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3475 * file.c (rename_file): Carry over last_mtime when merging files.
3476 * remake.c (f_mtime): Tail-recurse after renaming VPATH file, to
3477 check for saved date in existing renamed-to file.
3479 * remote-cstms.c (start_remote_job): Use PATH_VAR.
3481 * commands.c [POSIX || __GNU_LIBRARY__]: Don't declare getpid.
3483 * compatMakefile (glob-{clean,realclean}): Run clean/realclean in glob.
3484 (clean, realclean): Require those.
3486 * make.h: Always declare environ.
3487 Don't declare old glob functions.
3489 * GNUmakefile: Make no-lib deps for load.c and remote.c.
3491 Tue Jul 2 18:35:20 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3495 Mon Jul 1 16:58:30 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3497 * read.c (multi_glob): Don't pass GLOB_QUOTE flag to glob.
3499 * make.h [POSIX]: Include <unistd.h>, and don't declare things that
3502 * main.c (main) [USG && sgi]: malloc a buffer for broken sgi stdio.
3504 Sat Jun 29 11:22:21 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3506 * function.c (expand_function: `shell'): Use alloca for the error
3507 msg buffer, instead of assuming an arbitrary max size.
3509 Fri Jun 28 18:15:08 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3511 * job.c [POSIX] (search_path): Do real 1003.1 goop to get NGROUPS_MAX.
3513 Wed Jun 26 11:04:44 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3515 * default.c (define_default_variables): New fn.
3516 (install_default_implicit_rules): Code for above fn moved there.
3517 * main.c (main): Do define_default_variables before reading the
3520 Tue Jun 25 17:30:46 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3522 * main.c (main): Quote ; in MAKEOVERRIDES.
3524 Tue Jun 18 13:56:30 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3526 * compatMakefile: Fixed typo in comment.
3528 Tue Jun 11 00:14:59 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3532 Mon Jun 10 14:46:37 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3534 * make.h: Always include <sys/types.h>.
3535 [POSIX]: Include <limits.h> and #define MAXPATHLEN to be PATH_MAX.
3537 * default.c (default_suffix_rules: .texinfo.dvi): Use $(TEXI2DVI).
3538 (default_variables): Define TEXI2DVI.
3540 Thu Jun 6 16:49:19 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3544 * make.h (SIGNAL): Cast handler arg to SIGHANDLER type.
3546 Wed Jun 5 06:00:43 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3548 * read.c (multi_glob): Use POSIX.2 `glob' function.
3549 If a glob pattern matches nothing, leave it as is (a la sh, bash).
3550 Also, if can't find USER for ~USER, leave it as is (a la bash).
3552 Mon Jun 3 16:36:00 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3554 * compatMakefile: Rewrote comments about -Ds to be easier to use.
3556 * make.h, arscan.c, remake.c, main.c, dir.c, job.c: Changed tests
3557 of _POSIX_SOURCE to POSIX.
3559 * job.c: Take getdtablesize out of #ifdef __GNU_LIBRARY__.
3560 Put separately #ifdef USG.
3562 * COPYING: Replaced with version 2.
3563 * Changed copyright notices to refer to GPL v2.
3565 Thu May 30 00:31:11 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3567 * make.h: Don't declare sigblock for POSIX.
3569 * main.c (main, log_working_directory) [USG]: Get getcwd failure
3570 mode from errno, not passed buffer like BSD getwd.
3572 * misc.c (child_access): New fn to set access for a child process;
3573 like user_access, but you can't change back.
3574 * make.h: Declare it.
3575 * job.c (exec_command): Use it in place of user_access.
3577 Wed May 29 23:28:48 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3579 * default.c (default_variables) [pyr]: PC = pascal.
3581 Tue May 28 20:24:56 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3583 * variable.c (print_variable): Put a newline before `endef'.
3585 Sat May 25 02:39:52 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3589 Wed May 22 19:41:37 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3593 Thu May 16 13:59:24 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3595 * main.c (main): Do USGr3 setvbuf behavior #ifdef APOLLO.
3596 Don't handle SIGCHLD #ifdef USG (Apollo is USG but defines SIGCHLD).
3598 Fri May 10 14:59:33 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3600 * remake.c [sgi]: Don't include <sys/file.h>.
3602 Wed May 8 01:54:08 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3604 * make.h (SIGHANDLER): #define as (void *) #if __STDC__,
3606 (SIGNAL): Use it to cast return value.
3607 * main.c (main): Cast SIG_IGN to SIGHANDLER when comparing.
3608 * job.c (block_signals, unblock_signals): Use SIGNAL instead of signal.
3610 * main.c: Declare mktemp to return char*, not int.
3612 * job.c (new_job): Don't increment files_remade.
3613 * remake.c (notice_finished_file): Do it here.
3615 * read.c (do_define): Don't clobber DEFINITION[-1] on empty defns.
3616 Free storage that is no longer needed.
3618 Wed Apr 24 20:49:48 1991 Roland McGrath (roland at churchy.gnu.ai.mit.edu)
3620 * misc.c (message): New fn to print informational msgs with
3621 leading "make: " or "make[N]: ".
3622 * make.h: Declare it.
3623 * remake.c (update_file): Use it instead of printf.
3625 Fri Apr 19 05:52:45 1991 Roland McGrath (roland at churchy.gnu.ai.mit.edu)
3627 * main.c (main): When there are no targets, if there were no
3628 makefiles, print a different error message, which mentions makefiles.
3630 Tue Apr 16 03:22:45 1991 Roland McGrath (roland at geech.gnu.ai.mit.edu)
3632 * remake.c (update_file): Print "nothing to be done" instead of "is
3633 up to date" if FILE->cmds == 0.
3635 * job.c [!WIFEXITED]: Define if not already defined.
3637 Thu Apr 11 18:00:50 1991 Roland McGrath (roland at wookumz.gnu.ai.mit.edu)
3639 * arscan.c (ar_name_equal): Fixed truncation comparison.
3641 Tue Apr 2 16:17:35 1991 Roland McGrath (roland at churchy.gnu.ai.mit.edu)
3643 * glob.c: Use common version from djm.
3644 * dir.c: Snarfed #ifdef mess for <dirent.h> or whatever from glob.c.
3645 (dir_file_exists_p): Ignore directory entries with d_ino==0.
3647 Mon Apr 1 20:49:45 1991 Roland McGrath (roland at albert.gnu.ai.mit.edu)
3651 Fri Mar 29 19:16:18 1991 Roland McGrath (roland at albert.gnu.ai.mit.edu)
3653 * job.c (free_child): Free CHILD->environment and its elts.
3655 Sat Mar 23 14:08:09 1991 Roland McGrath (roland at albert.gnu.ai.mit.edu)
3657 * read.c (read_makefile): Don't ignore lines containing only
3658 comments if they start with a tab. Such lines should be passed to
3659 the shell for it to decide about the comments.
3661 * job.c (free_child): Free CHILD->command_lines and its elts, not
3662 CHILD->commands (which is obsolete).
3663 * job.h, job.c: Remove obsolete `commands' member of `struct child'.
3665 Sun Mar 17 18:40:53 1991 Roland McGrath (roland at albert.ai.mit.edu)
3667 * remake.c (update_file): Print a msg for a top-level up-to-date
3668 phony target (a different one than for a real file).
3670 * read.c (conditional_line): Boundary check so we don't check the
3671 value of the -1th elt of the stack (which is bogus).
3673 Sat Mar 16 16:58:47 1991 Roland McGrath (roland at albert.ai.mit.edu)
3675 * read.c (conditional_line): Don't evaluate an if* when we're
3676 already ignoring. Instead, just push a new level, with a value of
3677 1, to keep ignoring.
3679 Tue Mar 12 00:16:52 1991 Roland McGrath (roland at geech.ai.mit.edu)
3683 Mon Mar 11 23:56:57 1991 Roland McGrath (roland at geech.ai.mit.edu)
3685 * job.c (construct_command_argv_internal): Quote backslashes
3686 when building the shell -c line.
3688 Fri Mar 8 01:40:18 1991 Roland McGrath (roland at geech.ai.mit.edu)
3690 * job.c (exec_command): Call user_access rather than setgid(getgid()).
3692 * misc.c (remove_comments): Renamed from collapse_line; took out
3693 collapse_continuations call.
3694 * make.h: Change decl.
3695 * read.c (read_makefile): Collapse continuations on the line buffer
3696 immediately after reading it. Call remove_comments rather than
3697 collapse_line (which is now defunct).
3699 Thu Feb 21 18:06:51 1991 Roland McGrath (mcgrath at cygint.cygnus.com)
3701 * misc.c (user_access, make_access): New fns to toggle btwn permissions
3702 for user data (files and spawning children), and permissions for make
3703 (for taking the load average, mostly).
3704 * make.h: Declare them.
3705 * job.c (start_job): Call make_access before wait_to_start_job, and
3707 * main.c (main): Call user_access before doing much.
3709 Mon Feb 3 15:02:03 1991 Roland McGrath (roland at albert.ai.mit.edu)
3713 Tue Jan 29 20:30:50 1991 Roland McGrath (roland at cygint.cygnus.com)
3715 * read.c (read_all_makefiles): Use allocated_variable_expand to expand
3716 `$(MAKEFILES)', since the results are used across calls to
3717 read_makefile, which could clobber them.
3719 Wed Jan 23 00:24:10 1991 Roland McGrath (roland at cygint.cygnus.com)
3721 * main.c (main): Call install_default_implicit_rules after reading
3722 makefiles, not before.
3723 * default.c (install_default_implicit_rules): If a suffix-rule file
3724 entry has cmds, don't give it any from default_suffix_rules.
3726 Fri Jan 17 17:39:49 1991 Roland McGrath (roland at albert.ai.mit.edu)
3728 * arscan.c: Added support for AIX archives.
3730 * remake.c: Don't include ar.h.
3731 * main.c: Removed unused atol decl.
3732 * arscan.c (ar_scan): Declare arg FUNCTION to return long int.
3733 * ar.c (ar_touch): Don't perror for an invalid archive.
3734 * make.h: Declare lseek as long int.
3736 * job.c [hpux]: Define getdtablesize a la USG.
3738 Sun Jan 12 21:08:34 1991 Roland McGrath (roland at albert.ai.mit.edu)
3742 Fri Jan 10 03:48:08 1991 Roland McGrath (roland at albert.ai.mit.edu)
3744 * job.c (search_path): Take new arg, place to put full pathname (rather
3746 (exec_command): Pass it, using auto storage.
3748 * main.c (print_version): Updated copyright years.
3750 Wed Jan 8 19:46:19 1991 Roland McGrath (roland at albert.ai.mit.edu)
3752 * job.c [_POSIX_SOURCE]: Just #include <sys/wait.h>, and define macro
3753 WAIT_NOHANG in terms of waitpid.
3754 [!_POSIX_SOURCE && (HAVE_SYS_WAIT || !USG)]: Don't #include <signal.h>
3756 Define macro WAIT_NOHANG in terms of wait3.
3757 (child_handler): #ifdef on WAIT_NOHANG, not HAVE_SYS_WAIT || !USG.
3758 Use WAIT_NOHANG macro instead of wait3.
3760 * file.h (struct file.command_state): Remove unused elt.
3762 Wed Dec 26 18:10:26 1990 Roland McGrath (roland at albert.ai.mit.edu)
3764 * commands.c (set_file_variables): If FILE got its commands from
3765 .DEFAULT, make $< == $@ (4.3 BSD/POSIX.2d11 compat).
3767 Mon Dec 24 17:36:27 1990 Roland McGrath (roland at albert.ai.mit.edu)
3769 * default.c (default_variables): Rename 2nd LINK.s defn to LINK.S.
3771 Fri Dec 14 15:05:25 1990 Roland McGrath (roland at albert.ai.mit.edu)
3773 * vpath.c (selective_vpath_search): Check for makefile-mentioned before
3774 checking for actual existence. The old order loses if the containing
3775 directory doesn't exist (but a rule might make it).
3777 * make.h [__GNUC__]: Don't #define alloca if already #define'd.
3779 * rule.c (convert_to_pattern): Don't look at the target constructed for
3780 the empty rule when making the null-suffix rule. Construct it over
3781 again, since the former may have been freed already.
3783 Thu Dec 13 17:21:03 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3785 * make.h [__GNU_LIBRARY__]: Include <unistd.h> to get random fn decls.
3787 Wed Dec 12 17:12:59 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3789 * make.h, arscan.c, glob.c: Only include <memory.h> #ifdef USG.
3791 * variable.c (define_variable_in_set): Replace env_overrides check that
3792 wasn't really redundant (undoing Sep 28 change). Add comment saying
3793 why this check is necessary.
3795 * job.c, main.c [DGUX]: Needs siglist like USG.
3797 Mon Dec 11 01:19:29 1990 Roland McGrath (roland at albert.ai.mit.edu)
3799 * default.c [M_XENIX]: For rules that are different for Xenix, use the
3800 generic Unix version #ifdef __GNUC__.
3802 * main.c [M_XENIX]: Use USGr3-style setvbuf call.
3804 * read.c (find_percent): Do backslash folding correctly, not leaving
3805 extra crud on the end of the string.
3807 Sun Dec 10 21:48:36 1990 Roland McGrath (roland at albert.ai.mit.edu)
3809 * job.c: Don't declare wait3 if it's #defined.
3811 * GNUmakefile, compatMakefile, make.texinfo: Change make-info
3814 Thu Dec 7 21:20:01 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3816 * make.h [STDC_HEADERS || __GNU_LIBRARY__ || _POSIX_SOURCE]: Use
3817 ANSI <string.h> and names for str/mem functions.
3818 Use <stdlib.h> to declare misc fns rather than explicit decls.
3819 [_POSIX_SOURCE]: Don't declare kill (<signal.h> will).
3820 Include <sys/types.h> before <signal.h> because some braindead
3821 nonconformant 1003.1 implementation needs it.
3822 * misc.c: Don't declare malloc, realloc. Do it in make.h.
3823 * arscan.c, glob.c: Use sequence for string fns from make.h verbatim.
3824 * make.h (S_ISDIR, S_ISREG): Declare if necessary.
3825 * commands.c (delete_child_targets), job.c (search_path), read.c
3826 (construct_include_path): Use S_ISfoo(m) instead of
3827 (m & S_IFMT) == S_IFfoo.
3828 * dir.c, glob.c [_POSIX_SOURCE]: Use dirent.
3830 Wed Nov 29 22:53:32 1990 Roland McGrath (roland at geech.ai.mit.edu)
3834 Tue Nov 28 16:00:04 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3836 * arscan.c (ar_name_equal) [APOLLO]: Don't do `.o' hacking. On Apollos
3837 the full file name is elsewhere, and there is no length restriction (or
3840 Thu Nov 23 17:33:11 1990 Roland McGrath (roland at albert.ai.mit.edu)
3842 * load.c [hp300 && BSD] (LDAV_CVT): Define for this system.
3844 Tue Nov 21 07:58:40 1990 Roland McGrath (roland at albert.ai.mit.edu)
3846 * read.c (record_files): Fix trivial bug with deciding to free storage
3849 Thu Nov 16 06:21:38 1990 Roland McGrath (roland at geech.ai.mit.edu)
3851 * compatMakefile ($(bindir)/make): Install it setgid kmem.
3853 Thu Nov 1 16:12:55 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3855 * GNUmakefile (make-*.tar.Z): Use `h' option to tar (dereference
3856 symlinks), to grab texinfo.tex from wherever it lives.
3858 Tue Oct 30 16:15:20 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3862 Fri Oct 26 14:33:34 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3864 * GNUmakefile: make-*.tar.Z: Include texinfo.tex.
3866 Tue Oct 23 19:34:33 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3868 * main.c (define_makeflags): When there are no flags to write, make
3869 sure the array has two leading nulls, since `MAKEFLAGS' is defined from
3872 * main.c (default_keep_going_flag): New variable (constant one).
3873 (command_switches: -k, -S): Use above for default value.
3874 (define_makeflags): Only write flag/flag_off switches if they are on,
3875 and either there is no default value, or they are not the default.
3877 Mon Oct 22 16:14:44 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3879 * main.c (struct command_switch): New member `no_makefile'.
3880 (command_switches: -n, -q, -t): Set no_makefile == 1.
3881 (define_makeflags): Take new arg MAKEFILE: if nonzero, don't use
3882 options whose `no_makefile' flags are set.
3883 (main): Call define_makeflags with MAKEFILE==1 before remaking
3884 makefiles, and again with MAKEFILE==0 before remaking goals.
3886 Tue Oct 2 17:16:45 1990 Roland McGrath (roland at geech.ai.mit.edu)
3890 Mon Oct 1 15:43:23 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3892 * arscan.c [HPUX]: Use PORTAR==1 format.
3894 Sat Sep 29 16:38:05 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3896 * make.h, remake.c, arscan.c: Don't declare `open'.
3898 Fri Sep 28 04:46:23 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3900 * variable.c (define_variable_in_set): Remove redundant -e check.
3902 Wed Sep 26 00:28:59 1990 Roland McGrath (roland at geech.ai.mit.edu)
3904 * job.c (start_job): Set RECURSIVE from the right elt of
3905 CHILD->file->cmds->lines_recurse.
3907 * commands.c (chop_commands): Don't botch the line count for allocating
3908 CMDS->lines_recurse.
3912 * job.c (start_job): Don't always increment CHILD->command_line! Only
3913 do it when CHILD->command_ptr has run out! (Dumb bug. Sigh.)
3915 Thu Sep 20 02:18:51 1990 Roland McGrath (roland at geech.ai.mit.edu)
3917 * GNUmakefile [ARCH]: Give explicit rule for remote.{c,dep} to use
3918 variable `REMOTE' for more flags.
3919 ($(prog)): Link in $(LOADLIBES).
3921 Wed Sep 19 02:30:36 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3923 * commands.h (struct commands): New member `ncommand_lines', the number
3924 of elts in `command_lines' et al.
3925 * commands.c (chop_commands): Set `ncommand_lines' elt of CMDS, and
3926 don't put a nil pointer at the end of `command_lines'.
3927 * job.h (struct child): New member `command_lines' to hold
3928 variable-expanded command lines.
3929 * job.c (new_job): Store expanded command lines in `command_lines'
3930 member of new child. Don't clobber FILE->cmds.
3931 (start_job): Use CHILD->command_lines in place of
3932 CHILD->file->cmds->command_lines.
3934 * variable.h, variable.c, job.c, expand.c: Undo yesterday's change,
3935 which is no longer necessary since we have cleverly avoided the issue.
3937 * job.c (start_job): Don't variable-expand each command line.
3938 (new_job): Do them all here, storing the expansions in the array.
3940 Tue Sep 18 01:23:13 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3942 * variable.h (struct variable): Remove `expanding' member.
3943 * variable.c (define_variable_in_set): Don't initialize it.
3944 * expand.c (struct variable_expanding): New type, a linked list
3945 containing `struct variable' pointers.
3946 (variables_expanding): New variable, the chain of variables currently
3948 (recursively_expand): Don't test and set `expanding' member.
3949 Instead, run through the `variables_expanding' chain looking for a link
3950 referring to V to find self-reference. Add a new link to the chain,
3951 describing V, before recursive expansion, and pop it off afterward.
3952 * job.c (child_handler): Save `variables_expanding' and clear it before
3953 calling start_job, and restore it afterward. This avoids major lossage
3954 when the SIGCHLD comes in the middle of variable expansion.
3956 Mon Sep 17 14:46:26 1990 Roland McGrath (roland at geech.ai.mit.edu)
3958 * job.c, commands.c: Don't define sigmask.
3959 * make.h: Put it here instead.
3961 * variable.c (target_environment): If `.NOEXPORT' was specified as a
3962 target, only export command-line and environment variables, and
3963 file-origin variables that were in the original environment.
3965 * make.man: Add missing ?roff control for `-I' option description.
3967 Thu Sep 13 14:10:02 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3969 * load.c [UMAX]: Move #include <sys/sysdefs.h> to [not UMAX_43].
3971 Wed Sep 12 15:10:15 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3973 * expand.c (recursively_expand): Don't use `reading_filename' and
3974 `reading_lineno_ptr' if they're nil.
3976 Thu Aug 30 17:32:50 1990 Roland McGrath (roland at geech)
3980 Tue Aug 28 04:06:29 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3982 * job.c [USG] (unknown_children_possible): New variable, set nonzero
3983 when it's possible for children not in the `children' chain to die.
3984 (block_signals) [USG]: Set it.
3985 (unblock_signals) [USG]: Clear it.
3986 (child_handler) [USG]: Don't complain about unknown children if
3987 `unknown_children_possible' is set.
3989 * read.c (do_define): Make sure there's enough space for the newline,
3990 so we don't write off the end of allocated space.
3992 * arscan.c (ar_name_equal): Fixed to work when MEM is AR_NAMELEN-1 but
3993 NAME is not the same length.
3995 Sat Aug 25 16:17:14 1990 Roland McGrath (roland at geech)
3997 * job.c (construct_command_argv_internal): Use a static char array for
3998 a constant, since old C has no auto aggregate initializers.
4000 Thu Aug 23 16:11:03 1990 Roland McGrath (roland at churchy.ai.mit.edu)
4002 * job.c (search_path): If PATH is nil or "" use a default path.
4004 Wed Aug 22 01:05:32 1990 Roland McGrath (roland at churchy.ai.mit.edu)
4008 * job.c (exec_command): Don't take PATH and SHELL args. Get them from
4010 (child_execute_job): Don't take FILE arg, and don't pass path and shell
4012 (start_job): Don't pass FILE arg to child_execute_job.
4013 * function.c (expand_function: `shell'): Ditto.
4014 * main.c (main): Don't pass path and shell to exec_command.
4016 Fri Aug 17 23:17:27 1990 Roland McGrath (roland at geech)
4018 * job.c (construct_command_argv_internal): New fn broken out of
4019 construct_command_argv. Takes strings SHELL and IFS instead of doing
4020 variable expansion for them. Recurse to make an argv for SHELL,
4021 passing SHELL==0. When SHELL==0, don't recurse for shell argv; make a
4022 simple one using /bin/sh.
4023 (construct_command_argv): Do the variable expansions and call above.
4025 Thu Aug 16 19:03:14 1990 Roland McGrath (roland at geech)
4027 * read.c (multi_glob): For ~USER/FILE, if USER isn't found, don't
4028 change the file name at all.
4030 Tue Aug 7 18:33:28 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4032 * function.c (expand_function: `suffix'/`notdir'): Don't kill the last
4033 space if we never wrote one.
4035 * function.c (expand_function: `suffix'): Retain the dot, like the
4038 Mon Aug 6 14:35:06 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4042 * main.c (decode_switches): For positive_int and floating cases, move
4043 SW past the arg (and don't set it to ""), so another switch can follow.
4045 Fri Aug 3 00:43:15 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4047 * job.c (child_execute_job): Use unblock_signals instead of
4048 push_signals_blocked_p (0).
4050 * main.c (fatal_signal_mask): New variable, mask of signals caught with
4053 * job.c ({block,unblock}_children): Renamed to {block,unblock}_signals.
4054 Block/unblock both child signal and signals in fatal_signal_mask.
4055 (children_blocked_p_{stack,max,depth}, {push,pop}_children_blocked_p):
4056 Renamed from children to signals. Use {block,unblock}_signals instead
4057 of {block,unblock}_children.
4058 * commands.c (fatal_error_signal), job.c (wait_for_children, new_job,
4059 child_execute_job, main, log_working_directory), function.c
4060 (expand_function: `shell'), job.h: Rename {push,pop}_children_blocked_p
4061 to {push,pop}_signals_blocked_p.
4062 * job.c (child_handler): Call {block,unblock}_signals instead of just
4063 {block,unblock}_remote_children. We need to block the fatal signals.
4065 Thu Aug 2 22:41:06 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4067 * main.c, function.c: Fixed typos in comments.
4069 * file.c (print_file_data_base): Fix computation of avg files/bucket.
4071 Tue Jul 31 22:11:14 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4075 Wed Jul 25 16:32:38 1990 Roland McGrath (mcgrath at tully.Berkeley.EDU)
4077 * arscan.c (ar_name_equal): Fixed to really do it right.
4078 (ar_member_pos): Fixed order of args.
4079 * ar.c (ar_member_date_1): Ditto.
4081 Fri Jul 20 15:30:26 1990 Roland McGrath (mcgrath at tully.Berkeley.EDU)
4083 * arscan.c (ar_name_equal): Rewritten. Accounts for a possible
4084 trailing slash in MEM.
4086 * remake.c (f_mtime): Keep track of whether ARNAME is used and free it
4087 if not. Also free MEMNAME.
4088 * ar.c (ar_member_date, ar_touch): Ditto.
4090 * arscan.c (arscan) [HPUX or hpux]: Treat same as USGr3 PORTAR==1.
4092 * make.h: If NSIG is not defined, but _NSIG is, #define NSIG _NSIG.
4094 * compatMakefile: Don't use $* in explicit rules.
4096 * default.c (default_variables: "PREPROCESS.S"): Include $(CPPFLAGS).
4098 * remake.c (f_mtime): If FILE is an ar ref, get the member modtime.
4100 * function.c (string_glob): Terminate the string properly when it's
4103 Wed Jul 18 11:26:56 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4107 * commands.c (set_file_variables): Fixed computation for ^F/?F elt len.
4109 Sat Jul 14 13:41:24 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4111 * job.c (construct_command_argv): Always use
4112 allocated_variable_expand_for_file instead of variable_expand_for_file
4113 because we might be called from inside a variable expansion (for the
4116 * function.c (expand_function: `shell'): Free the arglist's storage
4117 correctly. construct_command_argv only allocates ARGV and ARGV[0].
4119 * job.c (children_blocked_p_idx): Renamed to children_blocked_p_depth.
4120 (push_children_blocked_p, pop_children_blocked_p): Use ..._depth
4121 instead of ..._idx, and do it right!
4123 Wed Jul 11 15:35:43 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4125 * make.h (SIGNAL): New macro to replace `signal' calls. Does arg and
4126 ret value casts to (void *) #ifdef __STDC__ to avoid conflicts btwn
4127 ANSI and BSD `signal' and handler types.
4128 * main.c (main), job.c (child_handler): Use it.
4130 Fri Jul 6 00:00:38 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4132 * ar.c (ar_member_date, ar_touch): Pass 2nd arg to f_mtime.
4134 * read.c (read_makefile): Search the include path for MAKEFILES
4135 variable makefiles (TYPE == 1), like it says in the manual.
4137 * file.h (struct file), main.c (struct command_switch): Remove trailing
4140 * commands.c (execute_file_commands): Remove unused variables.
4141 * commands.h: Declare chop_commands.
4142 * make.h: Declare uniquize_deps.
4143 * main.c (main): Remove unused variable.
4144 (decode_switches): Remove unused label.
4145 * remake.c: Include "ar.h" for ar_parse_name decl.
4146 * implicit.c (try_implicit_rule): Remove unused variable.
4147 * function.c (expand_function: `shell'): Declare fork, pipe.
4148 * ar.c: Declare ar_name_equal.
4150 * GNUmakefile: If using gcc, add warning flags to CFLAGS.
4152 * remake.c: Remove decl of ar_member_date, since it's done in make.h.
4154 * remake.c (f_mtime): For ar refs, allow the archive to be found via
4155 VPATH search if we're searching, and change the ar ref accordingly.
4157 * ar.c (ar_parse_name): New global fn to parse archive-member
4158 references into the archive and member names.
4159 (ar_member_date, ar_touch): Use it.
4160 * make.h: Declare it.
4162 * remake.c (f_mtime): After doing rename_file, do check_renamed instead
4163 of assuming rename_file will always set FILE->renamed (which it won't).
4165 * vpath.c (selective_vpath_search): Only accept prospective files that
4166 don't actually exist yet are mentioned in a makefile if the file we are
4167 searching for isn't a target.
4169 Wed Jul 4 04:11:55 1990 Roland McGrath (mcgrath at helen.Berkeley.EDU)
4171 * remake.c (update_goal_chain): Do check_renamed after calling
4173 (check_dep): Ditto after update_file.
4175 * file.c (rename_file): Prettied up long message for merging cmds.
4177 * remake.c (update_file_1): Get each dep file's modtime, and allow for
4178 it being renamed, before checking for a circular dep, since a renaming
4179 may have introduced one.
4181 Tue Jul 3 18:15:01 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4183 * ar.c (ar_touch): Don't free ARNAME since enter_file holds onto the
4186 * function.c (string_glob): Don't leave a trailing space.
4188 * read.c (do_define): Allow leading whitespace before `endef'.
4190 Mon Jul 2 14:10:16 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4192 * implicit.c (pattern_search): No longer take NAME arg. Instead take
4193 ARCHIVE flag. If ARCHIVE is nonzero, FILE->name is of the form
4194 "LIB(MEMBER)"; rule for "(MEMBER)" is searched for, and LASTSLASH is
4195 set to nil. Since NAME was only non-nil when it was the archive member
4196 name passed by try_implicit_rule, this change easily allows turning off
4197 LASTSLASH checking for archive members without excessive kludgery.
4198 (try_implicit_rule): Pass ARCHIVE flag instead of file name.
4202 * commands./c (set_file_variables): Don't kill last char of $(^D) elts.
4204 Sat Jun 30 00:53:38 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4206 * ar.c (ar_member_date): Don't free ARNAME since enter_file holds onto
4209 * arscan.c (ar_scan) [sun386 && PORTAR == 1]: Treat like USGr3.
4211 Wed Jun 27 14:38:49 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4213 * main.c (main): Put a newline on the debugging message when deciding
4214 not to remake a makefile to avoid a possible loop.
4215 Only decide not to remake makefiles that have commands (as well as
4216 being targets and having no deps).
4218 Fri Jun 22 12:35:37 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4220 * default.c (default_variables): Define `LINK.s' and `LINK.S'.
4221 (default_suffix_rules): Define .S.o rule.
4223 * job.c (construct_command_argv): If we decide to go the slow route,
4224 free all storage for the chopped args.
4225 (start_job): Free the argument list's storage correctly.
4226 construct_command_argv only allocates ARGV and ARGV[0].
4228 Tue Jun 19 18:27:43 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4232 Fri Jun 15 21:12:10 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4234 * glob.c: New version from ai-lab which doesn't do [^abc].
4236 Thu Jun 7 00:30:46 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4238 * dir.c: Copied dirent vs direct et al mess from glob.c.
4240 * glob.c: Replaced with updated version from djm.
4241 * glob.c: Check macro DIRENT instead of _POSIX_SOURCE for <dirent.h>.
4242 __GNU_LIBRARY__ implies DIRENT and STDC_HEADERS.
4244 Thu May 31 22:19:49 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4246 * vpath.c (vpath_search): Don't stop the loop if a pattern matches but
4247 the search fails. All matching patterns have their paths searched
4248 (like it says in the manual).
4250 * make.texinfo (Rules: Directory Search: Selective Search): Say that
4251 multiple `vpath' directives with the same pattern DO accumulate, not
4252 supersede earlier ones.
4254 * vpath.c (print_vpath_data_base): Increment the count of vpaths on
4255 each loop iteration, rather than letting it stay zero.
4259 * job.c (block_children, unblock_children): Made static.
4260 (push_children_blocked_p, pop_children_blocked_p): New functions to
4261 push and pop whether children are blocked or not.
4262 * job.h: Declare push_children_blocked_p, pop_children_blocked_p and
4263 not block_children, unblock_children.
4264 * commands.c (fatal_error_signal), job.c (wait_for_children, new_job,
4265 child_execute_job), main.c (main, log_working_directory): Use sequences
4266 of push_children_blocked_p (1) and pop_children_blocked_p () instead of
4267 explicitly blocking and unblocking children.
4268 * function.c (expand_function: `shell'): Don't unblock children. The
4269 push-pop sequence in wait_for_children makes it unnecessary.
4271 Tue May 29 21:30:00 1990 Roland McGrath (mcgrath at helen.Berkeley.EDU)
4273 * read.c (do_define): Don't include the last newline in the definition.
4275 * function.c (expand_function: `shell'): Call construct_command_argv
4276 before forking and don't fork if it returns nil. Free the argument
4277 list's storage before finishing.
4279 * job.c (start_job): Free the storage for the child's argument list
4280 in the parent side of the fork after the child has been spawned.
4282 * job.c (start_job): If construct_command_argv returns nil, go to the
4285 * job.c (construct_command_argv): Use the shell if the command contains
4286 an unterminated quote.
4288 Wed May 23 19:54:10 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4292 * read.c (read_makefile): Parse "override define" correctly.
4294 Thu May 17 15:25:58 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4296 * arscan.c [USG]: Don't declare memcpy and memcmp. <memory.h> should
4297 do this anyway (and lack of declarations is harmless).
4299 * remote-customs.c: Renamed to remote-cstms.c for System V.
4300 * remote.c [CUSTOMS]: Changed accordingly.
4302 Sun May 13 14:38:39 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4304 * GNUmakefile: Use same cmds for doc tar.Z as for dist tar.Z (so the
4305 contents go in make-N.NN).
4307 Thu Apr 26 19:33:25 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4311 Wed Apr 25 20:27:52 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4313 * job.c (init_siglist): Don't do SIGUSR1 and SIGUSR2 if they are the
4314 same as SIGIO and SIGURG (true on Cray).
4316 Tue Apr 24 20:26:41 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4318 * arscan.c (ar_scan): Do behavior for PORTAR == 1 and USGr3 also
4321 Wed Apr 11 10:00:39 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4323 * job.c (exec_command): Set the effective GID to the real GID. Somehow
4326 * implicit.c (pattern_search): Use the right index variable when
4327 seeing if we need to expand FILE->also_make.
4329 Sun Mar 4 09:18:58 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4333 * remake.c (remake_file): Treat non-targets without commands under -t
4334 the same as anything else without commands.
4336 Sat Feb 24 17:46:04 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4338 * default.c (default_variables: PREPROCESS.S): Removed $< from defn.
4340 * main.c (main): Ignore arguments that are the empty string, rather
4341 than feeding them to enter_file and barfing therein.
4343 Wed Feb 14 16:28:37 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4345 * main.c (main): Call construct_include_path after doing chdirs.
4347 Thu Feb 8 13:43:44 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4351 Sat Feb 3 22:06:55 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4355 * make.texinfo (Implicit: Catalogue of Rules): For RCS, noted that
4356 working files are never overwritten by the default rule.
4358 Thu Feb 1 17:27:54 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4360 * rule.c (count_implicit_rule_limits): Redid loop control to not run
4361 twice on freed rules.
4363 * GNUmakefile: Made `.dep' files be architecture-specific too.
4365 * main.c (main, log_working_directory) [USG]: Block children around
4366 calls to `getwd' (actually `getcwd' on USG), because that function
4367 sometimes spawns a child running /bin/pwd on USG.
4369 Tue Jan 30 14:02:50 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4371 * function.c (subst_expand): Pay attention to SUFFIX_ONLY, putz.
4373 Wed Jan 24 21:03:29 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4375 * make.man: Fixed repeated word.
4377 * make.texinfo (Missing): Reworded a buggy sentence.
4379 Mon Jan 22 12:39:22 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4381 * main.c (print_version): Added 1990 to copyright notice.
4385 Sat Jan 20 11:52:01 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4387 * file.c (rename_file): Don't free the storage for the old name, since
4388 it might not have been malloc'd.
4390 * job.c (construct_command_argv): Call
4391 allocated_variable_expand_for_file instead of variable_expand_for_file
4392 to expand `$(SHELL)'.
4394 * make.texinfo (Bugs): Change address from roland@wheaties.ai.mit.edu
4395 to roland@prep.ai.mit.edu.
4397 Tue Jan 16 19:22:33 1990 Roland McGrath (mcgrath at tully.Berkeley.EDU)
4401 Sun Jan 14 16:48:01 1990 Roland McGrath (mcgrath at helen.Berkeley.EDU)
4403 * job.c (start_job): Only call wait_to_start_job for the first command
4404 line in each sequence.
4406 Thu Jan 4 14:27:20 1990 Roland McGrath (mcgrath at helen.Berkeley.EDU)
4408 * load.c [LDAV_BASED] (wait_to_start_job): Loop while job_slots_used >
4411 * job.c (search_path): Don't return a pointer to local storage.
4412 Allocate data space for the pathname instead.
4414 * function.c (expand_function: `shell'): Don't write garbage if the
4415 child wrote no output.
4417 Wed Jan 3 15:28:30 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4421 * file.h (struct file): New member `renamed', a `struct file *' that is
4422 the place this file has been renamed to (or nil).
4423 (check_renamed): Macro to check for a file having been renamed.
4424 Dereferences the renaming and sets the given variable.
4425 * file.c (rename_file): Completely rewritten. Renames in place if
4426 possible, or moves FILE to a different hash bucket if there is no
4427 existing file with the new name. If there is an existing file with the
4428 new name, FILE is merged into it and FILE->renamed is set to point to
4430 * variable.c (merge_variable_sets): New fn to merge two variable sets.
4431 (merge_variable_set_lists): New fn to merge two variable set lists.
4432 * variable.h: Declare merge_variable_set_lists.
4433 * remake.c (update_file_1, check_dep): Run `check_renamed' after
4434 calling file_mtime, check_dep.
4435 (update_file): Same after update_file_1.
4436 (update_goal_chain, update_file_1, check_dep): Same after update_file.
4438 * read.c (uniquize_deps): New fn, broken out of record_files, to remove
4439 duplicate deps from a chain.
4440 (record_files): Use it.
4441 * implicit.c (pattern_search): Use uniquize_deps.
4443 * file.h (file_mtime_1): New macro, like file_mtime, but take second
4444 arg, passed to f_mtime.
4445 (file_mtime): Implement as file_mtime_1 (file, 1).
4446 (file_mtime_no_search): New macro: file_mtime (file, 0).
4447 * remake.c (f_mtime): Take new arg SEARCH. Only do VPATH and `-lNAME'
4448 searching if it is nonzero.
4449 * main.c (main): Use file_mtime_no_search for makefiles.
4450 * remake.c (update_goal_chain): Use file_mtime_no_search if MAKEFILES.
4452 * main.c (printed_version): New variable, init'd to zero.
4453 (print_version): Set it to nonzero before returning.
4454 (die): If -v and !printed_version, call print_version before clean up
4457 * main.c (log_working_directory): Keep track of whether or not the
4458 "Entering" message has been printed, and return without printing the
4459 "Leaving" message if not.
4461 * main.c (decode_switches): Don't complain about missing args before
4462 checking for a noarg_value elt in the command_switch structure.
4464 Tue Jan 2 15:41:08 1990 Roland McGrath (mcgrath at tully.Berkeley.EDU)
4466 * make.texinfo (Commands: Recursion: Options/Recursion): Document
4469 * make.texinfo, main.c, job.c: Changed copyright notices to include
4472 * make.texinfo (Top): Fixed introductory paragraph, which said that
4473 `make' itself (instead of the manual) has various chapters.
4474 (Variables: Advanced: Substitution Refs): When pxref'ing about
4475 `patsubst', use node `Text Functions', not `Functions'.
4476 Add an xref about `patsubst' after description of $(var:a%b=c%d).
4477 (Functions: Syntax of Functions): Explain why mixing delimiters in
4478 function/var refs is unwise. Clarify fn arg evaluation order.
4479 (Options): Reworded sentence about `-e'.
4480 (Implicit: Implicit Variables): Don't say `RM' is unused.
4481 Say the dflt values for the flag vars is empty unless otherwise noted,
4482 since some have defaults.
4483 (Implicit: Pattern Rules: Pattern Examples): Clarified use of $< and $@
4485 (Implicit: Last Resort): Don't say the .DEFAULT example creates files
4486 "silently". It's automatic, but not silent.
4487 (Implicit: Search Algorithm): Fixed confusing ungrammatical sentence
4489 (Archives: Archive Update): Added missing `next' pointer.
4490 (Archives: Archive Symbols): Note that GNU `ar' deals with this
4493 * job.c (search_path): New fn, to search for an executable file in a
4494 search path (broken out of exec_command).
4495 (exec_command): Take fourth arg, the shell program to use (if
4496 necessary). Use search_path for the program, and the shell program.
4497 Pass args "file args ..." to shell program (with no -c), where FILE is
4498 the full pathname of the program (script) to be run.
4499 (child_execute_job): Pass shell program to exec_command.
4500 * main.c (main): Ditto.
4502 * main.c (main): Don't write a message if exec_command returns, because
4503 it will never return.
4505 Fri Dec 22 16:19:58 1989 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
4507 * default.c (default_variables: "LINK.cc"): Use $(C++FLAGS) instead of
4510 Wed Dec 20 09:58:48 1989 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
4512 * job.c (new_job): If start_job set the child's `command_state' to
4513 `cs_finished', call notice_finished_file.
4515 Sun Dec 17 19:45:41 1989 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
4519 Wed Dec 13 17:57:12 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4521 * rule.c (convert_to_pattern): Accept files with dependencies as
4524 Thu Nov 30 15:47:13 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4528 * function.c (expand_function: `shell'): Don't clobber BUFFER and then
4531 * remake.c (update_file_1): Took code to force remake of nonexistent
4532 deps out of #if 0, and changed the test to nonexistent non-intermediate
4533 deps. In version 4, I think removing this test completely will
4534 implement the new feature that if a: b and b: c and c is newer than a,
4535 b need not be remade.
4537 Sun Nov 26 16:12:41 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4539 * compatMakefile (load.o, remote.o): Use $*.c instead of explicit file
4540 names so that using VPATH works.
4542 Tue Nov 21 14:57:18 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4546 Fri Nov 10 03:28:40 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4548 * remake.c (check_dep): Set *MUST_MAKE_PTR if FILE does not exist after
4549 being updated. (The exact opposite test was here before; why???)
4550 (update_file_1): Set a dep's `changed' member after updating it if it
4551 is phony and has commands (because they will then always be executed).
4553 Thu Nov 9 13:47:12 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4555 * load.c [UMAX]: #ifdef UMAX_43 include different headers for the
4557 * compatMakefile (LOAD_AVG): Document UMAX_43.
4561 * commands.c (chop_commands): New function to chop commands into lines.
4562 * job.c (new_job): Break that code out, and call chop_commands.
4563 * remake.c (remake_file): Call chop_commands before looking at
4564 FILE->cmds->any_recurse.
4566 * make.texinfo (Running: Goals): Don't say that the default target
4567 won't be taken from an included makefile.
4569 * remake.c (update_file_1): #if 0 out setting MUST_MAKE if a dep
4572 Fri Nov 3 15:53:03 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
4576 * variable.c (try_variable_definition): Don't calculate useless value.
4578 * main.c (define_makeflags): Fixed -j propagation.
4580 * commands.c (execute_file_commands): Removed unused variable.
4582 Sun Oct 29 11:11:15 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4584 * commands.c (execute_file_commands): If the commands are empty, call
4585 notice_finished_file before returning.
4587 Sat Oct 28 23:06:32 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4589 * remake.c (update_file_1): Don't always update a target that has no
4590 deps. Only do this for double-colon targets.
4592 Wed Oct 25 16:36:16 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4594 * main.c (main) [hpux]: hpux == HPUX.
4595 * compatMakefile (defines): Document that HPUX should be defined.
4597 Tue Oct 24 19:19:48 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4601 * job.c (exec_command): Fixed what mode bits are checked.
4603 * remake.c (update_file_1): "No cmds and no deps actually changed"
4604 loses if ! FILE->is_target.
4606 * make.texinfo (Variables: Setting): Don't say that spaces after a
4607 variable definition are ignored (since they aren't).
4609 Mon Oct 23 14:34:23 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4613 * remake.c (update_file_1): If, after being updated, any dependency
4614 does not exist, remake the target.
4616 * remake.c (update_file_1): Always update if FILE has commands but no
4619 * commands.c (execute_file_commands): If we return early because there
4620 are no commands, set FILE->updated.
4622 Thu Oct 19 18:47:37 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4624 * arscan.c (ar_scan) [M_XENIX]: Don't run atoi or atol on the
4625 `struct ar_hdr' members that are int or long int on Xenix.
4627 Sat Oct 14 10:43:03 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4629 * arscan.c (ar_scan): Cosmetic clean ups.
4630 (ar_name_equal): New function to compare names, handling truncated
4631 member names and special `.o' truncation.
4632 (ar_member_pos): Use ar_name_equal.
4633 * ar.c (ar_member_date_1): Use ar_name_equal.
4637 * file.h (struct file): Made `update_status' a `short int', and moved
4638 it before `command_state' so the bitfields can be packed better.
4640 * remake.c (files_remade): Made global.
4641 (notice_finished_file): Don't increment files_remade.
4642 * job.c (new_job): Do.
4644 * job.c (start_job): Don't return a value. Always set
4645 CHILD->file->command_state to either cs_running or cs_finished.
4646 (new_job, child_handler): Don't expect start_job to return a value.
4647 Instead, look at the file's command_state.
4649 * commands.c (chop_commands): Merged into job.c (new_job).
4650 * commands.h: Don't declare chop_commands.
4652 * job.c (start_job): Made static.
4653 (new_job): New function to create a `struct child' and call start_job.
4654 (free_child): New function to free a `struct child'.
4655 (child_handler, new_job): Call it.
4656 * job.h: Don't declare start_job. Do declare new_job.
4657 * commands.c (execute_file_commands): Call new_job.
4659 * commands.c (execute_file_commands): Don't set FILE->update_status if
4662 * function.c (expand_function): Don't use `reading_filename' and
4663 `reading_lineno_ptr' if they're nil.
4665 Fri Oct 13 18:16:00 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4667 * read.c (find_semicolon): New function to look for an unquoted ; not
4668 preceded by an unquoted # in a string.
4669 (read_makefile): Call it before expanding the line. If it finds a ;,
4670 cut the line short there before expanding it. If not, call it again
4673 * commands.c (execute_file_commands): Don't check FILE->command_state.
4674 We won't get called unless it's cs_not_started.
4676 * read.c (read_makefile): Call collapse_line on the variable-expanded
4677 rule line after checking for ; and #.
4679 * job.c (start_job): When there are no more commands, always return 0.
4680 * commands.c (execute_file_commands): Don't put the new child in the
4681 `children' chain unless FILE->command_state is cs_running.
4683 * read.c (read_makefile): Rewrote ;-handling to only do it once (why
4684 did I do it twice??) and to check for a # before the ;.
4686 * job.c (start_job): Set CHILD->file->update_status to 0 when we run
4687 out of commands. Set it to 1 before returning failure.
4688 (child_handler): Don't set C->file->update_status to 0 when start_job
4689 returns success and commands are not running.
4691 * read.c (read_makefile): If there is a # before the ; for commands,
4692 forget the ; and commands.
4694 Thu Oct 12 15:48:16 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4696 * job.c (child_execute_job): Pass -c to the shell.
4698 Wed Oct 11 18:41:10 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4702 * main.c (define_makeflags): Cleaned up to keep better track of dashes
4705 * function.c (expand_function: `shell'): When converting newlines to
4706 spaces in output, search with `index' calls rather than a simple loop.
4708 * main.c (main): Make sure stdout is line-buffered.
4710 * main.c (decode_switches): Always check for missing switch arg.
4712 Mon Oct 9 17:17:23 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4716 Sat Oct 7 00:32:25 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4718 * commands.c (set_file_variables): #ifdef NO_ARCHIVES, still set $@ and
4721 * commands.c (set_file_variables): Include a trailing slash in the
4722 directory variables (@D, etc.).
4724 * job.c (child_handler): Call notice_finished_file after changing a
4725 child's state to `cs_finished'.
4726 * remake.c (update_file_1): Don't call notice_finished_file if
4727 FILE->command_state == cs_finished.
4729 Wed Oct 4 16:09:33 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4733 Tue Oct 3 21:09:51 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4735 * read.c (read_all_makefiles): When setting elements of MAKEFILES from
4736 the contents of read_makefiles, make sure we're using the right
4739 * dir.c, glob.c [USGr3 || DIRENT]: Don't define d_ino as d_fileno.
4743 * remake.c (update_file_1): Return zero after calling remake_file if
4744 FILE->command_state != cs_finished. Test update_status thoroughly.
4746 * commands.c (execute_file_commands): Don't call notice_finished_file.
4748 * remake.c (remake_file): Return immediately after calling
4749 execute_file_commands.
4751 Sat Sep 30 14:57:05 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4753 * Version 3.56.1 (alpha).
4755 * file.h (struct file): Made `update_status' not be a bitfield, since
4756 some broken compilers don't handle it right.
4758 * function.c (expand_function: `join'): Don't clobber the pointers and
4759 then try to free them.
4761 * job.c (exec_command): Fixed & vs = precedence problem.
4763 Thu Sep 28 17:29:56 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4765 * remake.c (update_file_1): Fixed typo in debugging output.
4767 * remake.c (library_file_mtime): Search for /usr/local/lib/libLIB.a
4768 after /usr/lib/libLIB.a.
4770 Tue Sep 26 16:07:58 1989 Roland McGrath (mcgrath at helen.Berkeley.EDU)
4772 * read.c (conditional_line): For `ifeq (a, b)', swallow space after the
4775 Sun Sep 24 13:25:32 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4777 * function.c (patsubst_function): If BY_WORD and the match is not a
4778 full word, update the text pointer correctly.
4780 * function.c (expand_function: `word'): Don't lose track of the second
4781 arg's expansion and free something else instead.
4783 Fri Sep 22 16:15:29 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4787 Thu Sep 21 14:28:42 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4789 * main.c (main): Make an array of the mtimes of the makefiles before
4790 updating them, and compare their file_mtimes against this later. Don't
4791 re-exec if a makefile was successfully updated but didn't change. If a
4792 makefile failed to be remade and no longer exists, die. If a makefile
4793 failed to be remade, but changed anyway, re-exec. If a makefile failed
4794 to be remade, but is unchanged, continue on.
4796 Wed Sep 20 18:02:07 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4800 * implicit.c (pattern_search): Maintain an array CHECK_LASTSLASH of the
4801 CHECK_LASTSLASH flag values used to match each member of TRYRULES.
4802 When making FILE->stem, if CHECKED_LASTSLASH[FOUNDRULE], prepend the
4803 part of FILENAME before LASTSLASH.
4805 Tue Sep 19 17:44:08 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4807 * dir.c (dir_file_exists_p): Check for FILENAME being nil before
4808 checking for it being "".
4810 * main.c (define_makeflags): Fixed test for whether a flag/flag_off
4811 option was non-default. Also changed to generate a string that Unix
4812 Make will grok (except for FP/int values and new flags).
4814 * job.c (child_execute_job): Don't use the shell's -c option.
4815 Also fixed an off-by-one bug in the ARGV -> shell arg list copying.
4817 Mon Sep 18 15:17:31 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4821 * read.c (parse_file_seq): Check the beginning of the file name for a
4822 `./', not the two chars after the end of the name (Q rather than P).
4824 * job.c (child_execute_job): Include all of ARGV in the arg list for
4827 * main.c (define_makeflags): Don't include floating and positive_int
4830 * job.c (exec_command): Set the effective gid to the real gid before
4833 * job.c (child_execute_job): Don't clobber the arg list when execing
4836 Sun Sep 17 15:27:19 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4838 * main.c (define_makeflags): Moved all the checking inside the switch.
4840 * load.c [LDAV_BASED] (load_average): When we can't get the load
4841 average, return zero instead of running off the end.
4843 * file.c: Include variables.h.
4844 * job.c: Declare dup2 and {block,unblock}_remote_children.
4845 * file.h: Declare f_mtime.
4846 * job.c: Don't declare construct_command_argv, since job.h does.
4847 * function.c, main.c, load.c, remake.c: Include job.h.
4848 * load.c [LDAV_BASED] (load_average): Declare nlist.
4849 * variable.h: Declare print_file_variables.
4850 * job.c [!USG]: Don't declare sigsetmask.
4851 [!USG]: Declare getdtablesize.
4852 Don't declare load_average. Do declare wait_to_start_job.
4853 Declare vfork, gete[gu]id, execve.
4854 * commands.c: Declare remote_kill, getpid.
4855 * make.h: Declare kill, exit, sigblock, pipe, close, ctime, open,
4857 * make.h [not USG]: Declare sigsetmask.
4858 * job.h: Declare wait_for_children and {block,unblock}_children.
4860 * dir.c (dir_file_exists_p): If FILENAME is nil, read in the whole
4862 (find_directory): When we want to read in the whole directory, call
4863 dir_file_exists_p with nil instead of "".
4865 * file.h (struct file), job.h (struct child),
4866 variable.h (struct variable): Use bitfields for flags.
4867 * make.h (ENUM_BITFIELD): If GCC or #ifdef ENUM_BITFIELDS, define as
4869 * compatMakefile (defines): Document ENUM_BITFIELDS.
4871 Sat Sep 16 12:38:58 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4873 * Version 3.55.4 (alpha).
4875 * GNUmakefile (dist): Depend on default and doc.
4877 * load.c [LDAV_BASED]: Include <nlist.h> rather than <a.out.h>; #ifdef
4878 NLIST_NAME_UNION, use n_un.n_name instead of n_name.
4879 * compatMakefile (LOAD_AVG): Document NLIST_NAME_UNION.
4881 * job.c [USG-ish]: Don't redefine WIF{SIGNALED,EXITED} if they're
4884 Fri Sep 15 13:59:42 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4886 * glob.c, dir.c [USGr3 or DIRENT]: If neither d_ino, nor d_fileno is
4887 defined, define d_ino as d_fileno.
4889 Thu Sep 14 18:29:38 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4891 * job.c: Don't declare exec_command static.
4893 * make.texinfo (Name Index): Changed title to include directives.
4895 * Version 3.55.3 (alpha).
4897 * make.texinfo (Running: Options): Document -e.
4899 * main.c (main): Always give imported environment variables origin
4901 * variable.c (define_variable_in_set): Under -e, if ORIGIN, or an
4902 existing variable's origin, is `o_env', make it `o_env_override'.
4904 * load.c: Use the symbol KERNEL_FILE_NAME instead of KERNEL_FILE.
4905 * compatMakefile: Changed the comment for `LOAD_AVG' accordinly.
4907 Thu Sep 7 16:46:26 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4909 * Version 3.55.2 (alpha).
4911 * variable.c (print_variable_set), rule.c (print_rule_data_base),
4912 file.c (print_file_data_base): If NO_FLOAT is defined, don't use
4913 floating-point for printing statistics.
4914 * compatMakefile (defines): Document NO_FLOAT.
4916 * make.h (HASH): New macro to add the hashing value of one char to a
4918 * file.c (lookup_file, enter_file, rename_file): Use it.
4919 * dir.c (find_directory, dir_file_exists_p, file_impossible_p): Ditto.
4920 * variable.c (define_variable_in_set, lookup_variable): Same here.
4922 * variable.c, file.c, dir.c: Don't define *_BUCKETS if they are already
4925 * compatMakefile (defines): Added comment about defining NO_ARCHIVES.
4926 (ARCHIVES, ARCHIVES_SRC): New variables for {ar,arscan}.[oc].
4927 (objs, srcs): Use $(ARCHIVES) and $(ARCHIVES_SRC).
4928 * commands.c (set_file_variables), dir.c (file_exists_p),
4929 remake.c (touch_file, name_mtime), implicit.c (try_implicit_rule,
4930 pattern_search), make.h: If NO_ARCHIVES is #defined, don't do any
4933 * commands.c (set_file_variables): Don't kill the last char of
4934 directory names in $([@*<%?^]D).
4936 Wed Sep 6 15:23:11 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4938 * default.c (default_terminal_rules {%:: %,v}, {%:: RCS/%,v}): Don't
4939 run co if the target exists.
4941 * glob.c (glob_match): [!xyz], rather than [^xyz], means none of [xyz].
4943 * glob.c: Misc minor cosmetic changes.
4945 Tue Sep 5 14:49:56 1989 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
4947 * load.c [LDAV_BASED] (load_average): Check for == -1, rather than < 0
4948 to see if lseek fails. On some systems, `avenrun' is at an offset >
4949 (2**31)-1, and lseek succeeds, returning a negative value.
4951 Mon Sep 4 11:07:58 1989 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
4953 * rule.c (new_pattern_rule): Return `int' instead of `void': nonzero if
4954 the passed rule was used, zero if not.
4955 (install_pattern_rule): Pay attention to the return from
4956 new_pattern_rule, and don't set the rule's `terminal' flag or give it
4957 commands unless it's used.
4958 (create_pattern_rule): Same idea.
4960 * dir.c (find_directory): Removed unused variable.
4962 * commands.c (execute_file_commands): Removed unused variable.
4964 * read.c (record_files): Don't use NAME after freeing it.
4966 Sat Sep 2 00:33:19 1989 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
4968 * Version 3.55.1 (alpha).
4970 * function.c (string_glob): Don't add spaces after file names that
4971 aren't added. (Also means don't add spaces without checking the size
4974 * remake.c (update_goal_chain): Don't remove makefiles with cmds and no
4975 deps from the chain.
4976 * main.c (main): Do it here, before calling update_goal_chain.
4978 * remake.c (update_goal_chain): When updating fails, change STATUS even
4979 if MAKEFILES is set. Also stop remaking when updating fails if not
4980 under -k and MAKEFILES is not set.
4982 * remake.c (remake_file, update_file_1, notice_finished_file),
4983 commands.c (execute_file_commands), make.h, commands.h: The functions
4984 remake_file, notice_finished_file, and execute_file_commands no longer
4985 return values, and their callers no longer expect values returned.
4987 * remake.c (notice_finished_file): Don't set FILE's modtime to now if
4988 it is a non-target with no commands.
4990 Fri Sep 1 00:04:39 1989 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
4992 * read.c (read_all_makefiles): After freeing each element on MAKEFILES,
4993 replace it with the name stored in read_makefiles by read_makefile.
4995 * remake.c (update_file_1): Don't decide not to remake if FILE has no
4996 cmds and no deps actually changed if FILE doesn't have any deps.
4998 * file.c (remove_intermediate): Remove precious files that also have
4999 the `dontcare' flag set.
5001 * remake.c (update_file_1): Don't always remake if FILE has cmds but no
5002 deps; only if FILE is double-colon. (I don't know why this should be
5003 done for double-colon targets, but that's what Unix make does.)
5005 * load.c [LDAV_BASED] (load_average): Write error messages if the
5006 various system calls fail. Keep track of if we've failed before.
5007 The first time we fail, write a message saying -l won't be enforced.
5008 The first time we succeed after having failed, write a message saying
5009 -l will be enforced again.
5011 * remake.c [USG]: Don't #include <sys/file.h>
5013 * load.c [generic Unix LDAV_BASED]: #include <fcntl.h> #ifdef USG,
5014 else <sys/file.h> instead.
5016 * job.c [USG && !USGr3 && !HAVE_DUP2]: Remove redundant
5017 #include <errno.h> and declaration of `errno'.
5018 [...] (dup2): Fixed so it won't always lose.
5020 * default.c (default_suffix_rules: .texinfo.dvi): Copy, rather than
5021 move, the aux and index files, so the TeX run can use them.
5023 * compatMakefile: Remove redundant comment.
5025 * load.c [generic Unix LDAV_BASED]: Include <a.out.h> instead of
5026 <nlist.h>, since the `struct nlist' declaration in <nlist.h> varies
5027 more than the one in <a.out.h>.
5028 (load_average): Use the `n_un.n_name' field of the `struct nlist',
5029 since the <a.out.h> declaration uses the union.
5031 * main.c (main): For the temporary files made for stdin makefiles, set
5032 the `intermediate' and `dontcare' flags.
5033 * file.c (remove_intermediates): Don't print any messages for files
5034 whose `dontcare' flag is set. (The only files that will be
5035 intermediate and `dontcare' will be the temporary files made for stdin
5038 * job.c (exec_command): Made global.
5039 * job.h: Declare it.
5040 * main.c (main): Use exec_command when re-execing.
5042 * make.h: Declare environ.
5045 * job.c (child_execute_job): New function to perform everything done in
5046 the child side of a fork (for a job or `shell' function).
5047 (start_job): Call it.
5048 * job.h: Declare construct_command_argv and child_execute_job.
5049 * function.c (expand_function: `shell'): Use child_execute_job.
5051 Thu Aug 31 18:42:51 1989 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
5053 * function.c (expand_function: `shell'): Remove a trailing newline
5054 instead of turning it into a space.
5056 * main.c (main): Do init_siglist #ifdef HAVE_SIGLIST.
5058 * job.c [WTERMSIG || (USG && !HAVE_SYS_WAIT)]: Test each W* macro
5059 separately and define all those that aren't defined.
5061 Sat Aug 26 15:13:21 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5063 * ar.c (ar_name): Return zero for `(foo)'.
5067 * make.texinfo (Rules: Multiple Targets): Make this node's `next'
5068 pointer point to `Static Pattern'.
5069 * make.texinfo (Makefiles: MAKEFILES Variable): Make this node's `prev'
5070 pointer point to `Makefile Names'.
5072 * make.1: Renamed to make.man.
5073 * compatMakefile: Define `mandir' and `manext'.
5074 (install): Depend on $(mandir)/make.$(manext).
5075 ($(mandir)/make.$(manext)): Depend on make.man and copy it to $@.
5076 ($(bindir)/make): Use `make' rather than $<; so Unix make can grok it.
5078 Thu Aug 24 03:35:48 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5080 * variable.c (target_environment): Allow variables that start with
5083 Wed Aug 23 22:50:32 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5085 * variable.c (target_environment): Reject variables that don't start
5088 Tue Aug 22 04:14:29 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5090 * GNUmakefile (make-$(version).tar.Z): Put make.1 (the Unix manual
5091 page) in the tar file.
5093 * variable.c (target_environment): Don't write variables with origin
5094 o_default (i.e., ones from default.c).
5095 * make.texinfo (Commands: Recursion: Variables/Recursion): Document
5096 that default variables are not put in the environment.
5098 * remake.c (update_file_1): Remake all targets with commands but no
5101 Sat Aug 19 06:03:16 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5103 * remake.c (update_file_1): In the final loop, set the deps'
5104 `changed' members if they are newer than FILE.
5106 * remake.c (update_goal_chain): Under -d, print a message if we decide
5107 not to remake a makefile so as to avoid a possible infinite loop.
5109 Fri Aug 18 20:30:14 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5111 * remake.c (remake_file): Cleaned up.
5113 * commands.c (execute_file_commands): If the commands are empty, set
5114 FILE->update_status to zero before returning.
5116 * remake.c (notice_finished_file): Set `last_mtime' fields to zero
5117 instead of calling name_mtime; file_mtime will do that later if anybody
5120 Thu Aug 17 10:01:11 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5122 * make.texinfo (Rules: Wildcards: Wildcard Examples): Give this node a
5125 * Version 3.54.9 (alpha).
5127 * make.texinfo: Fixed some @nodes.
5129 * remake.c (check_dep): Don't set *MUST_MAKE_PTR if FILE doesn't exist
5130 after running update_file.
5132 * remake.c (notice_finished_file): If FILE has no commands, pretend its
5135 * remake.c (update_file_1): In the loops that call update_file on the
5136 deps, compare modtimes before and after (unless deps are still being
5137 made) and set the deps' `changed' members. Do not set the `changed'
5138 members in the loop that prints the newer/older debugging messages.
5139 * remake.c (update_file_1): If no deps changed and FILE has no
5140 commands, decide it doesn't need remaking.
5142 * remake.c (update_file_1): Print a debugging message if we take
5143 commands from default_file.
5145 * make.texinfo (Rules: Directory Search: Selective Search): Removed
5146 note about warning for `vpath' with a constant pathname, since it isn't
5147 warned about anymore.
5149 * remake.c (update_goal_chain): If MAKEFILES, remove makefiles which
5150 are targets and have no deps.
5151 * make.texinfo (Makefiles: Remaking Makefiles): Document that makefiles
5152 will not be remade if they are targets but have no dependencies.
5154 Tue Aug 15 00:00:08 1989 Roland McGrath (roland at apple-gunkies.ai.mit.edu)
5156 * remake.c (notice_finished_file): Increment files_remade for non-phony
5157 files if they didn't exist before (even if they still don't).
5159 * job.c: Include <errno.h> and declare errno.
5161 * job.c (exec_command): If the execve fails with ENOEXEC (Exec format
5162 error), return instead of exiting the child process.
5164 * job.c (start_job): In the child side, if exec_command fails, try
5167 * job.c (start_job): In the child side, call unblock_children instead
5170 * remake.c (notice_finished_file): Under -n or -q, always increment
5171 files_remade for non-phony files.
5173 * rule.c (intall_pattern_rule): Use find_percent.
5175 * vpath.c (vpath_search): Pass the `percent' members to
5178 Mon Aug 14 23:30:24 1989 Roland McGrath (roland at apple-gunkies.ai.mit.edu)
5180 * vpath.c (struct vpath): New member `percent', to hold a pointer into
5181 the pattern where the % is.
5182 (construct_vpath_list): Call find_percent on the pattern and set the
5183 new `percent' member.
5184 * read.c (read_makefile): Don't run find_percent on `vpath' directive
5187 * function.c (pattern_matches): Take new arg PERCENT, a pointer into
5188 PATTERN where the % is. If PERCENT is nil, copy PATTERN into local
5189 space and run find_percent on it.
5190 (expand_function: `filter', `filter-out'): Pass new arg to
5192 * read.c (record_files): Pass PATTERN_PERCENT to pattern_matches for
5193 static pattern rules. Save the percent pointer into implicit rule
5194 targets, and pass them to create_pattern_rule.
5195 * rule.c (convert_to_pattern): Pass new arg to create_pattern_rule.
5196 (create_pattern_rule): Take new arg TARGET_PERCENTS, nil or an array of
5197 pointers into the corresponding elements of TARGETS, where the %s are.
5199 Sun Aug 13 00:29:19 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5203 * README.templatate, README-doc.template: New files, turned into README
5204 and README-doc to go into the two distribution tar files.
5205 * GNUmakefile: Added a rule to edit the version number in
5206 README.template and README-doc.template, producing README and
5209 * remake.c (update_goal_chain): If -n or -q is in effect for a
5210 makefile, and it got updated, don't change STATUS, so we can still
5211 return -1 (meaning nothing was done). This avoids an infinite loop on
5214 Sat Aug 12 23:14:24 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5216 * remake.c (notice_finished_file): Treat -q the same as -n.
5218 * remake.c (update_goal_chain): Fixed handling of return from
5219 update_file. If -n or -q is in effect, ignore it.
5221 * job.c (start_job): Don't test for -t. We should never get called in
5224 Fri Aug 11 04:09:14 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5226 * function.c (expand_function): Removed unused variables.
5227 (handle_function): Removed unused variable.
5229 * main.c (main): Removed unused variable.
5231 Wed Aug 9 09:37:10 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5235 * remake.c (notice_finished_file): If FILE's modtime actually changed,
5236 increment files_remade.
5237 (remake_file): Don't increment files_remade.
5239 * remake.c (update_file): Don't print "up to date" messages for
5242 * job.c (child_handler): Don't set C->file->update_status to 1 if
5243 start_job returns nonzero under -n or -t.
5245 * expand.c (variable_expand): Count parens in $(foo:a=b) refs.
5247 * main.c: Removed old declaration of `glob_tilde' (which hasn't existed
5250 Tue Aug 8 23:53:43 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5252 * job.c (exec_command): Fixed to not ignore the last path component and
5253 to do the right thing with an empty path.
5255 Fri Aug 4 15:58:19 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5257 * remake.c (library_file_mtime): Look for libLIB.a, not /libLIB.a.
5258 Do VPATH search on libLIB.a, not /usr/lib/libLIB.a
5260 Thu Aug 3 20:42:00 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5262 * job.c [HAVE_SYS_WAIT or not USG]: If WIFSIGNALED is not defined by
5263 <sys/wait.h>, define it as (WTERMSIG != 0).
5265 Tue Aug 1 19:25:34 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5267 * remake.c (remake_file): If FILE has no commands and is a target,
5268 don't set its time to now. The time gets reset by notice_finished_file
5269 anyway, and it isn't needed since check_dep checks for nonexistence.
5273 * read.c (read_makefile): Don't read off the end of the string after an
5276 * job.c (exec_command): New function to search the path for a file and
5278 (start_job): Use exec_command rather than execvp.
5280 * read.c (read_makefile): Expand `include' directive args before
5281 parsing them. Allow trailing whitespace after filename.
5283 * variable.c (target_environment): Put makelevel + 1, rather than
5284 makelevel, in the `MAKELEVEL' envariable.
5286 Sat Jul 29 10:27:04 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5288 * remake.c (notice_finished_file): Don't get the new modtime of phony
5291 * remake.c (remake_file): Run commands instead of touching under -t if
5292 FILE->cmds->any_recurse is set.
5294 * commands.h (struct commands): Add new member `any_recurse', to be set
5295 nonzero if any `lines_recurse' element is nonzero.
5296 * commands.c (chop_commands): Set the `any_recurse' member.
5298 * commands.c (execute_file_commands): Split chopping of commands into
5299 lines into new function chop_commands.
5300 * commands.h: Declare chop_commands.
5302 * read.c (read_makefile): Test for a line beginning with a tab after
5303 checking for conditional lines, but before all other checks.
5305 Fri Jul 28 18:10:29 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5307 * read.c (read_makefile): Match directives against collapsed line
5308 and use that for their args.
5310 * read.c (read_makefile): Warn about extra text after `include'.
5312 Tue Jul 25 14:34:25 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5314 * make.texinfo (Rules: Directory Search: Selective Search): Fixed
5315 example to use correct `vpath' syntax.
5317 Mon Jul 24 12:10:58 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5321 * job.c (start_job): In the child side, unblock SIGCHLD.
5323 Fri Jul 21 18:25:59 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5325 * make.h: Don't include <sys/types.h> #ifdef sun.
5327 Mon Jul 17 14:29:10 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5329 * implicit.c (pattern_search): If ar_name (FILENAME), don't check for
5332 * job.c (wait_for_children): Changed "waiting for children" message to
5333 "waiting for unfinished jobs".
5335 Fri Jul 14 13:17:13 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5337 * load.c (load_average): Use an unsigned offset into kmem.
5339 Thu Jul 13 18:44:49 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5341 * variable.c (pop_variable_scope): Don't free the head of the chain of
5342 variables in each bucket twice.
5344 Tue Jul 11 06:45:24 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5346 * GNUmakefile: Include COPYING in the doc tar file.
5348 * variable.c, read.c, misc.c, job.c, function.c: Replace some identical
5349 "for" loops with next_token or end_of_token calls.
5351 Mon Jul 10 16:55:08 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5355 * compatMakefile: Documented new conditionals.
5357 * job.c: Don't define sys_siglist if HAVE_SIGLIST is defined.
5358 Don't define dup2 if HAVE_DUP2 is defined.
5360 * job.c (child_handler): Interpret the return from start_job correctly.
5362 * remake.c (update_file_1): Don't write "target not remade because of
5363 errors" message under -n or -q.
5365 * read.c: Declare getpwnam.
5367 * glob.c: Use <dirent.h> if DIRENT is defined.
5368 [USG]: Don't declare memcpy, since <memory.h> does.
5370 Fri Jul 7 20:53:13 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5372 * misc.c (collapse_line): Copy the line over in the right place.
5374 Fri Jul 7 18:33:24 1989 Roland McGrath (fsf at void.ai.mit.edu)
5376 * remake.c: Conditionalize inclusion of <sys/file.h> on not
5377 USG, since HP-UX defines a `struct file' there.
5379 Fri Jul 7 12:11:30 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5381 * job.c: If WTERMSIG is defined by <sys/wait.h>, define WAIT_T as int,
5382 and don't define other macros; this covers HP-UX.
5383 If WTERMSIG is not defined, use int or union wait based on USG and
5384 HAVE_SYS_WAIT; this covers BSD and SysV.
5386 * Version 3.54.3 (alpha).
5388 * job.c [USG and not USGr3]: Include <errno.h> and declare errno.
5390 * job.c (unblock_children [USG]): Declare child_handler.
5392 * job.c: Renamed WRETCODE to WEXITSTATUS.
5393 [HAVE_SYS_WAIT or not USG]: Undefine WTERMSIG, WCOREDUMP, and
5394 WEXITSTATUS before defining them. The HP-UX <sys/wait.h> defines them.
5396 * main.c (main): If there are no goals, fatal AFTER printing the data
5399 Thu Jul 6 22:43:33 1989 Roland McGrath (roland at apple-gunkies.ai.mit.edu)
5401 * glob.c [USG]: #define rindex as strrchr.
5403 * job.c [USG]: Include <sys/param.h> and #define getdtablesize() as
5406 Wed Jul 5 09:36:00 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5408 * Version 3.54.2 (alpha).
5410 * expand.c (variable_expand): When expanding recursive variable
5411 references (${${a}}), use the correct delimiters in the constructed
5414 Mon Jul 3 18:29:26 1989 Roland McGrath (roland at apple-gunkies.ai.mit.edu)
5416 * compatMakefile: Clear out and redefine the .SUFFIXES list because
5417 silly Sun 4 make defines .cps.h.
5419 * compatMakefile: Fix comment about -DNO_MINUS_C_MINUS_O.
5421 * remake.c: Include <sys/file.h> for O_* on 4.2.
5423 * commands.c: Define sigmask if it's not defined.
5425 Fri Jun 30 07:33:08 1989 Roland McGrath (roland at apple-gunkies.ai.mit.edu)
5427 * remake.c (remake_file): Don't always increment files_remade.
5429 * variable.c (push_new_variable_scope): Zero the new variable hash
5432 Thu Jun 29 17:14:32 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5434 * expand.c (variable_expand): When terminating the variable expansion
5435 buffer, use variable_buffer_output instead of a simply zero store,
5436 because the buffer may need to be enlarged.
5438 Wed Jun 28 16:53:47 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5442 * default.c (default_suffixes): Added `.ln'.
5443 (default_suffix_rules): Changed lint rules to use -C.
5445 Thu Jun 22 20:49:35 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5447 * job.c (start_job): Set `environ' to CHILD->environment before execing
5448 in the child process!
5450 Tue Jun 20 17:23:13 1989 Roland McGrath (roland at spiff.ai.mit.edu)
5452 * compatMakefile: Put job.h and rule.h in `srcs'.
5456 Mon Jun 19 16:25:18 1989 Roland McGrath (roland at spiff.ai.mit.edu)
5458 * job.c (start_job): If there are no more commands, return nonzero
5461 * compatMakefile (make): Pass `-f' to mv.
5463 * GNUmakefile: If `ARCH' or `machine' is defined, make $(ARCH)/*.o and
5464 $(ARCH)/make instead of *.o and make.
5466 * function.c (string_glob): Don't try to use freed storage!
5468 * read.c (readline): If there is only one byte of space in the buffer,
5469 enlarge the buffer before reading more.
5471 * arscan.c [M_XENIX]: Miscellaneous minor changes for Xenix.
5473 Sun Jun 18 13:07:45 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5475 * GNUmakefile (depend): Split commands into two lines so they won't be
5476 so long when variable-expanded.
5478 * compatMakefile: Documented MINUS_C_MINUS_O meaning. The line
5479 describing it got removed when the USG/wait stuff was documented.
5481 Sat Jun 17 22:56:54 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5485 Mon Jun 12 17:45:11 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5487 * remake.c (check_dep): Drop circular dependencies instead of fataling.
5488 (update_file_1 already does this.)
5490 * default.c (default_suffix_rules): For .s -> .o, put the -o flag to
5491 the assembler before the source file name.
5493 Sun Jun 11 12:00:52 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
5497 * make.texinfo (Features): Noted 1003.2 requirement of `+' meaning.
5499 * file.c (remove_intermediates): If !SIG, write a single "rm" command
5500 line, listing all files.
5502 * read.c (read_makefile): Don't free the storage for the passed
5503 filename, since it might not be malloc'd. When doing an included
5504 makefile, free the name's storage.
5505 (read_all_makefiles): Use variable_expand to find the value of
5506 `MAKEFILES'. Free the storage for the names of -f makefiles.
5507 (read_makefile): Allocate storage for the makefile name in the
5508 `struct file' in read_makefiles.
5510 * make.texinfo (Running: Instead of Execution): Document the effect of
5511 + and $(MAKE)/${MAKE}.
5513 * make.texinfo (Functions: Foreach Function): Document that if the
5514 iteration variable was undefined before the `foreach' call, it will be
5515 undefined after the call.
5517 * commands.c: Split into commands.c, job.h, and job.c.
5519 * rule.c (try_implicit_rule, pattern_search): Moved to new file
5522 * rule.c: Split into rule.h, rule.c, and default.c.
5523 * default.c (install_default_pattern_rules): Renamed to
5524 install_default_implicit_rules.
5525 * make.h, main.c (main): Renamed uses.
5527 * make.c: Renamed to misc.c.
5529 * make.c (main, log_working_directory, decode_switches,
5530 decode_env_switches, define_makeflags, die, print_version,
5531 print_data_base): Moved to new file main.c.
5533 * commands.c (execute_file_commands): Don't collapse backslash-newlines
5534 here. When chopping the commands up into lines, don't chop at
5536 (start_job): Collapse backslash-newlines after printing the line.
5538 * commands.c (start_job): Don't collapse backslash-newlines here.
5539 (execute_file_commands): Collapse backslash-newlines before chopping
5540 the commands up into lines.
5542 * commands.c (set_file_variables): Initialize the length counters for
5545 * commands.c (start_job): Use vfork instead of fork. Someone else says
5546 the child and parent DO have separate file descriptors.
5548 * variable.c: Split internals into variable.c, function expansion into
5549 function.c, and variable expansion into expand.c.
5550 * function.c (handle_function): New function to check for a function
5551 invocation and expand it.
5552 * expand.c (variable_expand): Use handle_function.
5553 * variable.c (push_new_variable_scope): New function to push a new
5554 empty variable set onto the current setlist.
5555 (pop_variable_scope): New function to pop the topmost set from the
5556 current setlist and free its storage.
5557 * function.c (expand_function: `foreach'): Push a new variable scope
5558 for the iteration variable and pop the scope when finished.
5559 * variable.h: Declare new functions.
5560 * variable.c (initialize_variable_output): New function to return a
5561 pointer to the beginning of the output buffer.
5562 (save_variable_output): New function to save the variable output state.
5563 (restore_variable_output): New function to restore it.
5564 * expand.c (variable_expand): Use initialize_variable_output.
5565 (allocated_variable_expand): Use {save,restore}_variable_output.
5566 * variable.c (current_setlist): Renamed to current_variable_set_list
5569 Sat Jun 10 00:11:25 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5571 * remake.c (library_file_mtime): Check for libNAME.a in the current
5572 directory before doing VPATH search.
5574 * variable.c (print_variable_set): Don't write "# Variables", and write
5576 (print_variable_data_base): Precede the variables with "# Variables".
5578 * make.c (main): Print the data base under -p after doing everything
5579 else, just before exitting. This way it gets info determined in
5580 updating the goal targets.
5582 * variable.c (print_variable_data_base): Split into print_variable,
5583 which prints one variable, and print_variable_set, which prints a set.
5584 Replaced with a call to print_variable_set for the global set.
5585 (print_file_variables): New function to print a given file's local
5588 * file.c (print_file_data_base): Call print_file_variables to print
5589 each file's local variables.
5591 * commands.c (set_file_variables): Actually define the values for
5592 the $^ and $? variables!!!
5594 * make.texinfo (Implicit: Pattern Rules: Automatic): Document new D and
5595 F versions of $^ and $?.
5597 * commands.c (start_job): In the child fork, use getdtablesize and a
5598 loop to close all file descriptors other than 0, 1, and 2. We need to
5599 do this since not only the bad stdin pipe, but also some directories,
5602 * commands.c (start_job): Use fork instead of vfork, because a vfork
5603 parent and child share file descriptors, and our child needs to diddle
5606 * variable.c (initialize_file_variables): When created a new variable
5607 set, zero out the hash table.
5609 * variable.c (target_environment): Don't use variables whose names are
5610 not made up of alphanumerics and underscores.
5612 * remake.c (update_file_1): Set the `parent' member of each dependency
5613 to FILE before updating it.
5615 * file.h (struct file): Add `parent' member.
5617 * variable.c (initialize_file_variables): Don't take second arg PARENT.
5618 Use FILE->parent instead. If FILE->parent->variables is nil, recurse
5621 * variable.h: Declare {allocated_}variable_expand_for_file.
5623 * variable.c (allocated_variable_expand): Now
5624 allocated_variable_expand_for_file, calling variable_expand_for_file,
5625 and taking second arg FILE.
5626 (allocated_variable_expand): New function, a wrapper around
5627 allocated_variable_expand_for_file, passing a nil second arg.
5629 Fri Jun 9 12:11:45 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5631 * commands.c (start_job): On the child side of the fork, always close
5632 the bad stdin file descriptor.
5634 * commands.c (struct child): New member `environment', to hold the
5635 environment for the child.
5636 (execute_file_commands): Set the new childs `environment' member to nil
5637 before calling start_job.
5638 (start_job): Set up CHILD->environment before running the commands if
5641 * make.c (main): Don't call new_environ. `shell' functions will now be
5642 run with the environment make was called with.
5644 * commands.c (child_handler): Don't check C->command_ptr before calling
5645 start_job since we now have to check C->file->cmds->command_lines and
5646 it's easier to let start_job handle all that.
5648 * commands.c (struct child): New member `command_line', to hold an
5649 index into file->cmds->command_lines.
5650 (execute_file_commands): Set the new child's `command_line' to 0 and
5651 its `commands' and `commands_ptr' to nil.
5652 (start_job): When CHILD->command_ptr runs out, increment
5653 CHILD->command_line and run the corresponding line from
5654 CHILD->file->cmds->command_lines. Run it even under -t, -q, or -n if
5655 the CHILD->file->cmds->lines_recurse element for that line is set.
5657 * commands.c (execute_file_commands): Chop CMDS up into lines, setting
5658 its `command_lines' and `lines_recurse' members, if it wasn't already
5661 * commands.h (struct commands): New members `command_lines' and
5662 `lines_recurse'. The first is an array of chopped-up lines; the second
5663 is an array of flags, each nonzero if the corresponding line is
5666 * variable.c (variable_expand_for_file): If FILE is nil, just do a
5667 vanilla variable_expand.
5668 (expand_function: `shell'): Pass second arg (as nil) to
5669 construct_command_argv.
5671 * commands.c (construct_command_argv): Use variable_expand_for_file on
5672 `$(SHELL)' and `$(IFS)' instead of lookup_variable to check those
5673 variables. This handles file-local and recursive values correctly.
5674 To support this, take an additional argument FILE.
5676 * variable.c (initialize_file_variables): New function to initialize
5677 FILE's variable set list from PARENT's setlist. PARENT is the
5678 immediate dependent that caused FILE to be remade, or nil if FILE is a
5679 goal. (When user-level per-file variables are implemented, PARENT
5680 should be passed as nil when defining per-file variables.)
5682 * variable.c (variable_expand_for_file): New function to expand a line
5683 using the variable set of a given file, and reporting error messages
5684 for the file and line number of that file's commands.
5686 * variable.h: Don't declare lookup_variable_for_file.
5688 * variable.c (lookup_variable_*): Turned back into lookup_variable. It
5689 now uses current_setlist.
5690 (global_setlist): New static `struct variable_set_list', a setlist
5691 containing global_variable_set.
5692 (current_setlist): New static `struct variable_set_list *', a pointer
5693 to the current variable set list.
5694 (define_variable): Define in the current top-level set, not the global
5697 * commands.c (set_file_variables): New function to set up the automatic
5698 variables for a file in its own variable set.
5699 (execute_file_commands): Use set_file_variables.
5701 * variable.c (new_environ): Replaced with target_environment, taking an
5702 argument FILE, and returning an environment for FILE's commands.
5704 * variable.c, variable.h: Remove all global special variable pointers.
5706 * variable.c (define_variable_for_file): New function like
5707 define_variable, but takes additional arg FILE, and defines the
5708 variable in the variable set at the top of FILE's chain.
5709 (lookup_variable_for_file): New function like lookup_variable, but
5710 takes additional arg FILE, and looks the variable up in all of FILE's
5713 * file.h (struct file): New member `variables', a `struct
5714 variable_set_list' containing the list of variable sets used in the
5715 expansion of the file's commands.
5717 * variable.c (variables): Replaced with static `struct variable_set'
5718 global_variable_set.
5719 (define_variable): Now define_variable_in_set, taking additional
5720 argument SET, the `struct variable_set' to define it in.
5721 (define_variable): Use define_variable_in_set with global_variable_set.
5722 (lookup_variable): Now lookup_variable_in_set, taking additional
5723 argument SET, the `struct variable_set' to look it up in.
5724 (lookup_variable): Use lookup_variable_in_set with global_variable_set.
5725 (lookup_variable_in_setlist): New function to look up a variable in a
5726 `struct variable_set_list' using lookup_variable_in_set.
5728 * variable.h (struct variable_set): New structure, containing a hash
5729 table and the number of hash buckets.
5730 (struct variable_set_list): New structure, containing a link for a
5731 linked-list, and a `struct variable_set'.
5733 * commands.c (start_job): Under -n, return what the recursive start_job
5734 call returns, since it might actually start a child.
5736 * make.texinfo (Rules: Wildcards): Document ~ and ~USER expansion.
5738 * commands.c (execute_file_commands): If start_job returns
5739 failure, but -t is set, set FILE->update_status to success.
5740 (start_job): If -t is set, and the commands are not recursive, return
5741 failure (is is done for -q).
5743 * remake.c (touch_file): New function to touch FILE.
5744 (remake_file): Use touch_file. When touching a file, still do
5745 execute_file_commands.
5747 * remake.c (remake_file): Don't check question_flag (-q), since we
5748 can't know here if the commands are recursive.
5750 * commands.c (start_job): Don't use the `recursive' member of
5751 CHILD->file->cmds. Instead, check for leading +s and $(MAKE) or
5752 ${MAKE} in the command line here.
5754 * commands.h (struct commands): Remove `recursive' member.
5756 * rule.c (install_default_pattern_rules): Remove use of `recursive'
5759 * read.c (record_files): Don't check commands from $(MAKE) and set
5760 their `recursive' member.
5762 * commands.c (fatal_error_signal): Treat SIGQUIT like SIGINT, SIGHUP,
5763 and SIGTERM, but don't send it to ourselves because it will cause a
5766 Thu Jun 8 20:30:04 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5770 * variable.c (variable_expand): Use allocated_variable_expand instead
5771 of expand_argument in a few places.
5773 * variable.c (allocated_variable_expand): Do static variable shuffling
5774 here instead of using expand_argument.
5775 (expand_argument): Use allocated_variable_expand.
5777 * variable.c (recursively_expand): New function to recursively expand
5778 its argument (a `struct variable'), returning the malloc'd value.
5779 (variable_expand): Use recursively_expand.
5781 Sun May 28 12:49:27 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
5783 * make.c (main): Fixed buggy fix in deciding to increase space for
5784 command-line variable definitions. (First it never did it, then it
5785 always did it; now it does it when necessary.)
5787 Sat May 27 14:01:54 1989 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
5789 * make.c (main): Fixed bug in deciding to increase space for
5790 command-line variable definitions.
5792 Fri May 26 15:48:01 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5794 * read.c (multi_glob): Use allocated_expand_variable for checking
5795 `HOME' variable for ~ expansion, since this may be called from inside a
5796 `wildcard' function expansion.
5798 * variable.h: Declare allocated_expand_variable.
5800 * variable.c (allocated_expand_variable): New function to do variable
5801 expansion in an allocated buffer, rather than the static one.
5803 * make.c (main): Don't set glob_tilde (it no longer exists).
5805 * variable.c (string_glob): Use multi_glob and parse_file_seq.
5807 * read.c (multi_glob): Do ~ expansion here.
5809 * glob.c (glob_tilde, glob_filename): Removed ~ expansion.
5811 * variable.c (define_variable, lookup_variable): Use a smarter hashing
5812 algorithm (the same one used for files and directories).
5813 (VARIABLE_BUCKETS): Increased to 523.
5815 * file.c (enter_file, lookup_file, rename_file): Use a smarter hashing
5816 algorithm, spreading the bits about somewhat.
5818 * make.c (log_working_directory): Under `-p', precede the directory
5821 * make.c (print_version): Under `-p', precede each line with a `#'.
5822 (print_data_base): Precede the header line with a `#' and include the
5823 date and time on it.
5825 * vpath.c (print_vpath_data_base): Precede non-directive
5828 * commands.c (print_commands): Precede the non-command line with a `#'.
5830 * rule.c (print_rule_data_base), file.c (print_file_data_base): Precede
5831 non-rule lines with `#'s.
5833 * dir.c (print_dir_data_base): Precede all lines with `#'s.
5835 * variable.c (print_variable_data_base): Changed format so that it can
5836 be makefile input. Lines that are not variable definitions are
5837 preceded with `#'. Nonrecursive variable definitions are made with all
5838 dollar signs doubled to reproduce the initial value. Recursive
5839 variable definitions containing newlines are done with `define'
5840 directives. Nonrecursive variable definitions containing newlines, and
5841 variable names containing :, =, or newlines, will come out garbled.
5843 Wed May 24 00:20:04 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5847 Tue May 23 19:18:00 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5849 * variable.c (expand_function: `filter'/`filter-out'): Use
5850 find_percent instead of pattern_p.
5852 * variable.c (expand_function: `patsubst'): Pass new args (both nil)
5854 (variable_expand): For $(var:pat%=rep%) references, pass new args to
5855 patsubst_expand so as to avoid find_percent and thus disallow
5858 * read.c (record_files): Pass new args to patsubst_expand.
5860 * variable.c (patsubst_expand): Take two new args: PATTERN_PERCENT
5861 and REPLACE_PERCENT. Each of these, if non-nil, means that PATTERN
5862 (or REPLACE) has already been run through find_percent, and
5863 PATTERN_PERCENT (or REPLACE_PERCENT) is the result.
5865 * make.h: Declare find_percent instead of pattern_p.
5867 * read.c (pattern_p): Changed to find_percent, returning a pointer
5868 to the %, or nil if there is none.
5869 (record_files): Take another arg, PATTERN_PERCENT, a pointer to the
5871 (read_makefile): Pass PATTERN_PERCENT to record_files.
5873 * make.texinfo (Rules: Static Pattern: Static Usage,
5874 Rules: Directory Search: Selective Search,
5875 Functions: Text Functions): Documented that `%' can be quoted.
5877 * variable.c (expand_function: `filter'/`filter-out'): Use pattern_p
5878 to allow quoted %s in patterns.
5880 * variable.c (patsubst_expand): Use pattern_p on PATTERN and REPLACE
5881 to allow quoted %s. Quoting backslashes are removed from REPLACE
5882 even if PATTERN contains no unquoted %.
5884 * read.c (pattern_p): Made global.
5885 * make.h: Declare pattern_p.
5887 * read.c (pattern_p): New function to search for an unquoted % in a
5888 string. Backslashes quote %s and backslashes. Quoting backslashes
5889 are removed from the string by compacting it into itself. Returns
5890 nonzero if an unquoted % was found, zero if not.
5891 (record_files): Use pattern_p to check for implicit rules.
5892 (read_makefile): Use pattern_p to check for static pattern rules.
5893 Also use it to allow quoted %s in `vpath' patterns; warn about
5894 `vpath' patterns with no %s.
5896 Mon May 22 16:31:52 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
5898 * glob.c (glob_filename): Replace a `1' with the `l' that should
5899 have been there. This incidentally stops it from dumping core.
5901 * glob.c (glob_filename): If the path is just a directory, with no
5902 file name pattern, return the directory alone.
5904 * glob.c (glob_tilde): New global variable (int), defaults to zero.
5905 (glob_filename): If glob_tilde is nonzero, expand ~ or ~USER.
5907 * variable.c (string_glob): Keep a static allocated buffer for file
5908 names taken from the list, instead of allocating and freeing one
5911 Fri May 19 18:06:26 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5913 * make.c (decode_switches): Get floating numbers from the right string.
5915 Sun May 14 13:48:04 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
5917 * commands.c (delete_child_targets): When deleting `also_make'
5918 files, include the target's name in the message:
5919 make: *** [foo] Deleting file `bar'
5921 Sat May 13 17:34:26 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
5923 * make.c (max_load_average, default_load_average): Default to -1.
5925 * load.c (wait_to_start_job): Return if max_load_average is < 0.0,
5928 Fri May 12 16:08:05 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
5930 * variable.c (variable_buffer_output): Don't try to do pointer
5931 arithmetic between objects not in the same array.
5933 Wed May 10 15:55:29 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5935 * rule.c [M_XENIX] (default_suffix_rules, default_variables): Minor
5936 changes to allow for strange compiler syntax.
5938 * rule.c (default_variables): Don't include "> $@" in
5939 $(PREPROCESS.S), since it's already in the .S.s rule.
5941 * file.c (enter_file): Make a new double-colon file the `prev'
5942 member of the bottom `prev' file (the one whose `prev' is nil).
5944 * read.c (do_define): Append newlines after copying the lines into
5945 the value buffer, so we end up with a trailing newline.
5947 * make.c (print_version): If the global variable
5948 `remote_description' is not nil or "", append "-%s" (its value) to
5950 * remote-*.c: Define remote_description appropriately.
5952 Sun May 7 15:15:53 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5954 * commands.c (error_status): Converted to new function child_error,
5955 taking new arguments TARGET_NAME and IGNORED, and writing an error
5956 message: "*** [target] Error 1" (or signal #, etc.), appending
5957 " (ignored)" if IGNORED is nonzero.
5958 (child_handler): Use child_error instead of error_status.
5960 * compatMakefile (all): Don't depend on `doc'.
5962 * compatMakefile (clean): Don't remove make-info*.
5963 (realclean): New rule, depends on `clean', removes tags, TAGS,
5964 and all Info and TeX files.
5966 Thu May 4 17:00:46 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5968 * variable.c (print_variable_data_base), file.c
5969 (print_file_data_base), rule.c (print_rule_data_base),
5970 Use floating-point for averages and percentages.
5972 * make.c (print_data_base): Print messages before and after the data
5975 * commands.c (print_commands): Changed output format to separate
5976 lines in commands and prefix them with tabs.
5978 * dir.c (print_dir_data_base): Changed output format slightly.
5980 * vpath.c (struct vpath, construct_vpath_list,
5981 selective_vpath_search): Remove the `exists' member and its uses.
5983 * vpath.c (print_vpath_data_base): New function to print all
5984 selective and general VPATH search paths (for -p).
5986 * make.c (print_data_base): Call print_vpath_data_base.
5988 * file.c (print_file_data_base): Changed format to look more like a
5989 makefile rule. Now reports all information in the `struct file'.
5991 * rule.c (print_rule_data_base): Changed format of display from:
5997 references nonexistent subdirectory.
5998 Also include number and percent that refer to nonexistent
6001 Thu Apr 27 15:45:40 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6003 * make.c (main): Figure out the level of recursion before writing
6004 the `Entering directory' message.
6005 * variable.c (define_automatic_variables): Don't figure out the
6006 level of recursion from `MAKELEVEL'. It's now done in main.
6010 Wed Apr 26 16:39:17 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6012 * commands.c (child_handler): Set `update_status' to zero when there
6013 are no more commands.
6015 * make.c (log_working_directory): If MAKELEVEL > 0, indicate the
6016 recurson in the message (make[1]: ...).
6018 * commands.c (child_handler): Change status to `cs_finished' when
6021 * commands.c (start_job): Return 0 (success) if there were no more
6022 commands for the child.
6023 (child_handler): Change the status to `cs_finished' when start_job
6024 fails to start the commands.
6026 * make.c (main): Don't handle SIGEMT if it's not defined.
6027 Do handle SIGDANGER if it is defined.
6029 * commands.c (child_handler): Reorganized inner loop so that it
6030 doesn't try to inspect the child before finding it.
6032 Tue Apr 25 16:28:24 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6034 * make.c (end_of_token): Fixed bug wherein backslashes caused
6039 * make.texinfo (Implicit: Pattern Rules: Automatic): Document
6040 setting of `$*' for explicit rules. Add note clarifying that
6041 automatic variables, though referred to in the documentation as
6042 `$<', etc. are no different than `$(<)', etc.
6044 Fri Apr 21 18:00:12 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6046 * file.c (enter_file): Don't strip leading `./'s.
6048 * read.c (parse_file_seq): Strip leading `./'s.
6050 Thu Apr 13 17:26:41 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6052 * make.texinfo (Commands: Parallel, Running: Options): Document that
6053 -l with no argument removes a previous load limit.
6055 * make.c (struct command_switch): New member `default_value'.
6056 (default_job_slots): Default value (of 1) for -j.
6057 (default_load_average): Default value (of 0, unlimited) for -l.
6058 (command_switches): Use default values for -j and -l.
6059 Also, -l without an arg now means no load limit.
6060 (define_makeflags): Don't write positive_int or floating options
6061 whose values are their defaults.
6063 * make.c (main): Under -w, write a `Leaving directory' message
6066 Tue Apr 11 16:46:29 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6070 * Makefile: Provide an easy place for system-specific definitions
6071 (-DUSG, etc.) and extra object files (for whatever).
6073 * make.texinfo: Miscellaneous fixes from RMS.
6075 Mon Apr 10 19:31:34 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6077 * rule.c (pattern_search): Put rules with `subdir' flags set in
6078 TRYRULES, since these might be valid with VPATHs. In the TRYRULES
6079 loop, don't do lookup_file or file_exists_p calls for dependencies
6080 of rules with `subdir' flags set, but still do vpath_search calls
6081 and intermediate-file searches.
6083 Thu Apr 6 16:33:00 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6085 * make.texinfo (Implicit: Pattern Rules: Automatic): Document the
6086 new definition of $* for explicit rules.
6088 * commands.c (execute_file_commands): If FILE->stem is nil, figure
6089 out if FILE->name ends in a suffix in the .SUFFIXES list; if so,
6090 store the name sans suffix in FILE->stem (and $*).
6092 Wed Apr 5 15:24:48 1989 Roland McGrath (mcgrath at helen.Berkeley.EDU)
6094 * file.c (remove_intermediates): Don't use `file_exists_p' to check
6095 for the existence of intermediate files, because the hashed
6096 directories will probably be out of date.
6098 * commands.c (child_handler): Free the good stdin before running the
6101 * commands.c [USG] (init_siglist): Don't case SIGEMT if it's not
6102 defined. Do case SIGDANGER (for IBM RT) if it is defined.
6104 * commands.c: Changed `SYS_WAIT' to `HAVE_SYS_WAIT'.
6105 (child_handler): Use `wait3' if HAVE_SYS_WAIT is #defined.
6107 * file.c (enter_file): If any `./'s are stripped off, allocate a new
6108 copy of the shortened name.
6110 * rule.c (pattern_search): Allocate the right length strings for
6111 `also_make' members.
6113 Sat Apr 1 13:28:38 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6117 * GNUmakefile: Make a separate tarfile of the DVI and info files.
6119 * make.c (define_makeflags): If a switch that takes an argument has
6120 its default value, put the switch in MAKEFLAGS with no arguments.
6122 * make.c (command_switches): Pass `-l' in MAKEFLAGS.
6124 Wed Mar 29 17:50:05 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6126 * GNUmakefile: Don't include the DVI and info files in the dist.
6128 * commands.c (child_handler): Don't call
6129 check_changed_{directories,vpaths}.
6131 * make.h: Don't declare check_changed_{directories,vpaths}.
6133 * vpath.c (check_changed_vpaths): Removed this function.
6135 * dir.c (struct directory): Remove `modtime' member.
6136 (find_directory): Don't set `modtime' member.
6137 (check_changed_directories): Removed this function.
6139 * remake.c (update_file_1): Set FILE->command_state to cs_finished
6140 if it didn't need to be remade.
6142 * remake.c (update_file): Only write the "up to date" message if the
6143 target went from `not_started' state to `finished' state without
6144 incrementing the count of files remade.
6146 * commands.c [USG] (init_siglist): If both SIGCHLD and SIGCLD are
6147 defined, don't put them both in the `switch'.
6149 Tue Mar 28 15:37:02 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6151 * file.c (rename_file): Change FILE's name!!!
6153 * rule.c (create_pattern_rule): Set the `terminal' member of the new
6154 rule after calling new_pattern_rule, which zeros it.
6156 * rule.c (default_variables): Use $(C++) in $(COMPILE.cc)!
6158 Sun Mar 26 15:52:30 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6160 * Makefile: Added a `clean' target.
6162 Fri Mar 24 15:08:46 1989 Roland McGrath (mcgrath at helen.Berkeley.EDU)
6166 * file.c (rename_file): If a `struct file' for the renamed-to name
6167 exists, and it is a target or has deps or commands, barf.
6168 If not just remove the old one for put in the new one.
6170 * remake.c (update_file_1, check_dep): Changed it back so that equal
6171 modtimes to NOT make dependencies be considered newer. RCS checks
6172 out files with equal modtimes as the RCS files, so this screws it.
6174 * make.h, glob.c: If __GNUC__ is defined, use __builtin_alloca.
6176 * Makefile: Use variables `ALLOCA' and `ALLOCASRC' so systems
6177 without a good standard alloca can get it from the Emacs
6178 distribution (or somewhere).
6180 * dir.c: Don't include <sys/stat.h>, since make.h does.
6182 * make.c: Removed debugging version of getwd.
6184 Thu Mar 23 16:16:27 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6188 * remake.c (update_file_1): If a dependency loop is found, don't
6189 fatal. Emit an error message and remove the dependency.
6191 * remake.c (library_file_mtime): Fixed to use the right names.
6192 (update_file_1, check_dep): Consider a dependency "newer" than its
6193 dependent if they have the same modification time.
6195 Wed Mar 22 19:31:35 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6197 * file.c (remove_intermediates): Don't try to remove nonexistent files.
6199 Mon Mar 20 10:21:22 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6203 * rule.c (default_variables): Set F77 to $(FC) and F77FLAGS to
6204 $(FFLAGS) so explicit rules expecting these (which are in System V)
6205 will work. However, there is no way to make setting these affect
6206 the implicit rules, unless we trash FC and FFLAGS (which BSD uses).
6207 [USG]: Set GET to `get' rather than `/usr/sccs/get'.
6209 Sun Mar 19 20:00:27 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6211 * vpath.c (construct_vpath_list): Don't replace VPATH[ELEM] with
6212 dir_name (V), because the latter may get freed.
6214 Sat Mar 18 15:01:39 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6218 * make.texinfo: Cleaned-up edition 0.1 Beta from RMS and Bob Chassell.
6220 * file.c (rename_file): If a file with the new name already existed,
6221 use the same storage space, after freeing the old file's name, deps,
6222 and `also_make' member, preserving the link in the chain.
6223 Also write an error message telling the user to report the incident;
6224 I don't think this should be able to happen, but I'm not sure.
6226 * file.c (rename_file): Don't add the hash values of the old and new
6227 names together! Reset HASHVAL before computing the second value.
6229 * dir.c (check_changed_directories): Zero the new file hash table
6230 after allocating it.
6232 * dir.c (dir_file_exists_p): If FILENAME is "", return 1 if the
6235 * vpath.c (check_changed_vpaths): New function to run through the
6236 search paths of all VPATHs, making the `exists' members correspond
6239 * commands.c (child_handler): Call check_changed_vpaths.
6241 * make.h: Declare check_changed_vpaths.
6243 * vpath.c (struct vpath): New element `exists', an array of char
6244 flags; exists[N] is nonzero if searchpath[N] exists.
6245 (construct_vpath_list): Set the `exists' member.
6246 (selective_vpath_search): Don't search directories whose `exists'
6249 * read.c (read_makefile): Set the `dontcare' flag of makefiles
6250 from the MAKEFILES variable if they were not mentioned anywhere but
6251 in the MAKEFILES variable.
6253 * read.c (read_makefile): Don't write an error message if fopen
6254 fails for a makefile from the MAKEFILES variable.
6256 * dir.c (struct directory): Add `modtime' member to record the
6257 modification time of the directory when it was opened.
6258 (check_changed_directories): New function to check all known
6259 directories; if their modtimes have changed since they were opened,
6260 their file tables are cleared and they are reset to be read in.
6262 * commands.c (child_handler): Call check_changed_directories before
6264 make.h: Declare check_changed_directories.
6266 Tue Mar 14 20:07:13 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6270 * make.c (print_version): Made the copyright say 1988, 1989.
6272 * read.c (read_all_makefiles): Don't set *MAKEFILES to the name of
6273 the end of the read_makefiles chain, since the latter may be from an
6274 included makefile. (Why did I do this before?)
6276 * make.c (main): Set argv[0] to "" if it was nil. Don't put the
6277 command-line variable definitions into argv[0], only into the MAKE
6280 Sun Mar 5 20:44:08 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6282 * ar.c (ar_member_date, ar_touch): Remove the trailing ) from the
6285 Fri Mar 3 18:15:15 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6287 * commands.c (construct_command_argv): Initialize NEW_ARGV to 0. At
6288 `slow' label, if NEW_ARGV is not 0, free it; then allocate 4 strings.
6290 Tue Feb 28 14:29:39 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6294 * COPYING, make.texinfo: New GNU General Public License, version 1.
6296 * *.c, *.h, Makefile: New copyright notices for the new GNU General
6297 Public License, version 1.
6299 * commands.c [USG]: Define WRETCODE correctly (again).
6301 * variable.c (expand_function: `shell'): Don't capture the standard
6302 error output of the shell command.
6304 * ar.c (ar_touch, ar_member_date): Allocate MEMNAME with the right
6307 * load.c [not UMAX] (load_average): Don't clobber the first nlist
6308 member when trying to set the second!
6310 Thu Feb 23 13:13:53 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6312 * commands.c (child_handler): Really ignore errors under -i and for
6313 - lines, don't just print a different message.
6315 * make.c (decode_switches): Fixed handling of arguments (or lack
6316 thereof) to switches.
6318 Wed Feb 22 16:25:39 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6320 * commands.c (construct_command_argv): Don't clobber LINE when
6321 checking the IFS variable.
6323 Sun Feb 19 11:17:07 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6325 * load.c [UMAX, not NO_LDAV] (load_average): Return 0.0 rather than
6326 randomness when calls fail.
6330 * commands.c (fatal_error_signal): If handling a user kill signal
6331 (TERM, INT, HUP), wait for the children without printing the
6332 "Waiting for children" message, since they will die quickly.
6336 * remote-stub.c (remote_status): Take another arg, BLOCK. If this
6337 is nonzero block waiting for remote children. If not, return 0 if
6338 we would have to block.
6340 * commands.c (child_handler) [not USG]: If called as a signal
6341 handler, use wait3 and don't block.
6342 [USG]: If called as a signal handler, return after handling one child.
6344 Sat Feb 18 13:37:04 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6346 * file.c (snap_deps): Process all double-colon entries of each file,
6347 not just the first one.
6351 * remote-stub.c: remote.c renamed.
6352 remote.c: Just include remote-stub.c
6354 * commands.c (child_handler): If we were called as a signal handler,
6355 return after handling one child.
6357 * commands.c [not USG]: Include <signal.h> and define `sigmask' if
6359 (block_children, unblock_children): Use sigmask rather than
6360 bitshifting explicitly (and incorrectly).
6362 * remote.c (remote_kill): New function to send a signal to a
6365 * commands.c (fatal_error_signal): If we get a SIGTERM, send one to
6366 each living child. If we get a SIGTERM, SIGINT, or SIGHUP, delete
6367 all pending targets before waiting for children.
6368 (struct child): Add new member `deleted'.
6369 (start_job): Initialize `deleted' member to 0.
6370 (delete_child_targets): New function to delete a given child's
6371 targets, unless the `deleted' flag in the `struct child' says they
6372 have already been deleted. Sets this flag before returning.
6374 Thu Feb 16 18:32:07 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6376 * commands.c [USG]: Define `WRETCODE' correctly (X & 0xff00).
6378 Tue Feb 14 16:05:00 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6380 * commands.c (construct_command_argv): Don't make the 0th element of
6381 the argument list be "sh" when executing /bin/sh, because start_job
6382 uses the 0th element as the program name.
6384 Sun Feb 12 17:42:05 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6388 * read.c (readline): Put a null in the beginning of the buffer
6389 before starting the reading loop.
6391 * read.c (read_makefile): Made main reading loop while
6392 !feof (infile), and removed EOF check after calling readline.
6394 Sun Feb 5 19:52:38 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6396 * remote.c (block_remote_children, unblock_remote_children): New
6397 (stub) functions to block and restore asynchronous notification of
6400 * commands.c (block_children): Call block_remote_children.
6401 (unblock_children): Call unblock_remote_children.
6402 (child_handler): If called as a signal handler, block remote
6403 children on entry and unblock them before returning.
6405 * commands.c (child_handler): For unknown children, if they are
6406 remote, give their remote ID; if local, give their PID and make's.
6408 * commands.c (execute_file_command): Don't put a new child in the
6409 chain unless start_job succeeds. Block children before calling
6410 start_job, and unblock them after putting the child in the chain and
6411 incrementing `job_slots_used' (if start_job succeeded).
6413 * commands.c (block_children, unblock_children): Make these globally
6414 visible (not `static').
6415 commands.h: Declare block_children and unblock_children.
6417 * variable.c (expand_function: `shell'): Use
6418 `shell_function_completed'. Block children before forking and
6419 unblock after `shell_function_pid' is set properly and
6420 `shell_functon_completed' is reset to 0.
6422 * commands.c (child_handler): When the child of the `shell' function
6423 completes, set `shell_function_completed' to 1 if it actually ran,
6424 or -1 if it didn't (due to fork or exec failure).
6426 * commands.c (block_children, unblock_children): New functions to
6427 block and unblock the child termination signal.
6428 (wait_for_children): Use block_children and unblock_children.
6429 (execute_file_commands): Block children around the critical section
6430 wherein a new child is put on the chain.
6432 * make.c (main): Change the environment to contain the correct
6433 MAKELEVEL before re-execing.
6435 Sat Feb 4 18:28:48 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6439 Fri Feb 3 16:36:49 1989 Roland McGrath (mcgrath at helen.Berkeley.EDU)
6441 * rule.c (default_variables): Fixed $(LINK.c).
6443 Wed Feb 1 18:05:07 1989 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
6447 * version.c: Removed copyright notice, since this is a one-line file.
6449 * commands.c (error_status): Made it return BUF, rather than running
6450 off the end (this apparently worked on Sun 3s for some reason).
6452 * ar.c, commands.c, dep.h, load.c, make.c, make.h, read.c, remake.c,
6453 rule.c, variable.c, Makefile: Changed copyrght notices to cover 1989.
6455 Mon Jan 30 15:51:28 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6459 Fri Jan 27 20:09:24 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6461 * remake.c (remake_file): Don't touch phony targets.
6463 * rule.c (convert_to_pattern): Fixed an incorrect length passed to
6466 * variable.c (expand_function: `shell'): Close the read side of the
6467 pipe on the parent side of the fork.
6469 * commands.c (start_job): On the child of the fork, close the
6470 BAD_STDIN fd if we're not using it.
6472 * read.c (record_files): A file beginning with a dot can be a
6473 default target if it also contains a slash (as in `../foo').
6475 * commands.c (wait_for_children): For BSD, block SIGCHLD rather than
6476 ignoring it to avoid a race condition when child_handler is returning.
6478 * commands.c (child_handler): Do blocking waits.
6479 (error_status): Return a string describing exit status. (Split out
6482 * read.c (multi_glob): Change VECTOR to VEC for Alliant.
6484 Thu Jan 5 00:06:51 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6488 * make.texinfo (Features): Noted $(foo:PAT=SUB) from SunOS 4.0.
6490 * make.texinfo (Options/Recursion): -d and -p go in the environment.
6492 * load.c: Include "commands.h".
6494 Wed Jan 4 17:49:25 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6496 * make.c (switches): -d and -p can come from the environment and are
6499 * read.c (record_files): Fixed the checking for duplicate deps so it
6500 doesn't clobber the first one.
6502 * make.texinfo: Documented default implicit rule changes.
6504 * rule.c: Revamped default suffix rules. They now use Sun's style
6505 of using variables `COMPILE.c', `LINK.c', etc. for each suffix, and
6506 use `TARGET_ARCH' and `TARGET_MACH' variable where appropriate.
6507 Also support Modula-2 compilation (suffixes .sym, .def, and .mod).
6508 Ratfor Yacc support is gone, since nobody has yacc -r.
6509 All EFL support is gone, since nobody uses EFL.
6511 * ar.c, arscan.c: Don't assume `long int' and `int' are the same.
6513 * commands.c [USG]: Fixed wait status bit encoding.
6514 [USG and not USGr3] (dup2): Define this for SysVr2.
6516 * make.h, dep.h, make.c [iAPX286]: Make allowances for this
6517 brain-damaged compiler.
6519 * make.texinfo (Variables: Flavors): Fixed a typo.
6521 Tue Jan 3 18:09:31 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6523 * ar.c (ar_member_date, ar_touch): Truncate member names to 15 chars.
6527 * commands.c [SYS_WAIT]: If this is defined, use BSD <sys/wait.h>
6528 and wait3 even if USG.
6530 * read.c (record_files): Defining .DEFAULT with no deps or commands
6531 clears its commands.
6533 * rule.c (default_suffixes): Added `.sh'.
6534 (default_suffix_rules): Added single-suffix .sh rule, copies source
6535 to target and makes target executable.
6536 make.texinfo (Catalogue of Rules): Documented .sh rule and its use
6537 in conjunction with SCCS.
6539 * rule.c (set_default_suffixes): Define variable `SUFFIXES' to the
6540 default list ("" under -r).
6541 make.texinfo (Suffix Rules): Document `SUFFIXES' variable.
6543 * rule.c (default_variables), make.texinfo (Implicit Variables):
6544 Variable AR defaults to `ar', ARFLAGS to `rv', and RM to `rm -f'.
6546 * rule.c (install_default_pattern_rules): Default variables are made
6548 (default_variables): Added "CPP", defined to "$(CC) -E".
6549 (default_suffixes): Added `.S', before `.s'.
6550 (default_suffix_rules): New rule for .S to .s, runs CPP.
6551 All rules that use CPP now include "$(CPPFLAGS)".
6552 make.texinfo (Catalogue of Implicit Rules, Implicit Variables):
6553 Documented above changes.
6555 * commands.c [USG] (sys_siglist): Don't define.
6556 [USG] (init_siglist): New function to initialize sys_siglist.
6558 * make.texinfo (Variables: Reference): Documented `$(foo:PAT=SUB)'
6561 * variable.c (variable_expand): A reference `$(foo:PAT=SUB)' is
6562 equivalent to `$(patsubst PAT,SUB,$(foo))'.
6564 * variable.c (variable_expand): Free the storage for the expansion
6565 of a recursive variable when it is nod longer needed.
6567 * variable.c (variable_expand): When checking for `$($(foo))', use
6568 lindex so as not to search for the second `$' outside the parens.
6570 * make.c (struct stringlist, main, decode_switches): Changed `index'
6573 Sat Dec 24 16:02:32 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6575 * commands.c (wait_for_children [USG]): Handle SIGCLD with SIG_DFL,
6576 rather than SIG_IGN. Ignoring SIGCLD reportedly makes wait return -1.
6578 * arscan.c [USGr3]: Define PORTAR to 1 (as with sun386).
6579 (ar_scan [USGr3]): Remove trailing slashes from member names.
6581 Thu Dec 22 17:54:05 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6583 * make.texinfo (Makefiles: Overriding Makefiles): New node
6584 documenting use of .DEFAULT to have one makefile defer unmakeable
6587 * make.texinfo (Implicit: Using Implicit, Implicit: Last Resort):
6588 Mention empty commands and xref node `Empty Commands'.
6590 Wed Dec 21 20:12:40 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6594 * make.c (struct command_switch, command_switches, et al): New
6595 member `noarg_value', if not nil, ptr to value to use if no arg is
6596 given to a switch that would otherwise require one. The -j option
6597 can now be given w/o an arg, to mean infinite jobs.
6598 * commands.c: If job_slots is zero, infinite jobs.
6600 * read.c (read_all_makefiles, read_makefile): Make makefiles precious.
6602 * make.c (decode_switches): For a positive_int or floating option,
6603 if we moved to the next argument word, but found no argument for the
6604 option, move back to the correct word.
6606 * make.c (decode_switches): If we got any unknown options, die after
6607 processing all arguments.
6609 * GNUmakefile: Moved `include depend' to the end, so the default
6610 goal will be set before then.
6612 * load.c (wait_to_start_job [Unix, UMAX]): Merged into one version
6613 under #ifdef LDAV_BASED. Only loop while we have jobs running.
6614 Sleep for increasing amounts (increase one second per iteration)
6615 before checking the load average (after the first check).
6616 Get the load average from function load_average.
6617 (wait_to_start_job [not LDAV_BASED]): Always return.
6618 (load_average [UMAX]): Fetch load average for Encore UMAX.
6619 (load_average [not NO_LDAV]): Fetch load average from /dev/kmem.
6620 [not NO_LDAV]: Define LDAV_BASED.
6622 Tue Dec 20 18:54:50 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6626 * commands.c (wait_for_children): Take second arg, ERROR. If
6627 nonzero, and there are children, print a message on stderr.
6628 (execute_file_commands, fatal_error_signal): Pass second arg.
6629 * make.c (die), remake.c (update_goal_chain), variable.c
6630 (expand_function: `shell'): Ditto.
6632 Sat Dec 17 01:05:38 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6634 * commands.c (start_job): Call wait_to_start_job before forking.
6636 * load.c (load_average): Converted to wait_to_start_job.
6638 * remote.c: New file for remote execution functions.
6639 (start_remote_job_p): Return nonzero if the next job should be run
6641 (start_remote_job): Start a remote job and return an ID for it.
6642 (remote_status): Get status of dead remote children.
6644 Fri Dec 16 16:51:07 1988 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
6646 * commands.c (start_job): If start_remote_job_p () returns nonzero,
6647 call start_remote_job to start the job rather than fork and exec.
6650 * commands.c (execute_file_commands): Moved load average checking to
6653 * commands.c (child_handler: USG): Record the pid wait returns.
6655 * load.c (UMAX): Added some #include's needed for UMAX.
6657 * read.c (multi_glob), variable.c (string_glob): Ignore a (char **)
6658 -1 return from glob_filename.
6660 * variable.c (variable_expand): Make sure we don't increment past
6661 the end of the string we were passed.
6663 * variable.c (variable_expand): Terminate the expansion.
6665 * file.c (rename_file): If there is already a file under the new
6666 name, set its contents equal to FILE's (ick).
6668 * variable.c (define_automatic_variables): Pass all the args to
6669 define_variable when defining MAKELEVEL!
6671 * commands.c (execute_file_commands): If max_load_average > 0, and
6672 we have children running, don't start up another child until the
6673 load average goes below max_load_average.
6675 * make.c: New variable `max_load_average'.
6676 (struct command_switch, decode_switches, decode_env_switches):
6677 Handle floating-point (double) args.
6678 (command_switches): Added `-l' switch to set `max_load_average'.
6680 * load.c (load_average): New file and function to return a double
6681 that is the current load average (1.00 scale).
6682 * GNUmakefile, oldMakefile: Pass flags in $(LOAD_AVG) for load.c.
6684 Thu Dec 15 15:22:08 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6686 * Makefile: Renamed to oldMakefile.
6687 * GNUmakefile: Make Makefile from oldMakefile and depend.
6689 * read.c (read_all_makefiles): When putting the default makefiles in
6690 the read_makefiles chain so they will be remade, put them in the
6693 * remake.c (update_goal_chain): If MAKEFILES is nonzero, always make
6694 in serial, and return as soon as one goal whose `changed' member is
6695 nonzero is successfully remade.
6697 * commands.c: Don't include <sys/fcntl.h>.
6699 * commands.c (construct_command_argv): Added ` to sh_chars.
6701 * make.h: Don't declare construct_makeflags.
6703 * make.c (main): Set up MAKEFLAGS and MFLAGS and make an environment
6704 both before and after reading the makefiles, so the makefiles can
6705 use them and possible change them, and later children will get the
6707 (construct_makeflags): Replaced with define_makeflags (static void),
6708 which defines the two variables.
6709 * variable.c (define_automatic_variables): Don't define MAKEFLAGS
6712 Mon Dec 12 14:40:31 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
6716 * commands.c (child_handler): Reset the handler to ourselves when
6717 called for USG, since it has no safe signals.
6719 * commands.c: For USG, use an int rather than a `union wait' for
6720 wait calls, and dissect it with bitmasks.
6721 (child_handler): No wait3 system call in USG. Since we can't
6722 protect from hanging, always return immediately if we have no
6723 children we know about and we're not running a `shell' function.
6724 (There is still the danger of hanging waiting for a child that died
6725 without our being notified.)
6727 * remake.c: Include <fcntl.h> instead of <sys/file.h>. What we need
6728 is really in <fcntl.h>, and while BSD <sys/file.h> includes
6729 <fcntl.h>, USG doesn't.
6731 * make.c (main): Figure out the program name before doing anything
6732 which might need it (in a call to error or fatal).
6734 * dir.c, glob.c: Use `struct dirent' and <dirent.h> for USGr3.
6736 * arscan.c (ar_scan): Added missing & before buf (which is an int)
6737 if SARMAG is not defined (SysV).
6739 Fri Dec 9 18:44:13 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
6743 * dir.c (find_directory, dir_file_exists_p): Keep track of how many
6744 directories we have open and don't let it be more than
6745 MAX_OPEN_DIRECTORIES (currently 10).
6747 * variable.c (expand_function: `foreach'): Use expand_argument
6748 rather than variable_expand so each repetition doesn't clobber the
6751 Mon Dec 5 15:58:46 1988 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
6755 * Makefile: Define `install' target.
6757 * GNUmakefile: Don't include GNUmakefile or depend in the
6760 Wed Nov 30 15:53:42 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
6762 * commands.c (execute_file_commands): Don't clobber a null into
6763 random storage if there were no $^ and/or $? words.
6765 * remake.c (check_dep): Set *MUST_MAKE_PTR nonzero if a dependency
6768 * ar.c (ar_member_date, ar_touch): Make sure the modtime of the
6769 archive file itself is known before we fetch or change the modtime
6770 of one of its members.
6772 * read.c (read_makefile): Expand variable and function references
6773 before parsing rules so variable can contain special characters
6774 (colons and semicolons).
6776 Sat Nov 26 11:36:31 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6778 * variable.c (expand_function: `filter', `filter-out'): Fixed so
6779 that filter-out works right.
6781 * variable.c (expand_function: `filter', `filter-out'): Made these
6782 functions use each word of their first argument as a pattern.
6784 Fri Nov 25 10:51:47 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6788 * read.c (record_files): If a target is listed more than once in a
6789 single rule (that defines commands), give a warning message rather
6790 than the counter-intuitive message saying commands were already
6791 defined (in the same place).
6793 * make.c (fatal, error): Made them both take 6 args since there is
6794 at least one error message that need that many. Too bad vfprintf is
6799 * read.c (read_makefile): Moved the construction of the `struct
6800 commands' into record_files. Call record_files before recursing for an
6801 included makefile so the higher-up will determine the default goal.
6802 (record_files): Take arguments COMMANDS, COMMANDS_IDX and
6803 COMMANDS_STARTED and construct a `struct commands.
6805 Thu Nov 24 14:36:33 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6809 * make.c (main): Made it a fatal error if we can't move back to the
6810 directory we started in before re-execing.
6812 * make.c (main): Get the current directory before doing anything
6813 else, so we know it even if we don't need it for the value of
6814 `MAKE', since we might want it when re-execing.
6816 Wed Nov 23 13:34:44 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6820 * read.c (record_files): Eliminate duplicate deps in a chain.
6822 * variable.c (expand_function: `sort'): Pass the right number to
6823 qsort, not one less.
6825 * remake.c (remake_file): Always call notice_finished_file if
6826 FILE->command_state == cs_finished.
6828 * commands.c (execute_file_commands): Call notice_finished_file to
6829 set FILE's status correctly when start_job fails (because it's out
6830 of commands or running under -n).
6832 Fri Nov 18 15:31:12 1988 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
6836 * remake.c (update_file_1): Set the `update_status' of FILE to
6837 nonzero and set FILE's `updated' bit if we have decided to give up
6838 on remaking FILE because of errors in the dependencies.
6840 * rule.c (pattern_search): Debugging messages use `dependency' (vs.
6841 `dependent') properly.
6843 * make.texinfo (Conditionals: Conditional Syntax): Function index
6844 entries for `ifndef' and `ifneq'.
6846 * variable.c (define_automatic_variables): Define `MAKELEVEL' to the
6847 decimal number of the makelevel, since it may be malformed or blank.
6849 * remake.c (remake_file): Call notice_finished_file after touching.
6851 Sat Nov 12 19:29:34 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6855 * GNUmakefile (dist): Pass the `-f' flag to compress.
6857 * vpath.c (build_vpath_lists): Check for VPATHS being nil after
6858 constructing the general VPATH list from the `VPATH' variable.
6860 Fri Nov 11 08:02:26 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6862 * make.c (fatal, error): Made error messages for recursive runs be
6865 Thu Nov 10 16:51:36 1988 Roland McGrath (mcgrath at basil.Berkeley.EDU)
6869 * read.c (read_makefile): Made it eat leading spaces and formfeeds
6870 (but not tabs), like it's documented to.
6872 * read.c (read_makefile): Let included makefiles determine the
6873 default goal, as is done by System V Make.
6875 Tue Nov 1 19:03:08 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6877 * variable.c (new_environ): Don't increment VCNT when a variable is
6880 Fri Oct 28 16:54:15 1988 Roland McGrath (mcgrath at basil.Berkeley.EDU)
6884 * rule.c (convert_to_pattern): Don't use the same storage for a name
6885 in two rules since new_pattern_rule may free this storage when a
6888 * rule.c (new_pattern_rule): Undid useless change I made Oct 25.
6890 Thu Oct 27 19:17:53 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6894 * GNUmakefile, Makefile: Fixed a typo in a comment.
6895 * Makefile: Removed malloc.o from object file list.
6897 * variable.c: Removed old debugging #define's for xmalloc and
6898 xrealloc so non-ANSI cpp's won't barf.
6900 * make.c (main): Made local array for temp file name static so
6901 compilers that don't do auto aggregate initialization won't barf.
6903 * read.c: Removed static declaration of copy_dep_chain since it is
6906 Tue Oct 25 16:59:30 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
6908 * rule.c (new_pattern_rule): If we threw out the new rule because it
6909 matched an old one and OVERRIDE was zero, don't put the freed
6910 pointer in the chain!
6912 Wed Oct 19 15:07:43 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
6916 * variable.c (expand_function: `sort'): Don't do the sorting and
6917 writing out if there were no words in the first place.
6919 * remake.c (remake_file): Only fail with a "no way to make" message
6920 for a dependency (non-target) file. If we don't know how to remake
6921 a target file, pretend it was successfully remade and is very new.
6923 * remake.c (remake_file): Don't increment `files_remade' for a
6924 non-target file we don't know how to remake.
6926 * read.c (record_files): Don't die with "both : and :: entries" for
6927 a file whose `is_target' flag is not set.
6929 Tue Oct 18 17:24:11 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6931 * variable.c (expand_function: `patsubst', `subst'): Free the right
6934 * variable.c (expand_function: `subst'): Don't clobber the
6935 pointer to the end of the second arg and then try to use it!!!
6937 Mon Oct 17 16:44:45 1988 Roland McGrath (mcgrath at catnip.Berkeley.EDU)
6939 * variable.c (expand_function: `patsubst'): Don't clobber the
6940 pointer to the end of the second arg and then try to use it!!!
6942 * variable.c (expand_function: `word' function): Made it parse its
6943 second argument correctly.
6945 * ar.c (ar_touch): Return 1 rather than -1 for on errors.
6947 Sat Oct 15 15:12:16 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6951 * GNUmakefile: Removed explicit rule for make.dvi since the built-in
6952 implicit rule now works.
6954 * rule.c (default_suffix_rules): Fixed .texinfo.dvi rule yet again
6955 so that it really works, now that parens are counted.
6957 * remake.c (update_file_1): Set FILE's `updated' flag after calling
6958 remake_file if it failed or finished immediately.
6960 * remake.c (update_file): Use the `updated' flag rather than the
6961 command state to decide if a file was fully considered, and
6962 therefore might give an "up to date" message.
6964 * variable.c (expand_function): Made all functions that take more
6965 than one argument count parens of the appropriate flavor in their
6966 args and ignore commands nested in parens.
6968 Fri Oct 14 18:35:00 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6970 * read.c (read_all_makefiles): Pass second arg to read_makefile for
6973 Thu Oct 13 16:40:08 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6977 * GNUmakefile: Added an explicit rule for make.dvi since the
6978 built-in .texinfo.dvi implicit rule is screwed up.
6980 * rule.c (default_suffix_rules): Added a comment that the
6981 .texinfo.dvi rule does not work because of an ahem, feature of Make
6982 that at some point will be fixed--er, enhanced to alleviate this
6985 * rule.c (default_suffix_rules): Fixed Texinfo -> DVI rule (again).
6987 * make.texinfo (Commands: Execution): Documented new competing for
6988 standard input among children.
6990 * commands.c (struct child): Added `good_stdin' flag to tell if this
6991 child has the stdin that doesn't point into nirvana.
6992 (good_stdin_used): New variable to tell if any child has the good
6994 (child_handler): Reset `good_stdin_used' if a dead child's
6995 `good_stdin' flag is set.
6996 (start_job): Give the new child the good standard input if
6997 `good_stdin_used' is no set, and set the child's `good_stdin' flag
7000 * rule.c (default_suffix_rules): Changed Texinfo -> DVI rule to work
7003 * read.c (read_all_makefiles): Stop reading default makefiles after
7006 * read.c (read_makefile): Reset `reading_filename' and
7007 `reading_lineno_ptr' after recursing for an included makefile.
7009 * GNUmakefile: New GNU Make-specific makefile that does everything
7010 Makefile does plus distribution stuff, and doesn't contain any hacks
7011 to try to work with Unix make.
7013 * Makefile: Removed distribution stuff.
7015 * make.c (main): Use mktemp to construct the names of temporary
7016 files used for standard input makefiles.
7018 * make.c (main): Don't turn standard input into a broken pipe.
7020 * commands.c (start_job): Keep two extra file descriptors around: a
7021 good standard input, and a bad one that reads from a broken pipe.
7022 On the child side of the fork, if there are other children, give
7023 this one the broken pipe so they won't compete; if this is the only
7024 one, give it the good standard input.
7026 * make.h: Declare notice_finished_file.
7028 * commands.c (execute_file_commands): Use noticed_finished_file
7029 after waiting for the child when there is only one job slot.
7031 * remake.c (notice_finished_file): New function to re-check mtime's
7032 and such things to be done when commands finish.
7033 (update_file_1): Use notice_finished_file.
7035 * commands.c (child_handler, execute_file_commands): Use new
7036 variable `job_slots_used' to record the number of jobs currently
7037 running, rather than diddling with `job_slots'.
7038 (execute_file_commands): Increment `job_slots_used' before calling
7039 start_job and decrement it on failure to avoid race condition.
7040 If there is only one job slot, wait for the child to finish and
7041 return its status so commands are run in linear order, as if there
7042 were no parallelism.
7044 Wed Oct 12 15:59:03 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7046 * remake.c (remake_file): Don't print a "No way to make" message for
7047 targets whose `dontcare' flags are set.
7049 * read.c (read_all_makefiles): Set the `dontcare' flag of the
7050 `struct file' each default makefile added to the chain.
7052 * file.h (struct file): Add `dontcare' member.
7054 * read.c (read_all_makefiles): When no default makefiles are found,
7055 put the names of all those tried in the `read_makefiles' chain so
7056 they will be updated if possible, giving their `struct dep's'
7057 `changed' members the value of 0 so we won't care if they cannot be
7060 * make.texinfo (Makefiles: Remaking Makefiles): Documented that
7061 default makefiles will be remade if not found.
7063 * read.c (read_all_makefiles): If no default makefiles can be found,
7064 go through the list of default names, trying to make one, stopping
7067 * remake.c (remake_file): Set STATUS to 0 after successfully touching.
7069 * dir.c (file_impossible, file_impossible_p): Don't clobber FILENAME
7070 to "" and then try to to a strcmp on it!!!
7072 Mon Oct 10 16:09:18 1988 Roland McGrath (mcgrath at cinnamon.Berkeley.EDU)
7074 * make.c (main): Don't do `dir_load (".")'.
7076 * rule.c (count_implicit_rule_limits), vpath.c
7077 (construct_vpath_list): Test the existence of a given directory by
7078 `dir_file_exists_p (DIR, ".")' and assume that if this returns zero,
7079 it means the directory really does not exist.
7081 * dir.c (struct dirdata): Replaced with `struct directory' for
7082 directories, each containing a chain of `struct dirfiles', one for
7083 each file (real or impossible).
7084 (dir_load): Removed.
7085 (find_directory): New function to find the `struct directory' for a
7086 named directory and return it (possibly creating a new one).
7087 (dir_file_exists_p): Read the directory on the fly if its stream is
7088 still valid (and ever was) if the file we're looking for is not
7089 already in the hash tables.
7090 (file_impossible, file_impossible_p, dir_name, print_dir_data_base):
7091 Use the new directory/file scheme.
7093 * make.texinfo: Miscellaneous editorial changes and clarifiactions.
7095 * commands.c (struct child): Remove `environ' member.
7096 (child_handler, start_job, execute_file_commands): Remove use of
7097 `environ' member and new_environ.
7099 * make.c (main): Call new_environ after reading makefiles.
7101 * variable.h: Declare `new_environ' to return void.
7103 * variable.c (new_environ): Put the environment in `environ' and
7106 Fri Oct 7 15:48:39 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
7110 * Makefile: Don't make the uncompressed tar file.
7112 * variable.c (expand_function: `shell' function): Made it not expect
7113 read to null-terminate the buffer.
7115 * Makefile: Made it use a temporary symlink to . rather than a
7116 temporary directory to make the distribution tar file.
7118 Thu Oct 6 17:52:35 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
7122 * make.texinfo: Fixed a line that got garbaged somehow.
7124 Mon Oct 3 16:14:39 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
7126 * make.c (main): Try to move back to the directory we started in
7127 before re-exec ourself.
7129 * remake.c (update_file_1): A double-colon target with no deps
7130 always needs to be remade.
7132 * remake.c (remake_file): Changed "No way to make" message to say
7133 `target' rather than `file'.
7135 Sun Oct 2 12:50:47 1988 Roland McGrath (mcgrath at catnip.Berkeley.EDU)
7137 * remake.c (update_file_1): Set FILE->update_status to the return
7138 value of remake_file.
7140 * rule.c (convert_to_pattern): Fixed swapped lengths passed to
7141 xmalloc for source/target suffixes.
7143 * make.texinfo: Documented that MAKEFLAGS and MFLAGS are read in
7144 from makefiles. Updated the `Features' section a bit.
7146 * make.c (main): Read switches from MAKEFLAGS and MFLAGS variables
7147 after reading in makefiles.
7149 * make.c (main): Put a line "/tmp/foo:;" rather than ".PHONY:
7150 /tmp/foo" in front of temp files made for stdin makefiles.
7152 * remake.c (update_file): Test the state of the right `struct file'
7153 for double-colon files.
7155 * make.c (main): Put a ".PHONY: /tmp/foo" line in front of temp
7156 files made for stdin makefiles so they won't be remade when we
7157 re-exec. Kludge-o-matic!!
7159 * remake.c (update_goal_chain): Judge files as being finished based
7160 on their `updated' flag, not their state.
7162 * read.c (read_makefile): Don't check for FILENAME being "-".
7163 (read_all_makefiles): Set each element of MAKEFILES to the name put
7164 in READ_MAKEFILES by read_makefile, since read_makefile may free the
7165 storage for the name it is passed, and someone might want to look at
7166 the elements of MAKEFILES again.
7168 * make.c (main): For each `-f' flag with arg `-' (standard input),
7169 read standard input into a temp file and pass the temp file's name
7170 to read_all_makefiles, after making sure it will not be remade.
7172 * make.c (construct_makeflags): Always put out `-j1'.
7174 Sat Oct 1 00:19:59 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7176 * commands.c (execute_file_commands): If commands are nothing but
7177 whitespace, set the state to `cs_finished' before returning 0.
7179 * make.c (decode_switches): Allocate space for args in stringlists
7180 so they can be freed later.
7182 * make.h: Declare `makelevel'.
7184 * variable.c (makelevel): Moved to make.c (and made global).
7186 * make.c (fatal, error): Print the makelevel if it's > 0.
7187 (perror_with_name): Use error rather than calling fprintf directly.
7188 (pfatal_with_name): Use fatal rather than fprintf and die.
7190 * variable.c (new_environ): Don't put default variables (origin
7191 `o_default') into the environment; they just take up space.
7193 * read.c (read_makefile): Don't add FILENAME to the chain of read
7194 makefiles if it's "-" (standard input).
7196 * remake.c (update_goal_chain): Set STATUS correctly when nothing
7197 happens (as well as in all other situations).
7199 * make.c (construct_makeflags): Put a `-' before each switch and
7200 spaces between them.
7204 * commands.c (wait_for_children): Don't check if `children' is nil.
7205 This is the case when waiting for the child of a `shell' function.
7207 * dir.c (dir_load): Don't add a hash-table entry for directory
7208 DIRNAME and filename "" if DIRNAME doesn't exist.
7210 * commands.c (execute_file_commands): Return 0 after start_job
7211 returns 1 (failure) under the -n flag.
7213 * remake.c (remake_file): Set the state to `cs_finished' when not
7214 calling execute_file_commands.
7216 * remake.c (update_goal_chain): Second arg is now MAKEFILES, nonzero
7217 meaning to disable -t, -q, and -n for each target unless the target
7218 was also given on the command-line.
7220 * read.c (read_makefile): Enter the `struct file's for the makefiles
7221 added to the `read_makefiles' `struct dep' chain.
7223 * remake.c (update_goal_chain): Made it not enter the files for the
7224 goals in the chain. It will already have been done.
7226 * rule.c (convert_to_pattern): Null-terminate the names of targets
7227 and deps of the pattern rules properly.
7229 Fri Sep 30 18:56:20 1988 Roland McGrath (mcgrath at nutmeg.Berkeley.EDU)
7231 * make.c (main): Call install_default_pattern_rules.
7233 * make.h: Declare copy_dep_chain.
7235 * read.c (copy_dep_chain): Moved to make.c (and made global).
7237 * make.c (main): Call update_goal_chain to update goals.
7238 Update read makefiles and re-exec self if they change.
7240 * remake.c (update_file): Make this function static.
7241 (update_goal_chain): New function to update a `struct dep' chain of
7242 goals, waiting until they are all finished before returning.
7244 * make.h: Don't declare update_file. Declare update_goal_chain.
7246 * make.c (main): Call snap_deps, etc. that were in read_all_makefiles.
7248 * read.c (find_makefile): Removed this function.
7249 (read_all_makefiles): Don't update makefiles, don't diddle with
7250 pattern rules, don't call snap_deps, etc. Return a `struct dep'
7251 chain of all makefiles read.
7252 (read_makefile): Now takes two args: FILENAME and TYPE, which is 0
7253 for a normal makefile, 1 for MAKEFILES variable or 2 for an included
7254 makefile. Add a `struct dep' containing the name of the makefile
7255 (as it was found in the search path for type 2s), and TYPE in the
7256 `changed' member to the global `read_makefiles' chain.
7258 * make.h, rule.c (displace_pattern_rules,
7259 add_displaced_pattern_rules): Removed these functions.
7261 * read.c (read_makefile): Variable-expand the name of an `include'd
7262 makefile before calling find_makefile on it.
7264 * file.c (snap_deps): If the `struct file' for a `struct dep'
7265 already exists, free the `struct dep's `name' member before setting
7266 it to nil (since this info is in the `struct file').
7268 * read.c (copy_dep_chain): Made it copy each name rather than
7269 leaving multiple `struct dep's with the same pointers.
7271 Thu Sep 29 19:08:13 1988 Roland McGrath (mcgrath at catnip.Berkeley.EDU)
7273 * make.c (decode_switches): Fixed second decode_env_switches call to
7274 use correct length of "MFLAGS" (6, not 5).
7276 * read.c (read_makefile): Don't stop reading when readline returns
7277 zero lines read. Only stop when the stream reaches EOF. This makes
7278 it recognize the last line of a makefile without a newline.
7280 * remake.c (remake_file): If we don't know how to make FILE, set its
7281 command state to `cs_finished'.
7283 * remake.c (update_file): Don't write the "up to date" message if
7284 update_file_1 returned a nonzero status.
7286 Wed Sep 28 16:30:07 1988 Roland McGrath (mcgrath at catnip.Berkeley.EDU)
7288 * commands.c (child_handler): Set the `update_status' member
7289 properly for ignored errors.
7291 * rule.c (convert_to_pattern): Made it not care about if the target
7292 suffix comes before the source suffix in the .SUFFIXES list.
7294 * make.texinfo: Misc editorial changes.
7296 * commands.c (wait_for_children): Return immediately if `children'
7297 is nil (there are no children).
7299 Tue Sep 27 15:33:14 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
7303 * commands.c (struct child): New member `command_ptr' to hold the
7304 current position in the commands. The `commands' member is never
7306 (start_job, child_handler, execute_file_commands): Use new method
7307 for `commands' and `command_ptr' members.
7309 * make.c (decode_env_switches): Skip past an invalid letter (instead
7310 of looping forever).
7312 * commands.c (struct child): Add `environ' member to hold the
7313 environment for this child.
7314 (execute_file_commands): Get a new environment from new_environ and
7315 put in the the new `struct child's `environ' member.
7316 (child_handler): When freeing a child, free its `commands' member, the
7317 elements of its `environ' array and its `environ' member itself.
7318 (start_job): Set `environ' to the child's `environ' member before
7319 exec'ing the command.
7321 * variable.h, variable.c (new_environ): Made it return the new
7322 environment, not putting it in `environ'.
7324 * remake.c (update_file): Don't give a "is up to date" message
7325 unless no files were remade and the state went from `cs_not_started'
7326 to `cs_finished', so repeat calls to finish jobs won't get the message.
7328 Mon Sep 26 16:26:08 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7332 * make.texinfo (Commands: Execution): Documented that children will
7333 be waited for rather than killed.
7335 * commands.c (fatal_error_signal): Wait for children.
7336 (kill_children): Removed this function.
7338 * make.c (main, die): Wait for children to die, don't kill them.
7340 * variable.c (expand_function): Use wait_for_children.
7342 * make.c (main): Use wait_for_children rather than child_handler.
7344 * commands.c (wait_for_children): New function to block waiting for
7345 children, insuring that child_handler is not called recursively.
7346 (execute_file_commands, kill_children): Use wait_for_children.
7348 * commands.c (child_handler): Start up additional commands in a
7349 sequence after an ignored error.
7351 * remake.c (update_file): Don't print "`foo' is up to date" messages
7352 when update_file_1 returns while commands are executing.
7354 * remake.c (update_file_1): Pass the file name to name_mtime, not
7355 the bloody `struct file', dammit!!
7357 * commands.c (child_handler): Print out the "*** ..." error message
7358 when not under -i. (I somehow forgot this.)
7360 * remake.c (update_file_1): Use name_mtime rather than file_mtime to
7361 re-get the mtime of a file whose commands have finished.
7363 * make.c (command_switches, decode_switches, decode_env_switches):
7364 Make all switches that take string args allow them right after the
7367 * commands.c (child_handler): Check for a child being the `shell'
7368 function's command returning and set the global variable for
7369 expand_function to check.
7371 * variable.c (expand_function): For the `shell' function, instead of
7372 waiting for the child shell ourselves, let child_handler do it and
7373 loop around waiting for something to happen.
7375 * make.c (print_version): Made the copyright year static, not dynamic.
7377 * make.h, make.c: Remove construct_argv function.
7379 * make.c (main): Say "no goal target" instead of "no target".
7381 * make.texinfo (Commands: Parallel): Don't send SIGKILL.
7383 * commands.c (kill_children): Don't send SIGKILL to children that
7384 aren't killed by the first signal.
7386 * make.c (main), commands.c (kill_children): Decide between SIGCHLD
7387 and SIGCLD based on whether or not SIGCHLD is defined, not on USG.
7389 * Makefile: Link make with $(LOADLIBES).
7391 * read.c (construct_include_path): Fixed another bad xrealloc call.
7393 * make.c (decode_switches): Fixed an xrealloc call with no first arg.
7395 Sat Sep 24 01:16:21 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
7399 * remake.c (update_file_1): If deps are running, set state to
7400 `cs_deps_running' and return 0. If deps are done, run commands.
7402 * commands.c (child_handler): Made it delete non-precious targets
7403 killed by fatal signals.
7405 * make.texinfo: Documented parallelism.
7407 Fri Sep 23 16:52:27 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7409 * remake.c (update_file_1): Don't return if FILE's state is
7410 `cs_deps_running'. In that case, we need to run through and check
7411 the states of all our dependencies.
7413 * commands.c (execute_file_commands): Decrement `job_slots' after
7414 starting a new job to run file commands.
7416 * commands.c (start_job): Made it set the state to `cs_running'.
7418 * make.c (main): Fixed usage of `g', `lastgoal', and `goals' in the
7421 * commands.c (child_handler): When commands finish, set the
7422 corresponding file's `update_status' and `updated' flags as
7423 appropriate, and reset the modtimes of the file and any `also_make'
7426 * remake.c (remake_file): Don't re-set `last_mtime' and set `updated'.
7428 * commands.c (fatal_error_signal): Don't swallow all the children
7429 with a loop around `wait ((union wait *) 0)'!!!
7431 * make.c (struct command_switch): Added `positive_int' type.
7432 (switches): Added -j (job_slots).
7433 (construct_makeflags, decode_switches, decode_env_switches):
7434 Handle`positive_int'-type switches.
7436 * glob.c (glob_vector): Rename local variable `vector' to `VeCtOr'.
7437 This is said to avoid a conflict with some system's global `vector'
7440 * variable.c (expand_function): Made the `shell' function use
7441 construct_command_argv and do its own child control and piping.
7443 * make.c (main): Turn standard input into a broken pipe after
7444 reading in all makefiles (the last time it will be needed).
7446 * commands.c (struct child): Remove `pipe_fd' member. We don't use
7448 (start_job): Return 0 for success, 1 or failure (rather than void).
7449 Don't use pipes. Don't turn the child's stdin into a broken pipe.
7450 (child_handler): Print "*** Error" messages when necessary.
7451 Die on failed commands when -k was not given.
7452 (execute_file_commands): Check the return of start_job and remove
7453 the child from the chain and return failure if it is nonzero.
7455 * make.c (die): New function to clean up and exit.
7456 (fatal, pfatal_with_name): Use die.
7458 Thu Sep 22 14:27:11 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7460 * commands.c (struct child): Added `commands', `pipe_fd', and
7461 `noerror' members to keep track of info about a command thread.
7462 (start_job): New function to start a job and update the argument
7463 `struct child' to reflect its status.
7464 (execute_file_commands): Merged run_file_commands back in.
7465 Made it use new start_job function.
7467 * rule.c (freerule): Don't free the `struct commands' of the
7468 discarded rule. It may be used in more than one place.
7470 * commands.c (execute_command_line): Made it not try to delete the
7471 possibly partly-made file. The child_handler function will do this.
7472 (fatal_error_signal): Ditto + call kill_children.
7474 * make.h: Declare job_slots.
7476 * make.c (main): Collect goals in a dep chain and run through this
7477 chain waiting for a child, eliminating finished goals, updating all
7478 remaining goals, and quitting if they fail and not -k.
7480 * commands.c (child_handler): If called with SIG < 0, - SIG is the
7481 max number of children to bury.
7483 * commands.c (child_handler): If called with SIG as zero,
7484 block waiting for running children.
7485 (kill_children): Call child_handler with zero rather than SIGCHLD.
7487 * remake.c (update_file_1): Use the `command_state' member of FILE
7488 and its dependencies to determine what commands are running, what to
7489 do, etc. If commands or dep commands are running when we are
7490 called, return success (0). If commands finished since the last
7491 time we were called, return their status.
7493 * commands.h: Declare kill_children.
7495 * commands.c: Define `struct child' to keep track of child
7496 processes, with the chain in `children'.
7497 (child_handler): New function to catch child-termination signals
7498 (SIGCHLD, or SIGCLD for USG), store the returned status in the
7499 appropriate structure, take the now-obsolete `struct child' out of
7500 the chain, and free its storage.
7501 (execute_file_commands): Put all of the stuff invloving running the
7502 commands into new function run_file_commands. Execute_file_commands
7503 now does process management for the commands, while
7504 run_file_commands (which is run in a subprocess) runs the commands.
7505 (kill_children): New function to kill all running children by
7506 sending them signal SIG. If there are any children still living
7507 after they are all sent SIG, they are all sent SIGKILL.
7509 * make.c (main): Catch SIGCHLD (SIGCLD for USG) with child_handler.
7511 * commands.h: Declare child_handler function.
7513 * commands.c (execute_file_commands): Check the `command_state'
7514 member of FILE and return 0 if it is `cs_running' or
7515 `cs_deps_running' and return the stored status if it is `cs_finished'.
7517 * file.h (struct file): Added `command_state' member.
7519 * commands.c (execute_command_line): Add `$' to the list of
7520 characters special to the shell.
7522 Wed Sep 21 15:57:41 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7524 * read.c (read_all_makefiles): Call convert_to_pattern before
7525 recomputing the limits after adding the displaced rules.
7527 * make.c (main): Move calls to snap_deps, convert_to_pattern, and
7528 build_vpath_lists to read_all_makefiles.
7530 * read.c (read_all_makefiles): Install the default pattern rules
7531 before checking to remake the makefiles, displace these rules before
7532 reading in the makefiles, and then add the displaced rules to the
7533 chain after reading in all the makefiles.
7535 * make.c (main): Don't call install_default_pattern_rules or
7536 count_implicit_rule_limits.
7538 * make.h: Declare displace_pattern_rules and
7539 add_displaced_pattern_rules.
7541 * rule.c (displace_pattern_rules, add_displaced_pattern_rules): New
7542 functions to stow the chain and add the stowed chain on the end of
7545 * make.texinfo (Implicit: Search Algorithm): Fixed PREV reference.
7547 * make.c (main): Call construct_include_path right after decoding
7550 * read.c (find_makefile): Use rename_file.
7552 * file.h: Declare rename_file.
7554 * file.c (rename_file): New function to rename a `struct file' and
7555 put it in the correct hash bucket.
7557 * read.c (find_makefile): New function to find and update a makefile.
7558 (read_all_makefilese): Use find_makefile.
7559 (read_makefile): Don't do updating. Removed UPDATEIT arg.
7561 * remake.c (update_file_1): Took out setting the `updated' member to
7562 -1 rather than 1 sometimes.
7564 * make.c (main): Made it print version info before doing anything else.
7566 * remake.c (library_file_mtime, f_mtime): Removed use of last two
7567 arguments to vpath_search.
7569 * rule.c (pattern_search): Removed use of last two arguments
7572 * vpath.c (vpath_search, selective_vpath_search): Removed unused
7573 DIRPREFIX and DPLEN args.
7575 * read.c (read_makefile): Also turn off -n when updating makefiles.
7577 Tue Sep 20 17:01:10 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
7579 * Makefile: Put tags files in the tarfile.
7581 * read.c (read_makefile): Get the modtime of the makefile via a stat
7582 call so that a later file_mtime call won't do VPATH search for it.
7584 * read.c (read_makefile): Don't turn off -t and -q if the makefile
7585 was a command-line target.
7587 * make.c (main): Enter command-line targets as files and set their
7588 `cmd_target' members.
7590 * file.h (struct file): Added `cmd_target' member.
7592 * read.c (read_makefile): Temporarily turn off -t and -q while
7595 * make.c (main): Don't use arg 0 from other_args (which is now
7596 argv[0]; i.e., the program's name).
7598 * read.c (read_makefile): Only return nonzero if commands were
7599 actually run to remake the makefile.
7601 * remake.c (update_file_1): Set FILE->updated to -1 if no commands
7602 were actually run (because no update was done or -t was given).
7604 * make.c (decode_switches): Fixed bug wherein xrealloc was passed
7605 bad args if it tried to expand other_args->list.
7607 * read.c (read_all_makefiles): Made it not look at the `MAKE'
7608 variable, just use argv[0].
7610 Sun Sep 18 17:34:11 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
7612 * read.c (rerun_make): New function to re-exec make.
7614 * make.c (construct_makeflags, construct_argv): New functions to
7615 construct the `MAKEFLAGS' variable and to construct an arg list from
7618 * read.c (read_makefile): New arg UPDATEIT, if nonzero, says to
7619 update the makefile as a target before reading it in. When reading
7620 included makefiles, pass this as zero. Now returns nonzero if the
7621 makefile was updated, zero if not.
7622 (read_all_makefiles): Pass a nonzero UPDATEIT arg to read_makefile
7623 for all default and -f makefiles and all makefiles from the
7624 `MAKEFILES' variable. If any of the makefiles has changed, re-exec
7625 self to re-read them.
7627 * remake.c (update_file): Print a "File `foo' up to date'" message
7630 * commands.c (execute_file_commands): Allocate one byte for each of
7631 $^ and $< rather than zero if they are to be empty.
7633 Fri Sep 16 13:59:59 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7637 * make.c (command_switches): Fixed entry for `-o' switch.
7639 * make.texinfo: Renamed -c switch to -C.
7641 * make.c: Renamed -c switch to -C.
7643 * Miscellaneous de-linting.
7645 * read.c (record_files): Made it not free the storage for the name
7646 if it started with `./' and was therefore not quite the same as in
7649 * read.c (record_files): If commands were specified twice, the error
7650 message specifies in what files and at what line numbers.
7652 * make.c (main): If any of the signals we usually fatal on were
7653 ignored by the parent (probably a shell), ignore them.
7655 * make.c (main): Print version info for -v, -p, or -d.
7656 (print_data_base): Don't print version info. It will be done in main.
7658 * variable.c: Increased number of hash buckets to 257.
7660 * file.c: Increased number of hash buckets to 1007.
7662 * rule.c (count_implicit_rule_limits): Moved comptation of
7663 `maxsuffix' to convert_to_pattern, since that function uses
7664 `maxsuffix', and must be called before count_implicit_rule_limits.
7666 * rule.c (pattern_search): If an existent (non-intermediate)
7667 dependendency was found via a terminal rule, set its
7668 `tried_implicit' flag, so it will never have implicit rule search done.
7670 * glob.c: Bug fix to avoid alloca(0).
7672 * arscan.c: USG and Sun386i fixes.
7674 Thu Sep 15 19:40:26 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7676 * make.texinfo: Fixed some typos and spelling errors.
7678 Wed Sep 7 14:20:39 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7680 * make.c (decode_switches): Fixed bug wherein a bad option would
7681 give a useless error message and loop forever.
7683 Tue Sep 6 14:36:02 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7685 * make.texinfo: Documented `shell' function.
7687 * variable.c (expand_function): New function `shell', does
7688 backquote-style command expansion of its arg.
7690 * commands.c (execute_command_line): Second arg OUTBUF, if not nil,
7691 gets filled in with a malloc'd buffer containing the piped stdout of
7693 (execute_file_commands): Use above (pass nil).
7695 Mon Sep 5 17:03:49 1988 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
7697 * Makefile: Added copyright notice.
7698 Added a comment about defining `NO_MINUS_C_MINUS_O' if necessary.
7702 * rule.c (default_suffix_rules): Don't pass `-o' switches with `-c'
7703 switches if `NO_MINUS_C_MINUS_O' is #define'd.
7705 * make.texinfo: Documented `GNUmakefile'.
7707 * read.c (read_all_makefiles): Made it try default makefile
7708 `GNUmakefile' before others.
7710 * make.texinfo: Added new-style Texinfo header thingies.
7712 Sat Sep 3 18:09:39 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
7716 * make.texinfo (Chained Rules): Added a @cindex about using
7717 .PRECIOUS to preserve intermediate files.
7719 * remake.c (update_file_1): Made it not just return before executing
7722 * rule.c (default_pattern_rules, default_variables): Made it use
7723 `$(AR)' for `ar r' (to put files in archives).
7725 * vpath.c (build_vpath_lists): Made it recursively expand the
7726 `VPATH' variable (by using variable_expand instead of lookup_variable).
7728 * read.c (conditional_line): Made it not swallow whitespace after
7729 the comma in an `ifeq' using the `(a,b)' syntax.
7731 * rule.c (count_implicit_rule_limits): Made it not crash if a
7732 pattern rule dep begins with `/'.
7734 Sun Aug 28 15:51:12 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
7736 * make.texinfo: Clarified that the arg to the `origin' function is a
7737 variable *name*, not a reference.
7739 * make.texinfo: Clarified that both -Idir and -I dir are allowed.
7741 Sat Aug 27 13:49:28 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7743 * remake.c (remake_file): Made touching phonies work right.
7745 Wed Aug 24 20:40:48 1988 Roland McGrath (mcgrath at nutmeg.Berkeley.EDU)
7747 * make.texinfo: Removed reference to `RANLIB' variable.
7751 * variables.c (expand_function): Added `origin' function.
7752 * make.texinfo: Documented same.
7754 * read.c (record_files): Made double-colon entries work.
7756 Sat Aug 20 21:09:39 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7758 * make.c (collapse_continuations): Bug fix from RMS.
7760 * rule.c (install_default_pattern_rules): Made it set the
7761 `in_use' flag of the created rules to zero, rather than letting
7762 it be random garbage.
7764 * rule.c (pattern_search): Fixed putting `also make' targets into
7767 * read.c (record_files): Fixed bug which made double-colon entries
7768 make it read off into space.
7770 * make.c (decode_switches): Made it understand `ignored' switches
7771 rather than dumping core.
7773 Sun Aug 14 16:49:00 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7775 * read.c (read_makefile): Made `include' filenames be
7778 * read.c (read_makefile): Fixed an error message.
7780 * read.c (read_makefile): Made it accept ^L's as whitespace.
7781 * make.c (next_token, end_of_token): Ditto.
7783 * vpath.c (vpath_search): Fixed it so that the general VPATH (from
7784 the variable) is always checked, even if a selective VPATH (from a
7785 directive) matched the filename.
7787 Sat Aug 13 14:20:46 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7789 * make.c (decode_switches, main): Made the command switches be
7790 processed from a table of switches, variables, and types. No
7791 functions are passed argc and argv any more. They are passed arrays
7792 of strings they need to process.
7793 * read.c (read_all_makefiles): Made it take an array rather than
7795 (construct_include_path): Ditto.
7797 * make.c (collapse_continuations): Made it work right (I hope).
7799 * make.texinfo: Minor editorial changes.
7801 * read.c (read_makefile): Minor speed improvement by freeing and
7802 then mallocing something rather than reallocing it to avoid the
7805 Thu Aug 11 00:10:43 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7807 * make.texinfo: Fixed some unquoted @'s.
7809 * make.texinfo: Documented multiple-target pattern rules.
7810 Miscellaneous minor editorial changes and corrections.
7812 * make.texinfo (Implicit: Catalogue of Rules): Removed the list of
7813 variables. That's what the next section is for.
7814 (Implicit: Implicit Variables): Made it agree with reality.
7816 Wed Aug 10 00:55:39 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7818 * variable.c (print_variable_data_base): Fixed bug which made -p
7819 dump core. (This was a really idiotic bug.)
7821 * rule.c (pattern_search): Fixed a bug which made it make the
7822 `also_make' member of the file in question nil if the first of
7823 the successful rule's targets was the matching one.
7824 Made it use only as much storage as necessary in the `also_make'
7826 (create_pattern): Made it use only as much storage as necessary in
7827 the `lens' and `suffixes' members of the created rule.
7829 * remake.c (library_file_mtime): Made it `static'.
7831 * file.c: Added a declaration for `errno', which is declared in some
7832 <errno.h>'s, but not all.
7834 * file.h (struct file): Added `also_make' member for multiple-target
7836 * rule.c (pattern_search): Made it put the names of files updated by
7837 the given file's commands in its `also_make' member.
7838 * remake.c (update_file_1): Made it mark the files in a file's
7839 `also_make' member as updated when the file is updated.
7841 * variable.c (try_variable_definition): Fixed a bug which made it
7842 define a variable with the name of the whole definition when there
7843 was no space before the = or :=.
7845 * make.texinfo (Features): Made the changes which were made in RCS
7846 revision 2.7 but somehow lost since then. Added -W.
7848 Tue Aug 9 10:04:50 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7850 * variable.h: Added `o_default' to `enum variable_origin'.
7851 * variable.c (print_variable_data_base): Made it print the origins of
7853 * rule.c (install_default_pattern_rules): Made it define the default
7854 variables with origin `o_default'.
7856 * make.texinfo: Documented -W.
7858 * make.c (decode_switches, main): Added the -W flag to give files a
7859 time-stamp of now, for a `what if' effect when used with -n.
7861 * commands.c (print_commands): Made it say `(built-in)' for commands
7862 that are built into the default ruleset.
7864 * read.c (record_file): Made .SUFFIXES get its deps frontwards (again).
7865 * rule.c (set_default_suffixes, convert_to_pattern): Made it read
7866 .SUFFIXES's deps frontwards, so the converted rules will not be in
7869 * rule.c (new_pattern_rule): Fixed a bug wherein it would keep
7870 searching after it had removed a matching rule and ended up diddling
7873 * rule.c (freerule): Made it take the given rule off the chain.
7874 (new_pattern_rule, count_implicit_rule_limits): Use freerule to
7875 remove rules from the chain.
7877 * vpath.c (construct_vpath_list): Made it return after cleaning out
7878 all previous searchpaths when given a nil DIRPATH arg, so it won't
7879 go into the construction code and dump core dereferencing a nil
7882 * variable.c (patsubst_expand): Fixed a bug which made it not match
7883 correctly and sometimes dump core.
7885 Mon Aug 8 16:35:48 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7887 * rule.c (default_suffix_rules): Made the .texinfo.dvi rule remove
7888 the files used in the comparison to determine whether or not a
7889 second TeX run is necessary.
7891 * make.texinfo: Fixed some overfull TeX hboxes.
7893 * make.texinfo (Implicit: Catalogue of Rules): Fixed a Texinfo error.
7895 * rule.c (create_pattern_rule): Fixed bug wherein index was not
7896 being passed its second arg.
7898 * read.c (getline): Merged back into readline.
7900 * rule.c (default_suffixes, default_suffix_rules,
7901 default_variables): Added .texinfo.info rule.
7902 * make.texinfo (Implicit: Catalogue of Rules): Documented
7903 .texinfo.dvi and .texinfo.info rules.
7905 * make.texinfo (Top): Changed `last updated' date to be correct (for
7906 the last time it was updated, not today). Changed `for version
7907 3.00' since it's not going to be called that.
7909 Sat Aug 6 19:51:10 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7911 * commands.c (print_commands): Added this function to print the
7912 contents of a `struct commands' for -p.
7913 * rule.c (print_rule_data_base): Use above.
7914 * file.c (print_file_data_base): Ditto.
7916 * rule.c (count_implicit_rule_limits, new_pattern_rule,
7917 install_pattern_rule, print_rule_data_base): Made it understand the
7918 changed `struct rule' and act accordingly.
7919 (freerule): Added this function to free all the storage used by a rule.
7921 * rule.c (pattern_search): Made it grok multiple targets of pattern
7922 rules. The matching is done properly, but at present, only the
7923 matching pattern's target is used to give deps and commands.
7925 Fri Aug 5 18:00:29 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7927 * rule.c (struct rule): Changed name, namelen, and patsuffix members
7928 to targets, lens, and suffixes, which are arrays, for multiple targets.
7929 (create_pattern_rule): Now takes first arg TARGETS, a nil-terminated
7930 array of targets, rather than a single target and patsuffix pointer.
7932 * read.c (record_files): If it finds an implicit pattern rule, it
7933 collects all the targets into an array and passes the whole thing to
7934 create_pattern_rule. If there are non-pattern targets, it is a
7937 Tue Aug 2 15:06:38 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7939 * make.c (readline): Split backslash-newline checking from reading
7940 and buffer-expanding.
7941 (getline): Created to do the reading and buffer-expanding formerly
7944 * rule.c (pattern_search): Made it reject nonterminal match-anything
7945 rules when a specific rule has matched, rather than rejecting
7946 terminal match-anything rules in this case.
7948 * rule.c (convert_to_pattern): Fixed a bug caused when the change to
7949 make it only recognize two-suffix rules whose target suffixes
7950 precede their dependency suffixes which made it work in the opposite
7951 direction (even worse than it started out).
7953 * rule.c (pattern_search): Made it reject nonterminal match-anything
7954 rules as intermediate targets when searching for both real and
7955 intermediate dependencies, rather than only when searching for
7958 Sun Jul 31 00:33:56 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7960 * rule.c (convert_to_pattern): Made it only recognize two-suffix
7961 rules whose target suffix comes before the dependency suffix in the
7964 * variable.c (define_automatic_variables): Made all automatic
7965 variables be defined with origin `o_automatic'.
7967 * variable.h: Added `o_automatic' to `enum variable_origin'
7969 * file.c (remove_intermediates): Made it not print an error message
7970 if the error was that the file does not exist.
7972 * rule.c: Removed `recursive' member from `struct rule'.
7974 * remake.c (library_file_mtime): Made it not use the directory hash
7975 functions, as reading in and hashing /usr/lib and /lib is slow and
7976 most likely unnecessary.
7978 * remake.c (remake_file): Changed message from ``No specification
7979 for making'' to ``No way to make'' so it will be short enough that
7980 most filenames will fit on a line.
7981 Made it look at the `recursive' member of the `struct commands',
7982 rather than of the `struct file' (which no longer has one).
7984 * commands.c (execute_file_commands): Made it look at the
7985 `recursive' member of the `struct commands', rather than of the
7986 `struct file' (which no longer has one).
7988 * file.h: Removed `recursive' member from `struct file'.
7990 * commands.h: Added `recursive' member to `struct commands'.
7992 * dep.h: Removed unused `quotedparen' member from `struct nameseq'
7995 * read.c (dequote): Removed this function.
7996 (multi_glob): Removed reference to `quotedparen' member of
7997 a `struct nameseq' and calls to dequote.
7999 * read.c (record_files): Made it set the stem for $* for all static
8000 pattern rules, not just those with commands given at that time.
8001 Removed check for recursive commands.
8002 Made it check for pairs of .SUFFIXES dependencies to reject as
8003 default goals as well as single ones (that don't start with dots).
8004 (read_makefile): Added checks for recursive commands to set
8005 the `recursive' flag in the `struct commands'.
8007 Sat Jul 30 15:47:23 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8009 * make.c (find_next_token): Made the LENGTHPTR arg optionally nil.
8011 * make.c: Removed `files_made' variable which is defined static in
8012 remake.c and used only there.
8013 (main): Cleaned up somewhat.
8014 (decode_switches): Cleaned up a bit. Made an unknown option be a
8016 (decode_env_switches): Made LEN arg unsigned. Cleaned up.
8017 (print_version): Made it say ``see the source'' rather than ``see
8018 the source file'', since there is more than one.
8020 * file.h: Made `num_intermediates' declared unsigned.
8022 * file.c: Made `num_intermediates' variable unsigned.
8023 (remove_intermediates): Removed unused FORMAT arg.
8024 (enter_file): Made it handle double-colon files properly, adding the
8025 new entry as the old entry's prev pointer.
8027 * dir.c: Re-indented the `struct dir' definition to be right.
8028 (dir_load): Cleaned up slighty.
8029 (file_exists_p): Removed comment saying we could use `access', since
8030 that is a bad idea (except for setuid programs). Cleaned up slightly.
8032 * commands.c: Changed some comments slightly.
8033 (execute_file_commands): Cleaned up a bit. Changed some comments,
8034 added others. Moved freeing of storage for $^ and $? to the same
8035 place as for the other automatic variables.
8036 (execute_command_line): Made `#' trigger a shell.
8037 Added some comments. Cleaned up a bit. Put all the special chars
8038 that trigger shells into an array easily changeable at the top.
8040 * ar.c: Added comments explaining each function.
8041 (ar_scan_1): Merged into ar_member_date.
8042 (ar_member_date): Changed call to ar_scan_1 to the body of that
8044 (ar_member_date_1): Simplified to a ?: expression rather than an
8046 (ar_member_touch): Changed error handling around a bit.
8047 None of these errors are fatal now.
8049 * variable.c (subst_expand): Added a new arg BY_WORD, to do substs
8051 (patsubst_expand): Fixed bug which made calls whose patterns
8052 contained no `%' to not work correctly, by using above.
8053 (variable_expand): Pass extra arg to `subst_expand'.
8055 * variable.c (expand_function): Fixed bug which made `foreach' calls
8056 with one-word lists run off into never-never land.
8058 Fri Jul 29 20:12:36 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8060 * variable.c (expand_function): Made a very minor speed improvement
8061 by avoiding an unnecessary strlen call.
8063 Wed Jul 27 16:01:47 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8065 * rule.c (default_suffixes): Rearranged the list somewhat; added
8066 `.el' and `.elc' to speed things up (especially when building
8067 Emacs), for the same reason `.h' is there.
8069 * read.c (record_files): Changed `lineno' from `long' to
8072 Sun Jul 24 02:15:30 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8074 * variable.c (expand_function): Eliminated use of `wstok'
8075 because it is non-reentrant and unreliable.
8076 Fixed a minor bug which would cause something not to be freed.
8077 * make.c (wstok): Removed `wstok' because it is no longer used.
8079 * variable.c (expand_function): Made `foreach' function put
8080 spaces between output texts like it's supposed to.
8082 Sat Jul 23 17:32:55 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8084 * rule.c (default_suffixes, default_suffix_rules): Added rule
8085 to make %.dvi from %.texinfo.
8087 * dir.c (print_dir_data_base): Made it say a bit more.
8089 Fri Jul 22 23:13:16 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8091 * make.c (print_data_base): Split this function up into one
8093 * variable.c (print_variable_data_base): One of the above.
8094 * rule.c (print_rule_data_base): Ditto.
8095 * file.c (print_file_data_base): Ditto.
8096 * dir.c (print_dir_data_base): Ditto.
8098 * rule.c (install_pattern_rule): Fixed a bug which caused the
8099 terminal and recursive flags to always be zero for rules
8100 entered by this function.
8102 * make.texinfo (Rules: Double-colon): Added a paragraph
8103 explaining the purpose of double-colon rules.
8105 * make.texinfo (Implicit: Catalogue of Rules): Updated to
8106 reflect new C++, TeX, Web, and Texinfo rules. Other slight
8109 * commands.c (execute_file_commands): Fixed a bug wherein
8110 random memory could get written for files with no deps.
8112 Wed Jul 20 19:30:31 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8114 * read.c (readline): Fix bug wherein it would not recognize a
8115 backslash-newline if the buffer filled up and was enlarged
8116 right before reading the newline.
8118 Tue Jul 19 19:55:02 1988 Roland McGrath (mcgrath at chilli.Berkeley.EDU)
8120 * read.c: Added default suffix rules for .cc (using $(C++),
8121 which defaults to `g++', and $(C++FLAGS)), .tex, .dvi, .web
8122 and .cweb (using $(TEX), $(WEAVE), $(TANGLE), $(CWEAVE) and
8125 Sat Jul 16 21:24:28 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8127 * Made error formats use %u rather than %ld for line numbers,
8128 which are now unsigned int's rather than long's.
8130 * read.c (conditional_line): Fixed some bugs caused by use of
8131 unsigned int rather than int in one place.
8133 * read.c (conditional_line): Put the info about active
8134 conditionals in a struct.
8135 (read_makefile): Make a new struct of info about conditionals
8136 for included makefiles and restore the old one after the
8137 included makefile has been read.
8139 * read.c (read_makefile): Don't try to read a makefile with
8140 name "" after giving an error message because an `include'
8141 directive gave no filename.
8143 * read.c (read_makefile): Give an error message for
8144 non-whitespace text after the filename in an `include' directive.
8146 * make.c (error): Take five args, like `fatal'. It managed to
8147 lose with only two. Is there a better way to do this without vfprintf?
8149 * read.c (read_makefile): Commands consisting of only
8150 whitespace are not the same as no commands. I thought I'd
8151 fixed this bug months ago; it seems to have come back.
8153 * make.c (collapse_continuations): All whitespace around a
8154 backslash-newline combination is turned into a single space.
8156 * Added COPYING file and copyright notices to all files.
8158 * make.texinfo (Running: Goals): Fix a typo.
8160 * read.c (do_define): Take an arg for the origin of the
8161 variable being defined.
8162 (read_makefile): Grok `override define'.
8164 * make.texinfo (Variables: Override Directive, Defining):
8165 Document the `override define' combination directive.
8167 * ar.c (ar_member_date): Make a 0 return from `ar_scan' return
8168 (time_t) -1 (nonexistent file), rather than (time_t) 0, which,
8169 when put in the `struct file', makes `file_mtime' try to get
8170 the mtime over and over again.
8172 * variable.c (pattern_matches): Fix a bug that made patterns
8173 not beginning with `%' never match.
8175 Fri Jul 15 21:01:44 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8177 * Took Make out of RCS.
8179 * Split the monolithic `make.c' into several smaller files.