Some code cleanups and efficiency enhancements. As far as I can tell
[make/kirr.git] / ChangeLog
blob4ae898bf8b9cc09d68a3e3f5eaf33804809764f2
1 2004-09-21  Paul D. Smith  <psmith@gnu.org>
3         * read.c (readstring): Fix some logic errors in backslash handling.
4         (eval): Remove some unnecessary processing in buffer handling.
5         (record_target_var): Assert that parse_variable_definition() succeeded.
6         Reported by: Markus Mauhart <qwe123@chello.at>.
8         * misc.c: Removed the sindex() function.  All instances of this
9         function were trivially replaceable by the standard strstr()
10         function, and that function will always have better (or certainly
11         no worse) performance than the very simple-minded algorithm
12         sindex() used.  This can matter with complex makefiles.
13         * make.h: Remove the prototype for sindex().
14         * function.c (subst_expand): Convert sindex() call to strstr().
15         This means we no longer need to track the TLEN value so remove that.
16         (func_findstring): Convert sindex() to strstr().
17         * commands.c (chop_commands): Convert sindex() calls to strstr().
18         Suggested by: Markus Mauhart <qwe123@chello.at>.
20         * main.c (find_and_set_default_shell) [WINDOWS32]: Implement the
21         idea behind Savannah Patch #3144 from david.baird@homemail.com.
22         If SHELL is set to CMD.EXE then assume it's batch-mode and
23         non-unixy.  I wrote the code differently from the patch, though,
24         to make it safer.
26 2004-09-20  Paul D. Smith  <psmith@gnu.org>
28         * expand.c (variable_expand_string): Modify to invoke
29         patsubst_expand() instead of subst_expand(); the latter didn't
30         handle suffix patterns correctly.
31         * function.c (subst_expand): Remove the SUFFIX_ONLY parameter; it
32         was used only from variable_expand_string() and is no longer used
33         there.
34         (func_subst): Ditto, on call to subst_expand().
35         (patsubst_expand): Require the percent pointers to point to the
36         character after the %, not to the % itself.
37         * read.c (record_files): New call criteria for patsubst_expand().
38         * variable.h: Remove SUFFIX_ONLY from subst_expand() prototype.
39         This is to fix a bug reported by Markus Mauhart <qwe123@chello.at>.
41 2004-09-19  Paul D. Smith  <psmith@gnu.org>
43         * function.c (subst_expand): Fix a check in by_word: look for a
44         previous blank if we're beyond the beginning of the string, not
45         the beginning of the word.
46         Bugs reported by Markus Mauhart <qwe123@chello.at>.
48 2004-05-16  Paul D. Smith  <psmith@gnu.org>
50         * remake.c (update_goal_chain): Change the argument specifying
51         whether we're rebuilding makefiles to be a global variable,
52         REBUILDING_MAKEFILES.
53         (complain): Extract the code that complains about no rules to make
54         a target into a separate function.
55         (update_file_1): If we tried to rebuild a file during the makefile
56         rebuild phase and it was dontcare, then no message was printed.
57         If we then try to build the same file during the normal build,
58         print a message this time.
59         (remake_file): Don't complain about un-remake-able files when
60         we're rebuilding makefiles.
62 2004-05-11  Paul D. Smith  <psmith@gnu.org>
64         * job.c (construct_command_argv_internal): OS/2 patches from
65         Andreas Buening <andreas.buening@nexgo.de>.
67 2004-05-10  Paul D. Smith  <psmith@gnu.org>
69         * remake.c (update_file): Don't walk the double-colon chain unless
70         this is a double-colon rule.  Fix suggested by Boris Kolpackov
71         <boris@kolpackov.net>.
73         * makefile.vms (CFLAGS): Remove glob/globfree (see readme.vms docs)
74         * readme.vms: New section describing OpenVMS support and issues.
75         * default.c (default_variables): Add support for IA64.
76         * job.c (tryToSetupYAst) [VMS]: On VMS running make in batch mode
77         without some privilege aborts make with the error
78         %SYSTEM-F-NOPRIV. It happens when setting up a handler for
79         pressing Ctrl+Y and the input device is no terminal. The change
80         catches this error and just continues.
82         Patches by Hartmut Becker <Hartmut.Becker@hp.com>
84 2004-04-25  Paul D. Smith  <psmith@gnu.org>
86         * commands.c (set_file_variables): Set $< properly in the face of
87         order-only prerequisites.
88         Patch from Boris Kolpackov <boris@kolpackov.net>
90 2004-04-21  Bob Byrnes  <byrnes@curl.com>
92         * main.c (main): Notice failures to remake makefiles.
94 2004-03-28  Paul D. Smith  <psmith@gnu.org>
96         Patches for Acorn RISC OS by Peter Naulls <peter@chocky.org>
98         * job.c: No default shell for RISC OS.
99         (load_too_high): Hard-code the return to 1.
100         (construct_command_argv_internal): No sh_chars or sh_cmds.
101         * getloadavg.c: Don't set LOAD_AVE_TYPE on RISC OS.
103 2004-03-20  Paul D. Smith  <psmith@gnu.org>
105         * variable.c (do_variable_definition): Don't append from the
106         global set if a previous non-appending target-specific variable
107         definition exists.  Reported by Oliver Schmidt <oschmidt@gmx.net>
108         (with fix).
110         * expand.c (reference_variable): Don't give up on variables with
111         no value that have the target-specific append flag set: they might
112         have a value after all.  Reported by Oliver Schmidt
113         <oschmidt@gmx.net> (with fix) and also by Maksim A. Nikulin
114         <nikulin@dx1cmd.inp.nsk.su>.
116         * rule.c (count_implicit_rule_limits): Don't delete patterns which
117         refer to absolute pathnames in directories that don't exist: some
118         portion of the makefile could create those directories before we
119         match the pattern.  Fixes bugs #775 and #108.
121         Fixes from Jonathan R. Grant  <jg-make@jguk.org>:
123         * main.c (main): Free makefile_mtimes if we have any.
124         * README.W32.template: Update documentation for the current status
125         of the MS-Windows port.
126         * NMakefile.template (MAKE): Add "MAKE = nmake".  A conflicting
127         environment variable is sometimes already defined which causes the
128         build to fail.
129         * main.c (debug_signal_handler): Only define this function if
130         SIGUSR1 is available.
132         Fixes for OS/2 from Andreas Beuning <andreas.buening@nexgo.de>:
134         * configure.in [OS/2]: Relocate setting of HAVE_SA_RESTART for OS/2.
135         * README.OS2.template: Documentation updates.
136         * build.template: Add LIBINTL into LOADLIBES.  Add $CFLAGS to the
137         link line for safety.
138         * maintMakefile (build.sh.in): Remove an extraneous ")".
139         * job.c (child_execute_job): Close saved FDs.
140         * job.c (exec_command) [OS/2]: exec_command(): If the command
141         can't be exec'ed and if the shell is not Unix-sh, then try again
142         with argv = { "cmd", "/c", ... }. Normally, this code is never
143         reached for the cmd shell unless the command really doesn't exist.
144         (construct_command_argv_internal) [OS/2]: The code for cmd
145         handling now uses new_argv = { "cmd", "/c", "original line", NULL}.
146         The CMD builtin commands are case insensitive so use strcasecmp().
148 2004-03-19  Paul D. Smith  <psmith@gnu.org>
150         * read.c (do_define): Re-order line counter increment so the count
151         is accurate (we were losing one line per define).  Reported by
152         Dave Yost <Dave@Yost.com>.
154 2004-03-06  Paul D. Smith  <psmith@gnu.org>
156         * configure.in (HAVE_ANSI_COMPILER): Define if we have an ANSI/ISO
157         compiler.
158         * make.h: Convert uses of __STDC__ to HAVE_ANSI_COMPILER.
159         * misc.c (message,error,fatal): Ditto.
160         * configh.dos.template: Define HAVE_ANSI_COMPILER.
161         * config.h.W32.template: Ditto.
162         * config.h-vms.template: Ditto.
163         * config.ami.template: Ditto.
165 2004-03-04  Paul D. Smith  <psmith@gnu.org>
167         * README.template: Add a note about broken /bin/sh on SunOS
168         4.1.3_U1 & 4.1.4.  Fix up Savannah links.
170         * misc.c (message, error, fatal): Don't use "..." if we're using
171         varargs.  ansi2knr should handle this but it doesn't work: it
172         translates "..." to va_dcl etc. but _AFTER_ the preprocessor is
173         done.  On many systems (SunOS for example) va_dcl is a #define.
174         So, force the use of the non-"..." version on pre-ANSI compilers.
176         * maintMakefile (sign-dist): Create some rules to help automate
177         the new GNU ftp upload method.
179 2004-02-24  Paul D. Smith  <psmith@gnu.org>
181         * config.h.W32.template: Add HAVE_STDARG_H
182         * config.h-vms.template: Ditto.
183         * config.ami.template: Ditto.
185 2004-02-23  Jonathan Grant  <jg-make@jguk.org>
187         * README.W32.template: Add a notation about -j with BATCH_MODE_ONLY.
188         * build_w32.bat: Remove extra "+".
190 2004-02-23  Paul D. Smith  <psmith@gnu.org>
192         * make.h: Create an UNUSED macro to mark unused parameters.
193         * (many): Clean up warnings by applying UNUSED, fixing
194         signed/unsigned incompatibilities, etc.
196         * acinclude.m4 (AC_STRUCT_ST_MTIM_NSEC): Add quoting to silence
197         autoconf warnings.
198         * filedef.h: Name the command_state enumeration.
199         * file.c (set_command_state): Use the enumeration in the function
200         argument.
202         * configure.in: Explicitly set SET_MAKE to empty, to disable
203         MAKE=make even when no make already exists.  Fix bug #3823.
205 2004-02-22  Paul D. Smith  <psmith@gnu.org>
207         * maintMakefile: Perl script to clean up all non-CVS files.  Use
208         it on all the subdirectories for the cvs-clean target.
210         * main.c (decode_switches): Require non-empty strings for all our
211         string command-line options.  Fixes Debian bug # 164165.
213         * configure.in: Check for stdarg.h and varargs.h.
214         * make.h (USE_VARIADIC): Set this if we can use variadic functions
215         for printing messages.
216         * misc.c: Check USE_VARIADIC instead of (obsolete) HAVE_STDVARARGS.
217         (message): Ditto.
218         (error): Ditto.
219         (fatal): Ditto.
221         A number of patches for OS/2 support from Andreas Buening
222         <andreas.buening@nexgo.de>:
224         * job.c (child_handler) [OS/2]: Allow this on OS/2 but we have to
225         disable the SIGCHLD handler.
226         (reap_children) [OS/2]: Remove special handling of job_rfd.
227         (set_child_handler_action_flags) [OS/2]: Use this function in OS/2.
228         (new_job) [OS/2]: Disable the SIGCHLD handler on OS/2.
229         * main.c (main) [OS/2]: Special handling for paths in OS/2.
230         * configure.in [OS/2]: Force SA_RESTART for OS/2.
231         * Makefile.am (check-regression): Use $(EXEEXT) for Windows-type
232         systems.
234 2004-02-21  Paul D. Smith  <psmith@gnu.org>
236         * w32/subproc/sub_proc.c (process_easy) [W32]: Christoph Schulz
237         <mail@kristov.de> reports that if process_begin() fails we don't
238         handle the error condition correctly in all cases.
239         * w32/subproc/w32err.c (map_windows32_error_to_string): Make sure
240         to have a newline on the message.
242         * job.c (construct_command_argv_internal): Add "test" to UNIX
243         sh_cmds[].  Fixes Savannah bug # 7606.
245 2004-02-04  Paul D. Smith  <psmith@gnu.org>
247         * job.c (vms_handle_apos) [VMS]: Fix various string handling
248         situations in VMS DCL.  Fixes Savannah bug #5533.  Fix provided by
249         Hartmut Becker <Hartmut.Becker@hp.com>.
251 2004-01-21  Paul D. Smith  <psmith@gnu.org>
253         * job.c (load_too_high): Implement an algorithm to control the
254         "thundering herd" problem when using -l to control job creation
255         via the load average.  The system only recomputes the load once a
256         second but we can start many jobs in a second.  To solve this we
257         keep track of the number of jobs started in the last second and
258         apply a weight to try to guess what a correct load would be.
259         The algorithm was provided by Thomas Riedl <thomas.riedl@siemens.com>.
260         Also fixes bug #4693.
261         (reap_children): Decrease the job count for this second.
262         (start_job_command): Increase the job count for this second.
264         * read.c (conditional_line): Expand the text after ifn?def before
265         checking to see if it's a single word.  Fixes bug #7257.
267 2004-01-09  Paul D. Smith  <psmith@gnu.org>
269         * file.c (print_file): Recurse to print all targets in
270         double-colon rules.  Fixes bug #4518, reported (with patch) by
271         Andrew Chatham <chatham@google.com>.
273 2004-01-07  Paul D. Smith  <psmith@gnu.org>
275         * acinclude.m4: Remove make_FUNC_SETVBUF_REVERSED.
276         * configure.in: Change make_FUNC_SETVBUF_REVERSED to
277         AC_FUNC_SETVBUF_REVERSED.
279         * doc/make.texi (Target-specific): Fix Savannah bug #1772.
280         (MAKE Variable): Fix Savannah bug #4898.
282         * job.c (construct_command_argv_internal): Add "!" to the list of
283         shell escape chars.  POSIX sh allows it to appear before a
284         command, to negate the exit code.  Fixes bug #6404.
286         * implicit.c (pattern_search): When matching an implicit rule,
287         remember which dependencies have the ignore_mtime flag set.
288         Original fix provided in Savannah patch #2349, by Benoit
289         Poulot-Cazajous <Benoit.Poulot-Cazajous@jaluna.com>.
291 2003-11-22  Paul D. Smith  <psmith@gnu.org>
293         * README.W32.template (Outputs): Clarification on -j with
294         BATCH_MODE_ONLY_SEHLL suggested by Jonathan R. Grant
295         <jg-make@jguk.org>.
297 2003-11-02  Paul D. Smith  <psmith@gnu.org>
299         * function.c (func_if): Strip all the trailing whitespace from the
300         condition, then don't expand it.  Fixed bug # 5798.
302         * expand.c (recursively_expand_for_file): If we're expanding a
303         variable with no file context, then use the variable's context.
304         Fixes bug # 6195.
306 2003-10-21  Paul D. Smith  <psmith@gnu.org>
308         * main.c (log_working_directory): Add newlines to printf()s.
310         * README.cvs: Add a note to ignore warnings during autoreconf.
312         * maintMakefile (po_repo): Set a new URL for PO file updates.
313         (get-config/config.guess get-config/config.sub): Get these files
314         from the Savannah config project instead of ftp.gnu.org.
316 2003-08-22  Paul D. Smith  <psmith@gnu.org>
318         * misc.c (xmalloc, xrealloc): Add one to 0 sizes, to cater to
319         systems which don't yet implement the C89 standard :-/.
321 2003-07-18  Paul D. Smith  <psmith@gnu.org>
323         * dir.c (directory_contents_hash_1, directory_contents_hash_1)
324         [WINDOWS32]: Initialize hash.
326 2003-06-19  Earnie Boyd  <earnie@uses.sf.net>
328         * dir.c (read_dirstream): Provide a workaround for broken versions of
329         the MinGW dirent structure.
331 2003-05-30  Earnie Boyd  <earnie@users.sf.net>
333         * w32/include/dirent.h: Add __MINGW32__ filter.
335 2003-05-30  Earnie Boyd  <earnie@users.sf.net>
337         * make.h: Add global declaration of *make_host.
338         * main.c (print_usage): Remove local declaration of *make_host.
339         (print_version): Display "This program built for ..." after Copyright
340         notice.
342 2003-05-30  Earnie Boyd  <earnie@users.sf.net>
344         * doc/make.texi: Change "ifinfo" to "ifnottex" as suggested by the
345         execution of "makeinfo --html make.texi".
347 2003-04-30  Paul D. Smith  <psmith@gnu.org>
349         * build.template: Make some changes to maybe allow this script to
350         work on DOS/Windows/OS2 systems.  Suggested by Andreas Buening.
352         * README.OS2.template: New file for OS/2 support.  Original
353         contributed by Andreas Buening.
354         * configure.in: Invoke new pds_AC_DOS_PATHS macro to test for
355         DOS-style paths.
357 2003-04-19  Paul D. Smith  <psmith@gnu.org>
359         Fix bug #1405: allow a target to match multiple pattern-specific
360         variables.
362         * rule.c (create_pattern_var, lookup_pattern_var): Move these to
363         variable.c, where they've always belonged.
364         * rule.h: Move the prototypes and struct pattern_var as well.
365         * variable.c (initialize_file_variables): Invoke
366         lookup_pattern_var() in a loop, until no more matches are found.
367         If a match is found, create a new variable set for the target's
368         pattern variables.  Then merge the contents of each matching
369         pattern variable set into the target's pattern variable set.
370         (lookup_pattern_var): Change this function to be usable
371         in a loop.  It takes a starting position: if NULL, start at the
372         beginning; if non-NULL, start with the pattern variable after that
373         position, and return the next matching pattern.
374         (create_pattern_var): Create a unique instance of
375         pattern-specific variables for every definition in the makefile.
376         Don't combine the same pattern together.  This allows us to
377         process the variable handling properly even when the same pattern
378         is used multiple times.
379         (parse_variable_definition): New function: break out the parsing
380         of a variable definition line from try_variable_definition.
381         (try_variable_definition): Call parse_variable_definition to
382         parse.
383         (print_variable_data_base): Print out pattern-specific variables.
384         * variable.h (struct variable): Remember when a variable is
385         conditional.  Also remember its flavor.
386         (struct pattern_var): Instead of keeping a variable set, we just
387         keep a single variable for each pattern.
388         * read.c (record_target_var): Each pattern variable contains only a
389         single variable, not a set, so create it properly.
390         * doc/make.texi (Pattern-specific): Document the new behavior.
392 2003-04-17  Paul D. Smith  <psmith@gnu.org>
394         * dir.c (file_exists_p) [VMS]: Patch provided with Bug #3018 by
395         Jean-Pierre Portier <portierjp2@free.fr>.  I don't understand the
396         file/directory naming rules for VMS so I can't tell whether this
397         is correct or not.
399 2003-04-09  Paul D. Smith  <psmith@gnu.org>
401         * configure.in (HAVE_DOS_PATHS): Define this on systems that need
402         DOS-style pathnames: backslash separators and drive specifiers.
404 2003-03-28  Paul D. Smith  <psmith@gnu.org>
406         * file.c (snap_deps): If .SECONDARY with no targets is given, set
407         the intermediate flag on all targets.  Fixes bug #2515.
409 2003-03-24  Paul D. Smith  <psmith@gnu.org>
411         * configure.in, Makefile.am, glob/Makefile.am, doc/Makefile.am:
412         Upgrade to autoconf 2.57 and automake 1.7.3.
414         * job.c: More OS/2 changes from Andreas Buening.
416         * file.c (print_file): Fix variable initialization.
417         Fixes bug #2892.
419         * remake.c (notice_finished_file):
421         * make.h (ENULLLOOP): Set errno = 0 before invoking the command;
422         some calls (like readdir()) return NULL in valid situations
423         without resetting errno.  Fixes bug #2846.
425 2003-02-25  Paul D. Smith  <psmith@gnu.org>
427         Port to OS/2 (__EMX__) by Andreas Buening <andreas.buening@nexgo.de>.
429         * job.c (_is_unixy_shell) [OS/2]: New function.
430         Set default shell to /bin/sh.
431         (reap_children): Close the job_rfd pipe here since we don't use a
432         SIGCHLD handler.
433         (set_child_handler_action_flags): define this to empty on OS/2.
434         (start_job_command): Close the jobserver pipe and use
435         child_execute_job() instead of fork/exec.
436         (child_execute_job): Rewrite to handle stdin/stdout FDs and spawn
437         rather than exec'ing, then reconfigure stdin/stdout.
438         (exec_command): Rewrite to use spawn instead of exec.  Return the
439         PID of the child.
441         * main.c (main) [OS/2]: Call initialize_main().  Handle argv[0] as
442         in DOS.  Handle the TEMP environment variable as in DOS.  Don't
443         use a SIGCHLD handler on OS/2.  Choose a shell as in DOS.  Don't
444         use -j in DOS mode.  Use child_execute_job() instead of
445         exec_command().
447         * function.c (func_shell) [OS/2]: Can't use fork/exec on OS/2: use
448         spawn() instead.
450         * job.h [OS/2]: Move CLOSE_ON_EXEC here from job.c.  Add
451         prototypes that return values.
453         * remake.c (f_mtime) [OS/2]: Handle FAT timestamp offsets for OS/2.
455         * read.c (readline) [OS/2]: Don't handle CRLF specially on OS/2.
456         * default.c (default_suffixes) [OS/2]: Set proper default suffixes
457         for OS/2.
458         * vpath.c (construct_vpath_list) [OS/2]: Handle OS/2 paths like
459         DOS paths.
461 2003-02-24  Paul D. Smith  <psmith@gnu.org>
463         * default.c [VMS]: New default rules for .cxx -> .obj compiles.
464         * job.c (child_execute_job) [VMS]: New code for handling spawn().
465         (child_execute_job) [VMS]: Handle error status properly.
466         Patches provided by Hartmut Becker <Hartmut.Becker@compaq.com>.
468         * function.c (func_shell): Use EINTRLOOP() while reading from the
469         subshell pipe (Fixes bug #2502).
470         * job.c (free_child): Use EINTRLOOP() while writing tokens to the
471         jobserver pipe.
472         * main.c (main): Ditto.
474 2003-01-30  Paul D. Smith  <psmith@gnu.org>
476         * read.c (eval): eval() was not fully reentrant, because the
477         collapsed buffer was static.  Change it to be an automatic
478         variable so that eval() can be invoked recursively.
479         Fixes bug # 2238.
480         (eval): Apply patch # 1022: fix memory reference error on long
481         target-specific variable lines.
482         Patch provided by Steve Brown <Steve.Brown@macquarie.com>.
484         * function.c (check_numeric): Combine the is_numeric() function
485         into this function, since it's only called from one place.
486         Constify this function.  Have it print the incorrect string in the
487         error message.  Fixes bug #2407.
488         (strip_whitespace): Constify.
489         (func_if): Constify.
490         * expand.c (expand_argument): Constify.
492 2003-01-29  Paul D. Smith  <psmith@gnu.org>
494         Fix bug # 2169, also reported by other people on various systems.
496         * make.h: Some systems, such as Solaris and PTX, do not fully
497         implement POSIX-compliant SA_RESTART functionality; important
498         system calls like stat() and readdir() can still fail with EINTR
499         even if SA_RESTART has been set on the signal handler.  So,
500         introduce macros EINTRLOOP() and ENULLLOOP() which can loop on
501         EINTR for system calls which return -1 or 0 (NULL), respectively,
502         on error.
503         Also, remove the old atomic_stat()/atomic_readdir() and
504         HAVE_BROKEN_RESTART handling.
506         * configure.in: Remove setting of HAVE_BROKEN_RESTART.
508         * arscan.c (ar_member_touch): Use EINTRLOOP() to wrap fstat().
509         * remake.c (touch_file): Ditto.
511         * commands.c (delete_target): Use EINTRLOOP() to wrap stat().
512         * read.c (construct_include_path): Ditto.
513         * remake.c (name_mtime): Ditto.
514         * vpath.c (selective_vpath_search): Ditto.
515         * dir.c (find_directory): Ditto.
516         (local_stat): Ditto.
517         (find_directory): Use ENULLLOOP() to wrap opendir().
518         (dir_contents_file_exists_p): Use ENULLLOOP() to wrap readdir().
520         * misc.c: Remove HAVE_BROKEN_RESTART, atomic_stat(), and
521         atomic_readdir() handling.
523 2003-01-22  Paul D. Smith  <psmith@gnu.org>
525         * function.c (func_call): Fix Bug #1744.  If we're inside a
526         recursive invocation of $(call ...), mask any of the outer
527         invocation's arguments that aren't used by this one, so that this
528         invocation doesn't "inherit" them accidentally.
530 2002-12-05  Paul D. Smith  <psmith@gnu.org>
532         * function.c (subst_expand): Valery Khamenia reported a
533         pathological performance hit when doing substitutions on very
534         large values with lots of words: turns out we were invoking
535         strlen() a ridiculous number of times.  Instead of having each
536         call to sindex() call strlen() again, keep track of how much of
537         the text we've seen and pass the length to sindex().
539 2002-11-19  Paul D. Smith  <psmith@gnu.org>
541         * README.cvs, configure.in: Upgrade to require autoconf 2.56.
544 2002-11-16  Paul D. Smith  <psmith@gnu.org>
546         * NMakefile.template (OBJS): Add hash.c object file.
547         * SMakefile.template (srcs): Ditto.
548         * Makefile.ami (objs): Ditto.
549         * build_w32.bat: Ditto.
551         * Makefile.DOS.template: Remove extra dependencies.
553 2002-10-25  Paul D. Smith  <psmith@gnu.org>
555         * expand.c (install_variable_buffer): New function.  Install a new
556         variable_buffer context and return the previous one.
557         (restore_variable_buffer): New function.  Free the current
558         variable_buffer context and put a previously saved one back.
559         * variable.h: Prototypes for {install,restore}_variable_buffer.
560         * function.c (func_eval): Push a new variable_buffer context
561         before we eval, then restore the old one when we're done.
562         Fixes Bug #1517.
564         * read.c (install_conditionals): New function.  Install a new
565         conditional context and return the previous one.
566         (restore_conditionals): New function.  Free the current
567         conditional context and put a previously saved one back.
568         (eval): Use the {install,restore}_conditionals for "include"
569         handling.
570         (eval_buffer): Use {install,restore}_conditionals to preserve the
571         present conditional state before we evaluate the buffer.
572         Fixes Bug #1516.
574         * doc/make.texi (Quick Reference): Add references to $(eval ...)
575         and $(value ...).
576         (Recursion): Add a variable index entry for CURDIR.
578         * README.cvs: Update to appropriate versions.
579         * Makefile.am (nodist_loadavg_SOURCES): automake gurus point out I
580         don't need to copy loadavg.c: automake is smart enough to create
581         it for me.  Still have a bug in automake related to ansi2knr tho.
583 2002-10-14  Paul D. Smith  <psmith@gnu.org>
585         * remake.c (notice_finished_file): Only touch targets if they have
586         at least one command (as per POSIX).  Resolve Bug #1418.
588         * *.c: Convert to using ANSI C-style function definitions.
589         * Makefile.am: Enable the ansi2knr feature of automake.
590         * configure.in: ditto.
592 2002-10-13  Paul D. Smith  <psmith@gnu.org>
594         * commands.c (set_file_variables): Bug #1379: Don't use alloca()
595         for automatic variable values like $^, etc.  In the case of very
596         large lists of prerequisites this causes problems.  Instead reuse
597         a static buffer (resizeable) for each variable.
599         * read.c (eval): Fix Bug #1391: allow "export" keyword in
600         target-specific variable definitions.  Check for it and set an
601         "exported" flag.
602         (record_target_var): Set the export field to v_export if the
603         "exported" flag is set.
604         * doc/make.texi (Target-specific): Document the ability to use
605         "export".
607         * doc/make.texi: Change the name of the section on automatic
608         variables from "Automatic" to "Automatic Variables".  Added text
609         clarifying the scope of automatic variables.
611 2002-10-04  Paul D. Smith  <psmith@gnu.org>
613         * read.c (eval): Allow SysV $$@ variables to use {} braces as well
614         as () braces.
615         (record_files): Ditto.
617         * expand.c (variable_expand_string): In $(A:x=y) expansion limit
618         the search for the '=' to only within the enclosing parens.
620 2002-10-03  Paul D. Smith  <psmith@gnu.org>
622         Version 3.80 released.
624         * dir.c: Change hash functions to use K&R function definition style.
625         * function.c: Ditto.
626         * read.c: Ditto.
627         * variable.c: Ditto.
629         Update to automake 1.7.
631         * Makefile.am (AUTOMAKE_OPTIONS): Update to require 1.7.
632         (pdf): Remove this target as automake now provides one.
634         * configure.in: Change AM_CONFIG_HEADER to AC_CONFIG_HEADERS.
636 2002-09-30  Martin P.J. Zinser  <zinser@decus.de>
638         * makefile.com: Updates for GNU make 3.80.
639         * makefile.vms: Ditto.
641 2002-09-23  Paul D. Smith  <psmith@gnu.org>
643         * read.c (enum make_word_type): Remove w_comment.
644         (get_next_mword): Don't treat comment characters as special; where
645         this function is used we will never see a comment (it's stripped
646         before we get here) and treating comments specially means that
647         targets like "foo\#bar" aren't handled properly.
649 2002-09-18  Paul D. Smith  <psmith@gnu.org>
651         * doc/make.texi (Bugs): Update with some info on Savannah, etc.
653         * read.c (eval): Expansion of arguments to export/unexport was
654         ignoring all arguments after the first one.  Change the algorithm
655         to expand the whole line once, then parse the results.
657 2002-09-17  Paul D. Smith  <psmith@gnu.org>
659         Fix Bug #940 (plus another bug I found while looking at this):
661         * read.c (record_target_var): enter_file() will add a new entry if
662         it's a double-colon target: we don't want to do that in this
663         situation.  Invoke lookup_file() and only enter_file() if it does
664         not already exist.  If the file we get back is a double-colon then
665         add this variable to the "root" double-colon target.
667         * variable.c (initialize_file_variables): If this file is a
668         double-colon target but is not the "root" target, then initialize
669         the root and make the root's variable list the parent of our
670         variable list.
672 2002-09-13  Paul D. Smith  <psmith@gnu.org>
674         * doc/make.texi (MAKE Variable): Add some indexing for "+".
676         * hash.c (round_up_2): Get rid of a warning.
678 2002-09-12  Paul D. Smith  <psmith@gnu.org>
680         * Makefile.am (loadavg_SOURCES, loadavg.c): Tiptoe around automake
681         so it doesn't complain about getloadavg.c.
683         * commands.c (set_file_variables): Make sure we always alloca() at
684         least 1 character for the value of $? (for '\0').
686 2002-09-11  Paul D. Smith  <psmith@gnu.org>
688         * hash.h (STRING_COMPARE, ISTRING_COMPARE, STRING_N_COMPARE): Fix
689         macro to use RESULT instead of the incorrect _RESULT_.
691         * make.h (HAVE_BROKEN_RESTART): Add prototypes for atomic_stat()
692         and atomic_readdir().  We need to #include dirent.h to get this to
693         work.
694         * misc.c (atomic_readdir): Fix typos.
696 2002-09-10  Paul D. Smith  <psmith@gnu.org>
698         * read.c (eval): Expand variable lists given to export and
699         unexport, so that "export $(LIST_OF_VARIABLES)" (etc.) works.
700         (conditional_line): Ditto for "ifdef".  Fixes bug #103.
702         * doc/make.texi (Variables/Recursion): Document this.
703         (Conditional Syntax): And here.
705 2002-09-09  Paul D. Smith  <psmith@gnu.org>
707         * configure.in: Check for memmove().
709 2002-09-07  Paul D. Smith  <psmith@gnu.org>
711         * configure.in (HAVE_BROKEN_RESTART): Define this on PTX systems;
712         Michael Sterrett <msterret@coat.com> reports that while it has
713         SA_RESTART, it does not work properly.
715         * misc.c (atomic_stat): If HAVE_BROKEN_RESTART, create a function
716         that invokes stat() and loops to do it again if it returns EINTR.
717         (atomic_readdir): Ditto, with readdir().
719         * make.h (stat, readdir): If HAVE_BROKEN_RESTART, alias stat()
720         and readdir() to atomic_stat() and atomic_readdir().
722 2002-09-04  Paul D. Smith  <psmith@gnu.org>
724         * implicit.c (pattern_search): Daniel <barkalow@reputation.com>
725         reports that GNU make sometimes doesn't recognize that targets can
726         be made, when directories can be created as prerequisites.  He
727         reports that changing the order of predicates in the DEP->changed
728         flag test so that lookup_file() is always performed, solves this
729         problem.
731 2002-08-08  Paul D. Smith  <psmith@gnu.org>
733         * configure.in: Require a newer version of gettext.
735         * misc.c (perror_with_name): Translate the format string (for
736         right-to-left language support).
737         (pfatal_with_name): Ditto.
739         * main.c: Create a static array of strings to store the usage
740         text.  This is done to facilitate translations.
741         (struct command_switch): Remove argdesc and description fields.
742         (switches): Remove values for obsolete fields.
743         (print_usage): Print each element of the usage array.
745         * hash.c: Change function definitions to be K&R style.
747 2002-08-02  Paul D. Smith  <psmith@gnu.org>
749         * NEWS: Remove the mention of .TARGETS; we aren't going to publish
750         this one because it's too hard to get right.  We'll look at it for
751         a future release.
752         * main.c (main): Don't create the .TARGETS variable.
753         * variable.c (handle_special_var): Don't handle .TARGETS.
755 2002-08-01  Paul D. Smith  <psmith@gnu.org>
757         * main.c (switches): Add a new option, -B (--always-make).  If
758         specified, make will rebuild all targets that it encounters even
759         if they don't appear to be out of date.
760         (always_make_flag): New flag.
761         * make.h: Extern always_make_flag.
762         * remake.c (update_file_1): Check always_make_flag; if it's set we
763         will always rebuild any target we can, even if none of its
764         prerequisites are newer.
765         * NEWS: Mention it.
767         * doc/make.texi (Shell Function): Make it clear that make
768         variables marked as "export" are not passed to instances of the
769         shell function.
771         Add new introspection variable .VARIABLES and .TARGETS.
773         * variable.c (handle_special_var): New function.  If the variable
774         reference passed in is "special" (.VARIABLES or .TARGETS),
775         calculate the new value if necessary.  .VARIABLES is handled here:
776         walk through the hash of defined variables and construct a value
777         which is a list of the names.  .TARGETS is handled by
778         build_target_list().
779         (lookup_variable): Invoke handle_special_var().
780         * file.c (build_target_list): Walk through the hask of known files
781         and construct a list of the names of all the ones marked as
782         targets.
783         * main.c (main): Initialize them to empty (and as simple variables).
784         * doc/make.texi (Special Variables): Document them.
785         * NEWS: Mention them.
787         * variable.h (struct variable): Add a new flag "exportable" which
788         is true if the variable name is valid for export.
789         * variable.c (define_variable_in_set): Set "exportable" when a new
790         variable is defined.
791         (target_environment): Use the "exportable" flag instead of
792         re-checking the name here... an efficiency improvement.
794 2002-07-31  Paul D. Smith  <psmith@gnu.org>
796         * config.h-vms.template: Updates to build on VMS.  Thanks to
797         Brian_Benning@aksteel.com for helping verify the build.
798         * makefile.com: Build the new hash.c file.
799         * hash.h: Use strcpmi(), not stricmp(), in the
800         HAVE_CASE_INSENSITIVE_FS case.
802 2002-07-30  Paul D. Smith  <psmith@gnu.org>
804         * hash.h (ISTRING_COMPARE, return_ISTRING_COMPARE): Add missing
805         backslashes to the HAVE_CASE_INSENSITIVE_FS case.
806         Reported by <Brian_Benning@aksteel.com>.
808 2002-07-10  Paul D. Smith  <psmith@gnu.org>
810         * variable.c (pop_variable_scope): Remove variable made unused by
811         new hash infrastructure.
812         * read.c (dep_hash_cmp): Rewrite this to handle ignore_mtime
813         comparisons as well as name comparisons.
814         * variable.h: Add a prototype for new hash_init_function_table().
815         * file.c (lookup_file): Remove variables made unused by new hash
816         infrastructure.
817         * dir.c (directory_contents_hash_2): Missing return of hash value.
818         (dir_contents_file_exists_p): Remove variables made unused by new
819         hash infrastructure.
822         Installed Greg McGary's integration of the hash functions from the
823         GNU id-utils package:
825 2002-07-10  Greg McGary  <greg@mcgary.org>
827         * scripts/functions/filter-out: Add literals to to the
828         pattern space in order to add complexity, and trigger
829         use of an internal hash table.  Fix documentation strings.
830         * scripts/targets/INTERMEDIATE: Reverse order of files
831         passed to expected `rm' command.
833 2002-07-10  Greg McGary  <greg@mcgary.org>
835         * Makefile.am (SRCS): Add hash.c (noinst_HEADERS): Add hash.h
836         * hash.c: New file, taken from id-utils.
837         * hash.h: New file, taken from id-utils.
839         * make.h (HASH, HASHI): Remove macros.
840         (find_char_unquote): Change arglist in decl.
841         (hash_init_directories): New function decl.
842         * variable.h (hash.h): New #include.
843         (MAKELEVEL_NAME, MAKELEVEL_LENGTH): New constants.
844         * filedef.h (hash.h): New #include.
845         (struct file) [next]: Remove member.
846         (file_hash_enter): Remove function decl.
847         (init_hash_files): New function decl.
849         * ar.c (ar_name): Delay call to strlen until needed.
850         * main.c (initialize_global_hash_tables): New function.
851         (main): Call it.  Use MAKELEVEL_NAME & MAKELEVEL_LENGTH.
852         * misc.c (remove_comments): Pass char constants to find_char_unquote.
853         * remake.c (notice_finished_file): Update last_mtime on `prev' chain.
855         * dir.c (hash.h): New #include.
856         (struct directory_contents) [next, files]: Remove members.
857         [ctime]: Add member for VMS.  [dirfiles]: Add hash-table member.
858         (directory_contents_hash_1, directory_contents_hash_2,
859         directory_contents_hash_cmp): New functions.
860         (directories_contents): Change type to `struct hash_table'.
861         (struct directory) [next]: Remove member.
862         (directory_hash_1, directory_hash_2, directory_hash_cmp): New funcs.
863         (directory): Change type to `struct hash_table'.
864         (struct dirfile) [next]: Remove member.
865         [length]: Add member.  [impossible]: widen type to fill alignment gap.
866         (dirfile_hash_1, dirfile_hash_2, dirfile_hash_cmp): New functions.
867         (find_directory): Use new hash table package.
868         (dir_contents_file_exists_p): Likewise.
869         (file_impossible): Likewise.
870         (file_impossible_p): Likewise.
871         (print_dir_data_base): Likewise.
872         (open_dirstream): Likewise.
873         (read_dirstream): Likewise.
874         (hash_init_directories): New function.
876         * file.c (hash.h): New #include.
877         (file_hash_1, file_hash_2, file_hash_cmp): New functions.
878         (files): Change type to `struct hash_table'.
879         (lookup_file): Use new hash table package.
880         (enter_file): Likewise.
881         (remove_intermediates): Likewise.
882         (snap_deps): Likewise.
883         (print_file_data_base): Likewise.
885         * function.c
886         (function_table_entry_hash_1, function_table_entry_hash_2,
887         function_table_entry_hash_cmp): New functions.
888         (lookup_function): Remove `table' argument.
889         Use new hash table package.
890         (struct a_word) [chain, length]: New members.
891         (a_word_hash_1, a_word_hash_2, a_word_hash_cmp): New functions.
892         (struct a_pattern): New struct.
893         (func_filter_filterout): Pass through patterns noting boundaries
894         and '%', if present.  Note a_word length.  Use a hash table if
895         arglists are large enough to justify cost.
896         (function_table_init): Renamed from function_table.
897         (function_table): Declare as `struct hash_table'.
898         (FUNCTION_TABLE_ENTRIES): New constant.
899         (hash_init_function_table): New function.
901         * read.c (hash.h): New #include.
902         (read_makefile): Pass char constants to find_char_unquote.
903         (dep_hash_1, dep_hash_2, dep_hash_cmp): New functions.
904         (uniquize_deps): Use hash table to efficiently identify duplicates.
905         (find_char_unquote): Accept two char-constant stop chars, rather
906         than a string constant, avoiding zillions of calls to strchr.
907         Tighten inner search loops to test only for desired delimiters.
909         * variable.c (variable_hash_1, variable_hash_2,
910         variable_hash_cmp): New functions.
911         (variable_table): Declare as `struct hash_table'.
912         (global_variable_set): Remove initialization.
913         (init_hash_global_variable_set): New function.
914         (define_variable_in_set): Use new hash table package.
915         (lookup_variable): Likewise.
916         (lookup_variable_in_set): Likewise.
917         (initialize_file_variables): Likewise.
918         (pop_variable_scope): Likewise.
919         (create_new_variable_set): Likewise.
920         (merge_variable_sets): Likewise.
921         (define_automatic_variables): Likewise.
922         (target_environment): Likewise.
923         (print_variable_set): Likewise.
925 2002-07-10  Paul D. Smith  <psmith@gnu.org>
927         Implement the SysV make syntax $$@, $$(@D), and $$(@F) in the
928         prerequisite list.  A real SysV make will expand the entire
929         prerequisites list _twice_: we don't do that as it's a big
930         backward-compatibility problem.  We only replace those specific
931         variables.
933         * read.c (record_files): Replace any $@, $(@D), and $(@F) variable
934         references left in the list of prerequisites.  Check for .POSIX as
935         we record targets, so we can disable non-POSIX behavior while
936         reading makefiles as well as running them.
937         (eval): Check the prerequisite list to see if we have anything
938         that looks like a SysV prerequisite variable reference.
940 2002-07-09  Paul D. Smith  <psmith@gnu.org>
942         * doc/make.texi (Prerequisite Types): Add a new section describing
943         order-only prerequisites.
945         * read.c (uniquize_deps): If we have the same file as both a
946         normal and order-only prereq, get rid of the order-only prereq,
947         since the normal one supersedes it.
949 2002-07-08  Paul D. Smith  <psmith@gnu.org>
951         * AUTHORS: Added Greg McGary to the AUTHORS file.
952         * NEWS: Blurbed order-only prerequisites.
953         * file.c (print_file): Show order-only deps properly when printing
954         the database.
956         * maintMakefile: Add "update" targets for wget'ing the latest
957         versions of various external files.  Taken from Makefile.maint in
958         autoconf, etc.
960         * dosbuild.bat: Somehow we got _double_ ^M's.  Remove them.
961         Reported by Eli Zaretskii <eliz@is.elta.co.il>.
963 2002-07-07  Paul D. Smith  <psmith@gnu.org>
965         * po/*.po: Remove.  We'll use wget to retrieve them at release
966         time.
968         * variable.c (do_variable_definition) [W32]: On W32 using cmd
969         rather than a shell you get an exception.  Make sure we look up
970         the variable.  Patch provided by Eli Zaretskii <eliz@is.elta.co.il>.
972         * remake.c (notice_finished_file): Fix handling of -t flag.
973         Patch provided by Henning Makholm <henning@makholm.net>.
975         * implicit.c (pattern_search): Some systems apparently run short
976         of stack space, and using alloca() in this function caused an
977         overrun.  I modified it to use xmalloc() on the two variables
978         which seemed like they might get large.  Fixes Bug #476.
980         * main.c (print_version): Update copyright notice to conform with
981         GNU standards.
982         (print_usage): Update help output.
984         * function.c (func_eval): Create a new make function, $(eval
985         ...).  Expand the arguments, put them into a buffer, then invoke
986         eval_buffer() on the resulting string.
987         (func_quote): Create a new function, $(quote VARNAME).  Inserts
988         the value of the variable VARNAME without expanding it any
989         further.
991         * read.c (struct ebuffer): Change the linebuffer structure to an
992         "eval buffer", which can be either a file or a buffer.
993         (eval_makefile): Move the code in the old read_makefile() which
994         located a makefile into here: create a struct ebuffer with that
995         information.  Have it invoke the new function eval() with that
996         ebuffer.
997         (eval_buffer): Create a new function that creates a struct ebuffer
998         that holds a string buffer instead of a file.  Have it invoke
999         eval() with that ebuffer.
1000         (eval): New function that contains the guts of the old
1001         read_makefile() function: this function parses makefiles.  Obtains
1002         data to parse from the provided ebuffer.  Some modifications to
1003         make the flow of the function cleaner and clearer.  Still could
1004         use some work here...
1005         (do_define): Takes a struct ebuffer instead of a FILE*.  Read the
1006         contents of the define/endef variable from the ebuffer.
1007         (readstring): Read the next line from a string-style ebuffer.
1008         (readline): Read the next line from an ebuffer.  If it's a string
1009         ebuffer, invoke readstring().  If it's a FILE* ebuffer, read it
1010         from the file.
1012         * dep.h (eval_buffer): Prototype eval_buffer();
1014         * variable.c (do_variable_definition): Make sure that all
1015         non-target-specific variables are registered in the global set.
1016         If we're invoked from an $(eval ...) we might be inside a $(call
1017         ...) or other function which has pushed a variable scope; we still
1018         want to define our variables from evaluated makefile code in the
1019         global scope.
1021 2002-07-03  Greg McGary  <greg@mcgary.org>
1023         * dep.h (struct dep) [ignore_mtime]: New member.
1024         [changed]: convert to a bitfield.
1025         * implicit.c (pattern_search): Zero ignore_mtime.
1026         * main.c (main, handle_non_switch_argument): Likewise.
1027         * rule.c (convert_suffix_rule): Likewise.
1028         * read.c (read_all_makefiles, read_makefile, multi_glob): Likewise.
1029         (read_makefile): Parse '|' in prerequisite list.
1030         (uniquize_deps): Consider ignore_mtime when comparing deps.
1031         * remake.c (update_file_1, check_dep): Don't force remake for
1032         dependencies that have d->ignore_mtime.
1033         * commands.c (FILE_LIST_SEPARATOR): New constant.
1034         (set_file_variables): Don't include a
1035         prerequisite in $+, $^ or $? if d->ignore_mtime.
1036         Define $|.
1038 2002-06-18  Paul D. Smith  <psmith@gnu.org>
1040         * make.texinfo: Updates for next revision.  New date/rev/etc.
1041         Recreate all Info menus.  Change license on the manual to the GNU
1042         Free Documentation License.  A number of typos.
1043         (Variables Simplify): Don't use "-" before it's defined.
1044         (Automatic Prerequisites): Rewrite the target example to work
1045         properly if the compile fails.  Remove incorrect comments about
1046         how "set -e" behaves.
1047         (Text Functions): Move the "word", "wordlist", "words", and
1048         "firstword" functions here, from "File Name Functions".
1049         * make-stds.texi: Update from latest GNU version.
1050         * fdl.texi: (created) Import the latest GNU version.
1052 2002-06-06  Paul D. Smith  <psmith@gnu.org>
1054         * variable.c (do_variable_definition): New function: extract the
1055         part of try_variable_definition() that actually sets the value
1056         into a separate function.
1057         (try_variable_definition): Call do_variable_definition() after
1058         parsing the variable definition string.
1059         (define_variable_in_set): Make the name argument const.
1061         * variable.h (enum variable_flavor): Make public.
1062         (do_variable_definition): Create prototype.
1064         * read.c (read_all_makefiles): Create a new built-in variable,
1065         MAKEFILE_LIST.
1066         (read_makefile): Add each makefile read in to this variable value.
1068 2002-05-18  Eli Zaretskii  <eliz@is.elta.co.il>
1070         * Makefile.DOS.template: Tweak according to changes in the
1071         distribution.  Add back the dependencies of *.o files.
1073         * configh.dos.template: Synchronize with config.h.in.
1075 2002-05-09  Paul D. Smith  <psmith@gnu.org>
1077         * file.c (file_timestamp_now): Use K&R function declaration.
1079         * getloadavg.c (getloadavg): Merge setlocale() fix from sh-utils
1080         getloadavg.c.  Autoconf thinks QNX is SVR4-like, but it isn't, so
1081         #undef it.  Remove predefined setup of NLIST_STRUCT.  Decide
1082         whether to include nlist.h based on HAVE_NLIST_H.  Change obsolete
1083         NLIST_NAME_UNION to new HAVE_STRUCT_NLIST_N_UN_N_NAME.
1084         * configure.in (NLIST_STRUCT): Define this if we have nlist.h and
1085         nlist.n_name is a pointer rather than an array.
1087         * acinclude.m4 (make_FUNC_SETVBUF_REVERSED): Grab the latest
1088         version of AC_FUNC_SETVBUF_REVERSED from autoconf CVS.
1089         * configure.in: Use it instead of the old version.
1091         * main.c (main): Prefer setvbuf() to setlinebuf().
1093 2002-05-08  Paul D. Smith  <psmith@gnu.org>
1095         * Makefile.am (make_LDADD): Add GETLOADAVG_LIBS.
1096         (loadavg_LDADD): Ditto.
1098 2002-04-29  Paul D. Smith  <psmith@gnu.org>
1100         * expand.c (recursively_expand_for_file): Rename
1101         recursively_expand() to recursively_expand_for_file() and provide
1102         an extra argument, struct file.  If the argument is provided, set
1103         the variable scope to that of the file before expanding.
1104         * variable.h (recursively_expand): Make this a macro that invokes
1105         recursively_expand_for_file() with a NULL file pointer.
1106         * variable.c (target_environment): Call the renamed function and
1107         provide the current file context.
1108         Fixes Debian bug #144306.
1110 2002-04-28  Paul D. Smith  <psmith@gnu.org>
1112         Allow $(call ...) user-defined variables to be self-referencing
1113         without throwing an error.  Allows implementation of transitive
1114         closures, among other possibly useful things.
1115         Requested by: Philip Guenther <guenther@sendmail.com>
1117         * variable.h (struct variable): Add a new field: exp_count, and
1118         new macros to hold its size and maximum value.
1119         (warn_undefined): Make this a macro.
1120         * variable.c (define_variable_in_set): Initialize it.
1121         * expand.c (recursively_expand): If we detect recursive expansion
1122         of a variable, check the exp_count field.  If it's greater than 0
1123         allow the recursion and decrement the count.
1124         (warn_undefined): Remove this (now a macro in variable.h).
1125         * function.c (func_call): Before we expand the user-defined
1126         function, modify its exp_count field to contain the maximum
1127         number of recursive calls we'll allow.  After the call, reset it
1128         to 0.
1130 2002-04-21  Paul D. Smith  <psmith@gnu.org>
1132         Modified to use latest autoconf (2.53), automake (1.6.1), and
1133         gettext (0.11.1).  We're using gettext's new "external" support,
1134         to avoid including libintl source with GNU make.
1136         * README.cvs: New file.  Explain how to build GNU make from CVS.
1138         * configure.in: Modify checking for the system glob library.
1139         Use AC_EGREP_CPP instead of AC_TRY_CPP.  Remove the setting of
1140         GLOBDIR (we will always put "glob" in SUBDIRS, so automake
1141         etc. will manage it correctly).  Set an automake conditional
1142         USE_LOCAL_GLOB to decide whether to compile the glob library.
1144         * getloadavg.c (main): Include make.h in the "TEST" program to
1145         avoid warnings.
1147         * Makefile.am: Remove special rules for loadavg.  Replace them
1148         with Automake capabilities for building extra programs.
1150         * signame.c: This file does nothing if the system provide
1151         strsignal().  If not, it implements strsignal().  If the system
1152         doesn't define sys_siglist, then we make our own; otherwise we use
1153         the system version.
1154         * signame.h: Removed.
1156         * main.c (main): No need to invoke signame_init().  Update copyright.
1158         * ABOUT-NLS: Removed.
1159         * gettext.c: Removed.
1160         * gettext.h: Get a simplified copy from the gettext package.
1161         * po/*: Created.
1162         * i18n/*.po: Moved to po/.
1163         * i18n/: Removed.
1165         * config/*: Created.  Contains package configuration helper files.
1166         * config.guess, config.sub: Moved to config directory.
1168         * configure.in (AC_CONFIG_FILES): Add po/Makefile.in, config/Makefile.
1169         Rework to use new-style autoconf features.  Use the "external"
1170         mode for gettext.  Make the build.sh config file conditional on
1171         whether build.sh.in exists, to avoid autoconf errors.
1172         * acinclude.m4: Removed almost all macros as being obsolete.
1173         Rewrote remaining macros to use AC_DEFINE.
1174         * acconfig.h: Removed.
1176         * Makefile.am (EXTRA_DIST): Add config/config.rpath.  Use a
1177         conditional to handle customs support.  Remove special handling
1178         for i18n features.
1180 2002-04-20  Paul D. Smith  <psmith@gnu.org>
1182         * function.c (func_call): Don't mark the argument variables $1,
1183         etc. as recursive.  They've already been fully expanded so
1184         there's no need to do it again, and doing so strips escaped $'s.
1185         Reported by Sebastian Glita <glseba@yahoo.com>.
1187         * remake.c (notice_finished_file): Walk through double-colon
1188         entries via the prev field, not the next field!
1189         Reported by Greg McGary <greg@mcgary.org>.
1191         * main.c (main): If the user specifies -q and asks for a specific
1192         target which is a makefile, we got an assert.  In that case it
1193         turns out we should continue normally instead.
1195         * i18n/de.po, i18n/fr.po: Installed an updated translation.
1197         * i18n/he.po: Installed a new translation.
1199 2002-01-07  Paul D. Smith  <psmith@gnu.org>
1201         * i18n/es.po, i18n/ru.po: Installed an updated translation.
1203 2001-12-04  Paul D. Smith  <psmith@gnu.org>
1205         * i18n/ja.po: Installed an updated translation.
1207 2001-09-04  Paul D. Smith  <psmith@gnu.org>
1209         * i18n/da.po: Installed an updated translation.
1211 2001-08-03  Paul D. Smith  <psmith@gnu.org>
1213         * i18n/fr.po: Installed an updated translation.
1214         Resolves Debian bug #106720.
1216 2001-06-13  Paul D. Smith  <psmith@gnu.org>
1218         * i18n/da.po, configure.in (ALL_LINGUAS): Installed a new
1219         translation.
1221 2001-06-11  Paul D. Smith  <psmith@gnu.org>
1223         * i18n/ko.po: Installed a new translation.
1225 2001-05-06  Paul D. Smith  <psmith@gnu.org>
1227         Modify the EINTR handling.
1229         * job.c (new_job): Reorganize the jobserver algorithm.  Reorder
1230         the way in which we manage the file descriptor/signal handler race
1231         trap to be more efficient.
1233 2001-05-06  Paul Eggert  <eggert@twinsun.com>
1235         Restart almost all system calls that are interrupted, instead
1236         of worrying about EINTR.  The lone exception is the read() for
1237         job tokens.
1239         * configure.in (HAVE_SA_RESTART): New macro.
1240         (MAKE_JOBSERVER): Define to 1 only if HAVE_SA_RESTART.
1241         * main.c (main): Use SA_RESTART instead of the old,
1242         nonstandard SA_INTERRUPT.
1244         * configure.in (AC_CHECK_FUNCS): Add bsd_signal.
1245         * main.c (bsd_signal): New function or macro,
1246         if the implementation doesn't supply it.
1247         (The bsd_signal function will be in POSIX 1003.1-200x.)
1248         (HANDLESIG): Remove.
1249         (main, FATAL_SIG): Use bsd_signal instead of signal or HANDLESIG.
1251         * make.h (EINTR_SET): Remove.
1252         (SA_RESTART): New macro.
1254         * arscan.c (ar_member_touch): Don't worry about EINTR.
1255         * function.c (func_shell): Likewise.
1256         * job.c (reap_children, free_child, new_job): Likewise.
1257         * main.c (main): Likewise.
1258         * remake.c (touch_file, name_mtime): Likewise.
1260         * arscan.c (ar_member_touch): Fix bug uncovered by EINTR removal;
1261         if fstat failed with errno!=EINTR, the error was ignored.
1263         * job.c (set_child_handler_action_flags): New function.
1264         (new_job): Use it to temporarily clear the SIGCHLD action flags
1265         while reading the token.
1267 2001-05-02  Paul D. Smith  <psmith@gnu.org>
1269         * job.c (start_job_command): Don't add define/endef per-line flags
1270         to the top-level flags setting.
1272 2001-04-03  Paul D. Smith  <psmith@gnu.org>
1274         * arscan.c (VMS_get_member_info,ar_scan) [VMS]: VMS sets the low
1275         bit on error, so check for odd return values, not non-0 return
1276         values.
1277         (VMS_get_member_info): Calculate the timezone differences correctly.
1278         Reported by John Fowler <jfowler@nyx.net>.
1281 2001-03-14  Paul D. Smith  <psmith@gnu.org>
1283         * variable.c (lookup_variable) [VMS]: Null-terminate the variable
1284         value before invoking define_variable().
1285         Reported by John Fowler <jfowler@nyx.net>.
1287 2001-02-07  Paul D. Smith  <psmith@gnu.org>
1289         * read.c (record_target_var): If we reset the variable due to a
1290         command-line variable setting overriding it, turn off the "append"
1291         flag.
1293 2001-01-17  Paul D. Smith  <psmith@gnu.org>
1295         * variable.c (lookup_variable) [VMS]: When getting values from the
1296         environment, allocate enough space for the _value_ plus escapes,
1297         not enough space for the name plus escapes :-/.
1298         Reported by John Fowler <jfowler@nyx.net>.
1300         * remake.c (f_mtime): Removed the "***" prefix from the mod time
1301         warnings that make generates, so it doesn't look like an error.
1302         Reported by Karl Berry <karl@gnu.org>.
1305         Fix for PR/2020:  Rework appended target-specific variables.  I'm
1306         fairly confident this algorithm is finally correct.
1308         * expand.c (allocated_variable_append): Rewrite.  Instead of
1309         expanding each appended variable then adding all the expanded
1310         strings together, we append all the unexpanded values going up
1311         through the variable set contexts, then expand the final result.
1312         This behaves just like non-target-specific appended variable
1313         values, while the old way didn't in various corner cases.
1314         (variable_append): New function: recursively append the unexpanded
1315         value of a variable, walking from the outermost variable scope to
1316         the innermost.
1317         * variable.c (lookup_variable): Remove the code that looked up the
1318         variable set list if the found variable was "append".  We don't
1319         need this anymore.
1320         (lookup_variable_in_set): Make this non-static so we can use it
1321         elsewhere.
1322         (try_variable_definition): Use lookup_variable_in_set() rather
1323         than faking out current_variable_set_list by hand (cleanup).
1324         * variable.h: Add a prototype for the now non-static
1325         lookup_variable_in_set().
1327 2000-11-17  Paul D. Smith  <psmith@gnu.org>
1329         * remake.c (f_mtime) [WINDOWS32]: On various advice, I changed the
1330         WINDOWS32 port to assume timestamps can be up to 3 seconds away
1331         before throwing a fit.
1333 2000-11-17  Paul D. Smith  <psmith@gnu.org>
1335         * read.c (readline): CRLF calculations had a hole, if you hit the
1336         buffer grow scenario just right.  Reworked the algorithm to avoid
1337         the need for len or lastlen at all.  Problem description with
1338         sample code chages provided by Chris Faylor <cgf@redhat.com>.
1340 2000-10-24  Paul D. Smith  <psmith@gnu.org>
1342         * gettext.c (SWAP): Declare this with the prototype, otherwise
1343         some systems don't work (non-32-bit?  Reported for Cray T3E).
1344         Reported by Thorstein Thorsteinsson <thor@signe.teokem.lu.se>.
1346 2000-10-05  Paul D. Smith  <psmith@gnu.org>
1348         * acinclude.m4 (AM_LC_MESSAGES): Remove undefined macro
1349         AM_LC_MESSAGES; it doesn't seem to do anything anyway??
1351         * i18n/gl.po, configure.in (ALL_LINGUAS): New Galician translation.
1353 2000-09-22  Paul D. Smith  <psmith@gnu.org>
1355         * gettext.c: Don't #define _GETTEXT_H here; we only include some
1356         parts of the real gettext.h here, and we expect to really include
1357         the real gettext.h later.  If we keep this #define, it's ignored.
1359 2000-09-21  Paul D. Smith  <psmith@gnu.org>
1361         * main.c (log_working_directory): Rework the text to use complete
1362         sentences, to make life simpler for the translators.
1364 2000-08-29  Paul D. Smith  <psmith@gnu.org>
1366         * file.c (remove_intermediates): Print a debug message before we
1367         remove intermediate files, so the user (if she uses -d) knows
1368         what's going on.
1370 2000-08-21  Paul D. Smith  <psmith@gnu.org>
1372         * variable.c (try_variable_definition): Change how we handle
1373         target-specific append variable defns: instead of just setting the
1374         value, expand it as an append _but_ only within the current
1375         target's context.  Otherwise we lose all but the last value if the
1376         variable is appended more than once within the current target
1377         context.  Fixes PR/1831.
1379 2000-08-16  Paul D. Smith  <psmith@gnu.org>
1381         * function.c (func_shell): Nul-terminate the buffer before
1382         printing an exec error message (just in case it's not!).
1383         Fixes PR/1860, reported by Joey Hess <joey@valinux.com>.
1385 2000-07-25  Paul D. Smith  <psmith@gnu.org>
1387         * job.c (construct_command_argv_internal): Add "~" to the list of
1388         sh_chars[] which disallow optimizing out the shell call.
1390 2000-07-23  Paul Eggert  <eggert@twinsun.com>
1392         * NEWS, make.texinfo: Document .LOW_RESOLUTION_TIME, which
1393         supersedes --disable-nsec-timestamps.
1394         * make.texinfo: Consistently use "time stamp" instead of "timestamp".
1395         * README: Remove --disable-nsec-timestamps.
1397         * filedef.h (struct file.low_resolution_time): New member.
1398         * file.c (snap_deps): Add support for .LOW_RESOLUTION_TIME.
1399         * remake.c (update_file_1):
1400         Avoid spurious rebuilds due to low resolution time stamps,
1401         generalizing the earlier code that applied only to archive members.
1402         (f_mtime): Archive members always have low resolution time stamps.
1404         * configure.in: Remove --disable-nsec-timestamps, as this has
1405         been superseded by .LOW_RESOLUTION_TIME.
1407 2000-07-23  Paul Eggert  <eggert@twinsun.com>
1409         * configure.in (enable_nsec_timestamps): Renamed from
1410         make_cv_nsec_timestamps, since enable/disable options
1411         shouldn't be cached.
1413 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
1414        and  Paul Eggert  <eggert@twinsun.com>
1416         * file.c (file_timestamp_now):
1417         Use preprocessor-time check for FILE_TIMESTAMP_HI_RES
1418         so that clock_gettime is not linked unless needed.
1420         * filedef.h (FILE_TIMESTAMP_HI_RES):
1421         Remove definition; "configure" now does this.
1423         * configure.in (jm_AC_TYPE_UINTMAX_T): Move up,
1424         to before high resolution file timestamp check,
1425         since that check now uses uintmax_t.
1426         (FILE_TIMESTAMP_HI_RES): Define to nonzero if the code should use
1427         high resolution file timestamps.
1428         (HAVE_CLOCK_GETTIME): Do not define if !FILE_TIMESTAMP_HI_RES,
1429         so that we don't link in clock_gettime unnecessarily.
1431 2000-07-17  Paul D. Smith  <psmith@gnu.org>
1433         * i18n/ja.po: New version of the translation file.
1435 2000-07-07  Paul D. Smith  <psmith@gnu.org>
1437         * remake.c (f_mtime): If NO_FLOAT is defined, don't bother with
1438         the offset calculation.
1439         (name_mtime): Replace EINTR test with EINTR_SET macro.
1441 2000-07-07  Paul Eggert  <eggert@twinsun.com>
1443         Fix for PR/1811:
1445         * remake.c (update_file_1):
1446         Avoid spurious rebuilds of archive members due to their
1447         timestamp resolution being only one second.
1448         (f_mtime): Avoid spurious warnings of timestamps in the future due to
1449         the clock's resolution being lower than file timestamps'.
1450         When warning about future timestamps, report only the discrepancy,
1451         not the absolute value of the timestamp and the current time.
1453         * file.c (file_timestamp_now): New arg RESOLUTION.
1454         * filedef.h (file_timestamp_now): Likewise.
1455         (FILE_TIMESTAMP_NS): Now returns int.  All uses changed.
1457 2000-07-05  Paul D. Smith  <psmith@gnu.org>
1459         * variable.c (lookup_variable) [VMS]: Remove vestigial references
1460         to listp.  Fixes PR/1793.
1462 2000-06-26  Paul Eggert  <eggert@twinsun.com>
1464         * Makefile.am (MAINTAINERCLEANFILES): New macro, with stamp-pot in it.
1466         * dir.c (vms_hash): Ensure ctype macro args are nonnegative.
1468         * remake.c (f_mtime): Remove unused var memtime.
1470 2000-06-25  Martin Buchholz  <martin@xemacs.org>
1472         * make.texinfo, NEWS, TODO.private: Minor spelling corrections.
1473         Ran spell-check on make.texinfo.
1475 2000-06-23  Paul D. Smith  <psmith@gnu.org>
1477         * main.c (main): Replace EXIT_SUCCESS, EXIT_FAILURE, and
1478         EXIT_TROUBLE with MAKE_SUCCESS, MAKE_FAILURE, and MAKE_TROUBLE.
1479         * make.h: Define these macros.
1481         * Version 3.79.1 released.
1483         * configure.in: Add a new option, --disable-nsec-timestamps, to
1484         avoid using sub-second timestamps on systems that support it.  It
1485         can lead to problems, e.g. if your makefile relies on "cp -p".
1486         * README.template: Document the issue with "cp -p".
1488         * config.guess, config.sub: Updated.
1492 See ChangeLog.2, available in the CVS repository at:
1494         http://savannah.gnu.org/cvs/?group=make
1496 for earlier changes.