1 Thu Apr 27 12:39:35 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
5 Wed Apr 26 17:15:57 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
7 * file.c (remove_intermediates): Fix inverted test to bail under
8 -n for signal case. Bail under -q or -t.
9 Skip files with update_status==-1.
11 * job.c (job_next_command): Skip empty lines.
12 (new_job): Don't test the return of job_next_command.
13 Just let start_waiting_job handle the case of empty commands.
15 Wed Apr 19 03:25:54 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
17 * function.c [__MSDOS__]: Include <fcntl.h>. From DJ Delorie.
21 Sat Apr 8 14:53:24 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
23 * remake.c (notice_finished_file): Set FILE->update_status to zero
26 Wed Apr 5 00:20:24 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
28 * Version 3.73 released.
30 Tue Mar 28 13:25:46 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
32 * main.c (main): Fixed braino in assert.
36 Mon Mar 27 05:29:12 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
38 * main.c: Avoid string in assert expression. Some systems are broken.
40 Fri Mar 24 00:32:32 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
42 * main.c (main): Handle 1 and 2 returns from update_goal_chain
43 makefile run properly.
47 * main.c (handle_non_switch_argument): New function, broken out of
49 (decode_switches): Set optind to 0 to reinitialize getopt, not to 1.
50 When getopt_long returns EOF, break the loop and handle remaining args
51 with a simple second loop.
53 * remake.c (remake_file): Set update_status to 2 instead of 1 for
54 no rule to make. Mention parent (dependent) in error message.
55 (update_file_1): Handle FILE->update_status == 2 in -d printout.
56 * job.c (start_job_command, reap_children): Set update_status to 2
57 instead of 1 for failed commands.
59 Tue Mar 21 16:23:38 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
61 * job.c (search_path): Function removed (was already #if 0'd out).
62 * configure.in: Remove AC_TYPE_GETGROUPS; nothing needs it any more.
64 Fri Mar 17 15:57:40 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
66 * configure.bat: Write @CPPFLAGS@ translation.
68 Mon Mar 13 00:45:59 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
70 * read.c (parse_file_seq): Rearranged `l(a b)' -> `l(a) l(b)' loop
71 to not skip the elt immediately preceding `l(...'.
73 Fri Mar 10 13:56:49 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
77 * read.c (find_char_unquote): Make second arg a string of stop
78 chars instead of a single stop char. Stop when any char in the
79 string is hit. All callers changed.
80 (find_semicolon): Pass stop chars "#;" to one find_char_unquote call,
81 instead of using two calls. If the match is not a ; but a #,
83 * misc.c: Changed find_char_unquote callers here too.
87 * read.c (read_makefile, parse_file_seq): Fix typo __MS_DOS__ ->
90 * GNUmakefile (globfiles): Add glob/configure.bat.
91 (distfiles): Add configh.dos, configure.bat.
93 Wed Mar 8 13:10:57 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
95 Fixes for MS-DOS from DJ Delorie.
96 * read.c (read_makefile, parse_file_seq) [__MS_DOS__]: Don't see :
97 as separator in "C:\...".
98 * configh.dos (STDC_HEADERS): Define only if undefined.
99 (HAVE_SYS_PARAM_H): Don't define this.
100 (HAVE_STRERROR): Define this.
101 * job.c (construct_command_argv_internal) [__MSDOS__]: Fix typos.
105 * main.c (decode_switches): Reset optind to 1 instead of 0.
107 Tue Mar 7 17:31:06 1995 Roland McGrath <roland@geech.gnu.ai.mit.edu>
109 * main.c (decode_switches): If non-option arg is "-", ignore it.
111 Mon Mar 6 23:57:38 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
115 Wed Feb 22 21:26:36 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
119 Tue Feb 21 22:10:43 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
121 * main.c (main): Pass missing arg to tmpnam.
123 * configure.in: Check for strsignal.
124 * job.c (child_error): Use strsignal.
125 * main.c (main): Don't call signame_init #ifdef HAVE_STRSIGNAL.
127 * misc.c (strerror): Fix swapped args in sprintf.
129 Mon Feb 13 11:50:08 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
131 * configure.in (CFLAGS, LDFLAGS): Don't set these variables.
133 Fri Feb 10 18:44:12 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
135 * main.c (print_version): Add 95 to copyright years.
139 * job.c (start_job_command): Remember to call notice_finished_file
140 under -n when not recursing. To do this, consolidate that code
141 under the empty command case and goto there for the -n case.
143 Tue Feb 7 13:36:03 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
145 * make.h [! STDC_HEADERS]: Don't declare qsort. Sun headers
148 Mon Feb 6 17:37:01 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
150 * read.c (read_makefile): For bogus line starting with tab, ignore
151 it if blank after removing comments.
153 * main.c: Cast results of `alloca' to `char *'.
154 * expand.c: Likewise.
156 Sun Feb 5 18:35:46 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
160 * configure.in: Check for mktemp.
161 * main.c (main) [! HAVE_MKTEMP]: Use tmpnam instead of mktemp.
163 * configure.in (make_cv_sysconf_open_max): New check for `sysconf
165 * acconfig.h: Added #undef HAVE_SYSCONF_OPEN_MAX.
166 * job.c [HAVE_SYSCONF_OPEN_MAX] (getdtablesize): Define as macro
169 Fri Jan 27 04:42:09 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
171 * remake.c (update_file_1): When !MUST_MAKE, don't set
172 FILE->update_status to zero before calling notice_finished_file.
173 (notice_finished_file): Touch only when FILE->update_status is zero.
174 (remake_file): Set FILE->update_status to zero after not calling
175 execute_file_command and deciding to touch instead.
177 Thu Jan 26 01:29:32 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
179 * main.c (debug_signal_handler): New function; toggles debug_flag.
180 (main): Handle SIGUSR1 with that.
182 Mon Jan 16 15:46:56 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
184 * compatMakefile (realclean): Remove Info files.
186 Sun Jan 15 08:23:09 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
190 * job.c (start_job_command): Save and restore environ around vfork
192 (search_path): Function #if 0'd out.
193 (exec_command): Use execvp instead of search_path.
195 * expand.c (variable_expand): Rewrote computed variable name and
196 substitution reference handling to be simpler. First expand the
197 entire text between the parens if it contains any $s, then examine
198 the result of that for subtitution references and do no further
199 expansion while parsing them.
201 * job.c (construct_command_argv_internal): Handle " quoting too,
202 when no backslash, $ or ` characters appear inside the quotes.
204 * configure.in (union wait check): If WEXITSTATUS and WTERMSIG are
205 defined, just use int.
207 Tue Jan 10 06:27:27 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
209 * default.c (default_variables) [__hpux]: Remove special
210 definition of ARFLAGS. Existence of the `f' flag is not
211 consistent across HPUX versions; and one might be using GNU ar
214 * compatMakefile (clean): Don't remove Info files.
216 * compatMakefile (check): Remove gratuitous target declaration.
218 Sat Jan 7 11:38:23 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
220 * compatMakefile (ETAGS, CTAGS): Don't use -t.
222 * arscan.c (ar_name_equal) [cray]: Subtract 1 like [__hpux].
224 * main.c (decode_switches): For --help, print usage to stdout.
226 Mon Dec 5 12:42:18 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
230 * remake.c (update_file_1): Do set_command_state (FILE,
231 cs_not_started) only if old state was deps_running.
233 Mon Nov 28 14:24:03 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
235 * job.c (start_waiting_job): Use set_command_state.
237 * build.template (CPPFLAGS): New variable.
238 (prefix, exec_prefix): Set from @...@.
239 (compilation loop): Pass $CPPFLAGS to compiler.
241 * GNUmakefile (build.sh.in): Make it executable.
243 * GNUmakefile (globfiles): Add configure.in, configure.
247 * configure.in (AC_OUTPUT): Don't write glob/Makefile.
249 * configure.in (AC_CHECK_SYMBOL): Use AC_DEFINE_UNQUOTED.
251 * configure.in: Don't check for ranlib.
253 Tue Nov 22 22:42:40 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
255 * remake.c (notice_finished_file): Only mark also_make's as
256 updated if really ran cmds.
258 Tue Nov 15 06:32:46 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
260 * configure.in: Put dnls before random whitespace.
262 Sun Nov 13 05:02:25 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
264 * compatMakefile (CPPFLAGS): New variable, set from @CPPFLAGS@.
265 (RANLIB): Variable removed.
266 (prefix, exec_prefix): Set these from @...@.
267 (.c.o): Use $(CPPFLAGS).
268 (glob/libglob.a): Don't pass down variables to sub-make.
269 glob/Makefile should be configured properly by configure.
270 (distclean): Remove config.log and config.cache (autoconf stuff).
272 Mon Nov 7 13:58:06 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
274 * acconfig.h: Add #undef HAVE_UNION_WAIT.
275 * configure.in: Converted to Autoconf v2.
276 * dir.c: Test HAVE_DIRENT_H, HAVE_SYS_DIR_H, HAVE_NDIR_H instead
277 of DIRENT, SYSDIR, NDIR.
278 * build.sh.in (prefix, exec_prefix): Set these from @...@.
279 (CPPFLAGS): New variable, set from @CPPFLAGS@.
280 (compiling loop): Pass $CPPFLAGS before $CFLAGS.
281 * install.sh: File renamed to install-sh.
283 * main.c (define_makeflags): When no flags, set WORDS to zero.
285 Sun Nov 6 18:34:01 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
289 * main.c (define_makeflags): Terminate properly when FLAGSTRING is
292 Fri Nov 4 16:02:51 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
296 Tue Nov 1 01:18:10 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
300 * job.c (start_job_command): When ARGV is nil, only set
301 update_state and call notice_finished_file if job_next_command
304 * job.c (start_job_command): Call notice_finished_file for empty
307 Thu Oct 27 02:02:45 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
309 * file.c (snap_deps): Set COMMANDS_SILENT for .SILENT, not
312 Wed Oct 26 02:14:10 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
316 Tue Oct 25 22:49:24 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
318 * file.c (snap_deps): Set command_flags bits in all :: entries.
320 Mon Oct 24 18:47:50 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
322 * make.h (posix_pedantic): Declare it.
323 * main.c (main): Move checks .IGNORE, .SILENT, .POSIX to
325 * file.c (snap_deps): Check .IGNORE, .SILENT, .POSIX here instead
326 of in main. If .IGNORE has deps, OR COMMANDS_NOERROR into their
327 command_flags and don't set -i. Likewise .SILENT.
328 * job.c (start_job_command): In FLAGS initialization, OR in
329 CHILD->file->command_flags.
330 * file.h (struct file): New member `command_flags'.
332 Sun Oct 16 01:01:51 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
334 * main.c (switches): Bump flag values for --no-print-directory and
335 --warn-undefined-variables, so neither is 1 (which indicates a
338 Sat Oct 15 23:39:48 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
340 * main.c (main): Add missing code in .IGNORE test.
342 Mon Oct 10 04:09:03 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
344 * variable.c (define_automatic_variables): Define +D and +F.
346 Sat Oct 1 04:07:48 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
348 * main.c (main): Define hidden automatic variable with command
349 vars, and MAKEOVERRIDES to a reference to that.
350 (define_makeflags): If posix_pedantic, write a reference to that
353 Thu Sep 29 00:14:26 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
355 * main.c (posix_pedantic): New variable.
356 (main): Set posix_pedantic if .POSIX is a target.
357 Fix .IGNORE and .SILENT checks to require is_target.
359 * commands.c (set_file_variables): Define new automatic variable
360 $+, like $^ but before calling uniquize_deps.
362 * job.c (reap_children): Call delete_child_targets for non-signal
363 error if .DELETE_ON_ERROR is a target.
365 Tue Sep 27 01:57:14 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
369 Mon Sep 26 18:16:55 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
371 * job.c (reap_children): Don't change C->file->command_state when
372 dying. Test it only after calling start_job_command for a new
373 command line. When no more cmds, just set C->file->update_status.
374 (start_job_command): When the last line is empty or under -n, set
375 C->file->update_status.
376 (start_waiting_job): Grok cs_not_started after start_job_command
378 (new_job): Set C->file->update_status when there are no cmds.
379 (job_next_command): When out of lines, don't set
380 CHILD->file->update_status or CHILD->file->command_state.
382 * main.c (quote_as_word): Renamed from shell_quote. Take new arg;
383 if nonzero, also double $s.
384 (main): Define MAKEOVERRIDES from command_variables here.
385 (define_makeflags): Don't use command_variables here; instead write a
386 reference $(MAKEOVERRIDES) in MAKEFLAGS. Make vars recursive.
388 * dir.c [__MSDOS__]: Fixed typo.
390 * vpath.c (selective_vpath_search): Reset EXISTS when stat fails.
392 Sat Sep 10 03:01:35 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
394 * remake.c: Include <assert.h> and use assert instead of printfs
397 * main.c (decode_switches): Loop until optind hits ARGC, not just
398 until getopt_long returns EOF. Initialize C to zero before loop;
399 in loop if C is EOF, set optarg from ARGV[optind++], else call
401 (decode_env_switches): Use variable_expand instead of
402 allocated_variable_expand. Allocate a fresh buffer to copy split
403 words into; scan characters by hand to break words and
405 (shell_quote): New function.
406 (define_makeflags): Allocate doubled space for switch args, and command
407 variable names and values; use shell_quote to quote those things.
409 Fri Sep 9 01:37:47 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
413 * acconfig.h: Add HAVE_SYS_SIGLIST and HAVE__SYS_SIGLIST.
415 * main.c (decode_switches): The non-option return from getopt is
417 (command_variables): New type and variable.
418 (decode_switches, decode_env_switches): After making a variable
419 definition, record the struct variable pointer in the
420 command_variables chain.
421 (define_makeflags): If ALL, write variable definitions for
424 * main.c (other_args): Variable removed.
425 (goals, lastgoal): New static variables (moved from auto in main).
426 (main): Don't process OTHER_ARGS at all.
427 Don't set variable MAKEOVERRIDES at all; define MAKE to just
429 (init_switches): Prepend a - {return in order} instead of a +
431 (decode_switches): Don't set OTHER_ARGS at all.
432 Grok '\0' return from getopt_long as non-option argument; try
433 variable definition and (if !ENV) enter goal targets here.
434 (decode_env_switches): Use allocated_variable_expand to store value.
435 Use find_next_token to simplify word-splitting loop. Don't
436 prepend a dash to uninterpreted value. Instead, if split into
437 only one word, try variable definition and failing that prepend a
438 dash to the word and pass it to decode_switches as a single arg.
440 Wed Sep 7 03:02:46 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
442 * remake.c (notice_finished_file): Only recheck modtimes if
443 FILE->command_state was cs_running on entry (meaning the commands
445 (update_file_1): Whenever we set FILE->update_status, call
446 notice_finished_file instead of just set_command_state.
447 * job.c (start_job_command): Whenever we set
448 CHILD->file->update_status, call notice_finished_file instead of
449 just set_command_state.
451 Tue Sep 6 19:13:54 1994 Roland McGrath <roland@geech.gnu.ai.mit.edu>
453 * default.c: Add missing ".
455 * job.c: Changed all assignments of command_state members to calls
456 to set_command_state.
457 * remake.c: Likewise.
458 * file.c (set_command_state): New function.
459 * file.h: Declare set_command_state.
461 * main.c (init_switches): Put a + first in options.
463 Mon Jul 25 18:07:46 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
465 Merge MSDOS/GO32 port from DJ Delorie <dj@ctron.com>.
466 * vpath.c: Changed all uses of ':' to PATH_SEPARATOR_CHAR.
467 * main.c (directory_before_chdir): New variable, moved out of main
469 (main) [__MSDOS__]: Look for \ or : to delimit last component of
470 PROGRAM. Don't frob ARGV[0] before setting MAKE_COMMAND variable.
471 (die): Change back to `directory_before_chdir' before dying.
472 * make.h (PATH_SEPARATOR_CHAR): New macro; differing defns for
474 * job.c [__MSDOS__]: Include <process.h>.
475 [__MSDOS__] (dos_pid, dos_status, dos_bname, dos_bename,
476 dos_batch_file): New variables.
477 (reap_children) [__MSDOS__]: Don't call wait; just examine those vars.
478 (unblock_sigs) [__MSDOS__]: Do nothing.
479 (start_job_command) [__MSDOS__]: Use spawnvpe instead of vfork & exec.
480 (load_too_high) [__MSDOS__]: Always return true.
481 (search_path) [__MSDOS__]: Check for : or / in FILE to punt.
482 Use PATH_SEPARATOR_CHAR instead of ':'.
483 (construct_command_argv_internal) [__MSDOS__]: Wholly different
484 values for sh_chars and sh_cmds. Wholly new code to handle shell
486 * function.c (expand_function: `shell') [__MSDOS__]: Wholly new
488 * dir.c [__MSDOS__] (dosify): New function.
489 (dir_contents_file_exists_p) [__MSDOS__]: Call it on FILENAME and
490 process the result instead of FILENAME itself.
491 (file_impossible_p) [__MSDOS__]: Likewise.
492 * default.c [__MSDOS__]: Define GCC_IS_NATIVE.
493 (default_suffix_rules) [__MSDOS__]: Use `y_tab.c' instead of `y.tab.c'.
494 (default_variables) [GCC_IS_NATIVE]: Set CC and CXX to `gcc', YACC to
495 `bison -y', and LEX to `flex'.
496 * configure.bat, configh.dos: New files.
497 * commands.c (fatal_error_signal) [__MSDOS__]: Just remove
498 intermediates and exit.
500 * commands.c (set_file_variables): Add parens in length
501 computation in .SUFFIXES dep loop to quiet compiler warning. From
504 * read.c (read_makefile): Free FILENAME if we allocated it. From
507 Mon Jul 4 17:47:08 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
509 * misc.c (safe_stat): New function, EINTR-safe wrapper around stat.
510 * vpath.c (selective_vpath_search): Use safe_stat in place of stat.
511 * read.c (construct_include_path): Use safe_stat in place of stat.
512 * job.c (search_path): Use safe_stat in place of stat.
513 * dir.c (find_directory): Use safe_stat in place of stat.
514 * commands.c (delete_target): Use safe_stat in place of stat.
515 * arscan.c (ar_member_touch) [EINTR]: Do EINTR looping around fstat.
516 * remake.c (name_mtime): Use safe_stat in place of stat.
517 (touch_file) [EINTR]: Do EINTR looping around fstat.
519 Fri Jun 24 05:40:24 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
521 * read.c (read_makefile): Check for a shell command first, and
522 then strip leading tabs before further checking if it's not a
525 * make.h [__arm]: Undefine POSIX.
526 [!__GNU_LIBRARY__ && !POSIX && !_POSIX_VERSION]: Don't declare system
527 functions that return int.
529 * job.c (construct_command_argv_internal): After swallowing a
530 backslash-newline combination, if INSTRING is set goto string_char
531 (new label) for normal INSTRING handling code.
533 Sat Jun 4 01:11:20 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
535 * configure.in: Don't check for sys_siglist and _sys_siglist with
536 AC_HAVE_FUNCS. Instead use two AC_COMPILE_CHECKs.
538 Mon May 23 18:20:38 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
540 * Version 3.71.1 released.
542 * make.h [!__GNU_LIBRARY__ && !POSIX]: Also test #ifndef
543 _POSIX_VERSION for these declarations.
545 * misc.c [GETLOADAVG_PRIVILEGED] [POSIX]: Remove bogus #ifndefs
546 around #undefs of HAVE_SETREUID and HAVE_SETREGID.
548 Sat May 21 16:26:38 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
550 * Version 3.71 released.
552 * misc.c [GETLOADAVG_PRIVILEGED] [POSIX]: Don't test [HAVE_SETUID]
553 and [HAVE_SETGID]. Every system has those, and configure doesn't
556 * make.h [_POSIX_VERSION]: Don't #define POSIX #ifdef ultrix.
558 * compatMakefile (loadavg): Depend on and use loadavg.c instead of
560 (loadavg.c): Link or copy it from getloadavg.c.
561 (distclean): Remove loadavg.c.
563 Mon May 16 22:59:04 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
567 * misc.c [GETLOADAVG_PRIVILEGED] [! POSIX]: Undefine HAVE_SETEUID
570 * default.c (default_terminal_rules): In SCCS rules, put
571 $(SCCS_OUTPUT_OPTION) before $<. On some systems -G is grokked
572 only before the file name.
573 * configure.in (SCCS_GET_MINUS_G check): Put -G flag before file name.
575 Tue May 10 16:27:38 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
577 * job.c (construct_command_argv_internal): Swallow
578 backslash-newline combinations inside '' strings too.
580 Thu May 5 04:15:10 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
582 * read.c (do_define): Call collapse_continuations on each line
585 Mon Apr 25 19:32:02 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
587 * job.c (construct_command_argv_internal): Notice newline inside
588 '' string when RESTP is non-null.
590 Fri Apr 22 17:33:30 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
594 * remake.c (update_goal_chain): Reset FILE to G->file after the
595 double-colon loop so it is never null for following code.
597 * read.c (read_makefile): Fix `override define' parsing to skip
598 whitespace after `define' properly.
600 * compatMakefile (srcdir): Define as @srcdir@; don't reference
602 (glob/Makefile): New target.
604 Thu Apr 21 16:16:55 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu)
608 * misc.c (remove_comments): Use find_char_unquote.
609 * make.h (find_char_unquote): Declare it.
610 * read.c (find_char_unquote): New function, generalized from
612 (find_percent, find_semicolon, parse_file_seq): Use that.
614 Wed Apr 20 18:42:39 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
616 * implicit.c (pattern_search): Always allocate new storage for
617 FILE->stem. It is not safe to store STEM's address because it
618 might be auto storage.
620 * configure.in: Check for seteuid and setegid.
621 * misc.c [HAVE_SETEUID]: Declare seteuid.
622 [HAVE_SETEGID]: Declare setegid.
623 (make_access, user_access) [HAVE_SETEUID]: Use seteuid.
624 [HAVE_SETEGID]: Use setegid.
626 * remake.c (update_goal_chain): Set STATUS to FILE->update_status,
627 to preserve whether it's 2 for error or 1 for -q trigger. When
628 STATUS gets nonzero and -q is set, always stop immediately.
629 * main.c (main, decode_switches): Die with 2 for errors.
630 (main): Accept 2 return from update_goal_chain and die with that.
631 * misc.c (fatal, makefile_fatal): Die with 2; 1 is reserved for -q
633 * job.c (reap_children): Die with 2 for error.
634 (start_job_command): Set update_status to 2 for error. Set it to
635 1 when we would run a command and question_flag is set.
637 * read.c (read_makefile): Don't mark makefiles as precious. Just
638 like other targets, they can be left inconsistent and in need of
639 remaking by aborted commands.
641 * read.c (read_makefile): Write no error msg for -include file.
643 Tue Apr 5 05:22:19 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
645 * commands.c (fatal_error_signal): Don't unblock signals.
647 * file.h (struct file): Change member `double_colon' from flag to
649 * read.c (record_files): Set double_colon pointer instead of flag.
650 * main.c (main): When disqualifying makefiles for updating, use
651 double_colon pointer to find all entries for a file.
652 * file.c (enter_file): If there is already a double-colon entry
653 for the file, set NEW->double_colon to that pointer.
654 (file_hash_enter): Use FILE->double_colon to find all entries to
656 * remake.c (update_goal_chain): Do inner loop on double-colon entries.
657 (update_file): Use FILE->double_colon pointer to find all entries.
659 (notice_finished_file): Propagate mtime change to all entries.
661 * variable.c (try_variable_definition): Return after abort.
663 Fri Apr 1 18:44:15 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
665 * read.c (read_makefile): Remove unused variable.
666 (parse_file_seq): When removing an elt that is just `)', properly
667 fix up the previous elt's next pointer.
669 Mon Mar 28 18:31:49 1994 Roland McGrath (roland@mole.gnu.ai.mit.edu)
671 * configure.in: Do AC_SET_MAKE.
672 * GNUmakefile (Makefile.in): Edit MAKE assignment into @SET_MAKE@.
674 Fri Mar 4 00:02:32 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
676 * function.c (subst_expand): If BY_WORD or SUFFIX_ONLY is set and
677 the search string is the empty string, find a match at the end of
678 each word (using end_of_token in place of sindex).
680 * misc.c (end_of_token): Don't treat backslashes specially; you
681 can no longer escape blanks with backslashes in export, unexport,
682 and vpath. This was never documented anyway.
684 Thu Mar 3 23:53:46 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
686 * read.c (read_makefile): Variable name for `define' is not just
687 first token; use whole rest of line and strip trailing blanks.
689 Wed Feb 16 16:03:45 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
693 * read.c (read_makefile): Add -d msg stating args.
695 * read.c (read_makefile): Use isspace to skip over leading
696 whitespace, and explicitly avoid skipping over tabs. Don't want
697 to skip just spaces though; formfeeds et al should be skipped.
699 * default.c (default_variables) [__hpux]: Add f in ARFLAGS.
701 * arscan.c (ar_name_equal) [__hpux]: Subtract 2 instead of 1 from
702 sizeof ar_name for max length to compare.
704 * misc.c [GETLOADAVG_PRIVILEGED] [POSIX]: Undefine HAVE_SETREUID
705 #ifdef HAVE_SETUID; likewise HAVE_SETREGID and HAVE_SETGID.
707 * main.c (main): Call user_access after setting `program', in case
708 it needs to use it in an error message.
710 * read.c (read_makefile): Ignore an empty line starting with a tab.
712 Thu Feb 10 21:45:31 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
714 * configure.in (AC_SYS_SIGLIST_DECLARED): Use this instead of
715 AC_COMPILE_CHECK that is now its contents.
717 Fri Feb 4 16:28:54 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
719 * make.h: #undef strerror after #include <string.h>.
720 [! ANSI_STRING]: Declare strerror.
722 Thu Feb 3 02:21:22 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
724 * misc.c (strerror): #undef any macro before function definition.
726 Mon Jan 31 19:07:23 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
728 * variable.c (try_variable_definition): Calculate BEG before loop
729 to strip blanks by decrementing END. Don't decr END to before BEG.
731 * read.c (read_makefile): Skip over leading space characters, but
732 not tabs, after removing continuations and comments (it used to
735 Tue Jan 25 16:45:05 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
737 * variable.c (define_automatic_variables): In $(@D) et al, use
738 patsubst to remove trailing slash.
740 * commands.c (delete_target): New function, broken out of
741 delete_child_targets. Check for archive members and give special msg.
742 (delete_child_targets): Use delete_target.
744 Mon Jan 17 17:03:22 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
746 * default.c (default_suffix_rules): Use $(TEXI2DVI_FLAGS) in
747 texi2dvi rules. Use $(MAKEINFO_FLAGS) in makeinfo rules.
749 Tue Jan 11 19:29:55 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
751 * GNUmakefile (tarfiles): Omit make-doc.
752 (make-$(version).tar): Include make.info*.
754 Fri Jan 7 16:27:00 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
756 * compatMakefile (configure, config.h.in): Comment out rules.
758 Thu Jan 6 18:08:08 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
760 * compatMakefile (binprefix, manprefix): New variables.
761 (instname): Variable removed.
762 (install): Use $({bin,man}prefix)make in place of $(instname).
763 File targets likewised renamed.
765 Mon Jan 3 17:50:25 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
767 * Version 3.70 released.
769 Thu Dec 23 14:46:54 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
773 * read.c (parse_file_seq): Inside multi-word archive ref
774 translation loop, check NEW1==0 at end and break out of the loop.
776 * GNUmakefile (make-$(version).tar): Distribute install.sh.
777 * install.sh: New file.
779 * configure.in (SCCS_GET_MINUS_G check): Put redirection for admin
780 cmds outside subshell parens, to avoid "command not found" msgs
783 Wed Dec 22 17:00:43 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
785 * configure.in (SCCS_GET_MINUS_G check): Put -G flag last in get cmd.
786 Redirect output & error from get to /dev/null.
787 Fix reversed sense of test.
789 Fri Dec 17 15:31:36 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
791 * configure.in (SCCS_GET_MINUS_G check): Use parens instead of
792 braces inside if condition command; some shells lose.
794 Thu Dec 16 15:10:23 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
798 * arscan.c [M_UNIX]: Move #undef M_XENIX for PORTAR stuff.
799 (PORTAR) [M_XENIX]: Define to 0 instead of 1.
801 * main.c (define_makeflags): Only export MAKEFLAGS if !ALL.
803 Wed Dec 15 17:47:48 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
805 * main.c (main): Cast result of pointer arith to unsigned int
806 before passing to define_variable for envars. Matters when
807 sizeof(unsigned)!=sizeof(ptrdiff_t).
809 Tue Dec 14 14:21:16 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
811 * configure.in: Add new check for SCCS_GET_MINUS_G.
812 * config.h.in: Add #undef SCCS_GET_MINUS_G.
813 * default.c (default_terminal_rules): Use `$(SCCS_OUTPUT_OPTION)' in
814 place of `-G $@' in SCCS commands.
815 (default_variables) [SCCS_GET_MINUS_G]: Define SCCS_OUTPUT_OPTION
818 * configure.in (AC_OUTPUT): Put touch stamp-config in second arg
819 (so it goes in config.status), rather than afterward.
821 * ar.c (ar_member_date): Don't call enter_file on the archive file
822 if it doesn't exist (by file_exists_p).
824 * compatMakefile ($(infodir)/make.info): Replace `$$d/foo.info'
825 with `$$dir/make.info' in install-info invocation (oops).
827 * vpath.c (construct_vpath_list): Only set LASTPATH set PATH when
828 we do not unlink and free PATH.
830 * file.c (print_file_data_base): Fix inverted calculation for
831 average files per hash bucket.
833 * read.c (readline): When we see a NUL, give only a warning and
834 synthesize a newline to terminate the building line (used to
835 fatal). Move fgets call into the loop condition, and after the
836 loop test ferror (used to test !feof in the loop).
838 Fri Dec 3 16:40:31 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
840 * configure.in: Check for strerror in AC_HAVE_FUNCS.
842 Thu Dec 2 15:37:50 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
844 Differentiate different flavors of missing makefile error msgs,
845 removing gratuitous `fopen: ' and giving caller for included makefiles.
846 * misc.c [! HAVE_STRERROR]: Define our own strerror here.
847 (perror_with_name, pfatal_with_name): Use strerror instead of
848 replicating its functionality.
849 * read.c (read_makefile): Return int instead of void.
850 (read_all_makefiles, read_makefile): Change callers to notice zero
851 return and give error msg.
853 Thu Nov 11 11:47:36 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
857 * default.c: Put `-G $@' before $< in SCCS cmds.
859 Wed Nov 10 06:06:14 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
861 * read.c (read_makefile): After trying a variable defn, notice if
862 the line begins with a tab, and diagnose an error.
864 Sun Nov 7 08:07:37 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
868 Wed Nov 3 06:54:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
872 * implicit.c (try_implicit_rule): Look for a normal rule before an
875 Fri Oct 29 16:45:28 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
877 * function.c (expand_function: `sort'): Double NWORDS when it
878 overflows, instead of adding five.
880 * compatMakefile (clean): Remove loadavg.
882 Wed Oct 27 17:58:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
886 * file.h (NEW_MTIME): Define new macro.
887 * main.c (main): Set time of NEW_FILES to NEW_MTIME, not to
888 current time returned from system. Removed variable NOW.
889 * remake.c (notice_finished_file): Use NEW_MTIME in place of
890 current time here too.
892 Tue Oct 26 19:45:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
896 * remake.c (update_file_1): Don't clear MUST_MAKE when FILE has no
897 cmds and !DEPS_CHANGED unless also !NOEXIST.
899 Mon Oct 25 15:25:21 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
901 * read.c (parse_file_seq): When converting multi-word archive
902 refs, ignore a word beginning with a '('.
904 Fri Oct 22 02:53:38 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
906 * configure.in: Check for sys/timeb.h.
907 * make.h [HAVE_SYS_TIMEB_H]: Test this before including it.
909 Thu Oct 21 16:48:17 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
913 * rule.c (convert_suffix_rule): New local TARGPERCENT. Set it to
914 TARGNAME+1 for "(%.o)", to TARGNAME for "%.?". Use it in place of
915 TARGNAME to initialize PERCENTS[0].
917 Mon Oct 18 06:49:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
919 * configure.in: Use AC_HAVE_HEADERS(unistd.h) instead of AC_UNISTD_H.
920 Remove AC_USG; it is no longer used.
922 * file.c (print_file): New function, broken out of
923 print_file_data_base.
924 (print_file_data_base): Call it.
925 * rule.c (print_rule): New function, broken out of
926 print_rule_data_base.
927 (print_rule_data_base): Call it.
929 Thu Oct 14 14:54:03 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
931 * default.c (install_default_suffix_rules): New function, broken
932 out of install_default_implicit_rules.
933 (install_default_implicit_rules): Move suffix rule code there.
934 * make.h: Declare install_default_suffix_rules.
935 * main.c (main): Call install_default_suffix_rules before reading
936 makefiles. Move convert_to_pattern call before
937 install_default_implicit_rules.
939 * job.h (struct child): Make `pid' member type `pid_t' instead of
942 * compatMakefile (RANLIB): New variable, set by configure.
943 (glob/libglob.a): Pass RANLIB value down to submake.
945 Fixes for SCO 3.2 "devsys 4.2" from pss@tfn.com (Peter Salvitti).
946 * make.h: Include <sys/timeb.h> before <time.h> for SCO lossage.
947 * job.c [! getdtablesize] [! HAVE_GETDTABLESIZE]: If NOFILE is not
948 defined but NOFILES_MAX is, define it to be that.
950 Mon Oct 11 19:47:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
952 * GNUmakefile (make-$(version).tar): Depend on acconfig.h, so it
955 Sun Oct 3 15:15:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
957 * default.c (default_terminal_rules): Add `-G $@' to SCCS get cmds.
959 Tue Sep 28 14:18:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
961 * job.c (construct_command_argv_internal): Add ^ to SH_CHARS; it
962 is another symbol for | in some shells.
963 * main.c (main): Add it to CMD_DEFS quoting list as well.
965 Mon Sep 20 18:05:24 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
967 * job.c (construct_command_argv_internal): Remove '=' from
968 SH_CHARS. Only punt on '=' if it is unquoted in a word before the
969 first word without an unquoted '='.
971 * main.c (define_makeflags): Set v_export for MAKEFLAGS.
973 Fri Sep 17 00:37:18 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
975 * remake.c (update_file_1): Use .DEFAULT cmds for phony targets.
977 * make.h [_AIX && _POSIX_SOURCE]: Define POSIX.
979 * commands.c (delete_child_targets): Don't delete phony files.
981 * job.c (start_job_command): Set COMMANDS_RECURSE in FLAGS if we
982 see a `+' at the beginning of the command line.
984 Thu Sep 9 17:57:14 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
988 Wed Sep 8 20:14:21 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
990 * main.c (define_makeflags): Define MAKEFLAGS with o_file, not o_env.
992 Mon Aug 30 12:31:58 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
994 * expand.c (variable_expand): Fatal on an unterminated reference.
996 Thu Aug 19 16:27:53 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1000 * variable.c (define_automatic_variables): Define new o_default
1001 variable `MAKE_VERSION' from version_string and remote_description.
1003 * make.h (version_string, remote_description): Declare these here.
1004 * main.c: Don't declare version_string.
1005 (print_version): Don't declare remote_description.
1007 Wed Aug 18 15:01:24 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1009 * read.c (read_makefile): Free space pointed to by CONDITIONALS
1010 before restoring the old pointer.
1012 Mon Aug 16 17:33:36 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1014 * compatMakefile ($(objs)): Depend on config.h.
1016 * GNUmakefile (build.sh.in): Depend on compatMakefile.
1018 * configure.in: Touch stamp-config after AC_OUTPUT.
1020 Fri Aug 13 16:04:22 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1024 Thu Aug 12 17:18:57 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1026 * make.h: Include <config.h> instead of "config.h".
1028 Wed Aug 11 02:35:25 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1030 * main.c (main): Make all variables interned from ENVP be v_export.
1031 * variable.c (try_variable_definition): In v_default case, don't
1032 check for an o_file variable that `getenv' finds.
1034 * job.c (reap_children): New local variable ANY_LOCAL; set it
1035 while setting ANY_REMOTE. If !ANY_LOCAL, don't wait for local kids.
1037 * main.c (main): Don't call decode_env_switches on MFLAGS. DOC THIS.
1039 * function.c (expand_function): #if 0 out freeing of ENVP since it
1042 Mon Aug 9 17:37:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1046 * remote-stub.c (remote_status): Set errno to ECHILD before return.
1047 * job.c (reap_children): Scan the chain for remote children and
1048 never call remote_status if there are none.
1050 * function.c (expand_function: `shell'): #if 0 out calling
1051 target_environment; just set ENVP to environ instead.
1053 * job.c (reap_children): Check for negative return from
1054 remote_status and fatal for it.
1055 When blocking local child wait returns 0, then try a blocking call
1058 Tue Aug 3 00:19:00 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1060 * compatMakefile (clean): Delete make.info* and make.dvi here.
1061 (distclean): Not here.
1063 * dep.h (RM_*): Use #defines instead of enum to avoid lossage from
1064 compilers that don't like enum values used as ints.
1066 Mon Aug 2 16:46:34 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1068 * compatMakefile (loadavg): Add $(LOADLIBES).
1070 Sun Aug 1 16:01:15 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1074 * compatMakefile (loadavg, check-loadavg): New targets.
1075 (check): Depend on check-loadavg.
1077 * compatMakefile (glob/libglob.a): Depend on config.h.
1079 * misc.c (log_access): Write to stderr instead of stdout.
1081 Fri Jul 30 00:07:02 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1085 Thu Jul 29 23:26:40 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1087 * configure.in (SYS_SIGLIST_DECLARED): In test program include
1088 <unistd.h> #ifdef HAVE_UNISTD_H.
1090 * compatMakefile (.PHONY): Put after `all' et al.
1092 * configure.in: Add AC_IRIX_SUN.
1094 Wed Jul 28 17:41:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1098 Mon Jul 26 14:36:49 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1102 Sun Jul 25 22:09:08 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1106 * compatMakefile ($(infodir)/make.info): Don't use $(instname).
1107 Run install-info script if present.
1109 Fri Jul 23 16:03:50 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1111 * make.h [STAT_MACROS_BROKEN]: Test this instead of [uts].
1113 * configure.in: Add AC_STAT_MACROS_BROKEN.
1115 Wed Jul 14 18:48:11 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1119 * read.c (read_makefile): Recognize directive `-include', like
1120 `include' but sets RM_DONTCARE flag.
1122 * variable.c (target_environment): If FILE is nil, use
1123 current_variable_set_list in place of FILE->variables.
1124 * function.c (expand_function: `shell'): Get an environment for
1125 the child from target_environment instead of using environ.
1127 * dep.h: Declare read_all_makefiles here.
1128 (RM_*): Define new enum constants.
1129 * read.c (read_makefile): Second arg is FLAGS instead of TYPE.
1130 Treat it as a bit mask containing RM_*.
1131 (read_all_makefiles): For default makefiles, set D->changed to
1132 RM_DONTCARE instead of 1.
1133 * main.c: Don't declare read_all_makefiles here.
1134 (main): Check `changed' member of read_makefiles elts for RM_*
1135 flags instead of specific integer values.
1137 Mon Jul 12 22:42:17 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1139 * make.h [sequent && i386]: #undef POSIX. From trost@cse.ogi.edu.
1141 Thu Jul 8 19:51:23 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1143 * vpath.c (construct_vpath_list): If ELEM is zero 0, free PATTERN
1145 (build_vpath_lists): Empty `vpaths' around construct_vpath_list
1146 call for $(VPATH). Expand $(strip $(VPATH)), not just $(VPATH).
1148 * rule.c (convert_suffix_rule): Use alloca instead of xmalloc for
1149 PERCENTS, whose storage is not consumed by create_pattern_rule.
1151 * make.h [__mips && _SYSTYPE_SVR3]: #undef POSIX.
1153 Wed Jun 30 18:11:40 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1157 * rule.c (max_pattern_targets): New variable.
1158 (count_implicit_rule_limits): Compute its value.
1159 * rule.h: Declare it.
1160 * implicit.c (pattern_search): Make TRYRULES max_target_patterns
1161 times bigger. Move adding new TRYRULES elt inside the inner
1162 targets loop, so each matching target gets its own elt in MATCHES
1163 and CHECKED_LASTSLASH.
1165 * file.c (remove_intermediates): If SIG!=0 say `intermediate file'
1166 instead of just `file' in error msg.
1168 Fri Jun 25 14:55:15 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1170 * job.c (construct_command_argv): Turn off
1171 --warn-undefined-variables around expansion of SHELL and IFS.
1172 * read.c (tilde_expand): Likewise for HOME.
1173 (read_all_makefiles): Likewise for MAKEFILES.
1174 * vpath.c (build_vpath_lists): Likewise for VPATH.
1176 * main.c (warn_undefined_variables_flag): New flag variable.
1177 (switches): Add --warn-undefined-variables.
1178 * make.h (warn_undefined_variables_flag): Declare it.
1179 * expand.c (warn_undefined): New function.
1180 (reference_variable): Call it if the variable is undefined.
1181 (variable_expand): In substitution ref, call warn_undefined if the
1182 variable is undefined.
1184 * default.c (default_pattern_rules): Add `%.c: %.w %.ch' and
1185 `%.tex: %.w %.ch' rules.
1186 (default_suffix_rules: .w.c, .w.tex): Pass three args: $< - $@.
1187 (default_suffixes): Add `.ch'.
1189 Mon Jun 21 17:55:39 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1191 * default.c (default_suffixes): Replace `.cweb' with `.w'.
1192 (default_suffix_rules): Rename `.cweb.c' and `.cweb.tex' to `.w.c'
1195 Fri Jun 11 14:42:09 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1197 * compatMakefile ($(bindir)/$(instname)): Add missing backslash.
1199 Thu Jun 10 18:14:08 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1203 * read.c (multi_glob): Don't free OLD and OLD->name in the
1204 FOUND!=0 fork. Use new block-local variable F instead of
1207 * ar.c (glob_pattern_p): New function, snarfed from glob/glob.c.
1208 (ar_glob): Call it; return nil immediately if MEMBER_PATTERN
1209 contains no metacharacters.
1211 Wed Jun 9 16:25:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1213 * ar.c (ar_glob{_match,_alphacompare}): New function.
1215 * dep.h [! NO_ARCHIVES]: Declare it.
1216 * read.c (multi_glob) [! NO_ARCHIVES]: Use it on archive member elts.
1218 * read.c (read_makefile): Pass flag (1) to parse_file_seq, not to
1219 multi_glob (which doesn't take a 3rd arg).
1220 * rule.c (install_pattern_rule): Likewise.
1221 * default.c (set_default_suffixes): Here too.
1222 * function.c (string_glob): Don't pass gratuitous arg to multi_glob.
1224 * read.c (parse_file_seq) [! NO_ARCHIVES]: Add post-processing
1225 loop to translate archive refs "lib(a b)" into "lib(a) lib(b)".
1227 Mon Jun 7 19:26:51 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1229 * compatMakefile (installdirs): Actually pass directory names.
1230 ($(bindir)/$(instname)): Test chgrp&&chmod exit status with `if';
1231 if it fails, echo a warning msg, but don't make the rule fail.
1233 * read.c (tilde_expand): New function, broken out of tilde_expand.
1234 (multi_glob): Call it.
1235 (construct_include_path): Expand ~ in directory names.
1236 * dep.h: Declare tilde_expand.
1237 * main.c (enter_command_line_file): Expand ~ at the start of NAME.
1238 (main): Expand ~ in -C args.
1239 * read.c (read_makefile): Expand ~ in FILENAME unless TYPE==2.
1241 Fri Jun 4 13:34:47 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1243 * main.c (decode_env_switches): Use xmalloc instead of alloca for ARGS.
1245 * main.c (main): Put result of alloca in temporary variable with
1246 simple assignment, to make SGI compiler happy.
1248 Thu Jun 3 20:15:46 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1252 * main.c (main): Before re-execing, remove intermediate files, and
1253 print the data base under -p. Sexier debugging message.
1255 * implicit.c (pattern_search): Allocate an extra copy of the name
1256 of a winning intermediate file when putting it in FOUND_FILES.
1258 Wed Jun 2 16:38:08 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1260 * read.c (read_makefile): Pass flag (1) to parse_file_seq, not to
1261 multi_glob (which doesn't take a 3rd arg).
1263 * dir.c (dir_contents_file_exists_p): When reading dirents, ignore
1264 chars within D_NAMLEN that are NULs.
1266 * main.c (decode_switches): Don't savestring ARGV[0] to put it
1268 For string switch, don't savestring `optarg'.
1269 (main): Don't free elts of makefiles->list that are "-".
1270 Use alloca'd rather than savestring'd storage for elts of
1271 makefiles->list that are temporary file names.
1272 * read.c (read_all_makefiles): Don't free *MAKEFILES.
1273 * file.c (enter_file): Don't strip `./'s.
1274 * main.c (enter_command_line_file): New function.
1275 (main): Use it in place of enter_file for command-line goals from
1276 other_files, and for old_files and new_files.
1278 Mon May 31 18:41:40 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1282 * compatMakefile (.SUFFIXES): Add .info.
1283 ($(infodir)/$(instname).info): Find make.info* in cwd if there,
1284 else in $srcdir. Use basename to remove dir name from installed name.
1286 Thu May 27 17:35:02 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1288 * implicit.c (pattern_search): When interning FOUND_FILES, try
1289 lookup_file first; if found, free the storage for our copy of the name.
1291 Wed May 26 14:31:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1295 * main.c (decode_switches): In usage msg, write `--switch=ARG' or
1296 `--switch[=OPTARG]' rather than `--switch ARG' or `--switch [ARG]'.
1298 Mon May 24 16:17:31 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1300 * rule.c (convert_suffix_rule): New function.
1301 (convert_to_pattern): Use it instead of doing all the work here
1303 For target suffix `.a', generate both the archive magic rule and
1306 * compatMakefile (distclean): Remove stamp-config.
1308 Sat May 22 16:15:18 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1312 * file.c (remove_intermediates): Don't write extra space after `rm'.
1314 * main.c (struct command_switch.type): Remove `usage_and_exit'.
1315 (print_usage_flag): New variable.
1316 (switches: --help): Make type `flag', to set print_usage_flag.
1317 (init_switches): Remove `usage_and_exit' case.
1318 (decode_switches): Likewise.
1319 (decode_switches): Print usage if print_usage_flag is set.
1320 When printing usage, die with status of BAD.
1321 (main): Die with 0 if print_version_flag.
1323 Fri May 21 16:09:28 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1327 Wed May 19 21:30:44 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1329 * compatMakefile (installdirs): New target.
1330 (install): Depend on it.
1332 Sun May 16 20:15:07 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1336 Fri May 14 16:40:09 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1338 * vpath.c (construct_vpath_list): In removal loop for DIRPATH==0,
1339 set LASTPATH to PATH, not NEXT.
1341 * dir.c (read_dirstream): Break out of loop after incrementing
1342 DS->buckets such that it reaches DIRFILE_BUCKETS; avoid trying to
1343 dereference DS->contents->files[DIRFILE_BUCKETS].
1345 * read.c (read_makefile): Clear no_targets after reading a
1346 targetful rule line.
1348 * main.c (main): If print_version_flag is set, exit after printing
1350 (switches): Change --version docstring to say it exits.
1352 * make.h [butterfly]: #undef POSIX.
1354 Wed May 12 15:20:21 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1358 * arscan.c (ar_scan) [! AIAMAG]: Don't declare LONG_NAME.
1359 [AIAMAG]: Pass TRUNCATE flag arg to (*FUNCTION), always zero.
1361 * function.c (handle_function): Use fatal instead of
1362 makefile_fatal when reading_filename is nil.
1364 * configure.in: Add AC_GETGROUPS_T.
1365 * job.c (search_path): Use GETGROUPS_T in place of gid_t.
1367 Sun May 9 15:41:25 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1371 Fri May 7 18:34:56 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1373 * function.c (handle_function): Fatal for unmatched paren.
1375 Thu May 6 16:13:41 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1379 * commands.c (handling_fatal_signal): New variable.
1380 (fatal_error_signal): Set it.
1381 * job.c (reap_children): Avoid nonreentrant operations if that is set.
1382 * make.h: Declare handling_fatal_signal.
1384 * expand.c (reference_variable): New function, snippet of code
1385 broken out of simple-reference case of variable_expand.
1386 (variable_expand): Use it for simple refs.
1387 (variable_expand): When checking for a computed variable name,
1388 notice a colon that comes before the final CLOSEPAREN. Expand
1389 only up to the colon, and then replace the pending text with a
1390 copy containing the expanded name and fall through to subst ref
1392 (variable_expand): Don't bother expanding the name if a colon
1393 appears before the first $.
1394 (expand_argument): Use alloca instead of savestring.
1395 (variable_expand): For subst ref, expand both sides of = before
1396 passing to [pat]subst_expand. Use find_percent instead of lindex
1397 to check the lhs for a %.
1399 Wed May 5 14:45:52 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1403 Mon May 3 17:00:32 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1405 * arscan.c (ar_name_equal) [AIAMAG]: Abort if TRUNCATED is nonzero.
1407 * read.c (read_makefile): Pass extra arg of 1 to parse_file_seq,
1410 Thu Apr 29 19:47:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1414 * arscan.c (ar_scan): New local flag var LONG_NAME. Set it when
1415 we read the member name in any of the fashions that allow it to be
1416 arbitrarily long. Pass its negation to FUNCTION.
1417 (describe_member): Take TRUNCATED from ar_scan and print it.
1418 (ar_name_equal): Take new arg TRUNCATED; if nonzero, compare only
1419 the first sizeof (struct ar_hdr.ar_name) chars.
1420 (ar_member_pos): Take TRUNCATED from ar_scan, pass to ar_name_equal.
1421 * ar.c (ar_member_date_1): Likewise.
1423 Wed Apr 28 21:18:22 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1425 * job.c (reap_children): Before calling start_job_command to start
1426 the next command line, reset C->remote by calling start_remote_job_p.
1428 Mon Apr 26 15:56:15 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1430 * arscan.c (ar_scan): New local var NAMEMAP.
1431 In loop, rename NAME to NAMEBUF; new var NAME is a pointer; new
1432 flag IS_NAMEMAP. When extracting the member name, always put a
1433 null at its end first. If the name is "//" or "/ARFILENAMES", set
1434 IS_NAMEMAP. If we have already read in NAMEMAP, and NAME looks
1435 like " /N", get full name from NAMEMAP+N.
1436 Else if NAME looks like "#1/N", read N chars from the
1437 elt data to be the full name. At end of loop, if IS_NAMEMAP, read
1438 the elt's data into alloca'd NAMEMAP.
1439 (ar_name_equal): #if 0 truncating code.
1441 * make.h: Don't declare vfork at all. It returns int anyway,
1442 unless <unistd.h> declared it; and we conflicted with some systems.
1444 * main.c (define_makeflags): If FLAGSTRING[1] is '-', define
1445 MAKEFLAGS to all of FLAGSTRING, not &FLAGSTRING[1]. Don't want to
1446 define it to something like "-no-print-directory".
1447 Use %g format instead of %f for floating-valued things.
1449 Thu Apr 22 18:40:58 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1451 * GNUmakefile (Makefile.in): Use a substitution ref on nolib-deps
1452 to change remote-%.dep to remote-stub.dep.
1454 Wed Apr 21 15:17:54 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1458 Fri Apr 16 14:22:22 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1460 * compatMakefile (install): Remove - prefix from chgrp+chmod.
1464 Thu Apr 15 18:24:07 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1466 * acconfig.h: New file; contains "#undef SCCS_GET" for autoheader.
1467 * configure.in: If /usr/sccs/get exists, define SCCS_GET to that,
1469 * default.c (default_variables): Set GET to macro SCCS_GET.
1471 * read.c (parse_file_seq): Take extra arg STRIP; strip `./' only
1472 if nonzero. I hope this is the last time this argument is added
1474 (read_makefile): Pass it 1 when parsing include file names.
1475 Pass it 1 when parsing target file names.
1476 Pass it 1 when parsing static pattern target pattern names.
1477 * rule.c (install_pattern_rule): Pass it 1 when parsing rule deps.
1478 * default.c (set_default_suffixes): Pass it 1 when parsing
1480 * function.c (string_glob): Pass it 0 here.
1482 Wed Apr 14 11:32:05 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1484 * misc.c (log_access): New function.
1485 ({init,user,make,child}_access): Call it.
1486 (child_access): Abort if !access_inited.
1488 * main.c (switches: --no-print-directory): Use 1 instead of -1 for
1489 single-letter option.
1490 (init_switches, decode_switches, define_makeflags): An option with
1491 no single-letter version is no longer indicated by a value of -1;
1492 instead a value that is !isalnum.
1493 (init_switches): Don't put such switches into the string, only
1494 into the long_option table.
1496 * make.h [!NSIG] [!_NSIG]: #define NSIG 32.
1498 * job.c [HAVE_WAITPID]: Remove #undef HAVE_UNION_WAIT. AIX's
1499 bsdcc defined WIF* to use union wait.
1501 * main.c (struct command_switch): Change member `c' to type int.
1502 (switches): Make const.
1503 (decode_switches): Use `const struct command_switch *'.
1504 (define_makeflags): Likewise.
1506 * default.c (default_suffix_rules): Add `-o $@' to makeinfo rules.
1508 Mon Apr 12 12:30:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1512 * configure.in (AC_HAVE_HEADERS): Check for string.h and memory.h.
1513 Removed AC_MEMORY_H.
1514 * make.h [USG, NeXT]: Don't test these.
1515 [HAVE_STRING_H]: Test this to include string.h and define ANSI_STRING.
1516 [HAVE_MEMORY_H]: Test this instead of NEED_MEMORY_H.
1517 [! ANSI_STRING]: Put decls of bcopy et al here.
1518 [sparc]: Don't test this for alloca.h; HAVE_ALLOCA_H is sufficient.
1519 [HAVE_SIGSETMASK]: Test this rather than USG.
1520 [__GNU_LIBRARY__ || POSIX]: Don't #include <unistd.h> again.
1521 * main.c (main): Handle SIGCHLD if defined, and SIGCLD if defined.
1522 It doesn't hurt to do both if they are both defined, and testing
1524 * dir.c: Rationalize directory header conditionals.
1525 * arscan.c [HAVE_FCNTL_H]: Test this rather than USG || POSIX.
1527 * default.c (default_suffixes): Add `.txinfo'.
1528 (default_suffix_rules): Add `.txinfo.info' and `.txinfo.dvi' rules.
1530 * variable.c (try_variable_definition): Replace RECURSIVE flag
1531 with enum FLAVOR, which can be simple, recursive, or append.
1532 Recognize += as append flavor. Set new variable VALUE in a switch
1533 on FLAVOR. For append flavor, prepend the variable's old value.
1534 If the variable was previously defined recursive, set FLAVOR to
1535 recursive; if it was defined simple, expand the new value before
1536 appending it to the old value. Pass RECURSIVE flag to
1537 define_variable iff FLAVOR == recursive.
1539 * variable.c (try_variable_definition): Use alloca and bcopy for
1540 NAME, instead of savestring. Might as well use stack storage
1541 since we free it immediately anyway.
1543 Thu Apr 8 18:04:43 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1545 * job.c (start_waiting_jobs): Move decl of JOB outside of loop.
1547 * main.c (define_makeflags): Rename `struct flag' member `switch'
1548 to `cs', which is not a reserved word.
1550 Wed Apr 7 15:30:51 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1552 * job.c (new_job): Call start_waiting_jobs first thing.
1553 (start_waiting_job): Changed return type from void to int.
1554 Return 0 when putting the child on the waiting_jobs chain.
1555 (start_waiting_jobs): Don't check load and job_slots here.
1556 Always take a job off the chain and call start_waiting_job on it;
1557 give up and return when start_waiting_job returns zero.
1559 * main.c (define_makeflags: struct flag): Change member `char c' to
1560 `struct command_switch *switch'.
1561 (ADD_FLAG): Set that to CS instead of CS->c.
1562 If CS->c is -1, increment FLAGSLEN for the long name.
1563 When writing out FLAGS, handle FLAGS->switch->c == -1 and write
1564 the long name instead.
1566 * compatMakefile (stamp-config): New target of old config.h rule.
1567 Touch stamp-config after running config.status.
1568 (config.h): Just depend on stamp-config, and have empty commands.
1570 Mon Apr 5 20:14:02 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1572 * job.c [HAVE_WAITPID]: #undef HAVE_UNION_WAIT.
1574 * configure.in (AC_HAVE_FUNCS): Check for psignal.
1576 Fri Apr 2 17:15:46 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1578 * main.c (long_option_aliases): Remove "new"; it is already an
1579 unambiguous prefix of "new-file".
1581 Sun Mar 28 16:57:17 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1585 Wed Mar 24 14:26:19 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1587 * vpath.c (selective_vpath_search): When adding the
1588 name-within-directory at the end of NAME, and we don't add a
1589 slash, don't copy FILENAME in one char too far into NAME.
1591 * variable.c (define_automatic_variables): Find default_shell's
1592 length with strlen, not numerology.
1594 Wed Mar 17 20:02:27 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1596 * main.c (define_makeflags): Add the elts of a string option in
1597 reverse order, so they come out right when reversed again.
1599 Fri Mar 12 15:38:45 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1601 * compatMakefile (make.info): Use `-o make.info'.
1603 Thu Mar 11 14:13:00 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1605 * compatMakefile (REMOTE): Set to @REMOTE@; change comments to
1607 (objs): Replace remote.o with remote-$(REMOTE).o.
1608 (srcs): Replace remote.c with remote-$(REMOTE).c.
1609 (remote.o): Rule removed.
1611 * configure.in (REMOTE): Subst this in Makefile et al; default "stub".
1612 Use AC_WITH to grok --with-customs arg to set REMOTE=cstms.
1613 * GNUmakefile (build.sh.in): Filter out remote-% from objs list.
1614 * build.template (REMOTE): New var; set to @REMOTE@.
1615 (objs): Add remote-${REMOTE}.o.
1617 Wed Mar 10 15:12:24 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1621 * implicit.c (pattern_search): Fix "dependent"->"dependency" in
1622 "Rejecting impossible" -d msg.
1624 * file.c (file_hash_enter): New local vars {OLD,NEW}BUCKET. Store
1625 mod'd values there; never mod {OLD,NEW}HASH.
1627 Mon Mar 8 13:32:48 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1629 * remake.c [eta10]: Include <fcntl.h> instead of <sys/file.h>.
1631 * compatMakefile (VPATH): Set this to @srcdir@.
1632 (srcdir): Set this to $(VPATH).
1634 * main.c (main): New local var DIRECTORY_BEFORE_CHDIR. Save in it
1635 a copy of CURRENT_DIRECTORY after the first getcwd. Use it
1636 instead of CURRENT_DIRECTORY when chdir'ing back before re-execing.
1638 * remake.c (notice_finished_file): Pass missing SEARCH arg to f_mtime.
1640 * read.c (read_makefile): Remove extraneous arg to parse_file_seq.
1642 Mon Feb 22 14:19:38 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1644 * compatMakefile ($(infodir)/$(instname).info): Use , instead of /
1645 as the sed delimiter char.
1647 Sun Feb 21 14:11:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1651 * rule.h (struct rule): Removed `subdir' member.
1652 * rule.c (new_pattern_rule): No need to clear it.
1653 (count_implicit_rule_limits): Set the `changed' flag in each dep
1654 that refers to a nonexistent directory. No longer set rule-global
1655 `subdir' flag with that information.
1656 (print_rule_data_base): Don't record info on `subdir' flags.
1658 * implicit.c (pattern_search): Check the DEP->changed flag rather
1659 than the (now gone) RULE->subdir flag. Also test CHECK_LASTSLASH;
1660 if it is set, the file might exist even though the DEP->changed
1663 * rule.c (count_implicit_rule_limits): Pass "", not ".", as file
1664 name arg to dir_file_exists_p to check for existence of directory.
1666 * implicit.c (pattern_search): Inside dep-finding loop, set
1667 CHECK_LASTSLASH from the value recorded in CHECKED_LASTSLASH[I],
1668 rather than computing it anew.
1670 * commands.c (set_file_variables): Must alloca space for PERCENT
1671 and copy it, to avoid leaving the trailing `)' in the value.
1673 * misc.c (remove_comments): Fixed backslash-checking loop
1674 condition to allow it to look at the first char on the line.
1675 P2 >= LINE, not P2 > LINE.
1677 * compatMakefile ($(bindir)/$(instname)): Before moving $@.new to
1678 $@, rm $@.old and mv $@ to $@.old.
1680 * variable.c (try_variable_definition): Take new args FILENAME and
1681 LINENO. Fatal if the variable name is empty.
1682 * read.c (read_makefile): Change callers.
1683 * main.c (main): Likewise.
1685 * compatMakefile (group): Define to @KMEM_GROUP@, autoconf magic
1686 that configure will replace with the group owning /dev/kmem.
1688 Mon Feb 8 14:26:43 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1690 * vpath.c (vpath_search): Take second arg MTIME_PTR, pass thru to
1691 selective_vpath_search.
1692 (selective_vpath_search): Take second arg MTIME_PTR.
1693 If the dir cache thinks a file exists, stat it to make sure, and
1694 put the modtime in *MTIME_PTR.
1695 * remake.c (library_search): Take second arg MTIME_PTR.
1696 When we find a match, record its mtime there.
1697 Pass MTIME_PTR through to vpath_search to do same.
1698 (f_mtime): Pass &MTIME as new 2nd arg to {vpath,library}_search;
1699 store it in FILE->last_mtime if set nonzero.
1700 * implicit.c (pattern_search): Pass nil 2nd arg to vpath_search.
1702 * compatMakefile (remote.o): Prepend `$(srcdir)/' to `remote-*.c',
1703 so globbing looks somewhere it will find things.
1705 * compatMakefile ($(infodir)/$(instname).info): Install `make.info*'
1706 not `$(srcdir)/make.info*'; no need to use basename.
1708 Fri Feb 5 12:52:43 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1712 * compatMakefile (install): Add missing ;\s.
1714 Make -, @, and + prefixes on a pre-expanded command line affect
1715 all lines in the expansion, not just the first.
1716 * commands.h (struct commands): Replace `lines_recurse' member
1718 (COMMANDS_{RECURSE,SILENT,NOERROR}): New macros, bits to set in
1720 * commands.c (chop_commands): Set `lines_flags' instead of
1721 `lines_recurse'. Record not only + but also @ and - prefixes.
1722 * remake.c (notice_finished_file): Check the COMMANDS_RECURSE bit
1723 in FILE->cmds->lines_flags, rather than FILE->cmds->lines_recurse.
1724 * job.c (start_job_command): Replaced RECURSIVE and NOPRINT local
1725 var with FLAGS; initialize it to the appropriate `lines_flags' byte.
1726 Set CHILD->noerror if the COMMANDS_NOERROR bit is set in FLAGS.
1727 Set the COMMANDS_SILENT bit in FLAGS for a @ prefix.
1729 * remake.c (update_goal_chain): Set G->file to its prev after
1730 checking for G being finished, since that check needs to examine
1733 * configure.in (union wait check) [HAVE_WAITPID]: Try using
1734 waitpid with a `union wait' STATUS arg. If waitpid and union wait
1735 don't work together, we should not use union wait.
1739 * remake.c (update_goal_chain): When G->file->updated, move
1740 G->file to its prev. We aren't finished until G->file is nil.
1742 Thu Feb 4 12:53:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1744 * main.c (starting_directory): New global variable.
1745 (main): Set it to cwd after doing -Cs.
1746 (log_working_directory): Use it, rather than computing each time.
1747 * make.h: Declare it.
1749 * compatMakefile (SHELL): Define to /bin/sh for losing Unix makes.
1751 * main.c (decode_env_switches): Allocate (1 + LEN + 1) words for
1752 ARGV, rather than LEN words plus one byte.
1754 Wed Feb 3 18:13:52 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1756 * compatMakefile ($(bindir)/$(instname)): Put - before
1757 install_setgid command line, so its failure won't be an error.
1758 (infodir): New variable.
1759 (install): Depend on $(infodir)/$(instname).info.
1760 ($(infodir)/$(instname).info): New target.
1762 * read.c (read_makefile): If FILENAMES is nil when we see a line
1763 starting with a tab, don't treat it as a command. Just fall
1764 through, rather than giving an error.
1766 * read.c (read_makefile): If the NO_TARGETS flag is set when we see a
1767 command line, don't clear it before continuing. We want
1768 subsequent command lines to be ignored as well.
1770 * job.c (new_job): Before expanding each command line, collapse
1771 backslash-newline combinations that are inside var or fn references.
1773 Mon Feb 1 16:00:13 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1775 * compatMakefile (exec_prefix): Default to $(prefix), not /usr/local.
1777 * compatMakefile (make.info): Pass -I$(srcdir) to makeinfo.
1779 * job.c [POSIX] (unblock_sigs): Made global.
1780 [!POSIX] (unblock_sigs): Move defns to job.h.
1781 * job.h [POSIX] (unblock_sigs): Declare.
1783 Sun Jan 31 19:11:05 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1785 * read.c (read_makefile): In vpath parsing, after finding the
1786 pattern token, take entire rest of line as the search path, not
1787 just the next token.
1789 * compatMakefile (remote.o): Depend on remote-*.c.
1791 Thu Jan 28 16:40:29 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1793 * commands.c (set_file_variables): Don't define any F or D versions.
1794 * variable.c (define_automatic_variables): Define them here as
1795 recursively-expanded variables that use the dir and notdir funcs.
1797 * variable.c (target_environment): In v_default case, don't export
1798 o_default or o_automatic variables.
1800 * configure.in (union wait check): Remove ` and ' inside C code;
1801 they confuse the shell script.
1803 Mon Jan 25 13:10:42 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1807 * vpath.c (construct_vpath_list): When skipping further processing
1808 of an elt that is ".", don't also skip the code that pushes P past
1811 * compatMakefile (distclean): Don't remove make-*.
1813 * configure.in (HAVE_UNION_WAIT): Try to use WEXITSTATUS if it's
1814 defined. If one cannot use WEXITSTATUS with a `union wait'
1815 argument, we don't want to believe the system has `union wait' at all.
1817 * remake.c (update_file): Do nothing to print "up to date" msgs.
1818 (update_goal_chain): Do it here instead.
1819 Use the `changed' flag of each goal's `struct dep' to keep track
1820 of whether files_remade (now commands_started) changed around a
1821 call to update_file for that goal.
1822 When a goal is finished, and its file's update_status is zero (i.e.,
1823 success or nothing done), test the `changed' flag and give an "up
1824 to date" msg iff it is clear.
1825 * make.h (files_remade): Renamed to commands_started.
1826 * remake.c: Changed defn.
1827 (update_goal_chain): Changed uses.
1828 * job.c (start_job_command): Increment commands_started here.
1829 (reap_children): Not here.
1831 * remake.c (update_goal_chain): Don't do anything with files'
1832 `prev' members. update_file now completely handles this.
1834 * variable.c (target_environment): Don't expand recursive
1835 variables if they came from the environment.
1837 * main.c (define_makeflags): For flags with omitted optional args,
1838 store {"", 0} with ADD_FLAG. When constructing FLAGSTRING, a flag
1839 so stored cannot have more flags appended to the same word.
1841 Fri Jan 22 14:46:16 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1843 * variable.c (print_variable_set): In vars/bucket calculation,
1844 don't spuriously multiply by 100.
1848 * job.c [!HAVE_UNION_WAIT] (WTERMSIG, WCOREDUMP, WEXITSTATUS):
1849 Don't define if already defined.
1851 * remake.c (update_file): Don't keep track of the command_state before
1852 calling update_file_1. Remove local variable COMMANDS_FINISHED,
1853 and don't test it to decide to print the "is up to date" msg.
1854 Testing for files_remade having changed should always be sufficient.
1855 The old method lost when we are called in the goal chain run on a
1856 makefile, because the makefile's command_state is already
1857 `cs_finished' from the makefile chain run.
1859 * misc.c [HAVE_SETRE[GU]ID]: Test these to decl setre[gu]id.
1861 * configure.in: Rewrote wait checking.
1862 Use AC_HAVE_HEADERS to check for <sys/wait.h>.
1863 Use AC_HAVE_FUNCS to check for waitpid and wait3.
1864 Use a compile check to test just for `union wait'.
1865 * job.c: Rewrote conditionals accordingly.
1866 [HAVE_WAITPID]: Test this only to define WAIT_NOHANG.
1867 [HAVE_WAIT3]: Likewise.
1868 [HAVE_UNION_WAIT]: Test this to define WAIT_T and W*.
1870 * configure.in: Set CFLAGS and LDFLAGS before all checks.
1872 * dir.c: Add static forward decls of {open,read}_dirstream.
1874 Thu Jan 21 17:18:00 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1878 * job.c [NGROUPS_MAX && NGROUPS_MAX==0]: #undef NGROUPS_MAX.
1880 * compatMakefile (CFLAGS, LDFLAGS): Set to @CFLAGS@/@LDFLAGS@.
1881 * build.template (CFLAGS, LDFLAGS): Same here.
1882 * configure.in: AC_SUBST(CFLAGS) and LDFLAGS.
1883 Set them to -g if not defined in the environment.
1885 * remake.c (library_search): Use LIBNAME consistently, setting it
1886 only once, to be the passed name sans `-l'.
1887 Pass new var FILE to be modified by vpath_search.
1889 Mon Jan 18 14:53:54 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1893 * job.c (start_waiting_jobs): Return when job_slots_used is equal to
1896 * configure.in: Add AC_CONST for the sake of getopt.
1898 * read.c (read_makefile): Continue after parsing `override'
1899 directive, rather than falling through to lossage.
1900 Check for EOL or blank after "override define".
1902 * compatMakefile (.c.o, remote.o): Put $(CFLAGS) after other switches.
1904 Fri Jan 15 12:52:52 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1908 * main.c (define_makeflags): After writing everything into
1909 FLAGSTRING, only back up two chars if [-1] is a dash, meaning we
1910 just wrote " -". Always terminate the string at *P.
1912 * remake.c (library_search): When constructing names in std dirs,
1913 use &(*LIB)[2] for the stem, not LIBNAME (which points at the
1914 buffer we are writing into!).
1916 Thu Jan 14 13:50:06 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1918 * read.c (read_makefile): Set IN_IGNORED_DEFINE for "override
1919 define" when IGNORING is true.
1921 * compatMakefile (distclean): Remove config.status and build.sh.
1923 Wed Jan 13 16:01:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1927 * misc.c (xmalloc, xrealloc): Cast result of malloc/realloc to
1930 * arscan.c (ar_scan) [AIAMAG]: Cast read arg to (char *).
1932 * variable.c (define_automatic_variables): Override SHELL value for
1933 origin o_env_override as well as o_env.
1935 * GNUmakefile (build.sh.in): Don't replace %globobjs%. Instead,
1936 add the names of the glob objects (w/subdir) to %objs%.
1937 * build.template (globobjs): Removed.
1938 Take basename of $objs before linking.
1940 Tue Jan 12 12:31:06 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1944 * configure.in (AC_OUTPUT): Also edit build.sh.
1945 * build.template: New file.
1946 * GNUmakefile (build.sh.in): New rule to create it from build.template.
1947 (make-$(version).tar.Z): Depend on build.sh.in.
1949 * main.c (die): Call print_data_base if -p.
1950 (main): Don't call it here.
1952 * compatMakefile (defines): Add @DEFS@. configure should turn this
1953 into -DHAVE_CONFIG_H.
1955 Mon Jan 11 14:39:23 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
1959 * misc.c (init_access): Surround with #ifdef GETLOADAVG_PRIVILEGED.
1960 ({make,user,child}_access) [! GETLOADAVG_PRIVILEGED]: Make no-op.
1961 * compatMakefile (install_setgid): New var, set by configure.
1962 (install): Install setgid $(group) only if $(install_setgid) is true.
1964 Fri Jan 8 15:31:55 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1966 * job.c (load_too_high): If getloadavg fails with errno==0, give a
1967 message saying that load limits are not supported.
1969 * vpath.c (construct_vpath_list): Rewrote path deletion code to
1970 not try to use PATH's next link after freeing PATH.
1972 * main.c (define_makeflags): Rewritten; now handles string-valued
1973 option, and has no arbitrary limits.
1974 (switches): Set `toenv' flag for -I and -v.
1976 * main.c (decode_env_switches): Cast return value of alloca to char *.
1978 * misc.c (child_access) [HAVE_SETREUID, HAVE_SETREGID]: Use
1979 setre[gu]id in place of set[gu]id.
1981 Wed Jan 6 15:06:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
1983 * main.c (main): Define MAKEOVERRIDES, MAKE, and MAKE_COMMAND with
1986 * make.h [POSIX]: Don't test this to use ANSI_STRING.
1987 Testing STDC_HEADERS should be sufficient.
1989 * job.h: Declare start_waiting_jobs.
1991 * read.c (read_makefile): Add missing parens in if stmt that find
1992 conditional directives.
1994 * main.c (main): Declare init_dir.
1995 * implicit.c (pattern_search): Always use two % specs in a
1996 DEBUGP2, and always pass two non-nil args.
1997 Cast field width args to int.
1998 Add missing parens in !RULE->subdir if stmt.
1999 * function.c (expand_function, patsubst_expand): Add parens around
2000 assignments inside `while' stmts.
2001 * commands.c (print_commands): Cast field width args to int.
2003 * read.c (do_define): Cast return value of alloca to (char *).
2005 * main.c (init_switches): New function, broken out of decode_switches.
2006 (decode_switches): Take new arg ENV. If set, ignore non-option
2007 args; print no error msgs; ignore options with clear `env' flags.
2008 (decode_env_switches): Rewritten to chop envar value into words
2009 and pass them to decode_switches.
2010 (switches): Set `env' flag for -I and -v.
2012 * dir.c (init_dir): Cast free to __glob_closedir_hook's type.
2014 Tue Jan 5 14:52:15 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2018 * job.c [HAVE_SYS_WAIT || !USG]: Don't #include <sys/time.h> and
2019 <sys/resource.h>. <sys/time.h> interacts badly with <time.h>, and
2020 we don't need these anyway.
2022 * configure.in (AC_HAVE_FUNCS): Check for setre[gu]id.
2023 * misc.c ({user,make}_access): Test #ifndef HAVE_SETRE[GU]ID, not
2024 #ifdef POSIX || USG. SunOS 4.1 is supposedly POSIX.1 compliant,
2025 but its set[gu]id functions aren't; its setre[gu]id functions work.
2027 * misc.c ({user,make,child}_access): Give name of caller in error msgs.
2029 * job.c (load_too_high): Say "cannot enforce load limit" in error msg.
2031 * configure.in: Call AC_PROG_CC.
2032 * compatMakefile (CC): Define to @CC@ (autoconf magic).
2034 * compatMakefile: Add .NOEXPORT magic target.
2036 Mon Jan 4 17:00:03 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2038 * main.c (print_version): Updated copyright to include 93.
2040 Thu Dec 31 12:26:15 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2042 * make.h [_AIX]: Don't declare alloca.
2044 Tue Dec 29 13:45:13 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2048 * compatMakefile (objs): Add signame.o.
2049 (srcs): Add signame.[ch].
2051 * compatMakefile (srcs): Add config.h.in.
2052 (remote.o): Add -I. before -I$(srcdir).
2054 Mon Dec 28 15:51:26 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2058 * read.c (readline): Fatal when LEN==0, indicating a line starting
2060 (readline): Take new arg LINENO, for use in error msg.
2061 (read_makefile, do_define): Pass it.
2063 * compatMakefile (glob/libglob.a): Pass -DHAVE_CONFIG_H in CPPFLAGS.
2064 (.c.o): Add -I. before -I$(srcdir).
2066 Wed Dec 23 12:12:04 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2068 * read.c (read_makefile): Accept and ignore a rule with no targets.
2070 * compatMakefile (ALLOCA_SRC): New variable.
2071 (srcs): Include its value.
2073 * read.c (struct conditional): Renamed member `max_ignoring' to
2074 `allocated'; added new member `seen_else'.
2075 (conditional_line): Initialize seen_else flag when starting an `if...';
2076 set it when we see an `else'; fatal if set when we see `else'.
2077 (read_makefile): Fatal "missing `endif'" if there are any pending
2078 conditionals, not just if we are still ignoring.
2080 Tue Dec 22 15:36:28 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2082 * compatMakefile (manext): Set to 1, not l.
2083 ($(mandir)/$(instname).$(manext)): Use $(srcdir) for make.man in cmds.
2085 * file.c (file_hash_enter): Don't call uniquize_deps here.
2086 * read.c (record_files): Likewise.
2087 * implicit.c (pattern_search): Likewise.
2088 * commands.c (set_file_variables): Call it only here.
2090 * default.c (default_variables) [__convex__]: FC=fc.
2092 * variable.c (target_environment): Expand the values of recursively
2093 expanded variables when putting them into the environment.
2094 * expand.c (recursively_expand): Made global.
2095 * make.h (recursively_expand): Declare it.
2097 * remake.c (check_dep): Set FILE->command_state to cs_deps_running
2098 when a dep's command_state is cs_running or cs_deps_running.
2100 * read.c (read_makefile): Changed error msg for spurious cmds to
2101 not say "first target".
2103 Sun Dec 20 17:56:09 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2105 * configure.in: Do AC_CONFIG_HEADER right after AC_INIT.
2106 * make.h (HAVE_CONFIG_H): #include "config.h", then #define this.
2107 * compatMakefile (config.h, configure, config.h.in): New rules.
2108 (defines): Removed @DEFS@.
2110 Thu Dec 17 16:11:40 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2112 * compatMakefile (realclean): Just depend on distclean; no cmds.
2113 (distclean): Do what realclean did before; also remove Makefile and
2114 config.h; don't remove configure.
2115 (info, dvi): New targets; depend on make.{info,dvi}.
2116 (doc): Removed target.
2117 (MAKEINFO, TEXI2DVI): New vars.
2118 (make.info, make.dvi): Use them instead of explicit cmds.
2120 Wed Dec 16 16:25:24 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2122 * configure.in: Added fcntl.h to AC_HAVE_HEADERS. getloadavg cares.
2124 Wed Dec 9 15:21:01 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2126 * main.c (long_option_aliases): Add --new-file alias for -W.
2128 * default.c (default_variables): Change all C++ to CXX and C++FLAGS
2131 * read.c (do_define): Expand the variable name before using it.
2133 * main.c (main): Define variable "MAKE_COMMAND" to argv[0];
2134 define "MAKE=$(MAKE_COMMAND) $(MAKEOVERRIDES)" always.
2136 * remake.c (library_search): Search for libNAME.a in cwd; look in
2137 vpath before looking in standard dirs, not after.
2138 Changed order of std dirs to: /lib, /usr/lib, ${prefix}/lib.
2140 Mon Nov 23 14:57:34 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2142 * default.c (default_pattern_rules, default_terminal_rules): Added
2143 brackets around initializers.
2145 * variable.c (try_variable_definition): Don't check for LINE[0]=='\t'.
2146 (try_variable_definition): Expand the name before defining the var.
2148 * job.c (init_siglist): Removed function.
2149 Removed decl of `sys_siglist'.
2150 * make.h [! HAVE_SYS_SIGLIST]: #include "signame.h".
2151 [HAVE_SYS_SIGLIST && !SYS_SIGLIST_DECLARED]: Declare sys_siglist
2152 only under these conditions.
2153 * main.c (main): Don't declare init_siglist.
2154 (main) [! HAVE_SYS_SIGLIST]: Call signame_init instead of init_siglist.
2156 Wed Nov 18 14:52:51 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2158 * read.c (record_files): Don't try to append to FIRSTDEPS if it's
2159 nil; instead just set it to MOREDEPS.
2161 Mon Nov 16 17:49:17 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2163 * vpath.c (construct_vpath_list): Initialize P to DIRPATH before
2164 loop that sets MAXELEM.
2166 Fri Nov 13 18:23:18 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2170 Thu Nov 12 15:45:31 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2172 * job.c (start_job_command): Under -n, increment files_remade after
2173 processing (i.e., printing) all command lines.
2175 Tue Nov 10 15:33:53 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2177 * read.c (record_files): Append new deps if this rule has no
2178 commands; prepend them to existing deps if this rule has no commands.
2180 * dir.c (open_dirstream): Return nil if DIR->contents->files is nil.
2182 * read.c (parse_file_seq): Removed last arg STRIP. Always strip `./'s.
2183 (read_makefile): Changed callers.
2184 * function.c (string_glob): Likewise.
2185 * rule.c (install_pattern_rule): Likewise.
2187 Mon Nov 9 17:50:16 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2189 * remake.c (files_remade): Made global.
2190 (notice_finished_file): Don't increment files_remade here; this
2191 function gets called in many situations where no remaking was in
2193 * job.c (reap_children): Do it here instead, when we know that
2194 actual commands have been run for the file.
2195 * make.h (files_remade): Declare it.
2197 Thu Nov 5 18:26:10 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2199 * vpath.c (construct_vpath_list): Allow blanks as well as colons to
2200 separate elts in the search path.
2202 * read.c (read_makefile): Don't fatal on extra tokens in `vpath'.
2203 The search path can contain spaces now.
2205 Tue Nov 3 20:44:32 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2207 * compatMakefile (check): New target; no-op.
2209 * file.c (file_hash_enter): Mod OLDHASH by FILE_BUCKETS after
2210 testing for OLDHASH==0 but before using the value.
2211 (rename_file): Don't mod OLDHASH by FILE_BUCKETS before passing it
2214 * file.c (rename_file): Notice when OLDFILE->cmds came from
2215 default.c, and don't try to print ->filename in that case.
2217 Sun Oct 25 01:48:23 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2219 * remake.c (update_file): Don't process F->also_make here.
2220 (notice_finished_file): Don't process FILE->also_make if no attempt
2221 to update FILE was actually made.
2222 Fixed to call f_mtime directly to refresh their modtimes.
2224 Sat Oct 24 22:08:59 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2226 * read.c (find_percent): Don't increment P again after skipping
2229 * expand.c (variable_expand): In call to patsubst_expand, don't
2230 find `%'s ourselves; let that function do it.
2232 * read.c (read_makefile: record_waiting_files): Don't call
2233 record_files if FILENAMES is nil.
2234 (read_makefile): All alternatives in the parsing, except for rule
2235 lines, fall through to the end of the loop. At the end of the
2236 loop, do record_waiting_files so we notice later spurious cmds.
2238 Fri Oct 23 15:57:37 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2240 * variable.c (define_automatic_variables): Free old value of SHELL
2241 before replacing it.
2243 Thu Oct 15 18:57:56 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2245 * compatMakefile (.c.o): Add -I$(srcdir)/glob to flags.
2247 * dir.c (open_dirstream): Cast return value to __ptr_t.
2249 * default.c (default_variables: "GET") [_IBMR2]: Use USG defn.
2251 * make.h (MAXPATHLEN): Moved out of #ifndef POSIX.
2252 (GET_PATH_MAX): Moved from #ifdef POSIX to #ifdef PATH_MAX #else.
2253 Define as (get_path_max ()).
2254 [! PATH_MAX] (NEED_GET_PATH_MAX): Define.
2255 [! PATH_MAX] (get_path_max): Declare fn.
2256 * misc.c [NEED_GET_PATH_MAX] (get_path_max): New function.
2258 Mon Oct 12 13:34:45 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2262 * job.c (sys_siglist): Only declare #ifndef SYS_SIGLIST_DECLARED.
2263 * make.h [! HAVE_SYS_SIGLIST && HAVE__SYS_SIGLIST]: #define
2264 SYS_SIGLIST_DECLARED.
2266 * dir.c (file_impossible): When initializing DIR->contents, set
2267 DIR->contents->dirstream to nil.
2269 * compatMakefile (GLOB): Define new variable.
2270 (objs): Use it, rather than glob/libglob.a explicitly.
2272 * read.c (parse_file_seq): When stripping "./", handle cases like
2273 ".///foo" and "./////".
2274 * file.c (lookup_file, enter_file): Likewise.
2276 Sun Oct 11 17:00:35 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2278 * dir.c (struct dirstream, {open,read}_dirstream): New
2279 data type and functions to read a directory sequentially.
2280 (init_dir): New function to hook it into glob.
2281 * main.c (main): Call init_dir.
2283 * compatMakefile (objs): Added glob/libglob.a.
2284 * configure.in: Remove code to test for glob.
2286 Fri Oct 9 12:08:30 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2288 * read.c (record_files): Generalized test for NAME pointing
2289 somewhere into F->name.
2291 * variable.c (define_variable_in_set): Free old value when replacing.
2293 * read.c (do_define): Free the linebuffer before returning.
2294 (record_files): When clearing .SUFFIXES deps, free their data.
2295 (multi_glob): Free OLD and its data when replacing it with results
2298 * commands.c (set_file_variables): Use alloca in place of xmalloc
2299 for temp space for $^, $?, et al.
2301 * dir.c (struct directory): New member `contents' replaces `files'
2303 (struct directory_contents): New type.
2304 (directories_contents): New hash table.
2305 (dir_struct_file_exists_p): Take a struct directory_contents.
2306 (dir_file_exists_p): Pass it the `contents' member of the dir found.
2307 (dir_struct_file_exists_p): Renamed to dir_contents_file_exists_p;
2308 made static. Return 0 if DIR is nil (meaning it couldn't be stat'd).
2309 (dir_file_exists_p, find_directory): Change all callers.
2310 (file_impossible): Use DIR->contents, initializing it if nil.
2311 (print_dir_data_base): Use DIR->contents, and print out device and
2312 inode numbers with each directory.
2314 * Changes for performance win from John Gilmore <gnu@cygnus.com>:
2315 * dir.c (DIRECTORY_BUCKETS): Increase to 199.
2316 (DIRFILE_BUCKETS): Decrease to 107.
2317 (find_directory): Allocate and zero a multiple of
2318 sizeof (struct dirfile *), not of sizeof (struct dirfile).
2319 (dir_struct_file_exists_p): New function, nearly all code from
2321 (dir_file_exists_p): Just call find_directory+dir_struct_file_exists_p.
2322 * vpath.c (selective_vpath_search): Remove redundant
2323 dir_file_exists_p call.
2325 * configure.in: Comment out glob check; always use our code.
2327 Fri Oct 2 19:41:20 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2329 * make.h [! HAVE_SYS_SIGLIST && HAVE__SYS_SIGLIST]: #define
2330 HAVE_SYS_SIGLIST; after doing #define sys_siglist _sys_siglist, we
2333 Wed Sep 30 19:21:01 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2335 * main.c (main): Don't do -w automatically if -s.
2337 Tue Sep 29 21:07:55 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2339 * main.c (printed_version): Move variable inside print_version.
2340 (print_version): Return immediately if printed_version is set.
2341 (die): Don't test printed_version here.
2342 (decode_switches): Under -v, do print_version before giving usage.
2343 (DESCRIPTION_COLUMN): New macro.
2344 (decode_switches): Use it when printing the usage message.
2345 Leave at least two spaces between options and their descriptions.
2347 Fri Sep 25 13:12:42 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2351 Wed Sep 16 16:15:22 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2353 * read.c (read_makefile): Save errno value from trying to open
2354 FILENAME, and restore it before erring; otherwise we get the errno
2355 value from the last elt of the search path.
2357 Tue Sep 15 15:12:47 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2359 * main.c (long_option_aliases): Add --stop for -S.
2361 * read.c (word1eq): Do strncmp before dereferencing someplace that
2362 may be out in space.
2364 Wed Sep 9 15:50:41 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2366 * remake.c (notice_finished_file): If all the command lines were
2367 recursive, don't do the touching.
2369 * job.c (start_job_command): Don't check for + here.
2370 * commands.c (chop_commands): Do it here instead.
2372 * default.c (default_terminal_rules): Prepend + to cmds for RCS.
2374 Wed Sep 2 17:53:08 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2376 * compatMakefile (objs): Include $(ALLOCA).
2378 * make.h [CRAY]: Move #define signal bsdsignal to before #includes.
2380 Thu Aug 27 17:45:43 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
2382 * read.c (default_include_directories): Add INCLUDEDIR first.
2383 * compatMakefile (includedir): Define.
2384 (defines): Add -D for INCLUDEDIR="$(includedir)".
2386 * read.c (read_makefile): Grok multiple files in `include';
2389 * remake.c (library_search): New function.
2390 (library_file_mtime): Remove function.
2391 (f_mtime): Use library_search instead of library_file_mtime.
2392 * compatMakefile (libdir): Define.
2393 (defines): Add -D for LIBDIR="$(libdir)".
2394 * make.texinfo (Libraries/Search): Document change.
2396 * file.c (rename_file): Fix file_hash_enter call with missing arg.
2398 Wed Aug 26 17:10:46 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2402 * main.c (main): Set command_state to cs_finished for temp files
2403 made for stdin makefiles.
2405 * main.c (decode_switches): Don't tell getopt to return non-option
2407 Ignore an argument of `-'.
2409 Thu Aug 20 13:36:04 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2411 * job.c (start_job_command): If (touch_flag && !RECURSIVE), ignore
2412 the command line and go to the next.
2413 (notice_finished_file): Under -t, touch FILE.
2414 * remake.c (remake_file): Don't touch it here.
2416 Wed Aug 19 16:06:09 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2418 * function.c (pattern_matches): Use temporary for strlen (WORD)
2419 instead of two function calls.
2421 * compatMakefile (LOAD_AVG): Remove variable and comments.
2423 Tue Aug 18 14:58:58 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2425 * make.texinfo (Running): Node renamed to `make Invocation'.
2427 Fri Aug 14 12:27:10 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2429 * arscan.c (ar_name_equal): Don't compare [MAX-3..MAX] if
2432 Thu Aug 13 17:50:09 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2436 * main.c: Don't #include <time.h>; make.h already does.
2438 Mon Aug 10 17:03:01 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2440 * implicit.c (pattern_search): Fixed copying of suffix when building
2443 * function.c (expand_function: `shell'): Make sure BUFFER is
2444 null-terminated before replacing newlines.
2446 * compatMakefile (mandir): Use man$(manext), not always manl.
2448 Sun Aug 2 01:42:50 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2450 * rule.c (new_pattern_rule): Not static.
2451 * rule.h: Declare it.
2453 * file.c (file_hash_enter): New function, most code from rename_file.
2454 (rename_file): Call it.
2455 * file.h (file_hash_enter): Declare it.
2459 Thu Jul 30 15:40:48 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2461 * main.c (decode_switches): Handle usage_and_exit when building
2462 long options vector.
2464 * default.c (default_terminal_rules): Make RCS rules use $(CHECKOUT,v).
2465 (default_variables): Define CHECKOUT,v (hairy).
2467 * make.h [!HAVE_SYS_SIGLIST && HAVE__SYS_SIGLIST]: #define
2468 sys_siglist to _sys_siglist.
2470 Sun Jul 26 16:56:32 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2472 * NEWS: Add header and tail copyright info like Emacs NEWS.
2474 * make.h [ANSI_STRING]: Don't #define index, rindex, bcmp, bzero,
2475 bcopy if already #define'd.
2476 [STDC_HEADERS] (qsort, abort, exit): Declare here.
2477 [! __GNU_LIBRARY__ && !POSIX]: Not here.
2479 * make.h [_AIX]: #pragma alloca first thing.
2481 * job.c (start_waiting_job): Set the command_state to cs_running
2482 when we queue a job on waiting_jobs.
2484 Fri Jul 24 02:16:28 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2486 * variable.c (define_automatic_variables): Use "" instead of nil
2489 Thu Jul 23 22:31:18 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2493 * main.c (struct command_switch.type): Add alternative usage_and_exit.
2494 (command_switches): Add -h/--help.
2496 Thu Jul 16 14:27:50 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2498 * GNUmakefile (make-$(version).tar.Z): Include NEWS, not CHANGES.
2499 * README.template: Mention NEWS.
2500 * CHANGES: Renamed to NEWS.
2502 * main.c [! STDC_HEADERS] [sun]: Don't declare exit.
2504 Tue Jul 14 18:48:41 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2506 * main.c (main): Set -o files' command_states to cs_finished.
2508 * rule.c (count_implicit_rule_limits): Decrement num_pattern_rules
2509 when tossing a rule.
2511 * main.c (main): Use alloca only in simple local var assignment,
2512 for braindead SGI compiler.
2514 * rule.c (print_rule_data_base): Barf if num_pattern_rules is
2515 inconsistent with the number computed when listing them.
2517 Mon Jul 13 17:51:53 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2519 * commands.c (set_file_variables): For $? and $^ elts that are archive
2520 member refs, use member name only.
2522 Fri Jul 10 00:05:04 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2524 * variable.h (struct variable.export): Add new alternative v_ifset.
2525 * variable.c (target_environment): Check for it.
2526 (define_automatic_variables): Set it for MAKEFILES.
2528 Thu Jul 9 21:24:28 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2530 * compatMakefile (objs): Remove getloadavg.o; $(extras) gets it.
2531 (remote.o): Use $(srcdir)/remote.c, not $remote.c<.
2532 (distclean, mostlyclean): New targets.
2534 Tue Jul 7 19:12:49 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2538 * compatMakefile (config.status): Remove rule.
2540 * job.c (start_waiting_job): Free C after using C->file, not before.
2542 Sat Jul 4 20:51:49 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2544 * commands.c, job.c, main.c, make.h, remote-cstms.c: Use #ifdef
2545 HAVE_* instead of #ifndef *_MISSING.
2546 * configure.in: Use AC_HAVE_FUNCS instead of AC_MISSING_FUNCS (gone).
2548 Thu Jul 2 18:47:52 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2550 * main.c (main): makelevel>0 or -C implies -w.
2552 Tue Jun 30 20:50:17 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2554 * file.c, job.c, function.c: Don't #include <errno.h>.
2555 make.h: Do it here instead.
2556 * arscan.c (ar_member_touch): Don't declare errno.
2558 Thu Jun 25 17:06:55 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2560 * GNUmakefile (make-$(version).tar.Z): Depend on INSTALL, configure.in.
2562 * remake.c (update_file): If commands or deps are running after
2563 update_file_1 returns, break out of the :: rule (->prev) loop and
2566 * job.c (job_next_command): New function; code from start_job.
2567 (start_job_command): Renamed from start_job. Call job_next_command
2568 and recurse for empty command lines and -n.
2569 (start_waiting_job): Call start_job_command, not start_job.
2570 (new_job): Call job_next_command to prime the child structure, and
2571 then call start_waiting_job.
2572 (reap_children): Use job_next_command and start_job_command.
2573 (start_waiting_job): Call start_remote_job_p here, and store its
2574 result in C->remote. If zero, check the load average and
2575 maybe put C on waiting_jobs.
2576 (start_job_command): Test CHILD->remote rather than calling
2577 start_remote_job_p. Don't do load avg checking at all here.
2579 * main.c (main): Don't handle SIGILL, SIGIOT, SIGEMT, SIGBUS,
2580 SIGSEGV, SIGFPE or SIGTRAP.
2582 * compatMakefile (glob/libglob.a): Don't pass srcdir to sub-make.
2583 configure will set it in glob/Makefile.
2585 Wed Jun 24 19:40:34 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2587 * dir.c [DIRENT] (direct): Don't define to dirent.
2588 [! DIRENT] (direct): Define to dirent.
2589 (dir_file_exists_p): Use struct dirent instead of struct direct.
2591 * make.h (getcwd): No space between macro and ( for args!
2593 * job.c (start_job): Don't put the job on waiting_jobs if
2596 * make.texinfo (Missing): Shortened title.
2598 Tue Jun 23 18:42:21 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2600 * file.c (remove_intermediates): Print "rm" commands under -n.
2602 Mon Jun 22 16:20:02 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2606 Fri Jun 19 16:20:26 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2608 * arscan.c [M_UNIX]: #undef M_XENIX.
2610 Wed Jun 17 17:59:28 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2612 * default.c (default_terminal_rules): Put @ prefix on RCS cmds.
2614 Tue Jun 16 19:24:17 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2616 * compatMakefile (getloadavg.o): Removed special rule.
2617 (CFLAGS): Don't include $(defines).
2618 (.c.o): Define suffix rule.
2619 (glob/libglob.a): Pass CPPFLAGS=$(defines) to submake.
2620 (GETOPT_SRC, srcs, tagsrcs): Prefix files with $(srcdir)/.
2622 * arscan.c (ar_name_equal): Moved local vars inside #if'd block.
2624 * make.h (max): Removed.
2625 * expand.c (variable_buffer_output): Don't use it.
2627 * compatMakefile (INSTALL): Define.
2628 (Makefile): New rule to make from Makefile.in.
2631 (getloadavg.o, remote.o): Use autoconf $foo< hack.
2633 * commands.c (fatal_error_signal): Removed return.
2635 Mon Jun 15 17:42:51 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2639 * make.texinfo (Summary): New node.
2640 (Special Targets): Mention .EXPORT_ALL_VARIABLES here.
2642 * variable.c (max): Moved to make.h.
2644 * compatMakefile (objs, srcs): Added ar & arscan.
2646 * job.c (start_waiting_job): New function, 2nd half of new_job.
2648 (start_waiting_jobs): New function.
2649 * remake.c (update_goal_chain): Call start_waiting_jobs at the top
2651 * compatMakefile (objs, srcs): Removed load, added getloadavg.
2653 Fri Jun 12 19:33:16 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2655 * job.c (load_too_high): New function. Uses getloadavg.
2656 (waiting_jobs): New variable.
2657 (start_job): Don't call wait_to_start_job. Instead, if
2658 load_too_high returns nonzero, add the child to the
2659 `waiting_jobs' chain and return without starting the job.
2661 Thu Jun 11 00:05:28 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2663 * expand.c (variable_buffer_output): Made global again.
2664 * variable.h: And declare it.
2666 * arscan.c (PORTAR): Define for all systems if PORT5AR is not defined.
2667 (AR_NAMELEN, AR_TRAILING_SLASH): Removed.
2668 (ar_scan): Don't use it. Don't #ifdef AR_TRAILING_SLASH; just look
2669 for a slash in the archive at run time.
2670 (ar_name_equal): Rewrote .o hacking to not use AR_NAMELEN, and to
2671 cope with trailing-slash and non-trailing-slash archives.
2673 * main.c (main) [! SETVBUF_REVERSED]: Test this instead of USGr3 et al.
2674 [SETVBUF_REVERSED]: Always allocate a buffer ourselves.
2676 * load.c (load_average) [sgi]: Use sysmp call.
2678 * compatMakefile (INSTALL_DATA, INSTALL_PROGRAM): Define.
2679 ($(bindir)/$(instname), $(mandir)/make.$(manext)): Use them.
2681 * make.h [HAVE_VFORK_H]: #include <vfork.h>.
2682 (vfork, VFORK_NAME): Don't define.
2683 * job.c (start_job): Use "vfork" in place of VFORK_NAME.
2685 * make.h [HAVE_LIMITS_H, HAVE_SYS_PARAM_H]: If #define'd, #include
2686 the each file. Rearranged PATH_MAX hacking.
2687 * job.c: Rearranged NGROUPS_MAX hacking.
2689 * remake.c (fstat, time): Don't declare.
2691 * compatMakefile (defines): Value is @DEFS@.
2692 (LOADLIBES): Value is @LIBS@.
2693 (extras): Value is @LIBOBJS@.
2694 (ARCHIVES, ARCHIVES_SRC, ALLOCASRC): Removed.
2695 * arscan.c, ar.c: Surround body with #ifndef NO_ARCHIVES.
2697 * misc.c [! HAVE_UNISTD_H]: Test instead of !POSIX to decl get*id.
2699 * make.h [GETCWD_MISSING]: Test instead of !USG && !POSIX et al.
2700 (getcwd): Just declare if present. If not, declare as a macro
2701 using getwd, and declare getwd.
2702 [PATH_MAX] (GET_PATH_MAX): #define to PATH_MAX.
2703 * main.c (main, log_working_directory): Use getcwd instead of getwd.
2705 * main.c (main) [SETLINEBUF_MISSING]: Test this instead of USG.
2707 * make.h (SIGHANDLER, SIGNAL): Removed.
2708 (RETSIGTYPE): Define if not #define'd.
2709 * main.c (main): Use signal in place of SIGNAL.
2711 * main.c [SYS_SIGLIST_MISSING]: Test instead of USG.
2713 * job.c (search_path) [GETGROUPS_MISSING]: Test instead of USG.
2714 [HAVE_UNISTD_H]: Test instead of POSIX to not decl getgroups.
2716 * main.c [! HAVE_UNISTD_H]: Test instead of !POSIX to decl chdir.
2717 [! STDC_HEADERS]: Test instead of !POSIX to decl exit & atof.
2719 * job.c (child_handler), commands.c (fatal_error_signal): Return
2720 RETSIGTYPE instead of int.
2721 * main.c (main): Declare fatal_error_signal and child_handler here
2722 to return RETSIGTYPE; removed top-level decl of former.
2724 * commands.c (fatal_error_signal), job.c (unblock_sigs, start_job),
2725 main.c [SIGSETMASK_MISSING]: Test this instead of USG.
2727 Wed Jun 10 22:06:13 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2729 * job.c [HAVE_WAITPID]: Test this instead of USG.
2730 [! HAVE_UNISTD_H]: Test this instead of !POSIX to declare misc fns.
2731 (GID_T): Don't #define.
2732 (search_path): Use gid_t instead of GID_T.
2733 [GETDTABLESIZE_MISSING, SYS_SIGLIST_MISSING, DUP2_MISSING]: Test
2734 these individually instead of USG for all.
2735 * make.h (ctime): Don't declare. #include time.h instead.
2736 [HAVE_UNISTD_H]: #include <unistd.h> and #define POSIX #ifdef
2738 * dir.c [__GNU_LIBRARY__] (D_NAMLEN): Define to use d_namlen member.
2739 * make.h [NEED_MEMORY_H]: Only include memory.h #ifdef this.
2741 * arscan.c: Removed #ifdef mess about string.h et al.
2742 Just #include make.h instead.
2743 * make.h (fstat, atol): Declare.
2745 * commands.c (fatal_error_signal): Don't use sigmask to check for
2746 propagated signals; use ||s instead.
2747 (PROPAGATED_SIGNAL_MASK): Removed.
2748 (fatal_error_signal) [POSIX]: Use sigprocmask in place of sigsetmask.
2750 * variable.c (variable_buffer, variable_buffer_length,
2751 initialize_variable_output, variable_output): Moved to expand.c;
2753 (struct output_state, save_variable_output,
2754 restore_variable_output): Removed.
2755 * expand.c (initialize_variable_output): Put a NUL at the beginning
2756 of the new buffer after allocating it.
2757 (allocated_variable_expand_for_file): Don't use
2758 {save,restore}_variable_output. Do it by hand instead, keeping
2759 state on the stack instead of malloc'ing it.
2760 (allocated_variable_expand): Removed.
2761 * variable.h (allocated_variable_expand): Define here as macro.
2762 (variable_buffer_output, initialize_variable_output,
2763 save_variable_output, restore_variable_output): Removed decls.
2765 * read.c (conditional_line): For an if cmd, if any elt of the
2766 conditionals stack is ignoring, just push a new level that ignores
2767 and return 1; don't evaluate the condition.
2769 Thu Jun 4 21:01:20 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2771 * main.c (main): Put #ifdef's around frobbing SIGSYS and SIGBUS.
2773 * job.c (getdtablesize): Don't declare or #define if already #define'd.
2775 Wed Jun 3 23:42:36 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2777 * file.c (snap_deps): If `.EXPORT_ALL_VARIABLES' is a target, set
2778 export_all_variables.
2779 * make.texinfo (Variables/Recursion): Document .EXPORT_ALL_VARIABLES.
2781 Tue Jun 2 21:08:35 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2785 * commands.c (set_file_variables): Calculate length for ^D and ?D
2786 individually, making sure to give them at least enough space for "./".
2788 * make.h [CRAY]: #define signal to bsdsignal.
2790 * default.c (default_variables) [CRAY]: Define PC, SEGLDR,
2791 CF77PPFLAGS, CF77PP, CFT, CF, and FC.
2793 * arscan.c (AR_HDR_SIZE): Define to sizeof (struct ar_hdr), if it
2794 wasn't defined by <ar.h>.
2796 Thu May 28 00:56:53 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2800 Tue May 26 01:26:30 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2802 * rule.c (new_pattern_rule): Initialize LASTRULE to nil, not
2805 Mon May 25 19:02:15 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2807 * main.c (decode_switches): Initialize all the long_option elt members.
2809 Thu May 21 16:34:24 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
2811 * make.texinfo (Text Functions): Correct filter-out description.
2813 Tue May 19 20:50:01 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2815 * compatMakefile (realclean): Don't remove backup files.
2817 * main.c (decode_switches): Allocate ARGC+1 elts in `other_args'.
2819 Sun May 17 16:38:48 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2823 Thu May 14 16:42:33 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2825 * job.c (reap_children): Don't die if wait returns EINTR.
2827 Wed May 13 18:28:25 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2829 * job.c (reap_children): Always run the next command for a
2830 successful target. If we are going to die, we don't want to leave
2831 the target partially made.
2833 Tue May 12 00:39:19 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2835 * job.c (construct_command_argv_internal): After loop, if we only
2836 have one word, check it for being a shell command.
2838 * main.c (decode_switches): Allocate ARGC slots in other_args to
2839 begin with, so we never need to worry about growing it.
2840 If we get a non-option arg and POSIXLY_CORRECT is in the
2841 environment, break out of the loop. After the loop, add all remaining
2842 args to other_args list.
2844 * main.c (decode_switches): For positive_int and floating switches
2845 when optarg is nil, use next arg if it looks right (start with a
2846 digit, or maybe decimal point for floating).
2848 * variable.c (define_automatic_variables): Always set SHELL to
2849 default if it comes from the environment. Set its export bit.
2850 * make.texinfo (Environment): Document change.
2852 Mon May 11 00:32:46 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2856 * compatMakefile (tags, TAGS): Use vars for cmds.
2857 (ETAGS, CTAGS): Define.
2859 * main.c (decode_switches): If a switches elt has a nil long_name,
2860 make the long option name elt be "".
2861 Fixed loop to not ignore all the options.
2863 * make.texinfo (Option Summary): Added long options.
2865 * main.c (switches): Changed -m's description to "-b".
2866 (decode_switches): When printing the usage message, don't print
2867 switches whose descriptions start with -.
2868 When constructing the list of names for switch -C, search the
2869 switches vector for switches whose descriptions are "-C".
2871 * main.c (switches): Call -S --no-keep-going, not --dont-keep-going.
2872 Call -I --include-dir, not --include-path.
2873 (long_option_aliases): Added --new == -W, --assume-new == -W,
2874 --assume-old == -o, --max-load == -l, --dry-run == -n, --recon == -n,
2877 * main.c (switches): Removed bogus "silent" elt.
2878 (long_option_aliases): Define new var.
2879 (decode_switches): Add long_option_aliases onto the end of the long
2880 options vector created for getopt_long.
2881 Look through long_option_aliases for extra names to list
2884 Sat May 9 00:21:05 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2886 * main.c (log_working_directory): Fixed to properly not print the
2887 leaving message when we haven't printed the entering message.
2889 Fri May 8 21:55:35 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2891 * main.c (struct command_switch): Added elts `long_name',
2892 `description', and `argdesc'.
2893 (switches): Added initializers for new members.
2894 (decode_switches): Rewritten to use getopt_long.
2895 * compatMakefile (GETOPT, GETOPT_SRC): Define.
2896 (objs, srcs): Include them.
2898 * job.c (child_died): Renamed to dead_children; made static.
2899 (child_handler): Increment dead_children instead of setting child_died.
2900 (reap_children): Decrement dead_children instead of clearing
2901 child_died. The point of all this is to avoid printing "waiting
2902 for unfinished jobs" when we don't actually need to block.
2903 This happened when multiple SIGCHLDs before reap_children was called.
2905 * job.c (reap_children): If ERR is set, so we don't call start_job
2906 on the child being reaped, instead set its command_state to
2908 (reap_children, child_handler, new_job): I added several
2909 debugging printf's while fixing this. I left them in if (debug_flag)
2910 because they may be useful for debugging this stuff again.
2912 Wed May 6 22:02:37 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2914 * read.c (read_makefile): v_export is not 1.
2916 Mon May 4 17:27:37 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
2920 * variable.c (export_all_variables): New variable.
2921 (target_environment): Export variables whose `export' member is
2922 v_default if export_all_variables is set and their names are benign.
2923 * variable.h: Declare export_all_variables.
2924 * read.c (read_makefile): If export or unexport is given with no
2925 args, set or clear export_all_variables, respectively.
2927 * variable.c (target_environment): Exclude MAKELEVEL in the loop,
2928 so it isn't duplicated when we add it at the end.
2930 Sun May 3 17:44:48 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2934 * variable.h (struct variable): Added new member `export'.
2935 * variable.c (define_variable_in_set): Initialize it to v_default.
2936 (target_environment): Don't check for .NOEXPORT.
2937 Export variables whose `export' member is v_default and that would
2938 have been exported under .NOEXPORT, and variables whose `export'
2940 (try_variable_definition): Return the variable defined.
2941 * variable.h (try_variable_definition): Changed decl.
2942 * read.c (read_makefile): Recognize `export' and `unexport' directives.
2944 Fri May 1 11:39:38 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2946 * main.c (main) [POSIX]: Reversed args to sigaddset.
2948 Thu Apr 30 17:33:32 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2950 * job.c [POSIX || !USG] (unblock_sigs): New fn.
2951 (start_job): Block signals before forking.
2952 (new_job): Unblock signals after putting the new child on the chain.
2953 * main.c (main) [POSIX]: Use sigset_t fatal_signal_set instead of
2954 int fatal_signal_mask.
2956 * load.c [sgi] (LDAV_CVT): Define.
2958 Wed Apr 29 17:15:59 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2962 * load.c (load_average) [sgi]: Clear the high bit of the address
2963 from the symbol table before looking it up in kmem.
2965 * misc.c (fatal, makefile_fatal): Put *** in fatal error messages.
2966 (remake_file): No longer needed in message here.
2968 * main.c (die): Call reap_children with BLOCK==1.
2970 Tue Apr 28 20:44:35 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2972 * rule.c (freerule): Don't set LASTRULE->next if LASTRULE is nil.
2974 Sun Apr 26 15:09:51 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
2976 * rule.c (count_implicit_rule_limits): Initialize LASTRULE to nil,
2977 not to head of chain. Extract next ptr before we might do
2978 freerule, and use that for next iteration.
2979 (freerule): Still do next ptr frobbing if LASTRULE is nil.
2981 Tue Apr 21 03:16:29 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
2983 * job.c (child_error): Removed extra %s from error msg format.
2987 * job.c (reap_children): Don't start later commands in a sequence
2990 * job.c (new_job): Always call reap_children with BLOCK==0 first thing.
2992 * job.c (reap_children): New function; work that used to be done in
2994 (child_died): New global var.
2995 (child_handler): Now just sets child_died.
2996 (wait_for_children): Removed.
2997 (unknown_children_possible, block_signals, unblock_signals,
2998 push_signals_blocked_p, pop_signals_blocked_p): Removed.
2999 (child_execute_job): Removed call to unblock_signals.
3000 (new_job): Removed calls to push_signals_blocked_p and
3001 pop_signals_blocked_p.
3002 * job.h: Declare reap_children, not wait_for_children.
3003 * commands.c (fatal_error_signal), job.c (new_job),
3004 load.c [LDAV_BASED] (wait_to_start_job), main.c (die),
3005 remake.c (update_goal_chain), function.c (expand_function: `shell'):
3006 Changed wait_for_children calls to reap_children.
3007 Some needed to be loops to wait for all children to die.
3008 * commands.c (fatal_error_signal), main.c (main,
3009 log_working_directory), function.c (expand_function): Removed calls
3010 to push_signals_blocked_p and pop_signals_blocked_p.
3011 * job.h: Removed decls.
3013 * job.h: Added copyright notice.
3015 Wed Apr 15 02:02:40 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3017 * job.c (child_error): No *** for ignored error.
3019 Tue Apr 14 18:31:21 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3021 * implicit.c (DEBUGP2): Use do ... while (0) instead of if ... else to
3022 avoid compiler warnings.
3024 * read.c (parse_file_seq): Don't remove ./ when it is followed by a
3027 Mon Apr 13 21:56:15 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3029 * make.h (DEBUGPR): Use do ... while (0) instead of if ... else to
3030 avoid compiler warnings.
3032 * remake.c (notice_finished_file): Run file_mtime on the also_make
3033 files, so vpath_search can happen.
3035 * GNUmakefile (tests): Use perl test suite from csa@sw.stratus.com.
3036 (alpha-files): Include test suite tar file.
3038 Fri Apr 3 00:50:13 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3042 Wed Apr 1 05:31:18 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3044 * remake.c (update_file, update_file_1): Do check_renamed on elts
3045 of dep chains when traversing them. Something unrelated might have
3046 renamed one of the files the dep chain points to.
3048 * file.c (rename_file): If FILE has been renamed, follow its
3049 `renamed' ptr, so we get to the final real FILE. Using the renamed
3050 ones loses because they are not in the hash table, so the removal
3051 code loops infinitely.
3053 * read.c (read_all_makefiles): Clobber null terminator into
3054 MAKEFILES expansion, so string passed to read_makefile is properly
3057 Mon Mar 30 20:18:02 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3059 * commands.c (set_file_variables): $* for archive member with
3060 explicit cmds is stem of member, not of whole `lib(member)'.
3062 Thu Mar 26 15:24:38 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3066 Tue Mar 24 05:20:51 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3068 * rule.c (new_pattern_rule): Rules are identical only if all their
3069 targets match (regardless of order).
3071 Wed Mar 11 13:49:54 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3073 * remake.c (remake_file): Changed error "no way to make" to "no
3074 rule to make". Fiat Hugh.
3076 * make.texinfo (Last Resort): Describe %:: rules and new .DEFAULT
3079 * remake.c (update_file_1): Only use .DEFAULT cmds if FILE is not a
3082 Tue Mar 10 18:13:13 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3084 * remote-stub.c, remote-cstms.c (start_remote_job): Take new arg,
3085 environment to pass to child.
3086 * job.c (start_job): Pass it.
3088 Mon Mar 9 19:00:11 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3090 * file.c (enter_file): Also strip ./s here, to get command-line
3093 * remote-cstms.c: Add comment telling people to leave me alone.
3095 * compatMakefile (manpage install): Remove target before copying.
3097 Tue Mar 3 18:43:21 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3099 * make.texinfo (Missing): Renamed to "Incompatibilities and ...".
3100 Added paragraph describing $? incompatibility with Unix and POSIX.2.
3102 Sun Mar 1 15:50:54 1992 Roland McGrath (roland@nutrimat.gnu.ai.mit.edu)
3104 * function.c (expand_function: `shell'): Don't declare fork or pipe.
3105 Use vfork instead of fork.
3107 Tue Feb 25 22:05:32 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3109 * make.texinfo (Chained Rules): Clarify .PRECIOUS to save
3112 * load.c [sun] (LDAV_CVT): Define to divide by FSCALE.
3114 Sun Feb 16 02:05:16 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3118 Sat Feb 15 17:12:20 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3120 * compatMakefile (makeinfo): Use emacs batch-texinfo-format fn.
3122 Fri Feb 14 00:11:55 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3124 * read.c (read_makefile): Correctly handle define & endef in ifdefs.
3126 * read.c (record_files): Pass arg for %s in error msg.
3128 * main.c (main) [__IBMR2, POSIX]: Use correct (a la USGr3) setvbuf
3131 Wed Feb 12 12:07:39 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3133 * make.texinfo (Libraries/Search): Say it does /usr/local/lib too.
3135 Sun Feb 9 23:06:24 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3137 * read.c (read_makefile): Check for extraneous `endef' when ignoring.
3139 Thu Feb 6 16:15:48 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3143 Tue Feb 4 20:04:46 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3145 * job.c (construct_command_argv_internal): Correctly ignore
3146 whitespace after backslash-NL.
3148 Fri Jan 31 18:30:05 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3150 * compatMakefile: Ignore errors from chgrp and chmod when installing.
3152 Wed Jan 29 18:13:30 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3154 * main.c (main): When setting MAKELEVEL in the env to re-exec,
3155 allocate space so as not to clobber past the end of the old string.
3157 * make.h [HAVE_ALLOCA_H]: Include <alloca.h>
3158 * compatMakefile (defines): Document HAVE_ALLOCA_H.
3160 Mon Jan 20 13:40:05 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3162 * make.h [VFORK_MISSING]: Use fork instead.
3163 * compatMakefile (defines): Document same.
3165 * job.c (construct_command_argv_internal): Don't create an empty
3166 arg if backslash-NL is at beginning of word.
3168 Sun Jan 19 16:26:53 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3170 * main.c [DGUX]: Call setvbuf as for USGr3.
3172 * job.c (construct_command_argv_internal): Notice correctly that
3173 backslash-NL is the end of the arg (because it is replaced with a
3176 Thu Jan 16 18:42:38 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3178 * job.c (construct_command_argv_internal): If SHELL is nil, set it
3179 to default_shell before proceeding.
3181 * make.h [sgi]: No alloca.h, after all.
3183 Wed Jan 15 12:30:04 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3185 * read.c (multi_glob): Cons up the chain of the results of glob
3186 from back to front, so it comes out in forward order.
3188 * job.c (construct_command_argv_internal): Don't eat char following
3191 Mon Jan 13 19:16:56 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3195 * default.c (default_variables) [ultrix]: GET=get, like USG.
3197 * job.c (construct_command_argv_internal): Remove tabs following
3198 backslash-NL combos in the input line, so they don't show up when
3199 that line is printed.
3201 * read.c (read_makefile): Don't collapse_continuations the line on
3202 input; do it on the copy we do remove_comments on.
3203 For rule lines, collapse_continuations the line after chopping
3204 ";cmds" off the end, so we don't eat conts in the cmds.
3205 Give error for ";cmds" with no rule.
3206 * job.c (construct_command_argv_internal): Eat backslash-NL combos
3207 when constructing the line to recurse on for slow, too.
3209 Sat Jan 11 02:20:27 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3211 * file.c (enter_file): Don't strip leading `./'s.
3212 * read.c (parse_file_seq): Take new arg STRIP; if nonzero, do it here.
3213 * default.c (set_default_suffixes), function.c (string_glob),
3214 read.c (read_makefile), rule.c (install_pattern_rule): Change callers.
3216 * default.c (default_variables) [_IBMR2]: FC=xlf
3218 * job.c (construct_command_argv_internal): Turn backslash-NL and
3219 following whitespace into a single space, rather than just eating
3222 * make.texinfo (Copying): @include gpl.texinfo, rather than
3223 duplicating its contents.
3225 Fri Nov 8 20:06:03 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3227 * job.c (construct_command_argv_internal): Make sure not to bother
3228 processing an empty line.
3232 * job.c (construct_command_argv_internal): Always recurse for slow;
3233 simple case didn't handle finding newlines.
3235 Tue Nov 5 18:51:10 1991 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3237 * job.c (construct_command_argv_internal): Set RESTP properly when
3238 slow; don't \ify past a newline.
3240 Fri Nov 1 19:34:28 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3242 * make.h [sgi]: #include <alloca.h>.
3244 Tue Oct 29 20:57:36 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3248 * remake.c (update_file_1): Check for deps still running before
3249 giving up if any dep has failed.
3251 Sat Oct 26 16:20:00 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3253 * make.h [uts]: #undef S_ISREG and S_ISDIR if defined.
3255 Fri Oct 25 19:50:39 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3259 Thu Oct 24 16:58:36 1991 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3261 * job.c (start_job): Don't check for empty cmds before tweaking the
3262 command_ptr. Just let construct_command_argv do it.
3264 Tue Oct 22 20:21:03 1991 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3266 * remake.c, arscan.c [POSIX]: <fcntl.h> instead of <sys/file.h>.
3268 * make.h [POSIX]: Declare vfork as pid_t.
3270 Mon Oct 21 15:37:30 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3274 * job.c (construct_command_argv, construct_command_argv_internal):
3275 Take new 2nd arg RESTP. If non-NULL, stop parsing at newline, and
3276 store addr of the NL in *RESTP.
3277 (start_job): Don't chop expanded cmd lines up; use above code to do it.
3278 * function.c (expand_function: `shell'): Pass RESTP==NULL.
3280 Sat Oct 19 15:36:34 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3284 Fri Oct 18 15:26:55 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3286 * job.c (start_job): If on the same cmds->command_lines elt, look
3287 at cmds->lines_recurse[CHILD->command_line - 1] instead of
3288 [CHILD->command_line].
3290 * dir.c [sgi]: <sys/dir.h>, not ndir or anything else.
3292 Thu Oct 17 16:28:55 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3294 * file.c (print_file_data_base): Remove unused var.
3296 * make.h [NeXT]: No #define ANSI_STRING.
3298 Tue Oct 15 20:08:41 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3302 Fri Oct 11 16:23:52 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3304 * make.h: Use PATH_MAX for getwd defn.
3306 * make.h: Move getcwd/getwd outside of #ifndef POSIX, and make it
3309 Thu Oct 10 11:53:31 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3313 * read.c (read_all_makefiles): When processing MAKEFILES, save the
3314 malloc'd ptr to be freed, instead of freeing part-way thru it.
3316 * remake.c (update_file_1): Don't tweak FILE->also_make.
3317 (update_file): Do it here. After calling update_file_1, set the
3318 command_state, update_status, and updated members of each also_make
3319 elt to FILE's values.
3321 Tue Oct 8 14:56:04 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3325 * remake.c (notice_finished_file): Set command_state of FILE and
3326 its also_make chain to cs_finished here.
3327 * commands.c (execute_file_commands), job.c (child_handler),
3328 remake.c (remake_file): Don't set it before calling
3329 notice_finished_file.
3331 * file.h (struct file): Changed `also_make' to struct dep *.
3332 * job.c (delete_child_targets), file.c (print_file_data_base),
3333 remake.c (notice_finished_file), implicit.c (pattern_search):
3334 Use dep chain instead of array of file names.
3336 Mon Oct 7 17:04:33 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3340 * arscan.c: Declare open.
3341 * misc.c: Declare {get,set}{re,}[ug]id.
3342 * variable.c (target_environment): Declare getenv.
3344 Sat Oct 5 15:13:03 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3346 * make.h [NeXT]: <string.h> instead of <strings.h>.
3348 Fri Oct 4 16:05:41 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3350 * default.c (default_suffixes, defualt_suffix_rules): Add .texi
3355 * job.c: Move vfork decl into make.h.
3357 Fri Sep 27 18:45:30 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3359 * compatMakefile (glob/libglob.a): Pass CC value to submake.
3361 Thu Sep 26 00:08:15 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3363 * load.c (load_average): Made not static.
3365 * load.c [ultrix && vax]: Define LDAV_TYPE and LDAV_CVT for Ultrix 4.2.
3367 Tue Sep 24 00:17:20 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3371 * read.c (record_files): Warn about extra cmds even if the target's
3372 name begins with a dot. I think the lusers can handle this.
3374 Mon Sep 23 22:33:26 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3376 * make.h, arscan.c: Don't declare bcmp, bzero, or bcopy if they're
3378 * make.h: Declare write and open.
3380 * default.c (default_suffixes, default_suffix_rules,
3381 default_variables): Add .C just like .cc.
3382 * make.texinfo (Catalogue of Rules): Document .C.
3384 * make.man (-w): Fix gramo.
3386 Fri Sep 20 17:18:16 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3388 * make.h: No text after #endif.
3390 Sun Sep 15 16:20:46 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3394 * implicit.c (pattern_search): In the second pass, recurse on rule
3395 deps that don't have a %. Why did I make it not do this?
3397 Fri Sep 14 18:29:39 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3399 * read.c (record_files): For extra cmds, use the last ones given.
3400 If the target's name doesn't begin with a dot (bletch!!), emit a
3401 two-line warning, one line giving the old cmds' location and the
3402 other the new cmds' location.
3404 * misc.c (makefile_error, makefile_fatal): New fns.
3405 * make.h: Declare them.
3406 * Use them instead of error/fatal for all msgs including a file
3407 name and line number.
3409 Thu Sep 13 16:35:54 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3411 * make.h: Declare define_default_variables.
3412 Declare ar_parse_name, instead of ar_name_parse (M-t).
3414 Mon Sep 10 18:35:40 1991 Roland McGrath (roland@wookumz.gnu.ai.mit.edu)
3418 * make.texinfo (Variables: Setting): Say whitespace is removed if
3419 "immediately after =", rather than simply "after =".
3421 * job.c: Don't declare wait #ifdef POSIX.
3423 * make.h [__GNUC__]: #undef alloca and then #define it.
3425 * main.c (main): When pruning makefiles which might loop from the
3426 read_makefiles chain, look at all `prev' entries of double-colon rules.
3428 Fri Sep 7 00:41:53 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3430 * main.c (main): Only remove makefiles with cmds but no deps from
3431 the list of makefiles to be rebuilt if they are :: targets.
3432 : targets with cmds and no deps are not dangerous.
3434 Wed Sep 5 17:35:51 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3436 * compatMakefile (defines): Add comment that some compilers take
3437 ENUM_BITFIELDS but produce bogus code.
3438 (LOAD_AVG): Fix examples to \ "s.
3439 (LOADLIBES): Add comment that SGI Irix needs -lmld for nlist.
3441 Tue Sep 4 20:26:26 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3445 Fri Aug 30 19:34:04 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3447 * remake.c (update_file_1): When checking the command_state of
3448 deps, check through the prev chain.
3449 (update_goal_chain): When a target is finished, start checking its
3450 prev (if it has one) instead.
3452 Wed Aug 7 17:32:03 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3454 * rule.c (convert_to_pattern): Allow files with deps to define
3455 suffix rules (really this time).
3457 Mon Aug 5 17:09:21 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3459 * misc.c (user_access, make_access): Do saved-IDs (USG) flavor
3462 * file.c (enter_file): Strip ./s here.
3463 * read.c (parse_file_seq): Not here.
3465 Tue Jul 23 23:34:30 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3467 * compatMakefile: Added comment that -lPW alloca is broken on HPUX.
3469 Thu Jul 18 03:10:41 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3473 * read.c (read_makefile): Ignore lines containing chars that are
3474 all isspace, not just all isblank.
3476 * make.texinfo (Copying): @include gpl.texinfo, rather than copying
3478 * gpl.texinfo: New file (symlink to /gd/gnu/doc/gpl.texinfo).
3479 * GNUmakefile: Put gpl.texinfo in distribution.
3481 Tue Jul 16 12:50:35 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3483 * make.h: #define _GNU_SOURCE before including headers.
3484 Include <ctype.h> and define isblank if <ctype.h> doesn't.
3485 * commands.c: Don't include <ctype.h> here.
3486 * *.c: Use isblank instead of explicit ' ' || '\t'.
3488 Mon Jul 15 17:43:38 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3490 * function.c (expand_function: `filter'/`filter-out'): Fixed to not
3493 Fri Jul 12 12:18:12 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3495 * function.c (expand_function: `filter'/`filter-out'): Rewritten to
3496 handle filter-out of multiple patterns properly. Also no longer
3497 mallocs and reallocs for temp array; uses alloca and a linked-list
3500 Wed Jul 10 22:34:54 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3504 * make.texinfo: Moved some @groups that were outside @examples to
3507 * load.c [apollo] (load_average): Define using special syscall for
3508 Apollo DOMAIN/OS SR10.n.
3510 Thu Jul 4 12:32:53 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3512 * make.texinfo (Missing): Added Unix excessive implicit rule
3513 search; mention that POSIX.2 doesn't require any of the missing
3515 (Top): Updated printed manual price to $15.
3517 Wed Jul 3 18:17:50 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3519 * file.c (rename_file): Carry over last_mtime when merging files.
3520 * remake.c (f_mtime): Tail-recurse after renaming VPATH file, to
3521 check for saved date in existing renamed-to file.
3523 * remote-cstms.c (start_remote_job): Use PATH_VAR.
3525 * commands.c [POSIX || __GNU_LIBRARY__]: Don't declare getpid.
3527 * compatMakefile (glob-{clean,realclean}): Run clean/realclean in glob.
3528 (clean, realclean): Require those.
3530 * make.h: Always declare environ.
3531 Don't declare old glob functions.
3533 * GNUmakefile: Make no-lib deps for load.c and remote.c.
3535 Tue Jul 2 18:35:20 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3539 Mon Jul 1 16:58:30 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3541 * read.c (multi_glob): Don't pass GLOB_QUOTE flag to glob.
3543 * make.h [POSIX]: Include <unistd.h>, and don't declare things that
3546 * main.c (main) [USG && sgi]: malloc a buffer for broken sgi stdio.
3548 Sat Jun 29 11:22:21 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3550 * function.c (expand_function: `shell'): Use alloca for the error
3551 msg buffer, instead of assuming an arbitrary max size.
3553 Fri Jun 28 18:15:08 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3555 * job.c [POSIX] (search_path): Do real 1003.1 goop to get NGROUPS_MAX.
3557 Wed Jun 26 11:04:44 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3559 * default.c (define_default_variables): New fn.
3560 (install_default_implicit_rules): Code for above fn moved there.
3561 * main.c (main): Do define_default_variables before reading the
3564 Tue Jun 25 17:30:46 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3566 * main.c (main): Quote ; in MAKEOVERRIDES.
3568 Tue Jun 18 13:56:30 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3570 * compatMakefile: Fixed typo in comment.
3572 Tue Jun 11 00:14:59 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3576 Mon Jun 10 14:46:37 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3578 * make.h: Always include <sys/types.h>.
3579 [POSIX]: Include <limits.h> and #define MAXPATHLEN to be PATH_MAX.
3581 * default.c (default_suffix_rules: .texinfo.dvi): Use $(TEXI2DVI).
3582 (default_variables): Define TEXI2DVI.
3584 Thu Jun 6 16:49:19 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3588 * make.h (SIGNAL): Cast handler arg to SIGHANDLER type.
3590 Wed Jun 5 06:00:43 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3592 * read.c (multi_glob): Use POSIX.2 `glob' function.
3593 If a glob pattern matches nothing, leave it as is (a la sh, bash).
3594 Also, if can't find USER for ~USER, leave it as is (a la bash).
3596 Mon Jun 3 16:36:00 1991 Roland McGrath (roland@albert.gnu.ai.mit.edu)
3598 * compatMakefile: Rewrote comments about -Ds to be easier to use.
3600 * make.h, arscan.c, remake.c, main.c, dir.c, job.c: Changed tests
3601 of _POSIX_SOURCE to POSIX.
3603 * job.c: Take getdtablesize out of #ifdef __GNU_LIBRARY__.
3604 Put separately #ifdef USG.
3606 * COPYING: Replaced with version 2.
3607 * Changed copyright notices to refer to GPL v2.
3609 Thu May 30 00:31:11 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3611 * make.h: Don't declare sigblock for POSIX.
3613 * main.c (main, log_working_directory) [USG]: Get getcwd failure
3614 mode from errno, not passed buffer like BSD getwd.
3616 * misc.c (child_access): New fn to set access for a child process;
3617 like user_access, but you can't change back.
3618 * make.h: Declare it.
3619 * job.c (exec_command): Use it in place of user_access.
3621 Wed May 29 23:28:48 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3623 * default.c (default_variables) [pyr]: PC = pascal.
3625 Tue May 28 20:24:56 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
3627 * variable.c (print_variable): Put a newline before `endef'.
3629 Sat May 25 02:39:52 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3633 Wed May 22 19:41:37 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3637 Thu May 16 13:59:24 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3639 * main.c (main): Do USGr3 setvbuf behavior #ifdef APOLLO.
3640 Don't handle SIGCHLD #ifdef USG (Apollo is USG but defines SIGCHLD).
3642 Fri May 10 14:59:33 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3644 * remake.c [sgi]: Don't include <sys/file.h>.
3646 Wed May 8 01:54:08 1991 Roland McGrath (roland@geech.gnu.ai.mit.edu)
3648 * make.h (SIGHANDLER): #define as (void *) #if __STDC__,
3650 (SIGNAL): Use it to cast return value.
3651 * main.c (main): Cast SIG_IGN to SIGHANDLER when comparing.
3652 * job.c (block_signals, unblock_signals): Use SIGNAL instead of signal.
3654 * main.c: Declare mktemp to return char*, not int.
3656 * job.c (new_job): Don't increment files_remade.
3657 * remake.c (notice_finished_file): Do it here.
3659 * read.c (do_define): Don't clobber DEFINITION[-1] on empty defns.
3660 Free storage that is no longer needed.
3662 Wed Apr 24 20:49:48 1991 Roland McGrath (roland at churchy.gnu.ai.mit.edu)
3664 * misc.c (message): New fn to print informational msgs with
3665 leading "make: " or "make[N]: ".
3666 * make.h: Declare it.
3667 * remake.c (update_file): Use it instead of printf.
3669 Fri Apr 19 05:52:45 1991 Roland McGrath (roland at churchy.gnu.ai.mit.edu)
3671 * main.c (main): When there are no targets, if there were no
3672 makefiles, print a different error message, which mentions makefiles.
3674 Tue Apr 16 03:22:45 1991 Roland McGrath (roland at geech.gnu.ai.mit.edu)
3676 * remake.c (update_file): Print "nothing to be done" instead of "is
3677 up to date" if FILE->cmds == 0.
3679 * job.c [!WIFEXITED]: Define if not already defined.
3681 Thu Apr 11 18:00:50 1991 Roland McGrath (roland at wookumz.gnu.ai.mit.edu)
3683 * arscan.c (ar_name_equal): Fixed truncation comparison.
3685 Tue Apr 2 16:17:35 1991 Roland McGrath (roland at churchy.gnu.ai.mit.edu)
3687 * glob.c: Use common version from djm.
3688 * dir.c: Snarfed #ifdef mess for <dirent.h> or whatever from glob.c.
3689 (dir_file_exists_p): Ignore directory entries with d_ino==0.
3691 Mon Apr 1 20:49:45 1991 Roland McGrath (roland at albert.gnu.ai.mit.edu)
3695 Fri Mar 29 19:16:18 1991 Roland McGrath (roland at albert.gnu.ai.mit.edu)
3697 * job.c (free_child): Free CHILD->environment and its elts.
3699 Sat Mar 23 14:08:09 1991 Roland McGrath (roland at albert.gnu.ai.mit.edu)
3701 * read.c (read_makefile): Don't ignore lines containing only
3702 comments if they start with a tab. Such lines should be passed to
3703 the shell for it to decide about the comments.
3705 * job.c (free_child): Free CHILD->command_lines and its elts, not
3706 CHILD->commands (which is obsolete).
3707 * job.h, job.c: Remove obsolete `commands' member of `struct child'.
3709 Sun Mar 17 18:40:53 1991 Roland McGrath (roland at albert.ai.mit.edu)
3711 * remake.c (update_file): Print a msg for a top-level up-to-date
3712 phony target (a different one than for a real file).
3714 * read.c (conditional_line): Boundary check so we don't check the
3715 value of the -1th elt of the stack (which is bogus).
3717 Sat Mar 16 16:58:47 1991 Roland McGrath (roland at albert.ai.mit.edu)
3719 * read.c (conditional_line): Don't evaluate an if* when we're
3720 already ignoring. Instead, just push a new level, with a value of
3721 1, to keep ignoring.
3723 Tue Mar 12 00:16:52 1991 Roland McGrath (roland at geech.ai.mit.edu)
3727 Mon Mar 11 23:56:57 1991 Roland McGrath (roland at geech.ai.mit.edu)
3729 * job.c (construct_command_argv_internal): Quote backslashes
3730 when building the shell -c line.
3732 Fri Mar 8 01:40:18 1991 Roland McGrath (roland at geech.ai.mit.edu)
3734 * job.c (exec_command): Call user_access rather than setgid(getgid()).
3736 * misc.c (remove_comments): Renamed from collapse_line; took out
3737 collapse_continuations call.
3738 * make.h: Change decl.
3739 * read.c (read_makefile): Collapse continuations on the line buffer
3740 immediately after reading it. Call remove_comments rather than
3741 collapse_line (which is now defunct).
3743 Thu Feb 21 18:06:51 1991 Roland McGrath (mcgrath at cygint.cygnus.com)
3745 * misc.c (user_access, make_access): New fns to toggle btwn permissions
3746 for user data (files and spawning children), and permissions for make
3747 (for taking the load average, mostly).
3748 * make.h: Declare them.
3749 * job.c (start_job): Call make_access before wait_to_start_job, and
3751 * main.c (main): Call user_access before doing much.
3753 Mon Feb 3 15:02:03 1991 Roland McGrath (roland at albert.ai.mit.edu)
3757 Tue Jan 29 20:30:50 1991 Roland McGrath (roland at cygint.cygnus.com)
3759 * read.c (read_all_makefiles): Use allocated_variable_expand to expand
3760 `$(MAKEFILES)', since the results are used across calls to
3761 read_makefile, which could clobber them.
3763 Wed Jan 23 00:24:10 1991 Roland McGrath (roland at cygint.cygnus.com)
3765 * main.c (main): Call install_default_implicit_rules after reading
3766 makefiles, not before.
3767 * default.c (install_default_implicit_rules): If a suffix-rule file
3768 entry has cmds, don't give it any from default_suffix_rules.
3770 Fri Jan 17 17:39:49 1991 Roland McGrath (roland at albert.ai.mit.edu)
3772 * arscan.c: Added support for AIX archives.
3774 * remake.c: Don't include ar.h.
3775 * main.c: Removed unused atol decl.
3776 * arscan.c (ar_scan): Declare arg FUNCTION to return long int.
3777 * ar.c (ar_touch): Don't perror for an invalid archive.
3778 * make.h: Declare lseek as long int.
3780 * job.c [hpux]: Define getdtablesize a la USG.
3782 Sun Jan 12 21:08:34 1991 Roland McGrath (roland at albert.ai.mit.edu)
3786 Fri Jan 10 03:48:08 1991 Roland McGrath (roland at albert.ai.mit.edu)
3788 * job.c (search_path): Take new arg, place to put full pathname (rather
3790 (exec_command): Pass it, using auto storage.
3792 * main.c (print_version): Updated copyright years.
3794 Wed Jan 8 19:46:19 1991 Roland McGrath (roland at albert.ai.mit.edu)
3796 * job.c [_POSIX_SOURCE]: Just #include <sys/wait.h>, and define macro
3797 WAIT_NOHANG in terms of waitpid.
3798 [!_POSIX_SOURCE && (HAVE_SYS_WAIT || !USG)]: Don't #include <signal.h>
3800 Define macro WAIT_NOHANG in terms of wait3.
3801 (child_handler): #ifdef on WAIT_NOHANG, not HAVE_SYS_WAIT || !USG.
3802 Use WAIT_NOHANG macro instead of wait3.
3804 * file.h (struct file.command_state): Remove unused elt.
3806 Wed Dec 26 18:10:26 1990 Roland McGrath (roland at albert.ai.mit.edu)
3808 * commands.c (set_file_variables): If FILE got its commands from
3809 .DEFAULT, make $< == $@ (4.3 BSD/POSIX.2d11 compat).
3811 Mon Dec 24 17:36:27 1990 Roland McGrath (roland at albert.ai.mit.edu)
3813 * default.c (default_variables): Rename 2nd LINK.s defn to LINK.S.
3815 Fri Dec 14 15:05:25 1990 Roland McGrath (roland at albert.ai.mit.edu)
3817 * vpath.c (selective_vpath_search): Check for makefile-mentioned before
3818 checking for actual existence. The old order loses if the containing
3819 directory doesn't exist (but a rule might make it).
3821 * make.h [__GNUC__]: Don't #define alloca if already #define'd.
3823 * rule.c (convert_to_pattern): Don't look at the target constructed for
3824 the empty rule when making the null-suffix rule. Construct it over
3825 again, since the former may have been freed already.
3827 Thu Dec 13 17:21:03 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3829 * make.h [__GNU_LIBRARY__]: Include <unistd.h> to get random fn decls.
3831 Wed Dec 12 17:12:59 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3833 * make.h, arscan.c, glob.c: Only include <memory.h> #ifdef USG.
3835 * variable.c (define_variable_in_set): Replace env_overrides check that
3836 wasn't really redundant (undoing Sep 28 change). Add comment saying
3837 why this check is necessary.
3839 * job.c, main.c [DGUX]: Needs siglist like USG.
3841 Mon Dec 11 01:19:29 1990 Roland McGrath (roland at albert.ai.mit.edu)
3843 * default.c [M_XENIX]: For rules that are different for Xenix, use the
3844 generic Unix version #ifdef __GNUC__.
3846 * main.c [M_XENIX]: Use USGr3-style setvbuf call.
3848 * read.c (find_percent): Do backslash folding correctly, not leaving
3849 extra crud on the end of the string.
3851 Sun Dec 10 21:48:36 1990 Roland McGrath (roland at albert.ai.mit.edu)
3853 * job.c: Don't declare wait3 if it's #defined.
3855 * GNUmakefile, compatMakefile, make.texinfo: Change make-info
3858 Thu Dec 7 21:20:01 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3860 * make.h [STDC_HEADERS || __GNU_LIBRARY__ || _POSIX_SOURCE]: Use
3861 ANSI <string.h> and names for str/mem functions.
3862 Use <stdlib.h> to declare misc fns rather than explicit decls.
3863 [_POSIX_SOURCE]: Don't declare kill (<signal.h> will).
3864 Include <sys/types.h> before <signal.h> because some braindead
3865 nonconformant 1003.1 implementation needs it.
3866 * misc.c: Don't declare malloc, realloc. Do it in make.h.
3867 * arscan.c, glob.c: Use sequence for string fns from make.h verbatim.
3868 * make.h (S_ISDIR, S_ISREG): Declare if necessary.
3869 * commands.c (delete_child_targets), job.c (search_path), read.c
3870 (construct_include_path): Use S_ISfoo(m) instead of
3871 (m & S_IFMT) == S_IFfoo.
3872 * dir.c, glob.c [_POSIX_SOURCE]: Use dirent.
3874 Wed Nov 29 22:53:32 1990 Roland McGrath (roland at geech.ai.mit.edu)
3878 Tue Nov 28 16:00:04 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3880 * arscan.c (ar_name_equal) [APOLLO]: Don't do `.o' hacking. On Apollos
3881 the full file name is elsewhere, and there is no length restriction (or
3884 Thu Nov 23 17:33:11 1990 Roland McGrath (roland at albert.ai.mit.edu)
3886 * load.c [hp300 && BSD] (LDAV_CVT): Define for this system.
3888 Tue Nov 21 07:58:40 1990 Roland McGrath (roland at albert.ai.mit.edu)
3890 * read.c (record_files): Fix trivial bug with deciding to free storage
3893 Thu Nov 16 06:21:38 1990 Roland McGrath (roland at geech.ai.mit.edu)
3895 * compatMakefile ($(bindir)/make): Install it setgid kmem.
3897 Thu Nov 1 16:12:55 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3899 * GNUmakefile (make-*.tar.Z): Use `h' option to tar (dereference
3900 symlinks), to grab texinfo.tex from wherever it lives.
3902 Tue Oct 30 16:15:20 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3906 Fri Oct 26 14:33:34 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3908 * GNUmakefile: make-*.tar.Z: Include texinfo.tex.
3910 Tue Oct 23 19:34:33 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3912 * main.c (define_makeflags): When there are no flags to write, make
3913 sure the array has two leading nulls, since `MAKEFLAGS' is defined from
3916 * main.c (default_keep_going_flag): New variable (constant one).
3917 (command_switches: -k, -S): Use above for default value.
3918 (define_makeflags): Only write flag/flag_off switches if they are on,
3919 and either there is no default value, or they are not the default.
3921 Mon Oct 22 16:14:44 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3923 * main.c (struct command_switch): New member `no_makefile'.
3924 (command_switches: -n, -q, -t): Set no_makefile == 1.
3925 (define_makeflags): Take new arg MAKEFILE: if nonzero, don't use
3926 options whose `no_makefile' flags are set.
3927 (main): Call define_makeflags with MAKEFILE==1 before remaking
3928 makefiles, and again with MAKEFILE==0 before remaking goals.
3930 Tue Oct 2 17:16:45 1990 Roland McGrath (roland at geech.ai.mit.edu)
3934 Mon Oct 1 15:43:23 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3936 * arscan.c [HPUX]: Use PORTAR==1 format.
3938 Sat Sep 29 16:38:05 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3940 * make.h, remake.c, arscan.c: Don't declare `open'.
3942 Fri Sep 28 04:46:23 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3944 * variable.c (define_variable_in_set): Remove redundant -e check.
3946 Wed Sep 26 00:28:59 1990 Roland McGrath (roland at geech.ai.mit.edu)
3948 * job.c (start_job): Set RECURSIVE from the right elt of
3949 CHILD->file->cmds->lines_recurse.
3951 * commands.c (chop_commands): Don't botch the line count for allocating
3952 CMDS->lines_recurse.
3956 * job.c (start_job): Don't always increment CHILD->command_line! Only
3957 do it when CHILD->command_ptr has run out! (Dumb bug. Sigh.)
3959 Thu Sep 20 02:18:51 1990 Roland McGrath (roland at geech.ai.mit.edu)
3961 * GNUmakefile [ARCH]: Give explicit rule for remote.{c,dep} to use
3962 variable `REMOTE' for more flags.
3963 ($(prog)): Link in $(LOADLIBES).
3965 Wed Sep 19 02:30:36 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3967 * commands.h (struct commands): New member `ncommand_lines', the number
3968 of elts in `command_lines' et al.
3969 * commands.c (chop_commands): Set `ncommand_lines' elt of CMDS, and
3970 don't put a nil pointer at the end of `command_lines'.
3971 * job.h (struct child): New member `command_lines' to hold
3972 variable-expanded command lines.
3973 * job.c (new_job): Store expanded command lines in `command_lines'
3974 member of new child. Don't clobber FILE->cmds.
3975 (start_job): Use CHILD->command_lines in place of
3976 CHILD->file->cmds->command_lines.
3978 * variable.h, variable.c, job.c, expand.c: Undo yesterday's change,
3979 which is no longer necessary since we have cleverly avoided the issue.
3981 * job.c (start_job): Don't variable-expand each command line.
3982 (new_job): Do them all here, storing the expansions in the array.
3984 Tue Sep 18 01:23:13 1990 Roland McGrath (roland at churchy.ai.mit.edu)
3986 * variable.h (struct variable): Remove `expanding' member.
3987 * variable.c (define_variable_in_set): Don't initialize it.
3988 * expand.c (struct variable_expanding): New type, a linked list
3989 containing `struct variable' pointers.
3990 (variables_expanding): New variable, the chain of variables currently
3992 (recursively_expand): Don't test and set `expanding' member.
3993 Instead, run through the `variables_expanding' chain looking for a link
3994 referring to V to find self-reference. Add a new link to the chain,
3995 describing V, before recursive expansion, and pop it off afterward.
3996 * job.c (child_handler): Save `variables_expanding' and clear it before
3997 calling start_job, and restore it afterward. This avoids major lossage
3998 when the SIGCHLD comes in the middle of variable expansion.
4000 Mon Sep 17 14:46:26 1990 Roland McGrath (roland at geech.ai.mit.edu)
4002 * job.c, commands.c: Don't define sigmask.
4003 * make.h: Put it here instead.
4005 * variable.c (target_environment): If `.NOEXPORT' was specified as a
4006 target, only export command-line and environment variables, and
4007 file-origin variables that were in the original environment.
4009 * make.man: Add missing ?roff control for `-I' option description.
4011 Thu Sep 13 14:10:02 1990 Roland McGrath (roland at churchy.ai.mit.edu)
4013 * load.c [UMAX]: Move #include <sys/sysdefs.h> to [not UMAX_43].
4015 Wed Sep 12 15:10:15 1990 Roland McGrath (roland at churchy.ai.mit.edu)
4017 * expand.c (recursively_expand): Don't use `reading_filename' and
4018 `reading_lineno_ptr' if they're nil.
4020 Thu Aug 30 17:32:50 1990 Roland McGrath (roland at geech)
4024 Tue Aug 28 04:06:29 1990 Roland McGrath (roland at churchy.ai.mit.edu)
4026 * job.c [USG] (unknown_children_possible): New variable, set nonzero
4027 when it's possible for children not in the `children' chain to die.
4028 (block_signals) [USG]: Set it.
4029 (unblock_signals) [USG]: Clear it.
4030 (child_handler) [USG]: Don't complain about unknown children if
4031 `unknown_children_possible' is set.
4033 * read.c (do_define): Make sure there's enough space for the newline,
4034 so we don't write off the end of allocated space.
4036 * arscan.c (ar_name_equal): Fixed to work when MEM is AR_NAMELEN-1 but
4037 NAME is not the same length.
4039 Sat Aug 25 16:17:14 1990 Roland McGrath (roland at geech)
4041 * job.c (construct_command_argv_internal): Use a static char array for
4042 a constant, since old C has no auto aggregate initializers.
4044 Thu Aug 23 16:11:03 1990 Roland McGrath (roland at churchy.ai.mit.edu)
4046 * job.c (search_path): If PATH is nil or "" use a default path.
4048 Wed Aug 22 01:05:32 1990 Roland McGrath (roland at churchy.ai.mit.edu)
4052 * job.c (exec_command): Don't take PATH and SHELL args. Get them from
4054 (child_execute_job): Don't take FILE arg, and don't pass path and shell
4056 (start_job): Don't pass FILE arg to child_execute_job.
4057 * function.c (expand_function: `shell'): Ditto.
4058 * main.c (main): Don't pass path and shell to exec_command.
4060 Fri Aug 17 23:17:27 1990 Roland McGrath (roland at geech)
4062 * job.c (construct_command_argv_internal): New fn broken out of
4063 construct_command_argv. Takes strings SHELL and IFS instead of doing
4064 variable expansion for them. Recurse to make an argv for SHELL,
4065 passing SHELL==0. When SHELL==0, don't recurse for shell argv; make a
4066 simple one using /bin/sh.
4067 (construct_command_argv): Do the variable expansions and call above.
4069 Thu Aug 16 19:03:14 1990 Roland McGrath (roland at geech)
4071 * read.c (multi_glob): For ~USER/FILE, if USER isn't found, don't
4072 change the file name at all.
4074 Tue Aug 7 18:33:28 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4076 * function.c (expand_function: `suffix'/`notdir'): Don't kill the last
4077 space if we never wrote one.
4079 * function.c (expand_function: `suffix'): Retain the dot, like the
4082 Mon Aug 6 14:35:06 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4086 * main.c (decode_switches): For positive_int and floating cases, move
4087 SW past the arg (and don't set it to ""), so another switch can follow.
4089 Fri Aug 3 00:43:15 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4091 * job.c (child_execute_job): Use unblock_signals instead of
4092 push_signals_blocked_p (0).
4094 * main.c (fatal_signal_mask): New variable, mask of signals caught with
4097 * job.c ({block,unblock}_children): Renamed to {block,unblock}_signals.
4098 Block/unblock both child signal and signals in fatal_signal_mask.
4099 (children_blocked_p_{stack,max,depth}, {push,pop}_children_blocked_p):
4100 Renamed from children to signals. Use {block,unblock}_signals instead
4101 of {block,unblock}_children.
4102 * commands.c (fatal_error_signal), job.c (wait_for_children, new_job,
4103 child_execute_job, main, log_working_directory), function.c
4104 (expand_function: `shell'), job.h: Rename {push,pop}_children_blocked_p
4105 to {push,pop}_signals_blocked_p.
4106 * job.c (child_handler): Call {block,unblock}_signals instead of just
4107 {block,unblock}_remote_children. We need to block the fatal signals.
4109 Thu Aug 2 22:41:06 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4111 * main.c, function.c: Fixed typos in comments.
4113 * file.c (print_file_data_base): Fix computation of avg files/bucket.
4115 Tue Jul 31 22:11:14 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4119 Wed Jul 25 16:32:38 1990 Roland McGrath (mcgrath at tully.Berkeley.EDU)
4121 * arscan.c (ar_name_equal): Fixed to really do it right.
4122 (ar_member_pos): Fixed order of args.
4123 * ar.c (ar_member_date_1): Ditto.
4125 Fri Jul 20 15:30:26 1990 Roland McGrath (mcgrath at tully.Berkeley.EDU)
4127 * arscan.c (ar_name_equal): Rewritten. Accounts for a possible
4128 trailing slash in MEM.
4130 * remake.c (f_mtime): Keep track of whether ARNAME is used and free it
4131 if not. Also free MEMNAME.
4132 * ar.c (ar_member_date, ar_touch): Ditto.
4134 * arscan.c (arscan) [HPUX or hpux]: Treat same as USGr3 PORTAR==1.
4136 * make.h: If NSIG is not defined, but _NSIG is, #define NSIG _NSIG.
4138 * compatMakefile: Don't use $* in explicit rules.
4140 * default.c (default_variables: "PREPROCESS.S"): Include $(CPPFLAGS).
4142 * remake.c (f_mtime): If FILE is an ar ref, get the member modtime.
4144 * function.c (string_glob): Terminate the string properly when it's
4147 Wed Jul 18 11:26:56 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4151 * commands.c (set_file_variables): Fixed computation for ^F/?F elt len.
4153 Sat Jul 14 13:41:24 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4155 * job.c (construct_command_argv): Always use
4156 allocated_variable_expand_for_file instead of variable_expand_for_file
4157 because we might be called from inside a variable expansion (for the
4160 * function.c (expand_function: `shell'): Free the arglist's storage
4161 correctly. construct_command_argv only allocates ARGV and ARGV[0].
4163 * job.c (children_blocked_p_idx): Renamed to children_blocked_p_depth.
4164 (push_children_blocked_p, pop_children_blocked_p): Use ..._depth
4165 instead of ..._idx, and do it right!
4167 Wed Jul 11 15:35:43 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4169 * make.h (SIGNAL): New macro to replace `signal' calls. Does arg and
4170 ret value casts to (void *) #ifdef __STDC__ to avoid conflicts btwn
4171 ANSI and BSD `signal' and handler types.
4172 * main.c (main), job.c (child_handler): Use it.
4174 Fri Jul 6 00:00:38 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4176 * ar.c (ar_member_date, ar_touch): Pass 2nd arg to f_mtime.
4178 * read.c (read_makefile): Search the include path for MAKEFILES
4179 variable makefiles (TYPE == 1), like it says in the manual.
4181 * file.h (struct file), main.c (struct command_switch): Remove trailing
4184 * commands.c (execute_file_commands): Remove unused variables.
4185 * commands.h: Declare chop_commands.
4186 * make.h: Declare uniquize_deps.
4187 * main.c (main): Remove unused variable.
4188 (decode_switches): Remove unused label.
4189 * remake.c: Include "ar.h" for ar_parse_name decl.
4190 * implicit.c (try_implicit_rule): Remove unused variable.
4191 * function.c (expand_function: `shell'): Declare fork, pipe.
4192 * ar.c: Declare ar_name_equal.
4194 * GNUmakefile: If using gcc, add warning flags to CFLAGS.
4196 * remake.c: Remove decl of ar_member_date, since it's done in make.h.
4198 * remake.c (f_mtime): For ar refs, allow the archive to be found via
4199 VPATH search if we're searching, and change the ar ref accordingly.
4201 * ar.c (ar_parse_name): New global fn to parse archive-member
4202 references into the archive and member names.
4203 (ar_member_date, ar_touch): Use it.
4204 * make.h: Declare it.
4206 * remake.c (f_mtime): After doing rename_file, do check_renamed instead
4207 of assuming rename_file will always set FILE->renamed (which it won't).
4209 * vpath.c (selective_vpath_search): Only accept prospective files that
4210 don't actually exist yet are mentioned in a makefile if the file we are
4211 searching for isn't a target.
4213 Wed Jul 4 04:11:55 1990 Roland McGrath (mcgrath at helen.Berkeley.EDU)
4215 * remake.c (update_goal_chain): Do check_renamed after calling
4217 (check_dep): Ditto after update_file.
4219 * file.c (rename_file): Prettied up long message for merging cmds.
4221 * remake.c (update_file_1): Get each dep file's modtime, and allow for
4222 it being renamed, before checking for a circular dep, since a renaming
4223 may have introduced one.
4225 Tue Jul 3 18:15:01 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4227 * ar.c (ar_touch): Don't free ARNAME since enter_file holds onto the
4230 * function.c (string_glob): Don't leave a trailing space.
4232 * read.c (do_define): Allow leading whitespace before `endef'.
4234 Mon Jul 2 14:10:16 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4236 * implicit.c (pattern_search): No longer take NAME arg. Instead take
4237 ARCHIVE flag. If ARCHIVE is nonzero, FILE->name is of the form
4238 "LIB(MEMBER)"; rule for "(MEMBER)" is searched for, and LASTSLASH is
4239 set to nil. Since NAME was only non-nil when it was the archive member
4240 name passed by try_implicit_rule, this change easily allows turning off
4241 LASTSLASH checking for archive members without excessive kludgery.
4242 (try_implicit_rule): Pass ARCHIVE flag instead of file name.
4246 * commands./c (set_file_variables): Don't kill last char of $(^D) elts.
4248 Sat Jun 30 00:53:38 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4250 * ar.c (ar_member_date): Don't free ARNAME since enter_file holds onto
4253 * arscan.c (ar_scan) [sun386 && PORTAR == 1]: Treat like USGr3.
4255 Wed Jun 27 14:38:49 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4257 * main.c (main): Put a newline on the debugging message when deciding
4258 not to remake a makefile to avoid a possible loop.
4259 Only decide not to remake makefiles that have commands (as well as
4260 being targets and having no deps).
4262 Fri Jun 22 12:35:37 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4264 * default.c (default_variables): Define `LINK.s' and `LINK.S'.
4265 (default_suffix_rules): Define .S.o rule.
4267 * job.c (construct_command_argv): If we decide to go the slow route,
4268 free all storage for the chopped args.
4269 (start_job): Free the argument list's storage correctly.
4270 construct_command_argv only allocates ARGV and ARGV[0].
4272 Tue Jun 19 18:27:43 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4276 Fri Jun 15 21:12:10 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4278 * glob.c: New version from ai-lab which doesn't do [^abc].
4280 Thu Jun 7 00:30:46 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4282 * dir.c: Copied dirent vs direct et al mess from glob.c.
4284 * glob.c: Replaced with updated version from djm.
4285 * glob.c: Check macro DIRENT instead of _POSIX_SOURCE for <dirent.h>.
4286 __GNU_LIBRARY__ implies DIRENT and STDC_HEADERS.
4288 Thu May 31 22:19:49 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4290 * vpath.c (vpath_search): Don't stop the loop if a pattern matches but
4291 the search fails. All matching patterns have their paths searched
4292 (like it says in the manual).
4294 * make.texinfo (Rules: Directory Search: Selective Search): Say that
4295 multiple `vpath' directives with the same pattern DO accumulate, not
4296 supersede earlier ones.
4298 * vpath.c (print_vpath_data_base): Increment the count of vpaths on
4299 each loop iteration, rather than letting it stay zero.
4303 * job.c (block_children, unblock_children): Made static.
4304 (push_children_blocked_p, pop_children_blocked_p): New functions to
4305 push and pop whether children are blocked or not.
4306 * job.h: Declare push_children_blocked_p, pop_children_blocked_p and
4307 not block_children, unblock_children.
4308 * commands.c (fatal_error_signal), job.c (wait_for_children, new_job,
4309 child_execute_job), main.c (main, log_working_directory): Use sequences
4310 of push_children_blocked_p (1) and pop_children_blocked_p () instead of
4311 explicitly blocking and unblocking children.
4312 * function.c (expand_function: `shell'): Don't unblock children. The
4313 push-pop sequence in wait_for_children makes it unnecessary.
4315 Tue May 29 21:30:00 1990 Roland McGrath (mcgrath at helen.Berkeley.EDU)
4317 * read.c (do_define): Don't include the last newline in the definition.
4319 * function.c (expand_function: `shell'): Call construct_command_argv
4320 before forking and don't fork if it returns nil. Free the argument
4321 list's storage before finishing.
4323 * job.c (start_job): Free the storage for the child's argument list
4324 in the parent side of the fork after the child has been spawned.
4326 * job.c (start_job): If construct_command_argv returns nil, go to the
4329 * job.c (construct_command_argv): Use the shell if the command contains
4330 an unterminated quote.
4332 Wed May 23 19:54:10 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4336 * read.c (read_makefile): Parse "override define" correctly.
4338 Thu May 17 15:25:58 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4340 * arscan.c [USG]: Don't declare memcpy and memcmp. <memory.h> should
4341 do this anyway (and lack of declarations is harmless).
4343 * remote-customs.c: Renamed to remote-cstms.c for System V.
4344 * remote.c [CUSTOMS]: Changed accordingly.
4346 Sun May 13 14:38:39 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4348 * GNUmakefile: Use same cmds for doc tar.Z as for dist tar.Z (so the
4349 contents go in make-N.NN).
4351 Thu Apr 26 19:33:25 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4355 Wed Apr 25 20:27:52 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4357 * job.c (init_siglist): Don't do SIGUSR1 and SIGUSR2 if they are the
4358 same as SIGIO and SIGURG (true on Cray).
4360 Tue Apr 24 20:26:41 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4362 * arscan.c (ar_scan): Do behavior for PORTAR == 1 and USGr3 also
4365 Wed Apr 11 10:00:39 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4367 * job.c (exec_command): Set the effective GID to the real GID. Somehow
4370 * implicit.c (pattern_search): Use the right index variable when
4371 seeing if we need to expand FILE->also_make.
4373 Sun Mar 4 09:18:58 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4377 * remake.c (remake_file): Treat non-targets without commands under -t
4378 the same as anything else without commands.
4380 Sat Feb 24 17:46:04 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4382 * default.c (default_variables: PREPROCESS.S): Removed $< from defn.
4384 * main.c (main): Ignore arguments that are the empty string, rather
4385 than feeding them to enter_file and barfing therein.
4387 Wed Feb 14 16:28:37 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4389 * main.c (main): Call construct_include_path after doing chdirs.
4391 Thu Feb 8 13:43:44 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4395 Sat Feb 3 22:06:55 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4399 * make.texinfo (Implicit: Catalogue of Rules): For RCS, noted that
4400 working files are never overwritten by the default rule.
4402 Thu Feb 1 17:27:54 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4404 * rule.c (count_implicit_rule_limits): Redid loop control to not run
4405 twice on freed rules.
4407 * GNUmakefile: Made `.dep' files be architecture-specific too.
4409 * main.c (main, log_working_directory) [USG]: Block children around
4410 calls to `getwd' (actually `getcwd' on USG), because that function
4411 sometimes spawns a child running /bin/pwd on USG.
4413 Tue Jan 30 14:02:50 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4415 * function.c (subst_expand): Pay attention to SUFFIX_ONLY, putz.
4417 Wed Jan 24 21:03:29 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4419 * make.man: Fixed repeated word.
4421 * make.texinfo (Missing): Reworded a buggy sentence.
4423 Mon Jan 22 12:39:22 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4425 * main.c (print_version): Added 1990 to copyright notice.
4429 Sat Jan 20 11:52:01 1990 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4431 * file.c (rename_file): Don't free the storage for the old name, since
4432 it might not have been malloc'd.
4434 * job.c (construct_command_argv): Call
4435 allocated_variable_expand_for_file instead of variable_expand_for_file
4436 to expand `$(SHELL)'.
4438 * make.texinfo (Bugs): Change address from roland@wheaties.ai.mit.edu
4439 to roland@prep.ai.mit.edu.
4441 Tue Jan 16 19:22:33 1990 Roland McGrath (mcgrath at tully.Berkeley.EDU)
4445 Sun Jan 14 16:48:01 1990 Roland McGrath (mcgrath at helen.Berkeley.EDU)
4447 * job.c (start_job): Only call wait_to_start_job for the first command
4448 line in each sequence.
4450 Thu Jan 4 14:27:20 1990 Roland McGrath (mcgrath at helen.Berkeley.EDU)
4452 * load.c [LDAV_BASED] (wait_to_start_job): Loop while job_slots_used >
4455 * job.c (search_path): Don't return a pointer to local storage.
4456 Allocate data space for the pathname instead.
4458 * function.c (expand_function: `shell'): Don't write garbage if the
4459 child wrote no output.
4461 Wed Jan 3 15:28:30 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4465 * file.h (struct file): New member `renamed', a `struct file *' that is
4466 the place this file has been renamed to (or nil).
4467 (check_renamed): Macro to check for a file having been renamed.
4468 Dereferences the renaming and sets the given variable.
4469 * file.c (rename_file): Completely rewritten. Renames in place if
4470 possible, or moves FILE to a different hash bucket if there is no
4471 existing file with the new name. If there is an existing file with the
4472 new name, FILE is merged into it and FILE->renamed is set to point to
4474 * variable.c (merge_variable_sets): New fn to merge two variable sets.
4475 (merge_variable_set_lists): New fn to merge two variable set lists.
4476 * variable.h: Declare merge_variable_set_lists.
4477 * remake.c (update_file_1, check_dep): Run `check_renamed' after
4478 calling file_mtime, check_dep.
4479 (update_file): Same after update_file_1.
4480 (update_goal_chain, update_file_1, check_dep): Same after update_file.
4482 * read.c (uniquize_deps): New fn, broken out of record_files, to remove
4483 duplicate deps from a chain.
4484 (record_files): Use it.
4485 * implicit.c (pattern_search): Use uniquize_deps.
4487 * file.h (file_mtime_1): New macro, like file_mtime, but take second
4488 arg, passed to f_mtime.
4489 (file_mtime): Implement as file_mtime_1 (file, 1).
4490 (file_mtime_no_search): New macro: file_mtime (file, 0).
4491 * remake.c (f_mtime): Take new arg SEARCH. Only do VPATH and `-lNAME'
4492 searching if it is nonzero.
4493 * main.c (main): Use file_mtime_no_search for makefiles.
4494 * remake.c (update_goal_chain): Use file_mtime_no_search if MAKEFILES.
4496 * main.c (printed_version): New variable, init'd to zero.
4497 (print_version): Set it to nonzero before returning.
4498 (die): If -v and !printed_version, call print_version before clean up
4501 * main.c (log_working_directory): Keep track of whether or not the
4502 "Entering" message has been printed, and return without printing the
4503 "Leaving" message if not.
4505 * main.c (decode_switches): Don't complain about missing args before
4506 checking for a noarg_value elt in the command_switch structure.
4508 Tue Jan 2 15:41:08 1990 Roland McGrath (mcgrath at tully.Berkeley.EDU)
4510 * make.texinfo (Commands: Recursion: Options/Recursion): Document
4513 * make.texinfo, main.c, job.c: Changed copyright notices to include
4516 * make.texinfo (Top): Fixed introductory paragraph, which said that
4517 `make' itself (instead of the manual) has various chapters.
4518 (Variables: Advanced: Substitution Refs): When pxref'ing about
4519 `patsubst', use node `Text Functions', not `Functions'.
4520 Add an xref about `patsubst' after description of $(var:a%b=c%d).
4521 (Functions: Syntax of Functions): Explain why mixing delimiters in
4522 function/var refs is unwise. Clarify fn arg evaluation order.
4523 (Options): Reworded sentence about `-e'.
4524 (Implicit: Implicit Variables): Don't say `RM' is unused.
4525 Say the dflt values for the flag vars is empty unless otherwise noted,
4526 since some have defaults.
4527 (Implicit: Pattern Rules: Pattern Examples): Clarified use of $< and $@
4529 (Implicit: Last Resort): Don't say the .DEFAULT example creates files
4530 "silently". It's automatic, but not silent.
4531 (Implicit: Search Algorithm): Fixed confusing ungrammatical sentence
4533 (Archives: Archive Update): Added missing `next' pointer.
4534 (Archives: Archive Symbols): Note that GNU `ar' deals with this
4537 * job.c (search_path): New fn, to search for an executable file in a
4538 search path (broken out of exec_command).
4539 (exec_command): Take fourth arg, the shell program to use (if
4540 necessary). Use search_path for the program, and the shell program.
4541 Pass args "file args ..." to shell program (with no -c), where FILE is
4542 the full pathname of the program (script) to be run.
4543 (child_execute_job): Pass shell program to exec_command.
4544 * main.c (main): Ditto.
4546 * main.c (main): Don't write a message if exec_command returns, because
4547 it will never return.
4549 Fri Dec 22 16:19:58 1989 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
4551 * default.c (default_variables: "LINK.cc"): Use $(C++FLAGS) instead of
4554 Wed Dec 20 09:58:48 1989 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
4556 * job.c (new_job): If start_job set the child's `command_state' to
4557 `cs_finished', call notice_finished_file.
4559 Sun Dec 17 19:45:41 1989 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
4563 Wed Dec 13 17:57:12 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4565 * rule.c (convert_to_pattern): Accept files with dependencies as
4568 Thu Nov 30 15:47:13 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
4572 * function.c (expand_function: `shell'): Don't clobber BUFFER and then
4575 * remake.c (update_file_1): Took code to force remake of nonexistent
4576 deps out of #if 0, and changed the test to nonexistent non-intermediate
4577 deps. In version 4, I think removing this test completely will
4578 implement the new feature that if a: b and b: c and c is newer than a,
4579 b need not be remade.
4581 Sun Nov 26 16:12:41 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4583 * compatMakefile (load.o, remote.o): Use $*.c instead of explicit file
4584 names so that using VPATH works.
4586 Tue Nov 21 14:57:18 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4590 Fri Nov 10 03:28:40 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4592 * remake.c (check_dep): Set *MUST_MAKE_PTR if FILE does not exist after
4593 being updated. (The exact opposite test was here before; why???)
4594 (update_file_1): Set a dep's `changed' member after updating it if it
4595 is phony and has commands (because they will then always be executed).
4597 Thu Nov 9 13:47:12 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4599 * load.c [UMAX]: #ifdef UMAX_43 include different headers for the
4601 * compatMakefile (LOAD_AVG): Document UMAX_43.
4605 * commands.c (chop_commands): New function to chop commands into lines.
4606 * job.c (new_job): Break that code out, and call chop_commands.
4607 * remake.c (remake_file): Call chop_commands before looking at
4608 FILE->cmds->any_recurse.
4610 * make.texinfo (Running: Goals): Don't say that the default target
4611 won't be taken from an included makefile.
4613 * remake.c (update_file_1): #if 0 out setting MUST_MAKE if a dep
4616 Fri Nov 3 15:53:03 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
4620 * variable.c (try_variable_definition): Don't calculate useless value.
4622 * main.c (define_makeflags): Fixed -j propagation.
4624 * commands.c (execute_file_commands): Removed unused variable.
4626 Sun Oct 29 11:11:15 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4628 * commands.c (execute_file_commands): If the commands are empty, call
4629 notice_finished_file before returning.
4631 Sat Oct 28 23:06:32 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4633 * remake.c (update_file_1): Don't always update a target that has no
4634 deps. Only do this for double-colon targets.
4636 Wed Oct 25 16:36:16 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4638 * main.c (main) [hpux]: hpux == HPUX.
4639 * compatMakefile (defines): Document that HPUX should be defined.
4641 Tue Oct 24 19:19:48 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4645 * job.c (exec_command): Fixed what mode bits are checked.
4647 * remake.c (update_file_1): "No cmds and no deps actually changed"
4648 loses if ! FILE->is_target.
4650 * make.texinfo (Variables: Setting): Don't say that spaces after a
4651 variable definition are ignored (since they aren't).
4653 Mon Oct 23 14:34:23 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4657 * remake.c (update_file_1): If, after being updated, any dependency
4658 does not exist, remake the target.
4660 * remake.c (update_file_1): Always update if FILE has commands but no
4663 * commands.c (execute_file_commands): If we return early because there
4664 are no commands, set FILE->updated.
4666 Thu Oct 19 18:47:37 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4668 * arscan.c (ar_scan) [M_XENIX]: Don't run atoi or atol on the
4669 `struct ar_hdr' members that are int or long int on Xenix.
4671 Sat Oct 14 10:43:03 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4673 * arscan.c (ar_scan): Cosmetic clean ups.
4674 (ar_name_equal): New function to compare names, handling truncated
4675 member names and special `.o' truncation.
4676 (ar_member_pos): Use ar_name_equal.
4677 * ar.c (ar_member_date_1): Use ar_name_equal.
4681 * file.h (struct file): Made `update_status' a `short int', and moved
4682 it before `command_state' so the bitfields can be packed better.
4684 * remake.c (files_remade): Made global.
4685 (notice_finished_file): Don't increment files_remade.
4686 * job.c (new_job): Do.
4688 * job.c (start_job): Don't return a value. Always set
4689 CHILD->file->command_state to either cs_running or cs_finished.
4690 (new_job, child_handler): Don't expect start_job to return a value.
4691 Instead, look at the file's command_state.
4693 * commands.c (chop_commands): Merged into job.c (new_job).
4694 * commands.h: Don't declare chop_commands.
4696 * job.c (start_job): Made static.
4697 (new_job): New function to create a `struct child' and call start_job.
4698 (free_child): New function to free a `struct child'.
4699 (child_handler, new_job): Call it.
4700 * job.h: Don't declare start_job. Do declare new_job.
4701 * commands.c (execute_file_commands): Call new_job.
4703 * commands.c (execute_file_commands): Don't set FILE->update_status if
4706 * function.c (expand_function): Don't use `reading_filename' and
4707 `reading_lineno_ptr' if they're nil.
4709 Fri Oct 13 18:16:00 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4711 * read.c (find_semicolon): New function to look for an unquoted ; not
4712 preceded by an unquoted # in a string.
4713 (read_makefile): Call it before expanding the line. If it finds a ;,
4714 cut the line short there before expanding it. If not, call it again
4717 * commands.c (execute_file_commands): Don't check FILE->command_state.
4718 We won't get called unless it's cs_not_started.
4720 * read.c (read_makefile): Call collapse_line on the variable-expanded
4721 rule line after checking for ; and #.
4723 * job.c (start_job): When there are no more commands, always return 0.
4724 * commands.c (execute_file_commands): Don't put the new child in the
4725 `children' chain unless FILE->command_state is cs_running.
4727 * read.c (read_makefile): Rewrote ;-handling to only do it once (why
4728 did I do it twice??) and to check for a # before the ;.
4730 * job.c (start_job): Set CHILD->file->update_status to 0 when we run
4731 out of commands. Set it to 1 before returning failure.
4732 (child_handler): Don't set C->file->update_status to 0 when start_job
4733 returns success and commands are not running.
4735 * read.c (read_makefile): If there is a # before the ; for commands,
4736 forget the ; and commands.
4738 Thu Oct 12 15:48:16 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4740 * job.c (child_execute_job): Pass -c to the shell.
4742 Wed Oct 11 18:41:10 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4746 * main.c (define_makeflags): Cleaned up to keep better track of dashes
4749 * function.c (expand_function: `shell'): When converting newlines to
4750 spaces in output, search with `index' calls rather than a simple loop.
4752 * main.c (main): Make sure stdout is line-buffered.
4754 * main.c (decode_switches): Always check for missing switch arg.
4756 Mon Oct 9 17:17:23 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4760 Sat Oct 7 00:32:25 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4762 * commands.c (set_file_variables): #ifdef NO_ARCHIVES, still set $@ and
4765 * commands.c (set_file_variables): Include a trailing slash in the
4766 directory variables (@D, etc.).
4768 * job.c (child_handler): Call notice_finished_file after changing a
4769 child's state to `cs_finished'.
4770 * remake.c (update_file_1): Don't call notice_finished_file if
4771 FILE->command_state == cs_finished.
4773 Wed Oct 4 16:09:33 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4777 Tue Oct 3 21:09:51 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4779 * read.c (read_all_makefiles): When setting elements of MAKEFILES from
4780 the contents of read_makefiles, make sure we're using the right
4783 * dir.c, glob.c [USGr3 || DIRENT]: Don't define d_ino as d_fileno.
4787 * remake.c (update_file_1): Return zero after calling remake_file if
4788 FILE->command_state != cs_finished. Test update_status thoroughly.
4790 * commands.c (execute_file_commands): Don't call notice_finished_file.
4792 * remake.c (remake_file): Return immediately after calling
4793 execute_file_commands.
4795 Sat Sep 30 14:57:05 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4797 * Version 3.56.1 (alpha).
4799 * file.h (struct file): Made `update_status' not be a bitfield, since
4800 some broken compilers don't handle it right.
4802 * function.c (expand_function: `join'): Don't clobber the pointers and
4803 then try to free them.
4805 * job.c (exec_command): Fixed & vs = precedence problem.
4807 Thu Sep 28 17:29:56 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4809 * remake.c (update_file_1): Fixed typo in debugging output.
4811 * remake.c (library_file_mtime): Search for /usr/local/lib/libLIB.a
4812 after /usr/lib/libLIB.a.
4814 Tue Sep 26 16:07:58 1989 Roland McGrath (mcgrath at helen.Berkeley.EDU)
4816 * read.c (conditional_line): For `ifeq (a, b)', swallow space after the
4819 Sun Sep 24 13:25:32 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4821 * function.c (patsubst_function): If BY_WORD and the match is not a
4822 full word, update the text pointer correctly.
4824 * function.c (expand_function: `word'): Don't lose track of the second
4825 arg's expansion and free something else instead.
4827 Fri Sep 22 16:15:29 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4831 Thu Sep 21 14:28:42 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4833 * main.c (main): Make an array of the mtimes of the makefiles before
4834 updating them, and compare their file_mtimes against this later. Don't
4835 re-exec if a makefile was successfully updated but didn't change. If a
4836 makefile failed to be remade and no longer exists, die. If a makefile
4837 failed to be remade, but changed anyway, re-exec. If a makefile failed
4838 to be remade, but is unchanged, continue on.
4840 Wed Sep 20 18:02:07 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4844 * implicit.c (pattern_search): Maintain an array CHECK_LASTSLASH of the
4845 CHECK_LASTSLASH flag values used to match each member of TRYRULES.
4846 When making FILE->stem, if CHECKED_LASTSLASH[FOUNDRULE], prepend the
4847 part of FILENAME before LASTSLASH.
4849 Tue Sep 19 17:44:08 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4851 * dir.c (dir_file_exists_p): Check for FILENAME being nil before
4852 checking for it being "".
4854 * main.c (define_makeflags): Fixed test for whether a flag/flag_off
4855 option was non-default. Also changed to generate a string that Unix
4856 Make will grok (except for FP/int values and new flags).
4858 * job.c (child_execute_job): Don't use the shell's -c option.
4859 Also fixed an off-by-one bug in the ARGV -> shell arg list copying.
4861 Mon Sep 18 15:17:31 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4865 * read.c (parse_file_seq): Check the beginning of the file name for a
4866 `./', not the two chars after the end of the name (Q rather than P).
4868 * job.c (child_execute_job): Include all of ARGV in the arg list for
4871 * main.c (define_makeflags): Don't include floating and positive_int
4874 * job.c (exec_command): Set the effective gid to the real gid before
4877 * job.c (child_execute_job): Don't clobber the arg list when execing
4880 Sun Sep 17 15:27:19 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4882 * main.c (define_makeflags): Moved all the checking inside the switch.
4884 * load.c [LDAV_BASED] (load_average): When we can't get the load
4885 average, return zero instead of running off the end.
4887 * file.c: Include variables.h.
4888 * job.c: Declare dup2 and {block,unblock}_remote_children.
4889 * file.h: Declare f_mtime.
4890 * job.c: Don't declare construct_command_argv, since job.h does.
4891 * function.c, main.c, load.c, remake.c: Include job.h.
4892 * load.c [LDAV_BASED] (load_average): Declare nlist.
4893 * variable.h: Declare print_file_variables.
4894 * job.c [!USG]: Don't declare sigsetmask.
4895 [!USG]: Declare getdtablesize.
4896 Don't declare load_average. Do declare wait_to_start_job.
4897 Declare vfork, gete[gu]id, execve.
4898 * commands.c: Declare remote_kill, getpid.
4899 * make.h: Declare kill, exit, sigblock, pipe, close, ctime, open,
4901 * make.h [not USG]: Declare sigsetmask.
4902 * job.h: Declare wait_for_children and {block,unblock}_children.
4904 * dir.c (dir_file_exists_p): If FILENAME is nil, read in the whole
4906 (find_directory): When we want to read in the whole directory, call
4907 dir_file_exists_p with nil instead of "".
4909 * file.h (struct file), job.h (struct child),
4910 variable.h (struct variable): Use bitfields for flags.
4911 * make.h (ENUM_BITFIELD): If GCC or #ifdef ENUM_BITFIELDS, define as
4913 * compatMakefile (defines): Document ENUM_BITFIELDS.
4915 Sat Sep 16 12:38:58 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4917 * Version 3.55.4 (alpha).
4919 * GNUmakefile (dist): Depend on default and doc.
4921 * load.c [LDAV_BASED]: Include <nlist.h> rather than <a.out.h>; #ifdef
4922 NLIST_NAME_UNION, use n_un.n_name instead of n_name.
4923 * compatMakefile (LOAD_AVG): Document NLIST_NAME_UNION.
4925 * job.c [USG-ish]: Don't redefine WIF{SIGNALED,EXITED} if they're
4928 Fri Sep 15 13:59:42 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4930 * glob.c, dir.c [USGr3 or DIRENT]: If neither d_ino, nor d_fileno is
4931 defined, define d_ino as d_fileno.
4933 Thu Sep 14 18:29:38 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4935 * job.c: Don't declare exec_command static.
4937 * make.texinfo (Name Index): Changed title to include directives.
4939 * Version 3.55.3 (alpha).
4941 * make.texinfo (Running: Options): Document -e.
4943 * main.c (main): Always give imported environment variables origin
4945 * variable.c (define_variable_in_set): Under -e, if ORIGIN, or an
4946 existing variable's origin, is `o_env', make it `o_env_override'.
4948 * load.c: Use the symbol KERNEL_FILE_NAME instead of KERNEL_FILE.
4949 * compatMakefile: Changed the comment for `LOAD_AVG' accordinly.
4951 Thu Sep 7 16:46:26 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4953 * Version 3.55.2 (alpha).
4955 * variable.c (print_variable_set), rule.c (print_rule_data_base),
4956 file.c (print_file_data_base): If NO_FLOAT is defined, don't use
4957 floating-point for printing statistics.
4958 * compatMakefile (defines): Document NO_FLOAT.
4960 * make.h (HASH): New macro to add the hashing value of one char to a
4962 * file.c (lookup_file, enter_file, rename_file): Use it.
4963 * dir.c (find_directory, dir_file_exists_p, file_impossible_p): Ditto.
4964 * variable.c (define_variable_in_set, lookup_variable): Same here.
4966 * variable.c, file.c, dir.c: Don't define *_BUCKETS if they are already
4969 * compatMakefile (defines): Added comment about defining NO_ARCHIVES.
4970 (ARCHIVES, ARCHIVES_SRC): New variables for {ar,arscan}.[oc].
4971 (objs, srcs): Use $(ARCHIVES) and $(ARCHIVES_SRC).
4972 * commands.c (set_file_variables), dir.c (file_exists_p),
4973 remake.c (touch_file, name_mtime), implicit.c (try_implicit_rule,
4974 pattern_search), make.h: If NO_ARCHIVES is #defined, don't do any
4977 * commands.c (set_file_variables): Don't kill the last char of
4978 directory names in $([@*<%?^]D).
4980 Wed Sep 6 15:23:11 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
4982 * default.c (default_terminal_rules {%:: %,v}, {%:: RCS/%,v}): Don't
4983 run co if the target exists.
4985 * glob.c (glob_match): [!xyz], rather than [^xyz], means none of [xyz].
4987 * glob.c: Misc minor cosmetic changes.
4989 Tue Sep 5 14:49:56 1989 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
4991 * load.c [LDAV_BASED] (load_average): Check for == -1, rather than < 0
4992 to see if lseek fails. On some systems, `avenrun' is at an offset >
4993 (2**31)-1, and lseek succeeds, returning a negative value.
4995 Mon Sep 4 11:07:58 1989 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
4997 * rule.c (new_pattern_rule): Return `int' instead of `void': nonzero if
4998 the passed rule was used, zero if not.
4999 (install_pattern_rule): Pay attention to the return from
5000 new_pattern_rule, and don't set the rule's `terminal' flag or give it
5001 commands unless it's used.
5002 (create_pattern_rule): Same idea.
5004 * dir.c (find_directory): Removed unused variable.
5006 * commands.c (execute_file_commands): Removed unused variable.
5008 * read.c (record_files): Don't use NAME after freeing it.
5010 Sat Sep 2 00:33:19 1989 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
5012 * Version 3.55.1 (alpha).
5014 * function.c (string_glob): Don't add spaces after file names that
5015 aren't added. (Also means don't add spaces without checking the size
5018 * remake.c (update_goal_chain): Don't remove makefiles with cmds and no
5019 deps from the chain.
5020 * main.c (main): Do it here, before calling update_goal_chain.
5022 * remake.c (update_goal_chain): When updating fails, change STATUS even
5023 if MAKEFILES is set. Also stop remaking when updating fails if not
5024 under -k and MAKEFILES is not set.
5026 * remake.c (remake_file, update_file_1, notice_finished_file),
5027 commands.c (execute_file_commands), make.h, commands.h: The functions
5028 remake_file, notice_finished_file, and execute_file_commands no longer
5029 return values, and their callers no longer expect values returned.
5031 * remake.c (notice_finished_file): Don't set FILE's modtime to now if
5032 it is a non-target with no commands.
5034 Fri Sep 1 00:04:39 1989 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
5036 * read.c (read_all_makefiles): After freeing each element on MAKEFILES,
5037 replace it with the name stored in read_makefiles by read_makefile.
5039 * remake.c (update_file_1): Don't decide not to remake if FILE has no
5040 cmds and no deps actually changed if FILE doesn't have any deps.
5042 * file.c (remove_intermediate): Remove precious files that also have
5043 the `dontcare' flag set.
5045 * remake.c (update_file_1): Don't always remake if FILE has cmds but no
5046 deps; only if FILE is double-colon. (I don't know why this should be
5047 done for double-colon targets, but that's what Unix make does.)
5049 * load.c [LDAV_BASED] (load_average): Write error messages if the
5050 various system calls fail. Keep track of if we've failed before.
5051 The first time we fail, write a message saying -l won't be enforced.
5052 The first time we succeed after having failed, write a message saying
5053 -l will be enforced again.
5055 * remake.c [USG]: Don't #include <sys/file.h>
5057 * load.c [generic Unix LDAV_BASED]: #include <fcntl.h> #ifdef USG,
5058 else <sys/file.h> instead.
5060 * job.c [USG && !USGr3 && !HAVE_DUP2]: Remove redundant
5061 #include <errno.h> and declaration of `errno'.
5062 [...] (dup2): Fixed so it won't always lose.
5064 * default.c (default_suffix_rules: .texinfo.dvi): Copy, rather than
5065 move, the aux and index files, so the TeX run can use them.
5067 * compatMakefile: Remove redundant comment.
5069 * load.c [generic Unix LDAV_BASED]: Include <a.out.h> instead of
5070 <nlist.h>, since the `struct nlist' declaration in <nlist.h> varies
5071 more than the one in <a.out.h>.
5072 (load_average): Use the `n_un.n_name' field of the `struct nlist',
5073 since the <a.out.h> declaration uses the union.
5075 * main.c (main): For the temporary files made for stdin makefiles, set
5076 the `intermediate' and `dontcare' flags.
5077 * file.c (remove_intermediates): Don't print any messages for files
5078 whose `dontcare' flag is set. (The only files that will be
5079 intermediate and `dontcare' will be the temporary files made for stdin
5082 * job.c (exec_command): Made global.
5083 * job.h: Declare it.
5084 * main.c (main): Use exec_command when re-execing.
5086 * make.h: Declare environ.
5089 * job.c (child_execute_job): New function to perform everything done in
5090 the child side of a fork (for a job or `shell' function).
5091 (start_job): Call it.
5092 * job.h: Declare construct_command_argv and child_execute_job.
5093 * function.c (expand_function: `shell'): Use child_execute_job.
5095 Thu Aug 31 18:42:51 1989 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
5097 * function.c (expand_function: `shell'): Remove a trailing newline
5098 instead of turning it into a space.
5100 * main.c (main): Do init_siglist #ifdef HAVE_SIGLIST.
5102 * job.c [WTERMSIG || (USG && !HAVE_SYS_WAIT)]: Test each W* macro
5103 separately and define all those that aren't defined.
5105 Sat Aug 26 15:13:21 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5107 * ar.c (ar_name): Return zero for `(foo)'.
5111 * make.texinfo (Rules: Multiple Targets): Make this node's `next'
5112 pointer point to `Static Pattern'.
5113 * make.texinfo (Makefiles: MAKEFILES Variable): Make this node's `prev'
5114 pointer point to `Makefile Names'.
5116 * make.1: Renamed to make.man.
5117 * compatMakefile: Define `mandir' and `manext'.
5118 (install): Depend on $(mandir)/make.$(manext).
5119 ($(mandir)/make.$(manext)): Depend on make.man and copy it to $@.
5120 ($(bindir)/make): Use `make' rather than $<; so Unix make can grok it.
5122 Thu Aug 24 03:35:48 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5124 * variable.c (target_environment): Allow variables that start with
5127 Wed Aug 23 22:50:32 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5129 * variable.c (target_environment): Reject variables that don't start
5132 Tue Aug 22 04:14:29 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5134 * GNUmakefile (make-$(version).tar.Z): Put make.1 (the Unix manual
5135 page) in the tar file.
5137 * variable.c (target_environment): Don't write variables with origin
5138 o_default (i.e., ones from default.c).
5139 * make.texinfo (Commands: Recursion: Variables/Recursion): Document
5140 that default variables are not put in the environment.
5142 * remake.c (update_file_1): Remake all targets with commands but no
5145 Sat Aug 19 06:03:16 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5147 * remake.c (update_file_1): In the final loop, set the deps'
5148 `changed' members if they are newer than FILE.
5150 * remake.c (update_goal_chain): Under -d, print a message if we decide
5151 not to remake a makefile so as to avoid a possible infinite loop.
5153 Fri Aug 18 20:30:14 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5155 * remake.c (remake_file): Cleaned up.
5157 * commands.c (execute_file_commands): If the commands are empty, set
5158 FILE->update_status to zero before returning.
5160 * remake.c (notice_finished_file): Set `last_mtime' fields to zero
5161 instead of calling name_mtime; file_mtime will do that later if anybody
5164 Thu Aug 17 10:01:11 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5166 * make.texinfo (Rules: Wildcards: Wildcard Examples): Give this node a
5169 * Version 3.54.9 (alpha).
5171 * make.texinfo: Fixed some @nodes.
5173 * remake.c (check_dep): Don't set *MUST_MAKE_PTR if FILE doesn't exist
5174 after running update_file.
5176 * remake.c (notice_finished_file): If FILE has no commands, pretend its
5179 * remake.c (update_file_1): In the loops that call update_file on the
5180 deps, compare modtimes before and after (unless deps are still being
5181 made) and set the deps' `changed' members. Do not set the `changed'
5182 members in the loop that prints the newer/older debugging messages.
5183 * remake.c (update_file_1): If no deps changed and FILE has no
5184 commands, decide it doesn't need remaking.
5186 * remake.c (update_file_1): Print a debugging message if we take
5187 commands from default_file.
5189 * make.texinfo (Rules: Directory Search: Selective Search): Removed
5190 note about warning for `vpath' with a constant pathname, since it isn't
5191 warned about anymore.
5193 * remake.c (update_goal_chain): If MAKEFILES, remove makefiles which
5194 are targets and have no deps.
5195 * make.texinfo (Makefiles: Remaking Makefiles): Document that makefiles
5196 will not be remade if they are targets but have no dependencies.
5198 Tue Aug 15 00:00:08 1989 Roland McGrath (roland at apple-gunkies.ai.mit.edu)
5200 * remake.c (notice_finished_file): Increment files_remade for non-phony
5201 files if they didn't exist before (even if they still don't).
5203 * job.c: Include <errno.h> and declare errno.
5205 * job.c (exec_command): If the execve fails with ENOEXEC (Exec format
5206 error), return instead of exiting the child process.
5208 * job.c (start_job): In the child side, if exec_command fails, try
5211 * job.c (start_job): In the child side, call unblock_children instead
5214 * remake.c (notice_finished_file): Under -n or -q, always increment
5215 files_remade for non-phony files.
5217 * rule.c (intall_pattern_rule): Use find_percent.
5219 * vpath.c (vpath_search): Pass the `percent' members to
5222 Mon Aug 14 23:30:24 1989 Roland McGrath (roland at apple-gunkies.ai.mit.edu)
5224 * vpath.c (struct vpath): New member `percent', to hold a pointer into
5225 the pattern where the % is.
5226 (construct_vpath_list): Call find_percent on the pattern and set the
5227 new `percent' member.
5228 * read.c (read_makefile): Don't run find_percent on `vpath' directive
5231 * function.c (pattern_matches): Take new arg PERCENT, a pointer into
5232 PATTERN where the % is. If PERCENT is nil, copy PATTERN into local
5233 space and run find_percent on it.
5234 (expand_function: `filter', `filter-out'): Pass new arg to
5236 * read.c (record_files): Pass PATTERN_PERCENT to pattern_matches for
5237 static pattern rules. Save the percent pointer into implicit rule
5238 targets, and pass them to create_pattern_rule.
5239 * rule.c (convert_to_pattern): Pass new arg to create_pattern_rule.
5240 (create_pattern_rule): Take new arg TARGET_PERCENTS, nil or an array of
5241 pointers into the corresponding elements of TARGETS, where the %s are.
5243 Sun Aug 13 00:29:19 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5247 * README.templatate, README-doc.template: New files, turned into README
5248 and README-doc to go into the two distribution tar files.
5249 * GNUmakefile: Added a rule to edit the version number in
5250 README.template and README-doc.template, producing README and
5253 * remake.c (update_goal_chain): If -n or -q is in effect for a
5254 makefile, and it got updated, don't change STATUS, so we can still
5255 return -1 (meaning nothing was done). This avoids an infinite loop on
5258 Sat Aug 12 23:14:24 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5260 * remake.c (notice_finished_file): Treat -q the same as -n.
5262 * remake.c (update_goal_chain): Fixed handling of return from
5263 update_file. If -n or -q is in effect, ignore it.
5265 * job.c (start_job): Don't test for -t. We should never get called in
5268 Fri Aug 11 04:09:14 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5270 * function.c (expand_function): Removed unused variables.
5271 (handle_function): Removed unused variable.
5273 * main.c (main): Removed unused variable.
5275 Wed Aug 9 09:37:10 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5279 * remake.c (notice_finished_file): If FILE's modtime actually changed,
5280 increment files_remade.
5281 (remake_file): Don't increment files_remade.
5283 * remake.c (update_file): Don't print "up to date" messages for
5286 * job.c (child_handler): Don't set C->file->update_status to 1 if
5287 start_job returns nonzero under -n or -t.
5289 * expand.c (variable_expand): Count parens in $(foo:a=b) refs.
5291 * main.c: Removed old declaration of `glob_tilde' (which hasn't existed
5294 Tue Aug 8 23:53:43 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5296 * job.c (exec_command): Fixed to not ignore the last path component and
5297 to do the right thing with an empty path.
5299 Fri Aug 4 15:58:19 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5301 * remake.c (library_file_mtime): Look for libLIB.a, not /libLIB.a.
5302 Do VPATH search on libLIB.a, not /usr/lib/libLIB.a
5304 Thu Aug 3 20:42:00 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5306 * job.c [HAVE_SYS_WAIT or not USG]: If WIFSIGNALED is not defined by
5307 <sys/wait.h>, define it as (WTERMSIG != 0).
5309 Tue Aug 1 19:25:34 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5311 * remake.c (remake_file): If FILE has no commands and is a target,
5312 don't set its time to now. The time gets reset by notice_finished_file
5313 anyway, and it isn't needed since check_dep checks for nonexistence.
5317 * read.c (read_makefile): Don't read off the end of the string after an
5320 * job.c (exec_command): New function to search the path for a file and
5322 (start_job): Use exec_command rather than execvp.
5324 * read.c (read_makefile): Expand `include' directive args before
5325 parsing them. Allow trailing whitespace after filename.
5327 * variable.c (target_environment): Put makelevel + 1, rather than
5328 makelevel, in the `MAKELEVEL' envariable.
5330 Sat Jul 29 10:27:04 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5332 * remake.c (notice_finished_file): Don't get the new modtime of phony
5335 * remake.c (remake_file): Run commands instead of touching under -t if
5336 FILE->cmds->any_recurse is set.
5338 * commands.h (struct commands): Add new member `any_recurse', to be set
5339 nonzero if any `lines_recurse' element is nonzero.
5340 * commands.c (chop_commands): Set the `any_recurse' member.
5342 * commands.c (execute_file_commands): Split chopping of commands into
5343 lines into new function chop_commands.
5344 * commands.h: Declare chop_commands.
5346 * read.c (read_makefile): Test for a line beginning with a tab after
5347 checking for conditional lines, but before all other checks.
5349 Fri Jul 28 18:10:29 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5351 * read.c (read_makefile): Match directives against collapsed line
5352 and use that for their args.
5354 * read.c (read_makefile): Warn about extra text after `include'.
5356 Tue Jul 25 14:34:25 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5358 * make.texinfo (Rules: Directory Search: Selective Search): Fixed
5359 example to use correct `vpath' syntax.
5361 Mon Jul 24 12:10:58 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5365 * job.c (start_job): In the child side, unblock SIGCHLD.
5367 Fri Jul 21 18:25:59 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5369 * make.h: Don't include <sys/types.h> #ifdef sun.
5371 Mon Jul 17 14:29:10 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5373 * implicit.c (pattern_search): If ar_name (FILENAME), don't check for
5376 * job.c (wait_for_children): Changed "waiting for children" message to
5377 "waiting for unfinished jobs".
5379 Fri Jul 14 13:17:13 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5381 * load.c (load_average): Use an unsigned offset into kmem.
5383 Thu Jul 13 18:44:49 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5385 * variable.c (pop_variable_scope): Don't free the head of the chain of
5386 variables in each bucket twice.
5388 Tue Jul 11 06:45:24 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5390 * GNUmakefile: Include COPYING in the doc tar file.
5392 * variable.c, read.c, misc.c, job.c, function.c: Replace some identical
5393 "for" loops with next_token or end_of_token calls.
5395 Mon Jul 10 16:55:08 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5399 * compatMakefile: Documented new conditionals.
5401 * job.c: Don't define sys_siglist if HAVE_SIGLIST is defined.
5402 Don't define dup2 if HAVE_DUP2 is defined.
5404 * job.c (child_handler): Interpret the return from start_job correctly.
5406 * remake.c (update_file_1): Don't write "target not remade because of
5407 errors" message under -n or -q.
5409 * read.c: Declare getpwnam.
5411 * glob.c: Use <dirent.h> if DIRENT is defined.
5412 [USG]: Don't declare memcpy, since <memory.h> does.
5414 Fri Jul 7 20:53:13 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5416 * misc.c (collapse_line): Copy the line over in the right place.
5418 Fri Jul 7 18:33:24 1989 Roland McGrath (fsf at void.ai.mit.edu)
5420 * remake.c: Conditionalize inclusion of <sys/file.h> on not
5421 USG, since HP-UX defines a `struct file' there.
5423 Fri Jul 7 12:11:30 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5425 * job.c: If WTERMSIG is defined by <sys/wait.h>, define WAIT_T as int,
5426 and don't define other macros; this covers HP-UX.
5427 If WTERMSIG is not defined, use int or union wait based on USG and
5428 HAVE_SYS_WAIT; this covers BSD and SysV.
5430 * Version 3.54.3 (alpha).
5432 * job.c [USG and not USGr3]: Include <errno.h> and declare errno.
5434 * job.c (unblock_children [USG]): Declare child_handler.
5436 * job.c: Renamed WRETCODE to WEXITSTATUS.
5437 [HAVE_SYS_WAIT or not USG]: Undefine WTERMSIG, WCOREDUMP, and
5438 WEXITSTATUS before defining them. The HP-UX <sys/wait.h> defines them.
5440 * main.c (main): If there are no goals, fatal AFTER printing the data
5443 Thu Jul 6 22:43:33 1989 Roland McGrath (roland at apple-gunkies.ai.mit.edu)
5445 * glob.c [USG]: #define rindex as strrchr.
5447 * job.c [USG]: Include <sys/param.h> and #define getdtablesize() as
5450 Wed Jul 5 09:36:00 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5452 * Version 3.54.2 (alpha).
5454 * expand.c (variable_expand): When expanding recursive variable
5455 references (${${a}}), use the correct delimiters in the constructed
5458 Mon Jul 3 18:29:26 1989 Roland McGrath (roland at apple-gunkies.ai.mit.edu)
5460 * compatMakefile: Clear out and redefine the .SUFFIXES list because
5461 silly Sun 4 make defines .cps.h.
5463 * compatMakefile: Fix comment about -DNO_MINUS_C_MINUS_O.
5465 * remake.c: Include <sys/file.h> for O_* on 4.2.
5467 * commands.c: Define sigmask if it's not defined.
5469 Fri Jun 30 07:33:08 1989 Roland McGrath (roland at apple-gunkies.ai.mit.edu)
5471 * remake.c (remake_file): Don't always increment files_remade.
5473 * variable.c (push_new_variable_scope): Zero the new variable hash
5476 Thu Jun 29 17:14:32 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5478 * expand.c (variable_expand): When terminating the variable expansion
5479 buffer, use variable_buffer_output instead of a simply zero store,
5480 because the buffer may need to be enlarged.
5482 Wed Jun 28 16:53:47 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5486 * default.c (default_suffixes): Added `.ln'.
5487 (default_suffix_rules): Changed lint rules to use -C.
5489 Thu Jun 22 20:49:35 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5491 * job.c (start_job): Set `environ' to CHILD->environment before execing
5492 in the child process!
5494 Tue Jun 20 17:23:13 1989 Roland McGrath (roland at spiff.ai.mit.edu)
5496 * compatMakefile: Put job.h and rule.h in `srcs'.
5500 Mon Jun 19 16:25:18 1989 Roland McGrath (roland at spiff.ai.mit.edu)
5502 * job.c (start_job): If there are no more commands, return nonzero
5505 * compatMakefile (make): Pass `-f' to mv.
5507 * GNUmakefile: If `ARCH' or `machine' is defined, make $(ARCH)/*.o and
5508 $(ARCH)/make instead of *.o and make.
5510 * function.c (string_glob): Don't try to use freed storage!
5512 * read.c (readline): If there is only one byte of space in the buffer,
5513 enlarge the buffer before reading more.
5515 * arscan.c [M_XENIX]: Miscellaneous minor changes for Xenix.
5517 Sun Jun 18 13:07:45 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5519 * GNUmakefile (depend): Split commands into two lines so they won't be
5520 so long when variable-expanded.
5522 * compatMakefile: Documented MINUS_C_MINUS_O meaning. The line
5523 describing it got removed when the USG/wait stuff was documented.
5525 Sat Jun 17 22:56:54 1989 Roland McGrath (roland at hobbes.ai.mit.edu)
5529 Mon Jun 12 17:45:11 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5531 * remake.c (check_dep): Drop circular dependencies instead of fataling.
5532 (update_file_1 already does this.)
5534 * default.c (default_suffix_rules): For .s -> .o, put the -o flag to
5535 the assembler before the source file name.
5537 Sun Jun 11 12:00:52 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
5541 * make.texinfo (Features): Noted 1003.2 requirement of `+' meaning.
5543 * file.c (remove_intermediates): If !SIG, write a single "rm" command
5544 line, listing all files.
5546 * read.c (read_makefile): Don't free the storage for the passed
5547 filename, since it might not be malloc'd. When doing an included
5548 makefile, free the name's storage.
5549 (read_all_makefiles): Use variable_expand to find the value of
5550 `MAKEFILES'. Free the storage for the names of -f makefiles.
5551 (read_makefile): Allocate storage for the makefile name in the
5552 `struct file' in read_makefiles.
5554 * make.texinfo (Running: Instead of Execution): Document the effect of
5555 + and $(MAKE)/${MAKE}.
5557 * make.texinfo (Functions: Foreach Function): Document that if the
5558 iteration variable was undefined before the `foreach' call, it will be
5559 undefined after the call.
5561 * commands.c: Split into commands.c, job.h, and job.c.
5563 * rule.c (try_implicit_rule, pattern_search): Moved to new file
5566 * rule.c: Split into rule.h, rule.c, and default.c.
5567 * default.c (install_default_pattern_rules): Renamed to
5568 install_default_implicit_rules.
5569 * make.h, main.c (main): Renamed uses.
5571 * make.c: Renamed to misc.c.
5573 * make.c (main, log_working_directory, decode_switches,
5574 decode_env_switches, define_makeflags, die, print_version,
5575 print_data_base): Moved to new file main.c.
5577 * commands.c (execute_file_commands): Don't collapse backslash-newlines
5578 here. When chopping the commands up into lines, don't chop at
5580 (start_job): Collapse backslash-newlines after printing the line.
5582 * commands.c (start_job): Don't collapse backslash-newlines here.
5583 (execute_file_commands): Collapse backslash-newlines before chopping
5584 the commands up into lines.
5586 * commands.c (set_file_variables): Initialize the length counters for
5589 * commands.c (start_job): Use vfork instead of fork. Someone else says
5590 the child and parent DO have separate file descriptors.
5592 * variable.c: Split internals into variable.c, function expansion into
5593 function.c, and variable expansion into expand.c.
5594 * function.c (handle_function): New function to check for a function
5595 invocation and expand it.
5596 * expand.c (variable_expand): Use handle_function.
5597 * variable.c (push_new_variable_scope): New function to push a new
5598 empty variable set onto the current setlist.
5599 (pop_variable_scope): New function to pop the topmost set from the
5600 current setlist and free its storage.
5601 * function.c (expand_function: `foreach'): Push a new variable scope
5602 for the iteration variable and pop the scope when finished.
5603 * variable.h: Declare new functions.
5604 * variable.c (initialize_variable_output): New function to return a
5605 pointer to the beginning of the output buffer.
5606 (save_variable_output): New function to save the variable output state.
5607 (restore_variable_output): New function to restore it.
5608 * expand.c (variable_expand): Use initialize_variable_output.
5609 (allocated_variable_expand): Use {save,restore}_variable_output.
5610 * variable.c (current_setlist): Renamed to current_variable_set_list
5613 Sat Jun 10 00:11:25 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5615 * remake.c (library_file_mtime): Check for libNAME.a in the current
5616 directory before doing VPATH search.
5618 * variable.c (print_variable_set): Don't write "# Variables", and write
5620 (print_variable_data_base): Precede the variables with "# Variables".
5622 * make.c (main): Print the data base under -p after doing everything
5623 else, just before exitting. This way it gets info determined in
5624 updating the goal targets.
5626 * variable.c (print_variable_data_base): Split into print_variable,
5627 which prints one variable, and print_variable_set, which prints a set.
5628 Replaced with a call to print_variable_set for the global set.
5629 (print_file_variables): New function to print a given file's local
5632 * file.c (print_file_data_base): Call print_file_variables to print
5633 each file's local variables.
5635 * commands.c (set_file_variables): Actually define the values for
5636 the $^ and $? variables!!!
5638 * make.texinfo (Implicit: Pattern Rules: Automatic): Document new D and
5639 F versions of $^ and $?.
5641 * commands.c (start_job): In the child fork, use getdtablesize and a
5642 loop to close all file descriptors other than 0, 1, and 2. We need to
5643 do this since not only the bad stdin pipe, but also some directories,
5646 * commands.c (start_job): Use fork instead of vfork, because a vfork
5647 parent and child share file descriptors, and our child needs to diddle
5650 * variable.c (initialize_file_variables): When created a new variable
5651 set, zero out the hash table.
5653 * variable.c (target_environment): Don't use variables whose names are
5654 not made up of alphanumerics and underscores.
5656 * remake.c (update_file_1): Set the `parent' member of each dependency
5657 to FILE before updating it.
5659 * file.h (struct file): Add `parent' member.
5661 * variable.c (initialize_file_variables): Don't take second arg PARENT.
5662 Use FILE->parent instead. If FILE->parent->variables is nil, recurse
5665 * variable.h: Declare {allocated_}variable_expand_for_file.
5667 * variable.c (allocated_variable_expand): Now
5668 allocated_variable_expand_for_file, calling variable_expand_for_file,
5669 and taking second arg FILE.
5670 (allocated_variable_expand): New function, a wrapper around
5671 allocated_variable_expand_for_file, passing a nil second arg.
5673 Fri Jun 9 12:11:45 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5675 * commands.c (start_job): On the child side of the fork, always close
5676 the bad stdin file descriptor.
5678 * commands.c (struct child): New member `environment', to hold the
5679 environment for the child.
5680 (execute_file_commands): Set the new childs `environment' member to nil
5681 before calling start_job.
5682 (start_job): Set up CHILD->environment before running the commands if
5685 * make.c (main): Don't call new_environ. `shell' functions will now be
5686 run with the environment make was called with.
5688 * commands.c (child_handler): Don't check C->command_ptr before calling
5689 start_job since we now have to check C->file->cmds->command_lines and
5690 it's easier to let start_job handle all that.
5692 * commands.c (struct child): New member `command_line', to hold an
5693 index into file->cmds->command_lines.
5694 (execute_file_commands): Set the new child's `command_line' to 0 and
5695 its `commands' and `commands_ptr' to nil.
5696 (start_job): When CHILD->command_ptr runs out, increment
5697 CHILD->command_line and run the corresponding line from
5698 CHILD->file->cmds->command_lines. Run it even under -t, -q, or -n if
5699 the CHILD->file->cmds->lines_recurse element for that line is set.
5701 * commands.c (execute_file_commands): Chop CMDS up into lines, setting
5702 its `command_lines' and `lines_recurse' members, if it wasn't already
5705 * commands.h (struct commands): New members `command_lines' and
5706 `lines_recurse'. The first is an array of chopped-up lines; the second
5707 is an array of flags, each nonzero if the corresponding line is
5710 * variable.c (variable_expand_for_file): If FILE is nil, just do a
5711 vanilla variable_expand.
5712 (expand_function: `shell'): Pass second arg (as nil) to
5713 construct_command_argv.
5715 * commands.c (construct_command_argv): Use variable_expand_for_file on
5716 `$(SHELL)' and `$(IFS)' instead of lookup_variable to check those
5717 variables. This handles file-local and recursive values correctly.
5718 To support this, take an additional argument FILE.
5720 * variable.c (initialize_file_variables): New function to initialize
5721 FILE's variable set list from PARENT's setlist. PARENT is the
5722 immediate dependent that caused FILE to be remade, or nil if FILE is a
5723 goal. (When user-level per-file variables are implemented, PARENT
5724 should be passed as nil when defining per-file variables.)
5726 * variable.c (variable_expand_for_file): New function to expand a line
5727 using the variable set of a given file, and reporting error messages
5728 for the file and line number of that file's commands.
5730 * variable.h: Don't declare lookup_variable_for_file.
5732 * variable.c (lookup_variable_*): Turned back into lookup_variable. It
5733 now uses current_setlist.
5734 (global_setlist): New static `struct variable_set_list', a setlist
5735 containing global_variable_set.
5736 (current_setlist): New static `struct variable_set_list *', a pointer
5737 to the current variable set list.
5738 (define_variable): Define in the current top-level set, not the global
5741 * commands.c (set_file_variables): New function to set up the automatic
5742 variables for a file in its own variable set.
5743 (execute_file_commands): Use set_file_variables.
5745 * variable.c (new_environ): Replaced with target_environment, taking an
5746 argument FILE, and returning an environment for FILE's commands.
5748 * variable.c, variable.h: Remove all global special variable pointers.
5750 * variable.c (define_variable_for_file): New function like
5751 define_variable, but takes additional arg FILE, and defines the
5752 variable in the variable set at the top of FILE's chain.
5753 (lookup_variable_for_file): New function like lookup_variable, but
5754 takes additional arg FILE, and looks the variable up in all of FILE's
5757 * file.h (struct file): New member `variables', a `struct
5758 variable_set_list' containing the list of variable sets used in the
5759 expansion of the file's commands.
5761 * variable.c (variables): Replaced with static `struct variable_set'
5762 global_variable_set.
5763 (define_variable): Now define_variable_in_set, taking additional
5764 argument SET, the `struct variable_set' to define it in.
5765 (define_variable): Use define_variable_in_set with global_variable_set.
5766 (lookup_variable): Now lookup_variable_in_set, taking additional
5767 argument SET, the `struct variable_set' to look it up in.
5768 (lookup_variable): Use lookup_variable_in_set with global_variable_set.
5769 (lookup_variable_in_setlist): New function to look up a variable in a
5770 `struct variable_set_list' using lookup_variable_in_set.
5772 * variable.h (struct variable_set): New structure, containing a hash
5773 table and the number of hash buckets.
5774 (struct variable_set_list): New structure, containing a link for a
5775 linked-list, and a `struct variable_set'.
5777 * commands.c (start_job): Under -n, return what the recursive start_job
5778 call returns, since it might actually start a child.
5780 * make.texinfo (Rules: Wildcards): Document ~ and ~USER expansion.
5782 * commands.c (execute_file_commands): If start_job returns
5783 failure, but -t is set, set FILE->update_status to success.
5784 (start_job): If -t is set, and the commands are not recursive, return
5785 failure (is is done for -q).
5787 * remake.c (touch_file): New function to touch FILE.
5788 (remake_file): Use touch_file. When touching a file, still do
5789 execute_file_commands.
5791 * remake.c (remake_file): Don't check question_flag (-q), since we
5792 can't know here if the commands are recursive.
5794 * commands.c (start_job): Don't use the `recursive' member of
5795 CHILD->file->cmds. Instead, check for leading +s and $(MAKE) or
5796 ${MAKE} in the command line here.
5798 * commands.h (struct commands): Remove `recursive' member.
5800 * rule.c (install_default_pattern_rules): Remove use of `recursive'
5803 * read.c (record_files): Don't check commands from $(MAKE) and set
5804 their `recursive' member.
5806 * commands.c (fatal_error_signal): Treat SIGQUIT like SIGINT, SIGHUP,
5807 and SIGTERM, but don't send it to ourselves because it will cause a
5810 Thu Jun 8 20:30:04 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5814 * variable.c (variable_expand): Use allocated_variable_expand instead
5815 of expand_argument in a few places.
5817 * variable.c (allocated_variable_expand): Do static variable shuffling
5818 here instead of using expand_argument.
5819 (expand_argument): Use allocated_variable_expand.
5821 * variable.c (recursively_expand): New function to recursively expand
5822 its argument (a `struct variable'), returning the malloc'd value.
5823 (variable_expand): Use recursively_expand.
5825 Sun May 28 12:49:27 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
5827 * make.c (main): Fixed buggy fix in deciding to increase space for
5828 command-line variable definitions. (First it never did it, then it
5829 always did it; now it does it when necessary.)
5831 Sat May 27 14:01:54 1989 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
5833 * make.c (main): Fixed bug in deciding to increase space for
5834 command-line variable definitions.
5836 Fri May 26 15:48:01 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5838 * read.c (multi_glob): Use allocated_expand_variable for checking
5839 `HOME' variable for ~ expansion, since this may be called from inside a
5840 `wildcard' function expansion.
5842 * variable.h: Declare allocated_expand_variable.
5844 * variable.c (allocated_expand_variable): New function to do variable
5845 expansion in an allocated buffer, rather than the static one.
5847 * make.c (main): Don't set glob_tilde (it no longer exists).
5849 * variable.c (string_glob): Use multi_glob and parse_file_seq.
5851 * read.c (multi_glob): Do ~ expansion here.
5853 * glob.c (glob_tilde, glob_filename): Removed ~ expansion.
5855 * variable.c (define_variable, lookup_variable): Use a smarter hashing
5856 algorithm (the same one used for files and directories).
5857 (VARIABLE_BUCKETS): Increased to 523.
5859 * file.c (enter_file, lookup_file, rename_file): Use a smarter hashing
5860 algorithm, spreading the bits about somewhat.
5862 * make.c (log_working_directory): Under `-p', precede the directory
5865 * make.c (print_version): Under `-p', precede each line with a `#'.
5866 (print_data_base): Precede the header line with a `#' and include the
5867 date and time on it.
5869 * vpath.c (print_vpath_data_base): Precede non-directive
5872 * commands.c (print_commands): Precede the non-command line with a `#'.
5874 * rule.c (print_rule_data_base), file.c (print_file_data_base): Precede
5875 non-rule lines with `#'s.
5877 * dir.c (print_dir_data_base): Precede all lines with `#'s.
5879 * variable.c (print_variable_data_base): Changed format so that it can
5880 be makefile input. Lines that are not variable definitions are
5881 preceded with `#'. Nonrecursive variable definitions are made with all
5882 dollar signs doubled to reproduce the initial value. Recursive
5883 variable definitions containing newlines are done with `define'
5884 directives. Nonrecursive variable definitions containing newlines, and
5885 variable names containing :, =, or newlines, will come out garbled.
5887 Wed May 24 00:20:04 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5891 Tue May 23 19:18:00 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5893 * variable.c (expand_function: `filter'/`filter-out'): Use
5894 find_percent instead of pattern_p.
5896 * variable.c (expand_function: `patsubst'): Pass new args (both nil)
5898 (variable_expand): For $(var:pat%=rep%) references, pass new args to
5899 patsubst_expand so as to avoid find_percent and thus disallow
5902 * read.c (record_files): Pass new args to patsubst_expand.
5904 * variable.c (patsubst_expand): Take two new args: PATTERN_PERCENT
5905 and REPLACE_PERCENT. Each of these, if non-nil, means that PATTERN
5906 (or REPLACE) has already been run through find_percent, and
5907 PATTERN_PERCENT (or REPLACE_PERCENT) is the result.
5909 * make.h: Declare find_percent instead of pattern_p.
5911 * read.c (pattern_p): Changed to find_percent, returning a pointer
5912 to the %, or nil if there is none.
5913 (record_files): Take another arg, PATTERN_PERCENT, a pointer to the
5915 (read_makefile): Pass PATTERN_PERCENT to record_files.
5917 * make.texinfo (Rules: Static Pattern: Static Usage,
5918 Rules: Directory Search: Selective Search,
5919 Functions: Text Functions): Documented that `%' can be quoted.
5921 * variable.c (expand_function: `filter'/`filter-out'): Use pattern_p
5922 to allow quoted %s in patterns.
5924 * variable.c (patsubst_expand): Use pattern_p on PATTERN and REPLACE
5925 to allow quoted %s. Quoting backslashes are removed from REPLACE
5926 even if PATTERN contains no unquoted %.
5928 * read.c (pattern_p): Made global.
5929 * make.h: Declare pattern_p.
5931 * read.c (pattern_p): New function to search for an unquoted % in a
5932 string. Backslashes quote %s and backslashes. Quoting backslashes
5933 are removed from the string by compacting it into itself. Returns
5934 nonzero if an unquoted % was found, zero if not.
5935 (record_files): Use pattern_p to check for implicit rules.
5936 (read_makefile): Use pattern_p to check for static pattern rules.
5937 Also use it to allow quoted %s in `vpath' patterns; warn about
5938 `vpath' patterns with no %s.
5940 Mon May 22 16:31:52 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
5942 * glob.c (glob_filename): Replace a `1' with the `l' that should
5943 have been there. This incidentally stops it from dumping core.
5945 * glob.c (glob_filename): If the path is just a directory, with no
5946 file name pattern, return the directory alone.
5948 * glob.c (glob_tilde): New global variable (int), defaults to zero.
5949 (glob_filename): If glob_tilde is nonzero, expand ~ or ~USER.
5951 * variable.c (string_glob): Keep a static allocated buffer for file
5952 names taken from the list, instead of allocating and freeing one
5955 Fri May 19 18:06:26 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5957 * make.c (decode_switches): Get floating numbers from the right string.
5959 Sun May 14 13:48:04 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
5961 * commands.c (delete_child_targets): When deleting `also_make'
5962 files, include the target's name in the message:
5963 make: *** [foo] Deleting file `bar'
5965 Sat May 13 17:34:26 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
5967 * make.c (max_load_average, default_load_average): Default to -1.
5969 * load.c (wait_to_start_job): Return if max_load_average is < 0.0,
5972 Fri May 12 16:08:05 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
5974 * variable.c (variable_buffer_output): Don't try to do pointer
5975 arithmetic between objects not in the same array.
5977 Wed May 10 15:55:29 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5979 * rule.c [M_XENIX] (default_suffix_rules, default_variables): Minor
5980 changes to allow for strange compiler syntax.
5982 * rule.c (default_variables): Don't include "> $@" in
5983 $(PREPROCESS.S), since it's already in the .S.s rule.
5985 * file.c (enter_file): Make a new double-colon file the `prev'
5986 member of the bottom `prev' file (the one whose `prev' is nil).
5988 * read.c (do_define): Append newlines after copying the lines into
5989 the value buffer, so we end up with a trailing newline.
5991 * make.c (print_version): If the global variable
5992 `remote_description' is not nil or "", append "-%s" (its value) to
5994 * remote-*.c: Define remote_description appropriately.
5996 Sun May 7 15:15:53 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
5998 * commands.c (error_status): Converted to new function child_error,
5999 taking new arguments TARGET_NAME and IGNORED, and writing an error
6000 message: "*** [target] Error 1" (or signal #, etc.), appending
6001 " (ignored)" if IGNORED is nonzero.
6002 (child_handler): Use child_error instead of error_status.
6004 * compatMakefile (all): Don't depend on `doc'.
6006 * compatMakefile (clean): Don't remove make-info*.
6007 (realclean): New rule, depends on `clean', removes tags, TAGS,
6008 and all Info and TeX files.
6010 Thu May 4 17:00:46 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6012 * variable.c (print_variable_data_base), file.c
6013 (print_file_data_base), rule.c (print_rule_data_base),
6014 Use floating-point for averages and percentages.
6016 * make.c (print_data_base): Print messages before and after the data
6019 * commands.c (print_commands): Changed output format to separate
6020 lines in commands and prefix them with tabs.
6022 * dir.c (print_dir_data_base): Changed output format slightly.
6024 * vpath.c (struct vpath, construct_vpath_list,
6025 selective_vpath_search): Remove the `exists' member and its uses.
6027 * vpath.c (print_vpath_data_base): New function to print all
6028 selective and general VPATH search paths (for -p).
6030 * make.c (print_data_base): Call print_vpath_data_base.
6032 * file.c (print_file_data_base): Changed format to look more like a
6033 makefile rule. Now reports all information in the `struct file'.
6035 * rule.c (print_rule_data_base): Changed format of display from:
6041 references nonexistent subdirectory.
6042 Also include number and percent that refer to nonexistent
6045 Thu Apr 27 15:45:40 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6047 * make.c (main): Figure out the level of recursion before writing
6048 the `Entering directory' message.
6049 * variable.c (define_automatic_variables): Don't figure out the
6050 level of recursion from `MAKELEVEL'. It's now done in main.
6054 Wed Apr 26 16:39:17 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6056 * commands.c (child_handler): Set `update_status' to zero when there
6057 are no more commands.
6059 * make.c (log_working_directory): If MAKELEVEL > 0, indicate the
6060 recurson in the message (make[1]: ...).
6062 * commands.c (child_handler): Change status to `cs_finished' when
6065 * commands.c (start_job): Return 0 (success) if there were no more
6066 commands for the child.
6067 (child_handler): Change the status to `cs_finished' when start_job
6068 fails to start the commands.
6070 * make.c (main): Don't handle SIGEMT if it's not defined.
6071 Do handle SIGDANGER if it is defined.
6073 * commands.c (child_handler): Reorganized inner loop so that it
6074 doesn't try to inspect the child before finding it.
6076 Tue Apr 25 16:28:24 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6078 * make.c (end_of_token): Fixed bug wherein backslashes caused
6083 * make.texinfo (Implicit: Pattern Rules: Automatic): Document
6084 setting of `$*' for explicit rules. Add note clarifying that
6085 automatic variables, though referred to in the documentation as
6086 `$<', etc. are no different than `$(<)', etc.
6088 Fri Apr 21 18:00:12 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6090 * file.c (enter_file): Don't strip leading `./'s.
6092 * read.c (parse_file_seq): Strip leading `./'s.
6094 Thu Apr 13 17:26:41 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6096 * make.texinfo (Commands: Parallel, Running: Options): Document that
6097 -l with no argument removes a previous load limit.
6099 * make.c (struct command_switch): New member `default_value'.
6100 (default_job_slots): Default value (of 1) for -j.
6101 (default_load_average): Default value (of 0, unlimited) for -l.
6102 (command_switches): Use default values for -j and -l.
6103 Also, -l without an arg now means no load limit.
6104 (define_makeflags): Don't write positive_int or floating options
6105 whose values are their defaults.
6107 * make.c (main): Under -w, write a `Leaving directory' message
6110 Tue Apr 11 16:46:29 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6114 * Makefile: Provide an easy place for system-specific definitions
6115 (-DUSG, etc.) and extra object files (for whatever).
6117 * make.texinfo: Miscellaneous fixes from RMS.
6119 Mon Apr 10 19:31:34 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6121 * rule.c (pattern_search): Put rules with `subdir' flags set in
6122 TRYRULES, since these might be valid with VPATHs. In the TRYRULES
6123 loop, don't do lookup_file or file_exists_p calls for dependencies
6124 of rules with `subdir' flags set, but still do vpath_search calls
6125 and intermediate-file searches.
6127 Thu Apr 6 16:33:00 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6129 * make.texinfo (Implicit: Pattern Rules: Automatic): Document the
6130 new definition of $* for explicit rules.
6132 * commands.c (execute_file_commands): If FILE->stem is nil, figure
6133 out if FILE->name ends in a suffix in the .SUFFIXES list; if so,
6134 store the name sans suffix in FILE->stem (and $*).
6136 Wed Apr 5 15:24:48 1989 Roland McGrath (mcgrath at helen.Berkeley.EDU)
6138 * file.c (remove_intermediates): Don't use `file_exists_p' to check
6139 for the existence of intermediate files, because the hashed
6140 directories will probably be out of date.
6142 * commands.c (child_handler): Free the good stdin before running the
6145 * commands.c [USG] (init_siglist): Don't case SIGEMT if it's not
6146 defined. Do case SIGDANGER (for IBM RT) if it is defined.
6148 * commands.c: Changed `SYS_WAIT' to `HAVE_SYS_WAIT'.
6149 (child_handler): Use `wait3' if HAVE_SYS_WAIT is #defined.
6151 * file.c (enter_file): If any `./'s are stripped off, allocate a new
6152 copy of the shortened name.
6154 * rule.c (pattern_search): Allocate the right length strings for
6155 `also_make' members.
6157 Sat Apr 1 13:28:38 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6161 * GNUmakefile: Make a separate tarfile of the DVI and info files.
6163 * make.c (define_makeflags): If a switch that takes an argument has
6164 its default value, put the switch in MAKEFLAGS with no arguments.
6166 * make.c (command_switches): Pass `-l' in MAKEFLAGS.
6168 Wed Mar 29 17:50:05 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6170 * GNUmakefile: Don't include the DVI and info files in the dist.
6172 * commands.c (child_handler): Don't call
6173 check_changed_{directories,vpaths}.
6175 * make.h: Don't declare check_changed_{directories,vpaths}.
6177 * vpath.c (check_changed_vpaths): Removed this function.
6179 * dir.c (struct directory): Remove `modtime' member.
6180 (find_directory): Don't set `modtime' member.
6181 (check_changed_directories): Removed this function.
6183 * remake.c (update_file_1): Set FILE->command_state to cs_finished
6184 if it didn't need to be remade.
6186 * remake.c (update_file): Only write the "up to date" message if the
6187 target went from `not_started' state to `finished' state without
6188 incrementing the count of files remade.
6190 * commands.c [USG] (init_siglist): If both SIGCHLD and SIGCLD are
6191 defined, don't put them both in the `switch'.
6193 Tue Mar 28 15:37:02 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6195 * file.c (rename_file): Change FILE's name!!!
6197 * rule.c (create_pattern_rule): Set the `terminal' member of the new
6198 rule after calling new_pattern_rule, which zeros it.
6200 * rule.c (default_variables): Use $(C++) in $(COMPILE.cc)!
6202 Sun Mar 26 15:52:30 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6204 * Makefile: Added a `clean' target.
6206 Fri Mar 24 15:08:46 1989 Roland McGrath (mcgrath at helen.Berkeley.EDU)
6210 * file.c (rename_file): If a `struct file' for the renamed-to name
6211 exists, and it is a target or has deps or commands, barf.
6212 If not just remove the old one for put in the new one.
6214 * remake.c (update_file_1, check_dep): Changed it back so that equal
6215 modtimes to NOT make dependencies be considered newer. RCS checks
6216 out files with equal modtimes as the RCS files, so this screws it.
6218 * make.h, glob.c: If __GNUC__ is defined, use __builtin_alloca.
6220 * Makefile: Use variables `ALLOCA' and `ALLOCASRC' so systems
6221 without a good standard alloca can get it from the Emacs
6222 distribution (or somewhere).
6224 * dir.c: Don't include <sys/stat.h>, since make.h does.
6226 * make.c: Removed debugging version of getwd.
6228 Thu Mar 23 16:16:27 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6232 * remake.c (update_file_1): If a dependency loop is found, don't
6233 fatal. Emit an error message and remove the dependency.
6235 * remake.c (library_file_mtime): Fixed to use the right names.
6236 (update_file_1, check_dep): Consider a dependency "newer" than its
6237 dependent if they have the same modification time.
6239 Wed Mar 22 19:31:35 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6241 * file.c (remove_intermediates): Don't try to remove nonexistent files.
6243 Mon Mar 20 10:21:22 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6247 * rule.c (default_variables): Set F77 to $(FC) and F77FLAGS to
6248 $(FFLAGS) so explicit rules expecting these (which are in System V)
6249 will work. However, there is no way to make setting these affect
6250 the implicit rules, unless we trash FC and FFLAGS (which BSD uses).
6251 [USG]: Set GET to `get' rather than `/usr/sccs/get'.
6253 Sun Mar 19 20:00:27 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6255 * vpath.c (construct_vpath_list): Don't replace VPATH[ELEM] with
6256 dir_name (V), because the latter may get freed.
6258 Sat Mar 18 15:01:39 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6262 * make.texinfo: Cleaned-up edition 0.1 Beta from RMS and Bob Chassell.
6264 * file.c (rename_file): If a file with the new name already existed,
6265 use the same storage space, after freeing the old file's name, deps,
6266 and `also_make' member, preserving the link in the chain.
6267 Also write an error message telling the user to report the incident;
6268 I don't think this should be able to happen, but I'm not sure.
6270 * file.c (rename_file): Don't add the hash values of the old and new
6271 names together! Reset HASHVAL before computing the second value.
6273 * dir.c (check_changed_directories): Zero the new file hash table
6274 after allocating it.
6276 * dir.c (dir_file_exists_p): If FILENAME is "", return 1 if the
6279 * vpath.c (check_changed_vpaths): New function to run through the
6280 search paths of all VPATHs, making the `exists' members correspond
6283 * commands.c (child_handler): Call check_changed_vpaths.
6285 * make.h: Declare check_changed_vpaths.
6287 * vpath.c (struct vpath): New element `exists', an array of char
6288 flags; exists[N] is nonzero if searchpath[N] exists.
6289 (construct_vpath_list): Set the `exists' member.
6290 (selective_vpath_search): Don't search directories whose `exists'
6293 * read.c (read_makefile): Set the `dontcare' flag of makefiles
6294 from the MAKEFILES variable if they were not mentioned anywhere but
6295 in the MAKEFILES variable.
6297 * read.c (read_makefile): Don't write an error message if fopen
6298 fails for a makefile from the MAKEFILES variable.
6300 * dir.c (struct directory): Add `modtime' member to record the
6301 modification time of the directory when it was opened.
6302 (check_changed_directories): New function to check all known
6303 directories; if their modtimes have changed since they were opened,
6304 their file tables are cleared and they are reset to be read in.
6306 * commands.c (child_handler): Call check_changed_directories before
6308 make.h: Declare check_changed_directories.
6310 Tue Mar 14 20:07:13 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6314 * make.c (print_version): Made the copyright say 1988, 1989.
6316 * read.c (read_all_makefiles): Don't set *MAKEFILES to the name of
6317 the end of the read_makefiles chain, since the latter may be from an
6318 included makefile. (Why did I do this before?)
6320 * make.c (main): Set argv[0] to "" if it was nil. Don't put the
6321 command-line variable definitions into argv[0], only into the MAKE
6324 Sun Mar 5 20:44:08 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6326 * ar.c (ar_member_date, ar_touch): Remove the trailing ) from the
6329 Fri Mar 3 18:15:15 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6331 * commands.c (construct_command_argv): Initialize NEW_ARGV to 0. At
6332 `slow' label, if NEW_ARGV is not 0, free it; then allocate 4 strings.
6334 Tue Feb 28 14:29:39 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6338 * COPYING, make.texinfo: New GNU General Public License, version 1.
6340 * *.c, *.h, Makefile: New copyright notices for the new GNU General
6341 Public License, version 1.
6343 * commands.c [USG]: Define WRETCODE correctly (again).
6345 * variable.c (expand_function: `shell'): Don't capture the standard
6346 error output of the shell command.
6348 * ar.c (ar_touch, ar_member_date): Allocate MEMNAME with the right
6351 * load.c [not UMAX] (load_average): Don't clobber the first nlist
6352 member when trying to set the second!
6354 Thu Feb 23 13:13:53 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6356 * commands.c (child_handler): Really ignore errors under -i and for
6357 - lines, don't just print a different message.
6359 * make.c (decode_switches): Fixed handling of arguments (or lack
6360 thereof) to switches.
6362 Wed Feb 22 16:25:39 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6364 * commands.c (construct_command_argv): Don't clobber LINE when
6365 checking the IFS variable.
6367 Sun Feb 19 11:17:07 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6369 * load.c [UMAX, not NO_LDAV] (load_average): Return 0.0 rather than
6370 randomness when calls fail.
6374 * commands.c (fatal_error_signal): If handling a user kill signal
6375 (TERM, INT, HUP), wait for the children without printing the
6376 "Waiting for children" message, since they will die quickly.
6380 * remote-stub.c (remote_status): Take another arg, BLOCK. If this
6381 is nonzero block waiting for remote children. If not, return 0 if
6382 we would have to block.
6384 * commands.c (child_handler) [not USG]: If called as a signal
6385 handler, use wait3 and don't block.
6386 [USG]: If called as a signal handler, return after handling one child.
6388 Sat Feb 18 13:37:04 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6390 * file.c (snap_deps): Process all double-colon entries of each file,
6391 not just the first one.
6395 * remote-stub.c: remote.c renamed.
6396 remote.c: Just include remote-stub.c
6398 * commands.c (child_handler): If we were called as a signal handler,
6399 return after handling one child.
6401 * commands.c [not USG]: Include <signal.h> and define `sigmask' if
6403 (block_children, unblock_children): Use sigmask rather than
6404 bitshifting explicitly (and incorrectly).
6406 * remote.c (remote_kill): New function to send a signal to a
6409 * commands.c (fatal_error_signal): If we get a SIGTERM, send one to
6410 each living child. If we get a SIGTERM, SIGINT, or SIGHUP, delete
6411 all pending targets before waiting for children.
6412 (struct child): Add new member `deleted'.
6413 (start_job): Initialize `deleted' member to 0.
6414 (delete_child_targets): New function to delete a given child's
6415 targets, unless the `deleted' flag in the `struct child' says they
6416 have already been deleted. Sets this flag before returning.
6418 Thu Feb 16 18:32:07 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6420 * commands.c [USG]: Define `WRETCODE' correctly (X & 0xff00).
6422 Tue Feb 14 16:05:00 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6424 * commands.c (construct_command_argv): Don't make the 0th element of
6425 the argument list be "sh" when executing /bin/sh, because start_job
6426 uses the 0th element as the program name.
6428 Sun Feb 12 17:42:05 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6432 * read.c (readline): Put a null in the beginning of the buffer
6433 before starting the reading loop.
6435 * read.c (read_makefile): Made main reading loop while
6436 !feof (infile), and removed EOF check after calling readline.
6438 Sun Feb 5 19:52:38 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6440 * remote.c (block_remote_children, unblock_remote_children): New
6441 (stub) functions to block and restore asynchronous notification of
6444 * commands.c (block_children): Call block_remote_children.
6445 (unblock_children): Call unblock_remote_children.
6446 (child_handler): If called as a signal handler, block remote
6447 children on entry and unblock them before returning.
6449 * commands.c (child_handler): For unknown children, if they are
6450 remote, give their remote ID; if local, give their PID and make's.
6452 * commands.c (execute_file_command): Don't put a new child in the
6453 chain unless start_job succeeds. Block children before calling
6454 start_job, and unblock them after putting the child in the chain and
6455 incrementing `job_slots_used' (if start_job succeeded).
6457 * commands.c (block_children, unblock_children): Make these globally
6458 visible (not `static').
6459 commands.h: Declare block_children and unblock_children.
6461 * variable.c (expand_function: `shell'): Use
6462 `shell_function_completed'. Block children before forking and
6463 unblock after `shell_function_pid' is set properly and
6464 `shell_functon_completed' is reset to 0.
6466 * commands.c (child_handler): When the child of the `shell' function
6467 completes, set `shell_function_completed' to 1 if it actually ran,
6468 or -1 if it didn't (due to fork or exec failure).
6470 * commands.c (block_children, unblock_children): New functions to
6471 block and unblock the child termination signal.
6472 (wait_for_children): Use block_children and unblock_children.
6473 (execute_file_commands): Block children around the critical section
6474 wherein a new child is put on the chain.
6476 * make.c (main): Change the environment to contain the correct
6477 MAKELEVEL before re-execing.
6479 Sat Feb 4 18:28:48 1989 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6483 Fri Feb 3 16:36:49 1989 Roland McGrath (mcgrath at helen.Berkeley.EDU)
6485 * rule.c (default_variables): Fixed $(LINK.c).
6487 Wed Feb 1 18:05:07 1989 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
6491 * version.c: Removed copyright notice, since this is a one-line file.
6493 * commands.c (error_status): Made it return BUF, rather than running
6494 off the end (this apparently worked on Sun 3s for some reason).
6496 * ar.c, commands.c, dep.h, load.c, make.c, make.h, read.c, remake.c,
6497 rule.c, variable.c, Makefile: Changed copyrght notices to cover 1989.
6499 Mon Jan 30 15:51:28 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6503 Fri Jan 27 20:09:24 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6505 * remake.c (remake_file): Don't touch phony targets.
6507 * rule.c (convert_to_pattern): Fixed an incorrect length passed to
6510 * variable.c (expand_function: `shell'): Close the read side of the
6511 pipe on the parent side of the fork.
6513 * commands.c (start_job): On the child of the fork, close the
6514 BAD_STDIN fd if we're not using it.
6516 * read.c (record_files): A file beginning with a dot can be a
6517 default target if it also contains a slash (as in `../foo').
6519 * commands.c (wait_for_children): For BSD, block SIGCHLD rather than
6520 ignoring it to avoid a race condition when child_handler is returning.
6522 * commands.c (child_handler): Do blocking waits.
6523 (error_status): Return a string describing exit status. (Split out
6526 * read.c (multi_glob): Change VECTOR to VEC for Alliant.
6528 Thu Jan 5 00:06:51 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6532 * make.texinfo (Features): Noted $(foo:PAT=SUB) from SunOS 4.0.
6534 * make.texinfo (Options/Recursion): -d and -p go in the environment.
6536 * load.c: Include "commands.h".
6538 Wed Jan 4 17:49:25 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6540 * make.c (switches): -d and -p can come from the environment and are
6543 * read.c (record_files): Fixed the checking for duplicate deps so it
6544 doesn't clobber the first one.
6546 * make.texinfo: Documented default implicit rule changes.
6548 * rule.c: Revamped default suffix rules. They now use Sun's style
6549 of using variables `COMPILE.c', `LINK.c', etc. for each suffix, and
6550 use `TARGET_ARCH' and `TARGET_MACH' variable where appropriate.
6551 Also support Modula-2 compilation (suffixes .sym, .def, and .mod).
6552 Ratfor Yacc support is gone, since nobody has yacc -r.
6553 All EFL support is gone, since nobody uses EFL.
6555 * ar.c, arscan.c: Don't assume `long int' and `int' are the same.
6557 * commands.c [USG]: Fixed wait status bit encoding.
6558 [USG and not USGr3] (dup2): Define this for SysVr2.
6560 * make.h, dep.h, make.c [iAPX286]: Make allowances for this
6561 brain-damaged compiler.
6563 * make.texinfo (Variables: Flavors): Fixed a typo.
6565 Tue Jan 3 18:09:31 1989 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6567 * ar.c (ar_member_date, ar_touch): Truncate member names to 15 chars.
6571 * commands.c [SYS_WAIT]: If this is defined, use BSD <sys/wait.h>
6572 and wait3 even if USG.
6574 * read.c (record_files): Defining .DEFAULT with no deps or commands
6575 clears its commands.
6577 * rule.c (default_suffixes): Added `.sh'.
6578 (default_suffix_rules): Added single-suffix .sh rule, copies source
6579 to target and makes target executable.
6580 make.texinfo (Catalogue of Rules): Documented .sh rule and its use
6581 in conjunction with SCCS.
6583 * rule.c (set_default_suffixes): Define variable `SUFFIXES' to the
6584 default list ("" under -r).
6585 make.texinfo (Suffix Rules): Document `SUFFIXES' variable.
6587 * rule.c (default_variables), make.texinfo (Implicit Variables):
6588 Variable AR defaults to `ar', ARFLAGS to `rv', and RM to `rm -f'.
6590 * rule.c (install_default_pattern_rules): Default variables are made
6592 (default_variables): Added "CPP", defined to "$(CC) -E".
6593 (default_suffixes): Added `.S', before `.s'.
6594 (default_suffix_rules): New rule for .S to .s, runs CPP.
6595 All rules that use CPP now include "$(CPPFLAGS)".
6596 make.texinfo (Catalogue of Implicit Rules, Implicit Variables):
6597 Documented above changes.
6599 * commands.c [USG] (sys_siglist): Don't define.
6600 [USG] (init_siglist): New function to initialize sys_siglist.
6602 * make.texinfo (Variables: Reference): Documented `$(foo:PAT=SUB)'
6605 * variable.c (variable_expand): A reference `$(foo:PAT=SUB)' is
6606 equivalent to `$(patsubst PAT,SUB,$(foo))'.
6608 * variable.c (variable_expand): Free the storage for the expansion
6609 of a recursive variable when it is nod longer needed.
6611 * variable.c (variable_expand): When checking for `$($(foo))', use
6612 lindex so as not to search for the second `$' outside the parens.
6614 * make.c (struct stringlist, main, decode_switches): Changed `index'
6617 Sat Dec 24 16:02:32 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6619 * commands.c (wait_for_children [USG]): Handle SIGCLD with SIG_DFL,
6620 rather than SIG_IGN. Ignoring SIGCLD reportedly makes wait return -1.
6622 * arscan.c [USGr3]: Define PORTAR to 1 (as with sun386).
6623 (ar_scan [USGr3]): Remove trailing slashes from member names.
6625 Thu Dec 22 17:54:05 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6627 * make.texinfo (Makefiles: Overriding Makefiles): New node
6628 documenting use of .DEFAULT to have one makefile defer unmakeable
6631 * make.texinfo (Implicit: Using Implicit, Implicit: Last Resort):
6632 Mention empty commands and xref node `Empty Commands'.
6634 Wed Dec 21 20:12:40 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6638 * make.c (struct command_switch, command_switches, et al): New
6639 member `noarg_value', if not nil, ptr to value to use if no arg is
6640 given to a switch that would otherwise require one. The -j option
6641 can now be given w/o an arg, to mean infinite jobs.
6642 * commands.c: If job_slots is zero, infinite jobs.
6644 * read.c (read_all_makefiles, read_makefile): Make makefiles precious.
6646 * make.c (decode_switches): For a positive_int or floating option,
6647 if we moved to the next argument word, but found no argument for the
6648 option, move back to the correct word.
6650 * make.c (decode_switches): If we got any unknown options, die after
6651 processing all arguments.
6653 * GNUmakefile: Moved `include depend' to the end, so the default
6654 goal will be set before then.
6656 * load.c (wait_to_start_job [Unix, UMAX]): Merged into one version
6657 under #ifdef LDAV_BASED. Only loop while we have jobs running.
6658 Sleep for increasing amounts (increase one second per iteration)
6659 before checking the load average (after the first check).
6660 Get the load average from function load_average.
6661 (wait_to_start_job [not LDAV_BASED]): Always return.
6662 (load_average [UMAX]): Fetch load average for Encore UMAX.
6663 (load_average [not NO_LDAV]): Fetch load average from /dev/kmem.
6664 [not NO_LDAV]: Define LDAV_BASED.
6666 Tue Dec 20 18:54:50 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6670 * commands.c (wait_for_children): Take second arg, ERROR. If
6671 nonzero, and there are children, print a message on stderr.
6672 (execute_file_commands, fatal_error_signal): Pass second arg.
6673 * make.c (die), remake.c (update_goal_chain), variable.c
6674 (expand_function: `shell'): Ditto.
6676 Sat Dec 17 01:05:38 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6678 * commands.c (start_job): Call wait_to_start_job before forking.
6680 * load.c (load_average): Converted to wait_to_start_job.
6682 * remote.c: New file for remote execution functions.
6683 (start_remote_job_p): Return nonzero if the next job should be run
6685 (start_remote_job): Start a remote job and return an ID for it.
6686 (remote_status): Get status of dead remote children.
6688 Fri Dec 16 16:51:07 1988 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
6690 * commands.c (start_job): If start_remote_job_p () returns nonzero,
6691 call start_remote_job to start the job rather than fork and exec.
6694 * commands.c (execute_file_commands): Moved load average checking to
6697 * commands.c (child_handler: USG): Record the pid wait returns.
6699 * load.c (UMAX): Added some #include's needed for UMAX.
6701 * read.c (multi_glob), variable.c (string_glob): Ignore a (char **)
6702 -1 return from glob_filename.
6704 * variable.c (variable_expand): Make sure we don't increment past
6705 the end of the string we were passed.
6707 * variable.c (variable_expand): Terminate the expansion.
6709 * file.c (rename_file): If there is already a file under the new
6710 name, set its contents equal to FILE's (ick).
6712 * variable.c (define_automatic_variables): Pass all the args to
6713 define_variable when defining MAKELEVEL!
6715 * commands.c (execute_file_commands): If max_load_average > 0, and
6716 we have children running, don't start up another child until the
6717 load average goes below max_load_average.
6719 * make.c: New variable `max_load_average'.
6720 (struct command_switch, decode_switches, decode_env_switches):
6721 Handle floating-point (double) args.
6722 (command_switches): Added `-l' switch to set `max_load_average'.
6724 * load.c (load_average): New file and function to return a double
6725 that is the current load average (1.00 scale).
6726 * GNUmakefile, oldMakefile: Pass flags in $(LOAD_AVG) for load.c.
6728 Thu Dec 15 15:22:08 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6730 * Makefile: Renamed to oldMakefile.
6731 * GNUmakefile: Make Makefile from oldMakefile and depend.
6733 * read.c (read_all_makefiles): When putting the default makefiles in
6734 the read_makefiles chain so they will be remade, put them in the
6737 * remake.c (update_goal_chain): If MAKEFILES is nonzero, always make
6738 in serial, and return as soon as one goal whose `changed' member is
6739 nonzero is successfully remade.
6741 * commands.c: Don't include <sys/fcntl.h>.
6743 * commands.c (construct_command_argv): Added ` to sh_chars.
6745 * make.h: Don't declare construct_makeflags.
6747 * make.c (main): Set up MAKEFLAGS and MFLAGS and make an environment
6748 both before and after reading the makefiles, so the makefiles can
6749 use them and possible change them, and later children will get the
6751 (construct_makeflags): Replaced with define_makeflags (static void),
6752 which defines the two variables.
6753 * variable.c (define_automatic_variables): Don't define MAKEFLAGS
6756 Mon Dec 12 14:40:31 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
6760 * commands.c (child_handler): Reset the handler to ourselves when
6761 called for USG, since it has no safe signals.
6763 * commands.c: For USG, use an int rather than a `union wait' for
6764 wait calls, and dissect it with bitmasks.
6765 (child_handler): No wait3 system call in USG. Since we can't
6766 protect from hanging, always return immediately if we have no
6767 children we know about and we're not running a `shell' function.
6768 (There is still the danger of hanging waiting for a child that died
6769 without our being notified.)
6771 * remake.c: Include <fcntl.h> instead of <sys/file.h>. What we need
6772 is really in <fcntl.h>, and while BSD <sys/file.h> includes
6773 <fcntl.h>, USG doesn't.
6775 * make.c (main): Figure out the program name before doing anything
6776 which might need it (in a call to error or fatal).
6778 * dir.c, glob.c: Use `struct dirent' and <dirent.h> for USGr3.
6780 * arscan.c (ar_scan): Added missing & before buf (which is an int)
6781 if SARMAG is not defined (SysV).
6783 Fri Dec 9 18:44:13 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
6787 * dir.c (find_directory, dir_file_exists_p): Keep track of how many
6788 directories we have open and don't let it be more than
6789 MAX_OPEN_DIRECTORIES (currently 10).
6791 * variable.c (expand_function: `foreach'): Use expand_argument
6792 rather than variable_expand so each repetition doesn't clobber the
6795 Mon Dec 5 15:58:46 1988 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
6799 * Makefile: Define `install' target.
6801 * GNUmakefile: Don't include GNUmakefile or depend in the
6804 Wed Nov 30 15:53:42 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
6806 * commands.c (execute_file_commands): Don't clobber a null into
6807 random storage if there were no $^ and/or $? words.
6809 * remake.c (check_dep): Set *MUST_MAKE_PTR nonzero if a dependency
6812 * ar.c (ar_member_date, ar_touch): Make sure the modtime of the
6813 archive file itself is known before we fetch or change the modtime
6814 of one of its members.
6816 * read.c (read_makefile): Expand variable and function references
6817 before parsing rules so variable can contain special characters
6818 (colons and semicolons).
6820 Sat Nov 26 11:36:31 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6822 * variable.c (expand_function: `filter', `filter-out'): Fixed so
6823 that filter-out works right.
6825 * variable.c (expand_function: `filter', `filter-out'): Made these
6826 functions use each word of their first argument as a pattern.
6828 Fri Nov 25 10:51:47 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6832 * read.c (record_files): If a target is listed more than once in a
6833 single rule (that defines commands), give a warning message rather
6834 than the counter-intuitive message saying commands were already
6835 defined (in the same place).
6837 * make.c (fatal, error): Made them both take 6 args since there is
6838 at least one error message that need that many. Too bad vfprintf is
6843 * read.c (read_makefile): Moved the construction of the `struct
6844 commands' into record_files. Call record_files before recursing for an
6845 included makefile so the higher-up will determine the default goal.
6846 (record_files): Take arguments COMMANDS, COMMANDS_IDX and
6847 COMMANDS_STARTED and construct a `struct commands.
6849 Thu Nov 24 14:36:33 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6853 * make.c (main): Made it a fatal error if we can't move back to the
6854 directory we started in before re-execing.
6856 * make.c (main): Get the current directory before doing anything
6857 else, so we know it even if we don't need it for the value of
6858 `MAKE', since we might want it when re-execing.
6860 Wed Nov 23 13:34:44 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6864 * read.c (record_files): Eliminate duplicate deps in a chain.
6866 * variable.c (expand_function: `sort'): Pass the right number to
6867 qsort, not one less.
6869 * remake.c (remake_file): Always call notice_finished_file if
6870 FILE->command_state == cs_finished.
6872 * commands.c (execute_file_commands): Call notice_finished_file to
6873 set FILE's status correctly when start_job fails (because it's out
6874 of commands or running under -n).
6876 Fri Nov 18 15:31:12 1988 Roland McGrath (mcgrath at saffron.Berkeley.EDU)
6880 * remake.c (update_file_1): Set the `update_status' of FILE to
6881 nonzero and set FILE's `updated' bit if we have decided to give up
6882 on remaking FILE because of errors in the dependencies.
6884 * rule.c (pattern_search): Debugging messages use `dependency' (vs.
6885 `dependent') properly.
6887 * make.texinfo (Conditionals: Conditional Syntax): Function index
6888 entries for `ifndef' and `ifneq'.
6890 * variable.c (define_automatic_variables): Define `MAKELEVEL' to the
6891 decimal number of the makelevel, since it may be malformed or blank.
6893 * remake.c (remake_file): Call notice_finished_file after touching.
6895 Sat Nov 12 19:29:34 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6899 * GNUmakefile (dist): Pass the `-f' flag to compress.
6901 * vpath.c (build_vpath_lists): Check for VPATHS being nil after
6902 constructing the general VPATH list from the `VPATH' variable.
6904 Fri Nov 11 08:02:26 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6906 * make.c (fatal, error): Made error messages for recursive runs be
6909 Thu Nov 10 16:51:36 1988 Roland McGrath (mcgrath at basil.Berkeley.EDU)
6913 * read.c (read_makefile): Made it eat leading spaces and formfeeds
6914 (but not tabs), like it's documented to.
6916 * read.c (read_makefile): Let included makefiles determine the
6917 default goal, as is done by System V Make.
6919 Tue Nov 1 19:03:08 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6921 * variable.c (new_environ): Don't increment VCNT when a variable is
6924 Fri Oct 28 16:54:15 1988 Roland McGrath (mcgrath at basil.Berkeley.EDU)
6928 * rule.c (convert_to_pattern): Don't use the same storage for a name
6929 in two rules since new_pattern_rule may free this storage when a
6932 * rule.c (new_pattern_rule): Undid useless change I made Oct 25.
6934 Thu Oct 27 19:17:53 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
6938 * GNUmakefile, Makefile: Fixed a typo in a comment.
6939 * Makefile: Removed malloc.o from object file list.
6941 * variable.c: Removed old debugging #define's for xmalloc and
6942 xrealloc so non-ANSI cpp's won't barf.
6944 * make.c (main): Made local array for temp file name static so
6945 compilers that don't do auto aggregate initialization won't barf.
6947 * read.c: Removed static declaration of copy_dep_chain since it is
6950 Tue Oct 25 16:59:30 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
6952 * rule.c (new_pattern_rule): If we threw out the new rule because it
6953 matched an old one and OVERRIDE was zero, don't put the freed
6954 pointer in the chain!
6956 Wed Oct 19 15:07:43 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
6960 * variable.c (expand_function: `sort'): Don't do the sorting and
6961 writing out if there were no words in the first place.
6963 * remake.c (remake_file): Only fail with a "no way to make" message
6964 for a dependency (non-target) file. If we don't know how to remake
6965 a target file, pretend it was successfully remade and is very new.
6967 * remake.c (remake_file): Don't increment `files_remade' for a
6968 non-target file we don't know how to remake.
6970 * read.c (record_files): Don't die with "both : and :: entries" for
6971 a file whose `is_target' flag is not set.
6973 Tue Oct 18 17:24:11 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
6975 * variable.c (expand_function: `patsubst', `subst'): Free the right
6978 * variable.c (expand_function: `subst'): Don't clobber the
6979 pointer to the end of the second arg and then try to use it!!!
6981 Mon Oct 17 16:44:45 1988 Roland McGrath (mcgrath at catnip.Berkeley.EDU)
6983 * variable.c (expand_function: `patsubst'): Don't clobber the
6984 pointer to the end of the second arg and then try to use it!!!
6986 * variable.c (expand_function: `word' function): Made it parse its
6987 second argument correctly.
6989 * ar.c (ar_touch): Return 1 rather than -1 for on errors.
6991 Sat Oct 15 15:12:16 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
6995 * GNUmakefile: Removed explicit rule for make.dvi since the built-in
6996 implicit rule now works.
6998 * rule.c (default_suffix_rules): Fixed .texinfo.dvi rule yet again
6999 so that it really works, now that parens are counted.
7001 * remake.c (update_file_1): Set FILE's `updated' flag after calling
7002 remake_file if it failed or finished immediately.
7004 * remake.c (update_file): Use the `updated' flag rather than the
7005 command state to decide if a file was fully considered, and
7006 therefore might give an "up to date" message.
7008 * variable.c (expand_function): Made all functions that take more
7009 than one argument count parens of the appropriate flavor in their
7010 args and ignore commands nested in parens.
7012 Fri Oct 14 18:35:00 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7014 * read.c (read_all_makefiles): Pass second arg to read_makefile for
7017 Thu Oct 13 16:40:08 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7021 * GNUmakefile: Added an explicit rule for make.dvi since the
7022 built-in .texinfo.dvi implicit rule is screwed up.
7024 * rule.c (default_suffix_rules): Added a comment that the
7025 .texinfo.dvi rule does not work because of an ahem, feature of Make
7026 that at some point will be fixed--er, enhanced to alleviate this
7029 * rule.c (default_suffix_rules): Fixed Texinfo -> DVI rule (again).
7031 * make.texinfo (Commands: Execution): Documented new competing for
7032 standard input among children.
7034 * commands.c (struct child): Added `good_stdin' flag to tell if this
7035 child has the stdin that doesn't point into nirvana.
7036 (good_stdin_used): New variable to tell if any child has the good
7038 (child_handler): Reset `good_stdin_used' if a dead child's
7039 `good_stdin' flag is set.
7040 (start_job): Give the new child the good standard input if
7041 `good_stdin_used' is no set, and set the child's `good_stdin' flag
7044 * rule.c (default_suffix_rules): Changed Texinfo -> DVI rule to work
7047 * read.c (read_all_makefiles): Stop reading default makefiles after
7050 * read.c (read_makefile): Reset `reading_filename' and
7051 `reading_lineno_ptr' after recursing for an included makefile.
7053 * GNUmakefile: New GNU Make-specific makefile that does everything
7054 Makefile does plus distribution stuff, and doesn't contain any hacks
7055 to try to work with Unix make.
7057 * Makefile: Removed distribution stuff.
7059 * make.c (main): Use mktemp to construct the names of temporary
7060 files used for standard input makefiles.
7062 * make.c (main): Don't turn standard input into a broken pipe.
7064 * commands.c (start_job): Keep two extra file descriptors around: a
7065 good standard input, and a bad one that reads from a broken pipe.
7066 On the child side of the fork, if there are other children, give
7067 this one the broken pipe so they won't compete; if this is the only
7068 one, give it the good standard input.
7070 * make.h: Declare notice_finished_file.
7072 * commands.c (execute_file_commands): Use noticed_finished_file
7073 after waiting for the child when there is only one job slot.
7075 * remake.c (notice_finished_file): New function to re-check mtime's
7076 and such things to be done when commands finish.
7077 (update_file_1): Use notice_finished_file.
7079 * commands.c (child_handler, execute_file_commands): Use new
7080 variable `job_slots_used' to record the number of jobs currently
7081 running, rather than diddling with `job_slots'.
7082 (execute_file_commands): Increment `job_slots_used' before calling
7083 start_job and decrement it on failure to avoid race condition.
7084 If there is only one job slot, wait for the child to finish and
7085 return its status so commands are run in linear order, as if there
7086 were no parallelism.
7088 Wed Oct 12 15:59:03 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7090 * remake.c (remake_file): Don't print a "No way to make" message for
7091 targets whose `dontcare' flags are set.
7093 * read.c (read_all_makefiles): Set the `dontcare' flag of the
7094 `struct file' each default makefile added to the chain.
7096 * file.h (struct file): Add `dontcare' member.
7098 * read.c (read_all_makefiles): When no default makefiles are found,
7099 put the names of all those tried in the `read_makefiles' chain so
7100 they will be updated if possible, giving their `struct dep's'
7101 `changed' members the value of 0 so we won't care if they cannot be
7104 * make.texinfo (Makefiles: Remaking Makefiles): Documented that
7105 default makefiles will be remade if not found.
7107 * read.c (read_all_makefiles): If no default makefiles can be found,
7108 go through the list of default names, trying to make one, stopping
7111 * remake.c (remake_file): Set STATUS to 0 after successfully touching.
7113 * dir.c (file_impossible, file_impossible_p): Don't clobber FILENAME
7114 to "" and then try to to a strcmp on it!!!
7116 Mon Oct 10 16:09:18 1988 Roland McGrath (mcgrath at cinnamon.Berkeley.EDU)
7118 * make.c (main): Don't do `dir_load (".")'.
7120 * rule.c (count_implicit_rule_limits), vpath.c
7121 (construct_vpath_list): Test the existence of a given directory by
7122 `dir_file_exists_p (DIR, ".")' and assume that if this returns zero,
7123 it means the directory really does not exist.
7125 * dir.c (struct dirdata): Replaced with `struct directory' for
7126 directories, each containing a chain of `struct dirfiles', one for
7127 each file (real or impossible).
7128 (dir_load): Removed.
7129 (find_directory): New function to find the `struct directory' for a
7130 named directory and return it (possibly creating a new one).
7131 (dir_file_exists_p): Read the directory on the fly if its stream is
7132 still valid (and ever was) if the file we're looking for is not
7133 already in the hash tables.
7134 (file_impossible, file_impossible_p, dir_name, print_dir_data_base):
7135 Use the new directory/file scheme.
7137 * make.texinfo: Miscellaneous editorial changes and clarifiactions.
7139 * commands.c (struct child): Remove `environ' member.
7140 (child_handler, start_job, execute_file_commands): Remove use of
7141 `environ' member and new_environ.
7143 * make.c (main): Call new_environ after reading makefiles.
7145 * variable.h: Declare `new_environ' to return void.
7147 * variable.c (new_environ): Put the environment in `environ' and
7150 Fri Oct 7 15:48:39 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
7154 * Makefile: Don't make the uncompressed tar file.
7156 * variable.c (expand_function: `shell' function): Made it not expect
7157 read to null-terminate the buffer.
7159 * Makefile: Made it use a temporary symlink to . rather than a
7160 temporary directory to make the distribution tar file.
7162 Thu Oct 6 17:52:35 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
7166 * make.texinfo: Fixed a line that got garbaged somehow.
7168 Mon Oct 3 16:14:39 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
7170 * make.c (main): Try to move back to the directory we started in
7171 before re-exec ourself.
7173 * remake.c (update_file_1): A double-colon target with no deps
7174 always needs to be remade.
7176 * remake.c (remake_file): Changed "No way to make" message to say
7177 `target' rather than `file'.
7179 Sun Oct 2 12:50:47 1988 Roland McGrath (mcgrath at catnip.Berkeley.EDU)
7181 * remake.c (update_file_1): Set FILE->update_status to the return
7182 value of remake_file.
7184 * rule.c (convert_to_pattern): Fixed swapped lengths passed to
7185 xmalloc for source/target suffixes.
7187 * make.texinfo: Documented that MAKEFLAGS and MFLAGS are read in
7188 from makefiles. Updated the `Features' section a bit.
7190 * make.c (main): Read switches from MAKEFLAGS and MFLAGS variables
7191 after reading in makefiles.
7193 * make.c (main): Put a line "/tmp/foo:;" rather than ".PHONY:
7194 /tmp/foo" in front of temp files made for stdin makefiles.
7196 * remake.c (update_file): Test the state of the right `struct file'
7197 for double-colon files.
7199 * make.c (main): Put a ".PHONY: /tmp/foo" line in front of temp
7200 files made for stdin makefiles so they won't be remade when we
7201 re-exec. Kludge-o-matic!!
7203 * remake.c (update_goal_chain): Judge files as being finished based
7204 on their `updated' flag, not their state.
7206 * read.c (read_makefile): Don't check for FILENAME being "-".
7207 (read_all_makefiles): Set each element of MAKEFILES to the name put
7208 in READ_MAKEFILES by read_makefile, since read_makefile may free the
7209 storage for the name it is passed, and someone might want to look at
7210 the elements of MAKEFILES again.
7212 * make.c (main): For each `-f' flag with arg `-' (standard input),
7213 read standard input into a temp file and pass the temp file's name
7214 to read_all_makefiles, after making sure it will not be remade.
7216 * make.c (construct_makeflags): Always put out `-j1'.
7218 Sat Oct 1 00:19:59 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7220 * commands.c (execute_file_commands): If commands are nothing but
7221 whitespace, set the state to `cs_finished' before returning 0.
7223 * make.c (decode_switches): Allocate space for args in stringlists
7224 so they can be freed later.
7226 * make.h: Declare `makelevel'.
7228 * variable.c (makelevel): Moved to make.c (and made global).
7230 * make.c (fatal, error): Print the makelevel if it's > 0.
7231 (perror_with_name): Use error rather than calling fprintf directly.
7232 (pfatal_with_name): Use fatal rather than fprintf and die.
7234 * variable.c (new_environ): Don't put default variables (origin
7235 `o_default') into the environment; they just take up space.
7237 * read.c (read_makefile): Don't add FILENAME to the chain of read
7238 makefiles if it's "-" (standard input).
7240 * remake.c (update_goal_chain): Set STATUS correctly when nothing
7241 happens (as well as in all other situations).
7243 * make.c (construct_makeflags): Put a `-' before each switch and
7244 spaces between them.
7248 * commands.c (wait_for_children): Don't check if `children' is nil.
7249 This is the case when waiting for the child of a `shell' function.
7251 * dir.c (dir_load): Don't add a hash-table entry for directory
7252 DIRNAME and filename "" if DIRNAME doesn't exist.
7254 * commands.c (execute_file_commands): Return 0 after start_job
7255 returns 1 (failure) under the -n flag.
7257 * remake.c (remake_file): Set the state to `cs_finished' when not
7258 calling execute_file_commands.
7260 * remake.c (update_goal_chain): Second arg is now MAKEFILES, nonzero
7261 meaning to disable -t, -q, and -n for each target unless the target
7262 was also given on the command-line.
7264 * read.c (read_makefile): Enter the `struct file's for the makefiles
7265 added to the `read_makefiles' `struct dep' chain.
7267 * remake.c (update_goal_chain): Made it not enter the files for the
7268 goals in the chain. It will already have been done.
7270 * rule.c (convert_to_pattern): Null-terminate the names of targets
7271 and deps of the pattern rules properly.
7273 Fri Sep 30 18:56:20 1988 Roland McGrath (mcgrath at nutmeg.Berkeley.EDU)
7275 * make.c (main): Call install_default_pattern_rules.
7277 * make.h: Declare copy_dep_chain.
7279 * read.c (copy_dep_chain): Moved to make.c (and made global).
7281 * make.c (main): Call update_goal_chain to update goals.
7282 Update read makefiles and re-exec self if they change.
7284 * remake.c (update_file): Make this function static.
7285 (update_goal_chain): New function to update a `struct dep' chain of
7286 goals, waiting until they are all finished before returning.
7288 * make.h: Don't declare update_file. Declare update_goal_chain.
7290 * make.c (main): Call snap_deps, etc. that were in read_all_makefiles.
7292 * read.c (find_makefile): Removed this function.
7293 (read_all_makefiles): Don't update makefiles, don't diddle with
7294 pattern rules, don't call snap_deps, etc. Return a `struct dep'
7295 chain of all makefiles read.
7296 (read_makefile): Now takes two args: FILENAME and TYPE, which is 0
7297 for a normal makefile, 1 for MAKEFILES variable or 2 for an included
7298 makefile. Add a `struct dep' containing the name of the makefile
7299 (as it was found in the search path for type 2s), and TYPE in the
7300 `changed' member to the global `read_makefiles' chain.
7302 * make.h, rule.c (displace_pattern_rules,
7303 add_displaced_pattern_rules): Removed these functions.
7305 * read.c (read_makefile): Variable-expand the name of an `include'd
7306 makefile before calling find_makefile on it.
7308 * file.c (snap_deps): If the `struct file' for a `struct dep'
7309 already exists, free the `struct dep's `name' member before setting
7310 it to nil (since this info is in the `struct file').
7312 * read.c (copy_dep_chain): Made it copy each name rather than
7313 leaving multiple `struct dep's with the same pointers.
7315 Thu Sep 29 19:08:13 1988 Roland McGrath (mcgrath at catnip.Berkeley.EDU)
7317 * make.c (decode_switches): Fixed second decode_env_switches call to
7318 use correct length of "MFLAGS" (6, not 5).
7320 * read.c (read_makefile): Don't stop reading when readline returns
7321 zero lines read. Only stop when the stream reaches EOF. This makes
7322 it recognize the last line of a makefile without a newline.
7324 * remake.c (remake_file): If we don't know how to make FILE, set its
7325 command state to `cs_finished'.
7327 * remake.c (update_file): Don't write the "up to date" message if
7328 update_file_1 returned a nonzero status.
7330 Wed Sep 28 16:30:07 1988 Roland McGrath (mcgrath at catnip.Berkeley.EDU)
7332 * commands.c (child_handler): Set the `update_status' member
7333 properly for ignored errors.
7335 * rule.c (convert_to_pattern): Made it not care about if the target
7336 suffix comes before the source suffix in the .SUFFIXES list.
7338 * make.texinfo: Misc editorial changes.
7340 * commands.c (wait_for_children): Return immediately if `children'
7341 is nil (there are no children).
7343 Tue Sep 27 15:33:14 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
7347 * commands.c (struct child): New member `command_ptr' to hold the
7348 current position in the commands. The `commands' member is never
7350 (start_job, child_handler, execute_file_commands): Use new method
7351 for `commands' and `command_ptr' members.
7353 * make.c (decode_env_switches): Skip past an invalid letter (instead
7354 of looping forever).
7356 * commands.c (struct child): Add `environ' member to hold the
7357 environment for this child.
7358 (execute_file_commands): Get a new environment from new_environ and
7359 put in the the new `struct child's `environ' member.
7360 (child_handler): When freeing a child, free its `commands' member, the
7361 elements of its `environ' array and its `environ' member itself.
7362 (start_job): Set `environ' to the child's `environ' member before
7363 exec'ing the command.
7365 * variable.h, variable.c (new_environ): Made it return the new
7366 environment, not putting it in `environ'.
7368 * remake.c (update_file): Don't give a "is up to date" message
7369 unless no files were remade and the state went from `cs_not_started'
7370 to `cs_finished', so repeat calls to finish jobs won't get the message.
7372 Mon Sep 26 16:26:08 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7376 * make.texinfo (Commands: Execution): Documented that children will
7377 be waited for rather than killed.
7379 * commands.c (fatal_error_signal): Wait for children.
7380 (kill_children): Removed this function.
7382 * make.c (main, die): Wait for children to die, don't kill them.
7384 * variable.c (expand_function): Use wait_for_children.
7386 * make.c (main): Use wait_for_children rather than child_handler.
7388 * commands.c (wait_for_children): New function to block waiting for
7389 children, insuring that child_handler is not called recursively.
7390 (execute_file_commands, kill_children): Use wait_for_children.
7392 * commands.c (child_handler): Start up additional commands in a
7393 sequence after an ignored error.
7395 * remake.c (update_file): Don't print "`foo' is up to date" messages
7396 when update_file_1 returns while commands are executing.
7398 * remake.c (update_file_1): Pass the file name to name_mtime, not
7399 the bloody `struct file', dammit!!
7401 * commands.c (child_handler): Print out the "*** ..." error message
7402 when not under -i. (I somehow forgot this.)
7404 * remake.c (update_file_1): Use name_mtime rather than file_mtime to
7405 re-get the mtime of a file whose commands have finished.
7407 * make.c (command_switches, decode_switches, decode_env_switches):
7408 Make all switches that take string args allow them right after the
7411 * commands.c (child_handler): Check for a child being the `shell'
7412 function's command returning and set the global variable for
7413 expand_function to check.
7415 * variable.c (expand_function): For the `shell' function, instead of
7416 waiting for the child shell ourselves, let child_handler do it and
7417 loop around waiting for something to happen.
7419 * make.c (print_version): Made the copyright year static, not dynamic.
7421 * make.h, make.c: Remove construct_argv function.
7423 * make.c (main): Say "no goal target" instead of "no target".
7425 * make.texinfo (Commands: Parallel): Don't send SIGKILL.
7427 * commands.c (kill_children): Don't send SIGKILL to children that
7428 aren't killed by the first signal.
7430 * make.c (main), commands.c (kill_children): Decide between SIGCHLD
7431 and SIGCLD based on whether or not SIGCHLD is defined, not on USG.
7433 * Makefile: Link make with $(LOADLIBES).
7435 * read.c (construct_include_path): Fixed another bad xrealloc call.
7437 * make.c (decode_switches): Fixed an xrealloc call with no first arg.
7439 Sat Sep 24 01:16:21 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
7443 * remake.c (update_file_1): If deps are running, set state to
7444 `cs_deps_running' and return 0. If deps are done, run commands.
7446 * commands.c (child_handler): Made it delete non-precious targets
7447 killed by fatal signals.
7449 * make.texinfo: Documented parallelism.
7451 Fri Sep 23 16:52:27 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7453 * remake.c (update_file_1): Don't return if FILE's state is
7454 `cs_deps_running'. In that case, we need to run through and check
7455 the states of all our dependencies.
7457 * commands.c (execute_file_commands): Decrement `job_slots' after
7458 starting a new job to run file commands.
7460 * commands.c (start_job): Made it set the state to `cs_running'.
7462 * make.c (main): Fixed usage of `g', `lastgoal', and `goals' in the
7465 * commands.c (child_handler): When commands finish, set the
7466 corresponding file's `update_status' and `updated' flags as
7467 appropriate, and reset the modtimes of the file and any `also_make'
7470 * remake.c (remake_file): Don't re-set `last_mtime' and set `updated'.
7472 * commands.c (fatal_error_signal): Don't swallow all the children
7473 with a loop around `wait ((union wait *) 0)'!!!
7475 * make.c (struct command_switch): Added `positive_int' type.
7476 (switches): Added -j (job_slots).
7477 (construct_makeflags, decode_switches, decode_env_switches):
7478 Handle`positive_int'-type switches.
7480 * glob.c (glob_vector): Rename local variable `vector' to `VeCtOr'.
7481 This is said to avoid a conflict with some system's global `vector'
7484 * variable.c (expand_function): Made the `shell' function use
7485 construct_command_argv and do its own child control and piping.
7487 * make.c (main): Turn standard input into a broken pipe after
7488 reading in all makefiles (the last time it will be needed).
7490 * commands.c (struct child): Remove `pipe_fd' member. We don't use
7492 (start_job): Return 0 for success, 1 or failure (rather than void).
7493 Don't use pipes. Don't turn the child's stdin into a broken pipe.
7494 (child_handler): Print "*** Error" messages when necessary.
7495 Die on failed commands when -k was not given.
7496 (execute_file_commands): Check the return of start_job and remove
7497 the child from the chain and return failure if it is nonzero.
7499 * make.c (die): New function to clean up and exit.
7500 (fatal, pfatal_with_name): Use die.
7502 Thu Sep 22 14:27:11 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7504 * commands.c (struct child): Added `commands', `pipe_fd', and
7505 `noerror' members to keep track of info about a command thread.
7506 (start_job): New function to start a job and update the argument
7507 `struct child' to reflect its status.
7508 (execute_file_commands): Merged run_file_commands back in.
7509 Made it use new start_job function.
7511 * rule.c (freerule): Don't free the `struct commands' of the
7512 discarded rule. It may be used in more than one place.
7514 * commands.c (execute_command_line): Made it not try to delete the
7515 possibly partly-made file. The child_handler function will do this.
7516 (fatal_error_signal): Ditto + call kill_children.
7518 * make.h: Declare job_slots.
7520 * make.c (main): Collect goals in a dep chain and run through this
7521 chain waiting for a child, eliminating finished goals, updating all
7522 remaining goals, and quitting if they fail and not -k.
7524 * commands.c (child_handler): If called with SIG < 0, - SIG is the
7525 max number of children to bury.
7527 * commands.c (child_handler): If called with SIG as zero,
7528 block waiting for running children.
7529 (kill_children): Call child_handler with zero rather than SIGCHLD.
7531 * remake.c (update_file_1): Use the `command_state' member of FILE
7532 and its dependencies to determine what commands are running, what to
7533 do, etc. If commands or dep commands are running when we are
7534 called, return success (0). If commands finished since the last
7535 time we were called, return their status.
7537 * commands.h: Declare kill_children.
7539 * commands.c: Define `struct child' to keep track of child
7540 processes, with the chain in `children'.
7541 (child_handler): New function to catch child-termination signals
7542 (SIGCHLD, or SIGCLD for USG), store the returned status in the
7543 appropriate structure, take the now-obsolete `struct child' out of
7544 the chain, and free its storage.
7545 (execute_file_commands): Put all of the stuff invloving running the
7546 commands into new function run_file_commands. Execute_file_commands
7547 now does process management for the commands, while
7548 run_file_commands (which is run in a subprocess) runs the commands.
7549 (kill_children): New function to kill all running children by
7550 sending them signal SIG. If there are any children still living
7551 after they are all sent SIG, they are all sent SIGKILL.
7553 * make.c (main): Catch SIGCHLD (SIGCLD for USG) with child_handler.
7555 * commands.h: Declare child_handler function.
7557 * commands.c (execute_file_commands): Check the `command_state'
7558 member of FILE and return 0 if it is `cs_running' or
7559 `cs_deps_running' and return the stored status if it is `cs_finished'.
7561 * file.h (struct file): Added `command_state' member.
7563 * commands.c (execute_command_line): Add `$' to the list of
7564 characters special to the shell.
7566 Wed Sep 21 15:57:41 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7568 * read.c (read_all_makefiles): Call convert_to_pattern before
7569 recomputing the limits after adding the displaced rules.
7571 * make.c (main): Move calls to snap_deps, convert_to_pattern, and
7572 build_vpath_lists to read_all_makefiles.
7574 * read.c (read_all_makefiles): Install the default pattern rules
7575 before checking to remake the makefiles, displace these rules before
7576 reading in the makefiles, and then add the displaced rules to the
7577 chain after reading in all the makefiles.
7579 * make.c (main): Don't call install_default_pattern_rules or
7580 count_implicit_rule_limits.
7582 * make.h: Declare displace_pattern_rules and
7583 add_displaced_pattern_rules.
7585 * rule.c (displace_pattern_rules, add_displaced_pattern_rules): New
7586 functions to stow the chain and add the stowed chain on the end of
7589 * make.texinfo (Implicit: Search Algorithm): Fixed PREV reference.
7591 * make.c (main): Call construct_include_path right after decoding
7594 * read.c (find_makefile): Use rename_file.
7596 * file.h: Declare rename_file.
7598 * file.c (rename_file): New function to rename a `struct file' and
7599 put it in the correct hash bucket.
7601 * read.c (find_makefile): New function to find and update a makefile.
7602 (read_all_makefilese): Use find_makefile.
7603 (read_makefile): Don't do updating. Removed UPDATEIT arg.
7605 * remake.c (update_file_1): Took out setting the `updated' member to
7606 -1 rather than 1 sometimes.
7608 * make.c (main): Made it print version info before doing anything else.
7610 * remake.c (library_file_mtime, f_mtime): Removed use of last two
7611 arguments to vpath_search.
7613 * rule.c (pattern_search): Removed use of last two arguments
7616 * vpath.c (vpath_search, selective_vpath_search): Removed unused
7617 DIRPREFIX and DPLEN args.
7619 * read.c (read_makefile): Also turn off -n when updating makefiles.
7621 Tue Sep 20 17:01:10 1988 Roland McGrath (mcgrath at pepper.Berkeley.EDU)
7623 * Makefile: Put tags files in the tarfile.
7625 * read.c (read_makefile): Get the modtime of the makefile via a stat
7626 call so that a later file_mtime call won't do VPATH search for it.
7628 * read.c (read_makefile): Don't turn off -t and -q if the makefile
7629 was a command-line target.
7631 * make.c (main): Enter command-line targets as files and set their
7632 `cmd_target' members.
7634 * file.h (struct file): Added `cmd_target' member.
7636 * read.c (read_makefile): Temporarily turn off -t and -q while
7639 * make.c (main): Don't use arg 0 from other_args (which is now
7640 argv[0]; i.e., the program's name).
7642 * read.c (read_makefile): Only return nonzero if commands were
7643 actually run to remake the makefile.
7645 * remake.c (update_file_1): Set FILE->updated to -1 if no commands
7646 were actually run (because no update was done or -t was given).
7648 * make.c (decode_switches): Fixed bug wherein xrealloc was passed
7649 bad args if it tried to expand other_args->list.
7651 * read.c (read_all_makefiles): Made it not look at the `MAKE'
7652 variable, just use argv[0].
7654 Sun Sep 18 17:34:11 1988 Roland McGrath (mcgrath at paris.Berkeley.EDU)
7656 * read.c (rerun_make): New function to re-exec make.
7658 * make.c (construct_makeflags, construct_argv): New functions to
7659 construct the `MAKEFLAGS' variable and to construct an arg list from
7662 * read.c (read_makefile): New arg UPDATEIT, if nonzero, says to
7663 update the makefile as a target before reading it in. When reading
7664 included makefiles, pass this as zero. Now returns nonzero if the
7665 makefile was updated, zero if not.
7666 (read_all_makefiles): Pass a nonzero UPDATEIT arg to read_makefile
7667 for all default and -f makefiles and all makefiles from the
7668 `MAKEFILES' variable. If any of the makefiles has changed, re-exec
7669 self to re-read them.
7671 * remake.c (update_file): Print a "File `foo' up to date'" message
7674 * commands.c (execute_file_commands): Allocate one byte for each of
7675 $^ and $< rather than zero if they are to be empty.
7677 Fri Sep 16 13:59:59 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7681 * make.c (command_switches): Fixed entry for `-o' switch.
7683 * make.texinfo: Renamed -c switch to -C.
7685 * make.c: Renamed -c switch to -C.
7687 * Miscellaneous de-linting.
7689 * read.c (record_files): Made it not free the storage for the name
7690 if it started with `./' and was therefore not quite the same as in
7693 * read.c (record_files): If commands were specified twice, the error
7694 message specifies in what files and at what line numbers.
7696 * make.c (main): If any of the signals we usually fatal on were
7697 ignored by the parent (probably a shell), ignore them.
7699 * make.c (main): Print version info for -v, -p, or -d.
7700 (print_data_base): Don't print version info. It will be done in main.
7702 * variable.c: Increased number of hash buckets to 257.
7704 * file.c: Increased number of hash buckets to 1007.
7706 * rule.c (count_implicit_rule_limits): Moved comptation of
7707 `maxsuffix' to convert_to_pattern, since that function uses
7708 `maxsuffix', and must be called before count_implicit_rule_limits.
7710 * rule.c (pattern_search): If an existent (non-intermediate)
7711 dependendency was found via a terminal rule, set its
7712 `tried_implicit' flag, so it will never have implicit rule search done.
7714 * glob.c: Bug fix to avoid alloca(0).
7716 * arscan.c: USG and Sun386i fixes.
7718 Thu Sep 15 19:40:26 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7720 * make.texinfo: Fixed some typos and spelling errors.
7722 Wed Sep 7 14:20:39 1988 Roland McGrath (mcgrath at helen.Berkeley.EDU)
7724 * make.c (decode_switches): Fixed bug wherein a bad option would
7725 give a useless error message and loop forever.
7727 Tue Sep 6 14:36:02 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7729 * make.texinfo: Documented `shell' function.
7731 * variable.c (expand_function): New function `shell', does
7732 backquote-style command expansion of its arg.
7734 * commands.c (execute_command_line): Second arg OUTBUF, if not nil,
7735 gets filled in with a malloc'd buffer containing the piped stdout of
7737 (execute_file_commands): Use above (pass nil).
7739 Mon Sep 5 17:03:49 1988 Roland McGrath (mcgrath at hecuba.Berkeley.EDU)
7741 * Makefile: Added copyright notice.
7742 Added a comment about defining `NO_MINUS_C_MINUS_O' if necessary.
7746 * rule.c (default_suffix_rules): Don't pass `-o' switches with `-c'
7747 switches if `NO_MINUS_C_MINUS_O' is #define'd.
7749 * make.texinfo: Documented `GNUmakefile'.
7751 * read.c (read_all_makefiles): Made it try default makefile
7752 `GNUmakefile' before others.
7754 * make.texinfo: Added new-style Texinfo header thingies.
7756 Sat Sep 3 18:09:39 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
7760 * make.texinfo (Chained Rules): Added a @cindex about using
7761 .PRECIOUS to preserve intermediate files.
7763 * remake.c (update_file_1): Made it not just return before executing
7766 * rule.c (default_pattern_rules, default_variables): Made it use
7767 `$(AR)' for `ar r' (to put files in archives).
7769 * vpath.c (build_vpath_lists): Made it recursively expand the
7770 `VPATH' variable (by using variable_expand instead of lookup_variable).
7772 * read.c (conditional_line): Made it not swallow whitespace after
7773 the comma in an `ifeq' using the `(a,b)' syntax.
7775 * rule.c (count_implicit_rule_limits): Made it not crash if a
7776 pattern rule dep begins with `/'.
7778 Sun Aug 28 15:51:12 1988 Roland McGrath (mcgrath at homer.Berkeley.EDU)
7780 * make.texinfo: Clarified that the arg to the `origin' function is a
7781 variable *name*, not a reference.
7783 * make.texinfo: Clarified that both -Idir and -I dir are allowed.
7785 Sat Aug 27 13:49:28 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7787 * remake.c (remake_file): Made touching phonies work right.
7789 Wed Aug 24 20:40:48 1988 Roland McGrath (mcgrath at nutmeg.Berkeley.EDU)
7791 * make.texinfo: Removed reference to `RANLIB' variable.
7795 * variables.c (expand_function): Added `origin' function.
7796 * make.texinfo: Documented same.
7798 * read.c (record_files): Made double-colon entries work.
7800 Sat Aug 20 21:09:39 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7802 * make.c (collapse_continuations): Bug fix from RMS.
7804 * rule.c (install_default_pattern_rules): Made it set the
7805 `in_use' flag of the created rules to zero, rather than letting
7806 it be random garbage.
7808 * rule.c (pattern_search): Fixed putting `also make' targets into
7811 * read.c (record_files): Fixed bug which made double-colon entries
7812 make it read off into space.
7814 * make.c (decode_switches): Made it understand `ignored' switches
7815 rather than dumping core.
7817 Sun Aug 14 16:49:00 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7819 * read.c (read_makefile): Made `include' filenames be
7822 * read.c (read_makefile): Fixed an error message.
7824 * read.c (read_makefile): Made it accept ^L's as whitespace.
7825 * make.c (next_token, end_of_token): Ditto.
7827 * vpath.c (vpath_search): Fixed it so that the general VPATH (from
7828 the variable) is always checked, even if a selective VPATH (from a
7829 directive) matched the filename.
7831 Sat Aug 13 14:20:46 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7833 * make.c (decode_switches, main): Made the command switches be
7834 processed from a table of switches, variables, and types. No
7835 functions are passed argc and argv any more. They are passed arrays
7836 of strings they need to process.
7837 * read.c (read_all_makefiles): Made it take an array rather than
7839 (construct_include_path): Ditto.
7841 * make.c (collapse_continuations): Made it work right (I hope).
7843 * make.texinfo: Minor editorial changes.
7845 * read.c (read_makefile): Minor speed improvement by freeing and
7846 then mallocing something rather than reallocing it to avoid the
7849 Thu Aug 11 00:10:43 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7851 * make.texinfo: Fixed some unquoted @'s.
7853 * make.texinfo: Documented multiple-target pattern rules.
7854 Miscellaneous minor editorial changes and corrections.
7856 * make.texinfo (Implicit: Catalogue of Rules): Removed the list of
7857 variables. That's what the next section is for.
7858 (Implicit: Implicit Variables): Made it agree with reality.
7860 Wed Aug 10 00:55:39 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7862 * variable.c (print_variable_data_base): Fixed bug which made -p
7863 dump core. (This was a really idiotic bug.)
7865 * rule.c (pattern_search): Fixed a bug which made it make the
7866 `also_make' member of the file in question nil if the first of
7867 the successful rule's targets was the matching one.
7868 Made it use only as much storage as necessary in the `also_make'
7870 (create_pattern): Made it use only as much storage as necessary in
7871 the `lens' and `suffixes' members of the created rule.
7873 * remake.c (library_file_mtime): Made it `static'.
7875 * file.c: Added a declaration for `errno', which is declared in some
7876 <errno.h>'s, but not all.
7878 * file.h (struct file): Added `also_make' member for multiple-target
7880 * rule.c (pattern_search): Made it put the names of files updated by
7881 the given file's commands in its `also_make' member.
7882 * remake.c (update_file_1): Made it mark the files in a file's
7883 `also_make' member as updated when the file is updated.
7885 * variable.c (try_variable_definition): Fixed a bug which made it
7886 define a variable with the name of the whole definition when there
7887 was no space before the = or :=.
7889 * make.texinfo (Features): Made the changes which were made in RCS
7890 revision 2.7 but somehow lost since then. Added -W.
7892 Tue Aug 9 10:04:50 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7894 * variable.h: Added `o_default' to `enum variable_origin'.
7895 * variable.c (print_variable_data_base): Made it print the origins of
7897 * rule.c (install_default_pattern_rules): Made it define the default
7898 variables with origin `o_default'.
7900 * make.texinfo: Documented -W.
7902 * make.c (decode_switches, main): Added the -W flag to give files a
7903 time-stamp of now, for a `what if' effect when used with -n.
7905 * commands.c (print_commands): Made it say `(built-in)' for commands
7906 that are built into the default ruleset.
7908 * read.c (record_file): Made .SUFFIXES get its deps frontwards (again).
7909 * rule.c (set_default_suffixes, convert_to_pattern): Made it read
7910 .SUFFIXES's deps frontwards, so the converted rules will not be in
7913 * rule.c (new_pattern_rule): Fixed a bug wherein it would keep
7914 searching after it had removed a matching rule and ended up diddling
7917 * rule.c (freerule): Made it take the given rule off the chain.
7918 (new_pattern_rule, count_implicit_rule_limits): Use freerule to
7919 remove rules from the chain.
7921 * vpath.c (construct_vpath_list): Made it return after cleaning out
7922 all previous searchpaths when given a nil DIRPATH arg, so it won't
7923 go into the construction code and dump core dereferencing a nil
7926 * variable.c (patsubst_expand): Fixed a bug which made it not match
7927 correctly and sometimes dump core.
7929 Mon Aug 8 16:35:48 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7931 * rule.c (default_suffix_rules): Made the .texinfo.dvi rule remove
7932 the files used in the comparison to determine whether or not a
7933 second TeX run is necessary.
7935 * make.texinfo: Fixed some overfull TeX hboxes.
7937 * make.texinfo (Implicit: Catalogue of Rules): Fixed a Texinfo error.
7939 * rule.c (create_pattern_rule): Fixed bug wherein index was not
7940 being passed its second arg.
7942 * read.c (getline): Merged back into readline.
7944 * rule.c (default_suffixes, default_suffix_rules,
7945 default_variables): Added .texinfo.info rule.
7946 * make.texinfo (Implicit: Catalogue of Rules): Documented
7947 .texinfo.dvi and .texinfo.info rules.
7949 * make.texinfo (Top): Changed `last updated' date to be correct (for
7950 the last time it was updated, not today). Changed `for version
7951 3.00' since it's not going to be called that.
7953 Sat Aug 6 19:51:10 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7955 * commands.c (print_commands): Added this function to print the
7956 contents of a `struct commands' for -p.
7957 * rule.c (print_rule_data_base): Use above.
7958 * file.c (print_file_data_base): Ditto.
7960 * rule.c (count_implicit_rule_limits, new_pattern_rule,
7961 install_pattern_rule, print_rule_data_base): Made it understand the
7962 changed `struct rule' and act accordingly.
7963 (freerule): Added this function to free all the storage used by a rule.
7965 * rule.c (pattern_search): Made it grok multiple targets of pattern
7966 rules. The matching is done properly, but at present, only the
7967 matching pattern's target is used to give deps and commands.
7969 Fri Aug 5 18:00:29 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7971 * rule.c (struct rule): Changed name, namelen, and patsuffix members
7972 to targets, lens, and suffixes, which are arrays, for multiple targets.
7973 (create_pattern_rule): Now takes first arg TARGETS, a nil-terminated
7974 array of targets, rather than a single target and patsuffix pointer.
7976 * read.c (record_files): If it finds an implicit pattern rule, it
7977 collects all the targets into an array and passes the whole thing to
7978 create_pattern_rule. If there are non-pattern targets, it is a
7981 Tue Aug 2 15:06:38 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
7983 * make.c (readline): Split backslash-newline checking from reading
7984 and buffer-expanding.
7985 (getline): Created to do the reading and buffer-expanding formerly
7988 * rule.c (pattern_search): Made it reject nonterminal match-anything
7989 rules when a specific rule has matched, rather than rejecting
7990 terminal match-anything rules in this case.
7992 * rule.c (convert_to_pattern): Fixed a bug caused when the change to
7993 make it only recognize two-suffix rules whose target suffixes
7994 precede their dependency suffixes which made it work in the opposite
7995 direction (even worse than it started out).
7997 * rule.c (pattern_search): Made it reject nonterminal match-anything
7998 rules as intermediate targets when searching for both real and
7999 intermediate dependencies, rather than only when searching for
8002 Sun Jul 31 00:33:56 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8004 * rule.c (convert_to_pattern): Made it only recognize two-suffix
8005 rules whose target suffix comes before the dependency suffix in the
8008 * variable.c (define_automatic_variables): Made all automatic
8009 variables be defined with origin `o_automatic'.
8011 * variable.h: Added `o_automatic' to `enum variable_origin'
8013 * file.c (remove_intermediates): Made it not print an error message
8014 if the error was that the file does not exist.
8016 * rule.c: Removed `recursive' member from `struct rule'.
8018 * remake.c (library_file_mtime): Made it not use the directory hash
8019 functions, as reading in and hashing /usr/lib and /lib is slow and
8020 most likely unnecessary.
8022 * remake.c (remake_file): Changed message from ``No specification
8023 for making'' to ``No way to make'' so it will be short enough that
8024 most filenames will fit on a line.
8025 Made it look at the `recursive' member of the `struct commands',
8026 rather than of the `struct file' (which no longer has one).
8028 * commands.c (execute_file_commands): Made it look at the
8029 `recursive' member of the `struct commands', rather than of the
8030 `struct file' (which no longer has one).
8032 * file.h: Removed `recursive' member from `struct file'.
8034 * commands.h: Added `recursive' member to `struct commands'.
8036 * dep.h: Removed unused `quotedparen' member from `struct nameseq'
8039 * read.c (dequote): Removed this function.
8040 (multi_glob): Removed reference to `quotedparen' member of
8041 a `struct nameseq' and calls to dequote.
8043 * read.c (record_files): Made it set the stem for $* for all static
8044 pattern rules, not just those with commands given at that time.
8045 Removed check for recursive commands.
8046 Made it check for pairs of .SUFFIXES dependencies to reject as
8047 default goals as well as single ones (that don't start with dots).
8048 (read_makefile): Added checks for recursive commands to set
8049 the `recursive' flag in the `struct commands'.
8051 Sat Jul 30 15:47:23 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8053 * make.c (find_next_token): Made the LENGTHPTR arg optionally nil.
8055 * make.c: Removed `files_made' variable which is defined static in
8056 remake.c and used only there.
8057 (main): Cleaned up somewhat.
8058 (decode_switches): Cleaned up a bit. Made an unknown option be a
8060 (decode_env_switches): Made LEN arg unsigned. Cleaned up.
8061 (print_version): Made it say ``see the source'' rather than ``see
8062 the source file'', since there is more than one.
8064 * file.h: Made `num_intermediates' declared unsigned.
8066 * file.c: Made `num_intermediates' variable unsigned.
8067 (remove_intermediates): Removed unused FORMAT arg.
8068 (enter_file): Made it handle double-colon files properly, adding the
8069 new entry as the old entry's prev pointer.
8071 * dir.c: Re-indented the `struct dir' definition to be right.
8072 (dir_load): Cleaned up slighty.
8073 (file_exists_p): Removed comment saying we could use `access', since
8074 that is a bad idea (except for setuid programs). Cleaned up slightly.
8076 * commands.c: Changed some comments slightly.
8077 (execute_file_commands): Cleaned up a bit. Changed some comments,
8078 added others. Moved freeing of storage for $^ and $? to the same
8079 place as for the other automatic variables.
8080 (execute_command_line): Made `#' trigger a shell.
8081 Added some comments. Cleaned up a bit. Put all the special chars
8082 that trigger shells into an array easily changeable at the top.
8084 * ar.c: Added comments explaining each function.
8085 (ar_scan_1): Merged into ar_member_date.
8086 (ar_member_date): Changed call to ar_scan_1 to the body of that
8088 (ar_member_date_1): Simplified to a ?: expression rather than an
8090 (ar_member_touch): Changed error handling around a bit.
8091 None of these errors are fatal now.
8093 * variable.c (subst_expand): Added a new arg BY_WORD, to do substs
8095 (patsubst_expand): Fixed bug which made calls whose patterns
8096 contained no `%' to not work correctly, by using above.
8097 (variable_expand): Pass extra arg to `subst_expand'.
8099 * variable.c (expand_function): Fixed bug which made `foreach' calls
8100 with one-word lists run off into never-never land.
8102 Fri Jul 29 20:12:36 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8104 * variable.c (expand_function): Made a very minor speed improvement
8105 by avoiding an unnecessary strlen call.
8107 Wed Jul 27 16:01:47 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8109 * rule.c (default_suffixes): Rearranged the list somewhat; added
8110 `.el' and `.elc' to speed things up (especially when building
8111 Emacs), for the same reason `.h' is there.
8113 * read.c (record_files): Changed `lineno' from `long' to
8116 Sun Jul 24 02:15:30 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8118 * variable.c (expand_function): Eliminated use of `wstok'
8119 because it is non-reentrant and unreliable.
8120 Fixed a minor bug which would cause something not to be freed.
8121 * make.c (wstok): Removed `wstok' because it is no longer used.
8123 * variable.c (expand_function): Made `foreach' function put
8124 spaces between output texts like it's supposed to.
8126 Sat Jul 23 17:32:55 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8128 * rule.c (default_suffixes, default_suffix_rules): Added rule
8129 to make %.dvi from %.texinfo.
8131 * dir.c (print_dir_data_base): Made it say a bit more.
8133 Fri Jul 22 23:13:16 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8135 * make.c (print_data_base): Split this function up into one
8137 * variable.c (print_variable_data_base): One of the above.
8138 * rule.c (print_rule_data_base): Ditto.
8139 * file.c (print_file_data_base): Ditto.
8140 * dir.c (print_dir_data_base): Ditto.
8142 * rule.c (install_pattern_rule): Fixed a bug which caused the
8143 terminal and recursive flags to always be zero for rules
8144 entered by this function.
8146 * make.texinfo (Rules: Double-colon): Added a paragraph
8147 explaining the purpose of double-colon rules.
8149 * make.texinfo (Implicit: Catalogue of Rules): Updated to
8150 reflect new C++, TeX, Web, and Texinfo rules. Other slight
8153 * commands.c (execute_file_commands): Fixed a bug wherein
8154 random memory could get written for files with no deps.
8156 Wed Jul 20 19:30:31 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8158 * read.c (readline): Fix bug wherein it would not recognize a
8159 backslash-newline if the buffer filled up and was enlarged
8160 right before reading the newline.
8162 Tue Jul 19 19:55:02 1988 Roland McGrath (mcgrath at chilli.Berkeley.EDU)
8164 * read.c: Added default suffix rules for .cc (using $(C++),
8165 which defaults to `g++', and $(C++FLAGS)), .tex, .dvi, .web
8166 and .cweb (using $(TEX), $(WEAVE), $(TANGLE), $(CWEAVE) and
8169 Sat Jul 16 21:24:28 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8171 * Made error formats use %u rather than %ld for line numbers,
8172 which are now unsigned int's rather than long's.
8174 * read.c (conditional_line): Fixed some bugs caused by use of
8175 unsigned int rather than int in one place.
8177 * read.c (conditional_line): Put the info about active
8178 conditionals in a struct.
8179 (read_makefile): Make a new struct of info about conditionals
8180 for included makefiles and restore the old one after the
8181 included makefile has been read.
8183 * read.c (read_makefile): Don't try to read a makefile with
8184 name "" after giving an error message because an `include'
8185 directive gave no filename.
8187 * read.c (read_makefile): Give an error message for
8188 non-whitespace text after the filename in an `include' directive.
8190 * make.c (error): Take five args, like `fatal'. It managed to
8191 lose with only two. Is there a better way to do this without vfprintf?
8193 * read.c (read_makefile): Commands consisting of only
8194 whitespace are not the same as no commands. I thought I'd
8195 fixed this bug months ago; it seems to have come back.
8197 * make.c (collapse_continuations): All whitespace around a
8198 backslash-newline combination is turned into a single space.
8200 * Added COPYING file and copyright notices to all files.
8202 * make.texinfo (Running: Goals): Fix a typo.
8204 * read.c (do_define): Take an arg for the origin of the
8205 variable being defined.
8206 (read_makefile): Grok `override define'.
8208 * make.texinfo (Variables: Override Directive, Defining):
8209 Document the `override define' combination directive.
8211 * ar.c (ar_member_date): Make a 0 return from `ar_scan' return
8212 (time_t) -1 (nonexistent file), rather than (time_t) 0, which,
8213 when put in the `struct file', makes `file_mtime' try to get
8214 the mtime over and over again.
8216 * variable.c (pattern_matches): Fix a bug that made patterns
8217 not beginning with `%' never match.
8219 Fri Jul 15 21:01:44 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
8221 * Took Make out of RCS.
8223 * Split the monolithic `make.c' into several smaller files.