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