1 2002-07-07 Paul D. Smith <psmith@gnu.org>
3 * variable.c (do_variable_definition) [W32]: On W32 using cmd
4 rather than a shell you get an exception. Make sure we look up
5 the variable. Patch provided by Eli Zaretskii <eliz@is.elta.co.il>.
7 * remake.c (notice_finished_file): Fix handling of -t flag.
8 Patch provided by Henning Makholm <henning@makholm.net>.
10 * implicit.c (pattern_search): Some systems apparently run short
11 of stack space, and using alloca() in this function caused an
12 overrun. I modified it to use xmalloc() on the two variables
13 which seemed like they might get large. Bug #476.
15 * main.c (print_version): Update copyright notice to conform with
17 (print_usage): Update help output.
19 * function.c (func_eval): Create a new make function, $(eval
20 ...). Expand the arguments, put them into a buffer, then invoke
21 eval_buffer() on the resulting string.
22 (func_quote): Create a new function, $(quote VARNAME). Inserts
23 the value of the variable VARNAME without expanding it any
26 * read.c (struct ebuffer): Change the linebuffer structure to an
27 "eval buffer", which can be either a file or a buffer.
28 (eval_makefile): Move the code in the old read_makefile() which
29 located a makefile into here: create a struct ebuffer with that
30 information. Have it invoke the new function eval() with that
32 (eval_buffer): Create a new function that creates a struct ebuffer
33 that holds a string buffer instead of a file. Have it invoke
34 eval() with that ebuffer.
35 (eval): New function that contains the guts of the old
36 read_makefile() function: this function parses makefiles. Obtains
37 data to parse from the provided ebuffer. Some modifications to
38 make the flow of the function cleaner and clearer. Still could
40 (do_define): Takes a struct ebuffer instead of a FILE*. Read the
41 contents of the define/endef variable from the ebuffer.
42 (readstring): Read the next line from a string-style ebuffer.
43 (readline): Read the next line from an ebuffer. If it's a string
44 ebuffer, invoke readstring(). If it's a FILE* ebuffer, read it
47 * dep.h (eval_buffer): Prototype eval_buffer();
49 * variable.c (do_variable_definition): Make sure that all
50 non-target-specific variables are registered in the global set.
51 If we're invoked from an $(eval ...) we might be inside a $(call
52 ...) or other function which has pushed a variable scope; we still
53 want to define our variables from evaluated makefile code in the
56 2002-06-18 Paul D. Smith <psmith@gnu.org>
58 * make.texinfo: Updates for next revision. New date/rev/etc.
59 Recreate all Info menus. Change license on the manual to the GNU
60 Free Documentation License. A number of typos.
61 (Variables Simplify): Don't use "-" before it's defined.
62 (Automatic Prerequisites): Rewrite the target example to work
63 properly if the compile fails. Remove incorrect comments about
65 (Text Functions): Move the "word", "wordlist", "words", and
66 "firstword" functions here, from "File Name Functions".
67 * make-stds.texi: Update from latest GNU version.
68 * fdl.texi: (created) Import the latest GNU version.
70 2002-06-06 Paul D. Smith <psmith@gnu.org>
72 * variable.c (do_variable_definition): New function: extract the
73 part of try_variable_definition() that actually sets the value
74 into a separate function.
75 (try_variable_definition): Call do_variable_definition() after
76 parsing the variable definition string.
77 (define_variable_in_set): Make the name argument const.
79 * variable.h (enum variable_flavor): Make public.
80 (do_variable_definition): Create prototype.
82 * read.c (read_all_makefiles): Create a new built-in variable,
84 (read_makefile): Add each makefile read in to this variable value.
86 2002-05-09 Paul D. Smith <psmith@gnu.org>
88 * file.c (file_timestamp_now): Use K&R function declaration.
90 * getloadavg.c (getloadavg): Merge setlocale() fix from sh-utils
91 getloadavg.c. Autoconf thinks QNX is SVR4-like, but it isn't, so
92 #undef it. Remove predefined setup of NLIST_STRUCT. Decide
93 whether to include nlist.h based on HAVE_NLIST_H. Change obsolete
94 NLIST_NAME_UNION to new HAVE_STRUCT_NLIST_N_UN_N_NAME.
95 * configure.in (NLIST_STRUCT): Define this if we have nlist.h and
96 nlist.n_name is a pointer rather than an array.
98 * acinclude.m4 (make_FUNC_SETVBUF_REVERSED): Grab the latest
99 version of AC_FUNC_SETVBUF_REVERSED from autoconf CVS.
100 * configure.in: Use it instead of the old version.
102 * main.c (main): Prefer setvbuf() to setlinebuf().
104 2002-05-08 Paul D. Smith <psmith@gnu.org>
106 * Makefile.am (make_LDADD): Add GETLOADAVG_LIBS.
107 (loadavg_LDADD): Ditto.
109 2002-04-29 Paul D. Smith <psmith@gnu.org>
111 * expand.c (recursively_expand_for_file): Rename
112 recursively_expand() to recursively_expand_for_file() and provide
113 an extra argument, struct file. If the argument is provided, set
114 the variable scope to that of the file before expanding.
115 * variable.h (recursively_expand): Make this a macro that invokes
116 recursively_expand_for_file() with a NULL file pointer.
117 * variable.c (target_environment): Call the renamed function and
118 provide the current file context.
119 Fixes Debian bug #144306.
121 2002-04-28 Paul D. Smith <psmith@gnu.org>
123 Allow $(call ...) user-defined variables to be self-referencing
124 without throwing an error. Allows implementation of transitive
125 closures, among other possibly useful things.
126 Requested by: Philip Guenther <guenther@sendmail.com>
128 * variable.h (struct variable): Add a new field: exp_count, and
129 new macros to hold its size and maximum value.
130 (warn_undefined): Make this a macro.
131 * variable.c (define_variable_in_set): Initialize it.
132 * expand.c (recursively_expand): If we detect recursive expansion
133 of a variable, check the exp_count field. If it's greater than 0
134 allow the recursion and decrement the count.
135 (warn_undefined): Remove this (now a macro in variable.h).
136 * function.c (func_call): Before we expand the user-defined
137 function, modify its exp_count field to contain the maximum
138 number of recursive calls we'll allow. After the call, reset it
141 2002-04-21 Paul D. Smith <psmith@gnu.org>
143 Modified to use latest autoconf (2.53), automake (1.6.1), and
144 gettext (0.11.1). We're using gettext's new "external" support,
145 to avoid including libintl source with GNU make.
147 * README.cvs: New file. Explain how to build GNU make from CVS.
149 * configure.in: Modify checking for the system glob library.
150 Use AC_EGREP_CPP instead of AC_TRY_CPP. Remove the setting of
151 GLOBDIR (we will always put "glob" in SUBDIRS, so automake
152 etc. will manage it correctly). Set an automake conditional
153 USE_LOCAL_GLOB to decide whether to compile the glob library.
155 * getloadavg.c (main): Include make.h in the "TEST" program to
158 * Makefile.am: Remove special rules for loadavg. Replace them
159 with Automake capabilities for building extra programs.
161 * signame.c: This file does nothing if the system provide
162 strsignal(). If not, it implements strsignal(). If the system
163 doesn't define sys_siglist, then we make our own; otherwise we use
165 * signame.h: Removed.
167 * main.c (main): No need to invoke signame_init(). Update copyright.
169 * ABOUT-NLS: Removed.
170 * gettext.c: Removed.
171 * gettext.h: Get a simplified copy from the gettext package.
173 * i18n/*.po: Moved to po/.
176 * config/*: Created. Contains package configuration helper files.
177 * config.guess, config.sub: Moved to config directory.
179 * configure.in (AC_CONFIG_FILES): Add po/Makefile.in, config/Makefile.
180 Rework to use new-style autoconf features. Use the "external"
181 mode for gettext. Make the build.sh config file conditional on
182 whether build.sh.in exists, to avoid autoconf errors.
183 * acinclude.m4: Removed almost all macros as being obsolete.
184 Rewrote remaining macros to use AC_DEFINE.
185 * acconfig.h: Removed.
187 * Makefile.am (EXTRA_DIST): Add config/config.rpath. Use a
188 conditional to handle customs support. Remove special handling
191 2002-04-20 Paul D. Smith <psmith@gnu.org>
193 * function.c (func_call): Don't mark the argument variables $1,
194 etc. as recursive. They've already been fully expanded so
195 there's no need to do it again, and doing so strips escaped $'s.
196 Reported by Sebastian Glita <glseba@yahoo.com>.
198 * remake.c (notice_finished_file): Walk through double-colon
199 entries via the prev field, not the next field!
200 Reported by Greg McGary <greg@mcgary.org>.
202 * main.c (main): If the user specifies -q and asks for a specific
203 target which is a makefile, we got an assert. In that case it
204 turns out we should continue normally instead.
206 * i18n/de.po, i18n/fr.po: Installed an updated translation.
208 * i18n/he.po: Installed a new translation.
210 2002-01-07 Paul D. Smith <psmith@gnu.org>
212 * i18n/es.po, i18n/ru.po: Installed an updated translation.
214 2001-12-04 Paul D. Smith <psmith@gnu.org>
216 * i18n/ja.po: Installed an updated translation.
218 2001-09-04 Paul D. Smith <psmith@gnu.org>
220 * i18n/da.po: Installed an updated translation.
222 2001-08-03 Paul D. Smith <psmith@gnu.org>
224 * i18n/fr.po: Installed an updated translation.
225 Resolves Debian bug #106720.
227 2001-06-13 Paul D. Smith <psmith@gnu.org>
229 * i18n/da.po, configure.in (ALL_LINGUAS): Installed a new
232 2001-06-11 Paul D. Smith <psmith@gnu.org>
234 * i18n/ko.po: Installed a new translation.
236 2001-05-06 Paul D. Smith <psmith@gnu.org>
238 Modify the EINTR handling.
240 * job.c (new_job): Reorganize the jobserver algorithm. Reorder
241 the way in which we manage the file descriptor/signal handler race
242 trap to be more efficient.
244 2001-05-06 Paul Eggert <eggert@twinsun.com>
246 Restart almost all system calls that are interrupted, instead
247 of worrying about EINTR. The lone exception is the read() for
250 * configure.in (HAVE_SA_RESTART): New macro.
251 (MAKE_JOBSERVER): Define to 1 only if HAVE_SA_RESTART.
252 * main.c (main): Use SA_RESTART instead of the old,
253 nonstandard SA_INTERRUPT.
255 * configure.in (AC_CHECK_FUNCS): Add bsd_signal.
256 * main.c (bsd_signal): New function or macro,
257 if the implementation doesn't supply it.
258 (The bsd_signal function will be in POSIX 1003.1-200x.)
260 (main, FATAL_SIG): Use bsd_signal instead of signal or HANDLESIG.
262 * make.h (EINTR_SET): Remove.
263 (SA_RESTART): New macro.
265 * arscan.c (ar_member_touch): Don't worry about EINTR.
266 * function.c (func_shell): Likewise.
267 * job.c (reap_children, free_child, new_job): Likewise.
268 * main.c (main): Likewise.
269 * remake.c (touch_file, name_mtime): Likewise.
271 * arscan.c (ar_member_touch): Fix bug uncovered by EINTR removal;
272 if fstat failed with errno!=EINTR, the error was ignored.
274 * job.c (set_child_handler_action_flags): New function.
275 (new_job): Use it to temporarily clear the SIGCHLD action flags
276 while reading the token.
278 2001-05-02 Paul D. Smith <psmith@gnu.org>
280 * job.c (start_job_command): Don't add define/endef per-line flags
281 to the top-level flags setting.
283 2001-04-03 Paul D. Smith <psmith@gnu.org>
285 * arscan.c (VMS_get_member_info,ar_scan) [VMS]: VMS sets the low
286 bit on error, so check for odd return values, not non-0 return
288 (VMS_get_member_info): Calculate the timezone differences correctly.
289 Reported by John Fowler <jfowler@nyx.net>.
292 2001-03-14 Paul D. Smith <psmith@gnu.org>
294 * variable.c (lookup_variable) [VMS]: Null-terminate the variable
295 value before invoking define_variable().
296 Reported by John Fowler <jfowler@nyx.net>.
298 2001-02-07 Paul D. Smith <psmith@gnu.org>
300 * read.c (record_target_var): If we reset the variable due to a
301 command-line variable setting overriding it, turn off the "append"
304 2001-01-17 Paul D. Smith <psmith@gnu.org>
306 * variable.c (lookup_variable) [VMS]: When getting values from the
307 environment, allocate enough space for the _value_ plus escapes,
308 not enough space for the name plus escapes :-/.
309 Reported by John Fowler <jfowler@nyx.net>.
311 * remake.c (f_mtime): Removed the "***" prefix from the mod time
312 warnings that make generates, so it doesn't look like an error.
313 Reported by Karl Berry <karl@gnu.org>.
316 Fix for PR/2020: Rework appended target-specific variables. I'm
317 fairly confident this algorithm is finally correct.
319 * expand.c (allocated_variable_append): Rewrite. Instead of
320 expanding each appended variable then adding all the expanded
321 strings together, we append all the unexpanded values going up
322 through the variable set contexts, then expand the final result.
323 This behaves just like non-target-specific appended variable
324 values, while the old way didn't in various corner cases.
325 (variable_append): New function: recursively append the unexpanded
326 value of a variable, walking from the outermost variable scope to
328 * variable.c (lookup_variable): Remove the code that looked up the
329 variable set list if the found variable was "append". We don't
331 (lookup_variable_in_set): Make this non-static so we can use it
333 (try_variable_definition): Use lookup_variable_in_set() rather
334 than faking out current_variable_set_list by hand (cleanup).
335 * variable.h: Add a prototype for the now non-static
336 lookup_variable_in_set().
338 2000-11-17 Paul D. Smith <psmith@gnu.org>
340 * remake.c (f_mtime) [WINDOWS32]: On various advice, I changed the
341 WINDOWS32 port to assume timestamps can be up to 3 seconds away
342 before throwing a fit.
344 2000-11-17 Paul D. Smith <psmith@gnu.org>
346 * read.c (readline): CRLF calculations had a hole, if you hit the
347 buffer grow scenario just right. Reworked the algorithm to avoid
348 the need for len or lastlen at all. Problem description with
349 sample code chages provided by Chris Faylor <cgf@redhat.com>.
351 2000-10-24 Paul D. Smith <psmith@gnu.org>
353 * gettext.c (SWAP): Declare this with the prototype, otherwise
354 some systems don't work (non-32-bit? Reported for Cray T3E).
355 Reported by Thorstein Thorsteinsson <thor@signe.teokem.lu.se>.
357 2000-10-05 Paul D. Smith <psmith@gnu.org>
359 * acinclude.m4 (AM_LC_MESSAGES): Remove undefined macro
360 AM_LC_MESSAGES; it doesn't seem to do anything anyway??
362 * i18n/gl.po, configure.in (ALL_LINGUAS): New Galician translation.
364 2000-09-22 Paul D. Smith <psmith@gnu.org>
366 * gettext.c: Don't #define _GETTEXT_H here; we only include some
367 parts of the real gettext.h here, and we expect to really include
368 the real gettext.h later. If we keep this #define, it's ignored.
370 2000-09-21 Paul D. Smith <psmith@gnu.org>
372 * main.c (log_working_directory): Rework the text to use complete
373 sentences, to make life simpler for the translators.
375 2000-08-29 Paul D. Smith <psmith@gnu.org>
377 * file.c (remove_intermediates): Print a debug message before we
378 remove intermediate files, so the user (if she uses -d) knows
381 2000-08-21 Paul D. Smith <psmith@gnu.org>
383 * variable.c (try_variable_definition): Change how we handle
384 target-specific append variable defns: instead of just setting the
385 value, expand it as an append _but_ only within the current
386 target's context. Otherwise we lose all but the last value if the
387 variable is appended more than once within the current target
388 context. Fixes PR/1831.
390 2000-08-16 Paul D. Smith <psmith@gnu.org>
392 * function.c (func_shell): Nul-terminate the buffer before
393 printing an exec error message (just in case it's not!).
394 Fixes PR/1860, reported by Joey Hess <joey@valinux.com>.
396 2000-07-25 Paul D. Smith <psmith@gnu.org>
398 * job.c (construct_command_argv_internal): Add "~" to the list of
399 sh_chars[] which disallow optimizing out the shell call.
401 2000-07-23 Paul Eggert <eggert@twinsun.com>
403 * NEWS, make.texinfo: Document .LOW_RESOLUTION_TIME, which
404 supersedes --disable-nsec-timestamps.
405 * make.texinfo: Consistently use "time stamp" instead of "timestamp".
406 * README: Remove --disable-nsec-timestamps.
408 * filedef.h (struct file.low_resolution_time): New member.
409 * file.c (snap_deps): Add support for .LOW_RESOLUTION_TIME.
410 * remake.c (update_file_1):
411 Avoid spurious rebuilds due to low resolution time stamps,
412 generalizing the earlier code that applied only to archive members.
413 (f_mtime): Archive members always have low resolution time stamps.
415 * configure.in: Remove --disable-nsec-timestamps, as this has
416 been superseded by .LOW_RESOLUTION_TIME.
418 2000-07-23 Paul Eggert <eggert@twinsun.com>
420 * configure.in (enable_nsec_timestamps): Renamed from
421 make_cv_nsec_timestamps, since enable/disable options
424 2000-07-23 Bruno Haible <haible@clisp.cons.org>
425 and Paul Eggert <eggert@twinsun.com>
427 * file.c (file_timestamp_now):
428 Use preprocessor-time check for FILE_TIMESTAMP_HI_RES
429 so that clock_gettime is not linked unless needed.
431 * filedef.h (FILE_TIMESTAMP_HI_RES):
432 Remove definition; "configure" now does this.
434 * configure.in (jm_AC_TYPE_UINTMAX_T): Move up,
435 to before high resolution file timestamp check,
436 since that check now uses uintmax_t.
437 (FILE_TIMESTAMP_HI_RES): Define to nonzero if the code should use
438 high resolution file timestamps.
439 (HAVE_CLOCK_GETTIME): Do not define if !FILE_TIMESTAMP_HI_RES,
440 so that we don't link in clock_gettime unnecessarily.
442 2000-07-17 Paul D. Smith <psmith@gnu.org>
444 * i18n/ja.po: New version of the translation file.
446 2000-07-07 Paul D. Smith <psmith@gnu.org>
448 * remake.c (f_mtime): If NO_FLOAT is defined, don't bother with
449 the offset calculation.
450 (name_mtime): Replace EINTR test with EINTR_SET macro.
452 2000-07-07 Paul Eggert <eggert@twinsun.com>
456 * remake.c (update_file_1):
457 Avoid spurious rebuilds of archive members due to their
458 timestamp resolution being only one second.
459 (f_mtime): Avoid spurious warnings of timestamps in the future due to
460 the clock's resolution being lower than file timestamps'.
461 When warning about future timestamps, report only the discrepancy,
462 not the absolute value of the timestamp and the current time.
464 * file.c (file_timestamp_now): New arg RESOLUTION.
465 * filedef.h (file_timestamp_now): Likewise.
466 (FILE_TIMESTAMP_NS): Now returns int. All uses changed.
468 2000-07-05 Paul D. Smith <psmith@gnu.org>
470 * variable.c (lookup_variable) [VMS]: Remove vestigial references
471 to listp. Fixes PR/1793.
473 2000-06-26 Paul Eggert <eggert@twinsun.com>
475 * Makefile.am (MAINTAINERCLEANFILES): New macro, with stamp-pot in it.
477 * dir.c (vms_hash): Ensure ctype macro args are nonnegative.
479 * remake.c (f_mtime): Remove unused var memtime.
481 2000-06-25 Martin Buchholz <martin@xemacs.org>
483 * make.texinfo, NEWS, TODO.private: Minor spelling corrections.
484 Ran spell-check on make.texinfo.
487 See ChangeLog.2 for earlier changes.