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