1 Fri Mar 17 15:57:40 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
3 * configure.bat: Write @CPPFLAGS@ translation.
5 Mon Mar 13 00:45:59 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
7 * read.c (parse_file_seq): Rearranged `l(a b)' -> `l(a) l(b)' loop
8 to not skip the elt immediately preceding `l(...'.
10 Fri Mar 10 13:56:49 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
14 * read.c (find_char_unquote): Make second arg a string of stop
15 chars instead of a single stop char. Stop when any char in the
16 string is hit. All callers changed.
17 (find_semicolon): Pass stop chars "#;" to one find_char_unquote call,
18 instead of using two calls. If the match is not a ; but a #,
20 * misc.c: Changed find_char_unquote callers here too.
24 * read.c (read_makefile, parse_file_seq): Fix typo __MS_DOS__ ->
27 * GNUmakefile (globfiles): Add glob/configure.bat.
28 (distfiles): Add configh.dos, configure.bat.
30 Wed Mar 8 13:10:57 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
32 Fixes for MS-DOS from DJ Delorie.
33 * read.c (read_makefile, parse_file_seq) [__MS_DOS__]: Don't see :
34 as separator in "C:\...".
35 * configh.dos (STDC_HEADERS): Define only if undefined.
36 (HAVE_SYS_PARAM_H): Don't define this.
37 (HAVE_STRERROR): Define this.
38 * job.c (construct_command_argv_internal) [__MSDOS__]: Fix typos.
42 * main.c (decode_switches): Reset optind to 1 instead of 0.
44 Tue Mar 7 17:31:06 1995 Roland McGrath <roland@geech.gnu.ai.mit.edu>
46 * main.c (decode_switches): If non-option arg is "-", ignore it.
48 Mon Mar 6 23:57:38 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
52 Wed Feb 22 21:26:36 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
56 Tue Feb 21 22:10:43 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
58 * main.c (main): Pass missing arg to tmpnam.
60 * configure.in: Check for strsignal.
61 * job.c (child_error): Use strsignal.
62 * main.c (main): Don't call signame_init #ifdef HAVE_STRSIGNAL.
64 * misc.c (strerror): Fix swapped args in sprintf.
66 Mon Feb 13 11:50:08 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
68 * configure.in (CFLAGS, LDFLAGS): Don't set these variables.
70 Fri Feb 10 18:44:12 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
72 * main.c (print_version): Add 95 to copyright years.
76 * job.c (start_job_command): Remember to call notice_finished_file
77 under -n when not recursing. To do this, consolidate that code
78 under the empty command case and goto there for the -n case.
80 Tue Feb 7 13:36:03 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
82 * make.h [! STDC_HEADERS]: Don't declare qsort. Sun headers
85 Mon Feb 6 17:37:01 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
87 * read.c (read_makefile): For bogus line starting with tab, ignore
88 it if blank after removing comments.
90 * main.c: Cast results of `alloca' to `char *'.
93 Sun Feb 5 18:35:46 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
97 * configure.in: Check for mktemp.
98 * main.c (main) [! HAVE_MKTEMP]: Use tmpnam instead of mktemp.
100 * configure.in (make_cv_sysconf_open_max): New check for `sysconf
102 * acconfig.h: Added #undef HAVE_SYSCONF_OPEN_MAX.
103 * job.c [HAVE_SYSCONF_OPEN_MAX] (getdtablesize): Define as macro
106 Fri Jan 27 04:42:09 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
108 * remake.c (update_file_1): When !MUST_MAKE, don't set
109 FILE->update_status to zero before calling notice_finished_file.
110 (notice_finished_file): Touch only when FILE->update_status is zero.
111 (remake_file): Set FILE->update_status to zero after not calling
112 execute_file_command and deciding to touch instead.
114 Thu Jan 26 01:29:32 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
116 * main.c (debug_signal_handler): New function; toggles debug_flag.
117 (main): Handle SIGUSR1 with that.
119 Mon Jan 16 15:46:56 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
121 * compatMakefile (realclean): Remove Info files.
123 Sun Jan 15 08:23:09 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
127 * job.c (start_job_command): Save and restore environ around vfork
129 (search_path): Function #if 0'd out.
130 (exec_command): Use execvp instead of search_path.
132 * expand.c (variable_expand): Rewrote computed variable name and
133 substitution reference handling to be simpler. First expand the
134 entire text between the parens if it contains any $s, then examine
135 the result of that for subtitution references and do no further
136 expansion while parsing them.
138 * job.c (construct_command_argv_internal): Handle " quoting too,
139 when no backslash, $ or ` characters appear inside the quotes.
141 * configure.in (union wait check): If WEXITSTATUS and WTERMSIG are
142 defined, just use int.
144 Tue Jan 10 06:27:27 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
146 * default.c (default_variables) [__hpux]: Remove special
147 definition of ARFLAGS. Existence of the `f' flag is not
148 consistent across HPUX versions; and one might be using GNU ar
151 * compatMakefile (clean): Don't remove Info files.
153 * compatMakefile (check): Remove gratuitous target declaration.
155 Sat Jan 7 11:38:23 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
157 * compatMakefile (ETAGS, CTAGS): Don't use -t.
159 * arscan.c (ar_name_equal) [cray]: Subtract 1 like [__hpux].
161 * main.c (decode_switches): For --help, print usage to stdout.
163 Mon Dec 5 12:42:18 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
167 * remake.c (update_file_1): Do set_command_state (FILE,
168 cs_not_started) only if old state was deps_running.
170 Mon Nov 28 14:24:03 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
172 * job.c (start_waiting_job): Use set_command_state.
174 * build.template (CPPFLAGS): New variable.
175 (prefix, exec_prefix): Set from @...@.
176 (compilation loop): Pass $CPPFLAGS to compiler.
178 * GNUmakefile (build.sh.in): Make it executable.
180 * GNUmakefile (globfiles): Add configure.in, configure.
184 * configure.in (AC_OUTPUT): Don't write glob/Makefile.
186 * configure.in (AC_CHECK_SYMBOL): Use AC_DEFINE_UNQUOTED.
188 * configure.in: Don't check for ranlib.
190 Tue Nov 22 22:42:40 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
192 * remake.c (notice_finished_file): Only mark also_make's as
193 updated if really ran cmds.
195 Tue Nov 15 06:32:46 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
197 * configure.in: Put dnls before random whitespace.
199 Sun Nov 13 05:02:25 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
201 * compatMakefile (CPPFLAGS): New variable, set from @CPPFLAGS@.
202 (RANLIB): Variable removed.
203 (prefix, exec_prefix): Set these from @...@.
204 (.c.o): Use $(CPPFLAGS).
205 (glob/libglob.a): Don't pass down variables to sub-make.
206 glob/Makefile should be configured properly by configure.
207 (distclean): Remove config.log and config.cache (autoconf stuff).
209 Mon Nov 7 13:58:06 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
211 * acconfig.h: Add #undef HAVE_UNION_WAIT.
212 * configure.in: Converted to Autoconf v2.
213 * dir.c: Test HAVE_DIRENT_H, HAVE_SYS_DIR_H, HAVE_NDIR_H instead
214 of DIRENT, SYSDIR, NDIR.
215 * build.sh.in (prefix, exec_prefix): Set these from @...@.
216 (CPPFLAGS): New variable, set from @CPPFLAGS@.
217 (compiling loop): Pass $CPPFLAGS before $CFLAGS.
218 * install.sh: File renamed to install-sh.
220 * main.c (define_makeflags): When no flags, set WORDS to zero.
222 Sun Nov 6 18:34:01 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
226 * main.c (define_makeflags): Terminate properly when FLAGSTRING is
229 Fri Nov 4 16:02:51 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
233 Tue Nov 1 01:18:10 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
237 * job.c (start_job_command): When ARGV is nil, only set
238 update_state and call notice_finished_file if job_next_command
241 * job.c (start_job_command): Call notice_finished_file for empty
244 Thu Oct 27 02:02:45 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
246 * file.c (snap_deps): Set COMMANDS_SILENT for .SILENT, not
249 Wed Oct 26 02:14:10 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
253 Tue Oct 25 22:49:24 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
255 * file.c (snap_deps): Set command_flags bits in all :: entries.
257 Mon Oct 24 18:47:50 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
259 * make.h (posix_pedantic): Declare it.
260 * main.c (main): Move checks .IGNORE, .SILENT, .POSIX to
262 * file.c (snap_deps): Check .IGNORE, .SILENT, .POSIX here instead
263 of in main. If .IGNORE has deps, OR COMMANDS_NOERROR into their
264 command_flags and don't set -i. Likewise .SILENT.
265 * job.c (start_job_command): In FLAGS initialization, OR in
266 CHILD->file->command_flags.
267 * file.h (struct file): New member `command_flags'.
269 Sun Oct 16 01:01:51 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
271 * main.c (switches): Bump flag values for --no-print-directory and
272 --warn-undefined-variables, so neither is 1 (which indicates a
275 Sat Oct 15 23:39:48 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
277 * main.c (main): Add missing code in .IGNORE test.
279 Mon Oct 10 04:09:03 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
281 * variable.c (define_automatic_variables): Define +D and +F.
283 Sat Oct 1 04:07:48 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
285 * main.c (main): Define hidden automatic variable with command
286 vars, and MAKEOVERRIDES to a reference to that.
287 (define_makeflags): If posix_pedantic, write a reference to that
290 Thu Sep 29 00:14:26 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
292 * main.c (posix_pedantic): New variable.
293 (main): Set posix_pedantic if .POSIX is a target.
294 Fix .IGNORE and .SILENT checks to require is_target.
296 * commands.c (set_file_variables): Define new automatic variable
297 $+, like $^ but before calling uniquize_deps.
299 * job.c (reap_children): Call delete_child_targets for non-signal
300 error if .DELETE_ON_ERROR is a target.
302 Tue Sep 27 01:57:14 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
306 Mon Sep 26 18:16:55 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
308 * job.c (reap_children): Don't change C->file->command_state when
309 dying. Test it only after calling start_job_command for a new
310 command line. When no more cmds, just set C->file->update_status.
311 (start_job_command): When the last line is empty or under -n, set
312 C->file->update_status.
313 (start_waiting_job): Grok cs_not_started after start_job_command
315 (new_job): Set C->file->update_status when there are no cmds.
316 (job_next_command): When out of lines, don't set
317 CHILD->file->update_status or CHILD->file->command_state.
319 * main.c (quote_as_word): Renamed from shell_quote. Take new arg;
320 if nonzero, also double $s.
321 (main): Define MAKEOVERRIDES from command_variables here.
322 (define_makeflags): Don't use command_variables here; instead write a
323 reference $(MAKEOVERRIDES) in MAKEFLAGS. Make vars recursive.
325 * dir.c [__MSDOS__]: Fixed typo.
327 * vpath.c (selective_vpath_search): Reset EXISTS when stat fails.
329 Sat Sep 10 03:01:35 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
331 * remake.c: Include <assert.h> and use assert instead of printfs
334 * main.c (decode_switches): Loop until optind hits ARGC, not just
335 until getopt_long returns EOF. Initialize C to zero before loop;
336 in loop if C is EOF, set optarg from ARGV[optind++], else call
338 (decode_env_switches): Use variable_expand instead of
339 allocated_variable_expand. Allocate a fresh buffer to copy split
340 words into; scan characters by hand to break words and
342 (shell_quote): New function.
343 (define_makeflags): Allocate doubled space for switch args, and command
344 variable names and values; use shell_quote to quote those things.
346 Fri Sep 9 01:37:47 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
350 * acconfig.h: Add HAVE_SYS_SIGLIST and HAVE__SYS_SIGLIST.
352 * main.c (decode_switches): The non-option return from getopt is
354 (command_variables): New type and variable.
355 (decode_switches, decode_env_switches): After making a variable
356 definition, record the struct variable pointer in the
357 command_variables chain.
358 (define_makeflags): If ALL, write variable definitions for
361 * main.c (other_args): Variable removed.
362 (goals, lastgoal): New static variables (moved from auto in main).
363 (main): Don't process OTHER_ARGS at all.
364 Don't set variable MAKEOVERRIDES at all; define MAKE to just
366 (init_switches): Prepend a - {return in order} instead of a +
368 (decode_switches): Don't set OTHER_ARGS at all.
369 Grok '\0' return from getopt_long as non-option argument; try
370 variable definition and (if !ENV) enter goal targets here.
371 (decode_env_switches): Use allocated_variable_expand to store value.
372 Use find_next_token to simplify word-splitting loop. Don't
373 prepend a dash to uninterpreted value. Instead, if split into
374 only one word, try variable definition and failing that prepend a
375 dash to the word and pass it to decode_switches as a single arg.
377 Wed Sep 7 03:02:46 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
379 * remake.c (notice_finished_file): Only recheck modtimes if
380 FILE->command_state was cs_running on entry (meaning the commands
382 (update_file_1): Whenever we set FILE->update_status, call
383 notice_finished_file instead of just set_command_state.
384 * job.c (start_job_command): Whenever we set
385 CHILD->file->update_status, call notice_finished_file instead of
386 just set_command_state.
388 Tue Sep 6 19:13:54 1994 Roland McGrath <roland@geech.gnu.ai.mit.edu>
390 * default.c: Add missing ".
392 * job.c: Changed all assignments of command_state members to calls
393 to set_command_state.
394 * remake.c: Likewise.
395 * file.c (set_command_state): New function.
396 * file.h: Declare set_command_state.
398 * main.c (init_switches): Put a + first in options.
400 Mon Jul 25 18:07:46 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
402 Merge MSDOS/GO32 port from DJ Delorie <dj@ctron.com>.
403 * vpath.c: Changed all uses of ':' to PATH_SEPARATOR_CHAR.
404 * main.c (directory_before_chdir): New variable, moved out of main
406 (main) [__MSDOS__]: Look for \ or : to delimit last component of
407 PROGRAM. Don't frob ARGV[0] before setting MAKE_COMMAND variable.
408 (die): Change back to `directory_before_chdir' before dying.
409 * make.h (PATH_SEPARATOR_CHAR): New macro; differing defns for
411 * job.c [__MSDOS__]: Include <process.h>.
412 [__MSDOS__] (dos_pid, dos_status, dos_bname, dos_bename,
413 dos_batch_file): New variables.
414 (reap_children) [__MSDOS__]: Don't call wait; just examine those vars.
415 (unblock_sigs) [__MSDOS__]: Do nothing.
416 (start_job_command) [__MSDOS__]: Use spawnvpe instead of vfork & exec.
417 (load_too_high) [__MSDOS__]: Always return true.
418 (search_path) [__MSDOS__]: Check for : or / in FILE to punt.
419 Use PATH_SEPARATOR_CHAR instead of ':'.
420 (construct_command_argv_internal) [__MSDOS__]: Wholly different
421 values for sh_chars and sh_cmds. Wholly new code to handle shell
423 * function.c (expand_function: `shell') [__MSDOS__]: Wholly new
425 * dir.c [__MSDOS__] (dosify): New function.
426 (dir_contents_file_exists_p) [__MSDOS__]: Call it on FILENAME and
427 process the result instead of FILENAME itself.
428 (file_impossible_p) [__MSDOS__]: Likewise.
429 * default.c [__MSDOS__]: Define GCC_IS_NATIVE.
430 (default_suffix_rules) [__MSDOS__]: Use `y_tab.c' instead of `y.tab.c'.
431 (default_variables) [GCC_IS_NATIVE]: Set CC and CXX to `gcc', YACC to
432 `bison -y', and LEX to `flex'.
433 * configure.bat, configh.dos: New files.
434 * commands.c (fatal_error_signal) [__MSDOS__]: Just remove
435 intermediates and exit.
437 * commands.c (set_file_variables): Add parens in length
438 computation in .SUFFIXES dep loop to quiet compiler warning. From
441 * read.c (read_makefile): Free FILENAME if we allocated it. From
444 Mon Jul 4 17:47:08 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
446 * misc.c (safe_stat): New function, EINTR-safe wrapper around stat.
447 * vpath.c (selective_vpath_search): Use safe_stat in place of stat.
448 * read.c (construct_include_path): Use safe_stat in place of stat.
449 * job.c (search_path): Use safe_stat in place of stat.
450 * dir.c (find_directory): Use safe_stat in place of stat.
451 * commands.c (delete_target): Use safe_stat in place of stat.
452 * arscan.c (ar_member_touch) [EINTR]: Do EINTR looping around fstat.
453 * remake.c (name_mtime): Use safe_stat in place of stat.
454 (touch_file) [EINTR]: Do EINTR looping around fstat.
456 Fri Jun 24 05:40:24 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
458 * read.c (read_makefile): Check for a shell command first, and
459 then strip leading tabs before further checking if it's not a
462 * make.h [__arm]: Undefine POSIX.
463 [!__GNU_LIBRARY__ && !POSIX && !_POSIX_VERSION]: Don't declare system
464 functions that return int.
466 * job.c (construct_command_argv_internal): After swallowing a
467 backslash-newline combination, if INSTRING is set goto string_char
468 (new label) for normal INSTRING handling code.
470 Sat Jun 4 01:11:20 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
472 * configure.in: Don't check for sys_siglist and _sys_siglist with
473 AC_HAVE_FUNCS. Instead use two AC_COMPILE_CHECKs.
475 Mon May 23 18:20:38 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
477 * Version 3.71.1 released.
479 * make.h [!__GNU_LIBRARY__ && !POSIX]: Also test #ifndef
480 _POSIX_VERSION for these declarations.
482 * misc.c [GETLOADAVG_PRIVILEGED] [POSIX]: Remove bogus #ifndefs
483 around #undefs of HAVE_SETREUID and HAVE_SETREGID.
485 Sat May 21 16:26:38 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
487 * Version 3.71 released.
489 * misc.c [GETLOADAVG_PRIVILEGED] [POSIX]: Don't test [HAVE_SETUID]
490 and [HAVE_SETGID]. Every system has those, and configure doesn't
493 * make.h [_POSIX_VERSION]: Don't #define POSIX #ifdef ultrix.
495 * compatMakefile (loadavg): Depend on and use loadavg.c instead of
497 (loadavg.c): Link or copy it from getloadavg.c.
498 (distclean): Remove loadavg.c.
500 Mon May 16 22:59:04 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
504 * misc.c [GETLOADAVG_PRIVILEGED] [! POSIX]: Undefine HAVE_SETEUID
507 * default.c (default_terminal_rules): In SCCS rules, put
508 $(SCCS_OUTPUT_OPTION) before $<. On some systems -G is grokked
509 only before the file name.
510 * configure.in (SCCS_GET_MINUS_G check): Put -G flag before file name.
512 Tue May 10 16:27:38 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
514 * job.c (construct_command_argv_internal): Swallow
515 backslash-newline combinations inside '' strings too.
517 Thu May 5 04:15:10 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
519 * read.c (do_define): Call collapse_continuations on each line
522 Mon Apr 25 19:32:02 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
524 * job.c (construct_command_argv_internal): Notice newline inside
525 '' string when RESTP is non-null.
527 Fri Apr 22 17:33:30 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
531 * remake.c (update_goal_chain): Reset FILE to G->file after the
532 double-colon loop so it is never null for following code.
534 * read.c (read_makefile): Fix `override define' parsing to skip
535 whitespace after `define' properly.
537 * compatMakefile (srcdir): Define as @srcdir@; don't reference
539 (glob/Makefile): New target.
541 Thu Apr 21 16:16:55 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
545 * misc.c (remove_comments): Use find_char_unquote.
546 * make.h (find_char_unquote): Declare it.
547 * read.c (find_char_unquote): New function, generalized from
549 (find_percent, find_semicolon, parse_file_seq): Use that.
551 Wed Apr 20 18:42:39 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
553 * implicit.c (pattern_search): Always allocate new storage for
554 FILE->stem. It is not safe to store STEM's address because it
555 might be auto storage.
557 * configure.in: Check for seteuid and setegid.
558 * misc.c [HAVE_SETEUID]: Declare seteuid.
559 [HAVE_SETEGID]: Declare setegid.
560 (make_access, user_access) [HAVE_SETEUID]: Use seteuid.
561 [HAVE_SETEGID]: Use setegid.
563 * remake.c (update_goal_chain): Set STATUS to FILE->update_status,
564 to preserve whether it's 2 for error or 1 for -q trigger. When
565 STATUS gets nonzero and -q is set, always stop immediately.
566 * main.c (main, decode_switches): Die with 2 for errors.
567 (main): Accept 2 return from update_goal_chain and die with that.
568 * misc.c (fatal, makefile_fatal): Die with 2; 1 is reserved for -q
570 * job.c (reap_children): Die with 2 for error.
571 (start_job_command): Set update_status to 2 for error. Set it to
572 1 when we would run a command and question_flag is set.
574 * read.c (read_makefile): Don't mark makefiles as precious. Just
575 like other targets, they can be left inconsistent and in need of
576 remaking by aborted commands.
578 * read.c (read_makefile): Write no error msg for -include file.
580 Tue Apr 5 05:22:19 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
582 * commands.c (fatal_error_signal): Don't unblock signals.
584 * file.h (struct file): Change member `double_colon' from flag to
586 * read.c (record_files): Set double_colon pointer instead of flag.
587 * main.c (main): When disqualifying makefiles for updating, use
588 double_colon pointer to find all entries for a file.
589 * file.c (enter_file): If there is already a double-colon entry
590 for the file, set NEW->double_colon to that pointer.
591 (file_hash_enter): Use FILE->double_colon to find all entries to
593 * remake.c (update_goal_chain): Do inner loop on double-colon entries.
594 (update_file): Use FILE->double_colon pointer to find all entries.
596 (notice_finished_file): Propagate mtime change to all entries.
598 * variable.c (try_variable_definition): Return after abort.
600 Fri Apr 1 18:44:15 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
602 * read.c (read_makefile): Remove unused variable.
603 (parse_file_seq): When removing an elt that is just `)', properly
604 fix up the previous elt's next pointer.
606 Mon Mar 28 18:31:49 1994 Roland McGrath (roland@mole.gnu.ai.mit.edu)
608 * configure.in: Do AC_SET_MAKE.
609 * GNUmakefile (Makefile.in): Edit MAKE assignment into @SET_MAKE@.
611 Fri Mar 4 00:02:32 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
613 * function.c (subst_expand): If BY_WORD or SUFFIX_ONLY is set and
614 the search string is the empty string, find a match at the end of
615 each word (using end_of_token in place of sindex).
617 * misc.c (end_of_token): Don't treat backslashes specially; you
618 can no longer escape blanks with backslashes in export, unexport,
619 and vpath. This was never documented anyway.
621 Thu Mar 3 23:53:46 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
623 * read.c (read_makefile): Variable name for `define' is not just
624 first token; use whole rest of line and strip trailing blanks.
626 Wed Feb 16 16:03:45 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
630 * read.c (read_makefile): Add -d msg stating args.
632 * read.c (read_makefile): Use isspace to skip over leading
633 whitespace, and explicitly avoid skipping over tabs. Don't want
634 to skip just spaces though; formfeeds et al should be skipped.
636 * default.c (default_variables) [__hpux]: Add f in ARFLAGS.
638 * arscan.c (ar_name_equal) [__hpux]: Subtract 2 instead of 1 from
639 sizeof ar_name for max length to compare.
641 * misc.c [GETLOADAVG_PRIVILEGED] [POSIX]: Undefine HAVE_SETREUID
642 #ifdef HAVE_SETUID; likewise HAVE_SETREGID and HAVE_SETGID.
644 * main.c (main): Call user_access after setting `program', in case
645 it needs to use it in an error message.
647 * read.c (read_makefile): Ignore an empty line starting with a tab.
649 Thu Feb 10 21:45:31 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
651 * configure.in (AC_SYS_SIGLIST_DECLARED): Use this instead of
652 AC_COMPILE_CHECK that is now its contents.
654 Fri Feb 4 16:28:54 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
656 * make.h: #undef strerror after #include <string.h>.
657 [! ANSI_STRING]: Declare strerror.
659 Thu Feb 3 02:21:22 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
661 * misc.c (strerror): #undef any macro before function definition.
663 Mon Jan 31 19:07:23 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
665 * variable.c (try_variable_definition): Calculate BEG before loop
666 to strip blanks by decrementing END. Don't decr END to before BEG.
668 * read.c (read_makefile): Skip over leading space characters, but
669 not tabs, after removing continuations and comments (it used to
672 Tue Jan 25 16:45:05 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
674 * variable.c (define_automatic_variables): In $(@D) et al, use
675 patsubst to remove trailing slash.
677 * commands.c (delete_target): New function, broken out of
678 delete_child_targets. Check for archive members and give special msg.
679 (delete_child_targets): Use delete_target.
681 Mon Jan 17 17:03:22 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
683 * default.c (default_suffix_rules): Use $(TEXI2DVI_FLAGS) in
684 texi2dvi rules. Use $(MAKEINFO_FLAGS) in makeinfo rules.
686 Tue Jan 11 19:29:55 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
688 * GNUmakefile (tarfiles): Omit make-doc.
689 (make-$(version).tar): Include make.info*.
691 Fri Jan 7 16:27:00 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
693 * compatMakefile (configure, config.h.in): Comment out rules.
695 Thu Jan 6 18:08:08 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
697 * compatMakefile (binprefix, manprefix): New variables.
698 (instname): Variable removed.
699 (install): Use $({bin,man}prefix)make in place of $(instname).
700 File targets likewised renamed.
702 Mon Jan 3 17:50:25 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
704 * Version 3.70 released.
706 Thu Dec 23 14:46:54 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
710 * read.c (parse_file_seq): Inside multi-word archive ref
711 translation loop, check NEW1==0 at end and break out of the loop.
713 * GNUmakefile (make-$(version).tar): Distribute install.sh.
714 * install.sh: New file.
716 * configure.in (SCCS_GET_MINUS_G check): Put redirection for admin
717 cmds outside subshell parens, to avoid "command not found" msgs
720 Wed Dec 22 17:00:43 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
722 * configure.in (SCCS_GET_MINUS_G check): Put -G flag last in get cmd.
723 Redirect output & error from get to /dev/null.
724 Fix reversed sense of test.
726 Fri Dec 17 15:31:36 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
728 * configure.in (SCCS_GET_MINUS_G check): Use parens instead of
729 braces inside if condition command; some shells lose.
731 Thu Dec 16 15:10:23 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
735 * arscan.c [M_UNIX]: Move #undef M_XENIX for PORTAR stuff.
736 (PORTAR) [M_XENIX]: Define to 0 instead of 1.
738 * main.c (define_makeflags): Only export MAKEFLAGS if !ALL.
740 Wed Dec 15 17:47:48 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
742 * main.c (main): Cast result of pointer arith to unsigned int
743 before passing to define_variable for envars. Matters when
744 sizeof(unsigned)!=sizeof(ptrdiff_t).
746 Tue Dec 14 14:21:16 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
748 * configure.in: Add new check for SCCS_GET_MINUS_G.
749 * config.h.in: Add #undef SCCS_GET_MINUS_G.
750 * default.c (default_terminal_rules): Use `$(SCCS_OUTPUT_OPTION)' in
751 place of `-G $@' in SCCS commands.
752 (default_variables) [SCCS_GET_MINUS_G]: Define SCCS_OUTPUT_OPTION
755 * configure.in (AC_OUTPUT): Put touch stamp-config in second arg
756 (so it goes in config.status), rather than afterward.
758 * ar.c (ar_member_date): Don't call enter_file on the archive file
759 if it doesn't exist (by file_exists_p).
761 * compatMakefile ($(infodir)/make.info): Replace `$$d/foo.info'
762 with `$$dir/make.info' in install-info invocation (oops).
764 * vpath.c (construct_vpath_list): Only set LASTPATH set PATH when
765 we do not unlink and free PATH.
767 * file.c (print_file_data_base): Fix inverted calculation for
768 average files per hash bucket.
770 * read.c (readline): When we see a NUL, give only a warning and
771 synthesize a newline to terminate the building line (used to
772 fatal). Move fgets call into the loop condition, and after the
773 loop test ferror (used to test !feof in the loop).
775 Fri Dec 3 16:40:31 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
777 * configure.in: Check for strerror in AC_HAVE_FUNCS.
779 Thu Dec 2 15:37:50 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
781 Differentiate different flavors of missing makefile error msgs,
782 removing gratuitous `fopen: ' and giving caller for included makefiles.
783 * misc.c [! HAVE_STRERROR]: Define our own strerror here.
784 (perror_with_name, pfatal_with_name): Use strerror instead of
785 replicating its functionality.
786 * read.c (read_makefile): Return int instead of void.
787 (read_all_makefiles, read_makefile): Change callers to notice zero
788 return and give error msg.
790 Thu Nov 11 11:47:36 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
794 * default.c: Put `-G $@' before $< in SCCS cmds.
796 Wed Nov 10 06:06:14 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
798 * read.c (read_makefile): After trying a variable defn, notice if
799 the line begins with a tab, and diagnose an error.
801 Sun Nov 7 08:07:37 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
805 Wed Nov 3 06:54:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
809 * implicit.c (try_implicit_rule): Look for a normal rule before an
812 Fri Oct 29 16:45:28 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
814 * function.c (expand_function: `sort'): Double NWORDS when it
815 overflows, instead of adding five.
817 * compatMakefile (clean): Remove loadavg.
819 Wed Oct 27 17:58:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
823 * file.h (NEW_MTIME): Define new macro.
824 * main.c (main): Set time of NEW_FILES to NEW_MTIME, not to
825 current time returned from system. Removed variable NOW.
826 * remake.c (notice_finished_file): Use NEW_MTIME in place of
827 current time here too.
829 Tue Oct 26 19:45:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
833 * remake.c (update_file_1): Don't clear MUST_MAKE when FILE has no
834 cmds and !DEPS_CHANGED unless also !NOEXIST.
836 Mon Oct 25 15:25:21 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
838 * read.c (parse_file_seq): When converting multi-word archive
839 refs, ignore a word beginning with a '('.
841 Fri Oct 22 02:53:38 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
843 * configure.in: Check for sys/timeb.h.
844 * make.h [HAVE_SYS_TIMEB_H]: Test this before including it.
846 Thu Oct 21 16:48:17 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
850 * rule.c (convert_suffix_rule): New local TARGPERCENT. Set it to
851 TARGNAME+1 for "(%.o)", to TARGNAME for "%.?". Use it in place of
852 TARGNAME to initialize PERCENTS[0].
854 Mon Oct 18 06:49:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
856 * configure.in: Use AC_HAVE_HEADERS(unistd.h) instead of AC_UNISTD_H.
857 Remove AC_USG; it is no longer used.
859 * file.c (print_file): New function, broken out of
860 print_file_data_base.
861 (print_file_data_base): Call it.
862 * rule.c (print_rule): New function, broken out of
863 print_rule_data_base.
864 (print_rule_data_base): Call it.
866 Thu Oct 14 14:54:03 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
868 * default.c (install_default_suffix_rules): New function, broken
869 out of install_default_implicit_rules.
870 (install_default_implicit_rules): Move suffix rule code there.
871 * make.h: Declare install_default_suffix_rules.
872 * main.c (main): Call install_default_suffix_rules before reading
873 makefiles. Move convert_to_pattern call before
874 install_default_implicit_rules.
876 * job.h (struct child): Make `pid' member type `pid_t' instead of
879 * compatMakefile (RANLIB): New variable, set by configure.
880 (glob/libglob.a): Pass RANLIB value down to submake.
882 Fixes for SCO 3.2 "devsys 4.2" from pss@tfn.com (Peter Salvitti).
883 * make.h: Include <sys/timeb.h> before <time.h> for SCO lossage.
884 * job.c [! getdtablesize] [! HAVE_GETDTABLESIZE]: If NOFILE is not
885 defined but NOFILES_MAX is, define it to be that.
887 Mon Oct 11 19:47:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
889 * GNUmakefile (make-$(version).tar): Depend on acconfig.h, so it
892 Sun Oct 3 15:15:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
894 * default.c (default_terminal_rules): Add `-G $@' to SCCS get cmds.
896 Tue Sep 28 14:18:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
898 * job.c (construct_command_argv_internal): Add ^ to SH_CHARS; it
899 is another symbol for | in some shells.
900 * main.c (main): Add it to CMD_DEFS quoting list as well.
902 Mon Sep 20 18:05:24 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
904 * job.c (construct_command_argv_internal): Remove '=' from
905 SH_CHARS. Only punt on '=' if it is unquoted in a word before the
906 first word without an unquoted '='.
908 * main.c (define_makeflags): Set v_export for MAKEFLAGS.
910 Fri Sep 17 00:37:18 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
912 * remake.c (update_file_1): Use .DEFAULT cmds for phony targets.
914 * make.h [_AIX && _POSIX_SOURCE]: Define POSIX.
916 * commands.c (delete_child_targets): Don't delete phony files.
918 * job.c (start_job_command): Set COMMANDS_RECURSE in FLAGS if we
919 see a `+' at the beginning of the command line.
921 Thu Sep 9 17:57:14 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
925 Wed Sep 8 20:14:21 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
927 * main.c (define_makeflags): Define MAKEFLAGS with o_file, not o_env.
929 Mon Aug 30 12:31:58 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
931 * expand.c (variable_expand): Fatal on an unterminated reference.
933 Thu Aug 19 16:27:53 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
937 * variable.c (define_automatic_variables): Define new o_default
938 variable `MAKE_VERSION' from version_string and remote_description.
940 * make.h (version_string, remote_description): Declare these here.
941 * main.c: Don't declare version_string.
942 (print_version): Don't declare remote_description.
944 Wed Aug 18 15:01:24 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
946 * read.c (read_makefile): Free space pointed to by CONDITIONALS
947 before restoring the old pointer.
949 Mon Aug 16 17:33:36 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
951 * compatMakefile ($(objs)): Depend on config.h.
953 * GNUmakefile (build.sh.in): Depend on compatMakefile.
955 * configure.in: Touch stamp-config after AC_OUTPUT.
957 Fri Aug 13 16:04:22 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
961 Thu Aug 12 17:18:57 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
963 * make.h: Include <config.h> instead of "config.h".
965 Wed Aug 11 02:35:25 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
967 * main.c (main): Make all variables interned from ENVP be v_export.
968 * variable.c (try_variable_definition): In v_default case, don't
969 check for an o_file variable that `getenv' finds.
971 * job.c (reap_children): New local variable ANY_LOCAL; set it
972 while setting ANY_REMOTE. If !ANY_LOCAL, don't wait for local kids.
974 * main.c (main): Don't call decode_env_switches on MFLAGS. DOC THIS.
976 * function.c (expand_function): #if 0 out freeing of ENVP since it
979 Mon Aug 9 17:37:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
983 * remote-stub.c (remote_status): Set errno to ECHILD before return.
984 * job.c (reap_children): Scan the chain for remote children and
985 never call remote_status if there are none.
987 * function.c (expand_function: `shell'): #if 0 out calling
988 target_environment; just set ENVP to environ instead.
990 * job.c (reap_children): Check for negative return from
991 remote_status and fatal for it.
992 When blocking local child wait returns 0, then try a blocking call
995 Tue Aug 3 00:19:00 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
997 * compatMakefile (clean): Delete make.info* and make.dvi here.
998 (distclean): Not here.
1000 * dep.h (RM_*): Use #defines instead of enum to avoid lossage from
1001 compilers that don't like enum values used as ints.
1003 Mon Aug 2 16:46:34 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1005 * compatMakefile (loadavg): Add $(LOADLIBES).
1007 Sun Aug 1 16:01:15 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1011 * compatMakefile (loadavg, check-loadavg): New targets.
1012 (check): Depend on check-loadavg.
1014 * compatMakefile (glob/libglob.a): Depend on config.h.
1016 * misc.c (log_access): Write to stderr instead of stdout.
1018 Fri Jul 30 00:07:02 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1022 Thu Jul 29 23:26:40 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1024 * configure.in (SYS_SIGLIST_DECLARED): In test program include
1025 <unistd.h> #ifdef HAVE_UNISTD_H.
1027 * compatMakefile (.PHONY): Put after `all' et al.
1029 * configure.in: Add AC_IRIX_SUN.
1031 Wed Jul 28 17:41:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1035 Mon Jul 26 14:36:49 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1039 Sun Jul 25 22:09:08 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1043 * compatMakefile ($(infodir)/make.info): Don't use $(instname).
1044 Run install-info script if present.
1046 Fri Jul 23 16:03:50 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1048 * make.h [STAT_MACROS_BROKEN]: Test this instead of [uts].
1050 * configure.in: Add AC_STAT_MACROS_BROKEN.
1052 Wed Jul 14 18:48:11 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1056 * read.c (read_makefile): Recognize directive `-include', like
1057 `include' but sets RM_DONTCARE flag.
1059 * variable.c (target_environment): If FILE is nil, use
1060 current_variable_set_list in place of FILE->variables.
1061 * function.c (expand_function: `shell'): Get an environment for
1062 the child from target_environment instead of using environ.
1064 * dep.h: Declare read_all_makefiles here.
1065 (RM_*): Define new enum constants.
1066 * read.c (read_makefile): Second arg is FLAGS instead of TYPE.
1067 Treat it as a bit mask containing RM_*.
1068 (read_all_makefiles): For default makefiles, set D->changed to
1069 RM_DONTCARE instead of 1.
1070 * main.c: Don't declare read_all_makefiles here.
1071 (main): Check `changed' member of read_makefiles elts for RM_*
1072 flags instead of specific integer values.
1074 Mon Jul 12 22:42:17 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1076 * make.h [sequent && i386]: #undef POSIX. From trost@cse.ogi.edu.
1078 Thu Jul 8 19:51:23 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1080 * vpath.c (construct_vpath_list): If ELEM is zero 0, free PATTERN
1082 (build_vpath_lists): Empty `vpaths' around construct_vpath_list
1083 call for $(VPATH). Expand $(strip $(VPATH)), not just $(VPATH).
1085 * rule.c (convert_suffix_rule): Use alloca instead of xmalloc for
1086 PERCENTS, whose storage is not consumed by create_pattern_rule.
1088 * make.h [__mips && _SYSTYPE_SVR3]: #undef POSIX.
1090 Wed Jun 30 18:11:40 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1094 * rule.c (max_pattern_targets): New variable.
1095 (count_implicit_rule_limits): Compute its value.
1096 * rule.h: Declare it.
1097 * implicit.c (pattern_search): Make TRYRULES max_target_patterns
1098 times bigger. Move adding new TRYRULES elt inside the inner
1099 targets loop, so each matching target gets its own elt in MATCHES
1100 and CHECKED_LASTSLASH.
1102 * file.c (remove_intermediates): If SIG!=0 say `intermediate file'
1103 instead of just `file' in error msg.
1105 Fri Jun 25 14:55:15 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1107 * job.c (construct_command_argv): Turn off
1108 --warn-undefined-variables around expansion of SHELL and IFS.
1109 * read.c (tilde_expand): Likewise for HOME.
1110 (read_all_makefiles): Likewise for MAKEFILES.
1111 * vpath.c (build_vpath_lists): Likewise for VPATH.
1113 * main.c (warn_undefined_variables_flag): New flag variable.
1114 (switches): Add --warn-undefined-variables.
1115 * make.h (warn_undefined_variables_flag): Declare it.
1116 * expand.c (warn_undefined): New function.
1117 (reference_variable): Call it if the variable is undefined.
1118 (variable_expand): In substitution ref, call warn_undefined if the
1119 variable is undefined.
1121 * default.c (default_pattern_rules): Add `%.c: %.w %.ch' and
1122 `%.tex: %.w %.ch' rules.
1123 (default_suffix_rules: .w.c, .w.tex): Pass three args: $< - $@.
1124 (default_suffixes): Add `.ch'.
1126 Mon Jun 21 17:55:39 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1128 * default.c (default_suffixes): Replace `.cweb' with `.w'.
1129 (default_suffix_rules): Rename `.cweb.c' and `.cweb.tex' to `.w.c'
1132 Fri Jun 11 14:42:09 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1134 * compatMakefile ($(bindir)/$(instname)): Add missing backslash.
1136 Thu Jun 10 18:14:08 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1140 * read.c (multi_glob): Don't free OLD and OLD->name in the
1141 FOUND!=0 fork. Use new block-local variable F instead of
1144 * ar.c (glob_pattern_p): New function, snarfed from glob/glob.c.
1145 (ar_glob): Call it; return nil immediately if MEMBER_PATTERN
1146 contains no metacharacters.
1148 Wed Jun 9 16:25:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1150 * ar.c (ar_glob{_match,_alphacompare}): New function.
1152 * dep.h [! NO_ARCHIVES]: Declare it.
1153 * read.c (multi_glob) [! NO_ARCHIVES]: Use it on archive member elts.
1155 * read.c (read_makefile): Pass flag (1) to parse_file_seq, not to
1156 multi_glob (which doesn't take a 3rd arg).
1157 * rule.c (install_pattern_rule): Likewise.
1158 * default.c (set_default_suffixes): Here too.
1159 * function.c (string_glob): Don't pass gratuitous arg to multi_glob.
1161 * read.c (parse_file_seq) [! NO_ARCHIVES]: Add post-processing
1162 loop to translate archive refs "lib(a b)" into "lib(a) lib(b)".
1164 Mon Jun 7 19:26:51 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1166 * compatMakefile (installdirs): Actually pass directory names.
1167 ($(bindir)/$(instname)): Test chgrp&&chmod exit status with `if';
1168 if it fails, echo a warning msg, but don't make the rule fail.
1170 * read.c (tilde_expand): New function, broken out of tilde_expand.
1171 (multi_glob): Call it.
1172 (construct_include_path): Expand ~ in directory names.
1173 * dep.h: Declare tilde_expand.
1174 * main.c (enter_command_line_file): Expand ~ at the start of NAME.
1175 (main): Expand ~ in -C args.
1176 * read.c (read_makefile): Expand ~ in FILENAME unless TYPE==2.
1178 Fri Jun 4 13:34:47 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1180 * main.c (decode_env_switches): Use xmalloc instead of alloca for ARGS.
1182 * main.c (main): Put result of alloca in temporary variable with
1183 simple assignment, to make SGI compiler happy.
1185 Thu Jun 3 20:15:46 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1189 * main.c (main): Before re-execing, remove intermediate files, and
1190 print the data base under -p. Sexier debugging message.
1192 * implicit.c (pattern_search): Allocate an extra copy of the name
1193 of a winning intermediate file when putting it in FOUND_FILES.
1195 Wed Jun 2 16:38:08 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1197 * read.c (read_makefile): Pass flag (1) to parse_file_seq, not to
1198 multi_glob (which doesn't take a 3rd arg).
1200 * dir.c (dir_contents_file_exists_p): When reading dirents, ignore
1201 chars within D_NAMLEN that are NULs.
1203 * main.c (decode_switches): Don't savestring ARGV[0] to put it
1205 For string switch, don't savestring `optarg'.
1206 (main): Don't free elts of makefiles->list that are "-".
1207 Use alloca'd rather than savestring'd storage for elts of
1208 makefiles->list that are temporary file names.
1209 * read.c (read_all_makefiles): Don't free *MAKEFILES.
1210 * file.c (enter_file): Don't strip `./'s.
1211 * main.c (enter_command_line_file): New function.
1212 (main): Use it in place of enter_file for command-line goals from
1213 other_files, and for old_files and new_files.
1215 Mon May 31 18:41:40 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1219 * compatMakefile (.SUFFIXES): Add .info.
1220 ($(infodir)/$(instname).info): Find make.info* in cwd if there,
1221 else in $srcdir. Use basename to remove dir name from installed name.
1223 Thu May 27 17:35:02 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1225 * implicit.c (pattern_search): When interning FOUND_FILES, try
1226 lookup_file first; if found, free the storage for our copy of the name.
1228 Wed May 26 14:31:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1232 * main.c (decode_switches): In usage msg, write `--switch=ARG' or
1233 `--switch[=OPTARG]' rather than `--switch ARG' or `--switch [ARG]'.
1235 Mon May 24 16:17:31 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1237 * rule.c (convert_suffix_rule): New function.
1238 (convert_to_pattern): Use it instead of doing all the work here
1240 For target suffix `.a', generate both the archive magic rule and
1243 * compatMakefile (distclean): Remove stamp-config.
1245 Sat May 22 16:15:18 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1249 * file.c (remove_intermediates): Don't write extra space after `rm'.
1251 * main.c (struct command_switch.type): Remove `usage_and_exit'.
1252 (print_usage_flag): New variable.
1253 (switches: --help): Make type `flag', to set print_usage_flag.
1254 (init_switches): Remove `usage_and_exit' case.
1255 (decode_switches): Likewise.
1256 (decode_switches): Print usage if print_usage_flag is set.
1257 When printing usage, die with status of BAD.
1258 (main): Die with 0 if print_version_flag.
1260 Fri May 21 16:09:28 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1264 Wed May 19 21:30:44 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1266 * compatMakefile (installdirs): New target.
1267 (install): Depend on it.
1269 Sun May 16 20:15:07 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1273 Fri May 14 16:40:09 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1275 * vpath.c (construct_vpath_list): In removal loop for DIRPATH==0,
1276 set LASTPATH to PATH, not NEXT.
1278 * dir.c (read_dirstream): Break out of loop after incrementing
1279 DS->buckets such that it reaches DIRFILE_BUCKETS; avoid trying to
1280 dereference DS->contents->files[DIRFILE_BUCKETS].
1282 * read.c (read_makefile): Clear no_targets after reading a
1283 targetful rule line.
1285 * main.c (main): If print_version_flag is set, exit after printing
1287 (switches): Change --version docstring to say it exits.
1289 * make.h [butterfly]: #undef POSIX.
1291 Wed May 12 15:20:21 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1295 * arscan.c (ar_scan) [! AIAMAG]: Don't declare LONG_NAME.
1296 [AIAMAG]: Pass TRUNCATE flag arg to (*FUNCTION), always zero.
1298 * function.c (handle_function): Use fatal instead of
1299 makefile_fatal when reading_filename is nil.
1301 * configure.in: Add AC_GETGROUPS_T.
1302 * job.c (search_path): Use GETGROUPS_T in place of gid_t.
1304 Sun May 9 15:41:25 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1308 Fri May 7 18:34:56 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1310 * function.c (handle_function): Fatal for unmatched paren.
1312 Thu May 6 16:13:41 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1316 * commands.c (handling_fatal_signal): New variable.
1317 (fatal_error_signal): Set it.
1318 * job.c (reap_children): Avoid nonreentrant operations if that is set.
1319 * make.h: Declare handling_fatal_signal.
1321 * expand.c (reference_variable): New function, snippet of code
1322 broken out of simple-reference case of variable_expand.
1323 (variable_expand): Use it for simple refs.
1324 (variable_expand): When checking for a computed variable name,
1325 notice a colon that comes before the final CLOSEPAREN. Expand
1326 only up to the colon, and then replace the pending text with a
1327 copy containing the expanded name and fall through to subst ref
1329 (variable_expand): Don't bother expanding the name if a colon
1330 appears before the first $.
1331 (expand_argument): Use alloca instead of savestring.
1332 (variable_expand): For subst ref, expand both sides of = before
1333 passing to [pat]subst_expand. Use find_percent instead of lindex
1334 to check the lhs for a %.
1336 Wed May 5 14:45:52 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1340 Mon May 3 17:00:32 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1342 * arscan.c (ar_name_equal) [AIAMAG]: Abort if TRUNCATED is nonzero.
1344 * read.c (read_makefile): Pass extra arg of 1 to parse_file_seq,
1347 Thu Apr 29 19:47:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1351 * arscan.c (ar_scan): New local flag var LONG_NAME. Set it when
1352 we read the member name in any of the fashions that allow it to be
1353 arbitrarily long. Pass its negation to FUNCTION.
1354 (describe_member): Take TRUNCATED from ar_scan and print it.
1355 (ar_name_equal): Take new arg TRUNCATED; if nonzero, compare only
1356 the first sizeof (struct ar_hdr.ar_name) chars.
1357 (ar_member_pos): Take TRUNCATED from ar_scan, pass to ar_name_equal.
1358 * ar.c (ar_member_date_1): Likewise.
1360 Wed Apr 28 21:18:22 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1362 * job.c (reap_children): Before calling start_job_command to start
1363 the next command line, reset C->remote by calling start_remote_job_p.
1365 Mon Apr 26 15:56:15 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1367 * arscan.c (ar_scan): New local var NAMEMAP.
1368 In loop, rename NAME to NAMEBUF; new var NAME is a pointer; new
1369 flag IS_NAMEMAP. When extracting the member name, always put a
1370 null at its end first. If the name is "//" or "/ARFILENAMES", set
1371 IS_NAMEMAP. If we have already read in NAMEMAP, and NAME looks
1372 like " /N", get full name from NAMEMAP+N.
1373 Else if NAME looks like "#1/N", read N chars from the
1374 elt data to be the full name. At end of loop, if IS_NAMEMAP, read
1375 the elt's data into alloca'd NAMEMAP.
1376 (ar_name_equal): #if 0 truncating code.
1378 * make.h: Don't declare vfork at all. It returns int anyway,
1379 unless <unistd.h> declared it; and we conflicted with some systems.
1381 * main.c (define_makeflags): If FLAGSTRING[1] is '-', define
1382 MAKEFLAGS to all of FLAGSTRING, not &FLAGSTRING[1]. Don't want to
1383 define it to something like "-no-print-directory".
1384 Use %g format instead of %f for floating-valued things.
1386 Thu Apr 22 18:40:58 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1388 * GNUmakefile (Makefile.in): Use a substitution ref on nolib-deps
1389 to change remote-%.dep to remote-stub.dep.
1391 Wed Apr 21 15:17:54 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1395 Fri Apr 16 14:22:22 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1397 * compatMakefile (install): Remove - prefix from chgrp+chmod.
1401 Thu Apr 15 18:24:07 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1403 * acconfig.h: New file; contains "#undef SCCS_GET" for autoheader.
1404 * configure.in: If /usr/sccs/get exists, define SCCS_GET to that,
1406 * default.c (default_variables): Set GET to macro SCCS_GET.
1408 * read.c (parse_file_seq): Take extra arg STRIP; strip `./' only
1409 if nonzero. I hope this is the last time this argument is added
1411 (read_makefile): Pass it 1 when parsing include file names.
1412 Pass it 1 when parsing target file names.
1413 Pass it 1 when parsing static pattern target pattern names.
1414 * rule.c (install_pattern_rule): Pass it 1 when parsing rule deps.
1415 * default.c (set_default_suffixes): Pass it 1 when parsing
1417 * function.c (string_glob): Pass it 0 here.
1419 Wed Apr 14 11:32:05 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1421 * misc.c (log_access): New function.
1422 ({init,user,make,child}_access): Call it.
1423 (child_access): Abort if !access_inited.
1425 * main.c (switches: --no-print-directory): Use 1 instead of -1 for
1426 single-letter option.
1427 (init_switches, decode_switches, define_makeflags): An option with
1428 no single-letter version is no longer indicated by a value of -1;
1429 instead a value that is !isalnum.
1430 (init_switches): Don't put such switches into the string, only
1431 into the long_option table.
1433 * make.h [!NSIG] [!_NSIG]: #define NSIG 32.
1435 * job.c [HAVE_WAITPID]: Remove #undef HAVE_UNION_WAIT. AIX's
1436 bsdcc defined WIF* to use union wait.
1438 * main.c (struct command_switch): Change member `c' to type int.
1439 (switches): Make const.
1440 (decode_switches): Use `const struct command_switch *'.
1441 (define_makeflags): Likewise.
1443 * default.c (default_suffix_rules): Add `-o $@' to makeinfo rules.
1445 Mon Apr 12 12:30:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1449 * configure.in (AC_HAVE_HEADERS): Check for string.h and memory.h.
1450 Removed AC_MEMORY_H.
1451 * make.h [USG, NeXT]: Don't test these.
1452 [HAVE_STRING_H]: Test this to include string.h and define ANSI_STRING.
1453 [HAVE_MEMORY_H]: Test this instead of NEED_MEMORY_H.
1454 [! ANSI_STRING]: Put decls of bcopy et al here.
1455 [sparc]: Don't test this for alloca.h; HAVE_ALLOCA_H is sufficient.
1456 [HAVE_SIGSETMASK]: Test this rather than USG.
1457 [__GNU_LIBRARY__ || POSIX]: Don't #include <unistd.h> again.
1458 * main.c (main): Handle SIGCHLD if defined, and SIGCLD if defined.
1459 It doesn't hurt to do both if they are both defined, and testing
1461 * dir.c: Rationalize directory header conditionals.
1462 * arscan.c [HAVE_FCNTL_H]: Test this rather than USG || POSIX.
1464 * default.c (default_suffixes): Add `.txinfo'.
1465 (default_suffix_rules): Add `.txinfo.info' and `.txinfo.dvi' rules.
1467 * variable.c (try_variable_definition): Replace RECURSIVE flag
1468 with enum FLAVOR, which can be simple, recursive, or append.
1469 Recognize += as append flavor. Set new variable VALUE in a switch
1470 on FLAVOR. For append flavor, prepend the variable's old value.
1471 If the variable was previously defined recursive, set FLAVOR to
1472 recursive; if it was defined simple, expand the new value before
1473 appending it to the old value. Pass RECURSIVE flag to
1474 define_variable iff FLAVOR == recursive.
1476 * variable.c (try_variable_definition): Use alloca and bcopy for
1477 NAME, instead of savestring. Might as well use stack storage
1478 since we free it immediately anyway.
1480 Thu Apr 8 18:04:43 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1482 * job.c (start_waiting_jobs): Move decl of JOB outside of loop.
1484 * main.c (define_makeflags): Rename `struct flag' member `switch'
1485 to `cs', which is not a reserved word.
1487 Wed Apr 7 15:30:51 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1489 * job.c (new_job): Call start_waiting_jobs first thing.
1490 (start_waiting_job): Changed return type from void to int.
1491 Return 0 when putting the child on the waiting_jobs chain.
1492 (start_waiting_jobs): Don't check load and job_slots here.
1493 Always take a job off the chain and call start_waiting_job on it;
1494 give up and return when start_waiting_job returns zero.
1496 * main.c (define_makeflags: struct flag): Change member `char c' to
1497 `struct command_switch *switch'.
1498 (ADD_FLAG): Set that to CS instead of CS->c.
1499 If CS->c is -1, increment FLAGSLEN for the long name.
1500 When writing out FLAGS, handle FLAGS->switch->c == -1 and write
1501 the long name instead.
1503 * compatMakefile (stamp-config): New target of old config.h rule.
1504 Touch stamp-config after running config.status.
1505 (config.h): Just depend on stamp-config, and have empty commands.
1507 Mon Apr 5 20:14:02 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1509 * job.c [HAVE_WAITPID]: #undef HAVE_UNION_WAIT.
1511 * configure.in (AC_HAVE_FUNCS): Check for psignal.
1513 Fri Apr 2 17:15:46 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1515 * main.c (long_option_aliases): Remove "new"; it is already an
1516 unambiguous prefix of "new-file".
1518 Sun Mar 28 16:57:17 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1522 Wed Mar 24 14:26:19 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1524 * vpath.c (selective_vpath_search): When adding the
1525 name-within-directory at the end of NAME, and we don't add a
1526 slash, don't copy FILENAME in one char too far into NAME.
1528 * variable.c (define_automatic_variables): Find default_shell's
1529 length with strlen, not numerology.
1531 Wed Mar 17 20:02:27 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1533 * main.c (define_makeflags): Add the elts of a string option in
1534 reverse order, so they come out right when reversed again.
1536 Fri Mar 12 15:38:45 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1538 * compatMakefile (make.info): Use `-o make.info'.
1540 Thu Mar 11 14:13:00 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1542 * compatMakefile (REMOTE): Set to @REMOTE@; change comments to
1544 (objs): Replace remote.o with remote-$(REMOTE).o.
1545 (srcs): Replace remote.c with remote-$(REMOTE).c.
1546 (remote.o): Rule removed.
1548 * configure.in (REMOTE): Subst this in Makefile et al; default "stub".
1549 Use AC_WITH to grok --with-customs arg to set REMOTE=cstms.
1550 * GNUmakefile (build.sh.in): Filter out remote-% from objs list.
1551 * build.template (REMOTE): New var; set to @REMOTE@.
1552 (objs): Add remote-${REMOTE}.o.
1554 Wed Mar 10 15:12:24 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1558 * implicit.c (pattern_search): Fix "dependent"->"dependency" in
1559 "Rejecting impossible" -d msg.
1561 * file.c (file_hash_enter): New local vars {OLD,NEW}BUCKET. Store
1562 mod'd values there; never mod {OLD,NEW}HASH.
1564 Mon Mar 8 13:32:48 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1566 * remake.c [eta10]: Include <fcntl.h> instead of <sys/file.h>.
1568 * compatMakefile (VPATH): Set this to @srcdir@.
1569 (srcdir): Set this to $(VPATH).
1571 * main.c (main): New local var DIRECTORY_BEFORE_CHDIR. Save in it
1572 a copy of CURRENT_DIRECTORY after the first getcwd. Use it
1573 instead of CURRENT_DIRECTORY when chdir'ing back before re-execing.
1575 * remake.c (notice_finished_file): Pass missing SEARCH arg to f_mtime.
1577 * read.c (read_makefile): Remove extraneous arg to parse_file_seq.
1579 Mon Feb 22 14:19:38 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1581 * compatMakefile ($(infodir)/$(instname).info): Use , instead of /
1582 as the sed delimiter char.
1584 Sun Feb 21 14:11:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1588 * rule.h (struct rule): Removed `subdir' member.
1589 * rule.c (new_pattern_rule): No need to clear it.
1590 (count_implicit_rule_limits): Set the `changed' flag in each dep
1591 that refers to a nonexistent directory. No longer set rule-global
1592 `subdir' flag with that information.
1593 (print_rule_data_base): Don't record info on `subdir' flags.
1595 * implicit.c (pattern_search): Check the DEP->changed flag rather
1596 than the (now gone) RULE->subdir flag. Also test CHECK_LASTSLASH;
1597 if it is set, the file might exist even though the DEP->changed
1600 * rule.c (count_implicit_rule_limits): Pass "", not ".", as file
1601 name arg to dir_file_exists_p to check for existence of directory.
1603 * implicit.c (pattern_search): Inside dep-finding loop, set
1604 CHECK_LASTSLASH from the value recorded in CHECKED_LASTSLASH[I],
1605 rather than computing it anew.
1607 * commands.c (set_file_variables): Must alloca space for PERCENT
1608 and copy it, to avoid leaving the trailing `)' in the value.
1610 * misc.c (remove_comments): Fixed backslash-checking loop
1611 condition to allow it to look at the first char on the line.
1612 P2 >= LINE, not P2 > LINE.
1614 * compatMakefile ($(bindir)/$(instname)): Before moving $@.new to
1615 $@, rm $@.old and mv $@ to $@.old.
1617 * variable.c (try_variable_definition): Take new args FILENAME and
1618 LINENO. Fatal if the variable name is empty.
1619 * read.c (read_makefile): Change callers.
1620 * main.c (main): Likewise.
1622 * compatMakefile (group): Define to @KMEM_GROUP@, autoconf magic
1623 that configure will replace with the group owning /dev/kmem.
1625 Mon Feb 8 14:26:43 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1627 * vpath.c (vpath_search): Take second arg MTIME_PTR, pass thru to
1628 selective_vpath_search.
1629 (selective_vpath_search): Take second arg MTIME_PTR.
1630 If the dir cache thinks a file exists, stat it to make sure, and
1631 put the modtime in *MTIME_PTR.
1632 * remake.c (library_search): Take second arg MTIME_PTR.
1633 When we find a match, record its mtime there.
1634 Pass MTIME_PTR through to vpath_search to do same.
1635 (f_mtime): Pass &MTIME as new 2nd arg to {vpath,library}_search;
1636 store it in FILE->last_mtime if set nonzero.
1637 * implicit.c (pattern_search): Pass nil 2nd arg to vpath_search.
1639 * compatMakefile (remote.o): Prepend `$(srcdir)/' to `remote-*.c',
1640 so globbing looks somewhere it will find things.
1642 * compatMakefile ($(infodir)/$(instname).info): Install `make.info*'
1643 not `$(srcdir)/make.info*'; no need to use basename.
1645 Fri Feb 5 12:52:43 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1649 * compatMakefile (install): Add missing ;\s.
1651 Make -, @, and + prefixes on a pre-expanded command line affect
1652 all lines in the expansion, not just the first.
1653 * commands.h (struct commands): Replace `lines_recurse' member
1655 (COMMANDS_{RECURSE,SILENT,NOERROR}): New macros, bits to set in
1657 * commands.c (chop_commands): Set `lines_flags' instead of
1658 `lines_recurse'. Record not only + but also @ and - prefixes.
1659 * remake.c (notice_finished_file): Check the COMMANDS_RECURSE bit
1660 in FILE->cmds->lines_flags, rather than FILE->cmds->lines_recurse.
1661 * job.c (start_job_command): Replaced RECURSIVE and NOPRINT local
1662 var with FLAGS; initialize it to the appropriate `lines_flags' byte.
1663 Set CHILD->noerror if the COMMANDS_NOERROR bit is set in FLAGS.
1664 Set the COMMANDS_SILENT bit in FLAGS for a @ prefix.
1666 * remake.c (update_goal_chain): Set G->file to its prev after
1667 checking for G being finished, since that check needs to examine
1670 * configure.in (union wait check) [HAVE_WAITPID]: Try using
1671 waitpid with a `union wait' STATUS arg. If waitpid and union wait
1672 don't work together, we should not use union wait.
1676 * remake.c (update_goal_chain): When G->file->updated, move
1677 G->file to its prev. We aren't finished until G->file is nil.
1679 Thu Feb 4 12:53:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1681 * main.c (starting_directory): New global variable.
1682 (main): Set it to cwd after doing -Cs.
1683 (log_working_directory): Use it, rather than computing each time.
1684 * make.h: Declare it.
1686 * compatMakefile (SHELL): Define to /bin/sh for losing Unix makes.
1688 * main.c (decode_env_switches): Allocate (1 + LEN + 1) words for
1689 ARGV, rather than LEN words plus one byte.
1691 Wed Feb 3 18:13:52 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1693 * compatMakefile ($(bindir)/$(instname)): Put - before
1694 install_setgid command line, so its failure won't be an error.
1695 (infodir): New variable.
1696 (install): Depend on $(infodir)/$(instname).info.
1697 ($(infodir)/$(instname).info): New target.
1699 * read.c (read_makefile): If FILENAMES is nil when we see a line
1700 starting with a tab, don't treat it as a command. Just fall
1701 through, rather than giving an error.
1703 * read.c (read_makefile): If the NO_TARGETS flag is set when we see a
1704 command line, don't clear it before continuing. We want
1705 subsequent command lines to be ignored as well.
1707 * job.c (new_job): Before expanding each command line, collapse
1708 backslash-newline combinations that are inside var or fn references.
1710 Mon Feb 1 16:00:13 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1712 * compatMakefile (exec_prefix): Default to $(prefix), not /usr/local.
1714 * compatMakefile (make.info): Pass -I$(srcdir) to makeinfo.
1716 * job.c [POSIX] (unblock_sigs): Made global.
1717 [!POSIX] (unblock_sigs): Move defns to job.h.
1718 * job.h [POSIX] (unblock_sigs): Declare.
1720 Sun Jan 31 19:11:05 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1722 * read.c (read_makefile): In vpath parsing, after finding the
1723 pattern token, take entire rest of line as the search path, not
1724 just the next token.
1726 * compatMakefile (remote.o): Depend on remote-*.c.
1728 Thu Jan 28 16:40:29 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1730 * commands.c (set_file_variables): Don't define any F or D versions.
1731 * variable.c (define_automatic_variables): Define them here as
1732 recursively-expanded variables that use the dir and notdir funcs.
1734 * variable.c (target_environment): In v_default case, don't export
1735 o_default or o_automatic variables.
1737 * configure.in (union wait check): Remove ` and ' inside C code;
1738 they confuse the shell script.
1740 Mon Jan 25 13:10:42 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1744 * vpath.c (construct_vpath_list): When skipping further processing
1745 of an elt that is ".", don't also skip the code that pushes P past
1748 * compatMakefile (distclean): Don't remove make-*.
1750 * configure.in (HAVE_UNION_WAIT): Try to use WEXITSTATUS if it's
1751 defined. If one cannot use WEXITSTATUS with a `union wait'
1752 argument, we don't want to believe the system has `union wait' at all.
1754 * remake.c (update_file): Do nothing to print "up to date" msgs.
1755 (update_goal_chain): Do it here instead.
1756 Use the `changed' flag of each goal's `struct dep' to keep track
1757 of whether files_remade (now commands_started) changed around a
1758 call to update_file for that goal.
1759 When a goal is finished, and its file's update_status is zero (i.e.,
1760 success or nothing done), test the `changed' flag and give an "up
1761 to date" msg iff it is clear.
1762 * make.h (files_remade): Renamed to commands_started.
1763 * remake.c: Changed defn.
1764 (update_goal_chain): Changed uses.
1765 * job.c (start_job_command): Increment commands_started here.
1766 (reap_children): Not here.
1768 * remake.c (update_goal_chain): Don't do anything with files'
1769 `prev' members. update_file now completely handles this.
1771 * variable.c (target_environment): Don't expand recursive
1772 variables if they came from the environment.
1774 * main.c (define_makeflags): For flags with omitted optional args,
1775 store {"", 0} with ADD_FLAG. When constructing FLAGSTRING, a flag
1776 so stored cannot have more flags appended to the same word.
1778 Fri Jan 22 14:46:16 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1780 * variable.c (print_variable_set): In vars/bucket calculation,
1781 don't spuriously multiply by 100.
1785 * job.c [!HAVE_UNION_WAIT] (WTERMSIG, WCOREDUMP, WEXITSTATUS):
1786 Don't define if already defined.
1788 * remake.c (update_file): Don't keep track of the command_state before
1789 calling update_file_1. Remove local variable COMMANDS_FINISHED,
1790 and don't test it to decide to print the "is up to date" msg.
1791 Testing for files_remade having changed should always be sufficient.
1792 The old method lost when we are called in the goal chain run on a
1793 makefile, because the makefile's command_state is already
1794 `cs_finished' from the makefile chain run.
1796 * misc.c [HAVE_SETRE[GU]ID]: Test these to decl setre[gu]id.
1798 * configure.in: Rewrote wait checking.
1799 Use AC_HAVE_HEADERS to check for <sys/wait.h>.
1800 Use AC_HAVE_FUNCS to check for waitpid and wait3.
1801 Use a compile check to test just for `union wait'.
1802 * job.c: Rewrote conditionals accordingly.
1803 [HAVE_WAITPID]: Test this only to define WAIT_NOHANG.
1804 [HAVE_WAIT3]: Likewise.
1805 [HAVE_UNION_WAIT]: Test this to define WAIT_T and W*.
1807 * configure.in: Set CFLAGS and LDFLAGS before all checks.
1809 * dir.c: Add static forward decls of {open,read}_dirstream.
1811 Thu Jan 21 17:18:00 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1815 * job.c [NGROUPS_MAX && NGROUPS_MAX==0]: #undef NGROUPS_MAX.
1817 * compatMakefile (CFLAGS, LDFLAGS): Set to @CFLAGS@/@LDFLAGS@.
1818 * build.template (CFLAGS, LDFLAGS): Same here.
1819 * configure.in: AC_SUBST(CFLAGS) and LDFLAGS.
1820 Set them to -g if not defined in the environment.
1822 * remake.c (library_search): Use LIBNAME consistently, setting it
1823 only once, to be the passed name sans `-l'.
1824 Pass new var FILE to be modified by vpath_search.
1826 Mon Jan 18 14:53:54 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1830 * job.c (start_waiting_jobs): Return when job_slots_used is equal to
1833 * configure.in: Add AC_CONST for the sake of getopt.
1835 * read.c (read_makefile): Continue after parsing `override'
1836 directive, rather than falling through to lossage.
1837 Check for EOL or blank after "override define".
1839 * compatMakefile (.c.o, remote.o): Put $(CFLAGS) after other switches.
1841 Fri Jan 15 12:52:52 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1845 * main.c (define_makeflags): After writing everything into
1846 FLAGSTRING, only back up two chars if [-1] is a dash, meaning we
1847 just wrote " -". Always terminate the string at *P.
1849 * remake.c (library_search): When constructing names in std dirs,
1850 use &(*LIB)[2] for the stem, not LIBNAME (which points at the
1851 buffer we are writing into!).
1853 Thu Jan 14 13:50:06 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1855 * read.c (read_makefile): Set IN_IGNORED_DEFINE for "override
1856 define" when IGNORING is true.
1858 * compatMakefile (distclean): Remove config.status and build.sh.
1860 Wed Jan 13 16:01:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1864 * misc.c (xmalloc, xrealloc): Cast result of malloc/realloc to
1867 * arscan.c (ar_scan) [AIAMAG]: Cast read arg to (char *).
1869 * variable.c (define_automatic_variables): Override SHELL value for
1870 origin o_env_override as well as o_env.
1872 * GNUmakefile (build.sh.in): Don't replace %globobjs%. Instead,
1873 add the names of the glob objects (w/subdir) to %objs%.
1874 * build.template (globobjs): Removed.
1875 Take basename of $objs before linking.
1877 Tue Jan 12 12:31:06 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1881 * configure.in (AC_OUTPUT): Also edit build.sh.
1882 * build.template: New file.
1883 * GNUmakefile (build.sh.in): New rule to create it from build.template.
1884 (make-$(version).tar.Z): Depend on build.sh.in.
1886 * main.c (die): Call print_data_base if -p.
1887 (main): Don't call it here.
1889 * compatMakefile (defines): Add @DEFS@. configure should turn this
1890 into -DHAVE_CONFIG_H.
1892 Mon Jan 11 14:39:23 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1896 * misc.c (init_access): Surround with #ifdef GETLOADAVG_PRIVILEGED.
1897 ({make,user,child}_access) [! GETLOADAVG_PRIVILEGED]: Make no-op.
1898 * compatMakefile (install_setgid): New var, set by configure.
1899 (install): Install setgid $(group) only if $(install_setgid) is true.
1901 Fri Jan 8 15:31:55 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1903 * job.c (load_too_high): If getloadavg fails with errno==0, give a
1904 message saying that load limits are not supported.
1906 * vpath.c (construct_vpath_list): Rewrote path deletion code to
1907 not try to use PATH's next link after freeing PATH.
1909 * main.c (define_makeflags): Rewritten; now handles string-valued
1910 option, and has no arbitrary limits.
1911 (switches): Set `toenv' flag for -I and -v.
1913 * main.c (decode_env_switches): Cast return value of alloca to char *.
1915 * misc.c (child_access) [HAVE_SETREUID, HAVE_SETREGID]: Use
1916 setre[gu]id in place of set[gu]id.
1918 Wed Jan 6 15:06:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1920 * main.c (main): Define MAKEOVERRIDES, MAKE, and MAKE_COMMAND with
1923 * make.h [POSIX]: Don't test this to use ANSI_STRING.
1924 Testing STDC_HEADERS should be sufficient.
1926 * job.h: Declare start_waiting_jobs.
1928 * read.c (read_makefile): Add missing parens in if stmt that find
1929 conditional directives.
1931 * main.c (main): Declare init_dir.
1932 * implicit.c (pattern_search): Always use two % specs in a
1933 DEBUGP2, and always pass two non-nil args.
1934 Cast field width args to int.
1935 Add missing parens in !RULE->subdir if stmt.
1936 * function.c (expand_function, patsubst_expand): Add parens around
1937 assignments inside `while' stmts.
1938 * commands.c (print_commands): Cast field width args to int.
1940 * read.c (do_define): Cast return value of alloca to (char *).
1942 * main.c (init_switches): New function, broken out of decode_switches.
1943 (decode_switches): Take new arg ENV. If set, ignore non-option
1944 args; print no error msgs; ignore options with clear `env' flags.
1945 (decode_env_switches): Rewritten to chop envar value into words
1946 and pass them to decode_switches.
1947 (switches): Set `env' flag for -I and -v.
1949 * dir.c (init_dir): Cast free to __glob_closedir_hook's type.
1951 Tue Jan 5 14:52:15 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1955 * job.c [HAVE_SYS_WAIT || !USG]: Don't #include <sys/time.h> and
1956 <sys/resource.h>. <sys/time.h> interacts badly with <time.h>, and
1957 we don't need these anyway.
1959 * configure.in (AC_HAVE_FUNCS): Check for setre[gu]id.
1960 * misc.c ({user,make}_access): Test #ifndef HAVE_SETRE[GU]ID, not
1961 #ifdef POSIX || USG. SunOS 4.1 is supposedly POSIX.1 compliant,
1962 but its set[gu]id functions aren't; its setre[gu]id functions work.
1964 * misc.c ({user,make,child}_access): Give name of caller in error msgs.
1966 * job.c (load_too_high): Say "cannot enforce load limit" in error msg.
1968 * configure.in: Call AC_PROG_CC.
1969 * compatMakefile (CC): Define to @CC@ (autoconf magic).
1971 * compatMakefile: Add .NOEXPORT magic target.
1973 Mon Jan 4 17:00:03 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1975 * main.c (print_version): Updated copyright to include 93.
1977 Thu Dec 31 12:26:15 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1979 * make.h [_AIX]: Don't declare alloca.
1981 Tue Dec 29 13:45:13 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1985 * compatMakefile (objs): Add signame.o.
1986 (srcs): Add signame.[ch].
1988 * compatMakefile (srcs): Add config.h.in.
1989 (remote.o): Add -I. before -I$(srcdir).
1991 Mon Dec 28 15:51:26 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1995 * read.c (readline): Fatal when LEN==0, indicating a line starting
1997 (readline): Take new arg LINENO, for use in error msg.
1998 (read_makefile, do_define): Pass it.
2000 * compatMakefile (glob/libglob.a): Pass -DHAVE_CONFIG_H in CPPFLAGS.
2001 (.c.o): Add -I. before -I$(srcdir).
2003 Wed Dec 23 12:12:04 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2005 * read.c (read_makefile): Accept and ignore a rule with no targets.
2007 * compatMakefile (ALLOCA_SRC): New variable.
2008 (srcs): Include its value.
2010 * read.c (struct conditional): Renamed member `max_ignoring' to
2011 `allocated'; added new member `seen_else'.
2012 (conditional_line): Initialize seen_else flag when starting an `if...';
2013 set it when we see an `else'; fatal if set when we see `else'.
2014 (read_makefile): Fatal "missing `endif'" if there are any pending
2015 conditionals, not just if we are still ignoring.
2017 Tue Dec 22 15:36:28 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2019 * compatMakefile (manext): Set to 1, not l.
2020 ($(mandir)/$(instname).$(manext)): Use $(srcdir) for make.man in cmds.
2022 * file.c (file_hash_enter): Don't call uniquize_deps here.
2023 * read.c (record_files): Likewise.
2024 * implicit.c (pattern_search): Likewise.
2025 * commands.c (set_file_variables): Call it only here.
2027 * default.c (default_variables) [__convex__]: FC=fc.
2029 * variable.c (target_environment): Expand the values of recursively
2030 expanded variables when putting them into the environment.
2031 * expand.c (recursively_expand): Made global.
2032 * make.h (recursively_expand): Declare it.
2034 * remake.c (check_dep): Set FILE->command_state to cs_deps_running
2035 when a dep's command_state is cs_running or cs_deps_running.
2037 * read.c (read_makefile): Changed error msg for spurious cmds to
2038 not say "first target".
2040 Sun Dec 20 17:56:09 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2042 * configure.in: Do AC_CONFIG_HEADER right after AC_INIT.
2043 * make.h (HAVE_CONFIG_H): #include "config.h", then #define this.
2044 * compatMakefile (config.h, configure, config.h.in): New rules.
2045 (defines): Removed @DEFS@.
2047 Thu Dec 17 16:11:40 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2049 * compatMakefile (realclean): Just depend on distclean; no cmds.
2050 (distclean): Do what realclean did before; also remove Makefile and
2051 config.h; don't remove configure.
2052 (info, dvi): New targets; depend on make.{info,dvi}.
2053 (doc): Removed target.
2054 (MAKEINFO, TEXI2DVI): New vars.
2055 (make.info, make.dvi): Use them instead of explicit cmds.
2057 Wed Dec 16 16:25:24 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2059 * configure.in: Added fcntl.h to AC_HAVE_HEADERS. getloadavg cares.
2061 Wed Dec 9 15:21:01 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2063 * main.c (long_option_aliases): Add --new-file alias for -W.
2065 * default.c (default_variables): Change all C++ to CXX and C++FLAGS
2068 * read.c (do_define): Expand the variable name before using it.
2070 * main.c (main): Define variable "MAKE_COMMAND" to argv[0];
2071 define "MAKE=$(MAKE_COMMAND) $(MAKEOVERRIDES)" always.
2073 * remake.c (library_search): Search for libNAME.a in cwd; look in
2074 vpath before looking in standard dirs, not after.
2075 Changed order of std dirs to: /lib, /usr/lib, ${prefix}/lib.
2077 Mon Nov 23 14:57:34 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2079 * default.c (default_pattern_rules, default_terminal_rules): Added
2080 brackets around initializers.
2082 * variable.c (try_variable_definition): Don't check for LINE[0]=='\t'.
2083 (try_variable_definition): Expand the name before defining the var.
2085 * job.c (init_siglist): Removed function.
2086 Removed decl of `sys_siglist'.
2087 * make.h [! HAVE_SYS_SIGLIST]: #include "signame.h".
2088 [HAVE_SYS_SIGLIST && !SYS_SIGLIST_DECLARED]: Declare sys_siglist
2089 only under these conditions.
2090 * main.c (main): Don't declare init_siglist.
2091 (main) [! HAVE_SYS_SIGLIST]: Call signame_init instead of init_siglist.
2093 Wed Nov 18 14:52:51 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2095 * read.c (record_files): Don't try to append to FIRSTDEPS if it's
2096 nil; instead just set it to MOREDEPS.
2098 Mon Nov 16 17:49:17 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2100 * vpath.c (construct_vpath_list): Initialize P to DIRPATH before
2101 loop that sets MAXELEM.
2103 Fri Nov 13 18:23:18 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2107 Thu Nov 12 15:45:31 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2109 * job.c (start_job_command): Under -n, increment files_remade after
2110 processing (i.e., printing) all command lines.
2112 Tue Nov 10 15:33:53 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2114 * read.c (record_files): Append new deps if this rule has no
2115 commands; prepend them to existing deps if this rule has no commands.
2117 * dir.c (open_dirstream): Return nil if DIR->contents->files is nil.
2119 * read.c (parse_file_seq): Removed last arg STRIP. Always strip `./'s.
2120 (read_makefile): Changed callers.
2121 * function.c (string_glob): Likewise.
2122 * rule.c (install_pattern_rule): Likewise.
2124 Mon Nov 9 17:50:16 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2126 * remake.c (files_remade): Made global.
2127 (notice_finished_file): Don't increment files_remade here; this
2128 function gets called in many situations where no remaking was in
2130 * job.c (reap_children): Do it here instead, when we know that
2131 actual commands have been run for the file.
2132 * make.h (files_remade): Declare it.
2134 Thu Nov 5 18:26:10 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2136 * vpath.c (construct_vpath_list): Allow blanks as well as colons to
2137 separate elts in the search path.
2139 * read.c (read_makefile): Don't fatal on extra tokens in `vpath'.
2140 The search path can contain spaces now.
2142 Tue Nov 3 20:44:32 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2144 * compatMakefile (check): New target; no-op.
2146 * file.c (file_hash_enter): Mod OLDHASH by FILE_BUCKETS after
2147 testing for OLDHASH==0 but before using the value.
2148 (rename_file): Don't mod OLDHASH by FILE_BUCKETS before passing it
2151 * file.c (rename_file): Notice when OLDFILE->cmds came from
2152 default.c, and don't try to print ->filename in that case.
2154 Sun Oct 25 01:48:23 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2156 * remake.c (update_file): Don't process F->also_make here.
2157 (notice_finished_file): Don't process FILE->also_make if no attempt
2158 to update FILE was actually made.
2159 Fixed to call f_mtime directly to refresh their modtimes.
2161 Sat Oct 24 22:08:59 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2163 * read.c (find_percent): Don't increment P again after skipping
2166 * expand.c (variable_expand): In call to patsubst_expand, don't
2167 find `%'s ourselves; let that function do it.
2169 * read.c (read_makefile: record_waiting_files): Don't call
2170 record_files if FILENAMES is nil.
2171 (read_makefile): All alternatives in the parsing, except for rule
2172 lines, fall through to the end of the loop. At the end of the
2173 loop, do record_waiting_files so we notice later spurious cmds.
2175 Fri Oct 23 15:57:37 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2177 * variable.c (define_automatic_variables): Free old value of SHELL
2178 before replacing it.
2180 Thu Oct 15 18:57:56 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2182 * compatMakefile (.c.o): Add -I$(srcdir)/glob to flags.
2184 * dir.c (open_dirstream): Cast return value to __ptr_t.
2186 * default.c (default_variables: "GET") [_IBMR2]: Use USG defn.
2188 * make.h (MAXPATHLEN): Moved out of #ifndef POSIX.
2189 (GET_PATH_MAX): Moved from #ifdef POSIX to #ifdef PATH_MAX #else.
2190 Define as (get_path_max ()).
2191 [! PATH_MAX] (NEED_GET_PATH_MAX): Define.
2192 [! PATH_MAX] (get_path_max): Declare fn.
2193 * misc.c [NEED_GET_PATH_MAX] (get_path_max): New function.
2195 Mon Oct 12 13:34:45 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2199 * job.c (sys_siglist): Only declare #ifndef SYS_SIGLIST_DECLARED.
2200 * make.h [! HAVE_SYS_SIGLIST && HAVE__SYS_SIGLIST]: #define
2201 SYS_SIGLIST_DECLARED.
2203 * dir.c (file_impossible): When initializing DIR->contents, set
2204 DIR->contents->dirstream to nil.
2206 * compatMakefile (GLOB): Define new variable.
2207 (objs): Use it, rather than glob/libglob.a explicitly.
2209 * read.c (parse_file_seq): When stripping "./", handle cases like
2210 ".///foo" and "./////".
2211 * file.c (lookup_file, enter_file): Likewise.
2213 Sun Oct 11 17:00:35 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2215 * dir.c (struct dirstream, {open,read}_dirstream): New
2216 data type and functions to read a directory sequentially.
2217 (init_dir): New function to hook it into glob.
2218 * main.c (main): Call init_dir.
2220 * compatMakefile (objs): Added glob/libglob.a.
2221 * configure.in: Remove code to test for glob.
2223 Fri Oct 9 12:08:30 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2225 * read.c (record_files): Generalized test for NAME pointing
2226 somewhere into F->name.
2228 * variable.c (define_variable_in_set): Free old value when replacing.
2230 * read.c (do_define): Free the linebuffer before returning.
2231 (record_files): When clearing .SUFFIXES deps, free their data.
2232 (multi_glob): Free OLD and its data when replacing it with results
2235 * commands.c (set_file_variables): Use alloca in place of xmalloc
2236 for temp space for $^, $?, et al.
2238 * dir.c (struct directory): New member `contents' replaces `files'
2240 (struct directory_contents): New type.
2241 (directories_contents): New hash table.
2242 (dir_struct_file_exists_p): Take a struct directory_contents.
2243 (dir_file_exists_p): Pass it the `contents' member of the dir found.
2244 (dir_struct_file_exists_p): Renamed to dir_contents_file_exists_p;
2245 made static. Return 0 if DIR is nil (meaning it couldn't be stat'd).
2246 (dir_file_exists_p, find_directory): Change all callers.
2247 (file_impossible): Use DIR->contents, initializing it if nil.
2248 (print_dir_data_base): Use DIR->contents, and print out device and
2249 inode numbers with each directory.
2251 * Changes for performance win from John Gilmore <gnu@cygnus.com>:
2252 * dir.c (DIRECTORY_BUCKETS): Increase to 199.
2253 (DIRFILE_BUCKETS): Decrease to 107.
2254 (find_directory): Allocate and zero a multiple of
2255 sizeof (struct dirfile *), not of sizeof (struct dirfile).
2256 (dir_struct_file_exists_p): New function, nearly all code from
2258 (dir_file_exists_p): Just call find_directory+dir_struct_file_exists_p.
2259 * vpath.c (selective_vpath_search): Remove redundant
2260 dir_file_exists_p call.
2262 * configure.in: Comment out glob check; always use our code.
2264 Fri Oct 2 19:41:20 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2266 * make.h [! HAVE_SYS_SIGLIST && HAVE__SYS_SIGLIST]: #define
2267 HAVE_SYS_SIGLIST; after doing #define sys_siglist _sys_siglist, we
2270 Wed Sep 30 19:21:01 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2272 * main.c (main): Don't do -w automatically if -s.
2274 Tue Sep 29 21:07:55 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2276 * main.c (printed_version): Move variable inside print_version.
2277 (print_version): Return immediately if printed_version is set.
2278 (die): Don't test printed_version here.
2279 (decode_switches): Under -v, do print_version before giving usage.
2280 (DESCRIPTION_COLUMN): New macro.
2281 (decode_switches): Use it when printing the usage message.
2282 Leave at least two spaces between options and their descriptions.
2284 Fri Sep 25 13:12:42 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2288 Wed Sep 16 16:15:22 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2290 * read.c (read_makefile): Save errno value from trying to open
2291 FILENAME, and restore it before erring; otherwise we get the errno
2292 value from the last elt of the search path.
2294 Tue Sep 15 15:12:47 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2296 * main.c (long_option_aliases): Add --stop for -S.
2298 * read.c (word1eq): Do strncmp before dereferencing someplace that
2299 may be out in space.
2301 Wed Sep 9 15:50:41 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2303 * remake.c (notice_finished_file): If all the command lines were
2304 recursive, don't do the touching.
2306 * job.c (start_job_command): Don't check for + here.
2307 * commands.c (chop_commands): Do it here instead.
2309 * default.c (default_terminal_rules): Prepend + to cmds for RCS.
2311 Wed Sep 2 17:53:08 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2313 * compatMakefile (objs): Include $(ALLOCA).
2315 * make.h [CRAY]: Move #define signal bsdsignal to before #includes.
2317 Thu Aug 27 17:45:43 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
2319 * read.c (default_include_directories): Add INCLUDEDIR first.
2320 * compatMakefile (includedir): Define.
2321 (defines): Add -D for INCLUDEDIR="$(includedir)".
2323 * read.c (read_makefile): Grok multiple files in `include';
2326 * remake.c (library_search): New function.
2327 (library_file_mtime): Remove function.
2328 (f_mtime): Use library_search instead of library_file_mtime.
2329 * compatMakefile (libdir): Define.
2330 (defines): Add -D for LIBDIR="$(libdir)".
2331 * make.texinfo (Libraries/Search): Document change.
2333 * file.c (rename_file): Fix file_hash_enter call with missing arg.
2335 Wed Aug 26 17:10:46 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2339 * main.c (main): Set command_state to cs_finished for temp files
2340 made for stdin makefiles.
2342 * main.c (decode_switches): Don't tell getopt to return non-option
2344 Ignore an argument of `-'.
2346 Thu Aug 20 13:36:04 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2348 * job.c (start_job_command): If (touch_flag && !RECURSIVE), ignore
2349 the command line and go to the next.
2350 (notice_finished_file): Under -t, touch FILE.
2351 * remake.c (remake_file): Don't touch it here.
2353 Wed Aug 19 16:06:09 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2355 * function.c (pattern_matches): Use temporary for strlen (WORD)
2356 instead of two function calls.
2358 * compatMakefile (LOAD_AVG): Remove variable and comments.
2360 Tue Aug 18 14:58:58 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2362 * make.texinfo (Running): Node renamed to `make Invocation'.
2364 Fri Aug 14 12:27:10 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2366 * arscan.c (ar_name_equal): Don't compare [MAX-3..MAX] if
2369 Thu Aug 13 17:50:09 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2373 * main.c: Don't #include <time.h>; make.h already does.
2375 Mon Aug 10 17:03:01 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2377 * implicit.c (pattern_search): Fixed copying of suffix when building
2380 * function.c (expand_function: `shell'): Make sure BUFFER is
2381 null-terminated before replacing newlines.
2383 * compatMakefile (mandir): Use man$(manext), not always manl.
2385 Sun Aug 2 01:42:50 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2387 * rule.c (new_pattern_rule): Not static.
2388 * rule.h: Declare it.
2390 * file.c (file_hash_enter): New function, most code from rename_file.
2391 (rename_file): Call it.
2392 * file.h (file_hash_enter): Declare it.
2396 Thu Jul 30 15:40:48 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2398 * main.c (decode_switches): Handle usage_and_exit when building
2399 long options vector.
2401 * default.c (default_terminal_rules): Make RCS rules use $(CHECKOUT,v).
2402 (default_variables): Define CHECKOUT,v (hairy).
2404 * make.h [!HAVE_SYS_SIGLIST && HAVE__SYS_SIGLIST]: #define
2405 sys_siglist to _sys_siglist.
2407 Sun Jul 26 16:56:32 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2409 * NEWS: Add header and tail copyright info like Emacs NEWS.
2411 * make.h [ANSI_STRING]: Don't #define index, rindex, bcmp, bzero,
2412 bcopy if already #define'd.
2413 [STDC_HEADERS] (qsort, abort, exit): Declare here.
2414 [! __GNU_LIBRARY__ && !POSIX]: Not here.
2416 * make.h [_AIX]: #pragma alloca first thing.
2418 * job.c (start_waiting_job): Set the command_state to cs_running
2419 when we queue a job on waiting_jobs.
2421 Fri Jul 24 02:16:28 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2423 * variable.c (define_automatic_variables): Use "" instead of nil
2426 Thu Jul 23 22:31:18 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2430 * main.c (struct command_switch.type): Add alternative usage_and_exit.
2431 (command_switches): Add -h/--help.
2433 Thu Jul 16 14:27:50 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2435 * GNUmakefile (make-$(version).tar.Z): Include NEWS, not CHANGES.
2436 * README.template: Mention NEWS.
2437 * CHANGES: Renamed to NEWS.
2439 * main.c [! STDC_HEADERS] [sun]: Don't declare exit.
2441 Tue Jul 14 18:48:41 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2443 * main.c (main): Set -o files' command_states to cs_finished.
2445 * rule.c (count_implicit_rule_limits): Decrement num_pattern_rules
2446 when tossing a rule.
2448 * main.c (main): Use alloca only in simple local var assignment,
2449 for braindead SGI compiler.
2451 * rule.c (print_rule_data_base): Barf if num_pattern_rules is
2452 inconsistent with the number computed when listing them.
2454 Mon Jul 13 17:51:53 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2456 * commands.c (set_file_variables): For $? and $^ elts that are archive
2457 member refs, use member name only.
2459 Fri Jul 10 00:05:04 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2461 * variable.h (struct variable.export): Add new alternative v_ifset.
2462 * variable.c (target_environment): Check for it.
2463 (define_automatic_variables): Set it for MAKEFILES.
2465 Thu Jul 9 21:24:28 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2467 * compatMakefile (objs): Remove getloadavg.o; $(extras) gets it.
2468 (remote.o): Use $(srcdir)/remote.c, not $remote.c<.
2469 (distclean, mostlyclean): New targets.
2471 Tue Jul 7 19:12:49 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2475 * compatMakefile (config.status): Remove rule.
2477 * job.c (start_waiting_job): Free C after using C->file, not before.
2479 Sat Jul 4 20:51:49 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2481 * commands.c, job.c, main.c, make.h, remote-cstms.c: Use #ifdef
2482 HAVE_* instead of #ifndef *_MISSING.
2483 * configure.in: Use AC_HAVE_FUNCS instead of AC_MISSING_FUNCS (gone).
2485 Thu Jul 2 18:47:52 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2487 * main.c (main): makelevel>0 or -C implies -w.
2489 Tue Jun 30 20:50:17 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2491 * file.c, job.c, function.c: Don't #include <errno.h>.
2492 make.h: Do it here instead.
2493 * arscan.c (ar_member_touch): Don't declare errno.
2495 Thu Jun 25 17:06:55 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2497 * GNUmakefile (make-$(version).tar.Z): Depend on INSTALL, configure.in.
2499 * remake.c (update_file): If commands or deps are running after
2500 update_file_1 returns, break out of the :: rule (->prev) loop and
2503 * job.c (job_next_command): New function; code from start_job.
2504 (start_job_command): Renamed from start_job. Call job_next_command
2505 and recurse for empty command lines and -n.
2506 (start_waiting_job): Call start_job_command, not start_job.
2507 (new_job): Call job_next_command to prime the child structure, and
2508 then call start_waiting_job.
2509 (reap_children): Use job_next_command and start_job_command.
2510 (start_waiting_job): Call start_remote_job_p here, and store its
2511 result in C->remote. If zero, check the load average and
2512 maybe put C on waiting_jobs.
2513 (start_job_command): Test CHILD->remote rather than calling
2514 start_remote_job_p. Don't do load avg checking at all here.
2516 * main.c (main): Don't handle SIGILL, SIGIOT, SIGEMT, SIGBUS,
2517 SIGSEGV, SIGFPE or SIGTRAP.
2519 * compatMakefile (glob/libglob.a): Don't pass srcdir to sub-make.
2520 configure will set it in glob/Makefile.
2522 Wed Jun 24 19:40:34 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2524 * dir.c [DIRENT] (direct): Don't define to dirent.
2525 [! DIRENT] (direct): Define to dirent.
2526 (dir_file_exists_p): Use struct dirent instead of struct direct.
2528 * make.h (getcwd): No space between macro and ( for args!
2530 * job.c (start_job): Don't put the job on waiting_jobs if
2533 * make.texinfo (Missing): Shortened title.
2535 Tue Jun 23 18:42:21 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2537 * file.c (remove_intermediates): Print "rm" commands under -n.
2539 Mon Jun 22 16:20:02 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2543 Fri Jun 19 16:20:26 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2545 * arscan.c [M_UNIX]: #undef M_XENIX.
2547 Wed Jun 17 17:59:28 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2549 * default.c (default_terminal_rules): Put @ prefix on RCS cmds.
2551 Tue Jun 16 19:24:17 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2553 * compatMakefile (getloadavg.o): Removed special rule.
2554 (CFLAGS): Don't include $(defines).
2555 (.c.o): Define suffix rule.
2556 (glob/libglob.a): Pass CPPFLAGS=$(defines) to submake.
2557 (GETOPT_SRC, srcs, tagsrcs): Prefix files with $(srcdir)/.
2559 * arscan.c (ar_name_equal): Moved local vars inside #if'd block.
2561 * make.h (max): Removed.
2562 * expand.c (variable_buffer_output): Don't use it.
2564 * compatMakefile (INSTALL): Define.
2565 (Makefile): New rule to make from Makefile.in.
2568 (getloadavg.o, remote.o): Use autoconf $foo< hack.
2570 * commands.c (fatal_error_signal): Removed return.
2572 Mon Jun 15 17:42:51 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2576 * make.texinfo (Summary): New node.
2577 (Special Targets): Mention .EXPORT_ALL_VARIABLES here.
2579 * variable.c (max): Moved to make.h.
2581 * compatMakefile (objs, srcs): Added ar & arscan.
2583 * job.c (start_waiting_job): New function, 2nd half of new_job.
2585 (start_waiting_jobs): New function.
2586 * remake.c (update_goal_chain): Call start_waiting_jobs at the top
2588 * compatMakefile (objs, srcs): Removed load, added getloadavg.
2590 Fri Jun 12 19:33:16 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2592 * job.c (load_too_high): New function. Uses getloadavg.
2593 (waiting_jobs): New variable.
2594 (start_job): Don't call wait_to_start_job. Instead, if
2595 load_too_high returns nonzero, add the child to the
2596 `waiting_jobs' chain and return without starting the job.
2598 Thu Jun 11 00:05:28 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2600 * expand.c (variable_buffer_output): Made global again.
2601 * variable.h: And declare it.
2603 * arscan.c (PORTAR): Define for all systems if PORT5AR is not defined.
2604 (AR_NAMELEN, AR_TRAILING_SLASH): Removed.
2605 (ar_scan): Don't use it. Don't #ifdef AR_TRAILING_SLASH; just look
2606 for a slash in the archive at run time.
2607 (ar_name_equal): Rewrote .o hacking to not use AR_NAMELEN, and to
2608 cope with trailing-slash and non-trailing-slash archives.
2610 * main.c (main) [! SETVBUF_REVERSED]: Test this instead of USGr3 et al.
2611 [SETVBUF_REVERSED]: Always allocate a buffer ourselves.
2613 * load.c (load_average) [sgi]: Use sysmp call.
2615 * compatMakefile (INSTALL_DATA, INSTALL_PROGRAM): Define.
2616 ($(bindir)/$(instname), $(mandir)/make.$(manext)): Use them.
2618 * make.h [HAVE_VFORK_H]: #include <vfork.h>.
2619 (vfork, VFORK_NAME): Don't define.
2620 * job.c (start_job): Use "vfork" in place of VFORK_NAME.
2622 * make.h [HAVE_LIMITS_H, HAVE_SYS_PARAM_H]: If #define'd, #include
2623 the each file. Rearranged PATH_MAX hacking.
2624 * job.c: Rearranged NGROUPS_MAX hacking.
2626 * remake.c (fstat, time): Don't declare.
2628 * compatMakefile (defines): Value is @DEFS@.
2629 (LOADLIBES): Value is @LIBS@.
2630 (extras): Value is @LIBOBJS@.
2631 (ARCHIVES, ARCHIVES_SRC, ALLOCASRC): Removed.
2632 * arscan.c, ar.c: Surround body with #ifndef NO_ARCHIVES.
2634 * misc.c [! HAVE_UNISTD_H]: Test instead of !POSIX to decl get*id.
2636 * make.h [GETCWD_MISSING]: Test instead of !USG && !POSIX et al.
2637 (getcwd): Just declare if present. If not, declare as a macro
2638 using getwd, and declare getwd.
2639 [PATH_MAX] (GET_PATH_MAX): #define to PATH_MAX.
2640 * main.c (main, log_working_directory): Use getcwd instead of getwd.
2642 * main.c (main) [SETLINEBUF_MISSING]: Test this instead of USG.
2644 * make.h (SIGHANDLER, SIGNAL): Removed.
2645 (RETSIGTYPE): Define if not #define'd.
2646 * main.c (main): Use signal in place of SIGNAL.
2648 * main.c [SYS_SIGLIST_MISSING]: Test instead of USG.
2650 * job.c (search_path) [GETGROUPS_MISSING]: Test instead of USG.
2651 [HAVE_UNISTD_H]: Test instead of POSIX to not decl getgroups.
2653 * main.c [! HAVE_UNISTD_H]: Test instead of !POSIX to decl chdir.
2654 [! STDC_HEADERS]: Test instead of !POSIX to decl exit & atof.
2656 * job.c (child_handler), commands.c (fatal_error_signal): Return
2657 RETSIGTYPE instead of int.
2658 * main.c (main): Declare fatal_error_signal and child_handler here
2659 to return RETSIGTYPE; removed top-level decl of former.
2661 * commands.c (fatal_error_signal), job.c (unblock_sigs, start_job),
2662 main.c [SIGSETMASK_MISSING]: Test this instead of USG.
2664 Wed Jun 10 22:06:13 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2666 * job.c [HAVE_WAITPID]: Test this instead of USG.
2667 [! HAVE_UNISTD_H]: Test this instead of !POSIX to declare misc fns.
2668 (GID_T): Don't #define.
2669 (search_path): Use gid_t instead of GID_T.
2670 [GETDTABLESIZE_MISSING, SYS_SIGLIST_MISSING, DUP2_MISSING]: Test
2671 these individually instead of USG for all.
2672 * make.h (ctime): Don't declare. #include time.h instead.
2673 [HAVE_UNISTD_H]: #include <unistd.h> and #define POSIX #ifdef
2675 * dir.c [__GNU_LIBRARY__] (D_NAMLEN): Define to use d_namlen member.
2676 * make.h [NEED_MEMORY_H]: Only include memory.h #ifdef this.
2678 * arscan.c: Removed #ifdef mess about string.h et al.
2679 Just #include make.h instead.
2680 * make.h (fstat, atol): Declare.
2682 * commands.c (fatal_error_signal): Don't use sigmask to check for
2683 propagated signals; use ||s instead.
2684 (PROPAGATED_SIGNAL_MASK): Removed.
2685 (fatal_error_signal) [POSIX]: Use sigprocmask in place of sigsetmask.
2687 * variable.c (variable_buffer, variable_buffer_length,
2688 initialize_variable_output, variable_output): Moved to expand.c;
2690 (struct output_state, save_variable_output,
2691 restore_variable_output): Removed.
2692 * expand.c (initialize_variable_output): Put a NUL at the beginning
2693 of the new buffer after allocating it.
2694 (allocated_variable_expand_for_file): Don't use
2695 {save,restore}_variable_output. Do it by hand instead, keeping
2696 state on the stack instead of malloc'ing it.
2697 (allocated_variable_expand): Removed.
2698 * variable.h (allocated_variable_expand): Define here as macro.
2699 (variable_buffer_output, initialize_variable_output,
2700 save_variable_output, restore_variable_output): Removed decls.
2702 * read.c (conditional_line): For an if cmd, if any elt of the
2703 conditionals stack is ignoring, just push a new level that ignores
2704 and return 1; don't evaluate the condition.
2706 Thu Jun 4 21:01:20 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2708 * main.c (main): Put #ifdef's around frobbing SIGSYS and SIGBUS.
2710 * job.c (getdtablesize): Don't declare or #define if already #define'd.
2712 Wed Jun 3 23:42:36 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2714 * file.c (snap_deps): If `.EXPORT_ALL_VARIABLES' is a target, set
2715 export_all_variables.
2716 * make.texinfo (Variables/Recursion): Document .EXPORT_ALL_VARIABLES.
2718 Tue Jun 2 21:08:35 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2722 * commands.c (set_file_variables): Calculate length for ^D and ?D
2723 individually, making sure to give them at least enough space for "./".
2725 * make.h [CRAY]: #define signal to bsdsignal.
2727 * default.c (default_variables) [CRAY]: Define PC, SEGLDR,
2728 CF77PPFLAGS, CF77PP, CFT, CF, and FC.
2730 * arscan.c (AR_HDR_SIZE): Define to sizeof (struct ar_hdr), if it
2731 wasn't defined by <ar.h>.
2733 Thu May 28 00:56:53 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2737 Tue May 26 01:26:30 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2739 * rule.c (new_pattern_rule): Initialize LASTRULE to nil, not
2742 Mon May 25 19:02:15 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2744 * main.c (decode_switches): Initialize all the long_option elt members.
2746 Thu May 21 16:34:24 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
2748 * make.texinfo (Text Functions): Correct filter-out description.
2750 Tue May 19 20:50:01 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2752 * compatMakefile (realclean): Don't remove backup files.
2754 * main.c (decode_switches): Allocate ARGC+1 elts in `other_args'.
2756 Sun May 17 16:38:48 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2760 Thu May 14 16:42:33 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2762 * job.c (reap_children): Don't die if wait returns EINTR.
2764 Wed May 13 18:28:25 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2766 * job.c (reap_children): Always run the next command for a
2767 successful target. If we are going to die, we don't want to leave
2768 the target partially made.
2770 Tue May 12 00:39:19 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2772 * job.c (construct_command_argv_internal): After loop, if we only
2773 have one word, check it for being a shell command.
2775 * main.c (decode_switches): Allocate ARGC slots in other_args to
2776 begin with, so we never need to worry about growing it.
2777 If we get a non-option arg and POSIXLY_CORRECT is in the
2778 environment, break out of the loop. After the loop, add all remaining
2779 args to other_args list.
2781 * main.c (decode_switches): For positive_int and floating switches
2782 when optarg is nil, use next arg if it looks right (start with a
2783 digit, or maybe decimal point for floating).
2785 * variable.c (define_automatic_variables): Always set SHELL to
2786 default if it comes from the environment. Set its export bit.
2787 * make.texinfo (Environment): Document change.
2789 Mon May 11 00:32:46 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2793 * compatMakefile (tags, TAGS): Use vars for cmds.
2794 (ETAGS, CTAGS): Define.
2796 * main.c (decode_switches): If a switches elt has a nil long_name,
2797 make the long option name elt be "".
2798 Fixed loop to not ignore all the options.
2800 * make.texinfo (Option Summary): Added long options.
2802 * main.c (switches): Changed -m's description to "-b".
2803 (decode_switches): When printing the usage message, don't print
2804 switches whose descriptions start with -.
2805 When constructing the list of names for switch -C, search the
2806 switches vector for switches whose descriptions are "-C".
2808 * main.c (switches): Call -S --no-keep-going, not --dont-keep-going.
2809 Call -I --include-dir, not --include-path.
2810 (long_option_aliases): Added --new == -W, --assume-new == -W,
2811 --assume-old == -o, --max-load == -l, --dry-run == -n, --recon == -n,
2814 * main.c (switches): Removed bogus "silent" elt.
2815 (long_option_aliases): Define new var.
2816 (decode_switches): Add long_option_aliases onto the end of the long
2817 options vector created for getopt_long.
2818 Look through long_option_aliases for extra names to list
2821 Sat May 9 00:21:05 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2823 * main.c (log_working_directory): Fixed to properly not print the
2824 leaving message when we haven't printed the entering message.
2826 Fri May 8 21:55:35 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2828 * main.c (struct command_switch): Added elts `long_name',
2829 `description', and `argdesc'.
2830 (switches): Added initializers for new members.
2831 (decode_switches): Rewritten to use getopt_long.
2832 * compatMakefile (GETOPT, GETOPT_SRC): Define.
2833 (objs, srcs): Include them.
2835 * job.c (child_died): Renamed to dead_children; made static.
2836 (child_handler): Increment dead_children instead of setting child_died.
2837 (reap_children): Decrement dead_children instead of clearing
2838 child_died. The point of all this is to avoid printing "waiting
2839 for unfinished jobs" when we don't actually need to block.
2840 This happened when multiple SIGCHLDs before reap_children was called.
2842 * job.c (reap_children): If ERR is set, so we don't call start_job
2843 on the child being reaped, instead set its command_state to
2845 (reap_children, child_handler, new_job): I added several
2846 debugging printf's while fixing this. I left them in if (debug_flag)
2847 because they may be useful for debugging this stuff again.
2849 Wed May 6 22:02:37 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2851 * read.c (read_makefile): v_export is not 1.
2853 Mon May 4 17:27:37 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2857 * variable.c (export_all_variables): New variable.
2858 (target_environment): Export variables whose `export' member is
2859 v_default if export_all_variables is set and their names are benign.
2860 * variable.h: Declare export_all_variables.
2861 * read.c (read_makefile): If export or unexport is given with no
2862 args, set or clear export_all_variables, respectively.
2864 * variable.c (target_environment): Exclude MAKELEVEL in the loop,
2865 so it isn't duplicated when we add it at the end.
2867 Sun May 3 17:44:48 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2871 * variable.h (struct variable): Added new member `export'.
2872 * variable.c (define_variable_in_set): Initialize it to v_default.
2873 (target_environment): Don't check for .NOEXPORT.
2874 Export variables whose `export' member is v_default and that would
2875 have been exported under .NOEXPORT, and variables whose `export'
2877 (try_variable_definition): Return the variable defined.
2878 * variable.h (try_variable_definition): Changed decl.
2879 * read.c (read_makefile): Recognize `export' and `unexport' directives.
2881 Fri May 1 11:39:38 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2883 * main.c (main) [POSIX]: Reversed args to sigaddset.
2885 Thu Apr 30 17:33:32 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2887 * job.c [POSIX || !USG] (unblock_sigs): New fn.
2888 (start_job): Block signals before forking.
2889 (new_job): Unblock signals after putting the new child on the chain.
2890 * main.c (main) [POSIX]: Use sigset_t fatal_signal_set instead of
2891 int fatal_signal_mask.
2893 * load.c [sgi] (LDAV_CVT): Define.
2895 Wed Apr 29 17:15:59 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2899 * load.c (load_average) [sgi]: Clear the high bit of the address
2900 from the symbol table before looking it up in kmem.
2902 * misc.c (fatal, makefile_fatal): Put *** in fatal error messages.
2903 (remake_file): No longer needed in message here.
2905 * main.c (die): Call reap_children with BLOCK==1.
2907 Tue Apr 28 20:44:35 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2909 * rule.c (freerule): Don't set LASTRULE->next if LASTRULE is nil.
2911 Sun Apr 26 15:09:51 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2913 * rule.c (count_implicit_rule_limits): Initialize LASTRULE to nil,
2914 not to head of chain. Extract next ptr before we might do
2915 freerule, and use that for next iteration.
2916 (freerule): Still do next ptr frobbing if LASTRULE is nil.
2918 Tue Apr 21 03:16:29 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2920 * job.c (child_error): Removed extra %s from error msg format.
2924 * job.c (reap_children): Don't start later commands in a sequence
2927 * job.c (new_job): Always call reap_children with BLOCK==0 first thing.
2929 * job.c (reap_children): New function; work that used to be done in
2931 (child_died): New global var.
2932 (child_handler): Now just sets child_died.
2933 (wait_for_children): Removed.
2934 (unknown_children_possible, block_signals, unblock_signals,
2935 push_signals_blocked_p, pop_signals_blocked_p): Removed.
2936 (child_execute_job): Removed call to unblock_signals.
2937 (new_job): Removed calls to push_signals_blocked_p and
2938 pop_signals_blocked_p.
2939 * job.h: Declare reap_children, not wait_for_children.
2940 * commands.c (fatal_error_signal), job.c (new_job),
2941 load.c [LDAV_BASED] (wait_to_start_job), main.c (die),
2942 remake.c (update_goal_chain), function.c (expand_function: `shell'):
2943 Changed wait_for_children calls to reap_children.
2944 Some needed to be loops to wait for all children to die.
2945 * commands.c (fatal_error_signal), main.c (main,
2946 log_working_directory), function.c (expand_function): Removed calls
2947 to push_signals_blocked_p and pop_signals_blocked_p.
2948 * job.h: Removed decls.
2950 * job.h: Added copyright notice.
2952 Wed Apr 15 02:02:40 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2954 * job.c (child_error): No *** for ignored error.
2956 Tue Apr 14 18:31:21 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2958 * implicit.c (DEBUGP2): Use do ... while (0) instead of if ... else to
2959 avoid compiler warnings.
2961 * read.c (parse_file_seq): Don't remove ./ when it is followed by a
2964 Mon Apr 13 21:56:15 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2966 * make.h (DEBUGPR): Use do ... while (0) instead of if ... else to
2967 avoid compiler warnings.
2969 * remake.c (notice_finished_file): Run file_mtime on the also_make
2970 files, so vpath_search can happen.
2972 * GNUmakefile (tests): Use perl test suite from csa@sw.stratus.com.
2973 (alpha-files): Include test suite tar file.
2975 Fri Apr 3 00:50:13 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2979 Wed Apr 1 05:31:18 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2981 * remake.c (update_file, update_file_1): Do check_renamed on elts
2982 of dep chains when traversing them. Something unrelated might have
2983 renamed one of the files the dep chain points to.
2985 * file.c (rename_file): If FILE has been renamed, follow its
2986 `renamed' ptr, so we get to the final real FILE. Using the renamed
2987 ones loses because they are not in the hash table, so the removal
2988 code loops infinitely.
2990 * read.c (read_all_makefiles): Clobber null terminator into
2991 MAKEFILES expansion, so string passed to read_makefile is properly
2994 Mon Mar 30 20:18:02 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2996 * commands.c (set_file_variables): $* for archive member with
2997 explicit cmds is stem of member, not of whole `lib(member)'.
2999 Thu Mar 26 15:24:38 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3003 Tue Mar 24 05:20:51 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3005 * rule.c (new_pattern_rule): Rules are identical only if all their
3006 targets match (regardless of order).
3008 Wed Mar 11 13:49:54 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3010 * remake.c (remake_file): Changed error "no way to make" to "no
3011 rule to make". Fiat Hugh.
3013 * make.texinfo (Last Resort): Describe %:: rules and new .DEFAULT
3016 * remake.c (update_file_1): Only use .DEFAULT cmds if FILE is not a
3019 Tue Mar 10 18:13:13 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3021 * remote-stub.c, remote-cstms.c (start_remote_job): Take new arg,
3022 environment to pass to child.
3023 * job.c (start_job): Pass it.
3025 Mon Mar 9 19:00:11 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3027 * file.c (enter_file): Also strip ./s here, to get command-line
3030 * remote-cstms.c: Add comment telling people to leave me alone.
3032 * compatMakefile (manpage install): Remove target before copying.
3034 Tue Mar 3 18:43:21 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3036 * make.texinfo (Missing): Renamed to "Incompatibilities and ...".
3037 Added paragraph describing $? incompatibility with Unix and POSIX.2.
3039 Sun Mar 1 15:50:54 1992 Roland McGrath (roland@nutrimat.gnu.ai.mit.edu)
3041 * function.c (expand_function: `shell'): Don't declare fork or pipe.
3042 Use vfork instead of fork.
3044 Tue Feb 25 22:05:32 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3046 * make.texinfo (Chained Rules): Clarify .PRECIOUS to save
3049 * load.c [sun] (LDAV_CVT): Define to divide by FSCALE.
3051 Sun Feb 16 02:05:16 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3055 Sat Feb 15 17:12:20 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3057 * compatMakefile (makeinfo): Use emacs batch-texinfo-format fn.
3059 Fri Feb 14 00:11:55 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3061 * read.c (read_makefile): Correctly handle define & endef in ifdefs.
3063 * read.c (record_files): Pass arg for %s in error msg.
3065 * main.c (main) [__IBMR2, POSIX]: Use correct (a la USGr3) setvbuf
3068 Wed Feb 12 12:07:39 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3070 * make.texinfo (Libraries/Search): Say it does /usr/local/lib too.
3072 Sun Feb 9 23:06:24 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3074 * read.c (read_makefile): Check for extraneous `endef' when ignoring.
3076 Thu Feb 6 16:15:48 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3080 Tue Feb 4 20:04:46 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3082 * job.c (construct_command_argv_internal): Correctly ignore
3083 whitespace after backslash-NL.
3085 Fri Jan 31 18:30:05 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3087 * compatMakefile: Ignore errors from chgrp and chmod when installing.
3089 Wed Jan 29 18:13:30 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3091 * main.c (main): When setting MAKELEVEL in the env to re-exec,
3092 allocate space so as not to clobber past the end of the old string.
3094 * make.h [HAVE_ALLOCA_H]: Include <alloca.h>
3095 * compatMakefile (defines): Document HAVE_ALLOCA_H.
3097 Mon Jan 20 13:40:05 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3099 * make.h [VFORK_MISSING]: Use fork instead.
3100 * compatMakefile (defines): Document same.
3102 * job.c (construct_command_argv_internal): Don't create an empty
3103 arg if backslash-NL is at beginning of word.
3105 Sun Jan 19 16:26:53 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3107 * main.c [DGUX]: Call setvbuf as for USGr3.
3109 * job.c (construct_command_argv_internal): Notice correctly that
3110 backslash-NL is the end of the arg (because it is replaced with a
3113 Thu Jan 16 18:42:38 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3115 * job.c (construct_command_argv_internal): If SHELL is nil, set it
3116 to default_shell before proceeding.
3118 * make.h [sgi]: No alloca.h, after all.
3120 Wed Jan 15 12:30:04 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3122 * read.c (multi_glob): Cons up the chain of the results of glob
3123 from back to front, so it comes out in forward order.
3125 * job.c (construct_command_argv_internal): Don't eat char following
3128 Mon Jan 13 19:16:56 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3132 * default.c (default_variables) [ultrix]: GET=get, like USG.
3134 * job.c (construct_command_argv_internal): Remove tabs following
3135 backslash-NL combos in the input line, so they don't show up when
3136 that line is printed.
3138 * read.c (read_makefile): Don't collapse_continuations the line on
3139 input; do it on the copy we do remove_comments on.
3140 For rule lines, collapse_continuations the line after chopping
3141 ";cmds" off the end, so we don't eat conts in the cmds.
3142 Give error for ";cmds" with no rule.
3143 * job.c (construct_command_argv_internal): Eat backslash-NL combos
3144 when constructing the line to recurse on for slow, too.
3146 Sat Jan 11 02:20:27 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3148 * file.c (enter_file): Don't strip leading `./'s.
3149 * read.c (parse_file_seq): Take new arg STRIP; if nonzero, do it here.
3150 * default.c (set_default_suffixes), function.c (string_glob),
3151 read.c (read_makefile), rule.c (install_pattern_rule): Change callers.
3153 * default.c (default_variables) [_IBMR2]: FC=xlf
3155 * job.c (construct_command_argv_internal): Turn backslash-NL and
3156 following whitespace into a single space, rather than just eating
3159 * make.texinfo (Copying): @include gpl.texinfo, rather than
3160 duplicating its contents.
3162 Fri Nov 8 20:06:03 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3164 * job.c (construct_command_argv_internal): Make sure not to bother
3165 processing an empty line.
3169 * job.c (construct_command_argv_internal): Always recurse for slow;
3170 simple case didn't handle finding newlines.
3172 Tue Nov 5 18:51:10 1991 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3174 * job.c (construct_command_argv_internal): Set RESTP properly when
3175 slow; don't \ify past a newline.
3177 Fri Nov 1 19:34:28 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3179 * make.h [sgi]: #include <alloca.h>.
3181 Tue Oct 29 20:57:36 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3185 * remake.c (update_file_1): Check for deps still running before
3186 giving up if any dep has failed.
3188 Sat Oct 26 16:20:00 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3190 * make.h [uts]: #undef S_ISREG and S_ISDIR if defined.
3192 Fri Oct 25 19:50:39 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3196 Thu Oct 24 16:58:36 1991 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3198 * job.c (start_job): Don't check for empty cmds before tweaking the
3199 command_ptr. Just let construct_command_argv do it.
3201 Tue Oct 22 20:21:03 1991 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3203 * remake.c, arscan.c [POSIX]: <fcntl.h> instead of <sys/file.h>.
3205 * make.h [POSIX]: Declare vfork as pid_t.
3207 Mon Oct 21 15:37:30 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3211 * job.c (construct_command_argv, construct_command_argv_internal):
3212 Take new 2nd arg RESTP. If non-NULL, stop parsing at newline, and
3213 store addr of the NL in *RESTP.
3214 (start_job): Don't chop expanded cmd lines up; use above code to do it.
3215 * function.c (expand_function: `shell'): Pass RESTP==NULL.
3217 Sat Oct 19 15:36:34 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3221 Fri Oct 18 15:26:55 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3223 * job.c (start_job): If on the same cmds->command_lines elt, look
3224 at cmds->lines_recurse[CHILD->command_line - 1] instead of
3225 [CHILD->command_line].
3227 * dir.c [sgi]: <sys/dir.h>, not ndir or anything else.
3229 Thu Oct 17 16:28:55 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3231 * file.c (print_file_data_base): Remove unused var.
3233 * make.h [NeXT]: No #define ANSI_STRING.
3235 Tue Oct 15 20:08:41 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3239 Fri Oct 11 16:23:52 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3241 * make.h: Use PATH_MAX for getwd defn.
3243 * make.h: Move getcwd/getwd outside of #ifndef POSIX, and make it
3246 Thu Oct 10 11:53:31 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3250 * read.c (read_all_makefiles): When processing MAKEFILES, save the
3251 malloc'd ptr to be freed, instead of freeing part-way thru it.
3253 * remake.c (update_file_1): Don't tweak FILE->also_make.
3254 (update_file): Do it here. After calling update_file_1, set the
3255 command_state, update_status, and updated members of each also_make
3256 elt to FILE's values.
3258 Tue Oct 8 14:56:04 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3262 * remake.c (notice_finished_file): Set command_state of FILE and
3263 its also_make chain to cs_finished here.
3264 * commands.c (execute_file_commands), job.c (child_handler),
3265 remake.c (remake_file): Don't set it before calling
3266 notice_finished_file.
3268 * file.h (struct file): Changed `also_make' to struct dep *.
3269 * job.c (delete_child_targets), file.c (print_file_data_base),
3270 remake.c (notice_finished_file), implicit.c (pattern_search):
3271 Use dep chain instead of array of file names.
3273 Mon Oct 7 17:04:33 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3277 * arscan.c: Declare open.
3278 * misc.c: Declare {get,set}{re,}[ug]id.
3279 * variable.c (target_environment): Declare getenv.
3281 Sat Oct 5 15:13:03 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3283 * make.h [NeXT]: <string.h> instead of <strings.h>.
3285 Fri Oct 4 16:05:41 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3287 * default.c (default_suffixes, defualt_suffix_rules): Add .texi
3292 * job.c: Move vfork decl into make.h.
3294 Fri Sep 27 18:45:30 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3296 * compatMakefile (glob/libglob.a): Pass CC value to submake.
3298 Thu Sep 26 00:08:15 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3300 * load.c (load_average): Made not static.
3302 * load.c [ultrix && vax]: Define LDAV_TYPE and LDAV_CVT for Ultrix 4.2.
3304 Tue Sep 24 00:17:20 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3308 * read.c (record_files): Warn about extra cmds even if the target's
3309 name begins with a dot. I think the lusers can handle this.
3311 Mon Sep 23 22:33:26 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3313 * make.h, arscan.c: Don't declare bcmp, bzero, or bcopy if they're
3315 * make.h: Declare write and open.
3317 * default.c (default_suffixes, default_suffix_rules,
3318 default_variables): Add .C just like .cc.
3319 * make.texinfo (Catalogue of Rules): Document .C.
3321 * make.man (-w): Fix gramo.
3323 Fri Sep 20 17:18:16 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3325 * make.h: No text after #endif.
3327 Sun Sep 15 16:20:46 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3331 * implicit.c (pattern_search): In the second pass, recurse on rule
3332 deps that don't have a %. Why did I make it not do this?
3334 Fri Sep 14 18:29:39 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3336 * read.c (record_files): For extra cmds, use the last ones given.
3337 If the target's name doesn't begin with a dot (bletch!!), emit a
3338 two-line warning, one line giving the old cmds' location and the
3339 other the new cmds' location.
3341 * misc.c (makefile_error, makefile_fatal): New fns.
3342 * make.h: Declare them.
3343 * Use them instead of error/fatal for all msgs including a file
3344 name and line number.
3346 Thu Sep 13 16:35:54 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3348 * make.h: Declare define_default_variables.
3349 Declare ar_parse_name, instead of ar_name_parse (M-t).
3351 Mon Sep 10 18:35:40 1991 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3355 * make.texinfo (Variables: Setting): Say whitespace is removed if
3356 "immediately after =", rather than simply "after =".
3358 * job.c: Don't declare wait #ifdef POSIX.
3360 * make.h [__GNUC__]: #undef alloca and then #define it.
3362 * main.c (main): When pruning makefiles which might loop from the
3363 read_makefiles chain, look at all `prev' entries of double-colon rules.
3365 Fri Sep 7 00:41:53 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3367 * main.c (main): Only remove makefiles with cmds but no deps from
3368 the list of makefiles to be rebuilt if they are :: targets.
3369 : targets with cmds and no deps are not dangerous.
3371 Wed Sep 5 17:35:51 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3373 * compatMakefile (defines): Add comment that some compilers take
3374 ENUM_BITFIELDS but produce bogus code.
3375 (LOAD_AVG): Fix examples to \ "s.
3376 (LOADLIBES): Add comment that SGI Irix needs -lmld for nlist.
3378 Tue Sep 4 20:26:26 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3382 Fri Aug 30 19:34:04 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3384 * remake.c (update_file_1): When checking the command_state of
3385 deps, check through the prev chain.
3386 (update_goal_chain): When a target is finished, start checking its
3387 prev (if it has one) instead.
3389 Wed Aug 7 17:32:03 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3391 * rule.c (convert_to_pattern): Allow files with deps to define
3392 suffix rules (really this time).
3394 Mon Aug 5 17:09:21 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3396 * misc.c (user_access, make_access): Do saved-IDs (USG) flavor
3399 * file.c (enter_file): Strip ./s here.
3400 * read.c (parse_file_seq): Not here.
3402 Tue Jul 23 23:34:30 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3404 * compatMakefile: Added comment that -lPW alloca is broken on HPUX.
3406 Thu Jul 18 03:10:41 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3410 * read.c (read_makefile): Ignore lines containing chars that are
3411 all isspace, not just all isblank.
3413 * make.texinfo (Copying): @include gpl.texinfo, rather than copying
3415 * gpl.texinfo: New file (symlink to /gd/gnu/doc/gpl.texinfo).
3416 * GNUmakefile: Put gpl.texinfo in distribution.
3418 Tue Jul 16 12:50:35 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3420 * make.h: #define _GNU_SOURCE before including headers.
3421 Include <ctype.h> and define isblank if <ctype.h> doesn't.
3422 * commands.c: Don't include <ctype.h> here.
3423 * *.c: Use isblank instead of explicit ' ' || '\t'.
3425 Mon Jul 15 17:43:38 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3427 * function.c (expand_function: `filter'/`filter-out'): Fixed to not
3430 Fri Jul 12 12:18:12 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3432 * function.c (expand_function: `filter'/`filter-out'): Rewritten to
3433 handle filter-out of multiple patterns properly. Also no longer
3434 mallocs and reallocs for temp array; uses alloca and a linked-list
3437 Wed Jul 10 22:34:54 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3441 * make.texinfo: Moved some @groups that were outside @examples to
3444 * load.c [apollo] (load_average): Define using special syscall for
3445 Apollo DOMAIN/OS SR10.n.
3447 Thu Jul 4 12:32:53 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3449 * make.texinfo (Missing): Added Unix excessive implicit rule
3450 search; mention that POSIX.2 doesn't require any of the missing
3452 (Top): Updated printed manual price to $15.
3454 Wed Jul 3 18:17:50 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3456 * file.c (rename_file): Carry over last_mtime when merging files.
3457 * remake.c (f_mtime): Tail-recurse after renaming VPATH file, to
3458 check for saved date in existing renamed-to file.
3460 * remote-cstms.c (start_remote_job): Use PATH_VAR.
3462 * commands.c [POSIX || __GNU_LIBRARY__]: Don't declare getpid.
3464 * compatMakefile (glob-{clean,realclean}): Run clean/realclean in glob.
3465 (clean, realclean): Require those.
3467 * make.h: Always declare environ.
3468 Don't declare old glob functions.
3470 * GNUmakefile: Make no-lib deps for load.c and remote.c.
3472 Tue Jul 2 18:35:20 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3476 Mon Jul 1 16:58:30 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3478 * read.c (multi_glob): Don't pass GLOB_QUOTE flag to glob.
3480 * make.h [POSIX]: Include <unistd.h>, and don't declare things that
3483 * main.c (main) [USG && sgi]: malloc a buffer for broken sgi stdio.
3485 Sat Jun 29 11:22:21 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3487 * function.c (expand_function: `shell'): Use alloca for the error
3488 msg buffer, instead of assuming an arbitrary max size.
3490 Fri Jun 28 18:15:08 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3492 * job.c [POSIX] (search_path): Do real 1003.1 goop to get NGROUPS_MAX.
3494 Wed Jun 26 11:04:44 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3496 * default.c (define_default_variables): New fn.
3497 (install_default_implicit_rules): Code for above fn moved there.
3498 * main.c (main): Do define_default_variables before reading the
3501 Tue Jun 25 17:30:46 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3503 * main.c (main): Quote ; in MAKEOVERRIDES.
3505 Tue Jun 18 13:56:30 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3507 * compatMakefile: Fixed typo in comment.
3509 Tue Jun 11 00:14:59 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3513 Mon Jun 10 14:46:37 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3515 * make.h: Always include <sys/types.h>.
3516 [POSIX]: Include <limits.h> and #define MAXPATHLEN to be PATH_MAX.
3518 * default.c (default_suffix_rules: .texinfo.dvi): Use $(TEXI2DVI).
3519 (default_variables): Define TEXI2DVI.
3521 Thu Jun 6 16:49:19 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3525 * make.h (SIGNAL): Cast handler arg to SIGHANDLER type.
3527 Wed Jun 5 06:00:43 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3529 * read.c (multi_glob): Use POSIX.2 `glob' function.
3530 If a glob pattern matches nothing, leave it as is (a la sh, bash).
3531 Also, if can't find USER for ~USER, leave it as is (a la bash).
3533 Mon Jun 3 16:36:00 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3535 * compatMakefile: Rewrote comments about -Ds to be easier to use.
3537 * make.h, arscan.c, remake.c, main.c, dir.c, job.c: Changed tests
3538 of _POSIX_SOURCE to POSIX.
3540 * job.c: Take getdtablesize out of #ifdef __GNU_LIBRARY__.
3541 Put separately #ifdef USG.
3543 * COPYING: Replaced with version 2.
3544 * Changed copyright notices to refer to GPL v2.
3546 Thu May 30 00:31:11 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3548 * make.h: Don't declare sigblock for POSIX.
3550 * main.c (main, log_working_directory) [USG]: Get getcwd failure
3551 mode from errno, not passed buffer like BSD getwd.
3553 * misc.c (child_access): New fn to set access for a child process;
3554 like user_access, but you can't change back.
3555 * make.h: Declare it.
3556 * job.c (exec_command): Use it in place of user_access.
3558 Wed May 29 23:28:48 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3560 * default.c (default_variables) [pyr]: PC = pascal.
3562 Tue May 28 20:24:56 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3564 * variable.c (print_variable): Put a newline before `endef'.
3566 Sat May 25 02:39:52 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3570 Wed May 22 19:41:37 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3574 Thu May 16 13:59:24 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3576 * main.c (main): Do USGr3 setvbuf behavior #ifdef APOLLO.
3577 Don't handle SIGCHLD #ifdef USG (Apollo is USG but defines SIGCHLD).
3579 Fri May 10 14:59:33 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3581 * remake.c [sgi]: Don't include <sys/file.h>.
3583 Wed May 8 01:54:08 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3585 * make.h (SIGHANDLER): #define as (void *) #if __STDC__,
3587 (SIGNAL): Use it to cast return value.
3588 * main.c (main): Cast SIG_IGN to SIGHANDLER when comparing.
3589 * job.c (block_signals, unblock_signals): Use SIGNAL instead of signal.
3591 * main.c: Declare mktemp to return char*, not int.
3593 * job.c (new_job): Don't increment files_remade.
3594 * remake.c (notice_finished_file): Do it here.
3596 * read.c (do_define): Don't clobber DEFINITION[-1] on empty defns.
3597 Free storage that is no longer needed.
3599 Wed Apr 24 20:49:48 1991 Roland McGrath (roland at churchy.gnu.ai.mit.edu)
3601 * misc.c (message): New fn to print informational msgs with
3602 leading "make: " or "make[N]: ".
3603 * make.h: Declare it.
3604 * remake.c (update_file): Use it instead of printf.
3606 Fri Apr 19 05:52:45 1991 Roland McGrath (roland at churchy.gnu.ai.mit.edu)
3608 * main.c (main): When there are no targets, if there were no
3609 makefiles, print a different error message, which mentions makefiles.
3611 Tue Apr 16 03:22:45 1991 Roland McGrath (roland at geech.gnu.ai.mit.edu)
3613 * remake.c (update_file): Print "nothing to be done" instead of "is
3614 up to date" if FILE->cmds == 0.
3616 * job.c [!WIFEXITED]: Define if not already defined.
3618 Thu Apr 11 18:00:50 1991 Roland McGrath (roland at wookumz.gnu.ai.mit.edu)
3620 * arscan.c (ar_name_equal): Fixed truncation comparison.
3622 Tue Apr 2 16:17:35 1991 Roland McGrath (roland at churchy.gnu.ai.mit.edu)
3624 * glob.c: Use common version from djm.
3625 * dir.c: Snarfed #ifdef mess for <dirent.h> or whatever from glob.c.
3626 (dir_file_exists_p): Ignore directory entries with d_ino==0.
3628 Mon Apr 1 20:49:45 1991 Roland McGrath (roland at albert.gnu.ai.mit.edu)
3632 Fri Mar 29 19:16:18 1991 Roland McGrath (roland at albert.gnu.ai.mit.edu)
3634 * job.c (free_child): Free CHILD->environment and its elts.
3636 Sat Mar 23 14:08:09 1991 Roland McGrath (roland at albert.gnu.ai.mit.edu)
3638 * read.c (read_makefile): Don't ignore lines containing only
3639 comments if they start with a tab. Such lines should be passed to
3640 the shell for it to decide about the comments.
3642 * job.c (free_child): Free CHILD->command_lines and its elts, not
3643 CHILD->commands (which is obsolete).
3644 * job.h, job.c: Remove obsolete `commands' member of `struct child'.
3646 Sun Mar 17 18:40:53 1991 Roland McGrath (roland at albert.ai.mit.edu)
3648 * remake.c (update_file): Print a msg for a top-level up-to-date
3649 phony target (a different one than for a real file).
3651 * read.c (conditional_line): Boundary check so we don't check the
3652 value of the -1th elt of the stack (which is bogus).
3654 Sat Mar 16 16:58:47 1991 Roland McGrath (roland at albert.ai.mit.edu)
3656 * read.c (conditional_line): Don't evaluate an if* when we're
3657 already ignoring. Instead, just push a new level, with a value of
3658 1, to keep ignoring.
3660 Tue Mar 12 00:16:52 1991 Roland McGrath (roland at geech.ai.mit.edu)
3664 Mon Mar 11 23:56:57 1991 Roland McGrath (roland at geech.ai.mit.edu)
3666 * job.c (construct_command_argv_internal): Quote backslashes
3667 when building the shell -c line.
3669 Fri Mar 8 01:40:18 1991 Roland McGrath (roland at geech.ai.mit.edu)
3671 * job.c (exec_command): Call user_access rather than setgid(getgid()).
3673 * misc.c (remove_comments): Renamed from collapse_line; took out
3674 collapse_continuations call.
3675 * make.h: Change decl.
3676 * read.c (read_makefile): Collapse continuations on the line buffer
3677 immediately after reading it. Call remove_comments rather than
3678 collapse_line (which is now defunct).
3680 Thu Feb 21 18:06:51 1991 Roland McGrath (mcgrath at cygint.cygnus.com)
3682 * misc.c (user_access, make_access): New fns to toggle btwn permissions
3683 for user data (files and spawning children), and permissions for make
3684 (for taking the load average, mostly).
3685 * make.h: Declare them.
3686 * job.c (start_job): Call make_access before wait_to_start_job, and
3688 * main.c (main): Call user_access before doing much.
3690 Mon Feb 3 15:02:03 1991 Roland McGrath (roland at albert.ai.mit.edu)
3694 Tue Jan 29 20:30:50 1991 Roland McGrath (roland at cygint.cygnus.com)
3696 * read.c (read_all_makefiles): Use allocated_variable_expand to expand
3697 `$(MAKEFILES)', since the results are used across calls to
3698 read_makefile, which could clobber them.
3700 Wed Jan 23 00:24:10 1991 Roland McGrath (roland at cygint.cygnus.com)
3702 * main.c (main): Call install_default_implicit_rules after reading
3703 makefiles, not before.
3704 * default.c (install_default_implicit_rules): If a suffix-rule file
3705 entry has cmds, don't give it any from default_suffix_rules.
3707 Fri Jan 17 17:39:49 1991 Roland McGrath (roland at albert.ai.mit.edu)
3709 * arscan.c: Added support for AIX archives.
3711 * remake.c: Don't include ar.h.
3712 * main.c: Removed unused atol decl.
3713 * arscan.c (ar_scan): Declare arg FUNCTION to return long int.
3714 * ar.c (ar_touch): Don't perror for an invalid archive.
3715 * make.h: Declare lseek as long int.
3717 * job.c [hpux]: Define getdtablesize a la USG.
3719 Sun Jan 12 21:08:34 1991 Roland McGrath (roland at albert.ai.mit.edu)
3723 Fri Jan 10 03:48:08 1991 Roland McGrath (roland at albert.ai.mit.edu)
3725 * job.c (search_path): Take new arg, place to put full pathname (rather
3727 (exec_command): Pass it, using auto storage.
3729 * main.c (print_version): Updated copyright years.
3731 Wed Jan 8 19:46:19 1991 Roland McGrath (roland at albert.ai.mit.edu)
3733 * job.c [_POSIX_SOURCE]: Just #include <sys/wait.h>, and define macro
3734 WAIT_NOHANG in terms of waitpid.
3735 [!_POSIX_SOURCE && (HAVE_SYS_WAIT || !USG)]: Don't #include <signal.h>
3737 Define macro WAIT_NOHANG in terms of wait3.
3738 (child_handler): #ifdef on WAIT_NOHANG, not HAVE_SYS_WAIT || !USG.
3739 Use WAIT_NOHANG macro instead of wait3.
3741 * file.h (struct file.command_state): Remove unused elt.
3743 Wed Dec 26 18:10:26 1990 Roland McGrath (roland at albert.ai.mit.edu)
3745 * commands.c (set_file_variables): If FILE got its commands from
3746 .DEFAULT, make $< == $@ (4.3 BSD/POSIX.2d11 compat).
3748 Mon Dec 24 17:36:27 1990 Roland McGrath (roland at albert.ai.mit.edu)
3750 * default.c (default_variables): Rename 2nd LINK.s defn to LINK.S.
3752 Fri Dec 14 15:05:25 1990 Roland McGrath (roland at albert.ai.mit.edu)
3754 * vpath.c (selective_vpath_search): Check for makefile-mentioned before
3755 checking for actual existence. The old order loses if the containing
3756 directory doesn't exist (but a rule might make it).
3758 * make.h [__GNUC__]: Don't #define alloca if already #define'd.
3760 * rule.c (convert_to_pattern): Don't look at the target constructed for
3761 the empty rule when making the null-suffix rule. Construct it over
3762 again, since the former may have been freed already.
3764 Thu Dec 13 17:21:03 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3766 * make.h [__GNU_LIBRARY__]: Include <unistd.h> to get random fn decls.
3768 Wed Dec 12 17:12:59 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3770 * make.h, arscan.c, glob.c: Only include <memory.h> #ifdef USG.
3772 * variable.c (define_variable_in_set): Replace env_overrides check that
3773 wasn't really redundant (undoing Sep 28 change). Add comment saying
3774 why this check is necessary.
3776 * job.c, main.c [DGUX]: Needs siglist like USG.
3778 Mon Dec 11 01:19:29 1990 Roland McGrath (roland at albert.ai.mit.edu)
3780 * default.c [M_XENIX]: For rules that are different for Xenix, use the
3781 generic Unix version #ifdef __GNUC__.
3783 * main.c [M_XENIX]: Use USGr3-style setvbuf call.
3785 * read.c (find_percent): Do backslash folding correctly, not leaving
3786 extra crud on the end of the string.
3788 Sun Dec 10 21:48:36 1990 Roland McGrath (roland at albert.ai.mit.edu)
3790 * job.c: Don't declare wait3 if it's #defined.
3792 * GNUmakefile, compatMakefile, make.texinfo: Change make-info
3795 Thu Dec 7 21:20:01 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3797 * make.h [STDC_HEADERS || __GNU_LIBRARY__ || _POSIX_SOURCE]: Use
3798 ANSI <string.h> and names for str/mem functions.
3799 Use <stdlib.h> to declare misc fns rather than explicit decls.
3800 [_POSIX_SOURCE]: Don't declare kill (<signal.h> will).
3801 Include <sys/types.h> before <signal.h> because some braindead
3802 nonconformant 1003.1 implementation needs it.
3803 * misc.c: Don't declare malloc, realloc. Do it in make.h.
3804 * arscan.c, glob.c: Use sequence for string fns from make.h verbatim.
3805 * make.h (S_ISDIR, S_ISREG): Declare if necessary.
3806 * commands.c (delete_child_targets), job.c (search_path), read.c
3807 (construct_include_path): Use S_ISfoo(m) instead of
3808 (m & S_IFMT) == S_IFfoo.
3809 * dir.c, glob.c [_POSIX_SOURCE]: Use dirent.
3811 Wed Nov 29 22:53:32 1990 Roland McGrath (roland at geech.ai.mit.edu)
3815 Tue Nov 28 16:00:04 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3817 * arscan.c (ar_name_equal) [APOLLO]: Don't do `.o' hacking. On Apollos
3818 the full file name is elsewhere, and there is no length restriction (or
3821 Thu Nov 23 17:33:11 1990 Roland McGrath (roland at albert.ai.mit.edu)
3823 * load.c [hp300 && BSD] (LDAV_CVT): Define for this system.
3825 Tue Nov 21 07:58:40 1990 Roland McGrath (roland at albert.ai.mit.edu)
3827 * read.c (record_files): Fix trivial bug with deciding to free storage
3830 Thu Nov 16 06:21:38 1990 Roland McGrath (roland at geech.ai.mit.edu)
3832 * compatMakefile ($(bindir)/make): Install it setgid kmem.
3834 Thu Nov 1 16:12:55 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3836 * GNUmakefile (make-*.tar.Z): Use `h' option to tar (dereference
3837 symlinks), to grab texinfo.tex from wherever it lives.
3839 Tue Oct 30 16:15:20 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3843 Fri Oct 26 14:33:34 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3845 * GNUmakefile: make-*.tar.Z: Include texinfo.tex.
3847 Tue Oct 23 19:34:33 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3849 * main.c (define_makeflags): When there are no flags to write, make
3850 sure the array has two leading nulls, since `MAKEFLAGS' is defined from
3853 * main.c (default_keep_going_flag): New variable (constant one).
3854 (command_switches: -k, -S): Use above for default value.
3855 (define_makeflags): Only write flag/flag_off switches if they are on,
3856 and either there is no default value, or they are not the default.
3858 Mon Oct 22 16:14:44 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3860 * main.c (struct command_switch): New member `no_makefile'.
3861 (command_switches: -n, -q, -t): Set no_makefile == 1.
3862 (define_makeflags): Take new arg MAKEFILE: if nonzero, don't use
3863 options whose `no_makefile' flags are set.
3864 (main): Call define_makeflags with MAKEFILE==1 before remaking
3865 makefiles, and again with MAKEFILE==0 before remaking goals.
3867 Tue Oct 2 17:16:45 1990 Roland McGrath (roland at geech.ai.mit.edu)
3871 Mon Oct 1 15:43:23 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3873 * arscan.c [HPUX]: Use PORTAR==1 format.
3875 Sat Sep 29 16:38:05 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3877 * make.h, remake.c, arscan.c: Don't declare `open'.
3879 Fri Sep 28 04:46:23 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3881 * variable.c (define_variable_in_set): Remove redundant -e check.
3883 Wed Sep 26 00:28:59 1990 Roland McGrath (roland at geech.ai.mit.edu)
3885 * job.c (start_job): Set RECURSIVE from the right elt of
3886 CHILD->file->cmds->lines_recurse.
3888 * commands.c (chop_commands): Don't botch the line count for allocating
3889 CMDS->lines_recurse.
3893 * job.c (start_job): Don't always increment CHILD->command_line! Only
3894 do it when CHILD->command_ptr has run out! (Dumb bug. Sigh.)
3896 Thu Sep 20 02:18:51 1990 Roland McGrath (roland at geech.ai.mit.edu)
3898 * GNUmakefile [ARCH]: Give explicit rule for remote.{c,dep} to use
3899 variable `REMOTE' for more flags.
3900 ($(prog)): Link in $(LOADLIBES).
3902 Wed Sep 19 02:30:36 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3904 * commands.h (struct commands): New member `ncommand_lines', the number
3905 of elts in `command_lines' et al.
3906 * commands.c (chop_commands): Set `ncommand_lines' elt of CMDS, and
3907 don't put a nil pointer at the end of `command_lines'.
3908 * job.h (struct child): New member `command_lines' to hold
3909 variable-expanded command lines.
3910 * job.c (new_job): Store expanded command lines in `command_lines'
3911 member of new child. Don't clobber FILE->cmds.
3912 (start_job): Use CHILD->command_lines in place of
3913 CHILD->file->cmds->command_lines.
3915 * variable.h, variable.c, job.c, expand.c: Undo yesterday's change,
3916 which is no longer necessary since we have cleverly avoided the issue.
3918 * job.c (start_job): Don't variable-expand each command line.
3919 (new_job): Do them all here, storing the expansions in the array.
3921 Tue Sep 18 01:23:13 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3923 * variable.h (struct variable): Remove `expanding' member.
3924 * variable.c (define_variable_in_set): Don't initialize it.
3925 * expand.c (struct variable_expanding): New type, a linked list
3926 containing `struct variable' pointers.
3927 (variables_expanding): New variable, the chain of variables currently
3929 (recursively_expand): Don't test and set `expanding' member.
3930 Instead, run through the `variables_expanding' chain looking for a link
3931 referring to V to find self-reference. Add a new link to the chain,
3932 describing V, before recursive expansion, and pop it off afterward.
3933 * job.c (child_handler): Save `variables_expanding' and clear it before
3934 calling start_job, and restore it afterward. This avoids major lossage
3935 when the SIGCHLD comes in the middle of variable expansion.
3937 Mon Sep 17 14:46:26 1990 Roland McGrath (roland at geech.ai.mit.edu)
3939 * job.c, commands.c: Don't define sigmask.
3940 * make.h: Put it here instead.
3942 * variable.c (target_environment): If `.NOEXPORT' was specified as a
3943 target, only export command-line and environment variables, and
3944 file-origin variables that were in the original environment.
3946 * make.man: Add missing ?roff control for `-I' option description.
3948 Thu Sep 13 14:10:02 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3950 * load.c [UMAX]: Move #include <sys/sysdefs.h> to [not UMAX_43].
3952 Wed Sep 12 15:10:15 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3954 * expand.c (recursively_expand): Don't use `reading_filename' and
3955 `reading_lineno_ptr' if they're nil.
3957 Thu Aug 30 17:32:50 1990 Roland McGrath (roland at geech)
3961 Tue Aug 28 04:06:29 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3963 * job.c [USG] (unknown_children_possible): New variable, set nonzero
3964 when it's possible for children not in the `children' chain to die.
3965 (block_signals) [USG]: Set it.
3966 (unblock_signals) [USG]: Clear it.
3967 (child_handler) [USG]: Don't complain about unknown children if
3968 `unknown_children_possible' is set.
3970 * read.c (do_define): Make sure there's enough space for the newline,
3971 so we don't write off the end of allocated space.
3973 * arscan.c (ar_name_equal): Fixed to work when MEM is AR_NAMELEN-1 but
3974 NAME is not the same length.
3976 Sat Aug 25 16:17:14 1990 Roland McGrath (roland at geech)
3978 * job.c (construct_command_argv_internal): Use a static char array for
3979 a constant, since old C has no auto aggregate initializers.
3981 Thu Aug 23 16:11:03 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3983 * job.c (search_path): If PATH is nil or "" use a default path.
3985 Wed Aug 22 01:05:32 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3989 * job.c (exec_command): Don't take PATH and SHELL args. Get them from
3991 (child_execute_job): Don't take FILE arg, and don't pass path and shell
3993 (start_job): Don't pass FILE arg to child_execute_job.
3994 * function.c (expand_function: `shell'): Ditto.
3995 * main.c (main): Don't pass path and shell to exec_command.
3997 Fri Aug 17 23:17:27 1990 Roland McGrath (roland at geech)
3999 * job.c (construct_command_argv_internal): New fn broken out of
4000 construct_command_argv. Takes strings SHELL and IFS instead of doing
4001 variable expansion for them. Recurse to make an argv for SHELL,
4002 passing SHELL==0. When SHELL==0, don't recurse for shell argv; make a
4003 simple one using /bin/sh.
4004 (construct_command_argv): Do the variable expansions and call above.
4006 Thu Aug 16 19:03:14 1990 Roland McGrath (roland at geech)
4008 * read.c (multi_glob): For ~USER/FILE, if USER isn't found, don't
4009 change the file name at all.
4011 Tue Aug 7 18:33:28 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4013 * function.c (expand_function: `suffix'/`notdir'): Don't kill the last
4014 space if we never wrote one.
4016 * function.c (expand_function: `suffix'): Retain the dot, like the
4019 Mon Aug 6 14:35:06 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4023 * main.c (decode_switches): For positive_int and floating cases, move
4024 SW past the arg (and don't set it to ""), so another switch can follow.
4026 Fri Aug 3 00:43:15 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4028 * job.c (child_execute_job): Use unblock_signals instead of
4029 push_signals_blocked_p (0).
4031 * main.c (fatal_signal_mask): New variable, mask of signals caught with
4034 * job.c ({block,unblock}_children): Renamed to {block,unblock}_signals.
4035 Block/unblock both child signal and signals in fatal_signal_mask.
4036 (children_blocked_p_{stack,max,depth}, {push,pop}_children_blocked_p):
4037 Renamed from children to signals. Use {block,unblock}_signals instead
4038 of {block,unblock}_children.
4039 * commands.c (fatal_error_signal), job.c (wait_for_children, new_job,
4040 child_execute_job, main, log_working_directory), function.c
4041 (expand_function: `shell'), job.h: Rename {push,pop}_children_blocked_p
4042 to {push,pop}_signals_blocked_p.
4043 * job.c (child_handler): Call {block,unblock}_signals instead of just
4044 {block,unblock}_remote_children. We need to block the fatal signals.
4046 Thu Aug 2 22:41:06 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4048 * main.c, function.c: Fixed typos in comments.
4050 * file.c (print_file_data_base): Fix computation of avg files/bucket.
4052 Tue Jul 31 22:11:14 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4056 Wed Jul 25 16:32:38 1990 Roland McGrath (mcgrath at tully.Berkeley.EDU)
4058 * arscan.c (ar_name_equal): Fixed to really do it right.
4059 (ar_member_pos): Fixed order of args.
4060 * ar.c (ar_member_date_1): Ditto.
4062 Fri Jul 20 15:30:26 1990 Roland McGrath (mcgrath at tully.Berkeley.EDU)
4064 * arscan.c (ar_name_equal): Rewritten. Accounts for a possible
4065 trailing slash in MEM.
4067 * remake.c (f_mtime): Keep track of whether ARNAME is used and free it
4068 if not. Also free MEMNAME.
4069 * ar.c (ar_member_date, ar_touch): Ditto.
4071 * arscan.c (arscan) [HPUX or hpux]: Treat same as USGr3 PORTAR==1.
4073 * make.h: If NSIG is not defined, but _NSIG is, #define NSIG _NSIG.
4075 * compatMakefile: Don't use $* in explicit rules.
4077 * default.c (default_variables: "PREPROCESS.S"): Include $(CPPFLAGS).
4079 * remake.c (f_mtime): If FILE is an ar ref, get the member modtime.
4081 * function.c (string_glob): Terminate the string properly when it's
4084 Wed Jul 18 11:26:56 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4088 * commands.c (set_file_variables): Fixed computation for ^F/?F elt len.
4090 Sat Jul 14 13:41:24 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4092 * job.c (construct_command_argv): Always use
4093 allocated_variable_expand_for_file instead of variable_expand_for_file
4094 because we might be called from inside a variable expansion (for the
4097 * function.c (expand_function: `shell'): Free the arglist's storage
4098 correctly. construct_command_argv only allocates ARGV and ARGV[0].
4100 * job.c (children_blocked_p_idx): Renamed to children_blocked_p_depth.
4101 (push_children_blocked_p, pop_children_blocked_p): Use ..._depth
4102 instead of ..._idx, and do it right!
4104 Wed Jul 11 15:35:43 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4106 * make.h (SIGNAL): New macro to replace `signal' calls. Does arg and
4107 ret value casts to (void *) #ifdef __STDC__ to avoid conflicts btwn
4108 ANSI and BSD `signal' and handler types.
4109 * main.c (main), job.c (child_handler): Use it.
4111 Fri Jul 6 00:00:38 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4113 * ar.c (ar_member_date, ar_touch): Pass 2nd arg to f_mtime.
4115 * read.c (read_makefile): Search the include path for MAKEFILES
4116 variable makefiles (TYPE == 1), like it says in the manual.
4118 * file.h (struct file), main.c (struct command_switch): Remove trailing
4121 * commands.c (execute_file_commands): Remove unused variables.
4122 * commands.h: Declare chop_commands.
4123 * make.h: Declare uniquize_deps.
4124 * main.c (main): Remove unused variable.
4125 (decode_switches): Remove unused label.
4126 * remake.c: Include "ar.h" for ar_parse_name decl.
4127 * implicit.c (try_implicit_rule): Remove unused variable.
4128 * function.c (expand_function: `shell'): Declare fork, pipe.
4129 * ar.c: Declare ar_name_equal.
4131 * GNUmakefile: If using gcc, add warning flags to CFLAGS.
4133 * remake.c: Remove decl of ar_member_date, since it's done in make.h.
4135 * remake.c (f_mtime): For ar refs, allow the archive to be found via
4136 VPATH search if we're searching, and change the ar ref accordingly.
4138 * ar.c (ar_parse_name): New global fn to parse archive-member
4139 references into the archive and member names.
4140 (ar_member_date, ar_touch): Use it.
4141 * make.h: Declare it.
4143 * remake.c (f_mtime): After doing rename_file, do check_renamed instead
4144 of assuming rename_file will always set FILE->renamed (which it won't).
4146 * vpath.c (selective_vpath_search): Only accept prospective files that
4147 don't actually exist yet are mentioned in a makefile if the file we are
4148 searching for isn't a target.
4150 Wed Jul 4 04:11:55 1990 Roland McGrath (mcgrath at helen.Berkeley.EDU)
4152 * remake.c (update_goal_chain): Do check_renamed after calling
4154 (check_dep): Ditto after update_file.
4156 * file.c (rename_file): Prettied up long message for merging cmds.
4158 * remake.c (update_file_1): Get each dep file's modtime, and allow for
4159 it being renamed, before checking for a circular dep, since a renaming
4160 may have introduced one.
4162 Tue Jul 3 18:15:01 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4164 * ar.c (ar_touch): Don't free ARNAME since enter_file holds onto the
4167 * function.c (string_glob): Don't leave a trailing space.
4169 * read.c (do_define): Allow leading whitespace before `endef'.
4171 Mon Jul 2 14:10:16 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4173 * implicit.c (pattern_search): No longer take NAME arg. Instead take
4174 ARCHIVE flag. If ARCHIVE is nonzero, FILE->name is of the form
4175 "LIB(MEMBER)"; rule for "(MEMBER)" is searched for, and LASTSLASH is
4176 set to nil. Since NAME was only non-nil when it was the archive member
4177 name passed by try_implicit_rule, this change easily allows turning off
4178 LASTSLASH checking for archive members without excessive kludgery.
4179 (try_implicit_rule): Pass ARCHIVE flag instead of file name.
4183 * commands./c (set_file_variables): Don't kill last char of $(^D) elts.
4185 Sat Jun 30 00:53:38 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4187 * ar.c (ar_member_date): Don't free ARNAME since enter_file holds onto
4190 * arscan.c (ar_scan) [sun386 && PORTAR == 1]: Treat like USGr3.
4192 Wed Jun 27 14:38:49 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4194 * main.c (main): Put a newline on the debugging message when deciding
4195 not to remake a makefile to avoid a possible loop.
4196 Only decide not to remake makefiles that have commands (as well as
4197 being targets and having no deps).
4199 Fri Jun 22 12:35:37 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4201 * default.c (default_variables): Define `LINK.s' and `LINK.S'.
4202 (default_suffix_rules): Define .S.o rule.
4204 * job.c (construct_command_argv): If we decide to go the slow route,
4205 free all storage for the chopped args.
4206 (start_job): Free the argument list's storage correctly.
4207 construct_command_argv only allocates ARGV and ARGV[0].
4209 Tue Jun 19 18:27:43 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4213 Fri Jun 15 21:12:10 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4215 * glob.c: New version from ai-lab which doesn't do [^abc].
4217 Thu Jun 7 00:30:46 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4219 * dir.c: Copied dirent vs direct et al mess from glob.c.
4221 * glob.c: Replaced with updated version from djm.
4222 * glob.c: Check macro DIRENT instead of _POSIX_SOURCE for <dirent.h>.
4223 __GNU_LIBRARY__ implies DIRENT and STDC_HEADERS.
4225 Thu May 31 22:19:49 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4227 * vpath.c (vpath_search): Don't stop the loop if a pattern matches but
4228 the search fails. All matching patterns have their paths searched
4229 (like it says in the manual).
4231 * make.texinfo (Rules: Directory Search: Selective Search): Say that
4232 multiple `vpath' directives with the same pattern DO accumulate, not
4233 supersede earlier ones.
4235 * vpath.c (print_vpath_data_base): Increment the count of vpaths on
4236 each loop iteration, rather than letting it stay zero.
4240 * job.c (block_children, unblock_children): Made static.
4241 (push_children_blocked_p, pop_children_blocked_p): New functions to
4242 push and pop whether children are blocked or not.
4243 * job.h: Declare push_children_blocked_p, pop_children_blocked_p and
4244 not block_children, unblock_children.
4245 * commands.c (fatal_error_signal), job.c (wait_for_children, new_job,
4246 child_execute_job), main.c (main, log_working_directory): Use sequences
4247 of push_children_blocked_p (1) and pop_children_blocked_p () instead of
4248 explicitly blocking and unblocking children.
4249 * function.c (expand_function: `shell'): Don't unblock children. The
4250 push-pop sequence in wait_for_children makes it unnecessary.
4252 Tue May 29 21:30:00 1990 Roland McGrath (mcgrath at helen.Berkeley.EDU)
4254 * read.c (do_define): Don't include the last newline in the definition.
4256 * function.c (expand_function: `shell'): Call construct_command_argv
4257 before forking and don't fork if it returns nil. Free the argument
4258 list's storage before finishing.
4260 * job.c (start_job): Free the storage for the child's argument list
4261 in the parent side of the fork after the child has been spawned.
4263 * job.c (start_job): If construct_command_argv returns nil, go to the
4266 * job.c (construct_command_argv): Use the shell if the command contains
4267 an unterminated quote.
4269 Wed May 23 19:54:10 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4273 * read.c (read_makefile): Parse "override define" correctly.
4275 Thu May 17 15:25:58 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4277 * arscan.c [USG]: Don't declare memcpy and memcmp. <memory.h> should
4278 do this anyway (and lack of declarations is harmless).
4280 * remote-customs.c: Renamed to remote-cstms.c for System V.
4281 * remote.c [CUSTOMS]: Changed accordingly.
4283 Sun May 13 14:38:39 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4285 * GNUmakefile: Use same cmds for doc tar.Z as for dist tar.Z (so the
4286 contents go in make-N.NN).
4288 Thu Apr 26 19:33:25 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4292 Wed Apr 25 20:27:52 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4294 * job.c (init_siglist): Don't do SIGUSR1 and SIGUSR2 if they are the
4295 same as SIGIO and SIGURG (true on Cray).
4297 Tue Apr 24 20:26:41 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4299 * arscan.c (ar_scan): Do behavior for PORTAR == 1 and USGr3 also
4302 Wed Apr 11 10:00:39 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4304 * job.c (exec_command): Set the effective GID to the real GID. Somehow
4307 * implicit.c (pattern_search): Use the right index variable when
4308 seeing if we need to expand FILE->also_make.
4310 Sun Mar 4 09:18:58 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4314 * remake.c (remake_file): Treat non-targets without commands under -t
4315 the same as anything else without commands.
4317 Sat Feb 24 17:46:04 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4319 * default.c (default_variables: PREPROCESS.S): Removed $< from defn.
4321 * main.c (main): Ignore arguments that are the empty string, rather
4322 than feeding them to enter_file and barfing therein.
4324 Wed Feb 14 16:28:37 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4326 * main.c (main): Call construct_include_path after doing chdirs.
4328 Thu Feb 8 13:43:44 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4332 Sat Feb 3 22:06:55 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4336 * make.texinfo (Implicit: Catalogue of Rules): For RCS, noted that
4337 working files are never overwritten by the default rule.
4339 Thu Feb 1 17:27:54 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4341 * rule.c (count_implicit_rule_limits): Redid loop control to not run
4342 twice on freed rules.
4344 * GNUmakefile: Made `.dep' files be architecture-specific too.
4346 * main.c (main, log_working_directory) [USG]: Block children around
4347 calls to `getwd' (actually `getcwd' on USG), because that function
4348 sometimes spawns a child running /bin/pwd on USG.
4350 Tue Jan 30 14:02:50 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4352 * function.c (subst_expand): Pay attention to SUFFIX_ONLY, putz.
4354 Wed Jan 24 21:03:29 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4356 * make.man: Fixed repeated word.
4358 * make.texinfo (Missing): Reworded a buggy sentence.
4360 Mon Jan 22 12:39:22 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4362 * main.c (print_version): Added 1990 to copyright notice.
4366 Sat Jan 20 11:52:01 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4368 * file.c (rename_file): Don't free the storage for the old name, since
4369 it might not have been malloc'd.
4371 * job.c (construct_command_argv): Call
4372 allocated_variable_expand_for_file instead of variable_expand_for_file
4373 to expand `$(SHELL)'.
4375 * make.texinfo (Bugs): Change address from roland@wheaties.ai.mit.edu
4376 to roland@prep.ai.mit.edu.
4378 Tue Jan 16 19:22:33 1990 Roland McGrath (mcgrath at tully.Berkeley.EDU)
4382 Sun Jan 14 16:48:01 1990 Roland McGrath (mcgrath at helen.Berkeley.EDU)
4384 * job.c (start_job): Only call wait_to_start_job for the first command
4385 line in each sequence.
4387 Thu Jan 4 14:27:20 1990 Roland McGrath (mcgrath at helen.Berkeley.EDU)
4389 * load.c [LDAV_BASED] (wait_to_start_job): Loop while job_slots_used >
4392 * job.c (search_path): Don't return a pointer to local storage.
4393 Allocate data space for the pathname instead.
4395 * function.c (expand_function: `shell'): Don't write garbage if the
4396 child wrote no output.
4398 Wed Jan 3 15:28:30 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4402 * file.h (struct file): New member `renamed', a `struct file *' that is
4403 the place this file has been renamed to (or nil).
4404 (check_renamed): Macro to check for a file having been renamed.
4405 Dereferences the renaming and sets the given variable.
4406 * file.c (rename_file): Completely rewritten. Renames in place if
4407 possible, or moves FILE to a different hash bucket if there is no
4408 existing file with the new name. If there is an existing file with the
4409 new name, FILE is merged into it and FILE->renamed is set to point to
4411 * variable.c (merge_variable_sets): New fn to merge two variable sets.
4412 (merge_variable_set_lists): New fn to merge two variable set lists.
4413 * variable.h: Declare merge_variable_set_lists.
4414 * remake.c (update_file_1, check_dep): Run `check_renamed' after
4415 calling file_mtime, check_dep.
4416 (update_file): Same after update_file_1.
4417 (update_goal_chain, update_file_1, check_dep): Same after update_file.
4419 * read.c (uniquize_deps): New fn, broken out of record_files, to remove
4420 duplicate deps from a chain.
4421 (record_files): Use it.
4422 * implicit.c (pattern_search): Use uniquize_deps.
4424 * file.h (file_mtime_1): New macro, like file_mtime, but take second
4425 arg, passed to f_mtime.
4426 (file_mtime): Implement as file_mtime_1 (file, 1).
4427 (file_mtime_no_search): New macro: file_mtime (file, 0).
4428 * remake.c (f_mtime): Take new arg SEARCH. Only do VPATH and `-lNAME'
4429 searching if it is nonzero.
4430 * main.c (main): Use file_mtime_no_search for makefiles.
4431 * remake.c (update_goal_chain): Use file_mtime_no_search if MAKEFILES.
4433 * main.c (printed_version): New variable, init'd to zero.
4434 (print_version): Set it to nonzero before returning.
4435 (die): If -v and !printed_version, call print_version before clean up
4438 * main.c (log_working_directory): Keep track of whether or not the
4439 "Entering" message has been printed, and return without printing the
4440 "Leaving" message if not.
4442 * main.c (decode_switches): Don't complain about missing args before
4443 checking for a noarg_value elt in the command_switch structure.
4445 Tue Jan 2 15:41:08 1990 Roland McGrath (mcgrath at tully.Berkeley.EDU)
4447 * make.texinfo (Commands: Recursion: Options/Recursion): Document
4450 * make.texinfo, main.c, job.c: Changed copyright notices to include
4453 * make.texinfo (Top): Fixed introductory paragraph, which said that
4454 `make' itself (instead of the manual) has various chapters.
4455 (Variables: Advanced: Substitution Refs): When pxref'ing about
4456 `patsubst', use node `Text Functions', not `Functions'.
4457 Add an xref about `patsubst' after description of $(var:a%b=c%d).
4458 (Functions: Syntax of Functions): Explain why mixing delimiters in
4459 function/var refs is unwise. Clarify fn arg evaluation order.
4460 (Options): Reworded sentence about `-e'.
4461 (Implicit: Implicit Variables): Don't say `RM' is unused.
4462 Say the dflt values for the flag vars is empty unless otherwise noted,
4463 since some have defaults.
4464 (Implicit: Pattern Rules: Pattern Examples): Clarified use of $< and $@
4466 (Implicit: Last Resort): Don't say the .DEFAULT example creates files
4467 "silently". It's automatic, but not silent.
4468 (Implicit: Search Algorithm): Fixed confusing ungrammatical sentence
4470 (Archives: Archive Update): Added missing `next' pointer.
4471 (Archives: Archive Symbols): Note that GNU `ar' deals with this
4474 * job.c (search_path): New fn, to search for an executable file in a
4475 search path (broken out of exec_command).
4476 (exec_command): Take fourth arg, the shell program to use (if
4477 necessary). Use search_path for the program, and the shell program.
4478 Pass args "file args ..." to shell program (with no -c), where FILE is
4479 the full pathname of the program (script) to be run.
4480 (child_execute_job): Pass shell program to exec_command.
4481 * main.c (main): Ditto.
4483 * main.c (main): Don't write a message if exec_command returns, because
4484 it will never return.
4486 Fri Dec 22 16:19:58 1989 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
4488 * default.c (default_variables: "LINK.cc"): Use $(C++FLAGS) instead of
4491 Wed Dec 20 09:58:48 1989 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
4493 * job.c (new_job): If start_job set the child's `command_state' to
4494 `cs_finished', call notice_finished_file.
4496 Sun Dec 17 19:45:41 1989 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
4500 Wed Dec 13 17:57:12 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4502 * rule.c (convert_to_pattern): Accept files with dependencies as
4505 Thu Nov 30 15:47:13 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4509 * function.c (expand_function: `shell'): Don't clobber BUFFER and then
4512 * remake.c (update_file_1): Took code to force remake of nonexistent
4513 deps out of #if 0, and changed the test to nonexistent non-intermediate
4514 deps. In version 4, I think removing this test completely will
4515 implement the new feature that if a: b and b: c and c is newer than a,
4516 b need not be remade.
4518 Sun Nov 26 16:12:41 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4520 * compatMakefile (load.o, remote.o): Use $*.c instead of explicit file
4521 names so that using VPATH works.
4523 Tue Nov 21 14:57:18 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4527 Fri Nov 10 03:28:40 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4529 * remake.c (check_dep): Set *MUST_MAKE_PTR if FILE does not exist after
4530 being updated. (The exact opposite test was here before; why???)
4531 (update_file_1): Set a dep's `changed' member after updating it if it
4532 is phony and has commands (because they will then always be executed).
4534 Thu Nov 9 13:47:12 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4536 * load.c [UMAX]: #ifdef UMAX_43 include different headers for the
4538 * compatMakefile (LOAD_AVG): Document UMAX_43.
4542 * commands.c (chop_commands): New function to chop commands into lines.
4543 * job.c (new_job): Break that code out, and call chop_commands.
4544 * remake.c (remake_file): Call chop_commands before looking at
4545 FILE->cmds->any_recurse.
4547 * make.texinfo (Running: Goals): Don't say that the default target
4548 won't be taken from an included makefile.
4550 * remake.c (update_file_1): #if 0 out setting MUST_MAKE if a dep
4553 Fri Nov 3 15:53:03 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
4557 * variable.c (try_variable_definition): Don't calculate useless value.
4559 * main.c (define_makeflags): Fixed -j propagation.
4561 * commands.c (execute_file_commands): Removed unused variable.
4563 Sun Oct 29 11:11:15 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4565 * commands.c (execute_file_commands): If the commands are empty, call
4566 notice_finished_file before returning.
4568 Sat Oct 28 23:06:32 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4570 * remake.c (update_file_1): Don't always update a target that has no
4571 deps. Only do this for double-colon targets.
4573 Wed Oct 25 16:36:16 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4575 * main.c (main) [hpux]: hpux == HPUX.
4576 * compatMakefile (defines): Document that HPUX should be defined.
4578 Tue Oct 24 19:19:48 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4582 * job.c (exec_command): Fixed what mode bits are checked.
4584 * remake.c (update_file_1): "No cmds and no deps actually changed"
4585 loses if ! FILE->is_target.
4587 * make.texinfo (Variables: Setting): Don't say that spaces after a
4588 variable definition are ignored (since they aren't).
4590 Mon Oct 23 14:34:23 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4594 * remake.c (update_file_1): If, after being updated, any dependency
4595 does not exist, remake the target.
4597 * remake.c (update_file_1): Always update if FILE has commands but no
4600 * commands.c (execute_file_commands): If we return early because there
4601 are no commands, set FILE->updated.
4603 Thu Oct 19 18:47:37 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4605 * arscan.c (ar_scan) [M_XENIX]: Don't run atoi or atol on the
4606 `struct ar_hdr' members that are int or long int on Xenix.
4608 Sat Oct 14 10:43:03 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4610 * arscan.c (ar_scan): Cosmetic clean ups.
4611 (ar_name_equal): New function to compare names, handling truncated
4612 member names and special `.o' truncation.
4613 (ar_member_pos): Use ar_name_equal.
4614 * ar.c (ar_member_date_1): Use ar_name_equal.
4618 * file.h (struct file): Made `update_status' a `short int', and moved
4619 it before `command_state' so the bitfields can be packed better.
4621 * remake.c (files_remade): Made global.
4622 (notice_finished_file): Don't increment files_remade.
4623 * job.c (new_job): Do.
4625 * job.c (start_job): Don't return a value. Always set
4626 CHILD->file->command_state to either cs_running or cs_finished.
4627 (new_job, child_handler): Don't expect start_job to return a value.
4628 Instead, look at the file's command_state.
4630 * commands.c (chop_commands): Merged into job.c (new_job).
4631 * commands.h: Don't declare chop_commands.
4633 * job.c (start_job): Made static.
4634 (new_job): New function to create a `struct child' and call start_job.
4635 (free_child): New function to free a `struct child'.
4636 (child_handler, new_job): Call it.
4637 * job.h: Don't declare start_job. Do declare new_job.
4638 * commands.c (execute_file_commands): Call new_job.
4640 * commands.c (execute_file_commands): Don't set FILE->update_status if
4643 * function.c (expand_function): Don't use `reading_filename' and
4644 `reading_lineno_ptr' if they're nil.
4646 Fri Oct 13 18:16:00 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4648 * read.c (find_semicolon): New function to look for an unquoted ; not
4649 preceded by an unquoted # in a string.
4650 (read_makefile): Call it before expanding the line. If it finds a ;,
4651 cut the line short there before expanding it. If not, call it again
4654 * commands.c (execute_file_commands): Don't check FILE->command_state.
4655 We won't get called unless it's cs_not_started.
4657 * read.c (read_makefile): Call collapse_line on the variable-expanded
4658 rule line after checking for ; and #.
4660 * job.c (start_job): When there are no more commands, always return 0.
4661 * commands.c (execute_file_commands): Don't put the new child in the
4662 `children' chain unless FILE->command_state is cs_running.
4664 * read.c (read_makefile): Rewrote ;-handling to only do it once (why
4665 did I do it twice??) and to check for a # before the ;.
4667 * job.c (start_job): Set CHILD->file->update_status to 0 when we run
4668 out of commands. Set it to 1 before returning failure.
4669 (child_handler): Don't set C->file->update_status to 0 when start_job
4670 returns success and commands are not running.
4672 * read.c (read_makefile): If there is a # before the ; for commands,
4673 forget the ; and commands.
4675 Thu Oct 12 15:48:16 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4677 * job.c (child_execute_job): Pass -c to the shell.
4679 Wed Oct 11 18:41:10 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4683 * main.c (define_makeflags): Cleaned up to keep better track of dashes
4686 * function.c (expand_function: `shell'): When converting newlines to
4687 spaces in output, search with `index' calls rather than a simple loop.
4689 * main.c (main): Make sure stdout is line-buffered.
4691 * main.c (decode_switches): Always check for missing switch arg.
4693 Mon Oct 9 17:17:23 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4697 Sat Oct 7 00:32:25 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4699 * commands.c (set_file_variables): #ifdef NO_ARCHIVES, still set $@ and
4702 * commands.c (set_file_variables): Include a trailing slash in the
4703 directory variables (@D, etc.).
4705 * job.c (child_handler): Call notice_finished_file after changing a
4706 child's state to `cs_finished'.
4707 * remake.c (update_file_1): Don't call notice_finished_file if
4708 FILE->command_state == cs_finished.
4710 Wed Oct 4 16:09:33 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4714 Tue Oct 3 21:09:51 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4716 * read.c (read_all_makefiles): When setting elements of MAKEFILES from
4717 the contents of read_makefiles, make sure we're using the right
4720 * dir.c, glob.c [USGr3 || DIRENT]: Don't define d_ino as d_fileno.
4724 * remake.c (update_file_1): Return zero after calling remake_file if
4725 FILE->command_state != cs_finished. Test update_status thoroughly.
4727 * commands.c (execute_file_commands): Don't call notice_finished_file.
4729 * remake.c (remake_file): Return immediately after calling
4730 execute_file_commands.
4732 Sat Sep 30 14:57:05 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4734 * Version 3.56.1 (alpha).
4736 * file.h (struct file): Made `update_status' not be a bitfield, since
4737 some broken compilers don't handle it right.
4739 * function.c (expand_function: `join'): Don't clobber the pointers and
4740 then try to free them.
4742 * job.c (exec_command): Fixed & vs = precedence problem.
4744 Thu Sep 28 17:29:56 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4746 * remake.c (update_file_1): Fixed typo in debugging output.
4748 * remake.c (library_file_mtime): Search for /usr/local/lib/libLIB.a
4749 after /usr/lib/libLIB.a.
4751 Tue Sep 26 16:07:58 1989 Roland McGrath (mcgrath at helen.Berkeley.EDU)
4753 * read.c (conditional_line): For `ifeq (a, b)', swallow space after the
4756 Sun Sep 24 13:25:32 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4758 * function.c (patsubst_function): If BY_WORD and the match is not a
4759 full word, update the text pointer correctly.
4761 * function.c (expand_function: `word'): Don't lose track of the second
4762 arg's expansion and free something else instead.
4764 Fri Sep 22 16:15:29 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4768 Thu Sep 21 14:28:42 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4770 * main.c (main): Make an array of the mtimes of the makefiles before
4771 updating them, and compare their file_mtimes against this later. Don't
4772 re-exec if a makefile was successfully updated but didn't change. If a
4773 makefile failed to be remade and no longer exists, die. If a makefile
4774 failed to be remade, but changed anyway, re-exec. If a makefile failed
4775 to be remade, but is unchanged, continue on.
4777 Wed Sep 20 18:02:07 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4781 * implicit.c (pattern_search): Maintain an array CHECK_LASTSLASH of the
4782 CHECK_LASTSLASH flag values used to match each member of TRYRULES.
4783 When making FILE->stem, if CHECKED_LASTSLASH[FOUNDRULE], prepend the
4784 part of FILENAME before LASTSLASH.
4786 Tue Sep 19 17:44:08 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4788 * dir.c (dir_file_exists_p): Check for FILENAME being nil before
4789 checking for it being "".
4791 * main.c (define_makeflags): Fixed test for whether a flag/flag_off
4792 option was non-default. Also changed to generate a string that Unix
4793 Make will grok (except for FP/int values and new flags).
4795 * job.c (child_execute_job): Don't use the shell's -c option.
4796 Also fixed an off-by-one bug in the ARGV -> shell arg list copying.
4798 Mon Sep 18 15:17:31 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4802 * read.c (parse_file_seq): Check the beginning of the file name for a
4803 `./', not the two chars after the end of the name (Q rather than P).
4805 * job.c (child_execute_job): Include all of ARGV in the arg list for
4808 * main.c (define_makeflags): Don't include floating and positive_int
4811 * job.c (exec_command): Set the effective gid to the real gid before
4814 * job.c (child_execute_job): Don't clobber the arg list when execing
4817 Sun Sep 17 15:27:19 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4819 * main.c (define_makeflags): Moved all the checking inside the switch.
4821 * load.c [LDAV_BASED] (load_average): When we can't get the load
4822 average, return zero instead of running off the end.
4824 * file.c: Include variables.h.
4825 * job.c: Declare dup2 and {block,unblock}_remote_children.
4826 * file.h: Declare f_mtime.
4827 * job.c: Don't declare construct_command_argv, since job.h does.
4828 * function.c, main.c, load.c, remake.c: Include job.h.
4829 * load.c [LDAV_BASED] (load_average): Declare nlist.
4830 * variable.h: Declare print_file_variables.
4831 * job.c [!USG]: Don't declare sigsetmask.
4832 [!USG]: Declare getdtablesize.
4833 Don't declare load_average. Do declare wait_to_start_job.
4834 Declare vfork, gete[gu]id, execve.
4835 * commands.c: Declare remote_kill, getpid.
4836 * make.h: Declare kill, exit, sigblock, pipe, close, ctime, open,
4838 * make.h [not USG]: Declare sigsetmask.
4839 * job.h: Declare wait_for_children and {block,unblock}_children.
4841 * dir.c (dir_file_exists_p): If FILENAME is nil, read in the whole
4843 (find_directory): When we want to read in the whole directory, call
4844 dir_file_exists_p with nil instead of "".
4846 * file.h (struct file), job.h (struct child),
4847 variable.h (struct variable): Use bitfields for flags.
4848 * make.h (ENUM_BITFIELD): If GCC or #ifdef ENUM_BITFIELDS, define as
4850 * compatMakefile (defines): Document ENUM_BITFIELDS.
4852 Sat Sep 16 12:38:58 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4854 * Version 3.55.4 (alpha).
4856 * GNUmakefile (dist): Depend on default and doc.
4858 * load.c [LDAV_BASED]: Include <nlist.h> rather than <a.out.h>; #ifdef
4859 NLIST_NAME_UNION, use n_un.n_name instead of n_name.
4860 * compatMakefile (LOAD_AVG): Document NLIST_NAME_UNION.
4862 * job.c [USG-ish]: Don't redefine WIF{SIGNALED,EXITED} if they're
4865 Fri Sep 15 13:59:42 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4867 * glob.c, dir.c [USGr3 or DIRENT]: If neither d_ino, nor d_fileno is
4868 defined, define d_ino as d_fileno.
4870 Thu Sep 14 18:29:38 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4872 * job.c: Don't declare exec_command static.
4874 * make.texinfo (Name Index): Changed title to include directives.
4876 * Version 3.55.3 (alpha).
4878 * make.texinfo (Running: Options): Document -e.
4880 * main.c (main): Always give imported environment variables origin
4882 * variable.c (define_variable_in_set): Under -e, if ORIGIN, or an
4883 existing variable's origin, is `o_env', make it `o_env_override'.
4885 * load.c: Use the symbol KERNEL_FILE_NAME instead of KERNEL_FILE.
4886 * compatMakefile: Changed the comment for `LOAD_AVG' accordinly.
4888 Thu Sep 7 16:46:26 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4890 * Version 3.55.2 (alpha).
4892 * variable.c (print_variable_set), rule.c (print_rule_data_base),
4893 file.c (print_file_data_base): If NO_FLOAT is defined, don't use
4894 floating-point for printing statistics.
4895 * compatMakefile (defines): Document NO_FLOAT.
4897 * make.h (HASH): New macro to add the hashing value of one char to a
4899 * file.c (lookup_file, enter_file, rename_file): Use it.
4900 * dir.c (find_directory, dir_file_exists_p, file_impossible_p): Ditto.
4901 * variable.c (define_variable_in_set, lookup_variable): Same here.
4903 * variable.c, file.c, dir.c: Don't define *_BUCKETS if they are already
4906 * compatMakefile (defines): Added comment about defining NO_ARCHIVES.
4907 (ARCHIVES, ARCHIVES_SRC): New variables for {ar,arscan}.[oc].
4908 (objs, srcs): Use $(ARCHIVES) and $(ARCHIVES_SRC).
4909 * commands.c (set_file_variables), dir.c (file_exists_p),
4910 remake.c (touch_file, name_mtime), implicit.c (try_implicit_rule,
4911 pattern_search), make.h: If NO_ARCHIVES is #defined, don't do any
4914 * commands.c (set_file_variables): Don't kill the last char of
4915 directory names in $([@*<%?^]D).
4917 Wed Sep 6 15:23:11 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4919 * default.c (default_terminal_rules {%:: %,v}, {%:: RCS/%,v}): Don't
4920 run co if the target exists.
4922 * glob.c (glob_match): [!xyz], rather than [^xyz], means none of [xyz].
4924 * glob.c: Misc minor cosmetic changes.
4926 Tue Sep 5 14:49:56 1989 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
4928 * load.c [LDAV_BASED] (load_average): Check for == -1, rather than < 0
4929 to see if lseek fails. On some systems, `avenrun' is at an offset >
4930 (2**31)-1, and lseek succeeds, returning a negative value.
4932 Mon Sep 4 11:07:58 1989 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
4934 * rule.c (new_pattern_rule): Return `int' instead of `void': nonzero if
4935 the passed rule was used, zero if not.
4936 (install_pattern_rule): Pay attention to the return from
4937 new_pattern_rule, and don't set the rule's `terminal' flag or give it
4938 commands unless it's used.
4939 (create_pattern_rule): Same idea.
4941 * dir.c (find_directory): Removed unused variable.
4943 * commands.c (execute_file_commands): Removed unused variable.
4945 * read.c (record_files): Don't use NAME after freeing it.
4947 Sat Sep 2 00:33:19 1989 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
4949 * Version 3.55.1 (alpha).
4951 * function.c (string_glob): Don't add spaces after file names that
4952 aren't added. (Also means don't add spaces without checking the size
4955 * remake.c (update_goal_chain): Don't remove makefiles with cmds and no
4956 deps from the chain.
4957 * main.c (main): Do it here, before calling update_goal_chain.
4959 * remake.c (update_goal_chain): When updating fails, change STATUS even
4960 if MAKEFILES is set. Also stop remaking when updating fails if not
4961 under -k and MAKEFILES is not set.
4963 * remake.c (remake_file, update_file_1, notice_finished_file),
4964 commands.c (execute_file_commands), make.h, commands.h: The functions
4965 remake_file, notice_finished_file, and execute_file_commands no longer
4966 return values, and their callers no longer expect values returned.
4968 * remake.c (notice_finished_file): Don't set FILE's modtime to now if
4969 it is a non-target with no commands.
4971 Fri Sep 1 00:04:39 1989 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
4973 * read.c (read_all_makefiles): After freeing each element on MAKEFILES,
4974 replace it with the name stored in read_makefiles by read_makefile.
4976 * remake.c (update_file_1): Don't decide not to remake if FILE has no
4977 cmds and no deps actually changed if FILE doesn't have any deps.
4979 * file.c (remove_intermediate): Remove precious files that also have
4980 the `dontcare' flag set.
4982 * remake.c (update_file_1): Don't always remake if FILE has cmds but no
4983 deps; only if FILE is double-colon. (I don't know why this should be
4984 done for double-colon targets, but that's what Unix make does.)
4986 * load.c [LDAV_BASED] (load_average): Write error messages if the
4987 various system calls fail. Keep track of if we've failed before.
4988 The first time we fail, write a message saying -l won't be enforced.
4989 The first time we succeed after having failed, write a message saying
4990 -l will be enforced again.
4992 * remake.c [USG]: Don't #include <sys/file.h>
4994 * load.c [generic Unix LDAV_BASED]: #include <fcntl.h> #ifdef USG,
4995 else <sys/file.h> instead.
4997 * job.c [USG && !USGr3 && !HAVE_DUP2]: Remove redundant
4998 #include <errno.h> and declaration of `errno'.
4999 [...] (dup2): Fixed so it won't always lose.
5001 * default.c (default_suffix_rules: .texinfo.dvi): Copy, rather than
5002 move, the aux and index files, so the TeX run can use them.
5004 * compatMakefile: Remove redundant comment.
5006 * load.c [generic Unix LDAV_BASED]: Include <a.out.h> instead of
5007 <nlist.h>, since the `struct nlist' declaration in <nlist.h> varies
5008 more than the one in <a.out.h>.
5009 (load_average): Use the `n_un.n_name' field of the `struct nlist',
5010 since the <a.out.h> declaration uses the union.
5012 * main.c (main): For the temporary files made for stdin makefiles, set
5013 the `intermediate' and `dontcare' flags.
5014 * file.c (remove_intermediates): Don't print any messages for files
5015 whose `dontcare' flag is set. (The only files that will be
5016 intermediate and `dontcare' will be the temporary files made for stdin
5019 * job.c (exec_command): Made global.
5020 * job.h: Declare it.
5021 * main.c (main): Use exec_command when re-execing.
5023 * make.h: Declare environ.
5026 * job.c (child_execute_job): New function to perform everything done in
5027 the child side of a fork (for a job or `shell' function).
5028 (start_job): Call it.
5029 * job.h: Declare construct_command_argv and child_execute_job.
5030 * function.c (expand_function: `shell'): Use child_execute_job.
5032 Thu Aug 31 18:42:51 1989 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
5034 * function.c (expand_function: `shell'): Remove a trailing newline
5035 instead of turning it into a space.
5037 * main.c (main): Do init_siglist #ifdef HAVE_SIGLIST.
5039 * job.c [WTERMSIG || (USG && !HAVE_SYS_WAIT)]: Test each W* macro
5040 separately and define all those that aren't defined.
5042 Sat Aug 26 15:13:21 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5044 * ar.c (ar_name): Return zero for `(foo)'.
5048 * make.texinfo (Rules: Multiple Targets): Make this node's `next'
5049 pointer point to `Static Pattern'.
5050 * make.texinfo (Makefiles: MAKEFILES Variable): Make this node's `prev'
5051 pointer point to `Makefile Names'.
5053 * make.1: Renamed to make.man.
5054 * compatMakefile: Define `mandir' and `manext'.
5055 (install): Depend on $(mandir)/make.$(manext).
5056 ($(mandir)/make.$(manext)): Depend on make.man and copy it to $@.
5057 ($(bindir)/make): Use `make' rather than $<; so Unix make can grok it.
5059 Thu Aug 24 03:35:48 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5061 * variable.c (target_environment): Allow variables that start with
5064 Wed Aug 23 22:50:32 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5066 * variable.c (target_environment): Reject variables that don't start
5069 Tue Aug 22 04:14:29 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5071 * GNUmakefile (make-$(version).tar.Z): Put make.1 (the Unix manual
5072 page) in the tar file.
5074 * variable.c (target_environment): Don't write variables with origin
5075 o_default (i.e., ones from default.c).
5076 * make.texinfo (Commands: Recursion: Variables/Recursion): Document
5077 that default variables are not put in the environment.
5079 * remake.c (update_file_1): Remake all targets with commands but no
5082 Sat Aug 19 06:03:16 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5084 * remake.c (update_file_1): In the final loop, set the deps'
5085 `changed' members if they are newer than FILE.
5087 * remake.c (update_goal_chain): Under -d, print a message if we decide
5088 not to remake a makefile so as to avoid a possible infinite loop.
5090 Fri Aug 18 20:30:14 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5092 * remake.c (remake_file): Cleaned up.
5094 * commands.c (execute_file_commands): If the commands are empty, set
5095 FILE->update_status to zero before returning.
5097 * remake.c (notice_finished_file): Set `last_mtime' fields to zero
5098 instead of calling name_mtime; file_mtime will do that later if anybody
5101 Thu Aug 17 10:01:11 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5103 * make.texinfo (Rules: Wildcards: Wildcard Examples): Give this node a
5106 * Version 3.54.9 (alpha).
5108 * make.texinfo: Fixed some @nodes.
5110 * remake.c (check_dep): Don't set *MUST_MAKE_PTR if FILE doesn't exist
5111 after running update_file.
5113 * remake.c (notice_finished_file): If FILE has no commands, pretend its
5116 * remake.c (update_file_1): In the loops that call update_file on the
5117 deps, compare modtimes before and after (unless deps are still being
5118 made) and set the deps' `changed' members. Do not set the `changed'
5119 members in the loop that prints the newer/older debugging messages.
5120 * remake.c (update_file_1): If no deps changed and FILE has no
5121 commands, decide it doesn't need remaking.
5123 * remake.c (update_file_1): Print a debugging message if we take
5124 commands from default_file.
5126 * make.texinfo (Rules: Directory Search: Selective Search): Removed
5127 note about warning for `vpath' with a constant pathname, since it isn't
5128 warned about anymore.
5130 * remake.c (update_goal_chain): If MAKEFILES, remove makefiles which
5131 are targets and have no deps.
5132 * make.texinfo (Makefiles: Remaking Makefiles): Document that makefiles
5133 will not be remade if they are targets but have no dependencies.
5135 Tue Aug 15 00:00:08 1989 Roland McGrath (roland at apple-gunkies.ai.mit.edu)
5137 * remake.c (notice_finished_file): Increment files_remade for non-phony
5138 files if they didn't exist before (even if they still don't).
5140 * job.c: Include <errno.h> and declare errno.
5142 * job.c (exec_command): If the execve fails with ENOEXEC (Exec format
5143 error), return instead of exiting the child process.
5145 * job.c (start_job): In the child side, if exec_command fails, try
5148 * job.c (start_job): In the child side, call unblock_children instead
5151 * remake.c (notice_finished_file): Under -n or -q, always increment
5152 files_remade for non-phony files.
5154 * rule.c (intall_pattern_rule): Use find_percent.
5156 * vpath.c (vpath_search): Pass the `percent' members to
5159 Mon Aug 14 23:30:24 1989 Roland McGrath (roland at apple-gunkies.ai.mit.edu)
5161 * vpath.c (struct vpath): New member `percent', to hold a pointer into
5162 the pattern where the % is.
5163 (construct_vpath_list): Call find_percent on the pattern and set the
5164 new `percent' member.
5165 * read.c (read_makefile): Don't run find_percent on `vpath' directive
5168 * function.c (pattern_matches): Take new arg PERCENT, a pointer into
5169 PATTERN where the % is. If PERCENT is nil, copy PATTERN into local
5170 space and run find_percent on it.
5171 (expand_function: `filter', `filter-out'): Pass new arg to
5173 * read.c (record_files): Pass PATTERN_PERCENT to pattern_matches for
5174 static pattern rules. Save the percent pointer into implicit rule
5175 targets, and pass them to create_pattern_rule.
5176 * rule.c (convert_to_pattern): Pass new arg to create_pattern_rule.
5177 (create_pattern_rule): Take new arg TARGET_PERCENTS, nil or an array of
5178 pointers into the corresponding elements of TARGETS, where the %s are.
5180 Sun Aug 13 00:29:19 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5184 * README.templatate, README-doc.template: New files, turned into README
5185 and README-doc to go into the two distribution tar files.
5186 * GNUmakefile: Added a rule to edit the version number in
5187 README.template and README-doc.template, producing README and
5190 * remake.c (update_goal_chain): If -n or -q is in effect for a
5191 makefile, and it got updated, don't change STATUS, so we can still
5192 return -1 (meaning nothing was done). This avoids an infinite loop on
5195 Sat Aug 12 23:14:24 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5197 * remake.c (notice_finished_file): Treat -q the same as -n.
5199 * remake.c (update_goal_chain): Fixed handling of return from
5200 update_file. If -n or -q is in effect, ignore it.
5202 * job.c (start_job): Don't test for -t. We should never get called in
5205 Fri Aug 11 04:09:14 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5207 * function.c (expand_function): Removed unused variables.
5208 (handle_function): Removed unused variable.
5210 * main.c (main): Removed unused variable.
5212 Wed Aug 9 09:37:10 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5216 * remake.c (notice_finished_file): If FILE's modtime actually changed,
5217 increment files_remade.
5218 (remake_file): Don't increment files_remade.
5220 * remake.c (update_file): Don't print "up to date" messages for
5223 * job.c (child_handler): Don't set C->file->update_status to 1 if
5224 start_job returns nonzero under -n or -t.
5226 * expand.c (variable_expand): Count parens in $(foo:a=b) refs.
5228 * main.c: Removed old declaration of `glob_tilde' (which hasn't existed
5231 Tue Aug 8 23:53:43 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5233 * job.c (exec_command): Fixed to not ignore the last path component and
5234 to do the right thing with an empty path.
5236 Fri Aug 4 15:58:19 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5238 * remake.c (library_file_mtime): Look for libLIB.a, not /libLIB.a.
5239 Do VPATH search on libLIB.a, not /usr/lib/libLIB.a
5241 Thu Aug 3 20:42:00 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5243 * job.c [HAVE_SYS_WAIT or not USG]: If WIFSIGNALED is not defined by
5244 <sys/wait.h>, define it as (WTERMSIG != 0).
5246 Tue Aug 1 19:25:34 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5248 * remake.c (remake_file): If FILE has no commands and is a target,
5249 don't set its time to now. The time gets reset by notice_finished_file
5250 anyway, and it isn't needed since check_dep checks for nonexistence.
5254 * read.c (read_makefile): Don't read off the end of the string after an
5257 * job.c (exec_command): New function to search the path for a file and
5259 (start_job): Use exec_command rather than execvp.
5261 * read.c (read_makefile): Expand `include' directive args before
5262 parsing them. Allow trailing whitespace after filename.
5264 * variable.c (target_environment): Put makelevel + 1, rather than
5265 makelevel, in the `MAKELEVEL' envariable.
5267 Sat Jul 29 10:27:04 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5269 * remake.c (notice_finished_file): Don't get the new modtime of phony
5272 * remake.c (remake_file): Run commands instead of touching under -t if
5273 FILE->cmds->any_recurse is set.
5275 * commands.h (struct commands): Add new member `any_recurse', to be set
5276 nonzero if any `lines_recurse' element is nonzero.
5277 * commands.c (chop_commands): Set the `any_recurse' member.
5279 * commands.c (execute_file_commands): Split chopping of commands into
5280 lines into new function chop_commands.
5281 * commands.h: Declare chop_commands.
5283 * read.c (read_makefile): Test for a line beginning with a tab after
5284 checking for conditional lines, but before all other checks.
5286 Fri Jul 28 18:10:29 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5288 * read.c (read_makefile): Match directives against collapsed line
5289 and use that for their args.
5291 * read.c (read_makefile): Warn about extra text after `include'.
5293 Tue Jul 25 14:34:25 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5295 * make.texinfo (Rules: Directory Search: Selective Search): Fixed
5296 example to use correct `vpath' syntax.
5298 Mon Jul 24 12:10:58 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5302 * job.c (start_job): In the child side, unblock SIGCHLD.
5304 Fri Jul 21 18:25:59 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5306 * make.h: Don't include <sys/types.h> #ifdef sun.
5308 Mon Jul 17 14:29:10 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5310 * implicit.c (pattern_search): If ar_name (FILENAME), don't check for
5313 * job.c (wait_for_children): Changed "waiting for children" message to
5314 "waiting for unfinished jobs".
5316 Fri Jul 14 13:17:13 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5318 * load.c (load_average): Use an unsigned offset into kmem.
5320 Thu Jul 13 18:44:49 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5322 * variable.c (pop_variable_scope): Don't free the head of the chain of
5323 variables in each bucket twice.
5325 Tue Jul 11 06:45:24 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5327 * GNUmakefile: Include COPYING in the doc tar file.
5329 * variable.c, read.c, misc.c, job.c, function.c: Replace some identical
5330 "for" loops with next_token or end_of_token calls.
5332 Mon Jul 10 16:55:08 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5336 * compatMakefile: Documented new conditionals.
5338 * job.c: Don't define sys_siglist if HAVE_SIGLIST is defined.
5339 Don't define dup2 if HAVE_DUP2 is defined.
5341 * job.c (child_handler): Interpret the return from start_job correctly.
5343 * remake.c (update_file_1): Don't write "target not remade because of
5344 errors" message under -n or -q.
5346 * read.c: Declare getpwnam.
5348 * glob.c: Use <dirent.h> if DIRENT is defined.
5349 [USG]: Don't declare memcpy, since <memory.h> does.
5351 Fri Jul 7 20:53:13 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5353 * misc.c (collapse_line): Copy the line over in the right place.
5355 Fri Jul 7 18:33:24 1989 Roland McGrath (fsf at void.ai.mit.edu)
5357 * remake.c: Conditionalize inclusion of <sys/file.h> on not
5358 USG, since HP-UX defines a `struct file' there.
5360 Fri Jul 7 12:11:30 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5362 * job.c: If WTERMSIG is defined by <sys/wait.h>, define WAIT_T as int,
5363 and don't define other macros; this covers HP-UX.
5364 If WTERMSIG is not defined, use int or union wait based on USG and
5365 HAVE_SYS_WAIT; this covers BSD and SysV.
5367 * Version 3.54.3 (alpha).
5369 * job.c [USG and not USGr3]: Include <errno.h> and declare errno.
5371 * job.c (unblock_children [USG]): Declare child_handler.
5373 * job.c: Renamed WRETCODE to WEXITSTATUS.
5374 [HAVE_SYS_WAIT or not USG]: Undefine WTERMSIG, WCOREDUMP, and
5375 WEXITSTATUS before defining them. The HP-UX <sys/wait.h> defines them.
5377 * main.c (main): If there are no goals, fatal AFTER printing the data
5380 Thu Jul 6 22:43:33 1989 Roland McGrath (roland at apple-gunkies.ai.mit.edu)
5382 * glob.c [USG]: #define rindex as strrchr.
5384 * job.c [USG]: Include <sys/param.h> and #define getdtablesize() as
5387 Wed Jul 5 09:36:00 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5389 * Version 3.54.2 (alpha).
5391 * expand.c (variable_expand): When expanding recursive variable
5392 references (${${a}}), use the correct delimiters in the constructed
5395 Mon Jul 3 18:29:26 1989 Roland McGrath (roland at apple-gunkies.ai.mit.edu)
5397 * compatMakefile: Clear out and redefine the .SUFFIXES list because
5398 silly Sun 4 make defines .cps.h.
5400 * compatMakefile: Fix comment about -DNO_MINUS_C_MINUS_O.
5402 * remake.c: Include <sys/file.h> for O_* on 4.2.
5404 * commands.c: Define sigmask if it's not defined.
5406 Fri Jun 30 07:33:08 1989 Roland McGrath (roland at apple-gunkies.ai.mit.edu)
5408 * remake.c (remake_file): Don't always increment files_remade.
5410 * variable.c (push_new_variable_scope): Zero the new variable hash
5413 Thu Jun 29 17:14:32 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5415 * expand.c (variable_expand): When terminating the variable expansion
5416 buffer, use variable_buffer_output instead of a simply zero store,
5417 because the buffer may need to be enlarged.
5419 Wed Jun 28 16:53:47 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5423 * default.c (default_suffixes): Added `.ln'.
5424 (default_suffix_rules): Changed lint rules to use -C.
5426 Thu Jun 22 20:49:35 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5428 * job.c (start_job): Set `environ' to CHILD->environment before execing
5429 in the child process!
5431 Tue Jun 20 17:23:13 1989 Roland McGrath (roland at spiff.ai.mit.edu)
5433 * compatMakefile: Put job.h and rule.h in `srcs'.
5437 Mon Jun 19 16:25:18 1989 Roland McGrath (roland at spiff.ai.mit.edu)
5439 * job.c (start_job): If there are no more commands, return nonzero
5442 * compatMakefile (make): Pass `-f' to mv.
5444 * GNUmakefile: If `ARCH' or `machine' is defined, make $(ARCH)/*.o and
5445 $(ARCH)/make instead of *.o and make.
5447 * function.c (string_glob): Don't try to use freed storage!
5449 * read.c (readline): If there is only one byte of space in the buffer,
5450 enlarge the buffer before reading more.
5452 * arscan.c [M_XENIX]: Miscellaneous minor changes for Xenix.
5454 Sun Jun 18 13:07:45 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5456 * GNUmakefile (depend): Split commands into two lines so they won't be
5457 so long when variable-expanded.
5459 * compatMakefile: Documented MINUS_C_MINUS_O meaning. The line
5460 describing it got removed when the USG/wait stuff was documented.
5462 Sat Jun 17 22:56:54 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5466 Mon Jun 12 17:45:11 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5468 * remake.c (check_dep): Drop circular dependencies instead of fataling.
5469 (update_file_1 already does this.)
5471 * default.c (default_suffix_rules): For .s -> .o, put the -o flag to
5472 the assembler before the source file name.
5474 Sun Jun 11 12:00:52 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
5478 * make.texinfo (Features): Noted 1003.2 requirement of `+' meaning.
5480 * file.c (remove_intermediates): If !SIG, write a single "rm" command
5481 line, listing all files.
5483 * read.c (read_makefile): Don't free the storage for the passed
5484 filename, since it might not be malloc'd. When doing an included
5485 makefile, free the name's storage.
5486 (read_all_makefiles): Use variable_expand to find the value of
5487 `MAKEFILES'. Free the storage for the names of -f makefiles.
5488 (read_makefile): Allocate storage for the makefile name in the
5489 `struct file' in read_makefiles.
5491 * make.texinfo (Running: Instead of Execution): Document the effect of
5492 + and $(MAKE)/${MAKE}.
5494 * make.texinfo (Functions: Foreach Function): Document that if the
5495 iteration variable was undefined before the `foreach' call, it will be
5496 undefined after the call.
5498 * commands.c: Split into commands.c, job.h, and job.c.
5500 * rule.c (try_implicit_rule, pattern_search): Moved to new file
5503 * rule.c: Split into rule.h, rule.c, and default.c.
5504 * default.c (install_default_pattern_rules): Renamed to
5505 install_default_implicit_rules.
5506 * make.h, main.c (main): Renamed uses.
5508 * make.c: Renamed to misc.c.
5510 * make.c (main, log_working_directory, decode_switches,
5511 decode_env_switches, define_makeflags, die, print_version,
5512 print_data_base): Moved to new file main.c.
5514 * commands.c (execute_file_commands): Don't collapse backslash-newlines
5515 here. When chopping the commands up into lines, don't chop at
5517 (start_job): Collapse backslash-newlines after printing the line.
5519 * commands.c (start_job): Don't collapse backslash-newlines here.
5520 (execute_file_commands): Collapse backslash-newlines before chopping
5521 the commands up into lines.
5523 * commands.c (set_file_variables): Initialize the length counters for
5526 * commands.c (start_job): Use vfork instead of fork. Someone else says
5527 the child and parent DO have separate file descriptors.
5529 * variable.c: Split internals into variable.c, function expansion into
5530 function.c, and variable expansion into expand.c.
5531 * function.c (handle_function): New function to check for a function
5532 invocation and expand it.
5533 * expand.c (variable_expand): Use handle_function.
5534 * variable.c (push_new_variable_scope): New function to push a new
5535 empty variable set onto the current setlist.
5536 (pop_variable_scope): New function to pop the topmost set from the
5537 current setlist and free its storage.
5538 * function.c (expand_function: `foreach'): Push a new variable scope
5539 for the iteration variable and pop the scope when finished.
5540 * variable.h: Declare new functions.
5541 * variable.c (initialize_variable_output): New function to return a
5542 pointer to the beginning of the output buffer.
5543 (save_variable_output): New function to save the variable output state.
5544 (restore_variable_output): New function to restore it.
5545 * expand.c (variable_expand): Use initialize_variable_output.
5546 (allocated_variable_expand): Use {save,restore}_variable_output.
5547 * variable.c (current_setlist): Renamed to current_variable_set_list
5550 Sat Jun 10 00:11:25 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5552 * remake.c (library_file_mtime): Check for libNAME.a in the current
5553 directory before doing VPATH search.
5555 * variable.c (print_variable_set): Don't write "# Variables", and write
5557 (print_variable_data_base): Precede the variables with "# Variables".
5559 * make.c (main): Print the data base under -p after doing everything
5560 else, just before exitting. This way it gets info determined in
5561 updating the goal targets.
5563 * variable.c (print_variable_data_base): Split into print_variable,
5564 which prints one variable, and print_variable_set, which prints a set.
5565 Replaced with a call to print_variable_set for the global set.
5566 (print_file_variables): New function to print a given file's local
5569 * file.c (print_file_data_base): Call print_file_variables to print
5570 each file's local variables.
5572 * commands.c (set_file_variables): Actually define the values for
5573 the $^ and $? variables!!!
5575 * make.texinfo (Implicit: Pattern Rules: Automatic): Document new D and
5576 F versions of $^ and $?.
5578 * commands.c (start_job): In the child fork, use getdtablesize and a
5579 loop to close all file descriptors other than 0, 1, and 2. We need to
5580 do this since not only the bad stdin pipe, but also some directories,
5583 * commands.c (start_job): Use fork instead of vfork, because a vfork
5584 parent and child share file descriptors, and our child needs to diddle
5587 * variable.c (initialize_file_variables): When created a new variable
5588 set, zero out the hash table.
5590 * variable.c (target_environment): Don't use variables whose names are
5591 not made up of alphanumerics and underscores.
5593 * remake.c (update_file_1): Set the `parent' member of each dependency
5594 to FILE before updating it.
5596 * file.h (struct file): Add `parent' member.
5598 * variable.c (initialize_file_variables): Don't take second arg PARENT.
5599 Use FILE->parent instead. If FILE->parent->variables is nil, recurse
5602 * variable.h: Declare {allocated_}variable_expand_for_file.
5604 * variable.c (allocated_variable_expand): Now
5605 allocated_variable_expand_for_file, calling variable_expand_for_file,
5606 and taking second arg FILE.
5607 (allocated_variable_expand): New function, a wrapper around
5608 allocated_variable_expand_for_file, passing a nil second arg.
5610 Fri Jun 9 12:11:45 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5612 * commands.c (start_job): On the child side of the fork, always close
5613 the bad stdin file descriptor.
5615 * commands.c (struct child): New member `environment', to hold the
5616 environment for the child.
5617 (execute_file_commands): Set the new childs `environment' member to nil
5618 before calling start_job.
5619 (start_job): Set up CHILD->environment before running the commands if
5622 * make.c (main): Don't call new_environ. `shell' functions will now be
5623 run with the environment make was called with.
5625 * commands.c (child_handler): Don't check C->command_ptr before calling
5626 start_job since we now have to check C->file->cmds->command_lines and
5627 it's easier to let start_job handle all that.
5629 * commands.c (struct child): New member `command_line', to hold an
5630 index into file->cmds->command_lines.
5631 (execute_file_commands): Set the new child's `command_line' to 0 and
5632 its `commands' and `commands_ptr' to nil.
5633 (start_job): When CHILD->command_ptr runs out, increment
5634 CHILD->command_line and run the corresponding line from
5635 CHILD->file->cmds->command_lines. Run it even under -t, -q, or -n if
5636 the CHILD->file->cmds->lines_recurse element for that line is set.
5638 * commands.c (execute_file_commands): Chop CMDS up into lines, setting
5639 its `command_lines' and `lines_recurse' members, if it wasn't already
5642 * commands.h (struct commands): New members `command_lines' and
5643 `lines_recurse'. The first is an array of chopped-up lines; the second
5644 is an array of flags, each nonzero if the corresponding line is
5647 * variable.c (variable_expand_for_file): If FILE is nil, just do a
5648 vanilla variable_expand.
5649 (expand_function: `shell'): Pass second arg (as nil) to
5650 construct_command_argv.
5652 * commands.c (construct_command_argv): Use variable_expand_for_file on
5653 `$(SHELL)' and `$(IFS)' instead of lookup_variable to check those
5654 variables. This handles file-local and recursive values correctly.
5655 To support this, take an additional argument FILE.
5657 * variable.c (initialize_file_variables): New function to initialize
5658 FILE's variable set list from PARENT's setlist. PARENT is the
5659 immediate dependent that caused FILE to be remade, or nil if FILE is a
5660 goal. (When user-level per-file variables are implemented, PARENT
5661 should be passed as nil when defining per-file variables.)
5663 * variable.c (variable_expand_for_file): New function to expand a line
5664 using the variable set of a given file, and reporting error messages
5665 for the file and line number of that file's commands.
5667 * variable.h: Don't declare lookup_variable_for_file.
5669 * variable.c (lookup_variable_*): Turned back into lookup_variable. It
5670 now uses current_setlist.
5671 (global_setlist): New static `struct variable_set_list', a setlist
5672 containing global_variable_set.
5673 (current_setlist): New static `struct variable_set_list *', a pointer
5674 to the current variable set list.
5675 (define_variable): Define in the current top-level set, not the global
5678 * commands.c (set_file_variables): New function to set up the automatic
5679 variables for a file in its own variable set.
5680 (execute_file_commands): Use set_file_variables.
5682 * variable.c (new_environ): Replaced with target_environment, taking an
5683 argument FILE, and returning an environment for FILE's commands.
5685 * variable.c, variable.h: Remove all global special variable pointers.
5687 * variable.c (define_variable_for_file): New function like
5688 define_variable, but takes additional arg FILE, and defines the
5689 variable in the variable set at the top of FILE's chain.
5690 (lookup_variable_for_file): New function like lookup_variable, but
5691 takes additional arg FILE, and looks the variable up in all of FILE's
5694 * file.h (struct file): New member `variables', a `struct
5695 variable_set_list' containing the list of variable sets used in the
5696 expansion of the file's commands.
5698 * variable.c (variables): Replaced with static `struct variable_set'
5699 global_variable_set.
5700 (define_variable): Now define_variable_in_set, taking additional
5701 argument SET, the `struct variable_set' to define it in.
5702 (define_variable): Use define_variable_in_set with global_variable_set.
5703 (lookup_variable): Now lookup_variable_in_set, taking additional
5704 argument SET, the `struct variable_set' to look it up in.
5705 (lookup_variable): Use lookup_variable_in_set with global_variable_set.
5706 (lookup_variable_in_setlist): New function to look up a variable in a
5707 `struct variable_set_list' using lookup_variable_in_set.
5709 * variable.h (struct variable_set): New structure, containing a hash
5710 table and the number of hash buckets.
5711 (struct variable_set_list): New structure, containing a link for a
5712 linked-list, and a `struct variable_set'.
5714 * commands.c (start_job): Under -n, return what the recursive start_job
5715 call returns, since it might actually start a child.
5717 * make.texinfo (Rules: Wildcards): Document ~ and ~USER expansion.
5719 * commands.c (execute_file_commands): If start_job returns
5720 failure, but -t is set, set FILE->update_status to success.
5721 (start_job): If -t is set, and the commands are not recursive, return
5722 failure (is is done for -q).
5724 * remake.c (touch_file): New function to touch FILE.
5725 (remake_file): Use touch_file. When touching a file, still do
5726 execute_file_commands.
5728 * remake.c (remake_file): Don't check question_flag (-q), since we
5729 can't know here if the commands are recursive.
5731 * commands.c (start_job): Don't use the `recursive' member of
5732 CHILD->file->cmds. Instead, check for leading +s and $(MAKE) or
5733 ${MAKE} in the command line here.
5735 * commands.h (struct commands): Remove `recursive' member.
5737 * rule.c (install_default_pattern_rules): Remove use of `recursive'
5740 * read.c (record_files): Don't check commands from $(MAKE) and set
5741 their `recursive' member.
5743 * commands.c (fatal_error_signal): Treat SIGQUIT like SIGINT, SIGHUP,
5744 and SIGTERM, but don't send it to ourselves because it will cause a
5747 Thu Jun 8 20:30:04 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5751 * variable.c (variable_expand): Use allocated_variable_expand instead
5752 of expand_argument in a few places.
5754 * variable.c (allocated_variable_expand): Do static variable shuffling
5755 here instead of using expand_argument.
5756 (expand_argument): Use allocated_variable_expand.
5758 * variable.c (recursively_expand): New function to recursively expand
5759 its argument (a `struct variable'), returning the malloc'd value.
5760 (variable_expand): Use recursively_expand.
5762 Sun May 28 12:49:27 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
5764 * make.c (main): Fixed buggy fix in deciding to increase space for
5765 command-line variable definitions. (First it never did it, then it
5766 always did it; now it does it when necessary.)
5768 Sat May 27 14:01:54 1989 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
5770 * make.c (main): Fixed bug in deciding to increase space for
5771 command-line variable definitions.
5773 Fri May 26 15:48:01 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5775 * read.c (multi_glob): Use allocated_expand_variable for checking
5776 `HOME' variable for ~ expansion, since this may be called from inside a
5777 `wildcard' function expansion.
5779 * variable.h: Declare allocated_expand_variable.
5781 * variable.c (allocated_expand_variable): New function to do variable
5782 expansion in an allocated buffer, rather than the static one.
5784 * make.c (main): Don't set glob_tilde (it no longer exists).
5786 * variable.c (string_glob): Use multi_glob and parse_file_seq.
5788 * read.c (multi_glob): Do ~ expansion here.
5790 * glob.c (glob_tilde, glob_filename): Removed ~ expansion.
5792 * variable.c (define_variable, lookup_variable): Use a smarter hashing
5793 algorithm (the same one used for files and directories).
5794 (VARIABLE_BUCKETS): Increased to 523.
5796 * file.c (enter_file, lookup_file, rename_file): Use a smarter hashing
5797 algorithm, spreading the bits about somewhat.
5799 * make.c (log_working_directory): Under `-p', precede the directory
5802 * make.c (print_version): Under `-p', precede each line with a `#'.
5803 (print_data_base): Precede the header line with a `#' and include the
5804 date and time on it.
5806 * vpath.c (print_vpath_data_base): Precede non-directive
5809 * commands.c (print_commands): Precede the non-command line with a `#'.
5811 * rule.c (print_rule_data_base), file.c (print_file_data_base): Precede
5812 non-rule lines with `#'s.
5814 * dir.c (print_dir_data_base): Precede all lines with `#'s.
5816 * variable.c (print_variable_data_base): Changed format so that it can
5817 be makefile input. Lines that are not variable definitions are
5818 preceded with `#'. Nonrecursive variable definitions are made with all
5819 dollar signs doubled to reproduce the initial value. Recursive
5820 variable definitions containing newlines are done with `define'
5821 directives. Nonrecursive variable definitions containing newlines, and
5822 variable names containing :, =, or newlines, will come out garbled.
5824 Wed May 24 00:20:04 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5828 Tue May 23 19:18:00 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5830 * variable.c (expand_function: `filter'/`filter-out'): Use
5831 find_percent instead of pattern_p.
5833 * variable.c (expand_function: `patsubst'): Pass new args (both nil)
5835 (variable_expand): For $(var:pat%=rep%) references, pass new args to
5836 patsubst_expand so as to avoid find_percent and thus disallow
5839 * read.c (record_files): Pass new args to patsubst_expand.
5841 * variable.c (patsubst_expand): Take two new args: PATTERN_PERCENT
5842 and REPLACE_PERCENT. Each of these, if non-nil, means that PATTERN
5843 (or REPLACE) has already been run through find_percent, and
5844 PATTERN_PERCENT (or REPLACE_PERCENT) is the result.
5846 * make.h: Declare find_percent instead of pattern_p.
5848 * read.c (pattern_p): Changed to find_percent, returning a pointer
5849 to the %, or nil if there is none.
5850 (record_files): Take another arg, PATTERN_PERCENT, a pointer to the
5852 (read_makefile): Pass PATTERN_PERCENT to record_files.
5854 * make.texinfo (Rules: Static Pattern: Static Usage,
5855 Rules: Directory Search: Selective Search,
5856 Functions: Text Functions): Documented that `%' can be quoted.
5858 * variable.c (expand_function: `filter'/`filter-out'): Use pattern_p
5859 to allow quoted %s in patterns.
5861 * variable.c (patsubst_expand): Use pattern_p on PATTERN and REPLACE
5862 to allow quoted %s. Quoting backslashes are removed from REPLACE
5863 even if PATTERN contains no unquoted %.
5865 * read.c (pattern_p): Made global.
5866 * make.h: Declare pattern_p.
5868 * read.c (pattern_p): New function to search for an unquoted % in a
5869 string. Backslashes quote %s and backslashes. Quoting backslashes
5870 are removed from the string by compacting it into itself. Returns
5871 nonzero if an unquoted % was found, zero if not.
5872 (record_files): Use pattern_p to check for implicit rules.
5873 (read_makefile): Use pattern_p to check for static pattern rules.
5874 Also use it to allow quoted %s in `vpath' patterns; warn about
5875 `vpath' patterns with no %s.
5877 Mon May 22 16:31:52 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
5879 * glob.c (glob_filename): Replace a `1' with the `l' that should
5880 have been there. This incidentally stops it from dumping core.
5882 * glob.c (glob_filename): If the path is just a directory, with no
5883 file name pattern, return the directory alone.
5885 * glob.c (glob_tilde): New global variable (int), defaults to zero.
5886 (glob_filename): If glob_tilde is nonzero, expand ~ or ~USER.
5888 * variable.c (string_glob): Keep a static allocated buffer for file
5889 names taken from the list, instead of allocating and freeing one
5892 Fri May 19 18:06:26 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5894 * make.c (decode_switches): Get floating numbers from the right string.
5896 Sun May 14 13:48:04 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
5898 * commands.c (delete_child_targets): When deleting `also_make'
5899 files, include the target's name in the message:
5900 make: *** [foo] Deleting file `bar'
5902 Sat May 13 17:34:26 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
5904 * make.c (max_load_average, default_load_average): Default to -1.
5906 * load.c (wait_to_start_job): Return if max_load_average is < 0.0,
5909 Fri May 12 16:08:05 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
5911 * variable.c (variable_buffer_output): Don't try to do pointer
5912 arithmetic between objects not in the same array.
5914 Wed May 10 15:55:29 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5916 * rule.c [M_XENIX] (default_suffix_rules, default_variables): Minor
5917 changes to allow for strange compiler syntax.
5919 * rule.c (default_variables): Don't include "> $@" in
5920 $(PREPROCESS.S), since it's already in the .S.s rule.
5922 * file.c (enter_file): Make a new double-colon file the `prev'
5923 member of the bottom `prev' file (the one whose `prev' is nil).
5925 * read.c (do_define): Append newlines after copying the lines into
5926 the value buffer, so we end up with a trailing newline.
5928 * make.c (print_version): If the global variable
5929 `remote_description' is not nil or "", append "-%s" (its value) to
5931 * remote-*.c: Define remote_description appropriately.
5933 Sun May 7 15:15:53 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5935 * commands.c (error_status): Converted to new function child_error,
5936 taking new arguments TARGET_NAME and IGNORED, and writing an error
5937 message: "*** [target] Error 1" (or signal #, etc.), appending
5938 " (ignored)" if IGNORED is nonzero.
5939 (child_handler): Use child_error instead of error_status.
5941 * compatMakefile (all): Don't depend on `doc'.
5943 * compatMakefile (clean): Don't remove make-info*.
5944 (realclean): New rule, depends on `clean', removes tags, TAGS,
5945 and all Info and TeX files.
5947 Thu May 4 17:00:46 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5949 * variable.c (print_variable_data_base), file.c
5950 (print_file_data_base), rule.c (print_rule_data_base),
5951 Use floating-point for averages and percentages.
5953 * make.c (print_data_base): Print messages before and after the data
5956 * commands.c (print_commands): Changed output format to separate
5957 lines in commands and prefix them with tabs.
5959 * dir.c (print_dir_data_base): Changed output format slightly.
5961 * vpath.c (struct vpath, construct_vpath_list,
5962 selective_vpath_search): Remove the `exists' member and its uses.
5964 * vpath.c (print_vpath_data_base): New function to print all
5965 selective and general VPATH search paths (for -p).
5967 * make.c (print_data_base): Call print_vpath_data_base.
5969 * file.c (print_file_data_base): Changed format to look more like a
5970 makefile rule. Now reports all information in the `struct file'.
5972 * rule.c (print_rule_data_base): Changed format of display from:
5978 references nonexistent subdirectory.
5979 Also include number and percent that refer to nonexistent
5982 Thu Apr 27 15:45:40 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5984 * make.c (main): Figure out the level of recursion before writing
5985 the `Entering directory' message.
5986 * variable.c (define_automatic_variables): Don't figure out the
5987 level of recursion from `MAKELEVEL'. It's now done in main.
5991 Wed Apr 26 16:39:17 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5993 * commands.c (child_handler): Set `update_status' to zero when there
5994 are no more commands.
5996 * make.c (log_working_directory): If MAKELEVEL > 0, indicate the
5997 recurson in the message (make[1]: ...).
5999 * commands.c (child_handler): Change status to `cs_finished' when
6002 * commands.c (start_job): Return 0 (success) if there were no more
6003 commands for the child.
6004 (child_handler): Change the status to `cs_finished' when start_job
6005 fails to start the commands.
6007 * make.c (main): Don't handle SIGEMT if it's not defined.
6008 Do handle SIGDANGER if it is defined.
6010 * commands.c (child_handler): Reorganized inner loop so that it
6011 doesn't try to inspect the child before finding it.
6013 Tue Apr 25 16:28:24 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6015 * make.c (end_of_token): Fixed bug wherein backslashes caused
6020 * make.texinfo (Implicit: Pattern Rules: Automatic): Document
6021 setting of `$*' for explicit rules. Add note clarifying that
6022 automatic variables, though referred to in the documentation as
6023 `$<', etc. are no different than `$(<)', etc.
6025 Fri Apr 21 18:00:12 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6027 * file.c (enter_file): Don't strip leading `./'s.
6029 * read.c (parse_file_seq): Strip leading `./'s.
6031 Thu Apr 13 17:26:41 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6033 * make.texinfo (Commands: Parallel, Running: Options): Document that
6034 -l with no argument removes a previous load limit.
6036 * make.c (struct command_switch): New member `default_value'.
6037 (default_job_slots): Default value (of 1) for -j.
6038 (default_load_average): Default value (of 0, unlimited) for -l.
6039 (command_switches): Use default values for -j and -l.
6040 Also, -l without an arg now means no load limit.
6041 (define_makeflags): Don't write positive_int or floating options
6042 whose values are their defaults.
6044 * make.c (main): Under -w, write a `Leaving directory' message
6047 Tue Apr 11 16:46:29 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6051 * Makefile: Provide an easy place for system-specific definitions
6052 (-DUSG, etc.) and extra object files (for whatever).
6054 * make.texinfo: Miscellaneous fixes from RMS.
6056 Mon Apr 10 19:31:34 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6058 * rule.c (pattern_search): Put rules with `subdir' flags set in
6059 TRYRULES, since these might be valid with VPATHs. In the TRYRULES
6060 loop, don't do lookup_file or file_exists_p calls for dependencies
6061 of rules with `subdir' flags set, but still do vpath_search calls
6062 and intermediate-file searches.
6064 Thu Apr 6 16:33:00 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6066 * make.texinfo (Implicit: Pattern Rules: Automatic): Document the
6067 new definition of $* for explicit rules.
6069 * commands.c (execute_file_commands): If FILE->stem is nil, figure
6070 out if FILE->name ends in a suffix in the .SUFFIXES list; if so,
6071 store the name sans suffix in FILE->stem (and $*).
6073 Wed Apr 5 15:24:48 1989 Roland McGrath (mcgrath at helen.Berkeley.EDU)
6075 * file.c (remove_intermediates): Don't use `file_exists_p' to check
6076 for the existence of intermediate files, because the hashed
6077 directories will probably be out of date.
6079 * commands.c (child_handler): Free the good stdin before running the
6082 * commands.c [USG] (init_siglist): Don't case SIGEMT if it's not
6083 defined. Do case SIGDANGER (for IBM RT) if it is defined.
6085 * commands.c: Changed `SYS_WAIT' to `HAVE_SYS_WAIT'.
6086 (child_handler): Use `wait3' if HAVE_SYS_WAIT is #defined.
6088 * file.c (enter_file): If any `./'s are stripped off, allocate a new
6089 copy of the shortened name.
6091 * rule.c (pattern_search): Allocate the right length strings for
6092 `also_make' members.
6094 Sat Apr 1 13:28:38 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6098 * GNUmakefile: Make a separate tarfile of the DVI and info files.
6100 * make.c (define_makeflags): If a switch that takes an argument has
6101 its default value, put the switch in MAKEFLAGS with no arguments.
6103 * make.c (command_switches): Pass `-l' in MAKEFLAGS.
6105 Wed Mar 29 17:50:05 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6107 * GNUmakefile: Don't include the DVI and info files in the dist.
6109 * commands.c (child_handler): Don't call
6110 check_changed_{directories,vpaths}.
6112 * make.h: Don't declare check_changed_{directories,vpaths}.
6114 * vpath.c (check_changed_vpaths): Removed this function.
6116 * dir.c (struct directory): Remove `modtime' member.
6117 (find_directory): Don't set `modtime' member.
6118 (check_changed_directories): Removed this function.
6120 * remake.c (update_file_1): Set FILE->command_state to cs_finished
6121 if it didn't need to be remade.
6123 * remake.c (update_file): Only write the "up to date" message if the
6124 target went from `not_started' state to `finished' state without
6125 incrementing the count of files remade.
6127 * commands.c [USG] (init_siglist): If both SIGCHLD and SIGCLD are
6128 defined, don't put them both in the `switch'.
6130 Tue Mar 28 15:37:02 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6132 * file.c (rename_file): Change FILE's name!!!
6134 * rule.c (create_pattern_rule): Set the `terminal' member of the new
6135 rule after calling new_pattern_rule, which zeros it.
6137 * rule.c (default_variables): Use $(C++) in $(COMPILE.cc)!
6139 Sun Mar 26 15:52:30 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6141 * Makefile: Added a `clean' target.
6143 Fri Mar 24 15:08:46 1989 Roland McGrath (mcgrath at helen.Berkeley.EDU)
6147 * file.c (rename_file): If a `struct file' for the renamed-to name
6148 exists, and it is a target or has deps or commands, barf.
6149 If not just remove the old one for put in the new one.
6151 * remake.c (update_file_1, check_dep): Changed it back so that equal
6152 modtimes to NOT make dependencies be considered newer. RCS checks
6153 out files with equal modtimes as the RCS files, so this screws it.
6155 * make.h, glob.c: If __GNUC__ is defined, use __builtin_alloca.
6157 * Makefile: Use variables `ALLOCA' and `ALLOCASRC' so systems
6158 without a good standard alloca can get it from the Emacs
6159 distribution (or somewhere).
6161 * dir.c: Don't include <sys/stat.h>, since make.h does.
6163 * make.c: Removed debugging version of getwd.
6165 Thu Mar 23 16:16:27 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6169 * remake.c (update_file_1): If a dependency loop is found, don't
6170 fatal. Emit an error message and remove the dependency.
6172 * remake.c (library_file_mtime): Fixed to use the right names.
6173 (update_file_1, check_dep): Consider a dependency "newer" than its
6174 dependent if they have the same modification time.
6176 Wed Mar 22 19:31:35 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6178 * file.c (remove_intermediates): Don't try to remove nonexistent files.
6180 Mon Mar 20 10:21:22 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6184 * rule.c (default_variables): Set F77 to $(FC) and F77FLAGS to
6185 $(FFLAGS) so explicit rules expecting these (which are in System V)
6186 will work. However, there is no way to make setting these affect
6187 the implicit rules, unless we trash FC and FFLAGS (which BSD uses).
6188 [USG]: Set GET to `get' rather than `/usr/sccs/get'.
6190 Sun Mar 19 20:00:27 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6192 * vpath.c (construct_vpath_list): Don't replace VPATH[ELEM] with
6193 dir_name (V), because the latter may get freed.
6195 Sat Mar 18 15:01:39 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6199 * make.texinfo: Cleaned-up edition 0.1 Beta from RMS and Bob Chassell.
6201 * file.c (rename_file): If a file with the new name already existed,
6202 use the same storage space, after freeing the old file's name, deps,
6203 and `also_make' member, preserving the link in the chain.
6204 Also write an error message telling the user to report the incident;
6205 I don't think this should be able to happen, but I'm not sure.
6207 * file.c (rename_file): Don't add the hash values of the old and new
6208 names together! Reset HASHVAL before computing the second value.
6210 * dir.c (check_changed_directories): Zero the new file hash table
6211 after allocating it.
6213 * dir.c (dir_file_exists_p): If FILENAME is "", return 1 if the
6216 * vpath.c (check_changed_vpaths): New function to run through the
6217 search paths of all VPATHs, making the `exists' members correspond
6220 * commands.c (child_handler): Call check_changed_vpaths.
6222 * make.h: Declare check_changed_vpaths.
6224 * vpath.c (struct vpath): New element `exists', an array of char
6225 flags; exists[N] is nonzero if searchpath[N] exists.
6226 (construct_vpath_list): Set the `exists' member.
6227 (selective_vpath_search): Don't search directories whose `exists'
6230 * read.c (read_makefile): Set the `dontcare' flag of makefiles
6231 from the MAKEFILES variable if they were not mentioned anywhere but
6232 in the MAKEFILES variable.
6234 * read.c (read_makefile): Don't write an error message if fopen
6235 fails for a makefile from the MAKEFILES variable.
6237 * dir.c (struct directory): Add `modtime' member to record the
6238 modification time of the directory when it was opened.
6239 (check_changed_directories): New function to check all known
6240 directories; if their modtimes have changed since they were opened,
6241 their file tables are cleared and they are reset to be read in.
6243 * commands.c (child_handler): Call check_changed_directories before
6245 make.h: Declare check_changed_directories.
6247 Tue Mar 14 20:07:13 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6251 * make.c (print_version): Made the copyright say 1988, 1989.
6253 * read.c (read_all_makefiles): Don't set *MAKEFILES to the name of
6254 the end of the read_makefiles chain, since the latter may be from an
6255 included makefile. (Why did I do this before?)
6257 * make.c (main): Set argv[0] to "" if it was nil. Don't put the
6258 command-line variable definitions into argv[0], only into the MAKE
6261 Sun Mar 5 20:44:08 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6263 * ar.c (ar_member_date, ar_touch): Remove the trailing ) from the
6266 Fri Mar 3 18:15:15 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6268 * commands.c (construct_command_argv): Initialize NEW_ARGV to 0. At
6269 `slow' label, if NEW_ARGV is not 0, free it; then allocate 4 strings.
6271 Tue Feb 28 14:29:39 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6275 * COPYING, make.texinfo: New GNU General Public License, version 1.
6277 * *.c, *.h, Makefile: New copyright notices for the new GNU General
6278 Public License, version 1.
6280 * commands.c [USG]: Define WRETCODE correctly (again).
6282 * variable.c (expand_function: `shell'): Don't capture the standard
6283 error output of the shell command.
6285 * ar.c (ar_touch, ar_member_date): Allocate MEMNAME with the right
6288 * load.c [not UMAX] (load_average): Don't clobber the first nlist
6289 member when trying to set the second!
6291 Thu Feb 23 13:13:53 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6293 * commands.c (child_handler): Really ignore errors under -i and for
6294 - lines, don't just print a different message.
6296 * make.c (decode_switches): Fixed handling of arguments (or lack
6297 thereof) to switches.
6299 Wed Feb 22 16:25:39 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6301 * commands.c (construct_command_argv): Don't clobber LINE when
6302 checking the IFS variable.
6304 Sun Feb 19 11:17:07 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6306 * load.c [UMAX, not NO_LDAV] (load_average): Return 0.0 rather than
6307 randomness when calls fail.
6311 * commands.c (fatal_error_signal): If handling a user kill signal
6312 (TERM, INT, HUP), wait for the children without printing the
6313 "Waiting for children" message, since they will die quickly.
6317 * remote-stub.c (remote_status): Take another arg, BLOCK. If this
6318 is nonzero block waiting for remote children. If not, return 0 if
6319 we would have to block.
6321 * commands.c (child_handler) [not USG]: If called as a signal
6322 handler, use wait3 and don't block.
6323 [USG]: If called as a signal handler, return after handling one child.
6325 Sat Feb 18 13:37:04 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6327 * file.c (snap_deps): Process all double-colon entries of each file,
6328 not just the first one.
6332 * remote-stub.c: remote.c renamed.
6333 remote.c: Just include remote-stub.c
6335 * commands.c (child_handler): If we were called as a signal handler,
6336 return after handling one child.
6338 * commands.c [not USG]: Include <signal.h> and define `sigmask' if
6340 (block_children, unblock_children): Use sigmask rather than
6341 bitshifting explicitly (and incorrectly).
6343 * remote.c (remote_kill): New function to send a signal to a
6346 * commands.c (fatal_error_signal): If we get a SIGTERM, send one to
6347 each living child. If we get a SIGTERM, SIGINT, or SIGHUP, delete
6348 all pending targets before waiting for children.
6349 (struct child): Add new member `deleted'.
6350 (start_job): Initialize `deleted' member to 0.
6351 (delete_child_targets): New function to delete a given child's
6352 targets, unless the `deleted' flag in the `struct child' says they
6353 have already been deleted. Sets this flag before returning.
6355 Thu Feb 16 18:32:07 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6357 * commands.c [USG]: Define `WRETCODE' correctly (X & 0xff00).
6359 Tue Feb 14 16:05:00 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6361 * commands.c (construct_command_argv): Don't make the 0th element of
6362 the argument list be "sh" when executing /bin/sh, because start_job
6363 uses the 0th element as the program name.
6365 Sun Feb 12 17:42:05 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6369 * read.c (readline): Put a null in the beginning of the buffer
6370 before starting the reading loop.
6372 * read.c (read_makefile): Made main reading loop while
6373 !feof (infile), and removed EOF check after calling readline.
6375 Sun Feb 5 19:52:38 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6377 * remote.c (block_remote_children, unblock_remote_children): New
6378 (stub) functions to block and restore asynchronous notification of
6381 * commands.c (block_children): Call block_remote_children.
6382 (unblock_children): Call unblock_remote_children.
6383 (child_handler): If called as a signal handler, block remote
6384 children on entry and unblock them before returning.
6386 * commands.c (child_handler): For unknown children, if they are
6387 remote, give their remote ID; if local, give their PID and make's.
6389 * commands.c (execute_file_command): Don't put a new child in the
6390 chain unless start_job succeeds. Block children before calling
6391 start_job, and unblock them after putting the child in the chain and
6392 incrementing `job_slots_used' (if start_job succeeded).
6394 * commands.c (block_children, unblock_children): Make these globally
6395 visible (not `static').
6396 commands.h: Declare block_children and unblock_children.
6398 * variable.c (expand_function: `shell'): Use
6399 `shell_function_completed'. Block children before forking and
6400 unblock after `shell_function_pid' is set properly and
6401 `shell_functon_completed' is reset to 0.
6403 * commands.c (child_handler): When the child of the `shell' function
6404 completes, set `shell_function_completed' to 1 if it actually ran,
6405 or -1 if it didn't (due to fork or exec failure).
6407 * commands.c (block_children, unblock_children): New functions to
6408 block and unblock the child termination signal.
6409 (wait_for_children): Use block_children and unblock_children.
6410 (execute_file_commands): Block children around the critical section
6411 wherein a new child is put on the chain.
6413 * make.c (main): Change the environment to contain the correct
6414 MAKELEVEL before re-execing.
6416 Sat Feb 4 18:28:48 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6420 Fri Feb 3 16:36:49 1989 Roland McGrath (mcgrath at helen.Berkeley.EDU)
6422 * rule.c (default_variables): Fixed $(LINK.c).
6424 Wed Feb 1 18:05:07 1989 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
6428 * version.c: Removed copyright notice, since this is a one-line file.
6430 * commands.c (error_status): Made it return BUF, rather than running
6431 off the end (this apparently worked on Sun 3s for some reason).
6433 * ar.c, commands.c, dep.h, load.c, make.c, make.h, read.c, remake.c,
6434 rule.c, variable.c, Makefile: Changed copyrght notices to cover 1989.
6436 Mon Jan 30 15:51:28 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6440 Fri Jan 27 20:09:24 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6442 * remake.c (remake_file): Don't touch phony targets.
6444 * rule.c (convert_to_pattern): Fixed an incorrect length passed to
6447 * variable.c (expand_function: `shell'): Close the read side of the
6448 pipe on the parent side of the fork.
6450 * commands.c (start_job): On the child of the fork, close the
6451 BAD_STDIN fd if we're not using it.
6453 * read.c (record_files): A file beginning with a dot can be a
6454 default target if it also contains a slash (as in `../foo').
6456 * commands.c (wait_for_children): For BSD, block SIGCHLD rather than
6457 ignoring it to avoid a race condition when child_handler is returning.
6459 * commands.c (child_handler): Do blocking waits.
6460 (error_status): Return a string describing exit status. (Split out
6463 * read.c (multi_glob): Change VECTOR to VEC for Alliant.
6465 Thu Jan 5 00:06:51 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6469 * make.texinfo (Features): Noted $(foo:PAT=SUB) from SunOS 4.0.
6471 * make.texinfo (Options/Recursion): -d and -p go in the environment.
6473 * load.c: Include "commands.h".
6475 Wed Jan 4 17:49:25 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6477 * make.c (switches): -d and -p can come from the environment and are
6480 * read.c (record_files): Fixed the checking for duplicate deps so it
6481 doesn't clobber the first one.
6483 * make.texinfo: Documented default implicit rule changes.
6485 * rule.c: Revamped default suffix rules. They now use Sun's style
6486 of using variables `COMPILE.c', `LINK.c', etc. for each suffix, and
6487 use `TARGET_ARCH' and `TARGET_MACH' variable where appropriate.
6488 Also support Modula-2 compilation (suffixes .sym, .def, and .mod).
6489 Ratfor Yacc support is gone, since nobody has yacc -r.
6490 All EFL support is gone, since nobody uses EFL.
6492 * ar.c, arscan.c: Don't assume `long int' and `int' are the same.
6494 * commands.c [USG]: Fixed wait status bit encoding.
6495 [USG and not USGr3] (dup2): Define this for SysVr2.
6497 * make.h, dep.h, make.c [iAPX286]: Make allowances for this
6498 brain-damaged compiler.
6500 * make.texinfo (Variables: Flavors): Fixed a typo.
6502 Tue Jan 3 18:09:31 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6504 * ar.c (ar_member_date, ar_touch): Truncate member names to 15 chars.
6508 * commands.c [SYS_WAIT]: If this is defined, use BSD <sys/wait.h>
6509 and wait3 even if USG.
6511 * read.c (record_files): Defining .DEFAULT with no deps or commands
6512 clears its commands.
6514 * rule.c (default_suffixes): Added `.sh'.
6515 (default_suffix_rules): Added single-suffix .sh rule, copies source
6516 to target and makes target executable.
6517 make.texinfo (Catalogue of Rules): Documented .sh rule and its use
6518 in conjunction with SCCS.
6520 * rule.c (set_default_suffixes): Define variable `SUFFIXES' to the
6521 default list ("" under -r).
6522 make.texinfo (Suffix Rules): Document `SUFFIXES' variable.
6524 * rule.c (default_variables), make.texinfo (Implicit Variables):
6525 Variable AR defaults to `ar', ARFLAGS to `rv', and RM to `rm -f'.
6527 * rule.c (install_default_pattern_rules): Default variables are made
6529 (default_variables): Added "CPP", defined to "$(CC) -E".
6530 (default_suffixes): Added `.S', before `.s'.
6531 (default_suffix_rules): New rule for .S to .s, runs CPP.
6532 All rules that use CPP now include "$(CPPFLAGS)".
6533 make.texinfo (Catalogue of Implicit Rules, Implicit Variables):
6534 Documented above changes.
6536 * commands.c [USG] (sys_siglist): Don't define.
6537 [USG] (init_siglist): New function to initialize sys_siglist.
6539 * make.texinfo (Variables: Reference): Documented `$(foo:PAT=SUB)'
6542 * variable.c (variable_expand): A reference `$(foo:PAT=SUB)' is
6543 equivalent to `$(patsubst PAT,SUB,$(foo))'.
6545 * variable.c (variable_expand): Free the storage for the expansion
6546 of a recursive variable when it is nod longer needed.
6548 * variable.c (variable_expand): When checking for `$($(foo))', use
6549 lindex so as not to search for the second `$' outside the parens.
6551 * make.c (struct stringlist, main, decode_switches): Changed `index'
6554 Sat Dec 24 16:02:32 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6556 * commands.c (wait_for_children [USG]): Handle SIGCLD with SIG_DFL,
6557 rather than SIG_IGN. Ignoring SIGCLD reportedly makes wait return -1.
6559 * arscan.c [USGr3]: Define PORTAR to 1 (as with sun386).
6560 (ar_scan [USGr3]): Remove trailing slashes from member names.
6562 Thu Dec 22 17:54:05 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6564 * make.texinfo (Makefiles: Overriding Makefiles): New node
6565 documenting use of .DEFAULT to have one makefile defer unmakeable
6568 * make.texinfo (Implicit: Using Implicit, Implicit: Last Resort):
6569 Mention empty commands and xref node `Empty Commands'.
6571 Wed Dec 21 20:12:40 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6575 * make.c (struct command_switch, command_switches, et al): New
6576 member `noarg_value', if not nil, ptr to value to use if no arg is
6577 given to a switch that would otherwise require one. The -j option
6578 can now be given w/o an arg, to mean infinite jobs.
6579 * commands.c: If job_slots is zero, infinite jobs.
6581 * read.c (read_all_makefiles, read_makefile): Make makefiles precious.
6583 * make.c (decode_switches): For a positive_int or floating option,
6584 if we moved to the next argument word, but found no argument for the
6585 option, move back to the correct word.
6587 * make.c (decode_switches): If we got any unknown options, die after
6588 processing all arguments.
6590 * GNUmakefile: Moved `include depend' to the end, so the default
6591 goal will be set before then.
6593 * load.c (wait_to_start_job [Unix, UMAX]): Merged into one version
6594 under #ifdef LDAV_BASED. Only loop while we have jobs running.
6595 Sleep for increasing amounts (increase one second per iteration)
6596 before checking the load average (after the first check).
6597 Get the load average from function load_average.
6598 (wait_to_start_job [not LDAV_BASED]): Always return.
6599 (load_average [UMAX]): Fetch load average for Encore UMAX.
6600 (load_average [not NO_LDAV]): Fetch load average from /dev/kmem.
6601 [not NO_LDAV]: Define LDAV_BASED.
6603 Tue Dec 20 18:54:50 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6607 * commands.c (wait_for_children): Take second arg, ERROR. If
6608 nonzero, and there are children, print a message on stderr.
6609 (execute_file_commands, fatal_error_signal): Pass second arg.
6610 * make.c (die), remake.c (update_goal_chain), variable.c
6611 (expand_function: `shell'): Ditto.
6613 Sat Dec 17 01:05:38 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6615 * commands.c (start_job): Call wait_to_start_job before forking.
6617 * load.c (load_average): Converted to wait_to_start_job.
6619 * remote.c: New file for remote execution functions.
6620 (start_remote_job_p): Return nonzero if the next job should be run
6622 (start_remote_job): Start a remote job and return an ID for it.
6623 (remote_status): Get status of dead remote children.
6625 Fri Dec 16 16:51:07 1988 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
6627 * commands.c (start_job): If start_remote_job_p () returns nonzero,
6628 call start_remote_job to start the job rather than fork and exec.
6631 * commands.c (execute_file_commands): Moved load average checking to
6634 * commands.c (child_handler: USG): Record the pid wait returns.
6636 * load.c (UMAX): Added some #include's needed for UMAX.
6638 * read.c (multi_glob), variable.c (string_glob): Ignore a (char **)
6639 -1 return from glob_filename.
6641 * variable.c (variable_expand): Make sure we don't increment past
6642 the end of the string we were passed.
6644 * variable.c (variable_expand): Terminate the expansion.
6646 * file.c (rename_file): If there is already a file under the new
6647 name, set its contents equal to FILE's (ick).
6649 * variable.c (define_automatic_variables): Pass all the args to
6650 define_variable when defining MAKELEVEL!
6652 * commands.c (execute_file_commands): If max_load_average > 0, and
6653 we have children running, don't start up another child until the
6654 load average goes below max_load_average.
6656 * make.c: New variable `max_load_average'.
6657 (struct command_switch, decode_switches, decode_env_switches):
6658 Handle floating-point (double) args.
6659 (command_switches): Added `-l' switch to set `max_load_average'.
6661 * load.c (load_average): New file and function to return a double
6662 that is the current load average (1.00 scale).
6663 * GNUmakefile, oldMakefile: Pass flags in $(LOAD_AVG) for load.c.
6665 Thu Dec 15 15:22:08 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6667 * Makefile: Renamed to oldMakefile.
6668 * GNUmakefile: Make Makefile from oldMakefile and depend.
6670 * read.c (read_all_makefiles): When putting the default makefiles in
6671 the read_makefiles chain so they will be remade, put them in the
6674 * remake.c (update_goal_chain): If MAKEFILES is nonzero, always make
6675 in serial, and return as soon as one goal whose `changed' member is
6676 nonzero is successfully remade.
6678 * commands.c: Don't include <sys/fcntl.h>.
6680 * commands.c (construct_command_argv): Added ` to sh_chars.
6682 * make.h: Don't declare construct_makeflags.
6684 * make.c (main): Set up MAKEFLAGS and MFLAGS and make an environment
6685 both before and after reading the makefiles, so the makefiles can
6686 use them and possible change them, and later children will get the
6688 (construct_makeflags): Replaced with define_makeflags (static void),
6689 which defines the two variables.
6690 * variable.c (define_automatic_variables): Don't define MAKEFLAGS
6693 Mon Dec 12 14:40:31 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
6697 * commands.c (child_handler): Reset the handler to ourselves when
6698 called for USG, since it has no safe signals.
6700 * commands.c: For USG, use an int rather than a `union wait' for
6701 wait calls, and dissect it with bitmasks.
6702 (child_handler): No wait3 system call in USG. Since we can't
6703 protect from hanging, always return immediately if we have no
6704 children we know about and we're not running a `shell' function.
6705 (There is still the danger of hanging waiting for a child that died
6706 without our being notified.)
6708 * remake.c: Include <fcntl.h> instead of <sys/file.h>. What we need
6709 is really in <fcntl.h>, and while BSD <sys/file.h> includes
6710 <fcntl.h>, USG doesn't.
6712 * make.c (main): Figure out the program name before doing anything
6713 which might need it (in a call to error or fatal).
6715 * dir.c, glob.c: Use `struct dirent' and <dirent.h> for USGr3.
6717 * arscan.c (ar_scan): Added missing & before buf (which is an int)
6718 if SARMAG is not defined (SysV).
6720 Fri Dec 9 18:44:13 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
6724 * dir.c (find_directory, dir_file_exists_p): Keep track of how many
6725 directories we have open and don't let it be more than
6726 MAX_OPEN_DIRECTORIES (currently 10).
6728 * variable.c (expand_function: `foreach'): Use expand_argument
6729 rather than variable_expand so each repetition doesn't clobber the
6732 Mon Dec 5 15:58:46 1988 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
6736 * Makefile: Define `install' target.
6738 * GNUmakefile: Don't include GNUmakefile or depend in the
6741 Wed Nov 30 15:53:42 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
6743 * commands.c (execute_file_commands): Don't clobber a null into
6744 random storage if there were no $^ and/or $? words.
6746 * remake.c (check_dep): Set *MUST_MAKE_PTR nonzero if a dependency
6749 * ar.c (ar_member_date, ar_touch): Make sure the modtime of the
6750 archive file itself is known before we fetch or change the modtime
6751 of one of its members.
6753 * read.c (read_makefile): Expand variable and function references
6754 before parsing rules so variable can contain special characters
6755 (colons and semicolons).
6757 Sat Nov 26 11:36:31 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6759 * variable.c (expand_function: `filter', `filter-out'): Fixed so
6760 that filter-out works right.
6762 * variable.c (expand_function: `filter', `filter-out'): Made these
6763 functions use each word of their first argument as a pattern.
6765 Fri Nov 25 10:51:47 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6769 * read.c (record_files): If a target is listed more than once in a
6770 single rule (that defines commands), give a warning message rather
6771 than the counter-intuitive message saying commands were already
6772 defined (in the same place).
6774 * make.c (fatal, error): Made them both take 6 args since there is
6775 at least one error message that need that many. Too bad vfprintf is
6780 * read.c (read_makefile): Moved the construction of the `struct
6781 commands' into record_files. Call record_files before recursing for an
6782 included makefile so the higher-up will determine the default goal.
6783 (record_files): Take arguments COMMANDS, COMMANDS_IDX and
6784 COMMANDS_STARTED and construct a `struct commands.
6786 Thu Nov 24 14:36:33 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6790 * make.c (main): Made it a fatal error if we can't move back to the
6791 directory we started in before re-execing.
6793 * make.c (main): Get the current directory before doing anything
6794 else, so we know it even if we don't need it for the value of
6795 `MAKE', since we might want it when re-execing.
6797 Wed Nov 23 13:34:44 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6801 * read.c (record_files): Eliminate duplicate deps in a chain.
6803 * variable.c (expand_function: `sort'): Pass the right number to
6804 qsort, not one less.
6806 * remake.c (remake_file): Always call notice_finished_file if
6807 FILE->command_state == cs_finished.
6809 * commands.c (execute_file_commands): Call notice_finished_file to
6810 set FILE's status correctly when start_job fails (because it's out
6811 of commands or running under -n).
6813 Fri Nov 18 15:31:12 1988 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
6817 * remake.c (update_file_1): Set the `update_status' of FILE to
6818 nonzero and set FILE's `updated' bit if we have decided to give up
6819 on remaking FILE because of errors in the dependencies.
6821 * rule.c (pattern_search): Debugging messages use `dependency' (vs.
6822 `dependent') properly.
6824 * make.texinfo (Conditionals: Conditional Syntax): Function index
6825 entries for `ifndef' and `ifneq'.
6827 * variable.c (define_automatic_variables): Define `MAKELEVEL' to the
6828 decimal number of the makelevel, since it may be malformed or blank.
6830 * remake.c (remake_file): Call notice_finished_file after touching.
6832 Sat Nov 12 19:29:34 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6836 * GNUmakefile (dist): Pass the `-f' flag to compress.
6838 * vpath.c (build_vpath_lists): Check for VPATHS being nil after
6839 constructing the general VPATH list from the `VPATH' variable.
6841 Fri Nov 11 08:02:26 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6843 * make.c (fatal, error): Made error messages for recursive runs be
6846 Thu Nov 10 16:51:36 1988 Roland McGrath (mcgrath at basil.Berkeley.EDU)
6850 * read.c (read_makefile): Made it eat leading spaces and formfeeds
6851 (but not tabs), like it's documented to.
6853 * read.c (read_makefile): Let included makefiles determine the
6854 default goal, as is done by System V Make.
6856 Tue Nov 1 19:03:08 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6858 * variable.c (new_environ): Don't increment VCNT when a variable is
6861 Fri Oct 28 16:54:15 1988 Roland McGrath (mcgrath at basil.Berkeley.EDU)
6865 * rule.c (convert_to_pattern): Don't use the same storage for a name
6866 in two rules since new_pattern_rule may free this storage when a
6869 * rule.c (new_pattern_rule): Undid useless change I made Oct 25.
6871 Thu Oct 27 19:17:53 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6875 * GNUmakefile, Makefile: Fixed a typo in a comment.
6876 * Makefile: Removed malloc.o from object file list.
6878 * variable.c: Removed old debugging #define's for xmalloc and
6879 xrealloc so non-ANSI cpp's won't barf.
6881 * make.c (main): Made local array for temp file name static so
6882 compilers that don't do auto aggregate initialization won't barf.
6884 * read.c: Removed static declaration of copy_dep_chain since it is
6887 Tue Oct 25 16:59:30 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
6889 * rule.c (new_pattern_rule): If we threw out the new rule because it
6890 matched an old one and OVERRIDE was zero, don't put the freed
6891 pointer in the chain!
6893 Wed Oct 19 15:07:43 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
6897 * variable.c (expand_function: `sort'): Don't do the sorting and
6898 writing out if there were no words in the first place.
6900 * remake.c (remake_file): Only fail with a "no way to make" message
6901 for a dependency (non-target) file. If we don't know how to remake
6902 a target file, pretend it was successfully remade and is very new.
6904 * remake.c (remake_file): Don't increment `files_remade' for a
6905 non-target file we don't know how to remake.
6907 * read.c (record_files): Don't die with "both : and :: entries" for
6908 a file whose `is_target' flag is not set.
6910 Tue Oct 18 17:24:11 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6912 * variable.c (expand_function: `patsubst', `subst'): Free the right
6915 * variable.c (expand_function: `subst'): Don't clobber the
6916 pointer to the end of the second arg and then try to use it!!!
6918 Mon Oct 17 16:44:45 1988 Roland McGrath (mcgrath at catnip.Berkeley.EDU)
6920 * variable.c (expand_function: `patsubst'): Don't clobber the
6921 pointer to the end of the second arg and then try to use it!!!
6923 * variable.c (expand_function: `word' function): Made it parse its
6924 second argument correctly.
6926 * ar.c (ar_touch): Return 1 rather than -1 for on errors.
6928 Sat Oct 15 15:12:16 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6932 * GNUmakefile: Removed explicit rule for make.dvi since the built-in
6933 implicit rule now works.
6935 * rule.c (default_suffix_rules): Fixed .texinfo.dvi rule yet again
6936 so that it really works, now that parens are counted.
6938 * remake.c (update_file_1): Set FILE's `updated' flag after calling
6939 remake_file if it failed or finished immediately.
6941 * remake.c (update_file): Use the `updated' flag rather than the
6942 command state to decide if a file was fully considered, and
6943 therefore might give an "up to date" message.
6945 * variable.c (expand_function): Made all functions that take more
6946 than one argument count parens of the appropriate flavor in their
6947 args and ignore commands nested in parens.
6949 Fri Oct 14 18:35:00 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6951 * read.c (read_all_makefiles): Pass second arg to read_makefile for
6954 Thu Oct 13 16:40:08 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6958 * GNUmakefile: Added an explicit rule for make.dvi since the
6959 built-in .texinfo.dvi implicit rule is screwed up.
6961 * rule.c (default_suffix_rules): Added a comment that the
6962 .texinfo.dvi rule does not work because of an ahem, feature of Make
6963 that at some point will be fixed--er, enhanced to alleviate this
6966 * rule.c (default_suffix_rules): Fixed Texinfo -> DVI rule (again).
6968 * make.texinfo (Commands: Execution): Documented new competing for
6969 standard input among children.
6971 * commands.c (struct child): Added `good_stdin' flag to tell if this
6972 child has the stdin that doesn't point into nirvana.
6973 (good_stdin_used): New variable to tell if any child has the good
6975 (child_handler): Reset `good_stdin_used' if a dead child's
6976 `good_stdin' flag is set.
6977 (start_job): Give the new child the good standard input if
6978 `good_stdin_used' is no set, and set the child's `good_stdin' flag
6981 * rule.c (default_suffix_rules): Changed Texinfo -> DVI rule to work
6984 * read.c (read_all_makefiles): Stop reading default makefiles after
6987 * read.c (read_makefile): Reset `reading_filename' and
6988 `reading_lineno_ptr' after recursing for an included makefile.
6990 * GNUmakefile: New GNU Make-specific makefile that does everything
6991 Makefile does plus distribution stuff, and doesn't contain any hacks
6992 to try to work with Unix make.
6994 * Makefile: Removed distribution stuff.
6996 * make.c (main): Use mktemp to construct the names of temporary
6997 files used for standard input makefiles.
6999 * make.c (main): Don't turn standard input into a broken pipe.
7001 * commands.c (start_job): Keep two extra file descriptors around: a
7002 good standard input, and a bad one that reads from a broken pipe.
7003 On the child side of the fork, if there are other children, give
7004 this one the broken pipe so they won't compete; if this is the only
7005 one, give it the good standard input.
7007 * make.h: Declare notice_finished_file.
7009 * commands.c (execute_file_commands): Use noticed_finished_file
7010 after waiting for the child when there is only one job slot.
7012 * remake.c (notice_finished_file): New function to re-check mtime's
7013 and such things to be done when commands finish.
7014 (update_file_1): Use notice_finished_file.
7016 * commands.c (child_handler, execute_file_commands): Use new
7017 variable `job_slots_used' to record the number of jobs currently
7018 running, rather than diddling with `job_slots'.
7019 (execute_file_commands): Increment `job_slots_used' before calling
7020 start_job and decrement it on failure to avoid race condition.
7021 If there is only one job slot, wait for the child to finish and
7022 return its status so commands are run in linear order, as if there
7023 were no parallelism.
7025 Wed Oct 12 15:59:03 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7027 * remake.c (remake_file): Don't print a "No way to make" message for
7028 targets whose `dontcare' flags are set.
7030 * read.c (read_all_makefiles): Set the `dontcare' flag of the
7031 `struct file' each default makefile added to the chain.
7033 * file.h (struct file): Add `dontcare' member.
7035 * read.c (read_all_makefiles): When no default makefiles are found,
7036 put the names of all those tried in the `read_makefiles' chain so
7037 they will be updated if possible, giving their `struct dep's'
7038 `changed' members the value of 0 so we won't care if they cannot be
7041 * make.texinfo (Makefiles: Remaking Makefiles): Documented that
7042 default makefiles will be remade if not found.
7044 * read.c (read_all_makefiles): If no default makefiles can be found,
7045 go through the list of default names, trying to make one, stopping
7048 * remake.c (remake_file): Set STATUS to 0 after successfully touching.
7050 * dir.c (file_impossible, file_impossible_p): Don't clobber FILENAME
7051 to "" and then try to to a strcmp on it!!!
7053 Mon Oct 10 16:09:18 1988 Roland McGrath (mcgrath at cinnamon.Berkeley.EDU)
7055 * make.c (main): Don't do `dir_load (".")'.
7057 * rule.c (count_implicit_rule_limits), vpath.c
7058 (construct_vpath_list): Test the existence of a given directory by
7059 `dir_file_exists_p (DIR, ".")' and assume that if this returns zero,
7060 it means the directory really does not exist.
7062 * dir.c (struct dirdata): Replaced with `struct directory' for
7063 directories, each containing a chain of `struct dirfiles', one for
7064 each file (real or impossible).
7065 (dir_load): Removed.
7066 (find_directory): New function to find the `struct directory' for a
7067 named directory and return it (possibly creating a new one).
7068 (dir_file_exists_p): Read the directory on the fly if its stream is
7069 still valid (and ever was) if the file we're looking for is not
7070 already in the hash tables.
7071 (file_impossible, file_impossible_p, dir_name, print_dir_data_base):
7072 Use the new directory/file scheme.
7074 * make.texinfo: Miscellaneous editorial changes and clarifiactions.
7076 * commands.c (struct child): Remove `environ' member.
7077 (child_handler, start_job, execute_file_commands): Remove use of
7078 `environ' member and new_environ.
7080 * make.c (main): Call new_environ after reading makefiles.
7082 * variable.h: Declare `new_environ' to return void.
7084 * variable.c (new_environ): Put the environment in `environ' and
7087 Fri Oct 7 15:48:39 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
7091 * Makefile: Don't make the uncompressed tar file.
7093 * variable.c (expand_function: `shell' function): Made it not expect
7094 read to null-terminate the buffer.
7096 * Makefile: Made it use a temporary symlink to . rather than a
7097 temporary directory to make the distribution tar file.
7099 Thu Oct 6 17:52:35 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
7103 * make.texinfo: Fixed a line that got garbaged somehow.
7105 Mon Oct 3 16:14:39 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
7107 * make.c (main): Try to move back to the directory we started in
7108 before re-exec ourself.
7110 * remake.c (update_file_1): A double-colon target with no deps
7111 always needs to be remade.
7113 * remake.c (remake_file): Changed "No way to make" message to say
7114 `target' rather than `file'.
7116 Sun Oct 2 12:50:47 1988 Roland McGrath (mcgrath at catnip.Berkeley.EDU)
7118 * remake.c (update_file_1): Set FILE->update_status to the return
7119 value of remake_file.
7121 * rule.c (convert_to_pattern): Fixed swapped lengths passed to
7122 xmalloc for source/target suffixes.
7124 * make.texinfo: Documented that MAKEFLAGS and MFLAGS are read in
7125 from makefiles. Updated the `Features' section a bit.
7127 * make.c (main): Read switches from MAKEFLAGS and MFLAGS variables
7128 after reading in makefiles.
7130 * make.c (main): Put a line "/tmp/foo:;" rather than ".PHONY:
7131 /tmp/foo" in front of temp files made for stdin makefiles.
7133 * remake.c (update_file): Test the state of the right `struct file'
7134 for double-colon files.
7136 * make.c (main): Put a ".PHONY: /tmp/foo" line in front of temp
7137 files made for stdin makefiles so they won't be remade when we
7138 re-exec. Kludge-o-matic!!
7140 * remake.c (update_goal_chain): Judge files as being finished based
7141 on their `updated' flag, not their state.
7143 * read.c (read_makefile): Don't check for FILENAME being "-".
7144 (read_all_makefiles): Set each element of MAKEFILES to the name put
7145 in READ_MAKEFILES by read_makefile, since read_makefile may free the
7146 storage for the name it is passed, and someone might want to look at
7147 the elements of MAKEFILES again.
7149 * make.c (main): For each `-f' flag with arg `-' (standard input),
7150 read standard input into a temp file and pass the temp file's name
7151 to read_all_makefiles, after making sure it will not be remade.
7153 * make.c (construct_makeflags): Always put out `-j1'.
7155 Sat Oct 1 00:19:59 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7157 * commands.c (execute_file_commands): If commands are nothing but
7158 whitespace, set the state to `cs_finished' before returning 0.
7160 * make.c (decode_switches): Allocate space for args in stringlists
7161 so they can be freed later.
7163 * make.h: Declare `makelevel'.
7165 * variable.c (makelevel): Moved to make.c (and made global).
7167 * make.c (fatal, error): Print the makelevel if it's > 0.
7168 (perror_with_name): Use error rather than calling fprintf directly.
7169 (pfatal_with_name): Use fatal rather than fprintf and die.
7171 * variable.c (new_environ): Don't put default variables (origin
7172 `o_default') into the environment; they just take up space.
7174 * read.c (read_makefile): Don't add FILENAME to the chain of read
7175 makefiles if it's "-" (standard input).
7177 * remake.c (update_goal_chain): Set STATUS correctly when nothing
7178 happens (as well as in all other situations).
7180 * make.c (construct_makeflags): Put a `-' before each switch and
7181 spaces between them.
7185 * commands.c (wait_for_children): Don't check if `children' is nil.
7186 This is the case when waiting for the child of a `shell' function.
7188 * dir.c (dir_load): Don't add a hash-table entry for directory
7189 DIRNAME and filename "" if DIRNAME doesn't exist.
7191 * commands.c (execute_file_commands): Return 0 after start_job
7192 returns 1 (failure) under the -n flag.
7194 * remake.c (remake_file): Set the state to `cs_finished' when not
7195 calling execute_file_commands.
7197 * remake.c (update_goal_chain): Second arg is now MAKEFILES, nonzero
7198 meaning to disable -t, -q, and -n for each target unless the target
7199 was also given on the command-line.
7201 * read.c (read_makefile): Enter the `struct file's for the makefiles
7202 added to the `read_makefiles' `struct dep' chain.
7204 * remake.c (update_goal_chain): Made it not enter the files for the
7205 goals in the chain. It will already have been done.
7207 * rule.c (convert_to_pattern): Null-terminate the names of targets
7208 and deps of the pattern rules properly.
7210 Fri Sep 30 18:56:20 1988 Roland McGrath (mcgrath at nutmeg.Berkeley.EDU)
7212 * make.c (main): Call install_default_pattern_rules.
7214 * make.h: Declare copy_dep_chain.
7216 * read.c (copy_dep_chain): Moved to make.c (and made global).
7218 * make.c (main): Call update_goal_chain to update goals.
7219 Update read makefiles and re-exec self if they change.
7221 * remake.c (update_file): Make this function static.
7222 (update_goal_chain): New function to update a `struct dep' chain of
7223 goals, waiting until they are all finished before returning.
7225 * make.h: Don't declare update_file. Declare update_goal_chain.
7227 * make.c (main): Call snap_deps, etc. that were in read_all_makefiles.
7229 * read.c (find_makefile): Removed this function.
7230 (read_all_makefiles): Don't update makefiles, don't diddle with
7231 pattern rules, don't call snap_deps, etc. Return a `struct dep'
7232 chain of all makefiles read.
7233 (read_makefile): Now takes two args: FILENAME and TYPE, which is 0
7234 for a normal makefile, 1 for MAKEFILES variable or 2 for an included
7235 makefile. Add a `struct dep' containing the name of the makefile
7236 (as it was found in the search path for type 2s), and TYPE in the
7237 `changed' member to the global `read_makefiles' chain.
7239 * make.h, rule.c (displace_pattern_rules,
7240 add_displaced_pattern_rules): Removed these functions.
7242 * read.c (read_makefile): Variable-expand the name of an `include'd
7243 makefile before calling find_makefile on it.
7245 * file.c (snap_deps): If the `struct file' for a `struct dep'
7246 already exists, free the `struct dep's `name' member before setting
7247 it to nil (since this info is in the `struct file').
7249 * read.c (copy_dep_chain): Made it copy each name rather than
7250 leaving multiple `struct dep's with the same pointers.
7252 Thu Sep 29 19:08:13 1988 Roland McGrath (mcgrath at catnip.Berkeley.EDU)
7254 * make.c (decode_switches): Fixed second decode_env_switches call to
7255 use correct length of "MFLAGS" (6, not 5).
7257 * read.c (read_makefile): Don't stop reading when readline returns
7258 zero lines read. Only stop when the stream reaches EOF. This makes
7259 it recognize the last line of a makefile without a newline.
7261 * remake.c (remake_file): If we don't know how to make FILE, set its
7262 command state to `cs_finished'.
7264 * remake.c (update_file): Don't write the "up to date" message if
7265 update_file_1 returned a nonzero status.
7267 Wed Sep 28 16:30:07 1988 Roland McGrath (mcgrath at catnip.Berkeley.EDU)
7269 * commands.c (child_handler): Set the `update_status' member
7270 properly for ignored errors.
7272 * rule.c (convert_to_pattern): Made it not care about if the target
7273 suffix comes before the source suffix in the .SUFFIXES list.
7275 * make.texinfo: Misc editorial changes.
7277 * commands.c (wait_for_children): Return immediately if `children'
7278 is nil (there are no children).
7280 Tue Sep 27 15:33:14 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
7284 * commands.c (struct child): New member `command_ptr' to hold the
7285 current position in the commands. The `commands' member is never
7287 (start_job, child_handler, execute_file_commands): Use new method
7288 for `commands' and `command_ptr' members.
7290 * make.c (decode_env_switches): Skip past an invalid letter (instead
7291 of looping forever).
7293 * commands.c (struct child): Add `environ' member to hold the
7294 environment for this child.
7295 (execute_file_commands): Get a new environment from new_environ and
7296 put in the the new `struct child's `environ' member.
7297 (child_handler): When freeing a child, free its `commands' member, the
7298 elements of its `environ' array and its `environ' member itself.
7299 (start_job): Set `environ' to the child's `environ' member before
7300 exec'ing the command.
7302 * variable.h, variable.c (new_environ): Made it return the new
7303 environment, not putting it in `environ'.
7305 * remake.c (update_file): Don't give a "is up to date" message
7306 unless no files were remade and the state went from `cs_not_started'
7307 to `cs_finished', so repeat calls to finish jobs won't get the message.
7309 Mon Sep 26 16:26:08 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7313 * make.texinfo (Commands: Execution): Documented that children will
7314 be waited for rather than killed.
7316 * commands.c (fatal_error_signal): Wait for children.
7317 (kill_children): Removed this function.
7319 * make.c (main, die): Wait for children to die, don't kill them.
7321 * variable.c (expand_function): Use wait_for_children.
7323 * make.c (main): Use wait_for_children rather than child_handler.
7325 * commands.c (wait_for_children): New function to block waiting for
7326 children, insuring that child_handler is not called recursively.
7327 (execute_file_commands, kill_children): Use wait_for_children.
7329 * commands.c (child_handler): Start up additional commands in a
7330 sequence after an ignored error.
7332 * remake.c (update_file): Don't print "`foo' is up to date" messages
7333 when update_file_1 returns while commands are executing.
7335 * remake.c (update_file_1): Pass the file name to name_mtime, not
7336 the bloody `struct file', dammit!!
7338 * commands.c (child_handler): Print out the "*** ..." error message
7339 when not under -i. (I somehow forgot this.)
7341 * remake.c (update_file_1): Use name_mtime rather than file_mtime to
7342 re-get the mtime of a file whose commands have finished.
7344 * make.c (command_switches, decode_switches, decode_env_switches):
7345 Make all switches that take string args allow them right after the
7348 * commands.c (child_handler): Check for a child being the `shell'
7349 function's command returning and set the global variable for
7350 expand_function to check.
7352 * variable.c (expand_function): For the `shell' function, instead of
7353 waiting for the child shell ourselves, let child_handler do it and
7354 loop around waiting for something to happen.
7356 * make.c (print_version): Made the copyright year static, not dynamic.
7358 * make.h, make.c: Remove construct_argv function.
7360 * make.c (main): Say "no goal target" instead of "no target".
7362 * make.texinfo (Commands: Parallel): Don't send SIGKILL.
7364 * commands.c (kill_children): Don't send SIGKILL to children that
7365 aren't killed by the first signal.
7367 * make.c (main), commands.c (kill_children): Decide between SIGCHLD
7368 and SIGCLD based on whether or not SIGCHLD is defined, not on USG.
7370 * Makefile: Link make with $(LOADLIBES).
7372 * read.c (construct_include_path): Fixed another bad xrealloc call.
7374 * make.c (decode_switches): Fixed an xrealloc call with no first arg.
7376 Sat Sep 24 01:16:21 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
7380 * remake.c (update_file_1): If deps are running, set state to
7381 `cs_deps_running' and return 0. If deps are done, run commands.
7383 * commands.c (child_handler): Made it delete non-precious targets
7384 killed by fatal signals.
7386 * make.texinfo: Documented parallelism.
7388 Fri Sep 23 16:52:27 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7390 * remake.c (update_file_1): Don't return if FILE's state is
7391 `cs_deps_running'. In that case, we need to run through and check
7392 the states of all our dependencies.
7394 * commands.c (execute_file_commands): Decrement `job_slots' after
7395 starting a new job to run file commands.
7397 * commands.c (start_job): Made it set the state to `cs_running'.
7399 * make.c (main): Fixed usage of `g', `lastgoal', and `goals' in the
7402 * commands.c (child_handler): When commands finish, set the
7403 corresponding file's `update_status' and `updated' flags as
7404 appropriate, and reset the modtimes of the file and any `also_make'
7407 * remake.c (remake_file): Don't re-set `last_mtime' and set `updated'.
7409 * commands.c (fatal_error_signal): Don't swallow all the children
7410 with a loop around `wait ((union wait *) 0)'!!!
7412 * make.c (struct command_switch): Added `positive_int' type.
7413 (switches): Added -j (job_slots).
7414 (construct_makeflags, decode_switches, decode_env_switches):
7415 Handle`positive_int'-type switches.
7417 * glob.c (glob_vector): Rename local variable `vector' to `VeCtOr'.
7418 This is said to avoid a conflict with some system's global `vector'
7421 * variable.c (expand_function): Made the `shell' function use
7422 construct_command_argv and do its own child control and piping.
7424 * make.c (main): Turn standard input into a broken pipe after
7425 reading in all makefiles (the last time it will be needed).
7427 * commands.c (struct child): Remove `pipe_fd' member. We don't use
7429 (start_job): Return 0 for success, 1 or failure (rather than void).
7430 Don't use pipes. Don't turn the child's stdin into a broken pipe.
7431 (child_handler): Print "*** Error" messages when necessary.
7432 Die on failed commands when -k was not given.
7433 (execute_file_commands): Check the return of start_job and remove
7434 the child from the chain and return failure if it is nonzero.
7436 * make.c (die): New function to clean up and exit.
7437 (fatal, pfatal_with_name): Use die.
7439 Thu Sep 22 14:27:11 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7441 * commands.c (struct child): Added `commands', `pipe_fd', and
7442 `noerror' members to keep track of info about a command thread.
7443 (start_job): New function to start a job and update the argument
7444 `struct child' to reflect its status.
7445 (execute_file_commands): Merged run_file_commands back in.
7446 Made it use new start_job function.
7448 * rule.c (freerule): Don't free the `struct commands' of the
7449 discarded rule. It may be used in more than one place.
7451 * commands.c (execute_command_line): Made it not try to delete the
7452 possibly partly-made file. The child_handler function will do this.
7453 (fatal_error_signal): Ditto + call kill_children.
7455 * make.h: Declare job_slots.
7457 * make.c (main): Collect goals in a dep chain and run through this
7458 chain waiting for a child, eliminating finished goals, updating all
7459 remaining goals, and quitting if they fail and not -k.
7461 * commands.c (child_handler): If called with SIG < 0, - SIG is the
7462 max number of children to bury.
7464 * commands.c (child_handler): If called with SIG as zero,
7465 block waiting for running children.
7466 (kill_children): Call child_handler with zero rather than SIGCHLD.
7468 * remake.c (update_file_1): Use the `command_state' member of FILE
7469 and its dependencies to determine what commands are running, what to
7470 do, etc. If commands or dep commands are running when we are
7471 called, return success (0). If commands finished since the last
7472 time we were called, return their status.
7474 * commands.h: Declare kill_children.
7476 * commands.c: Define `struct child' to keep track of child
7477 processes, with the chain in `children'.
7478 (child_handler): New function to catch child-termination signals
7479 (SIGCHLD, or SIGCLD for USG), store the returned status in the
7480 appropriate structure, take the now-obsolete `struct child' out of
7481 the chain, and free its storage.
7482 (execute_file_commands): Put all of the stuff invloving running the
7483 commands into new function run_file_commands. Execute_file_commands
7484 now does process management for the commands, while
7485 run_file_commands (which is run in a subprocess) runs the commands.
7486 (kill_children): New function to kill all running children by
7487 sending them signal SIG. If there are any children still living
7488 after they are all sent SIG, they are all sent SIGKILL.
7490 * make.c (main): Catch SIGCHLD (SIGCLD for USG) with child_handler.
7492 * commands.h: Declare child_handler function.
7494 * commands.c (execute_file_commands): Check the `command_state'
7495 member of FILE and return 0 if it is `cs_running' or
7496 `cs_deps_running' and return the stored status if it is `cs_finished'.
7498 * file.h (struct file): Added `command_state' member.
7500 * commands.c (execute_command_line): Add `$' to the list of
7501 characters special to the shell.
7503 Wed Sep 21 15:57:41 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7505 * read.c (read_all_makefiles): Call convert_to_pattern before
7506 recomputing the limits after adding the displaced rules.
7508 * make.c (main): Move calls to snap_deps, convert_to_pattern, and
7509 build_vpath_lists to read_all_makefiles.
7511 * read.c (read_all_makefiles): Install the default pattern rules
7512 before checking to remake the makefiles, displace these rules before
7513 reading in the makefiles, and then add the displaced rules to the
7514 chain after reading in all the makefiles.
7516 * make.c (main): Don't call install_default_pattern_rules or
7517 count_implicit_rule_limits.
7519 * make.h: Declare displace_pattern_rules and
7520 add_displaced_pattern_rules.
7522 * rule.c (displace_pattern_rules, add_displaced_pattern_rules): New
7523 functions to stow the chain and add the stowed chain on the end of
7526 * make.texinfo (Implicit: Search Algorithm): Fixed PREV reference.
7528 * make.c (main): Call construct_include_path right after decoding
7531 * read.c (find_makefile): Use rename_file.
7533 * file.h: Declare rename_file.
7535 * file.c (rename_file): New function to rename a `struct file' and
7536 put it in the correct hash bucket.
7538 * read.c (find_makefile): New function to find and update a makefile.
7539 (read_all_makefilese): Use find_makefile.
7540 (read_makefile): Don't do updating. Removed UPDATEIT arg.
7542 * remake.c (update_file_1): Took out setting the `updated' member to
7543 -1 rather than 1 sometimes.
7545 * make.c (main): Made it print version info before doing anything else.
7547 * remake.c (library_file_mtime, f_mtime): Removed use of last two
7548 arguments to vpath_search.
7550 * rule.c (pattern_search): Removed use of last two arguments
7553 * vpath.c (vpath_search, selective_vpath_search): Removed unused
7554 DIRPREFIX and DPLEN args.
7556 * read.c (read_makefile): Also turn off -n when updating makefiles.
7558 Tue Sep 20 17:01:10 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
7560 * Makefile: Put tags files in the tarfile.
7562 * read.c (read_makefile): Get the modtime of the makefile via a stat
7563 call so that a later file_mtime call won't do VPATH search for it.
7565 * read.c (read_makefile): Don't turn off -t and -q if the makefile
7566 was a command-line target.
7568 * make.c (main): Enter command-line targets as files and set their
7569 `cmd_target' members.
7571 * file.h (struct file): Added `cmd_target' member.
7573 * read.c (read_makefile): Temporarily turn off -t and -q while
7576 * make.c (main): Don't use arg 0 from other_args (which is now
7577 argv[0]; i.e., the program's name).
7579 * read.c (read_makefile): Only return nonzero if commands were
7580 actually run to remake the makefile.
7582 * remake.c (update_file_1): Set FILE->updated to -1 if no commands
7583 were actually run (because no update was done or -t was given).
7585 * make.c (decode_switches): Fixed bug wherein xrealloc was passed
7586 bad args if it tried to expand other_args->list.
7588 * read.c (read_all_makefiles): Made it not look at the `MAKE'
7589 variable, just use argv[0].
7591 Sun Sep 18 17:34:11 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
7593 * read.c (rerun_make): New function to re-exec make.
7595 * make.c (construct_makeflags, construct_argv): New functions to
7596 construct the `MAKEFLAGS' variable and to construct an arg list from
7599 * read.c (read_makefile): New arg UPDATEIT, if nonzero, says to
7600 update the makefile as a target before reading it in. When reading
7601 included makefiles, pass this as zero. Now returns nonzero if the
7602 makefile was updated, zero if not.
7603 (read_all_makefiles): Pass a nonzero UPDATEIT arg to read_makefile
7604 for all default and -f makefiles and all makefiles from the
7605 `MAKEFILES' variable. If any of the makefiles has changed, re-exec
7606 self to re-read them.
7608 * remake.c (update_file): Print a "File `foo' up to date'" message
7611 * commands.c (execute_file_commands): Allocate one byte for each of
7612 $^ and $< rather than zero if they are to be empty.
7614 Fri Sep 16 13:59:59 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7618 * make.c (command_switches): Fixed entry for `-o' switch.
7620 * make.texinfo: Renamed -c switch to -C.
7622 * make.c: Renamed -c switch to -C.
7624 * Miscellaneous de-linting.
7626 * read.c (record_files): Made it not free the storage for the name
7627 if it started with `./' and was therefore not quite the same as in
7630 * read.c (record_files): If commands were specified twice, the error
7631 message specifies in what files and at what line numbers.
7633 * make.c (main): If any of the signals we usually fatal on were
7634 ignored by the parent (probably a shell), ignore them.
7636 * make.c (main): Print version info for -v, -p, or -d.
7637 (print_data_base): Don't print version info. It will be done in main.
7639 * variable.c: Increased number of hash buckets to 257.
7641 * file.c: Increased number of hash buckets to 1007.
7643 * rule.c (count_implicit_rule_limits): Moved comptation of
7644 `maxsuffix' to convert_to_pattern, since that function uses
7645 `maxsuffix', and must be called before count_implicit_rule_limits.
7647 * rule.c (pattern_search): If an existent (non-intermediate)
7648 dependendency was found via a terminal rule, set its
7649 `tried_implicit' flag, so it will never have implicit rule search done.
7651 * glob.c: Bug fix to avoid alloca(0).
7653 * arscan.c: USG and Sun386i fixes.
7655 Thu Sep 15 19:40:26 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7657 * make.texinfo: Fixed some typos and spelling errors.
7659 Wed Sep 7 14:20:39 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7661 * make.c (decode_switches): Fixed bug wherein a bad option would
7662 give a useless error message and loop forever.
7664 Tue Sep 6 14:36:02 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7666 * make.texinfo: Documented `shell' function.
7668 * variable.c (expand_function): New function `shell', does
7669 backquote-style command expansion of its arg.
7671 * commands.c (execute_command_line): Second arg OUTBUF, if not nil,
7672 gets filled in with a malloc'd buffer containing the piped stdout of
7674 (execute_file_commands): Use above (pass nil).
7676 Mon Sep 5 17:03:49 1988 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
7678 * Makefile: Added copyright notice.
7679 Added a comment about defining `NO_MINUS_C_MINUS_O' if necessary.
7683 * rule.c (default_suffix_rules): Don't pass `-o' switches with `-c'
7684 switches if `NO_MINUS_C_MINUS_O' is #define'd.
7686 * make.texinfo: Documented `GNUmakefile'.
7688 * read.c (read_all_makefiles): Made it try default makefile
7689 `GNUmakefile' before others.
7691 * make.texinfo: Added new-style Texinfo header thingies.
7693 Sat Sep 3 18:09:39 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
7697 * make.texinfo (Chained Rules): Added a @cindex about using
7698 .PRECIOUS to preserve intermediate files.
7700 * remake.c (update_file_1): Made it not just return before executing
7703 * rule.c (default_pattern_rules, default_variables): Made it use
7704 `$(AR)' for `ar r' (to put files in archives).
7706 * vpath.c (build_vpath_lists): Made it recursively expand the
7707 `VPATH' variable (by using variable_expand instead of lookup_variable).
7709 * read.c (conditional_line): Made it not swallow whitespace after
7710 the comma in an `ifeq' using the `(a,b)' syntax.
7712 * rule.c (count_implicit_rule_limits): Made it not crash if a
7713 pattern rule dep begins with `/'.
7715 Sun Aug 28 15:51:12 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
7717 * make.texinfo: Clarified that the arg to the `origin' function is a
7718 variable *name*, not a reference.
7720 * make.texinfo: Clarified that both -Idir and -I dir are allowed.
7722 Sat Aug 27 13:49:28 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7724 * remake.c (remake_file): Made touching phonies work right.
7726 Wed Aug 24 20:40:48 1988 Roland McGrath (mcgrath at nutmeg.Berkeley.EDU)
7728 * make.texinfo: Removed reference to `RANLIB' variable.
7732 * variables.c (expand_function): Added `origin' function.
7733 * make.texinfo: Documented same.
7735 * read.c (record_files): Made double-colon entries work.
7737 Sat Aug 20 21:09:39 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7739 * make.c (collapse_continuations): Bug fix from RMS.
7741 * rule.c (install_default_pattern_rules): Made it set the
7742 `in_use' flag of the created rules to zero, rather than letting
7743 it be random garbage.
7745 * rule.c (pattern_search): Fixed putting `also make' targets into
7748 * read.c (record_files): Fixed bug which made double-colon entries
7749 make it read off into space.
7751 * make.c (decode_switches): Made it understand `ignored' switches
7752 rather than dumping core.
7754 Sun Aug 14 16:49:00 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7756 * read.c (read_makefile): Made `include' filenames be
7759 * read.c (read_makefile): Fixed an error message.
7761 * read.c (read_makefile): Made it accept ^L's as whitespace.
7762 * make.c (next_token, end_of_token): Ditto.
7764 * vpath.c (vpath_search): Fixed it so that the general VPATH (from
7765 the variable) is always checked, even if a selective VPATH (from a
7766 directive) matched the filename.
7768 Sat Aug 13 14:20:46 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7770 * make.c (decode_switches, main): Made the command switches be
7771 processed from a table of switches, variables, and types. No
7772 functions are passed argc and argv any more. They are passed arrays
7773 of strings they need to process.
7774 * read.c (read_all_makefiles): Made it take an array rather than
7776 (construct_include_path): Ditto.
7778 * make.c (collapse_continuations): Made it work right (I hope).
7780 * make.texinfo: Minor editorial changes.
7782 * read.c (read_makefile): Minor speed improvement by freeing and
7783 then mallocing something rather than reallocing it to avoid the
7786 Thu Aug 11 00:10:43 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7788 * make.texinfo: Fixed some unquoted @'s.
7790 * make.texinfo: Documented multiple-target pattern rules.
7791 Miscellaneous minor editorial changes and corrections.
7793 * make.texinfo (Implicit: Catalogue of Rules): Removed the list of
7794 variables. That's what the next section is for.
7795 (Implicit: Implicit Variables): Made it agree with reality.
7797 Wed Aug 10 00:55:39 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7799 * variable.c (print_variable_data_base): Fixed bug which made -p
7800 dump core. (This was a really idiotic bug.)
7802 * rule.c (pattern_search): Fixed a bug which made it make the
7803 `also_make' member of the file in question nil if the first of
7804 the successful rule's targets was the matching one.
7805 Made it use only as much storage as necessary in the `also_make'
7807 (create_pattern): Made it use only as much storage as necessary in
7808 the `lens' and `suffixes' members of the created rule.
7810 * remake.c (library_file_mtime): Made it `static'.
7812 * file.c: Added a declaration for `errno', which is declared in some
7813 <errno.h>'s, but not all.
7815 * file.h (struct file): Added `also_make' member for multiple-target
7817 * rule.c (pattern_search): Made it put the names of files updated by
7818 the given file's commands in its `also_make' member.
7819 * remake.c (update_file_1): Made it mark the files in a file's
7820 `also_make' member as updated when the file is updated.
7822 * variable.c (try_variable_definition): Fixed a bug which made it
7823 define a variable with the name of the whole definition when there
7824 was no space before the = or :=.
7826 * make.texinfo (Features): Made the changes which were made in RCS
7827 revision 2.7 but somehow lost since then. Added -W.
7829 Tue Aug 9 10:04:50 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7831 * variable.h: Added `o_default' to `enum variable_origin'.
7832 * variable.c (print_variable_data_base): Made it print the origins of
7834 * rule.c (install_default_pattern_rules): Made it define the default
7835 variables with origin `o_default'.
7837 * make.texinfo: Documented -W.
7839 * make.c (decode_switches, main): Added the -W flag to give files a
7840 time-stamp of now, for a `what if' effect when used with -n.
7842 * commands.c (print_commands): Made it say `(built-in)' for commands
7843 that are built into the default ruleset.
7845 * read.c (record_file): Made .SUFFIXES get its deps frontwards (again).
7846 * rule.c (set_default_suffixes, convert_to_pattern): Made it read
7847 .SUFFIXES's deps frontwards, so the converted rules will not be in
7850 * rule.c (new_pattern_rule): Fixed a bug wherein it would keep
7851 searching after it had removed a matching rule and ended up diddling
7854 * rule.c (freerule): Made it take the given rule off the chain.
7855 (new_pattern_rule, count_implicit_rule_limits): Use freerule to
7856 remove rules from the chain.
7858 * vpath.c (construct_vpath_list): Made it return after cleaning out
7859 all previous searchpaths when given a nil DIRPATH arg, so it won't
7860 go into the construction code and dump core dereferencing a nil
7863 * variable.c (patsubst_expand): Fixed a bug which made it not match
7864 correctly and sometimes dump core.
7866 Mon Aug 8 16:35:48 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7868 * rule.c (default_suffix_rules): Made the .texinfo.dvi rule remove
7869 the files used in the comparison to determine whether or not a
7870 second TeX run is necessary.
7872 * make.texinfo: Fixed some overfull TeX hboxes.
7874 * make.texinfo (Implicit: Catalogue of Rules): Fixed a Texinfo error.
7876 * rule.c (create_pattern_rule): Fixed bug wherein index was not
7877 being passed its second arg.
7879 * read.c (getline): Merged back into readline.
7881 * rule.c (default_suffixes, default_suffix_rules,
7882 default_variables): Added .texinfo.info rule.
7883 * make.texinfo (Implicit: Catalogue of Rules): Documented
7884 .texinfo.dvi and .texinfo.info rules.
7886 * make.texinfo (Top): Changed `last updated' date to be correct (for
7887 the last time it was updated, not today). Changed `for version
7888 3.00' since it's not going to be called that.
7890 Sat Aug 6 19:51:10 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7892 * commands.c (print_commands): Added this function to print the
7893 contents of a `struct commands' for -p.
7894 * rule.c (print_rule_data_base): Use above.
7895 * file.c (print_file_data_base): Ditto.
7897 * rule.c (count_implicit_rule_limits, new_pattern_rule,
7898 install_pattern_rule, print_rule_data_base): Made it understand the
7899 changed `struct rule' and act accordingly.
7900 (freerule): Added this function to free all the storage used by a rule.
7902 * rule.c (pattern_search): Made it grok multiple targets of pattern
7903 rules. The matching is done properly, but at present, only the
7904 matching pattern's target is used to give deps and commands.
7906 Fri Aug 5 18:00:29 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7908 * rule.c (struct rule): Changed name, namelen, and patsuffix members
7909 to targets, lens, and suffixes, which are arrays, for multiple targets.
7910 (create_pattern_rule): Now takes first arg TARGETS, a nil-terminated
7911 array of targets, rather than a single target and patsuffix pointer.
7913 * read.c (record_files): If it finds an implicit pattern rule, it
7914 collects all the targets into an array and passes the whole thing to
7915 create_pattern_rule. If there are non-pattern targets, it is a
7918 Tue Aug 2 15:06:38 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7920 * make.c (readline): Split backslash-newline checking from reading
7921 and buffer-expanding.
7922 (getline): Created to do the reading and buffer-expanding formerly
7925 * rule.c (pattern_search): Made it reject nonterminal match-anything
7926 rules when a specific rule has matched, rather than rejecting
7927 terminal match-anything rules in this case.
7929 * rule.c (convert_to_pattern): Fixed a bug caused when the change to
7930 make it only recognize two-suffix rules whose target suffixes
7931 precede their dependency suffixes which made it work in the opposite
7932 direction (even worse than it started out).
7934 * rule.c (pattern_search): Made it reject nonterminal match-anything
7935 rules as intermediate targets when searching for both real and
7936 intermediate dependencies, rather than only when searching for
7939 Sun Jul 31 00:33:56 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7941 * rule.c (convert_to_pattern): Made it only recognize two-suffix
7942 rules whose target suffix comes before the dependency suffix in the
7945 * variable.c (define_automatic_variables): Made all automatic
7946 variables be defined with origin `o_automatic'.
7948 * variable.h: Added `o_automatic' to `enum variable_origin'
7950 * file.c (remove_intermediates): Made it not print an error message
7951 if the error was that the file does not exist.
7953 * rule.c: Removed `recursive' member from `struct rule'.
7955 * remake.c (library_file_mtime): Made it not use the directory hash
7956 functions, as reading in and hashing /usr/lib and /lib is slow and
7957 most likely unnecessary.
7959 * remake.c (remake_file): Changed message from ``No specification
7960 for making'' to ``No way to make'' so it will be short enough that
7961 most filenames will fit on a line.
7962 Made it look at the `recursive' member of the `struct commands',
7963 rather than of the `struct file' (which no longer has one).
7965 * commands.c (execute_file_commands): Made it look at the
7966 `recursive' member of the `struct commands', rather than of the
7967 `struct file' (which no longer has one).
7969 * file.h: Removed `recursive' member from `struct file'.
7971 * commands.h: Added `recursive' member to `struct commands'.
7973 * dep.h: Removed unused `quotedparen' member from `struct nameseq'
7976 * read.c (dequote): Removed this function.
7977 (multi_glob): Removed reference to `quotedparen' member of
7978 a `struct nameseq' and calls to dequote.
7980 * read.c (record_files): Made it set the stem for $* for all static
7981 pattern rules, not just those with commands given at that time.
7982 Removed check for recursive commands.
7983 Made it check for pairs of .SUFFIXES dependencies to reject as
7984 default goals as well as single ones (that don't start with dots).
7985 (read_makefile): Added checks for recursive commands to set
7986 the `recursive' flag in the `struct commands'.
7988 Sat Jul 30 15:47:23 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7990 * make.c (find_next_token): Made the LENGTHPTR arg optionally nil.
7992 * make.c: Removed `files_made' variable which is defined static in
7993 remake.c and used only there.
7994 (main): Cleaned up somewhat.
7995 (decode_switches): Cleaned up a bit. Made an unknown option be a
7997 (decode_env_switches): Made LEN arg unsigned. Cleaned up.
7998 (print_version): Made it say ``see the source'' rather than ``see
7999 the source file'', since there is more than one.
8001 * file.h: Made `num_intermediates' declared unsigned.
8003 * file.c: Made `num_intermediates' variable unsigned.
8004 (remove_intermediates): Removed unused FORMAT arg.
8005 (enter_file): Made it handle double-colon files properly, adding the
8006 new entry as the old entry's prev pointer.
8008 * dir.c: Re-indented the `struct dir' definition to be right.
8009 (dir_load): Cleaned up slighty.
8010 (file_exists_p): Removed comment saying we could use `access', since
8011 that is a bad idea (except for setuid programs). Cleaned up slightly.
8013 * commands.c: Changed some comments slightly.
8014 (execute_file_commands): Cleaned up a bit. Changed some comments,
8015 added others. Moved freeing of storage for $^ and $? to the same
8016 place as for the other automatic variables.
8017 (execute_command_line): Made `#' trigger a shell.
8018 Added some comments. Cleaned up a bit. Put all the special chars
8019 that trigger shells into an array easily changeable at the top.
8021 * ar.c: Added comments explaining each function.
8022 (ar_scan_1): Merged into ar_member_date.
8023 (ar_member_date): Changed call to ar_scan_1 to the body of that
8025 (ar_member_date_1): Simplified to a ?: expression rather than an
8027 (ar_member_touch): Changed error handling around a bit.
8028 None of these errors are fatal now.
8030 * variable.c (subst_expand): Added a new arg BY_WORD, to do substs
8032 (patsubst_expand): Fixed bug which made calls whose patterns
8033 contained no `%' to not work correctly, by using above.
8034 (variable_expand): Pass extra arg to `subst_expand'.
8036 * variable.c (expand_function): Fixed bug which made `foreach' calls
8037 with one-word lists run off into never-never land.
8039 Fri Jul 29 20:12:36 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8041 * variable.c (expand_function): Made a very minor speed improvement
8042 by avoiding an unnecessary strlen call.
8044 Wed Jul 27 16:01:47 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8046 * rule.c (default_suffixes): Rearranged the list somewhat; added
8047 `.el' and `.elc' to speed things up (especially when building
8048 Emacs), for the same reason `.h' is there.
8050 * read.c (record_files): Changed `lineno' from `long' to
8053 Sun Jul 24 02:15:30 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8055 * variable.c (expand_function): Eliminated use of `wstok'
8056 because it is non-reentrant and unreliable.
8057 Fixed a minor bug which would cause something not to be freed.
8058 * make.c (wstok): Removed `wstok' because it is no longer used.
8060 * variable.c (expand_function): Made `foreach' function put
8061 spaces between output texts like it's supposed to.
8063 Sat Jul 23 17:32:55 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8065 * rule.c (default_suffixes, default_suffix_rules): Added rule
8066 to make %.dvi from %.texinfo.
8068 * dir.c (print_dir_data_base): Made it say a bit more.
8070 Fri Jul 22 23:13:16 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8072 * make.c (print_data_base): Split this function up into one
8074 * variable.c (print_variable_data_base): One of the above.
8075 * rule.c (print_rule_data_base): Ditto.
8076 * file.c (print_file_data_base): Ditto.
8077 * dir.c (print_dir_data_base): Ditto.
8079 * rule.c (install_pattern_rule): Fixed a bug which caused the
8080 terminal and recursive flags to always be zero for rules
8081 entered by this function.
8083 * make.texinfo (Rules: Double-colon): Added a paragraph
8084 explaining the purpose of double-colon rules.
8086 * make.texinfo (Implicit: Catalogue of Rules): Updated to
8087 reflect new C++, TeX, Web, and Texinfo rules. Other slight
8090 * commands.c (execute_file_commands): Fixed a bug wherein
8091 random memory could get written for files with no deps.
8093 Wed Jul 20 19:30:31 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8095 * read.c (readline): Fix bug wherein it would not recognize a
8096 backslash-newline if the buffer filled up and was enlarged
8097 right before reading the newline.
8099 Tue Jul 19 19:55:02 1988 Roland McGrath (mcgrath at chilli.Berkeley.EDU)
8101 * read.c: Added default suffix rules for .cc (using $(C++),
8102 which defaults to `g++', and $(C++FLAGS)), .tex, .dvi, .web
8103 and .cweb (using $(TEX), $(WEAVE), $(TANGLE), $(CWEAVE) and
8106 Sat Jul 16 21:24:28 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8108 * Made error formats use %u rather than %ld for line numbers,
8109 which are now unsigned int's rather than long's.
8111 * read.c (conditional_line): Fixed some bugs caused by use of
8112 unsigned int rather than int in one place.
8114 * read.c (conditional_line): Put the info about active
8115 conditionals in a struct.
8116 (read_makefile): Make a new struct of info about conditionals
8117 for included makefiles and restore the old one after the
8118 included makefile has been read.
8120 * read.c (read_makefile): Don't try to read a makefile with
8121 name "" after giving an error message because an `include'
8122 directive gave no filename.
8124 * read.c (read_makefile): Give an error message for
8125 non-whitespace text after the filename in an `include' directive.
8127 * make.c (error): Take five args, like `fatal'. It managed to
8128 lose with only two. Is there a better way to do this without vfprintf?
8130 * read.c (read_makefile): Commands consisting of only
8131 whitespace are not the same as no commands. I thought I'd
8132 fixed this bug months ago; it seems to have come back.
8134 * make.c (collapse_continuations): All whitespace around a
8135 backslash-newline combination is turned into a single space.
8137 * Added COPYING file and copyright notices to all files.
8139 * make.texinfo (Running: Goals): Fix a typo.
8141 * read.c (do_define): Take an arg for the origin of the
8142 variable being defined.
8143 (read_makefile): Grok `override define'.
8145 * make.texinfo (Variables: Override Directive, Defining):
8146 Document the `override define' combination directive.
8148 * ar.c (ar_member_date): Make a 0 return from `ar_scan' return
8149 (time_t) -1 (nonexistent file), rather than (time_t) 0, which,
8150 when put in the `struct file', makes `file_mtime' try to get
8151 the mtime over and over again.
8153 * variable.c (pattern_matches): Fix a bug that made patterns
8154 not beginning with `%' never match.
8156 Fri Jul 15 21:01:44 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8158 * Took Make out of RCS.
8160 * Split the monolithic `make.c' into several smaller files.