Fix eval bugs 1516 and 1517.
[make/kirr.git] / ChangeLog
blob1f4c0586233c406dac9c858ab314c2da44d116cc
1 2002-10-25  Paul D. Smith  <psmith@gnu.org>
3         * expand.c (install_variable_buffer): New function.  Install a new
4         variable_buffer context and return the previous one.
5         (restore_variable_buffer): New function.  Free the current
6         variable_buffer context and put a previously saved one back.
7         * variable.h: Prototypes for {install,restore}_variable_buffer.
8         * function.c (func_eval): Push a new variable_buffer context
9         before we eval, then restore the old one when we're done.
10         Fixes Bug #1517.
12         * read.c (install_conditionals): New function.  Install a new
13         conditional context and return the previous one.
14         (restore_conditionals): New function.  Free the current
15         conditional context and put a previously saved one back.
16         (eval): Use the {install,restore}_conditionals for "include"
17         handling.
18         (eval_buffer): Use {install,restore}_conditionals to preserve the
19         present conditional state before we evaluate the buffer.
20         Fixes Bug #1516.
22         * doc/make.texi (Quick Reference): Add references to $(eval ...)
23         and $(value ...).
24         (Recursion): Add a variable index entry for CURDIR.
26         * README.cvs: Update to appropriate versions.
27         * Makefile.am (nodist_loadavg_SOURCES): automake gurus point out I
28         don't need to copy loadavg.c: automake is smart enough to create
29         it for me.  Still have a bug in automake related to ansi2knr tho.
31 2002-10-14  Paul D. Smith  <psmith@gnu.org>
33         * *.c: Convert to using ANSI C-style function definitions.
34         * Makefile.am: Enable the ansi2knr feature of automake.
35         * configure.in: ditto.
37 2002-10-13  Paul D. Smith  <psmith@gnu.org>
39         * commands.c (set_file_variables): Bug #1379: Don't use alloca()
40         for automatic variable values like $^, etc.  In the case of very
41         large lists of prerequisites this causes problems.  Instead reuse
42         a static buffer (resizeable) for each variable.
44         * read.c (eval): Fix Bug #1391: allow "export" keyword in
45         target-specific variable definitions.  Check for it and set an
46         "exported" flag.
47         (record_target_var): Set the export field to v_export if the
48         "exported" flag is set.
49         * doc/make.texi (Target-specific): Document the ability to use
50         "export".
52         * doc/make.texi: Change the name of the section on automatic
53         variables from "Automatic" to "Automatic Variables".  Added text
54         clarifying the scope of automatic variables.
56 2002-10-04  Paul D. Smith  <psmith@gnu.org>
58         * read.c (eval): Allow SysV $$@ variables to use {} braces as well
59         as () braces.
60         (record_files): Ditto.
62         * expand.c (variable_expand_string): In $(A:x=y) expansion limit
63         the search for the '=' to only within the enclosing parens.
65 2002-10-03  Paul D. Smith  <psmith@gnu.org>
67         Version 3.80 released.
69         * dir.c: Change hash functions to use K&R function definition style.
70         * function.c: Ditto.
71         * read.c: Ditto.
72         * variable.c: Ditto.
74         Update to automake 1.7.
76         * Makefile.am (AUTOMAKE_OPTIONS): Update to require 1.7.
77         (pdf): Remove this target as automake now provides one.
79         * configure.in: Change AM_CONFIG_HEADER to AC_CONFIG_HEADERS.
81 2002-09-30  Martin P.J. Zinser  <zinser@decus.de>
83         * makefile.com: Updates for GNU make 3.80.
84         * makefile.vms: Ditto.
86 2002-09-23  Paul D. Smith  <psmith@gnu.org>
88         * read.c (enum make_word_type): Remove w_comment.
89         (get_next_mword): Don't treat comment characters as special; where
90         this function is used we will never see a comment (it's stripped
91         before we get here) and treating comments specially means that
92         targets like "foo\#bar" aren't handled properly.
94 2002-09-18  Paul D. Smith  <psmith@gnu.org>
96         * doc/make.texi (Bugs): Update with some info on Savannah, etc.
98         * read.c (eval): Expansion of arguments to export/unexport was
99         ignoring all arguments after the first one.  Change the algorithm
100         to expand the whole line once, then parse the results.
102 2002-09-17  Paul D. Smith  <psmith@gnu.org>
104         Fix Bug #940 (plus another bug I found while looking at this):
106         * read.c (record_target_var): enter_file() will add a new entry if
107         it's a double-colon target: we don't want to do that in this
108         situation.  Invoke lookup_file() and only enter_file() if it does
109         not already exist.  If the file we get back is a double-colon then
110         add this variable to the "root" double-colon target.
112         * variable.c (initialize_file_variables): If this file is a
113         double-colon target but is not the "root" target, then initialize
114         the root and make the root's variable list the parent of our
115         variable list.
117 2002-09-13  Paul D. Smith  <psmith@gnu.org>
119         * doc/make.texi (MAKE Variable): Add some indexing for "+".
121         * hash.c (round_up_2): Get rid of a warning.
123 2002-09-12  Paul D. Smith  <psmith@gnu.org>
125         * Makefile.am (loadavg_SOURCES, loadavg.c): Tiptoe around automake
126         so it doesn't complain about getloadavg.c.
128         * commands.c (set_file_variables): Make sure we always alloca() at
129         least 1 character for the value of $? (for '\0').
131 2002-09-11  Paul D. Smith  <psmith@gnu.org>
133         * hash.h (STRING_COMPARE, ISTRING_COMPARE, STRING_N_COMPARE): Fix
134         macro to use RESULT instead of the incorrect _RESULT_.
136         * make.h (HAVE_BROKEN_RESTART): Add prototypes for atomic_stat()
137         and atomic_readdir().  We need to #include dirent.h to get this to
138         work.
139         * misc.c (atomic_readdir): Fix typos.
141 2002-09-10  Paul D. Smith  <psmith@gnu.org>
143         * read.c (eval): Expand variable lists given to export and
144         unexport, so that "export $(LIST_OF_VARIABLES)" (etc.) works.
145         (conditional_line): Ditto for "ifdef".  Fixes bug #103.
147         * doc/make.texi (Variables/Recursion): Document this.
148         (Conditional Syntax): And here.
150 2002-09-09  Paul D. Smith  <psmith@gnu.org>
152         * configure.in: Check for memmove().
154 2002-09-07  Paul D. Smith  <psmith@gnu.org>
156         * configure.in (HAVE_BROKEN_RESTART): Define this on PTX systems;
157         Michael Sterrett <msterret@coat.com> reports that while it has
158         SA_RESTART, it does not work properly.
160         * misc.c (atomic_stat): If HAVE_BROKEN_RESTART, create a function
161         that invokes stat() and loops to do it again if it returns EINTR.
162         (atomic_readdir): Ditto, with readdir().
164         * make.h (stat, readdir): If HAVE_BROKEN_RESTART, alias stat()
165         and readdir() to atomic_stat() and atomic_readdir().
167 2002-09-04  Paul D. Smith  <psmith@gnu.org>
169         * implicit.c (pattern_search): Daniel <barkalow@reputation.com>
170         reports that GNU make sometimes doesn't recognize that targets can
171         be made, when directories can be created as prerequisites.  He
172         reports that changing the order of predicates in the DEP->changed
173         flag test so that lookup_file() is always performed, solves this
174         problem.
176 2002-08-08  Paul D. Smith  <psmith@gnu.org>
178         * configure.in: Require a newer version of gettext.
180         * misc.c (perror_with_name): Translate the format string (for
181         right-to-left language support).
182         (pfatal_with_name): Ditto.
184         * main.c: Create a static array of strings to store the usage
185         text.  This is done to facilitate translations.
186         (struct command_switch): Remove argdesc and description fields.
187         (switches): Remove values for obsolete fields.
188         (print_usage): Print each element of the usage array.
190         * hash.c: Change function definitions to be K&R style.
192 2002-08-02  Paul D. Smith  <psmith@gnu.org>
194         * NEWS: Remove the mention of .TARGETS; we aren't going to publish
195         this one because it's too hard to get right.  We'll look at it for
196         a future release.
197         * main.c (main): Don't create the .TARGETS variable.
198         * variable.c (handle_special_var): Don't handle .TARGETS.
200 2002-08-01  Paul D. Smith  <psmith@gnu.org>
202         * main.c (switches): Add a new option, -B (--always-make).  If
203         specified, make will rebuild all targets that it encounters even
204         if they don't appear to be out of date.
205         (always_make_flag): New flag.
206         * make.h: Extern always_make_flag.
207         * remake.c (update_file_1): Check always_make_flag; if it's set we
208         will always rebuild any target we can, even if none of its
209         prerequisites are newer.
210         * NEWS: Mention it.
212         * doc/make.texi (Shell Function): Make it clear that make
213         variables marked as "export" are not passed to instances of the
214         shell function.
216         Add new introspection variable .VARIABLES and .TARGETS.
218         * variable.c (handle_special_var): New function.  If the variable
219         reference passed in is "special" (.VARIABLES or .TARGETS),
220         calculate the new value if necessary.  .VARIABLES is handled here:
221         walk through the hash of defined variables and construct a value
222         which is a list of the names.  .TARGETS is handled by
223         build_target_list().
224         (lookup_variable): Invoke handle_special_var().
225         * file.c (build_target_list): Walk through the hask of known files
226         and construct a list of the names of all the ones marked as
227         targets.
228         * main.c (main): Initialize them to empty (and as simple variables).
229         * doc/make.texi (Special Variables): Document them.
230         * NEWS: Mention them.
232         * variable.h (struct variable): Add a new flag "exportable" which
233         is true if the variable name is valid for export.
234         * variable.c (define_variable_in_set): Set "exportable" when a new
235         variable is defined.
236         (target_environment): Use the "exportable" flag instead of
237         re-checking the name here... an efficiency improvement.
239 2002-07-31  Paul D. Smith  <psmith@gnu.org>
241         * config.h-vms.template: Updates to build on VMS.  Thanks to
242         Brian_Benning@aksteel.com for helping verify the build.
243         * makefile.com: Build the new hash.c file.
244         * hash.h: Use strcpmi(), not stricmp(), in the
245         HAVE_CASE_INSENSITIVE_FS case.
247 2002-07-30  Paul D. Smith  <psmith@gnu.org>
249         * hash.h (ISTRING_COMPARE, return_ISTRING_COMPARE): Add missing
250         backslashes to the HAVE_CASE_INSENSITIVE_FS case.
251         Reported by <Brian_Benning@aksteel.com>.
253 2002-07-10  Paul D. Smith  <psmith@gnu.org>
255         * variable.c (pop_variable_scope): Remove variable made unused by
256         new hash infrastructure.
257         * read.c (dep_hash_cmp): Rewrite this to handle ignore_mtime
258         comparisons as well as name comparisons.
259         * variable.h: Add a prototype for new hash_init_function_table().
260         * file.c (lookup_file): Remove variables made unused by new hash
261         infrastructure.
262         * dir.c (directory_contents_hash_2): Missing return of hash value.
263         (dir_contents_file_exists_p): Remove variables made unused by new
264         hash infrastructure.
267         Installed Greg McGary's integration of the hash functions from the
268         GNU id-utils package:
270 2002-07-10  Greg McGary  <greg@mcgary.org>
272         * scripts/functions/filter-out: Add literals to to the
273         pattern space in order to add complexity, and trigger
274         use of an internal hash table.  Fix documentation strings.
275         * scripts/targets/INTERMEDIATE: Reverse order of files
276         passed to expected `rm' command.
278 2002-07-10  Greg McGary  <greg@mcgary.org>
280         * Makefile.am (SRCS): Add hash.c (noinst_HEADERS): Add hash.h
281         * hash.c: New file, taken from id-utils.
282         * hash.h: New file, taken from id-utils.
284         * make.h (HASH, HASHI): Remove macros.
285         (find_char_unquote): Change arglist in decl.
286         (hash_init_directories): New function decl.
287         * variable.h (hash.h): New #include.
288         (MAKELEVEL_NAME, MAKELEVEL_LENGTH): New constants.
289         * filedef.h (hash.h): New #include.
290         (struct file) [next]: Remove member.
291         (file_hash_enter): Remove function decl.
292         (init_hash_files): New function decl.
294         * ar.c (ar_name): Delay call to strlen until needed.
295         * main.c (initialize_global_hash_tables): New function.
296         (main): Call it.  Use MAKELEVEL_NAME & MAKELEVEL_LENGTH.
297         * misc.c (remove_comments): Pass char constants to find_char_unquote.
298         * remake.c (notice_finished_file): Update last_mtime on `prev' chain.
300         * dir.c (hash.h): New #include.
301         (struct directory_contents) [next, files]: Remove members.
302         [ctime]: Add member for VMS.  [dirfiles]: Add hash-table member.
303         (directory_contents_hash_1, directory_contents_hash_2,
304         directory_contents_hash_cmp): New functions.
305         (directories_contents): Change type to `struct hash_table'.
306         (struct directory) [next]: Remove member.
307         (directory_hash_1, directory_hash_2, directory_hash_cmp): New funcs.
308         (directory): Change type to `struct hash_table'.
309         (struct dirfile) [next]: Remove member.
310         [length]: Add member.  [impossible]: widen type to fill alignment gap.
311         (dirfile_hash_1, dirfile_hash_2, dirfile_hash_cmp): New functions.
312         (find_directory): Use new hash table package.
313         (dir_contents_file_exists_p): Likewise.
314         (file_impossible): Likewise.
315         (file_impossible_p): Likewise.
316         (print_dir_data_base): Likewise.
317         (open_dirstream): Likewise.
318         (read_dirstream): Likewise.
319         (hash_init_directories): New function.
321         * file.c (hash.h): New #include.
322         (file_hash_1, file_hash_2, file_hash_cmp): New functions.
323         (files): Change type to `struct hash_table'.
324         (lookup_file): Use new hash table package.
325         (enter_file): Likewise.
326         (remove_intermediates): Likewise.
327         (snap_deps): Likewise.
328         (print_file_data_base): Likewise.
330         * function.c
331         (function_table_entry_hash_1, function_table_entry_hash_2,
332         function_table_entry_hash_cmp): New functions.
333         (lookup_function): Remove `table' argument.
334         Use new hash table package.
335         (struct a_word) [chain, length]: New members.
336         (a_word_hash_1, a_word_hash_2, a_word_hash_cmp): New functions.
337         (struct a_pattern): New struct.
338         (func_filter_filterout): Pass through patterns noting boundaries
339         and '%', if present.  Note a_word length.  Use a hash table if
340         arglists are large enough to justify cost.
341         (function_table_init): Renamed from function_table.
342         (function_table): Declare as `struct hash_table'.
343         (FUNCTION_TABLE_ENTRIES): New constant.
344         (hash_init_function_table): New function.
346         * read.c (hash.h): New #include.
347         (read_makefile): Pass char constants to find_char_unquote.
348         (dep_hash_1, dep_hash_2, dep_hash_cmp): New functions.
349         (uniquize_deps): Use hash table to efficiently identify duplicates.
350         (find_char_unquote): Accept two char-constant stop chars, rather
351         than a string constant, avoiding zillions of calls to strchr.
352         Tighten inner search loops to test only for desired delimiters.
354         * variable.c (variable_hash_1, variable_hash_2,
355         variable_hash_cmp): New functions.
356         (variable_table): Declare as `struct hash_table'.
357         (global_variable_set): Remove initialization.
358         (init_hash_global_variable_set): New function.
359         (define_variable_in_set): Use new hash table package.
360         (lookup_variable): Likewise.
361         (lookup_variable_in_set): Likewise.
362         (initialize_file_variables): Likewise.
363         (pop_variable_scope): Likewise.
364         (create_new_variable_set): Likewise.
365         (merge_variable_sets): Likewise.
366         (define_automatic_variables): Likewise.
367         (target_environment): Likewise.
368         (print_variable_set): Likewise.
370 2002-07-10  Paul D. Smith  <psmith@gnu.org>
372         Implement the SysV make syntax $$@, $$(@D), and $$(@F) in the
373         prerequisite list.  A real SysV make will expand the entire
374         prerequisites list _twice_: we don't do that as it's a big
375         backward-compatibility problem.  We only replace those specific
376         variables.
378         * read.c (record_files): Replace any $@, $(@D), and $(@F) variable
379         references left in the list of prerequisites.  Check for .POSIX as
380         we record targets, so we can disable non-POSIX behavior while
381         reading makefiles as well as running them.
382         (eval): Check the prerequisite list to see if we have anything
383         that looks like a SysV prerequisite variable reference.
385 2002-07-09  Paul D. Smith  <psmith@gnu.org>
387         * doc/make.texi (Prerequisite Types): Add a new section describing
388         order-only prerequisites.
390         * read.c (uniquize_deps): If we have the same file as both a
391         normal and order-only prereq, get rid of the order-only prereq,
392         since the normal one supersedes it.
394 2002-07-08  Paul D. Smith  <psmith@gnu.org>
396         * AUTHORS: Added Greg McGary to the AUTHORS file.
397         * NEWS: Blurbed order-only prerequisites.
398         * file.c (print_file): Show order-only deps properly when printing
399         the database.
401         * maintMakefile: Add "update" targets for wget'ing the latest
402         versions of various external files.  Taken from Makefile.maint in
403         autoconf, etc.
405         * dosbuild.bat: Somehow we got _double_ ^M's.  Remove them.
406         Reported by Eli Zaretskii <eliz@is.elta.co.il>.
408 2002-07-07  Paul D. Smith  <psmith@gnu.org>
410         * po/*.po: Remove.  We'll use wget to retrieve them at release
411         time.
413         * variable.c (do_variable_definition) [W32]: On W32 using cmd
414         rather than a shell you get an exception.  Make sure we look up
415         the variable.  Patch provided by Eli Zaretskii <eliz@is.elta.co.il>.
417         * remake.c (notice_finished_file): Fix handling of -t flag.
418         Patch provided by Henning Makholm <henning@makholm.net>.
420         * implicit.c (pattern_search): Some systems apparently run short
421         of stack space, and using alloca() in this function caused an
422         overrun.  I modified it to use xmalloc() on the two variables
423         which seemed like they might get large.  Fixes Bug #476.
425         * main.c (print_version): Update copyright notice to conform with
426         GNU standards.
427         (print_usage): Update help output.
429         * function.c (func_eval): Create a new make function, $(eval
430         ...).  Expand the arguments, put them into a buffer, then invoke
431         eval_buffer() on the resulting string.
432         (func_quote): Create a new function, $(quote VARNAME).  Inserts
433         the value of the variable VARNAME without expanding it any
434         further.
436         * read.c (struct ebuffer): Change the linebuffer structure to an
437         "eval buffer", which can be either a file or a buffer.
438         (eval_makefile): Move the code in the old read_makefile() which
439         located a makefile into here: create a struct ebuffer with that
440         information.  Have it invoke the new function eval() with that
441         ebuffer.
442         (eval_buffer): Create a new function that creates a struct ebuffer
443         that holds a string buffer instead of a file.  Have it invoke
444         eval() with that ebuffer.
445         (eval): New function that contains the guts of the old
446         read_makefile() function: this function parses makefiles.  Obtains
447         data to parse from the provided ebuffer.  Some modifications to
448         make the flow of the function cleaner and clearer.  Still could
449         use some work here...
450         (do_define): Takes a struct ebuffer instead of a FILE*.  Read the
451         contents of the define/endef variable from the ebuffer.
452         (readstring): Read the next line from a string-style ebuffer.
453         (readline): Read the next line from an ebuffer.  If it's a string
454         ebuffer, invoke readstring().  If it's a FILE* ebuffer, read it
455         from the file.
457         * dep.h (eval_buffer): Prototype eval_buffer();
459         * variable.c (do_variable_definition): Make sure that all
460         non-target-specific variables are registered in the global set.
461         If we're invoked from an $(eval ...) we might be inside a $(call
462         ...) or other function which has pushed a variable scope; we still
463         want to define our variables from evaluated makefile code in the
464         global scope.
466 2002-07-03  Greg McGary  <greg@mcgary.org>
468         * dep.h (struct dep) [ignore_mtime]: New member.
469         [changed]: convert to a bitfield.
470         * implicit.c (pattern_search): Zero ignore_mtime.
471         * main.c (main, handle_non_switch_argument): Likewise.
472         * rule.c (convert_suffix_rule): Likewise.
473         * read.c (read_all_makefiles, read_makefile, multi_glob): Likewise.
474         (read_makefile): Parse '|' in prerequisite list.
475         (uniquize_deps): Consider ignore_mtime when comparing deps.
476         * remake.c (update_file_1, check_dep): Don't force remake for
477         dependencies that have d->ignore_mtime.
478         * commands.c (FILE_LIST_SEPARATOR): New constant.
479         (set_file_variables): Don't include a
480         prerequisite in $+, $^ or $? if d->ignore_mtime.
481         Define $|.
483 2002-06-18  Paul D. Smith  <psmith@gnu.org>
485         * make.texinfo: Updates for next revision.  New date/rev/etc.
486         Recreate all Info menus.  Change license on the manual to the GNU
487         Free Documentation License.  A number of typos.
488         (Variables Simplify): Don't use "-" before it's defined.
489         (Automatic Prerequisites): Rewrite the target example to work
490         properly if the compile fails.  Remove incorrect comments about
491         how "set -e" behaves.
492         (Text Functions): Move the "word", "wordlist", "words", and
493         "firstword" functions here, from "File Name Functions".
494         * make-stds.texi: Update from latest GNU version.
495         * fdl.texi: (created) Import the latest GNU version.
497 2002-06-06  Paul D. Smith  <psmith@gnu.org>
499         * variable.c (do_variable_definition): New function: extract the
500         part of try_variable_definition() that actually sets the value
501         into a separate function.
502         (try_variable_definition): Call do_variable_definition() after
503         parsing the variable definition string.
504         (define_variable_in_set): Make the name argument const.
506         * variable.h (enum variable_flavor): Make public.
507         (do_variable_definition): Create prototype.
509         * read.c (read_all_makefiles): Create a new built-in variable,
510         MAKEFILE_LIST.
511         (read_makefile): Add each makefile read in to this variable value.
513 2002-05-18  Eli Zaretskii  <eliz@is.elta.co.il>
515         * Makefile.DOS.template: Tweak according to changes in the
516         distribution.  Add back the dependencies of *.o files.
518         * configh.dos.template: Synchronize with config.h.in.
520 2002-05-09  Paul D. Smith  <psmith@gnu.org>
522         * file.c (file_timestamp_now): Use K&R function declaration.
524         * getloadavg.c (getloadavg): Merge setlocale() fix from sh-utils
525         getloadavg.c.  Autoconf thinks QNX is SVR4-like, but it isn't, so
526         #undef it.  Remove predefined setup of NLIST_STRUCT.  Decide
527         whether to include nlist.h based on HAVE_NLIST_H.  Change obsolete
528         NLIST_NAME_UNION to new HAVE_STRUCT_NLIST_N_UN_N_NAME.
529         * configure.in (NLIST_STRUCT): Define this if we have nlist.h and
530         nlist.n_name is a pointer rather than an array.
532         * acinclude.m4 (make_FUNC_SETVBUF_REVERSED): Grab the latest
533         version of AC_FUNC_SETVBUF_REVERSED from autoconf CVS.
534         * configure.in: Use it instead of the old version.
536         * main.c (main): Prefer setvbuf() to setlinebuf().
538 2002-05-08  Paul D. Smith  <psmith@gnu.org>
540         * Makefile.am (make_LDADD): Add GETLOADAVG_LIBS.
541         (loadavg_LDADD): Ditto.
543 2002-04-29  Paul D. Smith  <psmith@gnu.org>
545         * expand.c (recursively_expand_for_file): Rename
546         recursively_expand() to recursively_expand_for_file() and provide
547         an extra argument, struct file.  If the argument is provided, set
548         the variable scope to that of the file before expanding.
549         * variable.h (recursively_expand): Make this a macro that invokes
550         recursively_expand_for_file() with a NULL file pointer.
551         * variable.c (target_environment): Call the renamed function and
552         provide the current file context.
553         Fixes Debian bug #144306.
555 2002-04-28  Paul D. Smith  <psmith@gnu.org>
557         Allow $(call ...) user-defined variables to be self-referencing
558         without throwing an error.  Allows implementation of transitive
559         closures, among other possibly useful things.
560         Requested by: Philip Guenther <guenther@sendmail.com>
562         * variable.h (struct variable): Add a new field: exp_count, and
563         new macros to hold its size and maximum value.
564         (warn_undefined): Make this a macro.
565         * variable.c (define_variable_in_set): Initialize it.
566         * expand.c (recursively_expand): If we detect recursive expansion
567         of a variable, check the exp_count field.  If it's greater than 0
568         allow the recursion and decrement the count.
569         (warn_undefined): Remove this (now a macro in variable.h).
570         * function.c (func_call): Before we expand the user-defined
571         function, modify its exp_count field to contain the maximum
572         number of recursive calls we'll allow.  After the call, reset it
573         to 0.
575 2002-04-21  Paul D. Smith  <psmith@gnu.org>
577         Modified to use latest autoconf (2.53), automake (1.6.1), and
578         gettext (0.11.1).  We're using gettext's new "external" support,
579         to avoid including libintl source with GNU make.
581         * README.cvs: New file.  Explain how to build GNU make from CVS.
583         * configure.in: Modify checking for the system glob library.
584         Use AC_EGREP_CPP instead of AC_TRY_CPP.  Remove the setting of
585         GLOBDIR (we will always put "glob" in SUBDIRS, so automake
586         etc. will manage it correctly).  Set an automake conditional
587         USE_LOCAL_GLOB to decide whether to compile the glob library.
589         * getloadavg.c (main): Include make.h in the "TEST" program to
590         avoid warnings.
592         * Makefile.am: Remove special rules for loadavg.  Replace them
593         with Automake capabilities for building extra programs.
595         * signame.c: This file does nothing if the system provide
596         strsignal().  If not, it implements strsignal().  If the system
597         doesn't define sys_siglist, then we make our own; otherwise we use
598         the system version.
599         * signame.h: Removed.
601         * main.c (main): No need to invoke signame_init().  Update copyright.
603         * ABOUT-NLS: Removed.
604         * gettext.c: Removed.
605         * gettext.h: Get a simplified copy from the gettext package.
606         * po/*: Created.
607         * i18n/*.po: Moved to po/.
608         * i18n/: Removed.
610         * config/*: Created.  Contains package configuration helper files.
611         * config.guess, config.sub: Moved to config directory.
613         * configure.in (AC_CONFIG_FILES): Add po/Makefile.in, config/Makefile.
614         Rework to use new-style autoconf features.  Use the "external"
615         mode for gettext.  Make the build.sh config file conditional on
616         whether build.sh.in exists, to avoid autoconf errors.
617         * acinclude.m4: Removed almost all macros as being obsolete.
618         Rewrote remaining macros to use AC_DEFINE.
619         * acconfig.h: Removed.
621         * Makefile.am (EXTRA_DIST): Add config/config.rpath.  Use a
622         conditional to handle customs support.  Remove special handling
623         for i18n features.
625 2002-04-20  Paul D. Smith  <psmith@gnu.org>
627         * function.c (func_call): Don't mark the argument variables $1,
628         etc. as recursive.  They've already been fully expanded so
629         there's no need to do it again, and doing so strips escaped $'s.
630         Reported by Sebastian Glita <glseba@yahoo.com>.
632         * remake.c (notice_finished_file): Walk through double-colon
633         entries via the prev field, not the next field!
634         Reported by Greg McGary <greg@mcgary.org>.
636         * main.c (main): If the user specifies -q and asks for a specific
637         target which is a makefile, we got an assert.  In that case it
638         turns out we should continue normally instead.
640         * i18n/de.po, i18n/fr.po: Installed an updated translation.
642         * i18n/he.po: Installed a new translation.
644 2002-01-07  Paul D. Smith  <psmith@gnu.org>
646         * i18n/es.po, i18n/ru.po: Installed an updated translation.
648 2001-12-04  Paul D. Smith  <psmith@gnu.org>
650         * i18n/ja.po: Installed an updated translation.
652 2001-09-04  Paul D. Smith  <psmith@gnu.org>
654         * i18n/da.po: Installed an updated translation.
656 2001-08-03  Paul D. Smith  <psmith@gnu.org>
658         * i18n/fr.po: Installed an updated translation.
659         Resolves Debian bug #106720.
661 2001-06-13  Paul D. Smith  <psmith@gnu.org>
663         * i18n/da.po, configure.in (ALL_LINGUAS): Installed a new
664         translation.
666 2001-06-11  Paul D. Smith  <psmith@gnu.org>
668         * i18n/ko.po: Installed a new translation.
670 2001-05-06  Paul D. Smith  <psmith@gnu.org>
672         Modify the EINTR handling.
674         * job.c (new_job): Reorganize the jobserver algorithm.  Reorder
675         the way in which we manage the file descriptor/signal handler race
676         trap to be more efficient.
678 2001-05-06  Paul Eggert  <eggert@twinsun.com>
680         Restart almost all system calls that are interrupted, instead
681         of worrying about EINTR.  The lone exception is the read() for
682         job tokens.
684         * configure.in (HAVE_SA_RESTART): New macro.
685         (MAKE_JOBSERVER): Define to 1 only if HAVE_SA_RESTART.
686         * main.c (main): Use SA_RESTART instead of the old,
687         nonstandard SA_INTERRUPT.
689         * configure.in (AC_CHECK_FUNCS): Add bsd_signal.
690         * main.c (bsd_signal): New function or macro,
691         if the implementation doesn't supply it.
692         (The bsd_signal function will be in POSIX 1003.1-200x.)
693         (HANDLESIG): Remove.
694         (main, FATAL_SIG): Use bsd_signal instead of signal or HANDLESIG.
696         * make.h (EINTR_SET): Remove.
697         (SA_RESTART): New macro.
699         * arscan.c (ar_member_touch): Don't worry about EINTR.
700         * function.c (func_shell): Likewise.
701         * job.c (reap_children, free_child, new_job): Likewise.
702         * main.c (main): Likewise.
703         * remake.c (touch_file, name_mtime): Likewise.
705         * arscan.c (ar_member_touch): Fix bug uncovered by EINTR removal;
706         if fstat failed with errno!=EINTR, the error was ignored.
708         * job.c (set_child_handler_action_flags): New function.
709         (new_job): Use it to temporarily clear the SIGCHLD action flags
710         while reading the token.
712 2001-05-02  Paul D. Smith  <psmith@gnu.org>
714         * job.c (start_job_command): Don't add define/endef per-line flags
715         to the top-level flags setting.
717 2001-04-03  Paul D. Smith  <psmith@gnu.org>
719         * arscan.c (VMS_get_member_info,ar_scan) [VMS]: VMS sets the low
720         bit on error, so check for odd return values, not non-0 return
721         values.
722         (VMS_get_member_info): Calculate the timezone differences correctly.
723         Reported by John Fowler <jfowler@nyx.net>.
726 2001-03-14  Paul D. Smith  <psmith@gnu.org>
728         * variable.c (lookup_variable) [VMS]: Null-terminate the variable
729         value before invoking define_variable().
730         Reported by John Fowler <jfowler@nyx.net>.
732 2001-02-07  Paul D. Smith  <psmith@gnu.org>
734         * read.c (record_target_var): If we reset the variable due to a
735         command-line variable setting overriding it, turn off the "append"
736         flag.
738 2001-01-17  Paul D. Smith  <psmith@gnu.org>
740         * variable.c (lookup_variable) [VMS]: When getting values from the
741         environment, allocate enough space for the _value_ plus escapes,
742         not enough space for the name plus escapes :-/.
743         Reported by John Fowler <jfowler@nyx.net>.
745         * remake.c (f_mtime): Removed the "***" prefix from the mod time
746         warnings that make generates, so it doesn't look like an error.
747         Reported by Karl Berry <karl@gnu.org>.
750         Fix for PR/2020:  Rework appended target-specific variables.  I'm
751         fairly confident this algorithm is finally correct.
753         * expand.c (allocated_variable_append): Rewrite.  Instead of
754         expanding each appended variable then adding all the expanded
755         strings together, we append all the unexpanded values going up
756         through the variable set contexts, then expand the final result.
757         This behaves just like non-target-specific appended variable
758         values, while the old way didn't in various corner cases.
759         (variable_append): New function: recursively append the unexpanded
760         value of a variable, walking from the outermost variable scope to
761         the innermost.
762         * variable.c (lookup_variable): Remove the code that looked up the
763         variable set list if the found variable was "append".  We don't
764         need this anymore.
765         (lookup_variable_in_set): Make this non-static so we can use it
766         elsewhere.
767         (try_variable_definition): Use lookup_variable_in_set() rather
768         than faking out current_variable_set_list by hand (cleanup).
769         * variable.h: Add a prototype for the now non-static
770         lookup_variable_in_set().
772 2000-11-17  Paul D. Smith  <psmith@gnu.org>
774         * remake.c (f_mtime) [WINDOWS32]: On various advice, I changed the
775         WINDOWS32 port to assume timestamps can be up to 3 seconds away
776         before throwing a fit.
778 2000-11-17  Paul D. Smith  <psmith@gnu.org>
780         * read.c (readline): CRLF calculations had a hole, if you hit the
781         buffer grow scenario just right.  Reworked the algorithm to avoid
782         the need for len or lastlen at all.  Problem description with
783         sample code chages provided by Chris Faylor <cgf@redhat.com>.
785 2000-10-24  Paul D. Smith  <psmith@gnu.org>
787         * gettext.c (SWAP): Declare this with the prototype, otherwise
788         some systems don't work (non-32-bit?  Reported for Cray T3E).
789         Reported by Thorstein Thorsteinsson <thor@signe.teokem.lu.se>.
791 2000-10-05  Paul D. Smith  <psmith@gnu.org>
793         * acinclude.m4 (AM_LC_MESSAGES): Remove undefined macro
794         AM_LC_MESSAGES; it doesn't seem to do anything anyway??
796         * i18n/gl.po, configure.in (ALL_LINGUAS): New Galician translation.
798 2000-09-22  Paul D. Smith  <psmith@gnu.org>
800         * gettext.c: Don't #define _GETTEXT_H here; we only include some
801         parts of the real gettext.h here, and we expect to really include
802         the real gettext.h later.  If we keep this #define, it's ignored.
804 2000-09-21  Paul D. Smith  <psmith@gnu.org>
806         * main.c (log_working_directory): Rework the text to use complete
807         sentences, to make life simpler for the translators.
809 2000-08-29  Paul D. Smith  <psmith@gnu.org>
811         * file.c (remove_intermediates): Print a debug message before we
812         remove intermediate files, so the user (if she uses -d) knows
813         what's going on.
815 2000-08-21  Paul D. Smith  <psmith@gnu.org>
817         * variable.c (try_variable_definition): Change how we handle
818         target-specific append variable defns: instead of just setting the
819         value, expand it as an append _but_ only within the current
820         target's context.  Otherwise we lose all but the last value if the
821         variable is appended more than once within the current target
822         context.  Fixes PR/1831.
824 2000-08-16  Paul D. Smith  <psmith@gnu.org>
826         * function.c (func_shell): Nul-terminate the buffer before
827         printing an exec error message (just in case it's not!).
828         Fixes PR/1860, reported by Joey Hess <joey@valinux.com>.
830 2000-07-25  Paul D. Smith  <psmith@gnu.org>
832         * job.c (construct_command_argv_internal): Add "~" to the list of
833         sh_chars[] which disallow optimizing out the shell call.
835 2000-07-23  Paul Eggert  <eggert@twinsun.com>
837         * NEWS, make.texinfo: Document .LOW_RESOLUTION_TIME, which
838         supersedes --disable-nsec-timestamps.
839         * make.texinfo: Consistently use "time stamp" instead of "timestamp".
840         * README: Remove --disable-nsec-timestamps.
842         * filedef.h (struct file.low_resolution_time): New member.
843         * file.c (snap_deps): Add support for .LOW_RESOLUTION_TIME.
844         * remake.c (update_file_1):
845         Avoid spurious rebuilds due to low resolution time stamps,
846         generalizing the earlier code that applied only to archive members.
847         (f_mtime): Archive members always have low resolution time stamps.
849         * configure.in: Remove --disable-nsec-timestamps, as this has
850         been superseded by .LOW_RESOLUTION_TIME.
852 2000-07-23  Paul Eggert  <eggert@twinsun.com>
854         * configure.in (enable_nsec_timestamps): Renamed from
855         make_cv_nsec_timestamps, since enable/disable options
856         shouldn't be cached.
858 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
859        and  Paul Eggert  <eggert@twinsun.com>
861         * file.c (file_timestamp_now):
862         Use preprocessor-time check for FILE_TIMESTAMP_HI_RES
863         so that clock_gettime is not linked unless needed.
865         * filedef.h (FILE_TIMESTAMP_HI_RES):
866         Remove definition; "configure" now does this.
868         * configure.in (jm_AC_TYPE_UINTMAX_T): Move up,
869         to before high resolution file timestamp check,
870         since that check now uses uintmax_t.
871         (FILE_TIMESTAMP_HI_RES): Define to nonzero if the code should use
872         high resolution file timestamps.
873         (HAVE_CLOCK_GETTIME): Do not define if !FILE_TIMESTAMP_HI_RES,
874         so that we don't link in clock_gettime unnecessarily.
876 2000-07-17  Paul D. Smith  <psmith@gnu.org>
878         * i18n/ja.po: New version of the translation file.
880 2000-07-07  Paul D. Smith  <psmith@gnu.org>
882         * remake.c (f_mtime): If NO_FLOAT is defined, don't bother with
883         the offset calculation.
884         (name_mtime): Replace EINTR test with EINTR_SET macro.
886 2000-07-07  Paul Eggert  <eggert@twinsun.com>
888         Fix for PR/1811:
890         * remake.c (update_file_1):
891         Avoid spurious rebuilds of archive members due to their
892         timestamp resolution being only one second.
893         (f_mtime): Avoid spurious warnings of timestamps in the future due to
894         the clock's resolution being lower than file timestamps'.
895         When warning about future timestamps, report only the discrepancy,
896         not the absolute value of the timestamp and the current time.
898         * file.c (file_timestamp_now): New arg RESOLUTION.
899         * filedef.h (file_timestamp_now): Likewise.
900         (FILE_TIMESTAMP_NS): Now returns int.  All uses changed.
902 2000-07-05  Paul D. Smith  <psmith@gnu.org>
904         * variable.c (lookup_variable) [VMS]: Remove vestigial references
905         to listp.  Fixes PR/1793.
907 2000-06-26  Paul Eggert  <eggert@twinsun.com>
909         * Makefile.am (MAINTAINERCLEANFILES): New macro, with stamp-pot in it.
911         * dir.c (vms_hash): Ensure ctype macro args are nonnegative.
913         * remake.c (f_mtime): Remove unused var memtime.
915 2000-06-25  Martin Buchholz  <martin@xemacs.org>
917         * make.texinfo, NEWS, TODO.private: Minor spelling corrections.
918         Ran spell-check on make.texinfo.
921 See ChangeLog.2 for earlier changes.