Filewatcher File Search File Search
Content Search
» » » » » make_3.81-8.2_kfreebsd-amd64.deb » Content »
pkg://make_3.81-8.2_kfreebsd-amd64.deb:393418/usr/share/doc/make/  info  control  downloads

make - An utility for Directing compilation.…  more info»


2006-04-01  Paul D. Smith  <>

	Version 3.81 released.

	* NEWS: Updated for 3.81.

	* README.cvs: Mention that vpath builds are not supported out of
	CVS.  Fixes Savannah bug #16236.
	Remove update of make.texi from the list of things to do; we use
	version.texi now.

2006-03-26  Paul D. Smith  <>

	* doc/make.texi: Clean up licensing.  Use @copying and version.texi
	support from automake, as described in the Texinfo manual.

2006-03-25  Eli Zaretskii  <>

	* implicit.c (pattern_search) [HAVE_DOS_PATHS]: Don't compare b
	with lastslash, since the latter points to filename, not to
	* job.c (construct_command_argv_internal) [HAVE_DOS_PATHS]:
	Declare and define sh_chars_sh[].

2006-03-23  Paul D. Smith  <>

	* Look for in $srcdir so it will be
	built for remote configurations as well.

	* Make sure to clean up during distclean.
	Fixes Savannah bug #16166.

	* misc.c (log_access): Takes a const char *.
	* function.c (fold_newlines): Takes an unsigned int *.
	Both fixes for Savannah bug #16170.

2006-03-22  Boris Kolpackov  <>

	* implicit.c (pattern_search): Call set_file_variables only
	if we have prerequisites that need second expansion. Fixes
	Savannah bug #16140.

