1 2005-06-25 Paul D. Smith <psmith@gnu.org>
3 * job.c (construct_command_argv_internal): Sanitize handling of
4 backslash/newline pairs according to POSIX: that is, keep the
5 backslash-newline in the command script, but remove a following
6 TAB character, if present. In the fast path, make sure that the
7 behavior matches what the shell would do both inside and outside
8 of quotes. In the slow path, quote the backslash and put a
9 literal newline in the string.
10 Fixes Savannah bug #1332.
11 * doc/make.texi (Execution): Document the new behavior and give
13 * NEWS: Make a note of the new behavior.
15 * make.h [WINDOWS32]: #include <direct.h>.
16 Fixes Savannah bug #13478.
18 * remake.c (name_mtime): If the stat() of a file fails and the -L
19 option was given and the file is a symlink, take the best mtime of
20 the symlink we can get as the mtime of the file and don't fail.
21 Fixes Savannah bug #13280.
23 * read.c (find_char_unquote): Accept a new argument IGNOREVARS.
24 If it's set, then don't stop on STOPCHARs or BLANKs if they're
25 inside a variable reference. Make this function static as it's
27 (eval): Call find_char_unquote() with IGNOREVARS set when we're
28 parsing an unexpanded line looking for semicolons.
29 Fixes Savannah bug #1454.
30 * misc.c (remove_comments): Move this to read.c and make it static
31 as it's only used there. Call find_char_unquote() with new arg.
32 * make.h: Remove prototypes for find_char_unquote() and
33 remove_comments() since they're static now.
35 * main.c (main): If we see MAKE_RESTARTS in the environment, unset
36 its export flag and obtain its value. When we need to re-exec,
37 increment the value and add it into the environment.
38 * doc/make.texi (Special Variables): Document MAKE_RESTARTS.
39 * NEWS: Mention MAKE_RESTARTS.
40 * main.c (always_make_set): New variable. Change the -B option to
42 (main): When checking makefiles, only set always_make_flag if
43 always_make_set is set AND the restarts flag is 0. When building
44 normal targets, set it IFF always_make_set is set.
45 (main): Avoid infinite recursion with -W, too: only set what-if
46 files to NEW before we check makefiles if we've never restarted
47 before. If we have restarted, set what-if files to NEW _after_ we
49 Fixes Savannah bug #7566:
51 2005-06-17 Paul D. Smith <psmith@gnu.org>
53 * default.c: Change VMS implicit rules to use $$$$ instead of $$
54 in the prerequisites list.
56 2005-06-12 Paul D. Smith <psmith@gnu.org>
58 Fix Savannah bug # 1328.
60 * configure.in: Check for atexit().
61 * misc.c (close_stdout): Test stdout to see if writes to it have
62 failed. If so, be sure to exit with a non-0 error code. Based on
65 * main.c (main): Install close_stdout() with atexit().
67 2005-06-10 Paul D. Smith <psmith@gnu.org>
69 VMS build updates from Hartmut Becker <Hartmut.Becker@hp.com>:
71 * vmsjobs.c [VMS]: Updates to compile on VMS: add some missing
72 headers; make vmsWaitForChildren() static; extern vmsify().
73 * job.c [VMS]: Move vmsWaitForChildren() prototype to be global.
74 Don't create child_execute_job() here (it's in vmsjobs.c).
75 * makefile.vms (job.obj) [VMS]: Add vmsjobs.c as a prerequisite.
77 2005-06-09 Paul D. Smith <psmith@gnu.org>
79 * variable.c (push_new_variable_scope): File variables point
80 directly to the global_setlist variable. So, inserting a new
81 scope in front of that has no effect on those variables: they
82 don't go through current_variable_set_list. If we're pushing a
83 scope and the current scope is global, push it "the other way" so
84 that the new setlist is in the global_setlist variable, and
85 next points to a new setlist with the global variable set.
86 (pop_variable_scope): Properly undo a push with the new
88 Fixes Savannah bug #11913.
90 2005-05-31 Boris Kolpackov <boris@kolpackov.net>
92 * job.c (reap_children): Don't die of the command failed but
93 the dontcare flag is set. Fixes Savannah bug #13216.
95 * implicit.c (pattern_search): When creating a target from
96 an implicit rule match, lookup pattern target and set precious
97 flag in a newly created target. Fixes Savannah bug #13218.
99 2005-05-13 Paul D. Smith <psmith@gnu.org>
101 Implement "if... else if... endif" syntax.
103 * read.c (eval): Push all checks for conditional words ("ifeq",
104 "else", etc.) down into the conditional_line() function.
105 (conditional_line): Rework to allow "else if..." clause. New
106 return value -2 for lines which are not conditionals. The
107 ignoring flag can now also be 2, which means "already parsed a
108 true branch". If that value is seen no other branch of this
109 conditional can be considered true. In the else parsing if there
110 is extra text after the else, invoke conditional_line()
111 recursively to see if it's another conditional. If not, it's an
112 error. If so, raise the conditional value to this level instead
113 of creating a new conditional nesting level. Special check for
114 "else" and "endif", which aren't allowed on the "else" line.
115 * doc/make.texi (Conditional Syntax): Document the new syntax.
117 2005-05-09 Paul D. Smith <psmith@gnu.org>
119 * Makefile.am (EXTRA_make_SOURCES): Add vmsjobs.c
120 (MAYBE_W32): Rework how SUBDIRS are handled so that "make dist"
121 recurses to the w32 directory, even on non-Windows systems. Use
122 the method suggested in the automake manual.
123 * configure.in: Add w32/Makefile to AC_CONFIG_FILES.
124 * maintMakefile (gnulib-url): They moved the texinfo.tex files.
126 2005-05-07 Paul D. Smith <psmith@gnu.org>
128 * main.c (die): If we're dying with a fatal error (not that a
129 command has failed), write back any leftover tokens before we go.
131 * job.c (set_child_handler_action_flags): If there are jobs
132 waiting for the load to go down, set an alarm to go off in 1
133 second. This allows us to wake up from a potentially long-lasting
134 read() and start a new job if the load has gone down. Turn it off
136 (job_noop): Dummy signal handler function.
137 (new_job): Invoke it with the new semantics.
139 * docs/make.texi: Document secondary expansion. Various cleanups
142 2005-05-03 Paul D. Smith <psmith@gnu.org>
144 Rename .DEFAULT_TARGET to .DEFAULT_GOAL: in GNU make terminology
145 the targets which are to ultimately be made are called "goals";
146 see the GNU make manual. Also, MAKECMDGOALS, etc.
148 * filedef.h, read.c, main.c: Change .DEFAULT_TARGET to
149 .DEFAULT_GOAL, and default_target_name to default_goal_name.
150 * doc/make.texi (Special Variables): Document .DEFAULT_GOAL.
152 2005-05-02 Paul D. Smith <psmith@gnu.org>
154 * job.c, vmsjobs.c (vmsWaitForChildren, vms_redirect,
155 vms_handle_apos, vmsHandleChildTerm, reEnableAst, astHandler,
156 tryToSetupYAst, child_execute_job) [VMS]: Move VMS-specific
157 functions to vmsjobs.c. #include it into jobs.c.
159 Grant Taylor <gtaylor@picante.com> reports that -j# can lose
160 jobserver tokens. I found that this happens when an exported
161 recursive variable contains a $(shell ...) function reference: in
162 this situation we could "forget" to write back a token.
164 * job.c, job.h: Add variable jobserver_tokens: counts the tokens
165 we have. It's not reliable to depend on the number of children in
166 our linked list so keep a separate count.
167 (new_job): Check jobserver_tokens rather than children &&
168 waiting_jobs. Increment jobserver_tokens when we get one.
169 (free_child): If jobserver_tokens is 0, internal error. If it's
170 >1, write a token back to the jobserver pipe (we don't write a
171 token for the "free" job). Decrement jobserver_tokens.
173 * main.c: Add variable master_job_slots.
174 (main): Set it to hold the number of jobs requested if we're the
175 master process, when using the jobserver.
176 (die): Sanity checks: first test jobserver_tokens to make sure
177 this process isn't holding any tokens we didn't write back.
178 Second, if master_job_slots is set count the tokens left in the
179 jobserver pipe and ensure it's the same as master_job_slots (- 1).
181 2005-04-24 Paul D. Smith <psmith@gnu.org>
183 Grant Taylor <gtaylor@picante.com> reports that -j# in conjunction
184 with -l# can lose jobserver tokens, because waiting jobs are not
185 consulted properly when checking for the "free" token.
187 * job.c (free_child): Count waiting_jobs as having tokens.
188 * job.c (new_job): Ditto. Plus, call start_waiting_jobs() here to
189 handle jobs waiting for the load to drop.
191 2005-04-23 Paul D. Smith <psmith@gnu.org>
193 * main.c (main): Be careful to not core if a variable setting in
194 the environment doesn't contain an '='. This is illegal but can
195 happen in broken setups.
196 Reported by Joerg Schilling <schilling@fokus.fraunhofer.de>.
198 2005-04-12 Paul D. Smith <psmith@gnu.org>
200 The second expansion feature causes significant slowdown. Timing
201 a complex makefile (GCC 4.1) shows a slowdown from .25s to just
202 read the makefile before the feature, to 11+s to do the same
203 operations after the feature. Additionally, memory usage
204 increased drastically. To fix this I added some intelligence that
205 avoids the overhead of the second expansion unless it's required.
207 * dep.h: Add a new boolean field, need_2nd_expansion.
209 * read.c (eval): When creating the struct dep for the target,
210 check if the name contains a "$"; if so set need_2nd_expansion to 1.
211 (record_files): If there's a "%" in a static pattern rule, it gets
212 converted to "$*" so set need_2nd_expansion to 1.
214 * file.c (expand_deps): Rework to be more efficient. Only perform
215 initialize_file_variables(), set_file_variables(), and
216 variable_expand_for_file() if the need_2nd_expansion is set.
218 * implicit.c (pattern_search): Default need_2nd_expansion to 0.
219 (pattern_search): Ditto.
220 * main.c (handle_non_switch_argument): Ditto.
222 * read.c (read_all_makefiles): Ditto.
223 (eval_makefile): Ditto.
225 2005-04-07 Paul D. Smith <psmith@gnu.org>
227 * main.c (main) [WINDOWS32]: Export PATH to sub-shells, not Path.
228 * variable.c (sync_Path_environment): Ditto.
229 Patch by Alessandro Vesely. Fixes Savannah bug #12209.
231 * main.c (main): Define the .FEATURES variable.
232 * NEWS: Announce .FEATURES.
233 * doc/make.texi (Special Variables): Document .FEATURES.
235 * remake.c (check_dep): If a file is .PHONY, update it even if
236 it's marked intermediate. Fixes Savannah bug #12331.
238 2005-03-15 Boris Kolpackov <boris@kolpackov.net>
240 * file.c (expand_deps): Factor out the second expansion and
241 prerequisite line parsing logic from snap_deps().
243 * file.c (snap_deps): Use expand_deps(). Expand and parse
244 prerequisites of the .SUFFIXES special target first. Fixes
247 2005-03-13 Paul D. Smith <psmith@gnu.org>
249 * main.c (main) [MSDOS]: Export SHELL in MSDOS. Requested by Eli
252 2005-03-11 Paul D. Smith <psmith@gnu.org>
254 * signame.c (strsignal): HAVE_DECL_SYS_SIGLIST is 0 when not
255 available, not undefined (from Earnie Boyd).
257 2005-03-10 Boris Kolpackov <boris@kolpackov.net>
259 * implicit.c (pattern_search): Mark an intermediate target as
260 precious if it happened to be a prerequisite of some (other)
261 target. Fixes Savannah bug #12267.
263 2005-03-09 Paul D. Smith <psmith@gnu.org>
265 * read.c (eval_makefile): Add alloca(0).
266 (eval_buffer): Ditto.
268 2005-03-09 Boris Kolpackov <boris@kolpackov.net>
270 * main.c (main): Use o_file instead of o_default when defining
271 the .DEFAULT_TARGET special variable.
272 * read.c (eval): Use define_variable_global() instead of
273 define_variable() when setting new value for the .DEFAULT_TARGET
274 special variable. Fixes Savannah bug #12266.
276 2005-03-04 Boris Kolpackov <boris@kolpackov.net>
278 * imlicit.c (pattern_search): Mark files for which an implicit
279 rule has been found as targets. Fixes Savannah bug #12202.
281 2005-03-04 Paul D. Smith <psmith@gnu.org>
284 * doc/make.texi (Automatic Variables): Document $|.
286 2005-03-03 Boris Kolpackov <boris@kolpackov.net>
288 * read.c (record_files): Instead of substituting % with
289 actual stem value in dependency list replace it with $*.
290 This fixes stem triple expansion bug.
292 * implicit.c (pattern_search): Copy stem to a separate
293 buffer and make it a properly terminated string. Assign
294 this buffer instead of STEM (which is not terminated) to
295 f->stem. Instead of substituting % with actual stem value
296 in dependency list replace it with $*. This fixes stem
297 triple expansion bug.
299 2005-03-01 Paul D. Smith <psmith@gnu.org>
301 * commands.c (fatal_error_signal) [WINDOWS32]: Don't call kill()
302 on Windows, as it takes a handle not a pid. Just exit.
303 Fix from patch #3679, provided by Alessandro Vesely.
305 * configure.in: Update check for sys_siglist[] from autoconf manual.
306 * signame.c (strsignal): Update to use the new autoconf macro.
308 2005-03-01 Boris Kolpackov <boris@kolpackov.net>
310 * read.c (record_files): Add a check for the list of prerequisites
311 of a static pattern rule being empty. Fixes Savannah bug #12180.
313 2005-02-28 Paul D. Smith <psmith@gnu.org>
315 * doc/make.texi (Text Functions): Update docs to allow the end
316 ordinal for $(wordlist ...) to be 0.
317 * function.c (func_wordlist): Fail if the start ordinal for
318 $(wordlist ...) is <1. Matches documentation.
319 Resolves Savannah support request #103195.
321 * remake.c (update_goal_chain): Fix logic for stopping in -q:
322 previously we were stopping when !-q, exactly the opposite. This
323 has been wrong since version 1.34, in 1994!
324 (update_file): If we got an error don't break out to run more
325 double-colon rules: just return immediately.
326 Fixes Savannah bug #7144.
328 2005-02-27 Paul D. Smith <psmith@gnu.org>
330 * misc.c (end_of_token): Make argument const.
331 * make.h: Update prototype.
333 * function.c (abspath, func_realpath, func_abspath): Use
334 PATH_VAR() and GET_PATH_MAX instead of PATH_MAX.
335 * dir.c (downcase): Use PATH_VAR() instead of PATH_MAX.
336 * read.c (record_files): Ditto.
337 * variable.c (do_variable_definition): Ditto.
339 * function.c (func_error): Create a new function $(info ...) that
340 simply prints the message to stdout with no extras.
341 (function_table_init): Add new function to the table.
342 * NEWS: Add $(info ...) reference.
343 * doc/make.texi (Make Control Functions): Document it.
345 New feature: if the system supports symbolic links, and the user
346 provides the -L/--check-symlink-time flag, then use the latest
347 mtime between the symlink(s) and the target file.
349 * configure.in (MAKE_SYMLINKS): Check for lstat() and
350 readlink(). If both are available, define MAKE_SYMLINKS.
351 * main.c: New variable: check_symlink_flag.
352 (usage): Add a line for -L/--check-symlink-times to the help string.
353 (switches): Add -L/--check-symlink-times command line argument.
354 (main): If MAKE_SYMLINKS is not defined but the user specified -L,
355 print a warning and disable it again.
356 * make.h: Declare check_symlink_flag.
357 * remake.c (name_mtime): If MAKE_SYMLINKS and check_symlink_flag,
358 if the file is a symlink then check each link in the chain and
359 choose the NEWEST mtime we find as the mtime for the file. The
360 newest mtime might be the file itself!
361 * NEWS: Add information about this new feature.
362 * doc/make.texi (Options Summary): Add -L/--check-symlink-times docs.
364 Avoid core dumps described in Savannah bug # 12124:
366 * file.c: New variable snapped_deps remember whether we've run
369 * filedef.h: Extern it.
370 * read.c (record_files): Check snapped_deps; if it's set then
371 we're trying to eval a new target/prerequisite relationship from
372 within a command script, which we don't support. Fatal.
374 2005-02-28 Boris Kolpackov <boris@kolpackov.net>
376 Implementation of the .DEFAULT_TARGET special variable.
378 * read.c (eval): If necessary, update default_target_name when
380 * read.c (record_files): Update default_target_file if
381 default_target_name has changed.
382 * main.c (default_target_name): Define.
383 * main.c (main): Enter .DEFAULT_TARGET as make variable. If
384 default_target_name is set use default_target_file as a root
386 * filedef.h (default_target_name): Declare.
387 * dep.h (free_dep_chain):
388 * misc.c (free_dep_chain): Change to operate on struct nameseq
389 and change name to free_ns_chain.
390 * file.c (snap_deps): Update to use free_ns_chain.
392 2005-02-27 Boris Kolpackov <boris@kolpackov.net>
394 Implementation of the second expansion in explicit rules,
395 static pattern rules and implicit rules.
397 * read.c (eval): Refrain from chopping up rule's dependencies.
398 Store them in a struct dep as a single dependency line. Remove
399 the code that implements SySV-style automatic variables.
401 * read.c (record_files): Adjust the code that handles static
402 pattern rules to expand all percents instead of only the first
403 one. Reverse the order in which dependencies are stored so that
404 when the second expansion reverses them again they appear in
405 the makefile order (with some exceptions, see comments in
406 the code). Remove the code that implements SySV-style automatic
409 * file.c (snap_deps): Implement the second expansion and chopping
410 of dependency lines for explicit rules.
412 * implicit.c (struct idep): Define an auxiliary data type to hold
413 implicit rule's dependencies after stem substitution and
416 * implicit.c (free_idep_chain): Implement.
418 * implicit.c (get_next_word): Implement helper function for
419 parsing implicit rule's dependency lines into words taking
420 into account variable expansion requests. Used in the stem
423 * implicit.c (pattern_search): Implement the second expansion
424 for implicit rules. Also fixes bug #12091.
426 * commands.h (set_file_variables): Declare.
427 * commands.c (set_file_variables): Remove static specifier.
429 * dep.h (free_dep_chain): Declare.
430 * misc.c (free_dep_chain): Implement.
432 * variable.h (variable_expand_for_file): Declare.
433 * expand.c (variable_expand_for_file): Remove static specifier.
435 * make.h (strip_whitespace): Declare.
436 * function.c (strip_whitespace): Remove static specifier.
438 2005-02-26 Paul D. Smith <psmith@gnu.org>
440 * main.c (main): Check for ferror() when reading makefiles from stdin.
441 Apparently some shells in Windows don't close pipes properly and
444 2005-02-24 Jonathan Grant <jg@jguk.org>
446 * configure.in: Add MinGW configuration options, and extra w32 code
448 * Makefile.am: Add MinGW configuration options, and extra w32 code
450 * main.c: Determine correct program string (after last \ without .exe).
451 * subproc/sub_proc.c: `GetExitCodeProcess' from incompatible pointer
453 * w32/Makefile.am: Import to build win32 lib of sub_proc etc.
454 * subproc/w32err.c: MSVC thread directive not applied to MinGW builds.
455 * tests/run_make_tests.pl, tests/test_driver.pl: MSYS testing
458 2004-04-16 Dmitry V. Levin <ldv@altlinux.org>
460 * function.c (func_shell): When initializing error_prefix, check
461 that reading file name is not null. This fixes long-standing
462 segfault in cases like "make 'a1=$(shell :)' 'a2:=$(a1)'".
464 2005-02-09 Paul D. Smith <psmith@gnu.org>
466 * maintMakefile: Update the CVS download URL to simplify them.
467 Also, the ftp://ftp.gnu.org/GNUinfo site was removed so I'm
468 downloading the .texi files from Savannah now.
470 Fixed these issues reported by Markus Mauhart <qwe123@chello.at>:
472 * main.c (handle_non_switch_argument): Only add variables to
473 command_variables if they're not already there: duplicate settings
474 waste space and can be confusing to read.
476 * w32/include/sub_proc.h: Remove WINDOWS32. It's not needed since
477 this header is never included by non-WINDOWS32 code, and it
478 requires <config.h> to define which isn't always included first.
480 * dir.c (read_dirstream) [MINGW]: Use proper macro names when
481 testing MINGW32 versions.
483 * main.c (log_working_directory): flush stdout to be sure the WD
484 change is printed before any stderr messages show up.
486 2005-02-01 Paul D. Smith <psmith@gnu.org>
488 * maintMakefile (po_repo): Update the GNU translation site URL.
490 2004-12-01 Paul D. Smith <psmith@gnu.org>
492 * main.c (main): Change char* env_shell to struct variable shell_var.
493 * variable.c (target_environment): Use new shell_var.
495 2004-11-30 Paul D. Smith <psmith@gnu.org>
497 * configure.in: The old way we avoided creating build.sh from
498 build.sh.in before build.sh.in exists doesn't work anymore; we
499 have to use raw M4 (thanks to Andreas Schwab <schwab@suse.de> for
500 the help!). This also keeps automake from complaining.
501 * Makefile.am (README): Add a dummy target so automake won't
502 complain that this file doesn't exist when we checkout from CVS.
503 * maintMakefile (.dep_segment): Rewrite this rule since newer
504 versions of automake don't provide DEP_FILES.
506 2004-11-30 Boris Kolpackov <boris@kolpackov.net>
508 Implementation of `realpath' and `abspath' built-in functions.
510 * configure.in: Check for realpath.
511 * function.c (abspath): Return an absolute file name that does
512 not contain any `.' or `..' components, nor repeated `/'.
513 * function.c (func_abspath): For each name call abspath.
514 * function.c (func_realpath): For each name call realpath
515 from libc or delegate to abspath if realpath is not available.
516 * doc/make.texi (Functions for File Names): Document new functions.
517 * doc/make.texi (Quick Reference): Ditto.
519 2004-11-28 Paul D. Smith <psmith@gnu.org>
521 * main.c (main) [WINDOWS32]: Remove any trailing slashes from -C
522 arguments. Fixes bug #10252.
524 Fix for bug #1276: Handle SHELL according to POSIX requirements.
526 * main.c (main): Set SHELL to v_noexport by default. Remember the
527 original environment setting of SHELL in the env_shell variable.
528 * main.h: Export new env_shell variable.
529 * variable.c (target_environment): If we find a v_noexport
530 variable for SHELL, add a SHELL variable with the env_shell value.
531 * doc/make.texi (Quick Reference): Document the POSIX behavior.
532 * doc/make.texi (Variables/Recursion): Ditto.
534 2004-11-28 Paul D. Smith <psmith@gnu.org>
536 * main.c (find_and_set_default_shell) [WINDOWS32]: check for
537 equality of "cmd"/"cmd.exe", not inequality. Fixes bug #11155.
538 Patch by Alessandro Vesely.
540 2004-11-12 Paul D. Smith <psmith@gnu.org>
542 * job.c (child_execute_job) [VMS]: Don't treat "#" as a comment on
543 the command line if it's inside a string.
544 Patch by: Hartmut Becker <Hartmut.Becker@hp.com>
546 2004-10-21 Boris Kolpackov <boris@kolpackov.net>
548 * function.c (func_lastword): New function: return last word
549 from the list of words.
550 * doc/make.texi: Document $(lastword ). Fix broken links in
551 Quick Reference section.
553 2004-10-06 Paul D. Smith <psmith@gnu.org>
555 Apply patch from Alessandro Vesely, provided with bug # 9748.
556 Fix use of tmpnam() to work with Borland C.
558 * job.c (construct_command_argv_internal) [WINDOWS32]: Remove
559 construction of a temporary filename, and call new function
560 create_batch_filename().
561 (create_batch_filename) [WINDOWS32]: New function to create a
564 2004-10-05 Boris Kolpackov <boris@kolpackov.net>
566 * read.c (record_target_var): Expand simple pattern-specific
568 * variable.c (initialize_file_variables): Do not expand simple
569 pattern-specific variable.
571 2004-09-28 Boris Kolpackov <boris@kolpackov.net>
573 * remake.c (update_file_1): When rebuilding makefiles inherit
574 dontcare flag from a target that triggered update.
576 2004-09-27 Boris Kolpackov <boris@kolpackov.net>
578 * variable.c (initialize_file_variables): Mark pattern-specific
579 variable as a per-target and copy export status.
581 2004-09-21 Boris Kolpackov <boris@kolpackov.net>
583 * file.c (snap_deps): Mark .PHONY prerequisites as targets.
585 * implicit.c (pattern_search): When considering an implicit rule's
586 prerequisite check that it is actually a target rather then
587 just an entry in the file hashtable.
589 2004-09-21 Paul D. Smith <psmith@gnu.org>
591 * read.c (readstring): Fix some logic errors in backslash handling.
592 (eval): Remove some unnecessary processing in buffer handling.
593 (record_target_var): Assert that parse_variable_definition() succeeded.
594 Reported by: Markus Mauhart <qwe123@chello.at>.
596 * misc.c: Removed the sindex() function. All instances of this
597 function were trivially replaceable by the standard strstr()
598 function, and that function will always have better (or certainly
599 no worse) performance than the very simple-minded algorithm
600 sindex() used. This can matter with complex makefiles.
601 * make.h: Remove the prototype for sindex().
602 * function.c (subst_expand): Convert sindex() call to strstr().
603 This means we no longer need to track the TLEN value so remove that.
604 (func_findstring): Convert sindex() to strstr().
605 * commands.c (chop_commands): Convert sindex() calls to strstr().
606 Suggested by: Markus Mauhart <qwe123@chello.at>.
608 * main.c (find_and_set_default_shell) [WINDOWS32]: Implement the
609 idea behind Savannah Patch #3144 from david.baird@homemail.com.
610 If SHELL is set to CMD.EXE then assume it's batch-mode and
611 non-unixy. I wrote the code differently from the patch, though,
612 to make it safer. This also resolves bug #9174.
614 2004-09-20 Paul D. Smith <psmith@gnu.org>
616 * expand.c (variable_expand_string): Modify to invoke
617 patsubst_expand() instead of subst_expand(); the latter didn't
618 handle suffix patterns correctly.
619 * function.c (subst_expand): Remove the SUFFIX_ONLY parameter; it
620 was used only from variable_expand_string() and is no longer used
622 (func_subst): Ditto, on call to subst_expand().
623 (patsubst_expand): Require the percent pointers to point to the
624 character after the %, not to the % itself.
625 * read.c (record_files): New call criteria for patsubst_expand().
626 * variable.h: Remove SUFFIX_ONLY from subst_expand() prototype.
627 This is to fix a bug reported by Markus Mauhart <qwe123@chello.at>.
629 2004-09-19 Paul D. Smith <psmith@gnu.org>
631 * function.c (subst_expand): Fix a check in by_word: look for a
632 previous blank if we're beyond the beginning of the string, not
633 the beginning of the word.
634 Bugs reported by Markus Mauhart <qwe123@chello.at>.
636 2004-05-16 Paul D. Smith <psmith@gnu.org>
638 * remake.c (update_goal_chain): Change the argument specifying
639 whether we're rebuilding makefiles to be a global variable,
640 REBUILDING_MAKEFILES.
641 (complain): Extract the code that complains about no rules to make
642 a target into a separate function.
643 (update_file_1): If we tried to rebuild a file during the makefile
644 rebuild phase and it was dontcare, then no message was printed.
645 If we then try to build the same file during the normal build,
646 print a message this time.
647 (remake_file): Don't complain about un-remake-able files when
648 we're rebuilding makefiles.
650 2004-05-11 Paul D. Smith <psmith@gnu.org>
652 * job.c (construct_command_argv_internal): OS/2 patches from
653 Andreas Buening <andreas.buening@nexgo.de>.
655 2004-05-10 Paul D. Smith <psmith@gnu.org>
657 * remake.c (update_file): Don't walk the double-colon chain unless
658 this is a double-colon rule. Fix suggested by Boris Kolpackov
659 <boris@kolpackov.net>.
661 * makefile.vms (CFLAGS): Remove glob/globfree (see readme.vms docs)
662 * readme.vms: New section describing OpenVMS support and issues.
663 * default.c (default_variables): Add support for IA64.
664 * job.c (tryToSetupYAst) [VMS]: On VMS running make in batch mode
665 without some privilege aborts make with the error
666 %SYSTEM-F-NOPRIV. It happens when setting up a handler for
667 pressing Ctrl+Y and the input device is no terminal. The change
668 catches this error and just continues.
670 Patches by Hartmut Becker <Hartmut.Becker@hp.com>
672 2004-04-25 Paul D. Smith <psmith@gnu.org>
674 * commands.c (set_file_variables): Set $< properly in the face of
675 order-only prerequisites.
676 Patch from Boris Kolpackov <boris@kolpackov.net>
678 2004-04-21 Bob Byrnes <byrnes@curl.com>
680 * main.c (main): Notice failures to remake makefiles.
682 2004-03-28 Paul D. Smith <psmith@gnu.org>
684 Patches for Acorn RISC OS by Peter Naulls <peter@chocky.org>
686 * job.c: No default shell for RISC OS.
687 (load_too_high): Hard-code the return to 1.
688 (construct_command_argv_internal): No sh_chars or sh_cmds.
689 * getloadavg.c: Don't set LOAD_AVE_TYPE on RISC OS.
691 2004-03-20 Paul D. Smith <psmith@gnu.org>
693 * variable.c (do_variable_definition): Don't append from the
694 global set if a previous non-appending target-specific variable
695 definition exists. Reported by Oliver Schmidt <oschmidt@gmx.net>
698 * expand.c (reference_variable): Don't give up on variables with
699 no value that have the target-specific append flag set: they might
700 have a value after all. Reported by Oliver Schmidt
701 <oschmidt@gmx.net> (with fix) and also by Maksim A. Nikulin
702 <nikulin@dx1cmd.inp.nsk.su>.
704 * rule.c (count_implicit_rule_limits): Don't delete patterns which
705 refer to absolute pathnames in directories that don't exist: some
706 portion of the makefile could create those directories before we
707 match the pattern. Fixes bugs #775 and #108.
709 Fixes from Jonathan R. Grant <jg-make@jguk.org>:
711 * main.c (main): Free makefile_mtimes if we have any.
712 * README.W32.template: Update documentation for the current status
713 of the MS-Windows port.
714 * NMakefile.template (MAKE): Add "MAKE = nmake". A conflicting
715 environment variable is sometimes already defined which causes the
717 * main.c (debug_signal_handler): Only define this function if
718 SIGUSR1 is available.
720 Fixes for OS/2 from Andreas Beuning <andreas.buening@nexgo.de>:
722 * configure.in [OS/2]: Relocate setting of HAVE_SA_RESTART for OS/2.
723 * README.OS2.template: Documentation updates.
724 * build.template: Add LIBINTL into LOADLIBES. Add $CFLAGS to the
725 link line for safety.
726 * maintMakefile (build.sh.in): Remove an extraneous ")".
727 * job.c (child_execute_job): Close saved FDs.
728 * job.c (exec_command) [OS/2]: exec_command(): If the command
729 can't be exec'ed and if the shell is not Unix-sh, then try again
730 with argv = { "cmd", "/c", ... }. Normally, this code is never
731 reached for the cmd shell unless the command really doesn't exist.
732 (construct_command_argv_internal) [OS/2]: The code for cmd
733 handling now uses new_argv = { "cmd", "/c", "original line", NULL}.
734 The CMD builtin commands are case insensitive so use strcasecmp().
736 2004-03-19 Paul D. Smith <psmith@gnu.org>
738 * read.c (do_define): Re-order line counter increment so the count
739 is accurate (we were losing one line per define). Reported by
740 Dave Yost <Dave@Yost.com>.
742 2004-03-06 Paul D. Smith <psmith@gnu.org>
744 * configure.in (HAVE_ANSI_COMPILER): Define if we have an ANSI/ISO
746 * make.h: Convert uses of __STDC__ to HAVE_ANSI_COMPILER.
747 * misc.c (message,error,fatal): Ditto.
748 * configh.dos.template: Define HAVE_ANSI_COMPILER.
749 * config.h.W32.template: Ditto.
750 * config.h-vms.template: Ditto.
751 * config.ami.template: Ditto.
753 2004-03-04 Paul D. Smith <psmith@gnu.org>
755 * README.template: Add a note about broken /bin/sh on SunOS
756 4.1.3_U1 & 4.1.4. Fix up Savannah links.
758 * misc.c (message, error, fatal): Don't use "..." if we're using
759 varargs. ansi2knr should handle this but it doesn't work: it
760 translates "..." to va_dcl etc. but _AFTER_ the preprocessor is
761 done. On many systems (SunOS for example) va_dcl is a #define.
762 So, force the use of the non-"..." version on pre-ANSI compilers.
764 * maintMakefile (sign-dist): Create some rules to help automate
765 the new GNU ftp upload method.
767 2004-02-24 Paul D. Smith <psmith@gnu.org>
769 * config.h.W32.template: Add HAVE_STDARG_H
770 * config.h-vms.template: Ditto.
771 * config.ami.template: Ditto.
773 2004-02-23 Jonathan Grant <jg-make@jguk.org>
775 * README.W32.template: Add a notation about -j with BATCH_MODE_ONLY.
776 * build_w32.bat: Remove extra "+".
778 2004-02-23 Paul D. Smith <psmith@gnu.org>
780 * make.h: Create an UNUSED macro to mark unused parameters.
781 * (many): Clean up warnings by applying UNUSED, fixing
782 signed/unsigned incompatibilities, etc.
784 * acinclude.m4 (AC_STRUCT_ST_MTIM_NSEC): Add quoting to silence
786 * filedef.h: Name the command_state enumeration.
787 * file.c (set_command_state): Use the enumeration in the function
790 * configure.in: Explicitly set SET_MAKE to empty, to disable
791 MAKE=make even when no make already exists. Fix bug #3823.
793 2004-02-22 Paul D. Smith <psmith@gnu.org>
795 * maintMakefile: Perl script to clean up all non-CVS files. Use
796 it on all the subdirectories for the cvs-clean target.
798 * main.c (decode_switches): Require non-empty strings for all our
799 string command-line options. Fixes Debian bug # 164165.
801 * configure.in: Check for stdarg.h and varargs.h.
802 * make.h (USE_VARIADIC): Set this if we can use variadic functions
803 for printing messages.
804 * misc.c: Check USE_VARIADIC instead of (obsolete) HAVE_STDVARARGS.
809 A number of patches for OS/2 support from Andreas Buening
810 <andreas.buening@nexgo.de>:
812 * job.c (child_handler) [OS/2]: Allow this on OS/2 but we have to
813 disable the SIGCHLD handler.
814 (reap_children) [OS/2]: Remove special handling of job_rfd.
815 (set_child_handler_action_flags) [OS/2]: Use this function in OS/2.
816 (new_job) [OS/2]: Disable the SIGCHLD handler on OS/2.
817 * main.c (main) [OS/2]: Special handling for paths in OS/2.
818 * configure.in [OS/2]: Force SA_RESTART for OS/2.
819 * Makefile.am (check-regression): Use $(EXEEXT) for Windows-type
822 2004-02-21 Paul D. Smith <psmith@gnu.org>
824 * w32/subproc/sub_proc.c (process_easy) [W32]: Christoph Schulz
825 <mail@kristov.de> reports that if process_begin() fails we don't
826 handle the error condition correctly in all cases.
827 * w32/subproc/w32err.c (map_windows32_error_to_string): Make sure
828 to have a newline on the message.
830 * job.c (construct_command_argv_internal): Add "test" to UNIX
831 sh_cmds[]. Fixes Savannah bug # 7606.
833 2004-02-04 Paul D. Smith <psmith@gnu.org>
835 * job.c (vms_handle_apos) [VMS]: Fix various string handling
836 situations in VMS DCL. Fixes Savannah bug #5533. Fix provided by
837 Hartmut Becker <Hartmut.Becker@hp.com>.
839 2004-01-21 Paul D. Smith <psmith@gnu.org>
841 * job.c (load_too_high): Implement an algorithm to control the
842 "thundering herd" problem when using -l to control job creation
843 via the load average. The system only recomputes the load once a
844 second but we can start many jobs in a second. To solve this we
845 keep track of the number of jobs started in the last second and
846 apply a weight to try to guess what a correct load would be.
847 The algorithm was provided by Thomas Riedl <thomas.riedl@siemens.com>.
848 Also fixes bug #4693.
849 (reap_children): Decrease the job count for this second.
850 (start_job_command): Increase the job count for this second.
852 * read.c (conditional_line): Expand the text after ifn?def before
853 checking to see if it's a single word. Fixes bug #7257.
855 2004-01-09 Paul D. Smith <psmith@gnu.org>
857 * file.c (print_file): Recurse to print all targets in
858 double-colon rules. Fixes bug #4518, reported (with patch) by
859 Andrew Chatham <chatham@google.com>.
861 2004-01-07 Paul D. Smith <psmith@gnu.org>
863 * acinclude.m4: Remove make_FUNC_SETVBUF_REVERSED.
864 * configure.in: Change make_FUNC_SETVBUF_REVERSED to
865 AC_FUNC_SETVBUF_REVERSED.
867 * doc/make.texi (Target-specific): Fix Savannah bug #1772.
868 (MAKE Variable): Fix Savannah bug #4898.
870 * job.c (construct_command_argv_internal): Add "!" to the list of
871 shell escape chars. POSIX sh allows it to appear before a
872 command, to negate the exit code. Fixes bug #6404.
874 * implicit.c (pattern_search): When matching an implicit rule,
875 remember which dependencies have the ignore_mtime flag set.
876 Original fix provided in Savannah patch #2349, by Benoit
877 Poulot-Cazajous <Benoit.Poulot-Cazajous@jaluna.com>.
879 2003-11-22 Paul D. Smith <psmith@gnu.org>
881 * README.W32.template (Outputs): Clarification on -j with
882 BATCH_MODE_ONLY_SEHLL suggested by Jonathan R. Grant
885 2003-11-02 Paul D. Smith <psmith@gnu.org>
887 * function.c (func_if): Strip all the trailing whitespace from the
888 condition, then don't expand it. Fixed bug # 5798.
890 * expand.c (recursively_expand_for_file): If we're expanding a
891 variable with no file context, then use the variable's context.
894 2003-10-21 Paul D. Smith <psmith@gnu.org>
896 * main.c (log_working_directory): Add newlines to printf()s.
898 * README.cvs: Add a note to ignore warnings during autoreconf.
900 * maintMakefile (po_repo): Set a new URL for PO file updates.
901 (get-config/config.guess get-config/config.sub): Get these files
902 from the Savannah config project instead of ftp.gnu.org.
904 2003-10-05 Paul Eggert <eggert@twinsun.com>
906 * main.c (main): Avoid potential subscript error if environ has
909 2003-08-22 Paul D. Smith <psmith@gnu.org>
911 * misc.c (xmalloc, xrealloc): Add one to 0 sizes, to cater to
912 systems which don't yet implement the C89 standard :-/.
914 2003-07-18 Paul D. Smith <psmith@gnu.org>
916 * dir.c (directory_contents_hash_1, directory_contents_hash_1)
917 [WINDOWS32]: Initialize hash.
919 2003-06-19 Earnie Boyd <earnie@uses.sf.net>
921 * dir.c (read_dirstream): Provide a workaround for broken versions of
922 the MinGW dirent structure.
924 2003-05-30 Earnie Boyd <earnie@users.sf.net>
926 * w32/include/dirent.h: Add __MINGW32__ filter.
928 2003-05-30 Earnie Boyd <earnie@users.sf.net>
930 * make.h: Add global declaration of *make_host.
931 * main.c (print_usage): Remove local declaration of *make_host.
932 (print_version): Display "This program built for ..." after Copyright
935 2003-05-30 Earnie Boyd <earnie@users.sf.net>
937 * doc/make.texi: Change "ifinfo" to "ifnottex" as suggested by the
938 execution of "makeinfo --html make.texi".
940 2003-04-30 Paul D. Smith <psmith@gnu.org>
942 * build.template: Make some changes to maybe allow this script to
943 work on DOS/Windows/OS2 systems. Suggested by Andreas Buening.
945 * README.OS2.template: New file for OS/2 support. Original
946 contributed by Andreas Buening.
947 * configure.in: Invoke new pds_AC_DOS_PATHS macro to test for
950 2003-04-19 Paul D. Smith <psmith@gnu.org>
952 Fix bug #1405: allow a target to match multiple pattern-specific
955 * rule.c (create_pattern_var, lookup_pattern_var): Move these to
956 variable.c, where they've always belonged.
957 * rule.h: Move the prototypes and struct pattern_var as well.
958 * variable.c (initialize_file_variables): Invoke
959 lookup_pattern_var() in a loop, until no more matches are found.
960 If a match is found, create a new variable set for the target's
961 pattern variables. Then merge the contents of each matching
962 pattern variable set into the target's pattern variable set.
963 (lookup_pattern_var): Change this function to be usable
964 in a loop. It takes a starting position: if NULL, start at the
965 beginning; if non-NULL, start with the pattern variable after that
966 position, and return the next matching pattern.
967 (create_pattern_var): Create a unique instance of
968 pattern-specific variables for every definition in the makefile.
969 Don't combine the same pattern together. This allows us to
970 process the variable handling properly even when the same pattern
971 is used multiple times.
972 (parse_variable_definition): New function: break out the parsing
973 of a variable definition line from try_variable_definition.
974 (try_variable_definition): Call parse_variable_definition to
976 (print_variable_data_base): Print out pattern-specific variables.
977 * variable.h (struct variable): Remember when a variable is
978 conditional. Also remember its flavor.
979 (struct pattern_var): Instead of keeping a variable set, we just
980 keep a single variable for each pattern.
981 * read.c (record_target_var): Each pattern variable contains only a
982 single variable, not a set, so create it properly.
983 * doc/make.texi (Pattern-specific): Document the new behavior.
985 2003-04-17 Paul D. Smith <psmith@gnu.org>
987 * dir.c (file_exists_p) [VMS]: Patch provided with Bug #3018 by
988 Jean-Pierre Portier <portierjp2@free.fr>. I don't understand the
989 file/directory naming rules for VMS so I can't tell whether this
992 2003-04-09 Paul D. Smith <psmith@gnu.org>
994 * configure.in (HAVE_DOS_PATHS): Define this on systems that need
995 DOS-style pathnames: backslash separators and drive specifiers.
997 2003-03-28 Paul D. Smith <psmith@gnu.org>
999 * file.c (snap_deps): If .SECONDARY with no targets is given, set
1000 the intermediate flag on all targets. Fixes bug #2515.
1002 2003-03-24 Paul D. Smith <psmith@gnu.org>
1004 * configure.in, Makefile.am, glob/Makefile.am, doc/Makefile.am:
1005 Upgrade to autoconf 2.57 and automake 1.7.3.
1007 * job.c: More OS/2 changes from Andreas Buening.
1009 * file.c (print_file): Fix variable initialization.
1012 * remake.c (notice_finished_file):
1014 * make.h (ENULLLOOP): Set errno = 0 before invoking the command;
1015 some calls (like readdir()) return NULL in valid situations
1016 without resetting errno. Fixes bug #2846.
1018 2003-02-25 Paul D. Smith <psmith@gnu.org>
1020 Port to OS/2 (__EMX__) by Andreas Buening <andreas.buening@nexgo.de>.
1022 * job.c (_is_unixy_shell) [OS/2]: New function.
1023 Set default shell to /bin/sh.
1024 (reap_children): Close the job_rfd pipe here since we don't use a
1026 (set_child_handler_action_flags): define this to empty on OS/2.
1027 (start_job_command): Close the jobserver pipe and use
1028 child_execute_job() instead of fork/exec.
1029 (child_execute_job): Rewrite to handle stdin/stdout FDs and spawn
1030 rather than exec'ing, then reconfigure stdin/stdout.
1031 (exec_command): Rewrite to use spawn instead of exec. Return the
1034 * main.c (main) [OS/2]: Call initialize_main(). Handle argv[0] as
1035 in DOS. Handle the TEMP environment variable as in DOS. Don't
1036 use a SIGCHLD handler on OS/2. Choose a shell as in DOS. Don't
1037 use -j in DOS mode. Use child_execute_job() instead of
1040 * function.c (func_shell) [OS/2]: Can't use fork/exec on OS/2: use
1043 * job.h [OS/2]: Move CLOSE_ON_EXEC here from job.c. Add
1044 prototypes that return values.
1046 * remake.c (f_mtime) [OS/2]: Handle FAT timestamp offsets for OS/2.
1048 * read.c (readline) [OS/2]: Don't handle CRLF specially on OS/2.
1049 * default.c (default_suffixes) [OS/2]: Set proper default suffixes
1051 * vpath.c (construct_vpath_list) [OS/2]: Handle OS/2 paths like
1054 2003-02-24 Paul D. Smith <psmith@gnu.org>
1056 * default.c [VMS]: New default rules for .cxx -> .obj compiles.
1057 * job.c (child_execute_job) [VMS]: New code for handling spawn().
1058 (child_execute_job) [VMS]: Handle error status properly.
1059 Patches provided by Hartmut Becker <Hartmut.Becker@compaq.com>.
1061 * function.c (func_shell): Use EINTRLOOP() while reading from the
1062 subshell pipe (Fixes bug #2502).
1063 * job.c (free_child): Use EINTRLOOP() while writing tokens to the
1065 * main.c (main): Ditto.
1067 2003-01-30 Paul D. Smith <psmith@gnu.org>
1069 * read.c (eval): eval() was not fully reentrant, because the
1070 collapsed buffer was static. Change it to be an automatic
1071 variable so that eval() can be invoked recursively.
1073 (eval): Apply patch # 1022: fix memory reference error on long
1074 target-specific variable lines.
1075 Patch provided by Steve Brown <Steve.Brown@macquarie.com>.
1077 * function.c (check_numeric): Combine the is_numeric() function
1078 into this function, since it's only called from one place.
1079 Constify this function. Have it print the incorrect string in the
1080 error message. Fixes bug #2407.
1081 (strip_whitespace): Constify.
1082 (func_if): Constify.
1083 * expand.c (expand_argument): Constify.
1085 2003-01-29 Paul D. Smith <psmith@gnu.org>
1087 Fix bug # 2169, also reported by other people on various systems.
1089 * make.h: Some systems, such as Solaris and PTX, do not fully
1090 implement POSIX-compliant SA_RESTART functionality; important
1091 system calls like stat() and readdir() can still fail with EINTR
1092 even if SA_RESTART has been set on the signal handler. So,
1093 introduce macros EINTRLOOP() and ENULLLOOP() which can loop on
1094 EINTR for system calls which return -1 or 0 (NULL), respectively,
1096 Also, remove the old atomic_stat()/atomic_readdir() and
1097 HAVE_BROKEN_RESTART handling.
1099 * configure.in: Remove setting of HAVE_BROKEN_RESTART.
1101 * arscan.c (ar_member_touch): Use EINTRLOOP() to wrap fstat().
1102 * remake.c (touch_file): Ditto.
1104 * commands.c (delete_target): Use EINTRLOOP() to wrap stat().
1105 * read.c (construct_include_path): Ditto.
1106 * remake.c (name_mtime): Ditto.
1107 * vpath.c (selective_vpath_search): Ditto.
1108 * dir.c (find_directory): Ditto.
1109 (local_stat): Ditto.
1110 (find_directory): Use ENULLLOOP() to wrap opendir().
1111 (dir_contents_file_exists_p): Use ENULLLOOP() to wrap readdir().
1113 * misc.c: Remove HAVE_BROKEN_RESTART, atomic_stat(), and
1114 atomic_readdir() handling.
1116 2003-01-22 Paul D. Smith <psmith@gnu.org>
1118 * function.c (func_call): Fix Bug #1744. If we're inside a
1119 recursive invocation of $(call ...), mask any of the outer
1120 invocation's arguments that aren't used by this one, so that this
1121 invocation doesn't "inherit" them accidentally.
1123 2002-12-05 Paul D. Smith <psmith@gnu.org>
1125 * function.c (subst_expand): Valery Khamenia reported a
1126 pathological performance hit when doing substitutions on very
1127 large values with lots of words: turns out we were invoking
1128 strlen() a ridiculous number of times. Instead of having each
1129 call to sindex() call strlen() again, keep track of how much of
1130 the text we've seen and pass the length to sindex().
1132 2002-11-19 Paul D. Smith <psmith@gnu.org>
1134 * README.cvs, configure.in: Upgrade to require autoconf 2.56.
1137 2002-11-16 Paul D. Smith <psmith@gnu.org>
1139 * NMakefile.template (OBJS): Add hash.c object file.
1140 * SMakefile.template (srcs): Ditto.
1141 * Makefile.ami (objs): Ditto.
1142 * build_w32.bat: Ditto.
1144 * Makefile.DOS.template: Remove extra dependencies.
1146 2002-10-25 Paul D. Smith <psmith@gnu.org>
1148 * expand.c (install_variable_buffer): New function. Install a new
1149 variable_buffer context and return the previous one.
1150 (restore_variable_buffer): New function. Free the current
1151 variable_buffer context and put a previously saved one back.
1152 * variable.h: Prototypes for {install,restore}_variable_buffer.
1153 * function.c (func_eval): Push a new variable_buffer context
1154 before we eval, then restore the old one when we're done.
1157 * read.c (install_conditionals): New function. Install a new
1158 conditional context and return the previous one.
1159 (restore_conditionals): New function. Free the current
1160 conditional context and put a previously saved one back.
1161 (eval): Use the {install,restore}_conditionals for "include"
1163 (eval_buffer): Use {install,restore}_conditionals to preserve the
1164 present conditional state before we evaluate the buffer.
1167 * doc/make.texi (Quick Reference): Add references to $(eval ...)
1169 (Recursion): Add a variable index entry for CURDIR.
1171 * README.cvs: Update to appropriate versions.
1172 * Makefile.am (nodist_loadavg_SOURCES): automake gurus point out I
1173 don't need to copy loadavg.c: automake is smart enough to create
1174 it for me. Still have a bug in automake related to ansi2knr tho.
1176 2002-10-14 Paul D. Smith <psmith@gnu.org>
1178 * remake.c (notice_finished_file): Only touch targets if they have
1179 at least one command (as per POSIX). Resolve Bug #1418.
1181 * *.c: Convert to using ANSI C-style function definitions.
1182 * Makefile.am: Enable the ansi2knr feature of automake.
1183 * configure.in: ditto.
1185 2002-10-13 Paul D. Smith <psmith@gnu.org>
1187 * commands.c (set_file_variables): Bug #1379: Don't use alloca()
1188 for automatic variable values like $^, etc. In the case of very
1189 large lists of prerequisites this causes problems. Instead reuse
1190 a static buffer (resizeable) for each variable.
1192 * read.c (eval): Fix Bug #1391: allow "export" keyword in
1193 target-specific variable definitions. Check for it and set an
1195 (record_target_var): Set the export field to v_export if the
1196 "exported" flag is set.
1197 * doc/make.texi (Target-specific): Document the ability to use
1200 * doc/make.texi: Change the name of the section on automatic
1201 variables from "Automatic" to "Automatic Variables". Added text
1202 clarifying the scope of automatic variables.
1204 2002-10-04 Paul D. Smith <psmith@gnu.org>
1206 * read.c (eval): Allow SysV $$@ variables to use {} braces as well
1208 (record_files): Ditto.
1210 * expand.c (variable_expand_string): In $(A:x=y) expansion limit
1211 the search for the '=' to only within the enclosing parens.
1213 2002-10-03 Paul D. Smith <psmith@gnu.org>
1215 Version 3.80 released.
1217 * dir.c: Change hash functions to use K&R function definition style.
1218 * function.c: Ditto.
1220 * variable.c: Ditto.
1222 Update to automake 1.7.
1224 * Makefile.am (AUTOMAKE_OPTIONS): Update to require 1.7.
1225 (pdf): Remove this target as automake now provides one.
1227 * configure.in: Change AM_CONFIG_HEADER to AC_CONFIG_HEADERS.
1229 2002-09-30 Martin P.J. Zinser <zinser@decus.de>
1231 * makefile.com: Updates for GNU make 3.80.
1232 * makefile.vms: Ditto.
1234 2002-09-23 Paul D. Smith <psmith@gnu.org>
1236 * read.c (enum make_word_type): Remove w_comment.
1237 (get_next_mword): Don't treat comment characters as special; where
1238 this function is used we will never see a comment (it's stripped
1239 before we get here) and treating comments specially means that
1240 targets like "foo\#bar" aren't handled properly.
1242 2002-09-18 Paul D. Smith <psmith@gnu.org>
1244 * doc/make.texi (Bugs): Update with some info on Savannah, etc.
1246 * read.c (eval): Expansion of arguments to export/unexport was
1247 ignoring all arguments after the first one. Change the algorithm
1248 to expand the whole line once, then parse the results.
1250 2002-09-17 Paul D. Smith <psmith@gnu.org>
1252 Fix Bug #940 (plus another bug I found while looking at this):
1254 * read.c (record_target_var): enter_file() will add a new entry if
1255 it's a double-colon target: we don't want to do that in this
1256 situation. Invoke lookup_file() and only enter_file() if it does
1257 not already exist. If the file we get back is a double-colon then
1258 add this variable to the "root" double-colon target.
1260 * variable.c (initialize_file_variables): If this file is a
1261 double-colon target but is not the "root" target, then initialize
1262 the root and make the root's variable list the parent of our
1265 2002-09-13 Paul D. Smith <psmith@gnu.org>
1267 * doc/make.texi (MAKE Variable): Add some indexing for "+".
1269 * hash.c (round_up_2): Get rid of a warning.
1271 2002-09-12 Paul D. Smith <psmith@gnu.org>
1273 * Makefile.am (loadavg_SOURCES, loadavg.c): Tiptoe around automake
1274 so it doesn't complain about getloadavg.c.
1276 * commands.c (set_file_variables): Make sure we always alloca() at
1277 least 1 character for the value of $? (for '\0').
1279 2002-09-11 Paul D. Smith <psmith@gnu.org>
1281 * hash.h (STRING_COMPARE, ISTRING_COMPARE, STRING_N_COMPARE): Fix
1282 macro to use RESULT instead of the incorrect _RESULT_.
1284 * make.h (HAVE_BROKEN_RESTART): Add prototypes for atomic_stat()
1285 and atomic_readdir(). We need to #include dirent.h to get this to
1287 * misc.c (atomic_readdir): Fix typos.
1289 2002-09-10 Paul D. Smith <psmith@gnu.org>
1291 * read.c (eval): Expand variable lists given to export and
1292 unexport, so that "export $(LIST_OF_VARIABLES)" (etc.) works.
1293 (conditional_line): Ditto for "ifdef". Fixes bug #103.
1295 * doc/make.texi (Variables/Recursion): Document this.
1296 (Conditional Syntax): And here.
1298 2002-09-09 Paul D. Smith <psmith@gnu.org>
1300 * configure.in: Check for memmove().
1302 2002-09-07 Paul D. Smith <psmith@gnu.org>
1304 * configure.in (HAVE_BROKEN_RESTART): Define this on PTX systems;
1305 Michael Sterrett <msterret@coat.com> reports that while it has
1306 SA_RESTART, it does not work properly.
1308 * misc.c (atomic_stat): If HAVE_BROKEN_RESTART, create a function
1309 that invokes stat() and loops to do it again if it returns EINTR.
1310 (atomic_readdir): Ditto, with readdir().
1312 * make.h (stat, readdir): If HAVE_BROKEN_RESTART, alias stat()
1313 and readdir() to atomic_stat() and atomic_readdir().
1315 2002-09-04 Paul D. Smith <psmith@gnu.org>
1317 * implicit.c (pattern_search): Daniel <barkalow@reputation.com>
1318 reports that GNU make sometimes doesn't recognize that targets can
1319 be made, when directories can be created as prerequisites. He
1320 reports that changing the order of predicates in the DEP->changed
1321 flag test so that lookup_file() is always performed, solves this
1324 2002-08-08 Paul D. Smith <psmith@gnu.org>
1326 * configure.in: Require a newer version of gettext.
1328 * misc.c (perror_with_name): Translate the format string (for
1329 right-to-left language support).
1330 (pfatal_with_name): Ditto.
1332 * main.c: Create a static array of strings to store the usage
1333 text. This is done to facilitate translations.
1334 (struct command_switch): Remove argdesc and description fields.
1335 (switches): Remove values for obsolete fields.
1336 (print_usage): Print each element of the usage array.
1338 * hash.c: Change function definitions to be K&R style.
1340 2002-08-02 Paul D. Smith <psmith@gnu.org>
1342 * NEWS: Remove the mention of .TARGETS; we aren't going to publish
1343 this one because it's too hard to get right. We'll look at it for
1345 * main.c (main): Don't create the .TARGETS variable.
1346 * variable.c (handle_special_var): Don't handle .TARGETS.
1348 2002-08-01 Paul D. Smith <psmith@gnu.org>
1350 * main.c (switches): Add a new option, -B (--always-make). If
1351 specified, make will rebuild all targets that it encounters even
1352 if they don't appear to be out of date.
1353 (always_make_flag): New flag.
1354 * make.h: Extern always_make_flag.
1355 * remake.c (update_file_1): Check always_make_flag; if it's set we
1356 will always rebuild any target we can, even if none of its
1357 prerequisites are newer.
1360 * doc/make.texi (Shell Function): Make it clear that make
1361 variables marked as "export" are not passed to instances of the
1364 Add new introspection variable .VARIABLES and .TARGETS.
1366 * variable.c (handle_special_var): New function. If the variable
1367 reference passed in is "special" (.VARIABLES or .TARGETS),
1368 calculate the new value if necessary. .VARIABLES is handled here:
1369 walk through the hash of defined variables and construct a value
1370 which is a list of the names. .TARGETS is handled by
1371 build_target_list().
1372 (lookup_variable): Invoke handle_special_var().
1373 * file.c (build_target_list): Walk through the hask of known files
1374 and construct a list of the names of all the ones marked as
1376 * main.c (main): Initialize them to empty (and as simple variables).
1377 * doc/make.texi (Special Variables): Document them.
1378 * NEWS: Mention them.
1380 * variable.h (struct variable): Add a new flag "exportable" which
1381 is true if the variable name is valid for export.
1382 * variable.c (define_variable_in_set): Set "exportable" when a new
1383 variable is defined.
1384 (target_environment): Use the "exportable" flag instead of
1385 re-checking the name here... an efficiency improvement.
1387 2002-07-31 Paul D. Smith <psmith@gnu.org>
1389 * config.h-vms.template: Updates to build on VMS. Thanks to
1390 Brian_Benning@aksteel.com for helping verify the build.
1391 * makefile.com: Build the new hash.c file.
1392 * hash.h: Use strcpmi(), not stricmp(), in the
1393 HAVE_CASE_INSENSITIVE_FS case.
1395 2002-07-30 Paul D. Smith <psmith@gnu.org>
1397 * hash.h (ISTRING_COMPARE, return_ISTRING_COMPARE): Add missing
1398 backslashes to the HAVE_CASE_INSENSITIVE_FS case.
1399 Reported by <Brian_Benning@aksteel.com>.
1401 2002-07-10 Paul D. Smith <psmith@gnu.org>
1403 * variable.c (pop_variable_scope): Remove variable made unused by
1404 new hash infrastructure.
1405 * read.c (dep_hash_cmp): Rewrite this to handle ignore_mtime
1406 comparisons as well as name comparisons.
1407 * variable.h: Add a prototype for new hash_init_function_table().
1408 * file.c (lookup_file): Remove variables made unused by new hash
1410 * dir.c (directory_contents_hash_2): Missing return of hash value.
1411 (dir_contents_file_exists_p): Remove variables made unused by new
1412 hash infrastructure.
1415 Installed Greg McGary's integration of the hash functions from the
1416 GNU id-utils package:
1418 2002-07-10 Greg McGary <greg@mcgary.org>
1420 * scripts/functions/filter-out: Add literals to to the
1421 pattern space in order to add complexity, and trigger
1422 use of an internal hash table. Fix documentation strings.
1423 * scripts/targets/INTERMEDIATE: Reverse order of files
1424 passed to expected `rm' command.
1426 2002-07-10 Greg McGary <greg@mcgary.org>
1428 * Makefile.am (SRCS): Add hash.c (noinst_HEADERS): Add hash.h
1429 * hash.c: New file, taken from id-utils.
1430 * hash.h: New file, taken from id-utils.
1432 * make.h (HASH, HASHI): Remove macros.
1433 (find_char_unquote): Change arglist in decl.
1434 (hash_init_directories): New function decl.
1435 * variable.h (hash.h): New #include.
1436 (MAKELEVEL_NAME, MAKELEVEL_LENGTH): New constants.
1437 * filedef.h (hash.h): New #include.
1438 (struct file) [next]: Remove member.
1439 (file_hash_enter): Remove function decl.
1440 (init_hash_files): New function decl.
1442 * ar.c (ar_name): Delay call to strlen until needed.
1443 * main.c (initialize_global_hash_tables): New function.
1444 (main): Call it. Use MAKELEVEL_NAME & MAKELEVEL_LENGTH.
1445 * misc.c (remove_comments): Pass char constants to find_char_unquote.
1446 * remake.c (notice_finished_file): Update last_mtime on `prev' chain.
1448 * dir.c (hash.h): New #include.
1449 (struct directory_contents) [next, files]: Remove members.
1450 [ctime]: Add member for VMS. [dirfiles]: Add hash-table member.
1451 (directory_contents_hash_1, directory_contents_hash_2,
1452 directory_contents_hash_cmp): New functions.
1453 (directories_contents): Change type to `struct hash_table'.
1454 (struct directory) [next]: Remove member.
1455 (directory_hash_1, directory_hash_2, directory_hash_cmp): New funcs.
1456 (directory): Change type to `struct hash_table'.
1457 (struct dirfile) [next]: Remove member.
1458 [length]: Add member. [impossible]: widen type to fill alignment gap.
1459 (dirfile_hash_1, dirfile_hash_2, dirfile_hash_cmp): New functions.
1460 (find_directory): Use new hash table package.
1461 (dir_contents_file_exists_p): Likewise.
1462 (file_impossible): Likewise.
1463 (file_impossible_p): Likewise.
1464 (print_dir_data_base): Likewise.
1465 (open_dirstream): Likewise.
1466 (read_dirstream): Likewise.
1467 (hash_init_directories): New function.
1469 * file.c (hash.h): New #include.
1470 (file_hash_1, file_hash_2, file_hash_cmp): New functions.
1471 (files): Change type to `struct hash_table'.
1472 (lookup_file): Use new hash table package.
1473 (enter_file): Likewise.
1474 (remove_intermediates): Likewise.
1475 (snap_deps): Likewise.
1476 (print_file_data_base): Likewise.
1479 (function_table_entry_hash_1, function_table_entry_hash_2,
1480 function_table_entry_hash_cmp): New functions.
1481 (lookup_function): Remove `table' argument.
1482 Use new hash table package.
1483 (struct a_word) [chain, length]: New members.
1484 (a_word_hash_1, a_word_hash_2, a_word_hash_cmp): New functions.
1485 (struct a_pattern): New struct.
1486 (func_filter_filterout): Pass through patterns noting boundaries
1487 and '%', if present. Note a_word length. Use a hash table if
1488 arglists are large enough to justify cost.
1489 (function_table_init): Renamed from function_table.
1490 (function_table): Declare as `struct hash_table'.
1491 (FUNCTION_TABLE_ENTRIES): New constant.
1492 (hash_init_function_table): New function.
1494 * read.c (hash.h): New #include.
1495 (read_makefile): Pass char constants to find_char_unquote.
1496 (dep_hash_1, dep_hash_2, dep_hash_cmp): New functions.
1497 (uniquize_deps): Use hash table to efficiently identify duplicates.
1498 (find_char_unquote): Accept two char-constant stop chars, rather
1499 than a string constant, avoiding zillions of calls to strchr.
1500 Tighten inner search loops to test only for desired delimiters.
1502 * variable.c (variable_hash_1, variable_hash_2,
1503 variable_hash_cmp): New functions.
1504 (variable_table): Declare as `struct hash_table'.
1505 (global_variable_set): Remove initialization.
1506 (init_hash_global_variable_set): New function.
1507 (define_variable_in_set): Use new hash table package.
1508 (lookup_variable): Likewise.
1509 (lookup_variable_in_set): Likewise.
1510 (initialize_file_variables): Likewise.
1511 (pop_variable_scope): Likewise.
1512 (create_new_variable_set): Likewise.
1513 (merge_variable_sets): Likewise.
1514 (define_automatic_variables): Likewise.
1515 (target_environment): Likewise.
1516 (print_variable_set): Likewise.
1518 2002-07-10 Paul D. Smith <psmith@gnu.org>
1520 Implement the SysV make syntax $$@, $$(@D), and $$(@F) in the
1521 prerequisite list. A real SysV make will expand the entire
1522 prerequisites list _twice_: we don't do that as it's a big
1523 backward-compatibility problem. We only replace those specific
1526 * read.c (record_files): Replace any $@, $(@D), and $(@F) variable
1527 references left in the list of prerequisites. Check for .POSIX as
1528 we record targets, so we can disable non-POSIX behavior while
1529 reading makefiles as well as running them.
1530 (eval): Check the prerequisite list to see if we have anything
1531 that looks like a SysV prerequisite variable reference.
1533 2002-07-09 Paul D. Smith <psmith@gnu.org>
1535 * doc/make.texi (Prerequisite Types): Add a new section describing
1536 order-only prerequisites.
1538 * read.c (uniquize_deps): If we have the same file as both a
1539 normal and order-only prereq, get rid of the order-only prereq,
1540 since the normal one supersedes it.
1542 2002-07-08 Paul D. Smith <psmith@gnu.org>
1544 * AUTHORS: Added Greg McGary to the AUTHORS file.
1545 * NEWS: Blurbed order-only prerequisites.
1546 * file.c (print_file): Show order-only deps properly when printing
1549 * maintMakefile: Add "update" targets for wget'ing the latest
1550 versions of various external files. Taken from Makefile.maint in
1553 * dosbuild.bat: Somehow we got _double_ ^M's. Remove them.
1554 Reported by Eli Zaretskii <eliz@is.elta.co.il>.
1556 2002-07-07 Paul D. Smith <psmith@gnu.org>
1558 * po/*.po: Remove. We'll use wget to retrieve them at release
1561 * variable.c (do_variable_definition) [W32]: On W32 using cmd
1562 rather than a shell you get an exception. Make sure we look up
1563 the variable. Patch provided by Eli Zaretskii <eliz@is.elta.co.il>.
1565 * remake.c (notice_finished_file): Fix handling of -t flag.
1566 Patch provided by Henning Makholm <henning@makholm.net>.
1568 * implicit.c (pattern_search): Some systems apparently run short
1569 of stack space, and using alloca() in this function caused an
1570 overrun. I modified it to use xmalloc() on the two variables
1571 which seemed like they might get large. Fixes Bug #476.
1573 * main.c (print_version): Update copyright notice to conform with
1575 (print_usage): Update help output.
1577 * function.c (func_eval): Create a new make function, $(eval
1578 ...). Expand the arguments, put them into a buffer, then invoke
1579 eval_buffer() on the resulting string.
1580 (func_quote): Create a new function, $(quote VARNAME). Inserts
1581 the value of the variable VARNAME without expanding it any
1584 * read.c (struct ebuffer): Change the linebuffer structure to an
1585 "eval buffer", which can be either a file or a buffer.
1586 (eval_makefile): Move the code in the old read_makefile() which
1587 located a makefile into here: create a struct ebuffer with that
1588 information. Have it invoke the new function eval() with that
1590 (eval_buffer): Create a new function that creates a struct ebuffer
1591 that holds a string buffer instead of a file. Have it invoke
1592 eval() with that ebuffer.
1593 (eval): New function that contains the guts of the old
1594 read_makefile() function: this function parses makefiles. Obtains
1595 data to parse from the provided ebuffer. Some modifications to
1596 make the flow of the function cleaner and clearer. Still could
1597 use some work here...
1598 (do_define): Takes a struct ebuffer instead of a FILE*. Read the
1599 contents of the define/endef variable from the ebuffer.
1600 (readstring): Read the next line from a string-style ebuffer.
1601 (readline): Read the next line from an ebuffer. If it's a string
1602 ebuffer, invoke readstring(). If it's a FILE* ebuffer, read it
1605 * dep.h (eval_buffer): Prototype eval_buffer();
1607 * variable.c (do_variable_definition): Make sure that all
1608 non-target-specific variables are registered in the global set.
1609 If we're invoked from an $(eval ...) we might be inside a $(call
1610 ...) or other function which has pushed a variable scope; we still
1611 want to define our variables from evaluated makefile code in the
1614 2002-07-03 Greg McGary <greg@mcgary.org>
1616 * dep.h (struct dep) [ignore_mtime]: New member.
1617 [changed]: convert to a bitfield.
1618 * implicit.c (pattern_search): Zero ignore_mtime.
1619 * main.c (main, handle_non_switch_argument): Likewise.
1620 * rule.c (convert_suffix_rule): Likewise.
1621 * read.c (read_all_makefiles, read_makefile, multi_glob): Likewise.
1622 (read_makefile): Parse '|' in prerequisite list.
1623 (uniquize_deps): Consider ignore_mtime when comparing deps.
1624 * remake.c (update_file_1, check_dep): Don't force remake for
1625 dependencies that have d->ignore_mtime.
1626 * commands.c (FILE_LIST_SEPARATOR): New constant.
1627 (set_file_variables): Don't include a
1628 prerequisite in $+, $^ or $? if d->ignore_mtime.
1631 2002-06-18 Paul D. Smith <psmith@gnu.org>
1633 * make.texinfo: Updates for next revision. New date/rev/etc.
1634 Recreate all Info menus. Change license on the manual to the GNU
1635 Free Documentation License. A number of typos.
1636 (Variables Simplify): Don't use "-" before it's defined.
1637 (Automatic Prerequisites): Rewrite the target example to work
1638 properly if the compile fails. Remove incorrect comments about
1639 how "set -e" behaves.
1640 (Text Functions): Move the "word", "wordlist", "words", and
1641 "firstword" functions here, from "File Name Functions".
1642 * make-stds.texi: Update from latest GNU version.
1643 * fdl.texi: (created) Import the latest GNU version.
1645 2002-06-06 Paul D. Smith <psmith@gnu.org>
1647 * variable.c (do_variable_definition): New function: extract the
1648 part of try_variable_definition() that actually sets the value
1649 into a separate function.
1650 (try_variable_definition): Call do_variable_definition() after
1651 parsing the variable definition string.
1652 (define_variable_in_set): Make the name argument const.
1654 * variable.h (enum variable_flavor): Make public.
1655 (do_variable_definition): Create prototype.
1657 * read.c (read_all_makefiles): Create a new built-in variable,
1659 (read_makefile): Add each makefile read in to this variable value.
1661 2002-05-18 Eli Zaretskii <eliz@is.elta.co.il>
1663 * Makefile.DOS.template: Tweak according to changes in the
1664 distribution. Add back the dependencies of *.o files.
1666 * configh.dos.template: Synchronize with config.h.in.
1668 2002-05-09 Paul D. Smith <psmith@gnu.org>
1670 * file.c (file_timestamp_now): Use K&R function declaration.
1672 * getloadavg.c (getloadavg): Merge setlocale() fix from sh-utils
1673 getloadavg.c. Autoconf thinks QNX is SVR4-like, but it isn't, so
1674 #undef it. Remove predefined setup of NLIST_STRUCT. Decide
1675 whether to include nlist.h based on HAVE_NLIST_H. Change obsolete
1676 NLIST_NAME_UNION to new HAVE_STRUCT_NLIST_N_UN_N_NAME.
1677 * configure.in (NLIST_STRUCT): Define this if we have nlist.h and
1678 nlist.n_name is a pointer rather than an array.
1680 * acinclude.m4 (make_FUNC_SETVBUF_REVERSED): Grab the latest
1681 version of AC_FUNC_SETVBUF_REVERSED from autoconf CVS.
1682 * configure.in: Use it instead of the old version.
1684 * main.c (main): Prefer setvbuf() to setlinebuf().
1686 2002-05-08 Paul D. Smith <psmith@gnu.org>
1688 * Makefile.am (make_LDADD): Add GETLOADAVG_LIBS.
1689 (loadavg_LDADD): Ditto.
1691 2002-04-29 Paul D. Smith <psmith@gnu.org>
1693 * expand.c (recursively_expand_for_file): Rename
1694 recursively_expand() to recursively_expand_for_file() and provide
1695 an extra argument, struct file. If the argument is provided, set
1696 the variable scope to that of the file before expanding.
1697 * variable.h (recursively_expand): Make this a macro that invokes
1698 recursively_expand_for_file() with a NULL file pointer.
1699 * variable.c (target_environment): Call the renamed function and
1700 provide the current file context.
1701 Fixes Debian bug #144306.
1703 2002-04-28 Paul D. Smith <psmith@gnu.org>
1705 Allow $(call ...) user-defined variables to be self-referencing
1706 without throwing an error. Allows implementation of transitive
1707 closures, among other possibly useful things.
1708 Requested by: Philip Guenther <guenther@sendmail.com>
1710 * variable.h (struct variable): Add a new field: exp_count, and
1711 new macros to hold its size and maximum value.
1712 (warn_undefined): Make this a macro.
1713 * variable.c (define_variable_in_set): Initialize it.
1714 * expand.c (recursively_expand): If we detect recursive expansion
1715 of a variable, check the exp_count field. If it's greater than 0
1716 allow the recursion and decrement the count.
1717 (warn_undefined): Remove this (now a macro in variable.h).
1718 * function.c (func_call): Before we expand the user-defined
1719 function, modify its exp_count field to contain the maximum
1720 number of recursive calls we'll allow. After the call, reset it
1723 2002-04-21 Paul D. Smith <psmith@gnu.org>
1725 Modified to use latest autoconf (2.53), automake (1.6.1), and
1726 gettext (0.11.1). We're using gettext's new "external" support,
1727 to avoid including libintl source with GNU make.
1729 * README.cvs: New file. Explain how to build GNU make from CVS.
1731 * configure.in: Modify checking for the system glob library.
1732 Use AC_EGREP_CPP instead of AC_TRY_CPP. Remove the setting of
1733 GLOBDIR (we will always put "glob" in SUBDIRS, so automake
1734 etc. will manage it correctly). Set an automake conditional
1735 USE_LOCAL_GLOB to decide whether to compile the glob library.
1737 * getloadavg.c (main): Include make.h in the "TEST" program to
1740 * Makefile.am: Remove special rules for loadavg. Replace them
1741 with Automake capabilities for building extra programs.
1743 * signame.c: This file does nothing if the system provide
1744 strsignal(). If not, it implements strsignal(). If the system
1745 doesn't define sys_siglist, then we make our own; otherwise we use
1747 * signame.h: Removed.
1749 * main.c (main): No need to invoke signame_init(). Update copyright.
1751 * ABOUT-NLS: Removed.
1752 * gettext.c: Removed.
1753 * gettext.h: Get a simplified copy from the gettext package.
1755 * i18n/*.po: Moved to po/.
1758 * config/*: Created. Contains package configuration helper files.
1759 * config.guess, config.sub: Moved to config directory.
1761 * configure.in (AC_CONFIG_FILES): Add po/Makefile.in, config/Makefile.
1762 Rework to use new-style autoconf features. Use the "external"
1763 mode for gettext. Make the build.sh config file conditional on
1764 whether build.sh.in exists, to avoid autoconf errors.
1765 * acinclude.m4: Removed almost all macros as being obsolete.
1766 Rewrote remaining macros to use AC_DEFINE.
1767 * acconfig.h: Removed.
1769 * Makefile.am (EXTRA_DIST): Add config/config.rpath. Use a
1770 conditional to handle customs support. Remove special handling
1773 2002-04-20 Paul D. Smith <psmith@gnu.org>
1775 * function.c (func_call): Don't mark the argument variables $1,
1776 etc. as recursive. They've already been fully expanded so
1777 there's no need to do it again, and doing so strips escaped $'s.
1778 Reported by Sebastian Glita <glseba@yahoo.com>.
1780 * remake.c (notice_finished_file): Walk through double-colon
1781 entries via the prev field, not the next field!
1782 Reported by Greg McGary <greg@mcgary.org>.
1784 * main.c (main): If the user specifies -q and asks for a specific
1785 target which is a makefile, we got an assert. In that case it
1786 turns out we should continue normally instead.
1788 * i18n/de.po, i18n/fr.po: Installed an updated translation.
1790 * i18n/he.po: Installed a new translation.
1792 2002-01-07 Paul D. Smith <psmith@gnu.org>
1794 * i18n/es.po, i18n/ru.po: Installed an updated translation.
1796 2001-12-04 Paul D. Smith <psmith@gnu.org>
1798 * i18n/ja.po: Installed an updated translation.
1800 2001-09-06 Paul Eggert <eggert@twinsun.com>
1802 * configure.in (AC_CHECK_HEADERS): Add sys/resource.h.
1803 (AC_CHECK_FUNCS): Add getrlimit, setrlimit.
1805 * main.c: Include <sys/resource.h> if it, getrlimit, and setrlimit
1807 (main): Get rid of any avoidable limit on stack size.
1809 2001-09-04 Paul D. Smith <psmith@gnu.org>
1811 * i18n/da.po: Installed an updated translation.
1813 2001-08-03 Paul D. Smith <psmith@gnu.org>
1815 * i18n/fr.po: Installed an updated translation.
1816 Resolves Debian bug #106720.
1818 2001-06-13 Paul D. Smith <psmith@gnu.org>
1820 * i18n/da.po, configure.in (ALL_LINGUAS): Installed a new
1823 2001-06-11 Paul D. Smith <psmith@gnu.org>
1825 * i18n/ko.po: Installed a new translation.
1827 2001-05-06 Paul D. Smith <psmith@gnu.org>
1829 Modify the EINTR handling.
1831 * job.c (new_job): Reorganize the jobserver algorithm. Reorder
1832 the way in which we manage the file descriptor/signal handler race
1833 trap to be more efficient.
1835 2001-05-06 Paul Eggert <eggert@twinsun.com>
1837 Restart almost all system calls that are interrupted, instead
1838 of worrying about EINTR. The lone exception is the read() for
1841 * configure.in (HAVE_SA_RESTART): New macro.
1842 (MAKE_JOBSERVER): Define to 1 only if HAVE_SA_RESTART.
1843 * main.c (main): Use SA_RESTART instead of the old,
1844 nonstandard SA_INTERRUPT.
1846 * configure.in (AC_CHECK_FUNCS): Add bsd_signal.
1847 * main.c (bsd_signal): New function or macro,
1848 if the implementation doesn't supply it.
1849 (The bsd_signal function will be in POSIX 1003.1-200x.)
1850 (HANDLESIG): Remove.
1851 (main, FATAL_SIG): Use bsd_signal instead of signal or HANDLESIG.
1853 * make.h (EINTR_SET): Remove.
1854 (SA_RESTART): New macro.
1856 * arscan.c (ar_member_touch): Don't worry about EINTR.
1857 * function.c (func_shell): Likewise.
1858 * job.c (reap_children, free_child, new_job): Likewise.
1859 * main.c (main): Likewise.
1860 * remake.c (touch_file, name_mtime): Likewise.
1862 * arscan.c (ar_member_touch): Fix bug uncovered by EINTR removal;
1863 if fstat failed with errno!=EINTR, the error was ignored.
1865 * job.c (set_child_handler_action_flags): New function.
1866 (new_job): Use it to temporarily clear the SIGCHLD action flags
1867 while reading the token.
1869 2001-05-02 Paul D. Smith <psmith@gnu.org>
1871 * job.c (start_job_command): Don't add define/endef per-line flags
1872 to the top-level flags setting.
1874 2001-04-03 Paul D. Smith <psmith@gnu.org>
1876 * arscan.c (VMS_get_member_info,ar_scan) [VMS]: VMS sets the low
1877 bit on error, so check for odd return values, not non-0 return
1879 (VMS_get_member_info): Calculate the timezone differences correctly.
1880 Reported by John Fowler <jfowler@nyx.net>.
1883 2001-03-14 Paul D. Smith <psmith@gnu.org>
1885 * variable.c (lookup_variable) [VMS]: Null-terminate the variable
1886 value before invoking define_variable().
1887 Reported by John Fowler <jfowler@nyx.net>.
1889 2001-02-07 Paul D. Smith <psmith@gnu.org>
1891 * read.c (record_target_var): If we reset the variable due to a
1892 command-line variable setting overriding it, turn off the "append"
1895 2001-01-17 Paul D. Smith <psmith@gnu.org>
1897 * variable.c (lookup_variable) [VMS]: When getting values from the
1898 environment, allocate enough space for the _value_ plus escapes,
1899 not enough space for the name plus escapes :-/.
1900 Reported by John Fowler <jfowler@nyx.net>.
1902 * remake.c (f_mtime): Removed the "***" prefix from the mod time
1903 warnings that make generates, so it doesn't look like an error.
1904 Reported by Karl Berry <karl@gnu.org>.
1907 Fix for PR/2020: Rework appended target-specific variables. I'm
1908 fairly confident this algorithm is finally correct.
1910 * expand.c (allocated_variable_append): Rewrite. Instead of
1911 expanding each appended variable then adding all the expanded
1912 strings together, we append all the unexpanded values going up
1913 through the variable set contexts, then expand the final result.
1914 This behaves just like non-target-specific appended variable
1915 values, while the old way didn't in various corner cases.
1916 (variable_append): New function: recursively append the unexpanded
1917 value of a variable, walking from the outermost variable scope to
1919 * variable.c (lookup_variable): Remove the code that looked up the
1920 variable set list if the found variable was "append". We don't
1922 (lookup_variable_in_set): Make this non-static so we can use it
1924 (try_variable_definition): Use lookup_variable_in_set() rather
1925 than faking out current_variable_set_list by hand (cleanup).
1926 * variable.h: Add a prototype for the now non-static
1927 lookup_variable_in_set().
1929 2000-11-17 Paul D. Smith <psmith@gnu.org>
1931 * remake.c (f_mtime) [WINDOWS32]: On various advice, I changed the
1932 WINDOWS32 port to assume timestamps can be up to 3 seconds away
1933 before throwing a fit.
1935 2000-11-17 Paul D. Smith <psmith@gnu.org>
1937 * read.c (readline): CRLF calculations had a hole, if you hit the
1938 buffer grow scenario just right. Reworked the algorithm to avoid
1939 the need for len or lastlen at all. Problem description with
1940 sample code chages provided by Chris Faylor <cgf@redhat.com>.
1942 2000-10-24 Paul D. Smith <psmith@gnu.org>
1944 * gettext.c (SWAP): Declare this with the prototype, otherwise
1945 some systems don't work (non-32-bit? Reported for Cray T3E).
1946 Reported by Thorstein Thorsteinsson <thor@signe.teokem.lu.se>.
1948 2000-10-05 Paul D. Smith <psmith@gnu.org>
1950 * acinclude.m4 (AM_LC_MESSAGES): Remove undefined macro
1951 AM_LC_MESSAGES; it doesn't seem to do anything anyway??
1953 * i18n/gl.po, configure.in (ALL_LINGUAS): New Galician translation.
1955 2000-09-22 Paul D. Smith <psmith@gnu.org>
1957 * gettext.c: Don't #define _GETTEXT_H here; we only include some
1958 parts of the real gettext.h here, and we expect to really include
1959 the real gettext.h later. If we keep this #define, it's ignored.
1961 2000-09-21 Paul D. Smith <psmith@gnu.org>
1963 * main.c (log_working_directory): Rework the text to use complete
1964 sentences, to make life simpler for the translators.
1966 2000-08-29 Paul D. Smith <psmith@gnu.org>
1968 * file.c (remove_intermediates): Print a debug message before we
1969 remove intermediate files, so the user (if she uses -d) knows
1972 2000-08-21 Paul D. Smith <psmith@gnu.org>
1974 * variable.c (try_variable_definition): Change how we handle
1975 target-specific append variable defns: instead of just setting the
1976 value, expand it as an append _but_ only within the current
1977 target's context. Otherwise we lose all but the last value if the
1978 variable is appended more than once within the current target
1979 context. Fixes PR/1831.
1981 2000-08-16 Paul D. Smith <psmith@gnu.org>
1983 * function.c (func_shell): Nul-terminate the buffer before
1984 printing an exec error message (just in case it's not!).
1985 Fixes PR/1860, reported by Joey Hess <joey@valinux.com>.
1987 2000-07-25 Paul D. Smith <psmith@gnu.org>
1989 * job.c (construct_command_argv_internal): Add "~" to the list of
1990 sh_chars[] which disallow optimizing out the shell call.
1992 2000-07-23 Paul Eggert <eggert@twinsun.com>
1994 * NEWS, make.texinfo: Document .LOW_RESOLUTION_TIME, which
1995 supersedes --disable-nsec-timestamps.
1996 * make.texinfo: Consistently use "time stamp" instead of "timestamp".
1997 * README: Remove --disable-nsec-timestamps.
1999 * filedef.h (struct file.low_resolution_time): New member.
2000 * file.c (snap_deps): Add support for .LOW_RESOLUTION_TIME.
2001 * remake.c (update_file_1):
2002 Avoid spurious rebuilds due to low resolution time stamps,
2003 generalizing the earlier code that applied only to archive members.
2004 (f_mtime): Archive members always have low resolution time stamps.
2006 * configure.in: Remove --disable-nsec-timestamps, as this has
2007 been superseded by .LOW_RESOLUTION_TIME.
2009 2000-07-23 Paul Eggert <eggert@twinsun.com>
2011 * configure.in (enable_nsec_timestamps): Renamed from
2012 make_cv_nsec_timestamps, since enable/disable options
2013 shouldn't be cached.
2015 2000-07-23 Bruno Haible <haible@clisp.cons.org>
2016 and Paul Eggert <eggert@twinsun.com>
2018 * file.c (file_timestamp_now):
2019 Use preprocessor-time check for FILE_TIMESTAMP_HI_RES
2020 so that clock_gettime is not linked unless needed.
2022 * filedef.h (FILE_TIMESTAMP_HI_RES):
2023 Remove definition; "configure" now does this.
2025 * configure.in (jm_AC_TYPE_UINTMAX_T): Move up,
2026 to before high resolution file timestamp check,
2027 since that check now uses uintmax_t.
2028 (FILE_TIMESTAMP_HI_RES): Define to nonzero if the code should use
2029 high resolution file timestamps.
2030 (HAVE_CLOCK_GETTIME): Do not define if !FILE_TIMESTAMP_HI_RES,
2031 so that we don't link in clock_gettime unnecessarily.
2033 2000-07-17 Paul D. Smith <psmith@gnu.org>
2035 * i18n/ja.po: New version of the translation file.
2037 2000-07-07 Paul D. Smith <psmith@gnu.org>
2039 * remake.c (f_mtime): If NO_FLOAT is defined, don't bother with
2040 the offset calculation.
2041 (name_mtime): Replace EINTR test with EINTR_SET macro.
2043 2000-07-07 Paul Eggert <eggert@twinsun.com>
2047 * remake.c (update_file_1):
2048 Avoid spurious rebuilds of archive members due to their
2049 timestamp resolution being only one second.
2050 (f_mtime): Avoid spurious warnings of timestamps in the future due to
2051 the clock's resolution being lower than file timestamps'.
2052 When warning about future timestamps, report only the discrepancy,
2053 not the absolute value of the timestamp and the current time.
2055 * file.c (file_timestamp_now): New arg RESOLUTION.
2056 * filedef.h (file_timestamp_now): Likewise.
2057 (FILE_TIMESTAMP_NS): Now returns int. All uses changed.
2059 2000-07-05 Paul D. Smith <psmith@gnu.org>
2061 * variable.c (lookup_variable) [VMS]: Remove vestigial references
2062 to listp. Fixes PR/1793.
2064 2000-06-26 Paul Eggert <eggert@twinsun.com>
2066 * Makefile.am (MAINTAINERCLEANFILES): New macro, with stamp-pot in it.
2068 * dir.c (vms_hash): Ensure ctype macro args are nonnegative.
2070 * remake.c (f_mtime): Remove unused var memtime.
2072 2000-06-25 Martin Buchholz <martin@xemacs.org>
2074 * make.texinfo, NEWS, TODO.private: Minor spelling corrections.
2075 Ran spell-check on make.texinfo.
2077 2000-06-23 Paul D. Smith <psmith@gnu.org>
2079 * main.c (main): Replace EXIT_SUCCESS, EXIT_FAILURE, and
2080 EXIT_TROUBLE with MAKE_SUCCESS, MAKE_FAILURE, and MAKE_TROUBLE.
2081 * make.h: Define these macros.
2083 * Version 3.79.1 released.
2085 * configure.in: Add a new option, --disable-nsec-timestamps, to
2086 avoid using sub-second timestamps on systems that support it. It
2087 can lead to problems, e.g. if your makefile relies on "cp -p".
2088 * README.template: Document the issue with "cp -p".
2090 * config.guess, config.sub: Updated.
2094 See ChangeLog.2, available in the CVS repository at:
2096 http://savannah.gnu.org/cvs/?group=make
2098 for earlier changes.