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