2006-03-19  Paul D. Smith  <>

	* remake.c (update_file): Add alloca(0) to clean up alloca'd
	memory on hosts that don't support it directly.

	* README.cvs: Add information on steps for making a release (to
	make sure I don't forget any).

	* main.c (clean_jobserver): Move jobserver cleanup code into a new
	(die): Cleanup code was removed from here; call the new function.
	(main): If we are re-execing, clean up the jobserver first so we
	don't leak file descriptors.
	Fix bug reported by Craig Fithian <>.

2006-03-17  Paul D. Smith  <>

	* maintMakefile (do-po-update): Rewrite this rule to clean up and
	allow multiple concurrent runs.
	Patch from Joseph Myers <>

2006-03-17  Boris Kolpackov  <>

	* dep.h (struct dep): Add the stem field.
	* misc.c (alloc_dep, free_dep): New functions.
	(copy_dep_chain): Copy stem.
	(free_dep_chain): Use free_dep.
	* read.c (record_files): Store stem in the dependency line.
	* file.c (expand_deps): Use stem stored in the dependency line. Use
	free_dep_chain instead of free_ns_chain.
	* implicit.c (pattern_search): Use alloc_dep and free_dep.
	* read.c (read_all_makefiles, eval_makefile, eval): Ditto.
	* main.c (main, handle_non_switch_argument): Ditto.
	* remake.c (check_dep): Ditto.
	* rule.c (convert_suffix_rule, freerule): Ditto.

2006-03-14  Paul D. Smith  <>

	* expand.c (variable_append): Instead of appending everything then
	expanding the result, we expand (or not, if it's simple) each part
	as we add it.
	(allocated_variable_append): Don't expand the final result.
	Fixes Savannah bug #15913.

2006-03-09  Paul Smith  <>

	* remake.c (update_file_1): Revert the change of 3 Jan 2006 which
	listed non-existent files as changed.  Turns out there's a bug in
	the Linux kernel builds which means that this change causes
	everything to rebuild every time.  We will re-introduce this fix
	in the next release, to give them time to fix their build system.
	Fixes Savannah bug #16002.
	Introduces Savannah bug #16051.

	* implicit.c (pattern_search) [DOS_PATHS]: Look for DOS paths if
	we *don't* find UNIX "/".
	Reported by David Ergo <>

2006-03-04  Eli Zaretskii  <>

	* variable.c (do_variable_definition) [WINDOWS32]: Call the shell
	locator function find_and_set_default_shell if SHELL came from the
	command line.

2006-02-20  Paul D. Smith  <>

	* variable.c (merge_variable_set_lists): It's legal for *setlist0
	to be null; don't core in that case.

2006-02-19  Paul D. Smith  <>

	* commands.c (set_file_variables): Realloc, not malloc, the static
	string values to avoid memory leaks.

	* expand.c (recursively_expand_for_file): Only set reading_file to
	an initialized value.

	* implicit.c (pattern_search): We need to make a copy of the stem
	if we get it from an intermediate dep, since those get freed.

	* file.c (lookup_file) [VMS]: Don't lowercase special targets that
	begin with ".".
	(enter_file) [VMS]: Ditto.
	Patch provided by Hartmut Becker <>.

2006-02-24  Eli Zaretskii  <>

	* job.c (construct_command_argv_internal): Fix last change.

	* w32/subproc/sub_proc.c (process_pipe_io): Make dwStdin,
        dwStdout, and dwStderr unsigned int: avoids compiler warnings in
        the calls to _beginthreadex.

	* expand.c (recursively_expand_for_file): Initialize `save' to
        prevent compiler warnings.

2006-02-18  Eli Zaretskii  <>

        * job.c (construct_command_argv_internal): Don't create a temporary
	script/batch file if we are under -n.  Call _setmode to switch the
	script file stream to text mode.

2006-02-17  Paul D. Smith  <>

	* variable.c (merge_variable_set_lists): Don't try to merge the
	global_setlist.  Not only is this useless, but it can lead to
	circularities in the linked list, if global_setlist->next in one
	list gets set to point to another list which also ends in
	Fixes Savannah bug #15757.

2006-02-15  Paul D. Smith  <>

	Fix for Savannah bug #106.

	* expand.c (expanding_var): Keep track of which variable we're
	expanding.  If no variable is being expanded, it's the same as
	* make.h (expanding_var): Declare it.
	* expand.c (recursively_expand_for_file): Set expanding_var to the
	current variable we're expanding, unless there's no file info in
	it (could happen if it comes from the command line or a default
	variable).  Restore it before we exit.
	* expand.c (variable_expand_string): Use the expanding_var file
	info instead of the reading_file info.
	* function.c (check_numeric): Ditto.
	(func_word): Ditto.
	(func_wordlist): Ditto.
	(func_error): Ditto.
	(expand_builtin_function): Ditto.
	(handle_function): Ditto.

2006-02-14  Paul D. Smith  <>

	* read.c (eval): Even if the included filenames expands to the
	empty string we still need to free the allocated buffer.

	* implicit.c (pattern_search): If we allocated a variable set for
	an impossible file, free it.
	* variable.c (free_variable_set): New function.
	* variable.h: Declare it.

	* read.c (read_all_makefiles): Makefile names are kept in the
	strcache, so there's never any need to alloc/free them.
	(eval): Ditto.

	* main.c (main): Add "archives" to the .FEATURES variable if
	archive support is enabled.
	* doc/make.texi (Special Variables): Document it.

2006-02-13  Paul D. Smith  <>

	* implicit.c (pattern_search): Add checking for DOS pathnames to
	the pattern rule target LASTSLASH manipulation.
	Fixes Savannah bug #11183.

2006-02-11  Paul D. Smith  <>

	* (ALL FILES): Updated copyright and license notices.

2006-02-10  Paul D. Smith  <>

	A new internal capability: the string cache is a read-only cache
	of strings, with a hash table interface for fast lookup.  Nothing
	in the cache will ever be freed, so there's no need for reference
	counting, etc.  This is the beginning of a full solution for
	Savannah bug #15182, but for now we only store makefile names here.

	* strcache.c: New file.  Implement a read-only string cache.
	* make.h: Add prototypes for new functions.
	* main.c (initialize_global_hash_tables): Initialize the string cache.
	(print_data_base): Print string cache stats.
	* read.c (eval_makefile): Use the string cache to store makefile
	names.  Rewrite the string allocation to be sure we free everything.

2006-02-10  Eli Zaretskii  <>

	* dir.c (dir_contents_file_exists_p): Don't opendir if the
	directory time stamp didn't change, except on FAT filesystems.
	Suggested by J. David Bryan <>.

2006-02-09  Paul D. Smith  <>

	* function.c (func_or): Implement a short-circuiting OR function.
	(func_and): Implement a short-circuiting AND function.
	(function_table_init): Update the table with the new functions.
	* doc/make.texi (Conditional Functions): Changed the "if" section
	to one on general conditional functions.  Added documentation for
	$(and ...) and $(or ...) functions.
	* NEWS: Note new $(and ...) and $(or ...) functions.

2006-02-08  Boris Kolpackov  <>

	* job.h (struct child): Add the dontcare bitfield.
	* job.c (new_job): Cache dontcare flag.
	* job.c (reap_children): Use cached dontcare flag instead of the
	one in struct file. Fixes Savannah bug #15641.

2006-02-06  Paul D. Smith  <>

	* vpath.c (selective_vpath_search): If the file we find has a
	timestamp from -o or -W, use that instead of the real time.
	* remake.c (f_mtime): If the mtime is a special token from -o or
	-W, don't overwrite it with the real mtime.
	Fixes Savannah bug #15341.

	Updates from Markus Mauhart <>:

	* w32/subproc/sub_proc.c (process_begin): Remove no-op tests.
	(process_signal, process_last_err, process_exit_code): Manage
	invalid handle values.
	(process_{outbuf,errbuf,outcnt,errcnt,pipes}): Unused and don't
	manage invalid handles; remove them.
	* job.c (start_job_command) [WINDOWS32]: Jump out on error.
	* config.h.W32.template [WINDOWS32]: Set flags for Windows builds.
	* README.cvs: Updates for building from CVS.

2006-02-05  Paul D. Smith  <>

	* file.c (enter_file): Keep track of the last double_colon entry,
	to avoid walking the list every time we want to add a new one.
	Fixes Savannah bug #15533.
	* filedef.h (struct file): Add a new LAST pointer.

	* dir.c (directory_contents_hash_cmp): Don't use subtraction to do
	the comparison.  For 64-bits systems the result of the subtraction
	might not fit into an int.  Use comparison instead.
	Fixes Savannah bug #15534.

	* doc/make.texi: Update the chapter on writing commands to reflect
	the changes made in 3.81 for backslash/newline and SHELL handling.

2006-02-01  Paul D. Smith  <>

	* dir.c (dir_contents_file_exists_p) [WINDOWS32]: Make sure
	variable st is not used when it's not initialized.
	Patch from Eli Zaretskii <>.

2006-01-31  Paul D. Smith  <>

	* README.W32.template: Applied patch #4785 from
	Markus Mauhart <>.
	* README.cvs: Applied patch #4786 from
	Markus Mauhart <>.
	* make_msvc_net2003.vcproj [WINDOWS32]: New version from
	J. Grant <>.

	* main.c: Update the copyright year in the version output.
	* prepare_w32.bat: Remove this file from the distribution.

2006-01-21  Eli Zaretskii  <>

	* remake.c (update_goal_chain): Set g->changed instead of
	incrementing it, as it is only 8-bit wide, and could overflow if
	many commands got started in update_file.

	* w32/include/sub_proc.h: Add a prototype for process_used_slots.

	* w32/subproc/sub_proc.c: Change dimension of proc_array[] to
	(process_wait_for_any_private): Change dimension of handles[]
	(process_used_slots): New function.
	(process_register): Don't register more processes than the
	available number of slots.
	(process_easy): Don't start new processes if all slots are used	up.

	* job.c (load_too_high, start_waiting_jobs) [WINDOWS32]: If there
	are already more children than sub_proc.c can handle, behave as if
	the load were too high.
	(start_job_command): Fix a typo in error message when process_easy

2006-01-14  Eli Zaretskii  <>

	* main.c (main) [WINDOWS32]: Don't refuse to run with -jN, even if
	the shell is not sh.exe.

	* job.c (create_batch_file): Renamed from create_batch_filename;
	all callers changed.  Don't close the temporary file; return its
	file descriptor instead.  New arg FD allows to return the file
	(construct_command_argv_internal): Use _fdopen instead of fopen to
	open the batch file.

2006-01-04  Paul D. Smith  <>

	* readme.vms: Updates for case-insensitive VMS file systems from
	Hartmut Becker <>.
	* dir.c (vms_hash): Ditto.
	* vmsify.c (copyto): Ditto.
	* vmsfunctions.c (readdir): Ditto.

	* make.1: Add a section on the exit codes for make.

	* doc/make.texi: A number of minor updates to the documentation.

2006-01-03  Paul D. Smith  <>

	* remake.c (update_file_1): Mark a prerequisite changed if it
	doesn't exist.

	* read.c (eval): Be sure to strip off trailing whitespace from the
	prerequisites list properly.  Also, initialize all fields in
	struct dep when creating a new one.

2005-12-28  Paul D. Smith  <>

	* config.h.W32.template [WINDOWS32]: Add in some pragmas to
	disable warnings for MSC.
	Patch by Rob Tulloh <>.

2005-12-17  Eli Zaretskii  <>

	* doc/make.texi (Execution): Add a footnote about changes in
	handling of backslash-newline sequences.  Mention the differences
	on MS-DOS and MS-Windows.

	* NEWS: More details about building the MinGW port and a pointer
	to README.W32.  Fix the section name that describes the new
	backward-incompatible processing of backslash-newline sequences.
	The special processing of SHELL set to "cmd" is only relevant to
	MS-Windows, not MS-DOS.

2005-12-17  Eli Zaretskii  <>

	* main.c (handle_runtime_exceptions): Cast exrec->ExceptionAddress
	to DWORD, to avoid compiler warnings.
	* job.c (exec_command): Cast hWaitPID and hPID to DWORD, and
	use %ld in format, to avoid compiler warnings.

	* doc/make.texi (Special Targets): Fix a typo.
	(Appending): Fix cross-reference to Setting.
	(Special Variables, Secondary Expansion, File Name Functions)
	(Flavor Function, Pattern Match, Quick Reference): Ensure two
	periods after a sentence.
	(Execution): Add @: after "e.g.".
	(Environment): Fix punctuation.
	(Target-specific, Call Function, Quick Reference): Add @: after "etc."
	(Shell Function, Target-specific): Add @: after "vs."

2005-12-14  Boris Kolpackov  <>

	* read.c (record_target_var): Initialize variable's export field
	with v_default instead of leaving it "initialized" by whatever
	garbage happened to be on the heap.

2005-12-12  Paul D. Smith  <>

	* make.1: Fix some display errors and document all existing options.
	Patch provided by Mike Frysinger <>.

2005-12-11  Paul D. Smith  <>

	* implicit.c (pattern_search): If 2nd expansion is not set for
	this implicit rule, replace the pattern with the stem directly,
	and don't re-expand the variable list.  Along with the other
	.SECONDEXPANSION changes below, fixes bug #13781.

2005-12-09  Boris Kolpackov  <>

	* implicit.c (pattern_search): Mark other files that this rule
	builds as targets so that they are not treated as intermediates
	by the pattern rule search algorithm. Fixes bug #13022.

2005-12-07  Boris Kolpackov  <>

	* remake.c (notice_finished_file): Propagate the change of
	modification time to all the double-colon entries only if
	it is the last one to be updated. Fixes bug #14334.

2005-11-17  Boris Kolpackov  <>

	* function.c (func_flavor): Implement the flavor function which
	returns the flavor of a variable.
	* doc/make.texi (Functions for Transforming Text): Document it.
	* NEWS: Add it to the list of new functions.

2005-11-14  Boris Kolpackov  <>

	* read.c (construct_include_path): Set the .INCLUDE_DIRS special
	* doc/make.texi (Special Variables): Document .INCLUDE_DIRS.
	* NEWS: Add .INCLUDE_DIRS to the list of new special variables.

2005-10-26  Paul Smith  <>

	* read.c (record_files): Don't set deps flags if there are no deps.
	* maintMakefile: We only need to build the templates when we are
	creating a distribution, so don't do it for "all".

2005-10-24  Paul D. Smith  <>

	Make secondary expansion optional: its enabled by declaring the
	special target .SECONDEXPANSION.

	* NEWS: Update information on second expansion capabilities.
	* doc/make.texi (Secondary Expansion): Document the
	.SECONDEXPANSION special target and its behavior.
	* dep.h (struct dep): Add a flag STATICPATTERN, set to true if the
	prerequisite list was found in a static pattern rule.
	(free_dep_chain): Declare a prototype.
	* file.c (parse_prereqs): New function: break out some complexity
	from expand_deps().
	(expand_deps): If we aren't doing second expansion, replace % with
	the stem for static pattern rules.  Call the new function.
	* filedef.h (parse_prereqs): Declare a prototype.
	* implicit.c (pattern_search): Initialize the new staticpattern
	* main.c (second_expansion): Declare a global variable to remember
	if the special target has been seen.  Initialize the new
	staticpattern field for prerequisites.
	* make.h: Extern for second_expansion.
	* misc.c (free_dep_chain): New function: frees a struct dep list.
	* read.c (read_all_makefiles): Initialize the staticpattern field.
	(eval_makefile): Ditto.
	(record_files): Check for the .SECONDEXPANSION target and set
	second_expansion global if it's found.
	Use the new free_dep_chain() instead of doing it by hand.
	Set the staticpattern field for prereqs of static pattern targets.

2005-10-16  Paul D. Smith  <>

	* main.c (main): Set CURDIR to be a file variable instead of a
	default, so that values of CURDIR inherited from the environment
	won't override the make value.

2005-09-26  Paul D. Smith  <>

	* job.c (construct_command_argv_internal): If the line is empty
	remember to free the temporary argv strings.
	Fixes bug # 14527.

2005-09-16  Paul D. Smith  <>

	* job.c (start_job_command): The noerror flag is a boolean (single
	bit); set it appropriately.
	Reported by Mark Eichin <>

2005-08-29  Paul D. Smith  <>

	* function.c (func_error): On Windows, output from $(info ...)
	seems to come in the wrong order.  Try to force it with fflush().

2005-08-10  Boris Kolpackov  <>

	* read.c (record_files): Move code that sets stem for static
	pattern rules out of the if (!two_colon) condition so it is
	also executed for two-colon rules. Fixes Savannah bug #13881.

2005-08-08  Paul D. Smith  <>

	* make.h: Don't test that __STDC__ is non-0.  Some compilers
	(Windows for example) set it to 0 to denote "ISO C + extensions".
	Fixes bug # 13594.

2005-08-07  Paul D. Smith  <>

	* w32/pathstuff.c (getcwd_fs): Fix warning about assignment in a
	conditional (slightly different version of a fix from Eli).

	Fix a bug reported by Michael Matz <>: patch included.
	If make is running in parallel without -k and two jobs die in a
	row, but not too close to each other, then make will quit without
	waiting for the rest of the jobs to die.

	* main.c (die): Don't reset err before calling reap_children() the
	second time: we still want it to be in the error condition.
	* job.c (reap_children): Use a static variable, rather than err,
	to control whether or not the error message should be printed.

2005-08-06  Eli Zaretskii  <>

	* w32/subproc/sub_proc.c: Include signal.h.
	(process_pipe_io, process_file_io): Pass a pointer to a local
	DWORD variable to GetExitCodeProcess.  If the exit code is
	CONTROL_C_EXIT, put SIGINT into pproc->signal.

	* job.c [WINDOWS32]: Include windows.h.
	(main_thread) [WINDOWS32]: New global variable.
	(reap_children) [WINDOWS32]: Get the handle for the main thread
	and store it in main_thread.

	* commands.c [WINDOWS32]: Include windows.h and w32err.h.
	(fatal_error_signal) [WINDOWS32]: Suspend the main thread before
	doing anything else.  When we are done, close the main thread
	handle and exit with status 130.

2005-07-30  Eli Zaretskii  <>

	* w32/subproc/sub_proc.c (process_begin): Don't pass a NULL
	pointer to fprintf.

	* main.c (find_and_set_default_shell): If found a DOSish shell,
	set sh_found and the value of default_shell, and report the
	findings in debug mode.

	* job.c (construct_command_argv_internal): Check unixy_shell, not
	no_default_sh_exe, to decide whether to use Unixy or DOSish
	builtin commands.

	* README.W32: Update with info about the MinGW build.

	* build_w32.bat: Support MinGW.

	* w32/subproc/build.bat: Likewise.

	* w32/subproc/sub_proc.c (process_easy): Fix format strings for
	printing DWORD args.

	* function.c (windows32_openpipe): Fix format strings for printing
	DWORD args.

	* job.c (reap_children) [WINDOWS32]: Don't declare 'status' and
	(start_job_command): Fix format string for printing the result of
	(start_job_command) [WINDOWS32]: Do not define.
	(exec_command): Fix format string for printing HANDLE args.

	* main.c (handle_runtime_exceptions): Fix sprintf format strings
	to avoid compiler warnings.
	(open_tmpfile): Declare fd only if HAVE_FDOPEN is defined.
	(Note: some of these fixes were submitted independently by J. Grant)

2005-07-30  J. Grant <>

	* prepare_w32.bat: Copy config.h.w32 to config.h if not exist.
	* make_msvc_net2003.vcproj, make_msvc_net2003.sln: MSVC Project files.
	* (EXTRA_DIST): Add MSVC Project files.

2005-07-15  Paul Smith  <>

	* job.c (construct_command_argv_internal) [DOS,WINDOWS32,OS/2]: If
	we don't have a POSIX shell, then revert to the old
	backslash-newline behavior (where they are stripped).
	Fixes bug #13665.

2005-07-08  Paul D. Smith  <>

	* config.h.W32.template: Reorder to match the standard config.h,
	for easier comparisons.
	From J. Grant <>

	* maintMakefile: Remove .dep_segment before overwriting it, in
	case it's not writable or noclobber is set.
	* expand.c (variable_expand_string): Cast result of pointer
	arithmetic to avoid a warning.
	* main.c (switches): Add full-fledged final initializer.

2005-07-06  Paul D. Smith  <>

	* IRIX has _sys_siglist.  Tru64 UNIX has __sys_siglist.
	* signame.c (strsignal): If we found _sys_siglist[] or
	__sys_siglist[] use those instead of sys_siglist[].
	From Albert Chin <>

2005-07-04  Paul D. Smith  <>

	* config.h-vms.template [VMS]: Latest VMS has its own glob() and
	globfree(); set up to use the GNU versions.
	From Martin Zinser <>

2005-07-03  Paul D. Smith  <>

	From J. Grant <>:

	* README.W32.template: Update the Windows and tested MSVC versions.
	* NMakefile.template (CFLAGS_any): Change warning level from W3 to W4.
	* w32/subproc/NMakefile (CFLAGS_any): Ditto.
	* build_w32.bat: Ditto.
	* w32/subproc/build.bat: Ditto.

2005-06-28  Paul D. Smith  <>

	* signame.c: HAVE_DECL_* macros are set to 0, not undef, if the
	declaration was checked but not present.

2005-06-27  Paul D. Smith  <>

	* dir.c (find_directory): Change type of fs_serno/fs_flags/fs_len
	to unsigned long.  Fixes Savannah bug #13550.

	* w32/subproc/sub_proc.c: Remove (HANDLE) casts on lvalues.
	(process_pipe_io): Initialize tStdin/tStdout/tStderr variables.
	Fixes Savannah bug #13551.

2005-06-26  Paul D. Smith  <>

	* make.h: Fix bug in ANSI_STRING/strerror() handling; only define
	it if ANSI_STRING is not set.

2005-06-25  Paul D. Smith  <>

	* read.c (eval): If no filenames are passed to any of the
	"include" variants, don't print an error.
	* doc/make.texi (Include): Document this.
	Fixes Savannah bug #1761.

	* job.c (construct_command_argv_internal): Sanitize handling of
	backslash/newline pairs according to POSIX: that is, keep the
	backslash-newline in the command script, but remove a following
	TAB character, if present.  In the fast path, make sure that the
	behavior matches what the shell would do both inside and outside
	of quotes.  In the slow path, quote the backslash and put a
	literal newline in the string.
	Fixes Savannah bug #1332.
	* doc/make.texi (Execution): Document the new behavior and give
	some examples.
	* NEWS: Make a note of the new behavior.

	* make.h [WINDOWS32]: #include <direct.h>.
	Fixes Savannah bug #13478.

	* remake.c (name_mtime): If the stat() of a file fails and the -L
	option was given and the file is a symlink, take the best mtime of
	the symlink we can get as the mtime of the file and don't fail.
	Fixes Savannah bug #13280.

	* read.c (find_char_unquote): Accept a new argument IGNOREVARS.
	If it's set, then don't	stop on STOPCHARs or BLANKs if they're
	inside a variable reference.  Make this function static as it's
	only used here.
	(eval): Call find_char_unquote() with IGNOREVARS set when we're
	parsing an unexpanded line looking for semicolons.
	Fixes Savannah bug #1454.
	* misc.c (remove_comments): Move this to read.c and make it static
	as it's only used there.  Call find_char_unquote() with new arg.
	* make.h: Remove prototypes for find_char_unquote() and
	remove_comments() since they're static now.

	* main.c (main): If we see MAKE_RESTARTS in the environment, unset
	its export flag and obtain its value.  When we need to re-exec,
	increment the value and add it into the environment.
	* doc/make.texi (Special Variables): Document MAKE_RESTARTS.
	* main.c (always_make_set): New variable.  Change the -B option to
	set this one instead.
	(main): When checking makefiles, only set always_make_flag if
	always_make_set is set AND the restarts flag is 0.  When building
	normal targets, set it IFF always_make_set is set.
	(main): Avoid infinite recursion with -W, too: only set what-if
	files to NEW before we check makefiles if we've never restarted
	before.  If we have restarted, set what-if files to NEW _after_ we
	check makefiles.
	Fixes Savannah bug #7566:

2005-06-17  Paul D. Smith  <>

	* default.c: Change VMS implicit rules to use $$$$ instead of $$
	in the prerequisites list.

2005-06-12  Paul D. Smith  <>

	Fix Savannah bug # 1328.

	* Check for atexit().
	* misc.c (close_stdout): Test stdout to see if writes to it have
	failed.  If so, be sure to exit with a non-0 error code.  Based on
	code found in gnulib.
	* make.h: Prototype.
	* main.c (main): Install close_stdout() with atexit().

2005-06-10  Paul D. Smith  <>

	VMS build updates from Hartmut Becker <>:

	* vmsjobs.c [VMS]: Updates to compile on VMS: add some missing
	headers; make vmsWaitForChildren() static; extern vmsify().
	* job.c [VMS]: Move vmsWaitForChildren() prototype to be global.
	Don't create child_execute_job() here (it's in vmsjobs.c).
	* makefile.vms (job.obj) [VMS]: Add vmsjobs.c as a prerequisite.

2005-06-09  Paul D. Smith  <>

	* variable.c (push_new_variable_scope): File variables point
	directly to the global_setlist variable.  So, inserting a new
	scope in front of that has no effect on those variables: they
	don't go through current_variable_set_list.  If we're pushing a
	scope and the current scope is global, push it "the other way" so
	that the new setlist is in the global_setlist variable, and
	next points to a new setlist with the global variable set.
	(pop_variable_scope): Properly undo a push with the new
	Fixes Savannah bug #11913.

2005-05-31  Boris Kolpackov  <>

	* job.c (reap_children): Don't die of the command failed but
	the dontcare flag is set. Fixes Savannah bug #13216.

	* implicit.c (pattern_search): When creating a target from
	an implicit rule match, lookup pattern target and set precious
	flag in a newly created target. Fixes Savannah bug #13218.

2005-05-13  Paul D. Smith  <>

	Implement "if... else if... endif" syntax.

	* read.c (eval): Push all checks for conditional words ("ifeq",
	"else", etc.) down into the conditional_line() function.
	(conditional_line): Rework to allow "else if..." clause.  New
	return value -2 for lines which are not conditionals.  The
	ignoring flag can now also be 2, which means "already parsed a
	true branch".  If that value is seen no other branch of this
	conditional can be considered true.  In the else parsing if there
	is extra text after the else, invoke conditional_line()
	recursively to see if it's another conditional.  If not, it's an
	error.  If so, raise the conditional value to this level instead
	of creating a new conditional nesting level.  Special check for
	"else" and "endif", which aren't allowed on the "else" line.
	* doc/make.texi (Conditional Syntax): Document the new syntax.

2005-05-09  Paul D. Smith  <>

	* (EXTRA_make_SOURCES): Add vmsjobs.c
	(MAYBE_W32): Rework how SUBDIRS are handled so that "make dist"
	recurses to the w32 directory, even on non-Windows systems.  Use
	the method suggested in the automake manual.
	* Add w32/Makefile to AC_CONFIG_FILES.
	* maintMakefile (gnulib-url): They moved the texinfo.tex files.

2005-05-07  Paul D. Smith  <>

	* main.c (die): If we're dying with a fatal error (not that a
	command has failed), write back any leftover tokens before we go.

	* job.c (set_child_handler_action_flags): If there are jobs
	waiting for the load to go down, set an alarm to go off in 1
	second.  This allows us to wake up from a potentially long-lasting
	read() and start a new job if the load has gone down.  Turn it off
	after the read.
	(job_noop): Dummy signal handler function.
	(new_job): Invoke it with the new semantics.

	* docs/make.texi: Document secondary expansion.  Various cleanups
	and random work.

2005-05-03  Paul D. Smith  <>

	Rename .DEFAULT_TARGET to .DEFAULT_GOAL: in GNU make terminology
	the targets which are to ultimately be made are called "goals";
	see the GNU make manual.  Also, MAKECMDGOALS, etc.

	* filedef.h, read.c, main.c: Change .DEFAULT_TARGET to
	.DEFAULT_GOAL, and default_target_name to default_goal_name.
	* doc/make.texi (Special Variables): Document .DEFAULT_GOAL.

2005-05-02  Paul D. Smith  <>

	* job.c, vmsjobs.c (vmsWaitForChildren, vms_redirect,
	vms_handle_apos, vmsHandleChildTerm, reEnableAst, astHandler,
	tryToSetupYAst, child_execute_job) [VMS]: Move VMS-specific
	functions to vmsjobs.c.  #include it into jobs.c.

	Grant Taylor <> reports that -j# can lose
	jobserver tokens.  I found that this happens when an exported
	recursive variable contains a $(shell ...) function reference: in
	this situation we could "forget" to write back a token.

	* job.c, job.h: Add variable jobserver_tokens: counts the tokens
	we have.  It's not reliable to depend on the number of children in
	our linked list so keep a separate count.
	(new_job): Check jobserver_tokens rather than children &&
	waiting_jobs.  Increment jobserver_tokens when we get one.
	(free_child): If jobserver_tokens is 0, internal error.  If it's
	>1, write a token back to the jobserver pipe (we don't write a
	token for the "free" job).  Decrement jobserver_tokens.

	* main.c: Add variable master_job_slots.
	(main): Set it to hold the number of jobs requested if we're the
	master process, when using the jobserver.
	(die): Sanity checks: first test jobserver_tokens to make sure
	this process isn't holding any tokens we didn't write back.
	Second, if master_job_slots is set count the tokens left in the
	jobserver pipe and ensure it's the same as master_job_slots (- 1).

2005-04-24  Paul D. Smith  <>

	Grant Taylor <> reports that -j# in conjunction
	with -l# can lose jobserver tokens, because waiting jobs are not
	consulted properly when checking for the "free" token.

	* job.c (free_child): Count waiting_jobs as having tokens.
	* job.c (new_job): Ditto.  Plus, call start_waiting_jobs() here to
	handle jobs waiting for the load to drop.

2005-04-23  Paul D. Smith  <>

	* main.c (main): Be careful to not core if a variable setting in
	the environment doesn't contain an '='.  This is illegal but can
	happen in broken setups.
	Reported by Joerg Schilling <>.

2005-04-12  Paul D. Smith  <>

	The second expansion feature causes significant slowdown.  Timing
	a complex makefile (GCC 4.1) shows a slowdown from .25s to just
	read the makefile before the feature, to 11+s to do the same
	operations after the feature.  Additionally, memory usage
	increased drastically.  To fix this I added some intelligence that
	avoids the overhead of the second expansion unless it's required.

	* dep.h: Add a new boolean field, need_2nd_expansion.

	* read.c (eval): When creating the struct dep for the target,
	check if the name contains a "$"; if so set need_2nd_expansion to 1.
	(record_files): If there's a "%" in a static pattern rule, it gets
	converted to "$*" so set need_2nd_expansion to 1.

	* file.c (expand_deps): Rework to be more efficient.  Only perform
	initialize_file_variables(), set_file_variables(), and
	variable_expand_for_file() if the need_2nd_expansion is set.

	* implicit.c (pattern_search): Default need_2nd_expansion to 0.
	(pattern_search): Ditto.
	* main.c (handle_non_switch_argument): Ditto.
	(main): Ditto.
	* read.c (read_all_makefiles): Ditto.
	(eval_makefile): Ditto.

2005-04-07  Paul D. Smith  <>

	* main.c (main) [WINDOWS32]: Export PATH to sub-shells, not Path.
	* variable.c (sync_Path_environment): Ditto.
	Patch by Alessandro Vesely.  Fixes Savannah bug #12209.

	* main.c (main): Define the .FEATURES variable.
	* NEWS: Announce .FEATURES.
	* doc/make.texi (Special Variables): Document .FEATURES.

	* remake.c (check_dep): If a file is .PHONY, update it even if
	it's marked intermediate.  Fixes Savannah bug #12331.

2005-03-15  Boris Kolpackov  <>

	* file.c (expand_deps): Factor out the second expansion and
	prerequisite line parsing logic from snap_deps().

	* file.c (snap_deps): Use expand_deps(). Expand and parse
	prerequisites of the .SUFFIXES special target first. Fixes
	Savannah bug #12320.

2005-03-13  Paul D. Smith  <>

	* main.c (main) [MSDOS]: Export SHELL in MSDOS.  Requested by Eli

2005-03-11  Paul D. Smith  <>

	* signame.c (strsignal): HAVE_DECL_SYS_SIGLIST is 0 when not
	available, not undefined (from Earnie Boyd).

2005-03-10  Boris Kolpackov  <>

	* implicit.c (pattern_search): Mark an intermediate target as
	precious if it happened to be a prerequisite of some (other)
	target. Fixes Savannah bug #12267.

2005-03-09  Paul D. Smith  <>

	* read.c (eval_makefile): Add alloca(0).
	(eval_buffer): Ditto.

2005-03-09  Boris Kolpackov  <>

	* main.c (main): Use o_file instead of o_default when defining
	the .DEFAULT_TARGET special variable.
	* read.c (eval): Use define_variable_global() instead of
	define_variable() when setting new value for the .DEFAULT_TARGET
	special variable.  Fixes Savannah bug #12266.

2005-03-04  Boris Kolpackov  <>

	* imlicit.c (pattern_search): Mark files for which an implicit
	rule has been found as targets. Fixes Savannah bug #12202.

2005-03-04  Paul D. Smith  <>

	* AUTHORS: Update.
	* doc/make.texi (Automatic Variables): Document $|.

2005-03-03  Boris Kolpackov  <>

	* read.c (record_files): Instead of substituting % with
	actual stem value in dependency list replace it with $*.
	This fixes stem triple expansion bug.

	* implicit.c (pattern_search): Copy stem to a separate
	buffer and make it a properly terminated string. Assign
	this buffer instead of STEM (which is not terminated) to
	f->stem. Instead of substituting % with actual stem value
	in dependency list replace it with $*. This fixes stem
	triple expansion bug.

2005-03-01  Paul D. Smith  <>

	* commands.c (fatal_error_signal) [WINDOWS32]: Don't call kill()
	on Windows, as it takes a handle not a pid.  Just exit.
	Fix from patch #3679, provided by Alessandro Vesely.

	* Update check for sys_siglist[] from autoconf manual.
	* signame.c (strsignal): Update to use the new autoconf macro.

2005-03-01  Boris Kolpackov  <>

	* read.c (record_files): Add a check for the list of prerequisites
	of a static pattern rule being empty. Fixes Savannah bug #12180.

2005-02-28  Paul D. Smith  <>

	* doc/make.texi (Text Functions): Update docs to allow the end
	ordinal for $(wordlist ...) to be 0.
	* function.c (func_wordlist): Fail if the start ordinal for
	$(wordlist ...) is <1.  Matches documentation.
	Resolves Savannah support request #103195.

	* remake.c (update_goal_chain): Fix logic for stopping in -q:
	previously we were stopping when !-q, exactly the opposite.  This
	has been wrong since version 1.34, in 1994!
	(update_file): If we got an error don't break out to run more
	double-colon rules: just return immediately.
	Fixes Savannah bug #7144.

2005-02-27  Paul D. Smith  <>

	* misc.c (end_of_token): Make argument const.
	* make.h: Update prototype.

	* function.c (abspath, func_realpath, func_abspath): Use
	PATH_VAR() and GET_PATH_MAX instead of PATH_MAX.
	* dir.c (downcase): Use PATH_VAR() instead of PATH_MAX.
	* read.c (record_files): Ditto.
	* variable.c (do_variable_definition): Ditto.

	* function.c (func_error): Create a new function $(info ...) that
	simply prints the message to stdout with no extras.
	(function_table_init): Add new function to the table.
	* NEWS: Add $(info ...) reference.
	* doc/make.texi (Make Control Functions): Document it.

	New feature: if the system supports symbolic links, and the user
	provides the -L/--check-symlink-time flag, then use the latest
	mtime between the symlink(s) and the target file.

	* (MAKE_SYMLINKS): Check for lstat() and
	readlink().  If both are available, define MAKE_SYMLINKS.
	* main.c: New variable: check_symlink_flag.
	(usage): Add a line for -L/--check-symlink-times to the help string.
	(switches): Add -L/--check-symlink-times command line argument.
	(main): If MAKE_SYMLINKS is not defined but the user specified -L,
	print a warning and disable it again.
	* make.h: Declare check_symlink_flag.
	* remake.c (name_mtime): If MAKE_SYMLINKS and check_symlink_flag,
	if the file is a symlink then check each link in the chain and
	choose the NEWEST mtime we find as the mtime for the file.  The
	newest mtime might be the file itself!
	* NEWS: Add information about this new feature.
	* doc/make.texi (Options Summary): Add -L/--check-symlink-times docs.

	Avoid core dumps described in Savannah bug # 12124:

	* file.c: New variable snapped_deps remember whether we've run
	(snap_deps): Set it.
	* filedef.h: Extern it.
	* read.c (record_files): Check snapped_deps; if it's set then
	we're trying to eval a new target/prerequisite relationship from
	within a command script, which we don't support.  Fatal.

2005-02-28  Boris Kolpackov  <>

	Implementation of the .DEFAULT_TARGET special variable.

	* read.c (eval): If necessary, update default_target_name when
	reading rules.
	* read.c (record_files): Update default_target_file if
	default_target_name has changed.
	* main.c (default_target_name): Define.
	* main.c (main): Enter .DEFAULT_TARGET as make variable. If
	default_target_name is set use default_target_file as a root
	target to make.
	* filedef.h (default_target_name): Declare.
	* dep.h (free_dep_chain):
	* misc.c (free_dep_chain): Change to operate on struct nameseq
	and change name to free_ns_chain.
	* file.c (snap_deps): Update to use free_ns_chain.

2005-02-27  Boris Kolpackov  <>

	Implementation of the second expansion in explicit rules,
	static pattern rules and implicit rules.

	* read.c (eval): Refrain from chopping up rule's dependencies.
	Store them in a struct dep as a single dependency line. Remove
	the code that implements SySV-style automatic variables.

	* read.c (record_files): Adjust the code that handles static
	pattern rules to expand all percents instead of only the first
	one. Reverse the order in which dependencies are stored so that
	when the second expansion reverses them again they appear in
	the makefile order (with some exceptions, see comments in
	the code). Remove the code that implements SySV-style automatic

	* file.c (snap_deps): Implement the second expansion and chopping
	of dependency lines for explicit rules.

	* implicit.c (struct idep): Define an auxiliary data type to hold
	implicit rule's dependencies after stem substitution and

	* implicit.c (free_idep_chain): Implement.

	* implicit.c (get_next_word): Implement helper function for
	parsing implicit rule's dependency lines into words taking
	into account variable expansion requests. Used in the stem
	splitting code.

	* implicit.c (pattern_search): Implement the second expansion
	for implicit rules. Also fixes bug #12091.

	* commands.h (set_file_variables): Declare.
	* commands.c (set_file_variables): Remove static specifier.

	* dep.h (free_dep_chain): Declare.
	* misc.c (free_dep_chain): Implement.

	* variable.h (variable_expand_for_file): Declare.
	* expand.c (variable_expand_for_file): Remove static specifier.

	* make.h (strip_whitespace): Declare.
	* function.c (strip_whitespace): Remove static specifier.

2005-02-26  Paul D. Smith  <>

	* main.c (main): Check for ferror() when reading makefiles from stdin.
	Apparently some shells in Windows don't close pipes properly and
	require this check.

2005-02-24  Jonathan Grant  <>

	* Add MinGW configuration options, and extra w32 code
	* Add MinGW configuration options, and extra w32 code
	* main.c: Determine correct program string (after last \ without .exe).
	* subproc/sub_proc.c: `GetExitCodeProcess' from incompatible pointer
	type fix x2
	* w32/ Import to build win32 lib of sub_proc etc.
	* subproc/w32err.c: MSVC thread directive not applied to MinGW builds.
	* tests/, tests/ MSYS testing
	environment support.

2004-04-16  Dmitry V. Levin  <>

	* function.c (func_shell): When initializing error_prefix, check
	that reading file name is not null.  This fixes long-standing
	segfault in cases like "make 'a1=$(shell :)' 'a2:=$(a1)'".

2005-02-09  Paul D. Smith  <>

	* maintMakefile: Update the CVS download URL to simplify them.
	Also, the site was removed so I'm
	downloading the .texi files from Savannah now.

	Fixed these issues reported by Markus Mauhart <>:

	* main.c (handle_non_switch_argument): Only add variables to
	command_variables if they're not already there: duplicate settings
	waste space and can be confusing to read.

	* w32/include/sub_proc.h: Remove WINDOWS32.  It's not needed since
	this header is never included by non-WINDOWS32 code, and it
	requires <config.h> to define which isn't always included first.

	* dir.c (read_dirstream) [MINGW]: Use proper macro names when
	testing MINGW32 versions.

	* main.c (log_working_directory): flush stdout to be sure the WD
	change is printed before any stderr messages show up.

2005-02-01  Paul D. Smith  <>

	* maintMakefile (po_repo): Update the GNU translation site URL.

2004-12-01  Paul D. Smith  <>

	* main.c (main): Change char* env_shell to struct variable shell_var.
	* variable.c (target_environment): Use new shell_var.

2004-11-30  Paul D. Smith  <>

	* The old way we avoided creating from before exists doesn't work anymore; we
	have to use raw M4 (thanks to Andreas Schwab <> for
	the help!).  This also keeps automake from complaining.
	* (README): Add a dummy target so automake won't
	complain that this file doesn't exist when we checkout from CVS.
	* maintMakefile (.dep_segment): Rewrite this rule since newer
	versions of automake don't provide DEP_FILES.

2004-11-30  Boris Kolpackov  <>

	Implementation of `realpath' and `abspath' built-in functions.

	* Check for realpath.
	* function.c (abspath): Return an absolute file name that does
	not contain any `.' or `..' components, nor repeated `/'.
	* function.c (func_abspath): For each name call abspath.
	* function.c (func_realpath): For each name call realpath
	from libc or delegate to abspath if realpath is not available.
	* doc/make.texi (Functions for File Names): Document new functions.
	* doc/make.texi (Quick Reference): Ditto.

2004-11-28  Paul D. Smith  <>

	* main.c (main) [WINDOWS32]: Remove any trailing slashes from -C
	arguments.  Fixes bug #10252.

	Fix for bug #1276: Handle SHELL according to POSIX requirements.

	* main.c (main): Set SHELL to v_noexport by default.  Remember the
	original environment setting of SHELL in the env_shell variable.
	* main.h: Export new env_shell variable.
	* variable.c (target_environment): If we find a v_noexport
	variable for SHELL, add a SHELL variable with the env_shell value.
	* doc/make.texi (Quick Reference): Document the POSIX behavior.
	* doc/make.texi (Variables/Recursion): Ditto.

2004-11-28  Paul D. Smith  <>

	* main.c (find_and_set_default_shell) [WINDOWS32]: check for
	equality of "cmd"/"cmd.exe", not inequality.  Fixes bug #11155.
	Patch by Alessandro Vesely.

2004-11-12  Paul D. Smith  <>

	* job.c (child_execute_job) [VMS]: Don't treat "#" as a comment on
	the command line if it's inside a string.
	Patch by: Hartmut Becker <>

2004-10-21  Boris Kolpackov  <>

	* function.c (func_lastword): New function: return last word
	from the list of words.
	* doc/make.texi: Document $(lastword ). Fix broken links in
	Quick Reference section.

2004-10-06  Paul D. Smith  <>

	Apply patch from Alessandro Vesely, provided with bug # 9748.
	Fix use of tmpnam() to work with Borland C.

	* job.c (construct_command_argv_internal) [WINDOWS32]: Remove
	construction of a temporary filename, and call new function
	(create_batch_filename) [WINDOWS32]: New function to create a
	temporary filename.

2004-10-05  Boris Kolpackov  <>

	* read.c (record_target_var): Expand simple pattern-specific
	* variable.c (initialize_file_variables): Do not expand simple
	pattern-specific variable.

2004-09-28  Boris Kolpackov  <>

	* remake.c (update_file_1): When rebuilding makefiles inherit
	dontcare flag from a target that triggered update.

2004-09-27  Boris Kolpackov  <>

	* variable.c (initialize_file_variables): Mark pattern-specific
	variable as a per-target and copy export status.

2004-09-21  Boris Kolpackov  <>

	* file.c (snap_deps): Mark .PHONY prerequisites as targets.

	* implicit.c (pattern_search): When considering an implicit rule's
	prerequisite check that it is actually a target rather then
	just an entry in the file hashtable.

2004-09-21  Paul D. Smith  <>

	* read.c (readstring): Fix some logic errors in backslash handling.
	(eval): Remove some unnecessary processing in buffer handling.
	(record_target_var): Assert that parse_variable_definition() succeeded.
	Reported by: Markus Mauhart <>.

	* misc.c: Removed the sindex() function.  All instances of this
	function were trivially replaceable by the standard strstr()
	function, and that function will always have better (or certainly
	no worse) performance than the very simple-minded algorithm
	sindex() used.  This can matter with complex makefiles.
	* make.h: Remove the prototype for sindex().
	* function.c (subst_expand): Convert sindex() call to strstr().
	This means we no longer need to track the TLEN value so remove that.
	(func_findstring): Convert sindex() to strstr().
	* commands.c (chop_commands): Convert sindex() calls to strstr().
	Suggested by: Markus Mauhart <>.

	* main.c (find_and_set_default_shell) [WINDOWS32]: Implement the
	idea behind Savannah Patch #3144 from
	If SHELL is set to CMD.EXE then assume it's batch-mode and
	non-unixy.  I wrote the code differently from the patch, though,
	to make it safer.  This also resolves bug #9174.

2004-09-20  Paul D. Smith  <>

	* expand.c (variable_expand_string): Modify to invoke
	patsubst_expand() instead of subst_expand(); the latter didn't
	handle suffix patterns correctly.
	* function.c (subst_expand): Remove the SUFFIX_ONLY parameter; it
	was used only from variable_expand_string() and is no longer used
	(func_subst): Ditto, on call to subst_expand().
	(patsubst_expand): Require the percent pointers to point to the
	character after the %, not to the % itself.
	* read.c (record_files): New call criteria for patsubst_expand().
	* variable.h: Remove SUFFIX_ONLY from subst_expand() prototype.
	This is to fix a bug reported by Markus Mauhart <>.

2004-09-19  Paul D. Smith  <>

	* function.c (subst_expand): Fix a check in by_word: look for a
	previous blank if we're beyond the beginning of the string, not
	the beginning of the word.
	Bugs reported by Markus Mauhart <>.

2004-05-16  Paul D. Smith  <>

	* remake.c (update_goal_chain): Change the argument specifying
	whether we're rebuilding makefiles to be a global variable,
	(complain): Extract the code that complains about no rules to make
	a target into a separate function.
	(update_file_1): If we tried to rebuild a file during the makefile
	rebuild phase and it was dontcare, then no message was printed.
	If we then try to build the same file during the normal build,
	print a message this time.
	(remake_file): Don't complain about un-remake-able files when
	we're rebuilding makefiles.

2004-05-11  Paul D. Smith  <>

	* job.c (construct_command_argv_internal): OS/2 patches from
	Andreas Buening <>.

2004-05-10  Paul D. Smith  <>

	* remake.c (update_file): Don't walk the double-colon chain unless
	this is a double-colon rule.  Fix suggested by Boris Kolpackov

	* makefile.vms (CFLAGS): Remove glob/globfree (see readme.vms docs)
	* readme.vms: New section describing OpenVMS support and issues.
	* default.c (default_variables): Add support for IA64.
	* job.c (tryToSetupYAst) [VMS]: On VMS running make in batch mode
	without some privilege aborts make with the error
	%SYSTEM-F-NOPRIV. It happens when setting up a handler for
	pressing Ctrl+Y and the input device is no terminal. The change
	catches this error and just continues.

	Patches by Hartmut Becker <>

2004-04-25  Paul D. Smith  <>

	* commands.c (set_file_variables): Set $< properly in the face of
	order-only prerequisites.
	Patch from Boris Kolpackov <>

2004-04-21  Bob Byrnes  <>

	* main.c (main): Notice failures to remake makefiles.

2004-03-28  Paul D. Smith  <>

	Patches for Acorn RISC OS by Peter Naulls <>

	* job.c: No default shell for RISC OS.
	(load_too_high): Hard-code the return to 1.
	(construct_command_argv_internal): No sh_chars or sh_cmds.
	* getloadavg.c: Don't set LOAD_AVE_TYPE on RISC OS.

2004-03-20  Paul D. Smith  <>

	* variable.c (do_variable_definition): Don't append from the
	global set if a previous non-appending target-specific variable
	definition exists.  Reported by Oliver Schmidt <>
	(with fix).

	* expand.c (reference_variable): Don't give up on variables with
	no value that have the target-specific append flag set: they might
	have a value after all.  Reported by Oliver Schmidt
	<> (with fix) and also by Maksim A. Nikulin

	* rule.c (count_implicit_rule_limits): Don't delete patterns which
	refer to absolute pathnames in directories that don't exist: some
	portion of the makefile could create those directories before we
	match the pattern.  Fixes bugs #775 and #108.

	Fixes from Jonathan R. Grant  <>:

	* main.c (main): Free makefile_mtimes if we have any.
	* README.W32.template: Update documentation for the current status
	of the MS-Windows port.
	* NMakefile.template (MAKE): Add "MAKE = nmake".  A conflicting
	environment variable is sometimes already defined which causes the
	build to fail.
	* main.c (debug_signal_handler): Only define this function if
	SIGUSR1 is available.

	Fixes for OS/2 from Andreas Beuning <>:

	* [OS/2]: Relocate setting of HAVE_SA_RESTART for OS/2.
	* README.OS2.template: Documentation updates.
	* build.template: Add LIBINTL into LOADLIBES.  Add $CFLAGS to the
	link line for safety.
	* maintMakefile ( Remove an extraneous ")".
	* job.c (child_execute_job): Close saved FDs.
	* job.c (exec_command) [OS/2]: exec_command(): If the command
	can't be exec'ed and if the shell is not Unix-sh, then try again
	with argv = { "cmd", "/c", ... }. Normally, this code is never
	reached for the cmd shell unless the command really doesn't exist.
	(construct_command_argv_internal) [OS/2]: The code for cmd
	handling now uses new_argv = { "cmd", "/c", "original line", NULL}.
	The CMD builtin commands are case insensitive so use strcasecmp().

2004-03-19  Paul D. Smith  <>

	* read.c (do_define): Re-order line counter increment so the count
	is accurate (we were losing one line per define).  Reported by
	Dave Yost <>.

2004-03-06  Paul D. Smith  <>

	* (HAVE_ANSI_COMPILER): Define if we have an ANSI/ISO
	* make.h: Convert uses of __STDC__ to HAVE_ANSI_COMPILER.
	* misc.c (message,error,fatal): Ditto.
	* configh.dos.template: Define HAVE_ANSI_COMPILER.
	* config.h.W32.template: Ditto.
	* config.h-vms.template: Ditto.
	* config.ami.template: Ditto.

2004-03-04  Paul D. Smith  <>

	* README.template: Add a note about broken /bin/sh on SunOS
	4.1.3_U1 & 4.1.4.  Fix up Savannah links.

	* misc.c (message, error, fatal): Don't use "..." if we're using
	varargs.  ansi2knr should handle this but it doesn't work: it
	translates "..." to va_dcl etc. but _AFTER_ the preprocessor is
	done.  On many systems (SunOS for example) va_dcl is a #define.
	So, force the use of the non-"..." version on pre-ANSI compilers.

	* maintMakefile (sign-dist): Create some rules to help automate
	the new GNU ftp upload method.

2004-02-24  Paul D. Smith  <>

	* config.h.W32.template: Add HAVE_STDARG_H
	* config.h-vms.template: Ditto.
	* config.ami.template: Ditto.

2004-02-23  Jonathan Grant  <>

	* README.W32.template: Add a notation about -j with BATCH_MODE_ONLY.
	* build_w32.bat: Remove extra "+".

2004-02-23  Paul D. Smith  <>

	* make.h: Create an UNUSED macro to mark unused parameters.
	* (many): Clean up warnings by applying UNUSED, fixing
	signed/unsigned incompatibilities, etc.

	* acinclude.m4 (AC_STRUCT_ST_MTIM_NSEC): Add quoting to silence
	autoconf warnings.
	* filedef.h: Name the command_state enumeration.
	* file.c (set_command_state): Use the enumeration in the function

	* Explicitly set SET_MAKE to empty, to disable
	MAKE=make even when no make already exists.  Fix bug #3823.

2004-02-22  Paul D. Smith  <>

	* maintMakefile: Perl script to clean up all non-CVS files.  Use
	it on all the subdirectories for the cvs-clean target.

	* main.c (decode_switches): Require non-empty strings for all our
	string command-line options.  Fixes Debian bug # 164165.

	* Check for stdarg.h and varargs.h.
	* make.h (USE_VARIADIC): Set this if we can use variadic functions
	for printing messages.
	* misc.c: Check USE_VARIADIC instead of (obsolete) HAVE_STDVARARGS.
	(message): Ditto.
	(error): Ditto.
	(fatal): Ditto.

	A number of patches for OS/2 support from Andreas Buening

	* job.c (child_handler) [OS/2]: Allow this on OS/2 but we have to
	disable the SIGCHLD handler.
	(reap_children) [OS/2]: Remove special handling of job_rfd.
	(set_child_handler_action_flags) [OS/2]: Use this function in OS/2.
	(new_job) [OS/2]: Disable the SIGCHLD handler on OS/2.
	* main.c (main) [OS/2]: Special handling for paths in OS/2.
	* [OS/2]: Force SA_RESTART for OS/2.
	* (check-regression): Use $(EXEEXT) for Windows-type

2004-02-21  Paul D. Smith  <>

	* w32/subproc/sub_proc.c (process_easy) [W32]: Christoph Schulz
	<> reports that if process_begin() fails we don't
	handle the error condition correctly in all cases.
	* w32/subproc/w32err.c (map_windows32_error_to_string): Make sure
	to have a newline on the message.

	* job.c (construct_command_argv_internal): Add "test" to UNIX
	sh_cmds[].  Fixes Savannah bug # 7606.

2004-02-04  Paul D. Smith  <>

	* job.c (vms_handle_apos) [VMS]: Fix various string handling
	situations in VMS DCL.  Fixes Savannah bug #5533.  Fix provided by
	Hartmut Becker <>.

2004-01-21  Paul D. Smith  <>

	* job.c (load_too_high): Implement an algorithm to control the
	"thundering herd" problem when using -l to control job creation
	via the load average.  The system only recomputes the load once a
	second but we can start many jobs in a second.  To solve this we
	keep track of the number of jobs started in the last second and
	apply a weight to try to guess what a correct load would be.
	The algorithm was provided by Thomas Riedl <>.
	Also fixes bug #4693.
	(reap_children): Decrease the job count for this second.
	(start_job_command): Increase the job count for this second.

	* read.c (conditional_line): Expand the text after ifn?def before
	checking to see if it's a single word.  Fixes bug #7257.

2004-01-09  Paul D. Smith  <>

	* file.c (print_file): Recurse to print all targets in
	double-colon rules.  Fixes bug #4518, reported (with patch) by
	Andrew Chatham <>.

2004-01-07  Paul D. Smith  <>

	* acinclude.m4: Remove make_FUNC_SETVBUF_REVERSED.

	* doc/make.texi (Target-specific): Fix Savannah bug #1772.
	(MAKE Variable): Fix Savannah bug #4898.

	* job.c (construct_command_argv_internal): Add "!" to the list of
	shell escape chars.  POSIX sh allows it to appear before a
	command, to negate the exit code.  Fixes bug #6404.

	* implicit.c (pattern_search): When matching an implicit rule,
	remember which dependencies have the ignore_mtime flag set.
	Original fix provided in Savannah patch #2349, by Benoit
	Poulot-Cazajous <>.

2003-11-22  Paul D. Smith  <>

	* README.W32.template (Outputs): Clarification on -j with
	BATCH_MODE_ONLY_SEHLL suggested by Jonathan R. Grant

2003-11-02  Paul D. Smith  <>

	* function.c (func_if): Strip all the trailing whitespace from the
	condition, then don't expand it.  Fixed bug # 5798.

	* expand.c (recursively_expand_for_file): If we're expanding a
	variable with no file context, then use the variable's context.
	Fixes bug # 6195.

2003-10-21  Paul D. Smith  <>

	* main.c (log_working_directory): Add newlines to printf()s.

	* README.cvs: Add a note to ignore warnings during autoreconf.

	* maintMakefile (po_repo): Set a new URL for PO file updates.
	(get-config/config.guess get-config/config.sub): Get these files
	from the Savannah config project instead of

2003-10-05  Paul Eggert  <>

	* main.c (main): Avoid potential subscript error if environ has
	short strings.

2003-08-22  Paul D. Smith  <>

	* misc.c (xmalloc, xrealloc): Add one to 0 sizes, to cater to
	systems which don't yet implement the C89 standard :-/.

2003-07-18  Paul D. Smith  <>

	* dir.c (directory_contents_hash_1, directory_contents_hash_1)
	[WINDOWS32]: Initialize hash.

2003-06-19  Earnie Boyd  <>

	* dir.c (read_dirstream): Provide a workaround for broken versions of
	the MinGW dirent structure.

2003-05-30  Earnie Boyd  <>

	* w32/include/dirent.h: Add __MINGW32__ filter.

2003-05-30  Earnie Boyd  <>

	* make.h: Add global declaration of *make_host.
	* main.c (print_usage): Remove local declaration of *make_host.
	(print_version): Display "This program built for ..." after Copyright

2003-05-30  Earnie Boyd  <>

	* doc/make.texi: Change "ifinfo" to "ifnottex" as suggested by the
	execution of "makeinfo --html make.texi".

2003-04-30  Paul D. Smith  <>

	* build.template: Make some changes to maybe allow this script to
	work on DOS/Windows/OS2 systems.  Suggested by Andreas Buening.

	* README.OS2.template: New file for OS/2 support.  Original
	contributed by Andreas Buening.
	* Invoke new pds_AC_DOS_PATHS macro to test for
	DOS-style paths.

2003-04-19  Paul D. Smith  <>

	Fix bug #1405: allow a target to match multiple pattern-specific

	* rule.c (create_pattern_var, lookup_pattern_var): Move these to
	variable.c, where they've always belonged.
	* rule.h: Move the prototypes and struct pattern_var as well.
	* variable.c (initialize_file_variables): Invoke
	lookup_pattern_var() in a loop, until no more matches are found.
	If a match is found, create a new variable set for the target's
	pattern variables.  Then merge the contents of each matching
	pattern variable set into the target's pattern variable set.
	(lookup_pattern_var): Change this function to be usable
	in a loop.  It takes a starting position: if NULL, start at the
	beginning; if non-NULL, start with the pattern variable after that
	position, and return the next matching pattern.
	(create_pattern_var): Create a unique instance of
	pattern-specific variables for every definition in the makefile.
	Don't combine the same pattern together.  This allows us to
	process the variable handling properly even when the same pattern
	is used multiple times.
	(parse_variable_definition): New function: break out the parsing
	of a variable definition line from try_variable_definition.
	(try_variable_definition): Call parse_variable_definition to
	(print_variable_data_base): Print out pattern-specific variables.
	* variable.h (struct variable): Remember when a variable is
	conditional.  Also remember its flavor.
	(struct pattern_var): Instead of keeping a variable set, we just
	keep a single variable for each pattern.
	* read.c (record_target_var): Each pattern variable contains only a
	single variable, not a set, so create it properly.
	* doc/make.texi (Pattern-specific): Document the new behavior.

2003-04-17  Paul D. Smith  <>

	* dir.c (file_exists_p) [VMS]: Patch provided with Bug #3018 by
	Jean-Pierre Portier <>.  I don't understand the
	file/directory naming rules for VMS so I can't tell whether this
	is correct or not.

2003-04-09  Paul D. Smith  <>

	* (HAVE_DOS_PATHS): Define this on systems that need
	DOS-style pathnames: backslash separators and drive specifiers.

2003-03-28  Paul D. Smith  <>

	* file.c (snap_deps): If .SECONDARY with no targets is given, set
	the intermediate flag on all targets.  Fixes bug #2515.

2003-03-24  Paul D. Smith  <>

	*,, glob/, doc/
	Upgrade to autoconf 2.57 and automake 1.7.3.

	* job.c: More OS/2 changes from Andreas Buening.

	* file.c (print_file): Fix variable initialization.
	Fixes bug #2892.

	* remake.c (notice_finished_file):

	* make.h (ENULLLOOP): Set errno = 0 before invoking the command;
	some calls (like readdir()) return NULL in valid situations
	without resetting errno.  Fixes bug #2846.

2003-02-25  Paul D. Smith  <>

	Port to OS/2 (__EMX__) by Andreas Buening <>.

	* job.c (_is_unixy_shell) [OS/2]: New function.
	Set default shell to /bin/sh.
	(reap_children): Close the job_rfd pipe here since we don't use a
	SIGCHLD handler.
	(set_child_handler_action_flags): define this to empty on OS/2.
	(start_job_command): Close the jobserver pipe and use
	child_execute_job() instead of fork/exec.
	(child_execute_job): Rewrite to handle stdin/stdout FDs and spawn
	rather than exec'ing, then reconfigure stdin/stdout.
	(exec_command): Rewrite to use spawn instead of exec.  Return the
	PID of the child.

	* main.c (main) [OS/2]: Call initialize_main().  Handle argv[0] as
	in DOS.  Handle the TEMP environment variable as in DOS.  Don't
	use a SIGCHLD handler on OS/2.  Choose a shell as in DOS.  Don't
	use -j in DOS mode.  Use child_execute_job() instead of

	* function.c (func_shell) [OS/2]: Can't use fork/exec on OS/2: use
	spawn() instead.

	* job.h [OS/2]: Move CLOSE_ON_EXEC here from job.c.  Add
	prototypes that return values.

	* remake.c (f_mtime) [OS/2]: Handle FAT timestamp offsets for OS/2.

	* read.c (readline) [OS/2]: Don't handle CRLF specially on OS/2.
	* default.c (default_suffixes) [OS/2]:
Results 1 - 1 of 1
Help - FTP Sites List - Software Dir.
Search over 15 billion files
© 1997-2017