X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=ChangeLog;h=dce824b09cd6924dc91292844c7c1e263aeb359b;hb=refs%2Fheads%2Faccepted%2Ftizen_base_tool;hp=5fcf2732747ecdb8cca486ff3e7be723e9e6a674;hpb=e15597c3e85dedc015ff923a88febd46a1551f71;p=platform%2Fupstream%2Fmake.git diff --git a/ChangeLog b/ChangeLog index 5fcf273..dce824b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5633 +1,2684 @@ -2013-10-09 Paul Smith +2020-01-19 Paul Smith - Version 4.0 released. + GNU Make release 4.3 + * NEWS: Update for the release + * configure.ac: New release number + * doc/make.texi: New edition number - * configure.ac: Updated for the release. - * NEWS: Updated for the release. + * configure.ac (guile): Check for Guile 3.0 installations - * maintMakefile (tag-release): New target to add a Git tag. - * read.c (eval): Typo fix. - * ChangeLog.1: Typo fixes. - * w32/subproc/sub_proc.c (process_cleanup): Typo fix. + * src/job.c (sh_cmds): [SV 57625] Update builtin shell command list -2013-10-07 Eli Zaretskii + Resolve some documentation issues + * doc/make.texi (Interrupts): [SV 46193] Recommend defensive recipes + * doc/make.texi: [SV 49262] Clarify interaction of prerequisites and + non-terminal match-anything rules. - * w32/compat/posixfcn.c (tmpfile): Move declaration of h before - the first executable statement. Reported by Gisle Vanem - . +2020-01-19 Paul Smith -2013-10-05 Paul Smith + [SV 40657] Reinstate old behavior for suffix rules with prereqs + POSIX says that suffix rules cannot have prerequisites, but after + making this change we observed a number of makefiles "in the wild" + that were relying on this behavior and failed. - * makeint.h (MAP_USERFUNC): A new map type for function names. - * main.c (initialize_stopchar_map): Set up the function name map. + For .POSIX: makefiles, obey POSIX. Otherwise preserve the old + behavior. However, generate a warning so users know this is a + problem. In a future version we will change all behavior to be + POSIX-conforming. - * gnumake.h (gmk_func_ptr): Define a type for function pointers. - (gmk_add_function): Convert the last argument to FLAGS. - (GMK_FUNC_*): Define flags for the function. Change the default - behavior to "expand" since that's the most common one. + * NEWS: describe the change + * src/rule.c (convert_to_pattern): If posix_pedantic don't make a + pattern rule if prereqs exist. Otherwise show a warning. + * tests/scripts/features/suffixrules: Add tests for the new behavior + including .POSIX vs. non-.POSIX. - * function.c (function_table_entry): Use new function pointer type. - (lookup_function): Accept any valid function name character based - on the MAP_USERFUNC values. - (define_new_function): Use the new calling signature. Verify that - registered functions have valid names. +2020-01-05 Dmitry Goncharov - * guile.c (guile_gmake_setup): Use new calling signatures. - * loadapi.c (gmk_add_function): Ditto. - * variable.h (define_new_function): Ditto. + * tests/test_driver.pl: Enhance error messages - * doc/make.texi (Loaded Object API): Make the registered function - API documentation more clear. +2020-01-04 Paul Smith -2013-10-03 Eli Zaretskii + * doc/make.texi: Change the GFDL to an Appendix - * function.c (abspath): Reset root_len to one for Cygwin only when - HAVE_DOS_PATHS is defined. Suggested by Christopher Faylor. + * NEWS: Clarify authorship of new features. -2013-10-02 Eli Zaretskii + Enable compilation with C90 compilers + * configure.ac: Try compiling Guile headers: they don't work with C90. + * maintMakefile: Simplify config checks via target-specific variables. + * src/makeint.h: Use ATTRIBUTE rather than defining __attribute__, + as that causes compile issues with system headers. + (ENUM_BITFIELD): Don't use enum bitfields in ANSI mode. + * src/main.c: Use ATTRIBUTE instead of __attribute__. + * src/job.h: Ditto. + * src/file.c: Don't define variables inside for loops. + * src/rule.c: Ditto. + * src/dep.h (SI): Only use static inline in non-ANSI mode. - * w32/compat/posixfcn.c (tmpfile): New function, a replacement for - the Windows libc version. +2020-01-03 Paul Smith - Fix $abspath on Cygwin when HAVE_DOS_PATHS is in effect. - * function.c (IS_ABSOLUTE) [__CYGWIN__]: Special definition for - Cygwin. - (abspath) [__CYGWIN__]: Reset root_len to 1 if the absolute file - name has the Posix /foo/bar form. - [HAVE_DOS_PATHS]: Use root_len instead of hard-coded 2. + * bootstrap: Update to the latest gnulib version -2013-10-01 Paul Smith + Release GNU make 4.2.93 + * NEWS: Update the release and date + * configure.ac: Update the release number - * configure.ac: Update version to 3.99.93. - * NEWS: Ditto. + Update copyright statements for 2020 -2013-09-30 Paul Smith +2020-01-03 Paul Smith - * guile.c: Portability fixes for Guile 1.8. + Support the .EXTRA_PREREQS special variable + Initial implementation by Christof Warlich -2013-09-29 Paul Smith + * NEWS: Announce the new feature. + * doc/make.texi (Other Special Variables): Document .EXTRA_PREREQS. + * src/dep.h (struct dep): New flag to note extra prereq deps. + * src/filedef.h (expand_extra_prereqs): Declare a function to expand + the value of .EXTRA_PREREQS. + * src/file.c (expand_extra_prereqs): Given a struct variable lookup + of .EXTRA_PREREQS, convert it into a list of deps and for each one + make sure it has a struct file and has the new flag set. + (snap_file): A new function invoked by hash_map that will perform + per-file operations: set up second expansion, intermediate, and also + .EXTRA_PREREQS. Manage circular dependencies by ignoring them. + (snap_deps): Defer per-file operations until the end. Look up the + global .EXTRA_PREREQS and pass it along to snap_file for each file. + * src/implicit.c (struct patdeps): Remember the extra prereqs flag. + (pattern_search): Transfer extra prereqs flag settings into the + matched pattern rule. + * src/rule.h (snap_implicit_rules): Rename count_implicit_rules to + snap_implicit_rules since we now do more than count. + * src/rule.c (snap_implicit_rules): As we walk through all the pattern + rules, add in any global .EXTRA_PREREQS to the dep list. Ensure we + take them into account for the max number of prereqs and name length. + * src/main.c (main): Add extra-prereqs to .FEATURES. + Call the renamed snap_implicit_rules. + * tests/scripts/variables/EXTRA_PREREQS: Add tests. - * output.c (output_dump): Always write Enter/Leave messages to stdio. - (log_working_directory): This now always writes to stdio, so we - don't need the struct output parameter anymore. - (output_start): Show the working directory when output_sync is not - set or is recursive. - * main.c (main): Ensure the special "already shown Enter message" - token is removed from MAKE_RESTARTS before the user can see it. - * function.c (func_shell_base): If the output_context stderr - exists but is invalid, write to the real stderr. - Fixes suggested by Frank Heckenbach . +2020-01-03 Paul Smith - * output.c: Guard unistd.h inclusion, add io.h. - * gnumake.h: Move GMK_EXPORT before the declarations. - * make_msvc_net2003.vcproj: Add missing files. - Changes for MSVC suggested by Gerte Hoogewerf + * tests/scripts/features/patternrules: Use Windows-compatible quoting - * function.c (func_shell_base) [EMX]: Fix EMX support for output-sync. - * job.c (child_execute_job) [EMX]: Ditto. - * job.h (child_execute_job) [EMX]: Ditto. - * w32/compat/posixfcn.c: Invert the test for NO_OUTPUT_SYNC. + * tests/test_driver.pl: Compute full path to Perl interpreter - * guile.c (GSUBR_TYPE): Pre-2.0 Guile doesn't provide a typedef - for gsubr pointers. Create one. - (guile_define_module): Use it. - (internal_guile_eval): Force UTF-8 encoding for Guile strings. + * tests/scripts/features/exec: Don't use $ENV in the description - * main.c (main): Clear GNUMAKEFLAGS after parsing, to avoid - proliferation of options. - * NEWS: Document it. - * doc/make.texi (Options/Recursion): Ditto. + * src/makeint.h: Add a declaration for memrchr() -2013-09-23 Eli Zaretskii +2019-12-27 Paul Smith - * w32/compat/posixfcn.c: Fix the forgotten OUTPUT_SYNC conditional. + * NEWS: Remove info about disabled /proc/loadavg usage. - * job.h: Ditto, but in a comment. +2019-12-27 Paul Smith -2013-09-22 Paul Smith + [SV 57022] Avoid posix_spawn which fails asynchronously + Avoid using posix_spawn implementations that fail asynchronously when + the spawned program can't be invoked: this means instead of getting + an error such as "No such file or directory" we get just "Exit 127". - * configure.ac: Update version to 3.99.92. - * NEWS: Ditto. + Original implementation of the configure.ac macro provided by + Martin Dorey - * implicit.c (pattern_search): After second expansion be sure to - handle order-only markers inside the expansion properly. - Fixes Savannah bug #31155. + Original implementation of the regression tests provided by + Dmitry Goncharov - * guile.c (guile_define_module): Technically a void* cannot - contain a pointer-to-function and some compilers warn about this. - Cast the function pointers. - * load.c (load_object): Ditto. + * configure.ac: Test whether posix_spawn fails asynchronously. In a + cross-compilation environment, assume that it does not. If we detect + that it does, fall back to fork/exec. + * tests/scripts/features/exec: Add regression tests for different + shebang invocation methods. - * read.c (eval): If load_file() returns -1, don't add this to the - "to be rebuilt" list. - * doc/make.texi (load Directive): Document it. +2019-12-26 Paul Smith - * guile.c (guile_gmake_setup): Don't initialize Guile so early. - (func_guile): Lazily initialize Guile the first time the $(guile ..) - function is invoked. Guile can steal file descriptors which - confuses our jobserver FD checking, so we don't want to initialize - it before we have to. + [SV 56655] Allow pattern expansion to contain spaces + * src/dep.h: Add a new flag PARSEFS_ONEWORD + * src/read.c (parse_file_seq): If PARSEFS_ONEWORD is given, treat the + entire incoming string as a single pattern. + * src/implicit.c (pattern_search): Pass PARSEFS_ONEWORD when parsing + patterns for wildcards. + * tests/scripts/features/patternrules: Add a new test. - VMS port updates by Hartmut Becker +2019-12-18 Ben Wijen - * makefile.com: Add output to the filelist. - * output.c (va_copy): Add an implementation of this macro for VMS. - * commands.c: Ensure filedef.h is #included before dep.h. - * dir.c: Ditto. - * file.c: Ditto. - * guile.c: Ditto. - * main.c: Ditto. - * misc.c: Ditto. - * read.c: Ditto. - * rule.c: Ditto. - * variable.c: Ditto. - * readme.vms: Renamed to README.VMS and updates for this release. - * Makefile.am: Ditto. - * NEWS: Ditto. - * README.template: Ditto. - * Makefile.DOS.template: Ditto. - -2013-09-21 Paul Smith - - * maintMakefile (check-alt-config): Create a target to test - alternative configurations. Each one will build make with a - different configuration then run the test suite. - - Invert the output-sync #define to NO_OUTPUT_SYNC - - * configure.ac: Don't set OUTPUT_SYNC. - * makeint.h: Ditto. - * main.c: Use NO_OUTPUT_SYNC instead of OUTPUT_SYNC. - * output.c: Ditto. - * output.h: Ditto. - * job.h: Ditto. - * job.c: Ditto. - * config.ami.template: Set NO_OUTPUT_SYNC. - * config.h-vms.template: Ditto. - * config.h.W32.template: Ditto. - * configh.dos.template: Ditto. - - Output generated while reading makefiles should be synced. - - * main.c (make_sync): Define a context for syncing while reading - makefiles and other top-level operations. - (main): If we request syncing, enable it while we are parsing - options, reading makefiles, etc. to capture that output. Just - before we start to run rules, dump the output if any. - (die): Dump any output we've been syncing before we die - * output.h (OUTPUT_SET): Disable output_context if not syncout. - - Stderr generated from shell functions in recipes should be synced. - - * job.h (FD_STDIN, FD_STDOUT, FD_STDERR): Create new macros to - avoid magic numbers. - (child_execute_job): Take a FD for stderr. - * job.c (child_execute_job): Handle STDERR FD's in addition to - stdin and stdout. - (start_job_command): Call child_execute_job() with the new STDERR - parameter. Instead of performing the dup() here, send it to - child_execute_job() where it's already being done. - * function.c (func_shell_base): Pass the OUTPUT_CONTEXT stderr to - child_execute_job() if it's set, otherwise FD_STDERR. - * main.c (main): Pass FD_STDERR to child_execute_job(). - -2013-09-19 Paul Smith - - * main.c (main): Set MAKE_RESTARTS to negative before re-exec if - we've already generated an "Entering" message. If we are started - and notice that MAKE_RESTARTS is negative, assume we already wrote - "Entering" and don't write it again. - -2013-09-18 Paul Smith - - * main.c (main): Set starting_directory before we write any - errors. Fixes Savannah bug #40043. - -2013-09-16 Eli Zaretskii - - * output.c [WINDOWS32]: Include windows.h and sub_proc.h, to avoid - compiler warnings for CLOSE_ON_EXEC. - -2013-09-16 Paul Smith - - * configure.ac: Update version to 3.99.91. - * NEWS: Ditto. - -2013-09-15 Paul Smith - - * doc/make.texi (Error Messages): Add a bit more info to the - section on static pattern errors, since they're common. - Fixes Savannah bug #31326. - - * read.c (eval_makefile): If the file open fails with an - unrecoverable error, stop now rather than trying to make it. - Fixes Savannah bug #27374. - - * main.c (main): Perform the validation of the jobserver FDs - early, before we read makefiles, to ensure that something hasn't - opened and used those FDs for some other reason. - Fixes Savannah bug #39934. - - * main.c (main): Don't set MAKEFLAGS in the environment when we - restart. We have the original command line flags so keep the - original MAKEFLAGS settings as well. - Fixes Savannah bug #39203. - -2013-09-14 Paul Smith - - * main.c (decode_debug_flags): Add support for the "n" flag to - disable all debugging. - * make.1: Document the "n" (none) flag. - * doc/make.texi (Options Summary): Ditto. - * NEWS: Ditto. - Fixes Savannah bug #35248. - - * misc.c (close_stdout): Move to output.c. - * main.c (main): Move atexit call to output_init(). - * makeint.h: Remove close_stdout() declaration. - * output.c (output_init): Add close_stdout at exit only if it's open. - Fixes Savannah bug #33134. Suggested by David Boyce . - -2013-09-14 Paul Smith - - * misc.c (set_append_mode, open_tmpfd, open_tmpfile): Move to output.c. - * misc.h: Ditto. - * output.h: Ditto. - * main.c (main): Move stdio init into output.c:output_init(). - Change open_tmpfile() to output_tmpfile(). - * output.c: Rename open_*() to output_*(). set_append_mode() and - open_tmpfd() are static. - (_outputs, log_working_directory): Accept a struct output and - print to that rather than the global context. - (output_dump): In recurse mode print enter/leave once for the - whole makefile. - (output_init): Initialize this processes stdio as well as child's. - - * vmsjobs.c: Reformat to be closer to convention. - -2013-09-12 Paul Smith - - Rework output to handle synchronization and directory logging more - reliably. - - * output.c: New file. Implement lazy synchronization and - directory logging so that we manage them "just in time", and the - destination of the output is set via a global state variable. - * output.h: New file. - * function.c (func_shell_base): Ensure the output is set up before - running a shell command, in case it writes to stderr. - (func_error): Use outputs() to generate output. - * job.h (struct child): Add struct output to track the child's output. - * job.c: Use struct output in the child structure to track output. - (child_out, sync_init, assign_child_tempfiles, pump_from_tmp) - (acquire_semaphore, release_semaphore, sync_output): Move most of - the output_sync handling to output.c. - (child_error): Set output, then use simple message() and error() - not _s versions. - * main.c (log_working_directory): Moved to output.c - (trace_option, decode_trace_flags) Remove. Remove support for - different trace modes; we don't use it anymore. - (die) Invoke output_close() before we exit. - * misc.c (message_s, error_s): Removed; no longer needed. - (message, error, fatal, perror_with_name, pfatal_with_name): Moved - to output.c. - * makeint.h: Remove message_s(), error_s(), and - log_working_directory(). Remove the TRACE_* macros. - * doc/make.texi: Enhance documentation for output sync, and remove - MODE assignment for --trace. - * make.1: Remove MODE assignment for --trace. - * Makefile.am: Add new files. - * NMakefile.template: Ditto. - * SMakefile.template: Ditto. - * build_w32.bat: Ditto. - * dosbuild.bat: Ditto. - * make.lnk: Ditto. - * make_nsvc_net2003.vcproj: Ditto. - * makefile.vms: Ditto. - * po/POTFILES.in: Ditto. - -2013-08-22 Petr Machata - - * function.c (func_shell_base): Get rid of any avoidable limit on - stack size for processes spawned via $(shell). - -2013-07-22 Paul Smith - - * implicit.c (pattern_search): Use PARSE_SIMPLE_SEQ() even for - non-second expansion prerequisites, to handle globbing in patterns. - Fixes Savannah bug #39310. - - * dep.h (PARSE_SIMPLE_SEQ): Macro for simple file sequence parsing. - * default.c (set_default_suffixes): Use it. - * file.c (split_prereqs): Ditto. - * main.c (main): Ditto. - * read.c (eval): Ditto. - * rule.c (install_pattern_rule): Ditto. - * file.c (split_prereqs): Use PARSEFS_NONE instead of 0. - -2013-07-21 Paul Smith - - Cleanups detected by cppcheck. Fixes Savannah bug #39158. - * arscan.c (ar_scan): Reduce the scope of local variables. - * dir.c (vms_hash): Ditto. - (find_directory): Ditto. - (file_impossible_p): Ditto. - * expand.c (variable_expand_string): Ditto. - * function.c (func_sort): Ditto. - (func_and): Ditto. - * job.c (reap_children): Ditto. - (exec_command): Ditto. - * main.c (main): Ditto. - * misc.c (collapse_continuations): Ditto. - * read.c (eval): Ditto. - (parse_file_seq): Ditto. - * vpath.c (gpath_search): Ditto. - (selective_vpath_search): Ditto. - * job.c (is_bourne_compatible_shell): Simplify for non-Windows systems. - * remake.c (f_mtime): Remove duplicate test. - * signame.c (strsignal): Fix bogus conditional. - - * job.c (assign_child_tempfiles): Assign OUTFD to -1 for safety. - (start_job_command): Don't test output_sync and sync_cmd: redundant. - Changes suggested by Frank Heckenbach . - -2013-07-14 Paul Smith - - * filedef.h (update_status): Convert UPDATE_STATUS from a char to - an enumeration. Some systems declare "char" to be "unsigned" - which broke the code (which expected to be able to use -1 as a - flag). Using magic values was unpleasant, so rather than just - force "signed char" I reworked it to use an enum. - - * dep.h (update_goal_chain): Return an update_status value not int. - * remake.c (touch_file): Ditto. - (update_goal_chain): Track the update_status enum. - - * file.c (enter_file): Use new enumeration values with update_status. - (remove_intermediates): Ditto. - (print_file): Ditto. - * commands.c (execute_file_commands): Ditto. - * job.c (reap_children): Ditto. - (start_job_command): Ditto. - (start_waiting_job): Ditto. - * main.c (main): Ditto. - * remake.c (update_file): Ditto. - (complain): Ditto. - (update_file_1): Ditto. - (notice_finished_file): Ditto. - (remake_file): Ditto. - * vmsjobs.c (vmsHandleChildTerm): Ditto. - -2013-07-09 Paul Smith - - * implicit.c (pattern_search): Keep a local copy of the number of - deps in deplist: the global max might change due to recursion. - Fixes a bug reported by Martin d'Anjou . - -2013-06-28 Paul Smith - - * misc.c (set_append_mode): Set the O_APPEND flag on a file descriptor. - (open_tmpfd): Set append mode on the temporary file descriptor. - * main.c (main): Set append mode on stdout and stderr. - * makeint.h (set_append_mode): Declare it. - -2013-06-22 Eli Zaretskii - - * build_w32.bat (LinkGCC): Prevent a comment from being displayed - at build time. - - * job.c (construct_command_argv_internal) [WINDOWS32]: Use - case-insensitive comparison with internal commands of non-Unix - shells. - - * main.c (find_and_set_default_shell): Don't use file_exists_p or - dir_file_exists_p, as those call readdir, which can fail if PATH - includes directories with non-ASCII characters, and that would - cause Make to fail at startup with confusing diagnostics. See - https://sourceforge.net/mailarchive/message.php?msg_id=30846737 - for the details. - -2013-06-22 Paul Smith - - Improve performance by using a character map to determine where we - want to stop searching strings, rather than discrete comparisons. - - * read.c (find_char_unquote): Pass a stop map instead of various - flags and use that to check when to stop parsing the string. - (eval): Use the new find_char_unquote() calling signature. - (remove_comments): Ditto. - (unescape_char): Ditto. - (find_percent_cached): Ditto. - (parse_file_seq): Use a stop-map flag. - * main.c (stopchar_map): Character map definition. - (initialize_stopchar_map): Initialize the map definition. - (main): Invoke the map initialization function. - * misc.c (end_of_token_w32): Remove unused function. - * dir.c (dosify): Use STOP_SET to check for stop chars. - * main.c (main): Ditto. - * misc.c (end_of_token): Ditto. - * function.c (subst_expand): Ditto. - (func_notdir_suffix): Ditto. - (func_basename_dir): Ditto. - (abspath): Ditto. - * job.c (is_bourne_compatible_shell): Ditto. - * variable.c (parse_variable_definition): Ditto. - * read.c (eval): Ditto. - (conditional_line): Ditto. - (find_percent_cached): Ditto. - * dep.h (PARSE_FILE_SEQ): Update function declaration. - * default.c (set_default_suffixes): Update PARSE_FILE_SEQ() call. - * file.c (split_prereqs): Ditto. - * function.c (string_glob): Ditto. - * implicit.c (pattern_search): Ditto. - * rule.c (install_pattern_rule): Ditto. - * main.c (main): Ditto. - -2013-06-21 Paul Smith - - * main.c (verify_flag): Global variable to determine whether to - verify the database or not. - (decode_debug_flags): If debug mode, enable verify_flag. - (main): If MAKE_MAINTAINER_MODE, enable verify_flag, otherwise not. - (die): Only verify the database if verify_flag is set. - * file.c (enter_file): Don't check caching unless verify_flag. - * makeint.h: Export verify_flag. - -2013-05-27 Paul Smith - - * variable.c (define_automatic_variables): Create a new variable - MAKE_HOST. - -2013-05-27 Hartmut Becker - - * function.c (func_shell_base) [VMS]: Support VMS. - * makefile.com [VMS]: Ditto. - * makefile.vms [VMS]: Ditto. - * makeint.h [VMS]: Ditto. - * vmsjobs.c [VMS]: Ditto. - * job.h: Define RECORD_SYNC_MUTEX() when OUTPUT_SYNC is not set. - * load.c (unload_file): Fix signature if MAKE_LOAD is not set. - -2013-05-26 Paul Smith - - * remake.c (f_mtime): Ensure that archive file names are in the - string cache. Fixes Savannah bug #38442. - - * read.c (readline): To be safe, move the entire buffer if we - detect a CR. Fixes Savannah bug #38945. - - * job.c (new_job): Compare OUT to the beginning of the OUT - var/function, not IN. Fixes Savannah bug #39035. - -2013-05-22 Paul Smith - - * main.c (switches[]): Order switches so simple flags all come first. - (define_makeflags): Rework to make option passing more - reliable and the code less tricksy. Ensure simple flags are kept - in the initial batch of flags. Do not allow any flags with - options in that batch. If there are only non-simple flags MAKEFLAGS - begins with ' '. - (print_data_base): Print the version. Fixes part of Savannah #35336. - - * read.c (eval_buffer): Initialize lineno. - -2013-05-18 Alexey Pavlov (tiny change) - - * w32/Makefile.am (libw32_a_SOURCES): Add compat/posixfcn.c. - - * configure.ac (OUTPUT_SYNC): Define for mingw32 target. - - * job.c (construct_command_argv_internal) - [WINDOWS32]: Add "move". Fixes Savannah bug #30714. - - * guile.c: Move inclusion of makeint.h before gnumake.h. This - order must be observed when building Make, because gnumake.h must - be included with GMK_BUILDING_MAKE defined, which makeint.h - already does. Otherwise, the linker will look for, and fail to - find, gmk_* functions in some external dynamic library. - -2013-05-17 Benno Schulenberg - - * main.c (decode_output_sync_flags): Fix output message. - * read.c (EXTRANEOUS): Ditto. - (record_files): Ditto. - * remake.c (update_file_1): Ditto. - -2013-05-17 Eli Zaretskii - - * main.c (prepare_mutex_handle_string): Define conditioned on - OUTPUT_SYNC. - - * build_w32.bat: Copy config.h.W32 to config.h regardless of - whether or not we are building from SCM. - -2013-05-17 Paul Smith - - * configure.ac: Update version to 3.99.90. - * NEWS: Ditto. - - * Source (*.[ch]): Remove TABs, use GNU coding styles. - - * ALL: Update copyright. - - * hash.c (CALLOC): Use xcalloc() to handle out of memory errors. - - * makeint.h: Prototype new unload_file() function. - * load.c (unload_file): Create a function to unload a file. - (struct load_list): Type to remember loaded objects. - (loaded_syms): Global variable of remembered loaded objects so we - can unload them later. We don't have to remove from the list - because the only time we unload is if we're about to re-exec. - (load_object): Remove unneeded extra DLP argument. - (load_file): Remove unneeded extra DLP argument. - * filedef.h (struct file): Remove the DLP pointer and add the - LOADED bit flag. Saves 32/64 bytes per file, as this pointer is - almost never needed. - * read.c (eval): Set the new LOADED bit flag on the file. - * file.c (rehash_file): Merge the loaded bitfield. - * commands.c (execute_file_commands): Call unload_file() instead - of dlclose() directly. - -2013-05-14 Paul Smith - - * doc/make.texi (Loaded Object API): Document the requirement for - the plugin_is_GPL_compatible symbol. - * load.c (load_object): Check for plugin_is_GPL_compatible symbol. - -2013-05-13 Paul Smith - - * filedef.h (struct file): Add a builtin flag. - * file.c (enter_file): Unset the builtin flag. - (rehash_file): Ditto. - (print_file): Don't print builtin files if we've omitted them. - * default.c (undefine_default_variables): New function: go through - the default variables and undefine them. - (set_default_suffixes): Mark these suffix rules as builtin. - * makeint.h: Prototype. - * main.c (main): Handle addition of -r and -R to MAKEFLAGS in the - makefile. Fixes Savannah bug #20501. - - * main.c (define_makeflags): Assign o_env_override level to - MAKEFLAGS to ensure it's set even in the presence of -e. - Fixes Savannah bug #2216. - - * makeint.h (TRACE_NONE, TRACE_RULE, TRACE_DIRECTORY): Define - constants for the trace mode. - * main.c: Add new --trace mode parsing. - (decode_trace_flags): New function. - (decode_switches): Call it. - (define_makeflags): Fix a bug with long-name options. - * misc.c (fatal): Remove special output-sync handling. - * make.1: Document new --trace mode flags. - * doc/make.texi (Options Summary): Ditto. - -2013-05-11 Eli Zaretskii - - * job.c (child_out): Output the newline following the message - before fllush-ing the stream. Avoids displaying the following - failure message, which goes to stderr, on the same line. - -2013-05-06 Eli Zaretskii - - * gnumake.h (GMK_EXPORT) [_WIN32]: Move the dllexport declaration - here from makeint.h. - - * makeint.h (GMK_BUILDING_MAKE) [WINDOWS32]: Define before - including gnumake.h. - - * doc/make.texi (Loaded Object Example): Add a note about building - shared objects on MS-Windows. - -2013-05-05 Paul Smith - - * makeint.h (OUTPUT_SYNC_LINE, OUTPUT_SYNC_RECURSE): Rename - output-sync options "job" to "line" and "make" to "recurse". - * main.c (decode_output_sync_flags): Ditto. - * job.c (reap_children): Ditto. - (start_job_command): Ditto. - * make.1: Ditto. - * doc/make.texi (Parallel Output): Ditto. - - * job.c (child_out): Write newlines explicitly, and don't do - anything if the message is empty. - (sync_output): Put working dir messages around stdout AND stderr. - (start_job_command): Move the tmp file assignment earlier. After - we do it, write the command line to the temp file to get the order - correct. - - * misc.c (message): Remove special handling for output_sync. - (error): Ditto. - -2013-05-04 Paul Smith - - * loadapi.c (gmk_alloc): New function. - * gnumake.h: Add gmk_alloc(). Clean GMK_EXPORT a bit to avoid MAIN. - * makeint.h (GMK_EXPORT): New handling, vs. MAIN. - * doc/make.texi (Loaded Object API): Add information on the memory - handling functions. - (Loaded Object Example): Create an example. - - * job.c (pump_from_tmp): (Rename) Write to stdout/stderr using - FILE* rather than fd. It's not a good idea to mix and match. - -2013-05-04 Eli Zaretskii - - * makeint.h (ftruncate) [_MSC_VER]: Redirect to _chsize. - (_S_ISDIR): If not defined (MinGW64), define to S_ISDIR. - -2013-05-04 Paul Smith - - * job.c (child_out): Handle EINTR and incomplete write scenarios. - (sync_init): New function: separate the initialization code. - (assign_child_tempfiles): Remove truncation from this function, - (sync_output): and add it here after output is generated. - (reap_children): Always call sync_output() in case output_sync was - reset after the child started, due to error. - (start_job_command): Create new sync_cmd variable. Use new method - for initializing the handle. - If we're not syncing the output be sure any output we've saved is - dumped immediately before starting the child. - -2013-05-04 Eli Zaretskii - - * job.c (start_job_command): Make the condition for creating a - temporary output file be identical to the Posix code branch. - Suggested by Frank Heckenbach . - -2013-05-03 Eli Zaretskii - - * w32/subproc/sub_proc.c: Include makeint.h. Remove a private - incompatible prototype of xmalloc. - (batch_file_with_spaces): New function, detects Windows batch - files whose names include whitespace characters. - (process_begin): If exec_name is a batch file with whitespace - characters in its name, pass NULL as the first argument to - CreateProcess. This avoids weird failures due to buggy quoting by - CreateProcess. For the details, see the discussion starting at - http://lists.gnu.org/archive/html/make-w32/2013-04/msg00008.html. - - * load.c (load_object, load_file): Accept an additional argument - DLP and return in it a pointer that can be used to unload the - dynamic object. - - * read.c (eval): Call load_file with an additional argument, and - record the pointer returned there in the 'struct file' object of - dynamic objects in that object's 'struct file'. - - * commands.c (execute_file_commands): Unload dynamic objects - before remaking them, to avoid failure to remake if the OS doesn't - allow overwriting objects that are in use. - - * filedef.h (struct file): New member dlopen_ptr. - - * gnumake.h (GMK_EXPORT): Define to dllexport/dllimport - decorations for Windows and to nothing on other platforms. - (gmk_eval, gmk_expand, gmk_add_function): Add GMK_EXPORT qualifier - to prototypes. - - * makeint.h (MAIN): Define before including gnumake.h, to give - correct dllexport decorations to exported functions. - (load_file): Adjust prototype. - - * loadapi.c: Don't include gnumake.h, since makeint.h already - includes it, and takes care of defining MAIN before doing so. - - * build_w32.bat (LinkGCC): Produce an import library for functions - exported by Make for loadable dynamic objects. - - * w32/compat/posixfcn.c (dlclose): New function. - - * w32/include/dlfcn.h (dlclose): Add prototype. + * src/misc.c (spin): On WINDOWS32 use Sleep() instead of sleep() -2013-05-01 Eli Zaretskii + * bootstrap.bat: Fix typo in batch file name - * job.c (start_job_command) [WINDOWS32]: Make the same fix for - MS-Windows as the previous commit did for Posix platforms. - (construct_command_argv_internal): Don't treat a backslash as an - escape character before whitespace, if the shell is not a Posix - shell. For the description of the problem, see - http://lists.gnu.org/archive/html/make-w32/2013-04/msg00014.html. +2019-12-18 Paul Smith -2013-05-01 Paul Smith + * src/config.h.W32.template: [SV 57152] MinGW32 doesn't support d_type - * job.c (start_job_command): Don't redirect output for recursive - make jobs, unless we're in makefile synchronization mode. +2019-12-18 Jouke Witteveen -2013-04-30 Stefano Lattarini (tiny change) + [SV 54161] Fix second expansion of $* for paths + If the stem matches a path containing a directory not just a + filename, make sure the second expansion of $* in the + prerequisites matches $* in the recipe. This requires using + $(*F) when replacing % in the first expansion to preserve the + simple filename. - build: enable the 'silent-rules' automake options + * src/implicit.c (pattern_search): If lastslash is set prepend + the directory onto the stem. Then use $(*F) when expanding %. + * tests/scripts/features/se_implicit: Add a test case - * configure.ac (AM_INIT_AUTOMAKE): Here. The future major Automake - version 2.0 (ETA about one, one and half year from now) will enable - it by default, so better prepare ourselves. +2019-12-17 Jouke Witteveen -2013-04-30 Stefano Lattarini (tiny change) + * src/implicit.c (pattern_search): Set lastslash correctly + If filename contained multiple slashes lastslash is wrongly set to 0. + * configure.ac: Check for the GNU memrchr() extension function. + * src/misc.c (memrchr): Supply memrchr() if not available. - build: require Autoconf >= 2.62 and Automake >= 1.11.1 + * src/implicit.c (pattern-search): Remove unneeded 'dir' variable - Older versions of those tools should be considered fully obsolete. - Also, GNU make already requires Gettext >= 0.18.1, which has been - released six months after Automake 1.11.1 and two years after - Autoconf 2.62; so the new requirement shouldn't be problematic - for people already bootstrapping GNU make from the Git repository. +2019-12-17 Paul Smith - * configure.ac (AC_PREREQ): Require Autoconf 2.62 or later. - (AM_INIT_AUTOMAKE): Require Automake 1.11.1 or later (1.11 had - some serious bugs, and should not be used). + * Makefile.am: Build lzip package instead of bzip2 + * README.git: Mention changed requirements. -2013-04-30 Stefano Lattarini (tiny change) + * src/job.c (load_too_high): Disable Linux /proc/loadavg for now + This new feature has a problem: if you provide a load which is + larger than the number of cores then it will always run every job. + Before we can enable it we need to at the least learn how to clamp + this value to the number of cores. To experiment with it, set + PROC_FD_INIT to -2 in job.c to re-enable the feature. - build: get rid of 'HAVE_ANSI_COMPILER' C preprocessor conditional + * tests/run_make_tests.pl (set_more_defaults): Fix typo - GNU make already assume C89 or later throughout the codebase, and - that preprocessor conditional was no longer used anyway. +2019-12-16 Paul Smith - * configure.ac: Remove AC_DEFINE of HAVE_ANSI_COMPILER. - * config.ami.template: Remove #define of HAVE_ANSI_COMPILER. - * config.h-vms.template: Likewise. - * config.h.W32.template: Likewise. - * configh.dos.template: Likewise. + * tests/run_make_tests.pl (subst_make_string): Force use of / + On Windows the path to the helper tool will contain '\': this will + fail if recipes are run with a POSIX shell. Convert '\' to '/' + on Windows. While here, escape any spaces in the path as well. -2013-04-30 Stefano Lattarini (tiny change) + Rename jhelp.pl to thelp.pl and make it a generic test helper. + * tests/thelp.pl: Rename from tests/jhelp.pl. + (op): Use names instead of options for the operations. + (op): Add new operations for sleep, mkdir, and rm. + (op): Enhance wait to time out + * tests/run_make_tests.pl: Add a new #HELPER# replacement + (subst_make_string): Use fully-qualified path to thelp.pl + * tests/scripts/features/parallelism: Update to use thelp.pl + and the new named operations. Use thelp.pl sleep instead of + system-specific sleep commands. + * tests/scripts/features/output-sync: Update to use thelp.pl + instead of complex shell scripts. + * Makefile.am: Distribute tests/thelp.pl instead of tests/jhelp.pl - cosmetics: fix few innocuous typos +2019-10-10 Paul Eggert - Most of these were found using Lucas De Marchi's 'codespell' tool. + Port functions/shell test to Solaris 10 + * tests/scripts/functions/shell: Port exit-status calculation + to Solaris 10 with Perl 5.8.4. - * ChangeLog: Fix minor typos. - * ChangeLog.2: Likewise. - * README.Amiga: Likewise. - * TODO.private: Likewise. - * function.c: Likewise. - * glob/glob.h: Likewise. - * job.c: Likewise. - * main.c: Likewise. - * readme.vms: Likewise. - * remake.c: Likewise. - * tests/ChangeLog: Likewise. - * tests/NEWS: Likewise. - * tests/README: Likewise. - * tests/scripts/variables/private: Likewise. - * vmsdir.h: Likewise. - * signame.c: Likewise. While at it, improve line wrapping in the - touched comment. - -2013-04-29 Eli Zaretskii - - * w32/include/dlfcn.h: New file. - - * w32/compat/posixfcn.c: Include dlfcn.h. - (dlopen, dlerror, dlsym) [MAKE_LOAD]: New functions, in support of - dynamic loading. - - * config.h.W32.template (MAKE_LOAD): Define. - - * load.c (load_object) [HAVE_DOS_PATHS]: Support backslashes and - drive letters in file names of dynamic objects. - - * job.c (construct_command_argv_internal) [WINDOWS32]: Return - right after generating new_argv for one_shell case. This fixes - the Windows build for both Unixy shell and stock Windows shells. - -2013-04-28 Eli Zaretskii - - * dir.c (local_stat) [WINDOWS32]: Use the wrapper on MS-Windows. - If the argument ends in "dir/.", make sure the parent dir exists - and is indeed a directory. Fixes Savannah bug #37065. - -2013-04-28 Paul Smith - - * makeint.h (message_s, error_s): Functions that print to strings - rather than directly to files. - * misc.c (message_s, error_s): Create them. - * job.c (child_error): Print error messages to the output sync - logs, if one exists, rather then directly to the terminal. - (reap_children): Move the per-line sync after child_error(). - - * configure.ac: Remove support for pre-ANSI variadic function calls. - * makeint.h: Ditto. - * misc.c: Ditto. - * config.ami.template: Ditto. - * config.h-vms.template: Ditto. - * config.h.W32.template: Ditto. - * configh.dos.template: Ditto. - - Implement a "per-job" output synchronization option. - - * main.c (decode_output_sync_flags): Recognize the new option. - * makeint.h (OUTPUT_SYNC_JOB): Add new values for "job" - * job.c (assign_child_tempfiles): In per-job mode, truncate the - temp file for re-use by the next job. - (sync_output): Don't close the temp files as we may still use them. - (free_child): Close the temp files here as we definitely don't - need them. - (new_job): In per-job output mode, sync_output() after each job. - * job.h (struct child): Avoid ifdefs. - * make.1: Add new options to the man page. - * doc/make.texi (Parallel Output): Break documentation on input - and output into separate sections for readability. Document the - new "job" and "none" modes. - -2013-04-27 Paul Smith - - * job.c (construct_command_argv_internal): Fix oneshell support - for non-POSIX-sh shells. - - * load.c (load_object): Extract all POSIX-isms into a separate - function for portability. - (load_file): Check the .LOADED variable first and don't invoke - load_object() if it's already been loaded. - -2013-04-27 Eli Zaretskii - - * read.c (record_files): Pay attention to .ONESHELL in MS-Windows. - - * job.c (construct_command_argv_internal): Support .ONESHELL on - MS-Windows, when the shell is not a Unixy shell. - -2013-04-27 Eli Zaretskii - - * job.c: Fix compilation error on GNU/Linux due to "label at end - of compound statement". - -2013-04-27 Frank Heckenbach (tiny change) - - * job.c (sync_output): Don't discard the output if - acquire_semaphore fails; instead, dump the output unsynchronized. - -2013-04-27 Eli Zaretskii - - Support --output-sync on MS-Windows. - * w32/compat/posixfcn.c: New file, with emulations of Posix - functions and Posix functionality for MS-Windows. - - * w32/subproc/sub_proc.c: Include io.h. - (process_noinherit): New function, forces a file descriptor to not - be inherited by child processes. - (process_easy): Accept two additional arguments, and use them to - set up the standard output and standard error handles of the child - process. - - * w32/include/sub_proc.h (process_easy): Adjust prototype. - (process_noinherit): Add prototype. - - * read.c [WINDOWS32]: Include windows.h and sub_proc.h. - - * makeint.h (LOCALEDIR) [WINDOWS32}: Define to NULL if not - defined. This is needed because the MS-Windows build doesn't have - a canonical place for LOCALEDIR. - (WIN32_LEAN_AND_MEAN) [WINDOWS32]: Define, to avoid getting from - windows.h header too much stuff that could conflict with the code. - - * main.c : New static variable. - : Add support for "--sync-mutex" switch. - (decode_output_sync_flags): Decode the --sync-mutex= switch. - (prepare_mutex_handle_string) [WINDOWS32]: New function. - (main): Add "output-sync" to .FEATURES. - - * job.h (CLOSE_ON_EXEC) [WINDOWS32]: Define to call - process_noinherit. - (F_GETFD, F_SETLKW, F_WRLCK, F_UNLCK, struct flock) [WINDOWS32]: - New macros. - (RECORD_SYNC_MUTEX): New macro, a no-op for Posix platforms. - (sync_handle_t): New typedef. - - * job.c : Change type to sync_handle_t. - (FD_NOT_EMPTY): Seek to the file's end. Suggested by Frank - Heckenbach . - (pump_from_tmp_fd) [WINDOWS32]: Switch to_fd to binary mode for - the duration of this function, and then change back before - returning. - (start_job_command) [WINDOWS32]: Support output_sync mode on - MS-Windows. Use a system-wide mutex instead of locking - stdout/stderr. Call process_easy with two additional arguments: - child->outfd and child->errfd. - (exec_command) [WINDOWS32]: Pass two additional arguments, both - -1, to process_easy, to adjust for the changed function signature. - - * function.c (windows32_openpipe) [WINDOWS32]: This function now - returns an int, which is -1 if it fails and zero otherwise. It - also calls 'error' instead of 'fatal', to avoid exiting - prematurely. - (func_shell_base) [WINDOWS32]: Call perror_with_name if - windows32_openpipe fails, now that it always returns. This avoids - a compiler warning that error_prefix is not used in the MS-Windows - build. - - * config.h.W32.template (OUTPUT_SYNC): Define. - - * build_w32.bat: Add w32/compat/posixfcn.c to compilation and - linking commands. - -2013-04-20 Stefano Lattarini (tiny change) - - * README.git: Our autoconf input file is 'configure.ac', not - 'configure.in'. Adjust accordingly. - * build_w32.bat: Likewise. - * config.h-vms.template: Likewise. - * Makefile.DOS.template: Likewise. - -2013-04-16 Paul Smith - - * misc.c (open_tmpfd): Add a new function that returns a temporary - file by file descriptor. - (open_tmpfile): Move here from main.c. - * job.c (assign_child_tempfiles): Use the new open_tmpfd(). - -2013-04-15 Paul Smith - - * makeint.h (OUTPUT_SYNC_TARGET, OUTPUT_SYNC_MAKE): Rename. - * job.c (start_job_command): Use new constants. - * main.c: New -O argument format. - - * doc/make.texi (Options Summary): Document the argument to -O. - * make.1: Ditto. - - * main.c (define_makeflags): Don't add space between a single-char - option and its argument. - -2013-04-06 Paul Smith - - * doc/make.texi (Implicit Variables): Clarify LDFLAGS vs. LDLIBS. - Fixes Savannah bug #37970. - - * remake.c (check_dep): Reconsider files waiting on prerequisites, - as they may have finished. Fixes Savannah bug #37703. - -2013-02-28 Paul Smith - - * function.c (func_realpath): On Solaris (at least) realpath() can - fail due to EINTR, so loop it. Fixes Savannah bug #38420. - -2013-02-25 Paul Smith - - Add a proposed supported API for GNU make loaded objects. - - * doc/make.texi (Loaded Object API): Document it. - * Makefile.am (make_SOURCES): Add new loadapi.c. - * dep.h: Remove eval_buffer(); moved to loadapi.c:gmk_eval(). - * read.c (eval_buffer): Change eval_buffer() signature. - * main.c (main): Change eval_buffer() signature. - * variable.h (define_new_function): Change func_ptr signature. - * load.c (SYMBOL_EXTENSION): Change the extension. - * loadapi.c: Implement the new API. - * gnumake.h (gmk_eval): New function prototype. - (gmk_expand) Ditto. - (gmk_add_function) Ditto. - * gmk-default.scm (gmk-eval): Remove: now implemented in guile.c. - * guile.c (guile_expand_wrapper): Use gmk_expand() - (guile_eval_wrapper): Implement eval here to avoid double-expansion. - (guile_define_module): Define gmk-eval. - (func_guile): Use new func_ptr calling model. - (guile_gmake_setup): Use gmk_add_function() to declare $(guile ...) - * function.c (function_table_entry): Provide alternative func_ptr. - (func_eval): New signature for eval_buffer(); - (function_table_init): New initialization for function_table_entry. - (expand_builtin_function): Support alternative invocation signature. - (define_new_function): Ditto. - -2013-01-20 Paul Smith - - * gnumake.h: New file to contain externally-visible content. - * makeint.h: Include gnumake.h. Move gmk_floc type to gnumake.h. - * Makefile.am (include_HEADERS): Install the gnumake.h header. - - * makeint.h: Change struct floc to gmk_floc typedef. - * Many: Use the new typedef. - - * make.h: Rename to makeint.h. - * Many: Use the new name makeint.h. - -2013-01-19 Paul Smith - - * doc/make.texi (load Directive): Update to discuss location of - loaded object file. - (Remaking Loaded Objects): Document remaking of loaded objects. - - * main.c (main): Rename READ_MAKEFILES to READ_FILES. - * read.c: Change READ_MAKEFILES to READ_FILES since it now - contains loaded object files as well. - (read_all_makefiles): Ditto. - (eval_makefile): Ditto. - (eval): Add any loaded file to the READ_FILES list, so that it - will be considered for re-build. - - * load.c (load_file): Return the simple filename (no symbol) in - the LDNAME argument (now a const char **). - This filename should no longer have "./" prepended: modify the - function to always check the current directory if the name has no - "/", before using the normal methods. - * make.h: Change the load_file() prototype. - - * README.git: Add a bit more documentation on Git workflow & rules. - -2013-01-13 Paul Smith - - * main.c (main): Restore all make flags after re-exec is complete. - Fixes Savannah bug #38051. - -2013-01-12 Paul Smith - - Convert CVS archive to Git. - - * configure.in: Rename to configure.ac. - * README.cvs: Rename to README.git and rework for Git. - * maintMakefile: Use git clean for cleanup. - * ChangeLog: Use new Git repository URL. - * ChangeLog.2: Ditto. - * Makefile.am: Change documentation for Git - * Makefile.DOS.template: Ditto. - * README.template: Ditto. - * build_w32.bat: Ditto. - * prepare_w32.bat: Ditto. - * .cvsignore: Rename to .gitignore, and change to Git format. - -2012-12-08 Eli Zaretskii - - * job.c (create_batch_file): Fix last change: always increment the - counter of batch files before trying to use it. - -2012-12-07 Eli Zaretskii - - * job.c (construct_command_argv_internal): Remove " from - sh_chars_dos[]. Ignore an escaped backslash inside a string - quoted with "..". This lifts the 4KB or 8KB command-line length - limitation imposed by the Windows shells when a command uses quoted - strings, because we now don't call the shell in that case. - - * job.c (create_batch_file): Declare the counter of batch files - static, to avoid having 2 jobs using the same file name and - stepping on each other's toes. When all 64K names are used up, - make one more loop looking for slots that became vacant. This - avoids leaving behind temporary batch files in the temporary - directory, which happens frequently on a fast machine when using - parallel builds. - (reap_children): Add debug message for when removal of a temporary - batch file fails. +2019-10-08 Paul Smith -2012-10-29 Paul Smith + Release GNU make 4.2.92 + * NEWS: Update the release and date + * configure.ac: Update the release number - New feature: "load" directive for dynamically-loaded objects. +2019-10-06 Paul Smith - * NEWS: Document new "load" directive. - * doc/make.texi (Extending make): New chapter on extensions to make. - * configure.in: Check for dlopen/dlsym/dlerror and -ldl. - * Makefile.am (make_SOURCES): Add new file load.c. - * make.h: Prototype for load_file(). - * main.c (main): Add "load" to .FEATURES if it's available. - * read.c (eval): Parse "load" and "-load" directives. + * doc/make.text (Reading Makefiles): Rewrite to be more clear. -2012-09-29 Paul Smith +2019-10-05 Paul Smith - * configure.in: Require a new version of gettext (1.18.1). - Fixes Savannah bug #37307. + * Makefile.am (check-regression): Use PERLFLAGS when running Perl + * maintMakefile: Set PERLFLAGS to enable warnings. + * tests/run_make_tests.pl: Clean up issues pointed out by perl -w. -2012-09-09 Paul Smith + * tests/scripts/functions/wildcard: Skip slash tests for local glob. - * configure.in (bsd_signal): Define _GNU_SOURCE, a la make.h. - Fixes Savannah bug #32247. + tests: Convert %CONFIG_FLAGS to get_config() + * tests/config-flags.pm.W32: Create a predefined Windows file. + * Makefile.am (test_FILES): Add it to the distribution. + * build_w32.bat: Install tests/config-flags.pm if not existing. + * tests/run_make_tests.pl (get_config): Create new function. + * tests/scripts/features/archives: Call get_config() rather than + using %CONFIG_FLAGS directly. + * tests/scripts/features/load: Ditto. + * tests/scripts/features/loadapi: Ditto. + * tests/scripts/functions/wildcard: Ditto. - * remake.c (update_file_1): Force intermediate files to be - considered, not pruned, if their non-intermediate parent needs to - be remade. Fixes Savannah bug #30653. + * src/hash.c (jhash_string): Don't read past end of string. + Original patch from Dmitry Goncharov . - * job.c (construct_command_argv_internal): Keep the command line - on the heap for very long lines. Fixes Savannah bug #36451. + * tests/run_make_tests.pl (valid_option): Add missing File::Spec - * function.c (func_realpath): BSD realpath(3) doesn't fail if the - file does not exist: use stat. Fixes Savannah bug #35919. +2019-09-23 Paul Smith - * file.c (expand_deps): Duplicate the current variable buffer, not - the old pointer. Fixes Savannah bug #36925. + * src/function.c (func_realpath) [AIX]: Remove trailing slashes. - * read.c (eval): If we detect an initial UTF-8 BOM, skip it. - Fixes Savannah bug #36529. - (record_target_var): Remove unused variable "fname". - (eval): Use the correct pointer when adding to the variable buffer. - Fixes Savannah bug #36106. +2019-09-22 Paul Smith -2012-09-09 Eli Zaretskii + * tests/scripts/features/vpathplus: Fix output for big-endian systems. + Our hashing algorithm gives different ordering on LE vs BE systems. + Patch from Dmitry Goncharov . - * read.c (unescape_char): Fix a thinko in the last change. +2019-09-22 Florian Weimer (tiny change) -2012-09-09 Paul Smith + * configure.ac (HAVE_GETTIMEOFDAY): Avoid undeclared exit function. - * default.c (default_variables): Use a correct default LIBPPATERNS - for MacOS. Fixes Savannah bug #37197. +2019-09-22 Paul Smith - * read.c (record_files): Reset the default macro values if .POSIX - is set. Fixes Savannah bug #37069. - (parse_file_seq): Break out of an infinite loop if we're not - making progress when parsing archive references. + * test/test_driver.el (_run_with_timeout): Show error message. -2012-09-01 Eli Zaretskii + * job.c (child_error): Modify error message string. + This reverts commit 6264deece3bb77798240a906ceed79097adbcf48. + Further investigation discovers that the real issue is that + GNU Emacs compile mode doesn't have a matching regex for GNU + make error messages generated when targets fail. I submitted + a patch to GNU Emacs adding a matcher for compile mode. - * README.W32.template: Update for job-server and Guile support. +2019-09-21 Paul Smith - * read.c (unescape_char): Advance 'p' after copying the unescaped - characters. Otherwise the backslashes are incorrectly erased from - the original string. + * tests: Convert from File::Spec::Functions to File::Spec. + Users report the Functions version doesn't work correctly for some + older versions of Perl. -2012-03-05 Paul Smith + * tests/scripts/function/guile: Valgrind doesn't work with Guile. - Update copyright notices to use year ranges, as allowed by - clarifications in the GNU Maintainer's Manual. + * src/job.c (child_execute_job): Allocate space for argv NULL. -2012-03-04 Paul Smith +2019-09-21 Paul Smith - * read.c (unescape_char): New function to remove escapes from a char. - (record_files): Call it on the dependency string to unescape ":". - Fixes Savannah bug #12126 and bug #16545. + [SV 56918] Compute job slots properly on failing command + Ensure we properly reduce job_slots_used if a command fails because + it doesn't exist/can't be started. - * make.h (CSTRLEN): Determine the length of a constant string. - * main.c: Use the new macro. - * read.c: Ditto. - * variable.h: Ditto. - * function.c: Simplify checks for function alternatives. + * src/job.h (struct child): Add a field jobslot to be set when using + a job slot. + * src/job.c (start_waiting_job): Remember if we are using a job slot. + (reap_children): Reduce number of job slots used by jobslot. - * expand.c (variable_append): If the current set is local and the - next one is not a parent, then treat the next set as - local as well. Fixes Savannah bug #35468. +2019-09-21 Paul Smith -2012-03-03 Paul Smith + * src/arscan.c (ar_scan): Restrict length for sscanf of ar_mode. - * acinclude.m4 (AC_STRUCT_ST_MTIM_NSEC): Add support for AIX 5.2+ - nanosecond timestamps. Fixes Savannah bug #32485. + * tests/scripts/functions/shell: Detect correct SHELLSTATUS code. - Convert uses of `foo' for quoting to 'foo' to reflect changes in - the GNU Coding Standards. Fixes Savannah bug #34530. + * tests/run_make_test.pl: Fix support for valgrind. + Change the variable holding the make command to be a list that can + hold extra commands and options, not just a string. - * job.c (construct_command_argv_internal): In oneshell we need to - break the SHELLFLAGS up for argv. Fixes Savannah bug #35397. + * tests/run_make_tests.pl (find_prog): Fix syntax error. - * function.c (func_filter_filterout): Recompute the length of each - filter word in case it was compressed due to escape chars. Don't - reset the string as it's freed. Fixes Savannah bug #35410. +2019-09-16 Paul Smith - * misc.c (collapse_continuations): Only use POSIX-style - backslash/newline handling if the .POSIX target is set. - Addresses Savannah bug #16670 without backward-incompatibility. - * NEWS: Document behavior change. - * doc/make.texi (Splitting Lines): New section describing how to - use backslash/newline to split long lines. + * NEWS: Update date and clarify -l change. -2012-02-26 Paul Smith + * tests/run_make_tests.pl: Create $scriptsuffix for Windows/VMS. + * tests/scripts/features/targetvars: Add a suffix to scripts. + * tests/scripts/misc/general4: Ditto. - * implicit.c (pattern_search): Check the stem length to avoid - stack overflows in stem_str. Fixes Savannah bug #35525. +2019-09-16 Paul Smith -2012-02-03 Eli Zaretskii + Refresh the test suite framework implementation. + Go through both run_make_tests.pl and test_driver.pl and slightly + modernize the Perl and clean up indentation etc. Fix a number of + warnings in the test scripts detected by running with -w. - * w32/subproc/sub_proc.c (proc_stdin_thread, proc_stdout_thread) - (proc_stderr_thread, process_pipe_io): Ifdef away unused - functions. + * tests/test_driver.pl: Move make error string detection out of the + base test driver. + (run_all_tests): Ensure that we always look for tests in the cwd. + * tests/run_make_tests.pl: Use File::Spec for path manipulations. + Correctly use setlocale() when detecting error strings. + Get configuration from the config-flags.pm file not config.status. + * tests/scripts/features/archives: Use new $cwddir variable. + * tests/scripts/features/reinvoke: Add missing semicolon. + * tests/scripts/features/vpath2: Avoid non-existent variable. + * tests/scripts/functions/foreach: Escape variables. + * tests/scripts/misc/bs-nl: Remove non-existing \v escape sequence. + * tests/scripts/misc/general4: Use handy create_file(). + * tests/scripts/options/dash-C: Use Cwd/$cwddir. + * tests/scripts/options/dash-I: Use subst_make_string() and #PWD#. + * tests/scripts/options/symlinks: Use File::Spec. + * tests/scripts/targets/DEFAULT: Use create_file and run_make_test. + * tests/scripts/variables/CURDIR: Use run_make_test. + * tests/scripts/variables/automatic: Remove extraneous "\". + * tests/scripts/vms/library: Remove extra "my" and extraneous "\". - * w32/subproc/w32err.c (map_windows32_error_to_string) [_MSC_VER]: - Don't use TLS storage for szMessageBuffer. Ifdef away special - code for handling Winsock error codes. Make the function return a - `const char *'. Suggested by Ozkan Sezer. Fixes Savannah bug #34832. +2019-09-16 Paul Smith -2012-01-29 Paul Smith + * tests/config-flags.pm.in: Add USE_SYSTEM_GLOB. + * tests/config_flags_pm.com [VMS]: Ditto. - * gmk-default.scm (to-string-maybe): Variables map to empty strings. - In Guile 2.0, (define ...) results in a variable object so make - sure that maps to an empty string in make. + * README.git: [SV 56895] Provide more info about "maintainer mode". + * src/read.c (get_next_mword) [HAVE_DOS_PATHS]: Don't fall through to + parsing variable references if we find a drivespec in a word! - * variable.c (parse_variable_definition): New POSIX assignment ::= - Take a struct variable to return more information after parsing. - (assign_variable_definition): New parse_variable_definition() call. - * variable.h: New declaration of parse_variable_definition(). - * read.c (do_define): New parse_variable_definition() call. - (parse_var_assignment): Ditto. - (get_next_mword): Parse ::= as a variable assignment. - * doc/make.texi (Flavors): Describe the new ::= syntax. - * NEWS: Mention the ::= operator. + * tests/test_driver.pl: Remember error for "running" a directory. + * tests/scripts/features/errors: Check errors "running" a directory. - * variable.h (struct variable): Rearrange elts to reduce struct size. + * src/job.c (child_execute_job): Use errno from find_in_given_path(). + * tests/test_driver.pl: Determine non-executable error message. + * tests/scripts/features/errors: Use the local non-executable error. - * function.c (func_file): Create a new function, $(file ...) - * doc/make.texi (File Function): Document the $(file ..) function. - * NEWS: Announce it. + * src/job.c (child_execute_job): Use newer gnulib findprog version. - * gmk-default.scm (to-string-maybe): Use a more portable way to - test for unprintable characters. - * configure.in [GUILE]: Guile 1.6 doesn't have pkg-config - * build_w32.bat: Ditto. +2019-09-10 Eli Zaretskii -2012-01-28 Eli Zaretskii + Revert "[SV 56449] (Windows) Use slow path if '%' appears in the command" + This reverts commit 38e96eadea6e2cd42a0f414959bac327de9f468a. + Per discussion on Savannah, the modified behavior matches + the way % is handled in batch files, but not in cmd command + lines. And since Make mostly tries to emulate the command + line, the new behavior is unexpected and backward-incompatible. - * config.h.W32.template: Update from config.h.in. +2019-09-09 Paul Smith - Support a Windows build with Guile. + Rework the creation of build.sh so it's not a template. + * build.sh: Rename from build.template. Get the list of objects + from the Makefile. Move configure-replaced variables ... + * build.cfg.in: to this new .in file. + * configure.ac: Remove special handling of build.sh.in and add + build.cfg as a generated file. + * Makefile.am (EXTRA_DIST): Remove build.sh.in and add build.sh + and build.cfg.in for build.sh.in. + * maintMakefile: Remove handling for build.template. Treat + build.sh as a source file, not a generated file. + * .gitignore: Ignore generated build.cfg file. - * README.W32.template: Update with instructions for building with - Guile. +2019-09-08 Paul Smith - * build_w32.bat: Support building with Guile. + * gl/modules/make-glob: Move local glob configure.ac to here + * configure.ac: from here. - * make.h [HAVE_STDINT_H]: Include stdint.h. +2019-09-08 Paul Smith - * main.c (main, clean_jobserver): Move declarations of variables - not used in the WINDOWS32 build to the #else branch, to avoid - compiler warnings. + [SV 56834] Support local PATH search with posix_spawnp + When using exec we install the child's environment before invoking + execlp(), so commands are found on the child's PATH. posix_spawnp + searches on the parent's PATH, which we don't want. - Fix failures on MS-Windows when Make's standard handles are invalid. - This can happen when Make is invoked from a GUI application. - - * w32/subproc/sub_proc.c (process_init_fd): Don't dereference - pproc if it is a NULL pointer. - (process_begin, process_cleanup): Don't try to close pipe handles - whose value is INVALID_HANDLE_VALUE. - (process_easy): Initialize hIn, hOut, and hErr to - INVALID_HANDLE_VALUE. If DuplicateHandle fails with - ERROR_INVALID_HANDLE, duplicate a handle for the null device - instead of STD_INPUT_HANDLE, STD_OUTPUT_HANDLE or - STD_ERROR_HANDLE. Don't try to close pipe handles whose value is - INVALID_HANDLE_VALUE. - - * function.c (windows32_openpipe): Initialize hIn and hErr to - INVALID_HANDLE_VALUE. If DuplicateHandle fails with - ERROR_INVALID_HANDLE, duplicate a handle for the null device - instead of STD_INPUT_HANDLE or STD_ERROR_HANDLE. Fix indentation. - Don't try to close handles whose value is INVALID_HANDLE_VALUE. - -2012-01-25 Eli Zaretskii - - * function.c (define_new_function): Fix format strings in calls to - `fatal'. - -2012-01-17 Paul Smith - - * guile.c (func_guile): Handle NULL returns from Guile. - -2012-01-16 Paul Smith - - * make.h (PATH_SEPARATOR_CHAR): Allow resetting for crosscompiling - for Windows. Patch by Chris Sutcliffe - Fixes Savannah bug #34818. - -2012-01-15 Paul Smith - - * variable.h: Prototype an interface for defining new make functions. - * function.c (define_new_function): Define it. - (func_guile): Remove the "guile" function. - (function_table_init): Ditto. - * guile.c (func_guile): Add the "guile" function here. - (setup_guile): Call define_new_function() to define it. - (guile_eval_string): Obsolete. - - * all: Update copyright notices. - -2012-01-12 Paul Smith - - Support GNU Guile as an embedded extension language for GNU make. - - * NEWS: Note the new Guile capability. - * Makefile.am (EXTRA_DIST, make_SOURCES): Add new guile source files. - (AM_CFLAGS): Add Guile compiler flags. - (guile): Add a rule for converting default SCM into a C header. - * configure.in: Add support for --with-guile. - Also, convert the entire file to properly escaped autoconf m4, and - utilize newer features such as AS_IF() and AS_CASE(). - * doc/make.texi (Guile Function): Document the GNU guile integration. - * make.h (guile_eval_string, guile_boot): Prototypes for Guile. - * main.c (main): Run guile_boot() to handle main(). - (real_main): All the previous content of main() is here. - (real_main): Add "guile" to the .FEATURES variable. - * function.c (func_guile): Call Guile. - * guile.c: New file implementing GNU make integration with GNU Guile. - * gmk-default.scm: The integration of GNU make with Guile uses - Guile itself for much of the parsing and conversion of return - types, etc. This implementation is embedded into GNU make. - * config.h-vms.template: Disable Guile support. - * config.h.W32.template: Ditto. - * configh.dos.template: Ditto. - * config.ami.template: Ditto. - * makefile.vms: Add new Guile files. - * Makefile.DOS.template: Ditto. - * Makefile.ami: Ditto. - * NMakefile.template: Ditto. - * SMakefile.template: Ditto. - * build_w32.bat: Ditto. - * dosbuild.bat: Ditto. - * make_msvc_net2001.vcproj: Ditto. - -2011-11-15 Paul Smith - - * main.c (main): Use %ld when printing DWORD values. - * job.c (new_job): Ditto. - * w32/include/sub_proc.h: Use const. - * w32/subproc/sub_proc.c (open_jobserver_semaphore): Use const. - Fixes Savannah bug #34830. Changes suggested by Ozkan Sezer. - - * configure.in (MAKE_JOBSERVER): Enable jobserver on W32 systems. - * config.h.W32.template (MAKE_JOBSERVER): Ditto. - -2011-11-14 Paul Smith - - * read.c (eval): parse_file_seq() might shorten the string due to - backslash removal. Start parsing again at the colon. - Fixes Savannah bug #33399. - -2011-11-13 Paul Smith - - * file.c (file_timestamp_cons): Match up data types to avoid warnings. - * filedef.h: Ditto. - * misc.c (concat): Ditto. - * read.c (eval): Assign value to avoid warnings. - * function.c (func_shell_base): Use fork() instead of vfork() to - avoid warnings. - * make.h (INTEGER_TYPE_SIGNED): Use <=0 to avoid warnings. - Fixes Savannah bug #34608. - - * job.c (construct_command_argv): Remove _p. - (construct_command_argv_internal): Remove _ptr. - Fixes Savannah bug #32567. - - * main.c (clean_jobserver): Don't write the free token to the pipe. - Change suggested by Tim Newsome - - * acinclude.m4 (AC_STRUCT_ST_MTIM_NSEC): Add support for Darwin. - * filedef.h (FILE_TIMESTAMP_STAT_MODTIME): Ditto. - Patch provided by Troy Runkel - -2011-10-11 Troy Runkel - - * config.h.W32: Enable job server support for Windows. - * main.c [WINDOWS32]: Include sub_proc.h - (main): Create a named semaphore to implement the job server. - (clean_jobserver): Free the job server semaphore when make is finished. - * job.c [WINDOWS32]: Define WAIT_NOHANG - (reap_children): Support non-blocking wait for child processes. - (free_child): Release job server semaphore when child process finished. - (job_noop): Don't define function on Windows. - (set_child_handler_action_flags): Don't define function on Windows. - (new_job): Wait for job server semaphore or child process termination. - (exec_command): Pass new parameters to process_wait_for_any. - * w32/include/sub_proc.h [WINDOWS32]: New/updated EXTERN_DECL entries. - * w32/subproc/sub_proc.c [WINDOWS32]: Added job server implementation. - (open_jobserver_semaphore): Open existing job server semaphore by name. - (create_jobserver_semaphore): Create new job server named semaphore. - (free_jobserver_semaphore): Close existing job server semaphore. - (acquire_jobserver_semaphore): Decrement job server semaphore count. - (release_jobserver_semaphore): Increment job server semaphore count. - (has_jobserver_semaphore): Returns whether job server semaphore exists. - (get_jobserver_semaphore_name): Returns name of job server semaphore. - (wait_for_semaphore_or_child_process): Wait for either the job server - semaphore to become signalled or a child process to terminate. - (process_wait_for_any_private): Support for non-blocking wait for child. - (process_wait_for_any): Added support for non-blocking wait for child. - (process_file_io): Pass new parameters to process_wait_for_any_private. - -2011-09-18 Paul Smith - - * main.c (main): If we're re-exec'ing and we're the master make, - then restore the job_slots value so it goes back into MAKEFLAGS - properly. See Savannah bug #33873. - - * remake.c (library_search): STD_DIRS is computed when other - static vars like buflen etc. are computed, so it must be static - as well. See Savannah bug #32511. - -2011-09-16 Paul Smith - - * maintMakefile (do-po-update): Apparently we have to avoid - certificate checks on the http://translationproject.org site now. - -2011-09-12 Paul Smith - - * read.c (eval): Ensure exported variables are defined in the - global scope. Fixes Savannah bug #32498. - -2011-09-11 Paul Smith - - * Makefile.am (dist-hook): Remove w32/Makefile and .deps/ from the - dist file. Fixes Savannah bug #31489. - - * doc/make.texi (Complex Makefile): Add a hint about using - #!/usr/bin/make (for Savannah support request #106459) + Import gnulib's findprog-in module and use it to search the child's + PATH, then use posix_spawn() to run it. -2011-09-02 Paul Smith + Also, posix_spawn() does not fall back to trying sh on ENOEXEC, as + execlp() does, so implement that as well. - * remake.c (touch_file): If we have both -n and -t, -n takes - precedence. Patch from Michael Witten + * bootstrap.conf: Add the findprog-in gnulib module + * src/job.c: Include findprog.h if we're using posix_spawn. + (start_job_command): Remove the handling of child->cmd_name, + (child_execute_job): and add it here. Look up the command to be + run in the child's path and invoke it if found. If it fails with + ENOEXEC then retry it as an argument to the default shell. + * tests/scripts/misc/general4: Test makefile PATH assignments. + * tests/scripts/features/targetvars: Ditto, for target variables. -2011-08-29 Paul Smith +2019-09-07 Paul Smith + + * doc/make.texi (Recipe Execution): Correct example to use $(<[DF]) - * expand.c (variable_expand_string): Always allocate a new buffer - for a string we're expanding. The string we're working on can get - freed while we work on it (for example if it's the value of a - variable which modifies itself using an eval operation). - See Savannah patch #7534 for the original report by Lubomir Rintel. + * configure.ac: Check whether struct dirent has a d_type field + * src/dir.c (dir_contents_file_exists_p): Use the autoconf macro + HAVE_STRUCT_DIRENT_D_TYPE rather than relying on the GNU libc- + specific _DIRENT_HAVE_D_TYPE. + * lib/glob.c: Set HAVE_D_TYPE if HAVE_STRUCT_DIRENT_D_TYPE. + + * src/config.h.W32.template [W32]: Add support for dirent.d_type + * src/w32/include/dirent.h: Add DT_* values for dirent.d_type + (struct dirent): Add d_type + * src/w32/compat/durent.c (readdir): Set dirent.d_type based on + Windows file attributes. -2011-06-12 Paul Smith + * src/makeint.h: Add typedef for mode_t if !HAVE_UMASK - * read.c (parse_file_seq): Move the check for empty members out of - the loop so we can go to the next member properly. - Another fix for Savannah bug #30612. + * build.template: Rewrite to allow gnulib support. - * config.h-vms.template: Newer versions of VMS have strncasecmp() - Patch provided by: Hartmut Becker + * doc/make.texi: Clarify that the jobserver pipe is "blocking" -2011-05-07 Paul Smith +2019-09-07 Paul Smith - * expand.c (variable_append): Add a LOCAL argument to track - whether this is the first invocation or not. If it's not and - private_var is set, then skip this variable and try the next one. - Fixes Savannah bug #32872. + Align child_execute_job among different ports + Create a struct childbase which is the basics of struct child needed + to invoke child_execute_job(), and can be cast back and forth to a + struct child. Ensure all implementations of child_execute_job() take + the same arguments. - * read.c (parse_file_seq): Ensure existence checks use glob(). + * src/job.h (CHILDBASE): Create a macro to hold the base parts. + (struct childbase): A structure containing CHILDBASE. + (struct child): Use CHILDBASE as the initial part of child. + [VMS]: Remove declaration of VMS version of child_execute_job. + * src/job.c (start_job_command): Use new child_execute_job() call. + (child_execute_job) [__EMX__]: Implement new calling signature. + (child_execute_job): Implement new calling signature. + * src/main.c (main) [__EMX__]: Use new child_execute_job() call. + * src/function.c (func_shell_base): Use new child_execute_job() call. + * src/vmsjobs.c (vmsHandleChildTerm): Accept struct childbase. + * src/vmsjobs.c (child_execute_job): Implement new calling signature. + Modify the return value to be pid_t, not a boolean, and return the + PID rather than setting it in the child. This is OK because our only + caller immediately reset PID to -1 anyway if we return 0. -2011-05-07 Eli Zaretskii +2019-09-07 Paul Smith - * job.c (construct_command_argv_internal): Don't assume shellflags - is always non-NULL. Escape-protect characters special to the - shell when copying the value of SHELL into new_line. Fixes - Savannah bug #23922. + * doc/make.tex (Substitution Refs): Clarify patsubst relationship. -2011-05-02 Paul Smith + * src/job.c (start_job_command) [VMS]: Correct VMS comment. - * doc/make.texi (Special Variables): Add documentation for the new - words in .FEATURES. Fixes Savannah bug #32058. - (Flavor Function): Rewrite the section on the flavor function. - Fixes Savannah bug #31582. +2019-09-07 Paul Smith - * function.c (func_sort): Use the same algorithm to count the - number of words we will get after the split, as we use to split. - Based on a patch from Matthias Hopf. Fixes Savannah bug #33125. + Show useful errors when posix_spawn() doesn't do so + The posix_spawn() function may not detect that the command to run is + invalid when it's invoked. Instead, it will run then exit with + error code 127. If that happens do our best to present the user + with a useful error message. - * make.h: Make global variable stack_limit extern. - Fixes Savannah bug #32753. + * src/job.h (struct child): Add cmd_name to hold the command we ran. + * src/job.c (start_job_command): On success, remember the cmd_name. + (reap_children): On exit 127, stat cmd_name and show a useful error. + (free_child): Free cmd_name. -2011-05-01 Paul Smith +2019-09-07 Paul Smith - * read.c (parse_file_seq): Don't try to invoke glob() unless there - are potential wildcard characters in the filename. Performance - enhancement suggested by Michael Meeks + * README.git: Describe GCC and GNU make requirements + * maintMakefile: Put custom C flags into a separate variable + so they can be overridden more easily on the command line. -2011-04-29 Boris Kolpackov + * tests/scripts/features/archives: Fix expected long ar name output. - * read.c (eval_makefile): Delay caching of the file name until after - all the expansions and searches. + * tetss/run_make_test.pl: Avoid 'sh -c' for Windows portability. -2011-04-17 David A. Wheeler + Update to GNU make release candidate 4.2.91 - * doc/make.texi (Reading Makefiles): Document "!=". - (Setting): Ditto. - (Features): Ditto. - * variable.h (enum variable_flavor): New type "f_shell". - * variable.c (shell_result): Send a string to the shell and store - the output. - (do_variable_definition): Handle f_shell variables: expand the - value, then send it to the shell and store the result. - (parse_variable_definition): Parse "!=" shell assignments. - * read.c (get_next_mword): Treat "!=" as a varassign word. - * function.c (fold_newlines): If trim_newlines is set remove all - trailing newlines; otherwise remove only the last newline. - (func_shell_base): Move the guts of the shell function here. - (func_shell): Call func_shell_base(). + * tests/scripts/functions/wildcard: Skip dangling symlink test. + The built-in glob implementation does not correctly handle dangling + symlinks. This needs to be fixed by switching to the latest glob + implementation from gnulib but that's a big job: for now avoid the + test if we know it will fail. -2011-02-21 Paul Smith + * maintMakefile: Use check-local when testing build.sh. + Running 'make check' will rebuild 'make' so we're not testing the + build.sh-generated make binary. - * strcache.c (various): Increase performance based on comments - from Ralf Wildenhues . Stop looking for - a buffer when we find the first one that fits, not the best fit. - If there is not enough free space in a buffer move it to a - separate list so we don't have to walk it again. - * make.h (NDEBUG): Turn off asserts unless maintainer mode is set. - (strcache_add_len, strcache_setbufsize): Use unsigned length/size. - * maintMakefile (AM_CPPFLAGS): Enable MAKE_MAINTAINER_MODE. +2019-09-07 Paul Smith - * remake.c (complain): Move translation lookups closer to use. + Don't reset stack size when using posix_spawn() + There's no way to run setrlimit() from posix_spawn() so we can't reset + the stack limit in children; thus, don't change it in the parent. -2011-02-13 Paul Smith + * src/makeint.h (SET_STACK_SIZE): Don't set this when HAVE_POSIX_SPAWN. + * src/job.c (child_execute_job): Remove useless comment. - * doc/make.texi: Clean up references to "static" variables and - semicolon errors. Patch from Michael Witten . +2019-09-07 Paul Smith -2010-12-27 Paul Smith + * configure.ac: Remove redundant getloadavg gnulib support - * make.1: Update the header/footer info in the man page. + * src/dir.c (dir_setup_glob): Initialize unused gl_offs. + * tests/scripts/functions/wildcard: Add trailing slash tests. + Initial changes by Dmitry Goncharov -2010-11-28 Paul Smith +2019-09-02 Paul Eggert - * read.c (record_target_var): Don't reset v if it's the same as - the global version. Fixes Savannah bug #31743. + Pacify Oracle Studio c99 + * src/dep.h (DEP): + * src/function.c (struct function_table_entry): + Use unsigned int, not unsigned short. Without this patch, c99 + complains ‘warning: nonportable bit-field type’. -2010-11-06 Paul Smith + Port grouped_targets test to Solaris 10 + * tests/scripts/features/grouped_targets: Use ‘printf ''’ + instead of ‘echo -n’, as POSIX says the latter is not portable. - * variable.c (print_auto_variable): Print auto variables; ignore others. - (print_noauto_variable): Print non-auto variables; ignore others. - (print_variable_set): Allow the caller to select which type to print. - (print_target_variables): Show all the non-auto variables for a target. + Remove useless code in eval + * src/read.c (eval): Remove useless code. Without this patch, + Oracle Studio 12.6 complains ‘"src/read.c", line 1405: warning: + loop not entered at top’. - * default.c (install_default_suffix_rules): Initialize recipe_prefix. - * rule.c (install_pattern_rule): Ditto. - * read.c (record_files): Pass in the current recipe prefix. Remember - it in the struct command for these targets. - (eval): Remember the value of RECIPEPREFIX when we start parsing. - Do not remove recipe prefixes from the recipe here: we'll do it later. - * job.c (start_job_command): Remove recipe prefix characters early, - before we print the output or chop it up. - * file.c (print_file): If recipe_prefix is not standard, reset it - in -p output. Assign target variables in -p output as well. + Pacify Oracle Studio 12.6 in init_switches + * src/main.c (init_switches): Use a cast to convert char const * + to char *. Without this patch, the compiler complains + ‘"src/main.c", line 2643: warning: assignment type mismatch: + pointer to char "=" pointer to const char’. - * commands.c (chop_commands): Max command lines is USHRT_MAX. - Set any_recurse as a bitfield. - * make.h (USHRT_MAX): Define if not set. + Pacify Oracle Studio 12.6 + * src/arscan.c [VMS]: Use ‘#if !defined LBR$_HDRTRUNC’ instead + of ‘#ifndef LBR$_HDRTRUNC’ to pacify Oracle Studio 12.6, which + looks inside unused #if branches for preprocessor syntax errors. + Without this patch it complains ‘"src/arscan.c", line 43: warning: + tokens ignored at end of directive line’. -2010-10-27 Paul Smith +2019-09-02 Paul Smith - * commands.h (struct commands): Rearrange to make better use of - memory. Add new recipe_prefix value. + * NEWS: Fix incorrect notes. -2010-10-26 Paul Smith + * src/read.c (parse_file_seq): [SV 52076] Don't reverse glob() results. - * doc/make.texi (Setting): Document the treatment of - backslash-newline in variable values. - * misc.c (collapse_continuations): Do not collapse multiple - backslash-newlines into a single space. Fixes Savannah bug #16670. +2019-08-28 Eli Zaretskii -2010-08-29 Paul Smith + Fix MS-Windows MinGW build + * src/w32/subproc/sub_proc.c (process_wait_for_multiple_objects): + Fix format specifier for GetLastError's value. - * doc/make.texi (Implicit Variables): Document LDLIBS and LOADLIBES. - Fixes Savannah bug #30807. - (Instead of Execution): Mention that included makefiles are still - rebuilt even with -n. Fixes Savannah bug #30762. + * src/job.c (reap_children): Define the 'remote_status_lose' label + only for Posix platforms, to avoid compiler warning. - * configure.in: Bump to 3.82.90. + * build_w32.bat (LNKOUT): New variable, using forward slashes. + Use forward slashes in calls to :Compile, so that linking with GNU + ld works. - * make.h: Add trace_flag variable. - * main.c (switches): Add --trace option. - (trace_flag): Declare variable. - * job.c (start_job_command): Show recipe if trace_flag is set. - (new_job): Show trace messages if trace_flag is set. - * doc/make.texi (Options Summary): Document the new --trace option. - * make.1: Add --trace documentation. - * NEWS: Mention --trace. + * src/makeint.h [!HAVE_UMASK]: Prototype for 'umask'. + (UMASK, MODE_T): Don't define. - * job.c (child_error): Show recipe filename/linenumber on error. - Also show "(ignored)" when appropriate even for signals/coredumps. - * NEWS: Mention file/linenumber change. + * src/misc.c (get_tmpfile): Don't call UMASK, call umask, to + avoid compilation warning on !HAVE_UMASK platforms. + * src/output.c (output_tmpfd): Likewise. - * main.c (main): Print version info when DB_BASIC is set. + * src/misc.c (umask) [!HAVE_UMASK]: New no-op function. - * job.c (construct_command_argv_internal): If shellflags is not - set, choose an appropriate default value. Fixes Savannah bug #30748. + * src/config.h.W32.template (__USE_MINGW_ANSI_STDIO) + [__MINGW32__]: Define to 1, to force Make use ANSI-compatible + stdio functions, which also support the non-standard 'Id' and 'Ix' + specifiers. + (HAVE_UMASK) [__MINGW32__]: Define to 1. -2010-08-27 Eli Zaretskii + * src/arscan.c (ar_member_touch): Type-cast argument of strlen to + avoid compiler warnings. - * variable.c (define_automatic_variables) [__MSDOS__ || WINDOWS32]: - Remove trailing backslashes in $(@D), $( -2010-08-13 Paul Smith + * NEWS: Update for pre-release - * NEWS: Accidentally forgot to back out the sorted wildcard - enhancement in 3.82, so update NEWS. - Also add NEWS about the error check for explicit and pattern - targets in the same rule, added to 3.82. +2019-08-26 Paul Smith - * main.c (main): Add "oneshell" to $(.FEATURES) (forgot to add - this in 3.82!) + Update maintainer mode to support debug wait points. + Make a spin() method available when compiled in maintainer mode. + If a file exists in the working directory with a specific name, + make will sleep until the file is deleted. - * read.c (parse_file_seq): Fix various errors parsing archives - with multiple objects in the parenthesis, as well as wildcards. - Fixes Savannah bug #30612. + Ensure that maintainer mode is enabled on Windows, using the same + algorithm we use on POSIX / autoconf systems. -2010-08-10 Paul Smith + * build_w32.bat: If maintMakefile exists, enable maintainer mode. + * src/main.c (main): Replace Windows-only suspend flag with spin(). + * src/makeint.h: A SPIN() macro calls spin() in maintainer mode. + * src/misc.c (spin): If a spin file exists sleep until it's deleted. - * main.c (main): Expand MAKEFLAGS before adding it to the - environment when re-exec'ing. Fixes Savannah bug #30723. +2019-08-26 Paul Smith -2010-08-07 Eli Zaretskii + * tests/scripts/features/archives: [SV 54395] Support non-GNU ar. - * w32/subproc/build.bat: Make all 3 cl.exe compile command lines - use the same /I switches. Fixes Savannah bug #30662. + * tests/scripts/misc/general3: Add more tests for SHELL/.SHELLFLAGS - * function.c (func_shell) [WINDOWS32]: Reset just_print_flag - around the call to construct_command_argv, so that a temporary - batch file _is_ created when needed for $(shell). - Fixes Savannah bug #16362. +2019-08-25 Paul Smith -2010-08-07 Juan Manuel Guerrero + * src/job.c (construct_command_argv): Remove unused VMS code - * configh.dos.template (HAVE_STRNCASECMP): Define. + * src/job.c (child_execute_job): Set pid to -1 on posix_spawn failure. -2010-07-28 Paul Smith +2019-08-24 Paul Smith - Version 3.82 released. + * bootstrap: Update from latest gnulib version - * configure.in: Change release version. - * NEWS: Change the date. + * scripts/copyright-update: Use git ls-files for controlled files - * read.c (parse_file_seq): Remove GLOB_NOSORT for - backward-compatibility. We'll add it back in next release. - * NEWS: Note it. + * po/LINGUAS: Add a translation for Bulgarian. -2010-07-24 Eli Zaretskii +2019-07-14 Christian Eggers (tiny change) - * job.c (pid2str) [WINDOWS32]: Fix CPP conditionals for using %Id - format. + [SV 56449] (Windows) Use slow path if '%' appears in the command + * src/job.c (sh_chars_dos): Add '%' as a special character + * src/job.c (construct_command_argv_internal): Check for '%' in quotes -2010-07-18 Paul Smith + For the windows version of make, a recipe line cannot be executed + diretly by make (without a shell) if a '%' character is present. This + character starts a cmd.exe escape sequence. - * configure.in: Switch bsd_signal to AC_CHECK_DECLS() to make sure - we have a declaration. Fixes Savannah bug #25713 (maybe?) - * doc/make.texi (Complex Makefile): Cleanup variable assignments. - (One Shell): New subsection for the .ONESHELL special target. +2019-07-14 Paul Smith - Patches by Ozkan Sezer : + * src/read.c (parse_file_seq): Update comments. - * misc.c (strncasecmp): Local implementation for systems without. - * config.h.W32.template (HAVE_STRNICMP): Define on Windows. - * configure.in: Check for strncasecmp/strncmpi/strnicmp. - * job.c [WINDOWS32]: Don't define dup2 on Windows. - (pid2str): Use "%Id" even with MSVC - (exec_command): Cast to pid_t when calling pid2str(). - * w32/subproc/sub_proc.c [WINDOWS32]: Include config.h first. - Use stddef.h on MSVC to get intptr_t. - * w32/subproc/misc.c [WINDOWS32]: Include config.h first. - * w32/compat/dirent.c [WINDOWS32]: Include config.h first. - (readdir): Cast -1 to correct type for d_ino. - * w32/pathstuff.c [WINDOWS32]: Ensure make.h is included first. - * make.h [WINDOWS32]: Don't prototype alloca() on Windows. - Add configuration for strncasecmp(). - * main.c (ADD_SIG) [WINDOWS32]: Avoid warnings in MSVC. - * config.h.W32.template [WINDOWS32]: Don't warn on unsafe - functions or variables. - * NMakefile.template [WINDOWS32]: Remove /MACHINE:I386. - * main.c (clean_jobserver): Cast due to MSVC brokenness. - (decode_switches): Ditto. - * vpath.c (construct_vpath_list): Ditto. - * rule.c (freerule): Ditto. - * ar.c (ar_glob): Ditto. - -2010-07-16 Boris Kolpackov - - * misc.c (concat): Fix buffer overrun. - -2010-07-12 Paul Smith - - Update copyrights to add 2010. - - * build_w32.bat: Support for MSVC Windows x86_64 builds. - * job.c: Don't define execve() on MSVC/64bit. - Patch by Viktor Szakats. Fixes Savannah bug #27590. - -2010-07-12 Eli Zaretskii - - * make.h (alloca) [!__GNUC__]: Don't define prototype. - (int w32_kill): Use pid_t for process ID argument. - Fixes Savannah bug #27809. - -2010-07-12 Paul Smith - - Integrated new .ONESHELL feature. - Patch by David Boyce . Modified by me. - - * NEWS: Add a note about the new feature. - * job.c (is_bourne_compatible_shell): Determine whether we're - using a standard POSIX shell or not. - (start_job_command): Accept '-ec' as POSIX shell flags. - (construct_command_argv_internal): If one_shell is set and we are - using a POSIX shell, remove "interior" prefix characters such as - "@", "+", "-". Also treat "\n" as a special character when - choosing the slow path, if ONESHELL is set. - * job.h (is_bourne_compatible_argv): Define the new function. - - * make.h (one_shell): New global variable to remember setting. - * main.c: Declare it. - * read.c (record_files): Set it. - * commands.c (chop_commands): If one_shell is set, don't chop - commands into multiple lines; just keep one line. - -2010-07-09 Eli Zaretskii - - * w32/subproc/sub_proc.c: Include stdint.h. - (sub_process_t): Use intptr_t for file handles and pid_t for - process ID. - (process_pipes, process_init_fd, process_begin): Use intptr_t for - file handles and pid_t for process ID. Fixes Savannah bug #27809. - Patch by Ozkan Sezer - - * function.c (abspath): Support absolute file names in UNC format. - Fixes Savannah bug #30312. - - * job.c (pid2str) [WINDOWS32]: Don't use %Id with GCC < 4.x. - (exec_command) [WINDOWS32]: Use pid2str instead of non-portable - %Id. - - * main.c (handle_runtime_exceptions): Use %p to print addresses, - to DTRT on both 32-bit and 64-bit hosts. Savannah bug #27809. - - * job.c (w32_kill, start_job_command, create_batch_file): Use - pid_t for process IDs and intptr_t for the 1st arg of - _open_osfhandle. - * function.c (windows32_openpipe): Use pid_t for process IDs and - intptr_t for the 1st arg of _open_osfhandle. - (func_shell): Use pid_t for process IDs. - * main.c (main) [WINDOWS32]: Pacify the compiler. - * config.h.W32.template (pid_t): Add a definition for 64-bit - Windows builds that don't use GCC. Fixes Savannah bug #27809. - Patch by Ozkan Sezer - -2010-07-07 Paul Smith - - * configure.in: Bump to a new prerelease version 3.81.91. +2019-07-13 Mike Haboustak (tiny change) -2010-07-06 Paul Smith + [SV 28456] Don't override $< when no default rule has been defined + The check for matching a file's command to the default rule's command + does not account for null. If no .DEFAULT is defined a rule with no + recipe has it's $< variable set to the value of $@. This breaks second + expansion, particularly when used with pattern rules. - * main.c (main): Set a default value of "-c" for .SHELLFLAGS. - * NEWS: Mention the new behavior of .POSIX and the new .SHELLFLAGS - variable. - * job.c (construct_command_argv): Retrieve the .SHELLFLAGS value - and pass it to construct_command_argv_internal(). - (construct_command_argv_internal): If .SHELLFLAGS is non-standard - use the slow path. Use that value instead of hard-coded "-c". + * src/commands.c [set_file_variables]: Check that cmds is set + * tests/scripts/features/se_explicit: Test case + * tests/scripts/features/se_implicit: Test case -2010-07-05 Paul Smith +2019-07-13 Paul Smith - * implicit.c (pattern_search): lastslash can be const. - * dir.c (downcase): Remove unused variable. - * hash.c (hash_init): Cast sizeof for error message. - * arscan.c (ar_scan): Cast to char* for WINDOWS32. - (ar_member_touch): Ditto. - * ar.c (glob_pattern_p): Avoid symbol collision: open -> opened - * signame.c (strsignal): Ditto: signal -> sig - * job.c (create_batch_file): Ditto: error -> error_string - (pid2str): Portably convert a pid_t into a string - (reap_children): Use it. - (start_waiting_job): Use it. - Savannah bug #27809. Patch by Ozkan Sezer + Switch to the gnulib version of strerror() + * bootstrap.conf: Add strerror module + * configure.ac: Remove strerror check + * src/misc.c: Remove local strerror() implementation + * src/config.ami.template: Remove HAVE_STRERROR + * src/config.h-vms.template: Ditto. + * src/config.h.W32.template: Ditto. -2010-07-03 Paul Smith +2019-05-19 Paul Smith - * read.c (parse_file_seq): All archive groups must end with ')' as - the LAST character in a word. If there is no word ending in ')' - then it's not an archive group. Fixes Savannah bug #28525. + * doc/make.texi: [SV 51974] Clarify makefile parsing operations. -2010-07-01 Paul Smith + * doc/make.texi: [SV 54116] Document whitespace removal trick. + Discovered and explained by Michael Henry + * tests/scripts/variables/flavors: Add a test to preserve the behavior. - * main.c (main): Append optional features using separate calls. - Not as efficient but not all compilers allow conditionals inside - macro calls. Fixes Savannah bug #29244. +2019-05-19 Paul Smith -2010-01-10 Paul Smith + [SV 46013] Allow recursive variable overrides from Makefiles + Ensure that variable overrides are passed to recursive make instances + even if no overrides were provided on the command line. + Fix suggested by Rici Lake - * make.h (patheq): Rename strieq() to patheq() for clarity. - * dir.c (dir_contents_file_exists_p): Use it. + * src/main.c (define_makeflags): Add overrides without respect to the + value of command_variables. + * tests/scripts/features/recursion: Add a test. - * dir.c (file_impossible): Convert xmalloc/memset to xcalloc. - * file.c (enter_file): Ditto. - * job.c (new_job): Ditto. +2019-05-19 Paul Smith -2009-12-11 Eli Zaretskii + Update developer customizations + * .ccls: Remove -std=c99: it disables __attribute__ causing warnings. + * .dir-locals.el: Force the C coding style to "gnu". + * make-gdb.py: Add GDB macros for pretty-printing GNU make structs. + * scripts/copyright-update: Use GNULIB_SRCDIR to find update-copyright. - * job.c (construct_command_argv_internal) - [WINDOWS32]: Add "echo." and a few more commands that are built - into cmd.exe. Fixes Savannah bug #28126. +2019-05-19 Paul Smith - * file.c (lookup_file) [HAVE_DOS_PATHS]: Treat '\\' like we do - with '/'. + [SV 54549] Don't free used set_lists during merge + When merging the variable_set_lists for two targets it could be + that the "from" set list is a subset of the "to" set list: check + for this situation to avoid freeing used memory. -2009-11-15 Paul Smith + * src/variable.c (merge_variable_set_lists): Walk the "to" list and + if the "from" list is contained in it, nothing to do. + * tests/scripts/features/se_explicit: Add a test. - Patches for VMS provided by Hartmut Becker +2019-05-19 Paul Smith - * vmsjobs.c (ctrlYPressed) [VMS]: Deal with CTRL-Y. - (vmsHandleChildTerm) [VMS]: Ditto. - (astYHandler) [VMS]: Ditto. - (tryToSetupYAst) [VMS]: Ditto. - (child_execute_job) [VMS]: Ditto. + * src/hash.c (jash_string): [SV 54980] Avoid ASAN error - * vmsify.c (trnlog) [VMS]: Fix const errors. - (vmsify) [VMS]: Ditto. +2019-05-19 Paul Smith - * readme.vms [VMS]: Update with notes for 3.82. + [SV 54740] Ensure .SILENT settings do not leak into sub-makes + Create a new variable run_silent to hold the current instance's global + silence setting, allowing silent_flag to represent only whether the -s + option was provided on the command line. - * job.h (comname) [VMS]: Remember the temporary command filename + * src/makeint.h: Change silent_flag variable to run_silent. + * src/job.c: Ditto. + * src/remake.c: Ditto. + * src/file.c: Ditto. + * src/main.c: Add a new global variable run_silent. + (decode_switches): After switches are decoded, initialize run_silent. + * tests/scripts/targets/SILENT: Add a test for recursive behavior. - * dir.c (vmsify) [VMS]: Fix const errors. - (vms_hash) [VMS]: Ditto. - (vmsstat_dir) [VMS]: Ditto. - (find_directory) [VMS]: Fix case-insensitive option for VMS - (dir_contents_file_exists_p) [VMS]: Ditto. - (file_impossible) [VMS]: Ditto. +2019-05-19 Paul Smith - * config.h-vms.template (HAVE_FDOPEN) [VMS]: Have it. - (HAVE_STRCASECMP) [VMS]: Ditto. + Update copyright statements for 2019 - * arscan.c (VMS_get_member_info) [VMS]: Fix timezone computation. - (ar_scan) [VMS]: Fix const error. +2019-05-12 Kaz Kylheku -2009-11-12 Boris Kolpackov + [SV 8297] Implement "grouped targets" for explicit rules. + This patch allows "grouped targets" using the &: syntax: - * vpath.c (vpath_search, selective_vpath_search): Add index arguments - which allows the caller to get the index of the matching directory. + tgt1 tgt2 ... tgtn &: pre1 pre2 ... + recipe - * make.h (vpath_search): Update prototype. + When the &: separator is used (in single or double colon forms), all + the targets are understood to be built by a single invocation of the + recipe. This is accomplished by piggy-backing on the already-existing + pattern rule feature, using the file's "also_make" list. - * remake.c (library_search): Implement linker-compatible library - search. Use the new VPATH_SEARCH index functionality to keep track - of the directory index for each match. Select the match with the - lowest directory index. + * NEWS: Add information about grouped targets. + * doc/make.texi (Multiple Targets): Add information on grouped targets. + (Pattern Intro): Refer to the new section to discuss multiple patterns. + * src/main.c (main): Add "grouped-targets" to .FEATURES + * src/read.c (make_word_type): Add new types for &: and &::. + (eval): Recognize the &: and &:: separator and remember when used. + (record_files): Accept an indicator of whether the rule is grouped. + If so, update also_make for each file to depend on the other files. + (get_next_mword): Recognize the &: and &:: word types. + * tests/scripts/features/grouped_targets: New test script. + * AUTHORS: Add Kaz Kylheku - * implicit.c (pattern_search): Pass NULL for the index arguments in - the VPATH_SEARCH call. +2019-05-12 Paul Smith - * doc/make.texi (Directory Search for Link Libraries): Describe the - new search behavior. + * variable.c (define_variable_in_set): Clear new structs - * NEWS: Add a note about the new behavior. + * po/LINGUAS: Add Portuguese translation -2009-10-25 Paul Smith + Add developer customizations + * .ccls: Configure the ccls LSP server + * .dir-locals.el: Reset some parameters for ccls and lsp-mode + * .gitignore: Update for GTAGS and ccls + * maintMakefile: Don't search hidden directories for sources - * AUTHORS, et.al.: Update copyright years. +2018-09-16 Paul Smith - * implicit.c (stemlen_compare): Fix qsort() compare bug that - caused implicit rules with equal stem lengths to be sorted - indeterminately. + * src/arscan.c (ar_member_touch): [SV 54533] Stop \0 in archive headers -2009-10-24 Paul Smith + Change output_write() to writebuf(), add readbuf() helper. + * src/misc.c (writebuf, readbuf): Create helper functions that will + reliably write a buffer to a file descriptor in the face of EINTR + causing short writes, and read from a file descriptor into a buffer + in the face of EINTR causing short reads. + * src/makeint.h: Declare these functions. + * src/output.c: Remove output_write() and replace with writebuf(). + (_outputs, out_of_memory): Call writebuf(), not output_write(). + * src/arscan.c (ar_scan): Call readbuf() instead of read(2). + (ar_member_touch): Remove duplicate header write, call writebuf() + instead of output_write(), and readbuf() instead of read(2). - * main.c (usage): Add --eval to the usage string. - (switches): Add the --eval switch. - (main): If --eval is given, add them to the simply-expanded variable - -*-eval-flags-*- (necessary to allow recursion to work properly). - (define_makeflags): Add -*-eval-flags-*- to MAKEFLAGS. +2018-09-15 Paul Smith - * NEWS: Describe the new --eval command line argument. - * doc/make.texi (Options Summary): Document --eval. + * doc/make.texi (Remaking Makefiles): [SV 52273] Note MAKE_RESTARTS - * dep.h: eval_buffer() returns void. - * read.c (eval_buffer): Ditto. - (eval): Ditto. + * src/main.c (main): Set jobserver permissions before re-execing + Fixes an issue seen in the Linux kernel build system, reported by + Masahiro Yamada . Fix suggested + on the bug-make mailing list by Mike Shal . + * tests/scripts/features/parallelism: Add a test to verify this. - * variable.h (define_variable_cname): New macro for constant - variable names. - * default.c (set_default_suffixes): Use it. - * main.c (main): Ditto. - (handle_non_switch_argument): Ditto. - (define_makeflags): Ditto. - * read.c (read_all_makefiles): Ditto. - * variable.c (define_automatic_variables): Ditto. - - * commands.c (dep_hash_cmp): Avoid casts. - (dep_hash_1): Ditto. - (dep_hash_2): Ditto. - -2009-10-22 Boris Kolpackov - - * read.c (read_all_makefiles): Mark the default makefile dependency - dontcare. - -2009-10-07 Boris Kolpackov - - * read.c (do_undefine): Free the expanded variable name. - - * commands.c (dep_hash_cmp, set_file_variables): Move the order-only - to normal upgrade logic from dep_hash_cmp to set_file_variables. - -2009-10-06 Boris Kolpackov + * doc/make.texi: [SV 48970] Clarify the value of $? - * dep.h (uniquize_deps): Remove. + * doc/make.text: [SV 54360] Weaken "obsolete" language in the manual. + There's no need to frighten users away from capabilities which are + perfectly reasonable and definitely not going away, by calling them + obsolete or discouraged in the manual. - * read.c (uniquize_deps): Merge into set_file_variables in - commands.c. - (dep_hash_1, dep_hash_2, dep_hash_cmp): Move to commands.c. + [SV 40657] Don't create pattern rules for suffix rules with deps. + * NEWS: Update with a backward-compatibility warning. + * src/rule.c (convert_to_pattern): If a suffix rule has dependencies, + do not create a pattern rule for it. According to the manual suffix + rules with prerequisites are treated as normal targets. + * tests/scrips/features/suffixrules: Create some regression tests for + .SUFFIXES and suffix rules. - * commands.c (set_file_variables): Avoid modifying the dep - chain to achieve uniqueness. Fixes savannah bug 25780. +2018-08-04 Paul Smith - * implicit.c (pattern_search): Instead of re-setting all automatic - variables for each rule we try, just update $*. + * NEWS: Update for the latest changes. -2009-10-06 Boris Kolpackov +2018-08-04 Paul Smith - * variable.h (undefine_variable_in_set): New function declaration. - (undefine_variable_global): New macro. + [SV 54233] Preserve higher command_state values on also_make targets. + If multiple pattern rules have the same pattern as also-make targets + and we attempt to run them at the same time, we might downgrade the + command state from 'running' to 'deps_running'; this will prevent + that also_make from being considered complete causing make to wait + forever for it to finish. - * variable.c (undefine_variable_in_set): New function implementation. + Ensure that set_command_state never downgrades the state of a target. - * read.c (vmodifiers): Add undefine_v modifier. - (parse_var_assignment): Parse undefine. - (do_undefine): Handle the undefine directive. - (eval): Call do_undefine if undefine_v is set. + * src/file.c (set_command_state): Don't downgrade command_state. + * src/filedef.h (struct file): Document the order prerequisite. + * test/scripts/features/patternrules: Test the behavior. - * main.c (.FEATURES): Add a keyword to indicate the new feature. +2018-08-04 Paul Smith - * doc/make.texi (Undefine Directive): Describe the new directive. + * src/job.c (reap_children): Fix inverted win/lose message. - * NEWS: Add a note about the new directive. + * tests/scripts/functions/wildcard: [SV 52018] Test dangling symlink. -2009-10-05 Boris Kolpackov +2018-08-04 Bernhard M. Wiedemann - * implicit.c (pattern_search): Initialize file variables only - if we need to parse a rule that requires the second expansion. + * src/read.c (parse_file_seq): [SV 52076] Sort wildcard results. -2009-10-03 Paul Smith +2018-08-04 Paul Smith - * make.h: Include even on systems where __GNUC__ is - defined. Not sure why it was done the other way. - Requested by David Boyce . + * tests/scripts/features/archives: [SV 54395] Test long archive names. -2009-09-30 Boris Kolpackov +2018-08-04 Ben Hutchings - * dep.h (dep): Add the DONTCARE bitfield. + * src/arscan.c (ar_scan): [SV 54395] Allow long names in archives. + Commit bc9d72beb0cb "Resolve issues discovered by static code + analysis." added range checks on archive member name length. However, + on non-AIX systems it also checked BSD-style long names against the + short name limits and and checked the *offset* for GNU-style long + names against the short name limits. This caused valid long names to + be rejected. - * filedef.h (file):Add the NO_DIAG bitfield. + * Record the size of the GNU name map and validate offsets against it + * Ensure that the last entry in the name map is null-terminated + * Apply a maximum length of INT_MAX for element sizes - * read.c (eval_makefile): Set the DONTCARE flag in struct dep, - not struct file (a file can be a dependency of many targets, - some don't care, some do). + Reported-by: Philipp Wolski - * remake.c (update_goal_chain): Propagate DONTCARE from struct - dep to struct file before updating the goal and restore it - afterwards. - (update_file): Don't prune the dependency graph if this target - has failed but the diagnostics hasn't been issued. - (complain): Scan the file's dependency graph to find the file - that caused the failure. - (update_file_1): Use NO_DIAG instead of DONTCARE to decide - whether to print diagnostics. +2018-08-04 Paul Smith - Fixes Savannah bugs #15110, #25493, #12686, and #17740. + * lib/glob.c (glob_in_dir): [SV 53465] Allow symlinks to directories. + Fix from Rich Felker on the musl mailing list. + * tests/scripts/functions/wildcard: Create a regression test for this. -2009-09-28 Paul Smith + * configure.ac: Add --disable-posix-spawn option + * maintMakefile: Add a test for the option + * src/job.c: Change HAVE_* preprocessor checks to USE_POSIX_SPAWN - * doc/make.texi (Pattern Intro): Move the match algorithm - discussion into the "Pattern Match" node. - (Pattern Match): Expand on the pattern rule matching algorithm. + * src/job.c (child_execute_job): Clean up posix_spawn invocation -2009-09-28 Andreas Buening +2018-08-04 Aron Barath - * job.c (construct_command_argv_internal) [OS2]: Don't eat too - much of the command line on a single pass. + * job.c (child_execute_job): Prefer posix_spawn() over fork()/exec() -2009-09-28 Boris Kolpackov +2018-08-04 Paul Smith - * varible.c (create_pattern_var): Insert variables into the - PATTERN_VARS list in the shortest patterns first order. + Clean up errors for invalid commands and add regression tests. + * src/function.c (func_shell_base): Use error() instead of recreating + the error output. + * src/job.c (exec_command): Show more standard error messages. + * src/load.c (unload_file): Fix whitespace in the error message. + * tests/scripts/features/errors: Add tests for starting non- + existent commands and new error message formats. + * tests/scripts/features/output-sync: New error message formats. + * tests/scripts/functions/shell: Ditto. - * implicit.c (tryrule): Add STEMLEN and ORDER members. These are - used to sort the rules. - (stemlen_compare): Compare two tryrule elements. - (pattern_search): Sort the rules so that they are in the shortest - stem first order. +2018-08-04 Paul Smith - * main.c (.FEATURES): Add a keyword to indicate the new behavior. + Queue failed fork() (etc.) to be handled like any other failed job. + If we failed to fork() we were essentially exiting make immediately + without respect to ignore flags, etc. On one hand that makes sense + because if you can't fork you're in real trouble, but it doesn't + work so well on systems where we don't fork at all. Instead, treat + a fork error like any other error by delaying the handling until + the next call to reap_children(). Any child with a PID of -1 is + considered to have died before starting so check these first without + waiting for them. - * doc/make.texi (Pattern-specific Variable Values): Describe the - new pattern-specific variables application order. - (Introduction to Pattern Rules): Describe the new pattern rules - search order. + * src/commands.c (fatal_error_signal): Don't kill children that + never started. + * src/function.c (func_shell_base): Handle cleanup properly if the + child doesn't start. + * src/job.c (reap_children): Check for children that died before + starting and handle them without waiting for the PID. + (start_job_command): Free memory when the child doesn't start. + (start_waiting_job): Don't manage children who never started. + (child_execute_job): If the fork fails return PID -1. + * src/vmsjobs.c: Check for children that never started. + * tests/run_make_tests.pl: Parse config.status to get all options. - * NEWS: Add a note about the new behavior. +2018-08-02 Aron Barath -2009-09-27 Paul Smith + * configure.ac: Check for posix_spawnattr_setsigmask - * doc/make.texi (Double-Colon): Mention that pattern rules with - double-colons have a different meaning. Savannah bug #27497. + * configure.ac: Check for spawn.h and posix_spawn() -2009-09-27 Juan Manuel Guerrero + * src/makeint.h: Use pid_t to store PIDs, of int. + * src/commands.c (getpid): Ditto. + * src/job.h (*): Ditto. + * src/job.c (*): Ditto. + * src/main.c (main): Ditto. + * src/remote-cstms.c (start_remote_job): Ditto. + * src/remote-stub.c (start_remote_job): Ditto. - * configh.dos.template: Remove unconditional definition of - SYS_SIGLIST_DECLARED. - Include because ports of GCC 4.3.0 and later no - longer include it, so macros like __DJGPP_MINOR__ are no longer - defined automatically. +2018-08-02 spagoveanu@gmail.com (tiny change) - * Makefile.DOS.template (INCLUDES): Use $(prefix) and the - corresponding variables to define LIBDIR, INCLUDEDIR and LOCALEDIR - instead of using the hardcoded ones. - (SUBDIRS): doc subdir added. - (INFO_DEPS, DVIS): Values changed to 'make.info' and 'make.dvi'. - (TEXI2HTML, TEXI2HTML_FLAGS): Removed. Use makeinfo --html to - create html formated docs. texi2html may not be ported to DOS. - (make.info, make.dvi, make.ps, make.html): Make targets depend on - 'make.texi'. - (.texi.info, .texi, .texi.dvi): Now invoked recursively. Change - -I switch to look in ./ instead of ./doc. - (html): Target depend on html-recursive instead of make_1.html. - (make_1.html): Removed. - (mostlyclean-aminfo): Use $(srcdir)/doc instead of ./ as prefix. - (all-recursive): Allow for more than one subdir in the build - process. - (mostlyclean-recursive, clean-recursive, distclean-recursive) - (maintainer-clean-recursive, check-recursive): Enter in doc/ too. - (tags-recursive): Allow for more than one subdir in the build - process. - (info-recursive, dvi-recursive, ps-recursive, html-recursive): New - targets. Enter into doc/ to produce the targets. - (all-am): $(INFO_DEPS) replaced by info. - -2009-09-26 Paul Smith - - * read.c (record_files): Use free_ns() to free struct nameseq. - (eval): Ditto. - - * rule.c (freerule): Use free_dep_chain(). - - * read.c (record_files): Free FILENAMES chain for implicit rules. - (eval): Static pattern targets go into the string cache. - - * function.c (string_glob): Free NAME in the nameseq chain. - -2009-09-25 Boris Kolpackov - - * implicit.c (pattern_search): Terminate early if we haven't - found any rules to try (performance improvement). - -2009-09-25 Boris Kolpackov - - * implicit.c (pattern_search): Merge three parallel arrays, - TRYRULES, MATCHES, and CHECKED_LASTSLASH, into one array - of struct TRYRULE. In the old version the latter two arrays - had insufficient length. - -2009-09-24 Paul Smith - - * implicit.c (pattern_search): Add back support for order-only - prerequisites for secondary expansion implicit rules, that were - accidentally dropped. If we find a "|", enable order-only mode - and set IGNORE_MTIME on all deps that are seen afterward. - (pattern_search): Fix memory leaks: for intermediate files where - we've already set the file variable and pattern variable sets, be - sure to either save or free them as appropriate. - -2009-09-23 Paul Smith - - Rework the way secondary expansion is stored, for efficiency. - This changes secondary expansion so that ONLY WHEN we know we have - a possibility of needing secondary expansion, do we defer the - secondary expansion. This means more parsing the deps but we use - a lot less memory (due to the strcache). Also, this fixes - Savannah bug #18622. - - * read.c (eval): Don't parse the dep string here anymore. - (record_files): Take the dep argument as an unparsed string. If - secondary expansion is enabled AND the prereq string has a '$' in - it, then set NEED_2ND_EXPANSION and keep the entire string. - Otherwise, parse the dep string here to construct the dep list - with the names in the strcache. - - * misc.c (copy_dep_chain): For NEED_2ND_EXPANSION, we need to - duplicate the name string (others are in the strcache). - - * implicit.c: Remove struct idep and free_idep_chain(): unused. - (struct patdeps): New structure to store prereq information. - (pattern_search): Use the NEED_2ND_EXPANSION flag to determine - which prerequisites need expansion, and expand only those. - - * file.c (split_prereqs): Break parse_prereqs() into two parts: this - and enter_prereqs(). split_prereqs() takes a fully-expanded string - and splits it into a DEP list, handling order-only prereqs. - (enter_prereqs): This function enters a list of DEPs into the file - database. If there's a stem defined, expand any pattern chars. - (expand_deps): Only try to expand DEPs which have NEED_2ND_EXPANSION - set. Use the above functions. - (snap_deps): Only perform second expansion on prereqs that need it, - as defined by the NEED_2ND_EXPANSION flag. - (print_prereqs): New function to print the prereqs - (print_file): Call print_prereqs() rather than print inline. - - * hash.h (STRING_COMPARE): Take advantage of strcache() by - comparing pointers. - (STRING_N_COMPARE): Ditto. - (ISTRING_COMPARE): Ditto. - - * dep.h (PARSE_FILE_SEQ): New macro to reduce casts. - (parse_file_seq): Return void* - * read.c (parse_file_seq): Return void*. - (eval): Invoke macroized version of parse_file_seq() - * default.c (set_default_suffixes): Ditto. - * file.c (split_prereqs): Ditto. - * function.c (string_glob): Ditto. - * main.c (main): Ditto. - * rule.c (install_pattern_rule): Ditto. - - * filedef.h: Add split_prereqs(), enter_prereqs(), etc. - -2009-09-16 Paul Smith - - * misc.c (alloc_dep, free_dep): Now that we have xcalloc(), - convert to macros. - * dep.h: Create alloc_dep() / free_dep() macros. - - * implicit.c (pattern_search): Take advantage of the new - parse_file_seq() to add the directory prefix to each prereq. - - * dep.h: Remove multi_glob() and enhance parse_file_seq() to do it - all. Avoid reversing chains. Support adding prefixes. - * read.c (parse_file_seq): Rewrite to support globbing. Allow for - cached/non-cached results. - (eval): Remove multi_glob() & invoke new parse_file_seq(). - * rule.c (install_pattern_rule): Ditto. - * main.c (main): Ditto. - * implicit.c (pattern_search): Ditto. - * function.c (string_glob): Ditto. - * file.c (parse_prereqs): Ditto. - * default.c (set_default_suffixes): Ditto. - - * variable.c (parse_variable_definition): Don't run off the end of - the string if it ends in whitespace (found with valgrind). - - * commands.c (set_file_variables): Keep space for all targets in - $? if -B is given (found with valgrind). - -2009-09-15 Paul Smith - - * misc.c (concat): Make concat() variadic so it takes >3 arguments. - (xcalloc): Add new function. - * make.h: New declarations. - - * ar.c (ar_glob_match): New calling method for concat(). - * main.c (main): Ditto. - (decode_env_switches): Ditto. - * read.c (eval_makefile): Ditto. - (tilde_expand): Ditto. - (parse_file_seq): Ditto. - * variable.c (target_environment): Ditto. - (sync_Path_environment): Ditto. - - * ar.c (ar_glob_match): Use xcalloc(). - * dir.c (file_impossible): Ditto. - * file.c (enter_file): Ditto. - * job.c (new_job): Ditto. - * read.c (parse_file_seq): Ditto. - * vmsfunctions.c (opendir): Ditto. - -2009-09-14 Rafi Einstein (tiny patch) - - * w32/subproc/sub_proc.c (process_begin): Check *ep non-NULL - inside the loop that looks up environment for PATH. - -2009-08-31 Eli Zaretskii + * src/dir.c: Preserve glob d_type field + When using GNU make on a system with glibc glob a pattern ending in + a slash is also matching regular files, but only in subdirectories: - * function.c (windows32_openpipe): Update envp after calling - sync_Path_environment. + $ mkdir -p dir/subdir + $ cd dir + $ touch file1 subdir/file2 + $ echo 'test:; @echo $(wildcard */ */*/)' | make -f - + subdir/ subdir/file2 + $ echo 'test: */ */*/; @echo "$?" != */ */*/' | make -f - + subdir/ subdir/file2 != subdir/ */*/ + + It happens because in the gl->gl_readdir callback supplied to glob(), + dirent->d_type is set to DT_UNKNOWN, and the glob() implementation + in glibc assumes that such a directory entry *cannot* possibly be a + regular file. + + Pass the actual d_type down to glob(); this is the right thing to do + even if glibc is fixed, because it saves an extra stat() syscall for + each dirent. + +2018-08-02 Paul Smith -2009-08-02 Paul Smith + * src/read.c(unescape_char): Use C comments not C++ comments. + * src/posixos.c(set_blocking): Ditto. + * src/w32/subproc/sub_proc.c(process_init): Ditto - * remake.c (notice_finished_file): Ensure file->cmds is not null - before looping through them. Fixes Savannah bug #21824. + Enhance the Basic.mk environment to work with Gnulib + * maintMakefile: Omit generated headers from Basic.mk prerequisites. + * Basic.mk.template: Rework commands to use with $(call ...) macros. + * mk/Amiga.mk: Ditto. + * mk/VMS.mk: Ditto. + * mk/Windows32.mk: Ditto, plus P2W to convert POSIX to Windows paths. + * mk/msdosdjgpp.mk: Ditto. - * doc/make.texi (Wildcard Examples): Clarify when objects is - wildcard-expanded. Fixes Savannah bug #24509. Patch by Martin Dorey. - (Include): Clarify the behavior of -include. - Fixes Savannah bug #18963. +2018-07-02 Paul Smith -2009-08-01 Paul Smith + Resolve most of the Windows Visual Studio warnings. + * Convert integer types to size_t where necessary. + * Align other integral types to avoid casts and type warnings. - * doc/make.texi (Catalogue of Rules): Clarify where -c, -F, - etc. come on the command line. Fixes Savannah bug #27093. +2018-07-02 Paul Smith - * expand.c (expand_argument): If the argument is large enough use - xmalloc() instead of alloca(). Fixes Savannah bug #27143. + Update regression tests for Windows. + * tests/scripts/features/jobserver: Windows doesn't use pipes + * tests/scripts/functions/shell: Don't test kill -2 on Windows + * tests/scripts/misc/bs-nl: Windows doesn't handle single quotes + * tests/scripts/misc/general3: Ditto. + + * maintMakefile: Preserve comments during compilation + + * function.c(abspath): Use memcpy() to avoid GCC 8.1 warnings + +2018-07-02 Paul Smith + + Convert GNU make to use the gnulib portability library + Move content from glob/* and config/* into standard GNU directory + locations lib/* and m4/*. - * variable.c (do_variable_definition): Avoid using alloca() to - hold values, which can be large. Fixes Savannah bug #23960. + Install the gnulib bootstrap script and its configuration file, and + create a bootstrap.bat file for Windows. Update the README.git file + with new requirements and instructions for building from Git. + + At this point we only install the alloca, getloadavg, and FDL modules + from gnulib. We keep our old glob/fnmatch implementation since the + gnulib versions require significant amounts of infrastructure which + doesn't exist on Windows yet. Further work is required here. - * job.c (new_job): Use memmove() instead of strcpy() since both - pointers are in the same memory block. Fixes Savannah bug #27148. - Patch by Petr Machata. + Due to a problem with gnulib's version of getloadavg, we need to bump + the minimum required version of automake to 1.16.1 unfortunately. -2009-07-29 Ralf Wildenhues + * README.git: Update instructions + * NEWS: Move developer news to a separate section + * configure.ac: Update for use with gnulib modules - * job.c (construct_command_argv_internal): Add "ulimit" and - "unset" to the sh_cmds for Unixy shells. + * bootstrap: Bootstrap from Git workspace (import from gnulib) + * bootstrap.conf: Bootstrap configuration for GNU make + * bootstrap.bat: Bootstrap from Git workspace for Windows + * gl/modules/make-glob: Support our local fnmatch/glob implementation -2009-07-29 Ralf Wildenhues + * config/acinclude.m4: Move to m4/ + * config/dospaths.m4: Move to m4/ + * glob/fnmatch.c: Move to lib/ + * glob/fnmatch.h.in: Move to lib/ + * glob/glob.c: Move to lib/ + * glob/glob.h.in: Move to lib/ + + * Makefile.am: Update for new directories + * build.template: Update for new directories + * build_w32.bat: Update for new directories + * builddos.bat: Update for new directories + * maintMakefile: Update for new directories + * makefile.com: Update for new directories + * mk/Amiga.mk: Update for new directories + * mk/Posix.mk.in: Update for new directories + * mk/VMS.mk: Update for new directories + * mk/Windows32.mk: Update for new directories + * mk/msdosdjgpp.mk: Update for new directories - * configure.in: Move side-effects outside AC_CACHE_VAL arguments - that set make_cv_sys_gnu_glob, so they are also correctly set - when the cache has been populated before. + * po/LINGUAS: One language per line (needed by gnulib) + + * INSTALL: Remove (obtained from gnulib) + * src/alloca.c: Remove (obtained from gnulib) + * src/getloadavg.c: Remove (obtained from gnulib) + * po/Makevars: Remove (created by bootstrap) + * config/*: Remove leftover files + * glob/*: Remove leftover files -2009-07-04 Eli Zaretskii +2018-07-01 Paul Smith - * function.c (func_realpath) [!HAVE_REALPATH]: Require the file to - exist, as realpath(3) does where it's supported. + * Makefile.ami, glob/Makefile.ami: Remove obsolete files -2006-07-04 Eli Zaretskii +2018-07-01 Ola Olsson - * function.c (IS_ABSOLUTE, ROOT_LEN): New macros. - (abspath): Support systems that define HAVE_DOS_PATHS (have - drive letters in their file names). Use IS_PATHSEP instead of a - literal '/' comparison. Fixes Savannah bug #26886. + * doc/make.texi: Updated language -2009-06-14 Paul Smith +2018-07-01 Paul Smith - * remake.c (update_file_1): Remember the original file we marked - as updating, so we can clear that flag again. If we find a target - via vpath, FILE might change. - (check_dep): Ditto. Fixes Savannah bug #13529. - Patch by Reid Madsen . + * all: Update Copyright statements for 2018 -2009-06-13 Paul Smith + * scripts/copyright-update: Maintainer's script for copyright mgmt - * doc/make.texi (MAKEFILES Variable): Be explicit that files - included by MAKEFILES cannot give default goals. - * read.c (eval): If set_default is not set, pass the no-default-goal - value when we read included makefiles. Fixes Savannah bug #13401. +2018-02-10 Paul Smith - * ar.c (ar_name): Ensure that targets with empty parens aren't - considered archive member references: archive members must have a - non-empty "member" string. Fixes Savannah bug #18435. + * build_w32.bat: Support Visual Studio 17. - * function.c (string_glob): Rely on multi_glob() to determine - whether files exist or not. Remove call to file_exists_p() which - is not always correct. Fixes Savannah bug #21231. - * read.c (multi_glob): Add a new argument EXISTS_ONLY; if true - then only files that really exist will be returned. - * dep.h: Add new argument to multi_glob(). - * rule.c (install_pattern_rule): Ditto. - * read.c (eval): Ditto. - * main.c (main): Ditto. - * implicit.c (pattern_search): Ditto. - * file.c (parse_prereqs): Ditto. - * default.c (set_default_suffixes): Ditto. +2017-11-19 Paul Smith -2009-06-09 Paul Smith + * configure.ac: Support GLIBC glob interface version 2 - * commands.c (set_file_variables): If always_make_flag is set, - always add the prereq to $?. Fixes Savannah bug #17825. +2017-11-19 Paul Smith - * remake.c (update_file_1): When rebuilding deps of FILE, also try - to rebuild the deps of all the also_make targets for that file. - Fixes Savannah bug #19108. + Rework directory structure to use GNU-recommended "src" directory. + Move the source code (other than glob) into the "src" subdirectory. + Update all scripting and recommendations to support this change. - * implicit.c (pattern_search): Undo test for is_target, added by - BorisK on 21 Sep 2004. This goes against step 5c in the "Implicit - Rule Search Algorithm". Fixes Savannah bug #17752. + * *.c, *.h, w32/*: Move to src/ + * configure.ac, Makefile.am, maintMakefile: Locate new source files. + * Basic.mk.template, mk/*: Update for new source file locations. + * NEWS, README.DOS.template: Update for new locations. + * build.template, build_w32.bat, builddos.bat: Ditto. + * po/POTFILES.in: Ditto + * tests/run_make_tests.pl, tests/scripts/features/load*: Ditto. + * make.1: Move to doc. + * mk/VMS.mk: Add support for building on VMS (hopefully). + * makefile.vms, prepare_w32.bat: Remove. + * SCOPTIONS: Update to define HAVE_CONFIG_H - * main.c (clean_jobserver): Clear the jobserver_fds options and - set job_slots to the default when we clean up. - (define_makeflags): Return the new MAKEFLAGS value. - (main): Reset MAKEFLAGS in the environment when we re-exec. - Fixes Savannah bug #18124. +2017-11-18 Paul Smith -2009-06-08 Paul Smith + * job.c: Add "command" as a known shell built-in. + This is not a POSIX shell built-in but it's common in UNIX shells. + Reported by Nick Bowler . - * read.c (eval): Collapse continuations post-semicolon on target- - specific variables. Fixes Savannah bug #17521. + * tests/scripts/features/output-sync: Revert bad change in 0c5a9f9b92a -2009-06-07 Paul Smith +2017-11-18 Paul Smith - * job.c (reap_children): For older systems without waitpid() (are - there any of these left?) run wait(2) inside EINTRLOOP to handle - EINTR errors. Fixes Savannah bug #16401. + Remove unsupported build facilities. + Over time the non-standard build and install systems (nmake files, + smake files, Visual Studio project files, etc.) have atrophied and + maintaining them is not worth the effort, for such a simple utility + as make. Remove all the non-standard build tool support and unify + OS-specific build rules under a basic set of (GNU make) makefiles. - * (various): Debug message cleanup. Fixes Savannah bug #16469. + Preserve the existing bootstrapping scripts (for POSIX, Windows, + and MS-DOS). Also the existing VMS build scripts are left unchanged: + I don't have enough experience with VMS to venture into this area. + Perhaps one of the VMS maintainers might like to determine whether + conversion would be appropriate. - * main.c: Fix bsd_signal() typedef. Fixes Savannah bug #16473. + Rather than create libraries for w32 and glob (non-POSIX), simply + link the object files directly to remove the complexity. - * file.c (snap_deps): Set SNAPPED_DEPS at the start of snapping, - not the end, to catch second expansion $(eval ...) defining new - target/prereq relationships during snap_deps. - Fixes Savannah bug #24622. + * NEWS: Update with user-facing notes. + * Makefile.am: Clean up to use the latest automake best practices. + Build Windows code directly from the root makefile to avoid recursion. + * README.Amiga, README.DOS.template, README.W32.template: Updated. + * INSTALL: Point readers at the README.git file. + * maintMakefile: Remove obsolete files. Create Basic.mk file. + * Basic.mk.template, mk/*.mk: Create basic GNU make-based makefiles. + * build_w32.bat: Copy Basic.mk to Makefile + * configure.ac: We no longer need AM_PROG_AR. + * dosbuild.bat: Rename to builddos.bat. Incorporate configure.bat. + * Makefile.DOS.template: Remove. + * NMakefile.template, w32/subproc/NMakefile: Remove. + * SMakefile.template, glob/SMakefile, glob/SCOPTIONS, make.lnk: Remove. + * configure.bat, glob/configure.bat: Remove. + * w32/Makefile.am: Remove. + * make_msvc_net2003.sln, make_msvc_net2003.vcproj: Remove. - * read.c (record_files): The second-expansion "f->updating" hack - was not completely correct: if assumed that the target with - commands always had prerequisites; if one didn't then the ordering - was messed up. Fixed for now to use f->updating to decide whether - to preserve the last element in the deps list... but this whole - area of constructing and reversing the deps list is too confusing - and needs to be reworked. Fixes Savannah bug #21198. +2017-11-11 Paul Smith -2009-06-06 Paul Smith + * Makefile.am: Add jhelp.pl to remote test setup. - * hash.c (hash_insert): Remove useless test for NULL. - Fixes Savannah bug #21823. +2017-11-11 Paolo Bonzini - * make.h: Move SET_STACK_SIZE determination to make.h. - * main.c (main): New global variable, STACK_LIMIT, holds the - original stack limit when make was started. - * job.c (start_job_command): Reset the stack limit, if we changed it. - Fixes Savannah bug #22010. + Do not use STOP_SET for singleton compares. + Compare against '$' directly rather than using MAP_VARIABLE. + This saves ~10% for find_map_function, which is the top hotspot in + QEMU's no-op build. The build is sped up overall by about 1.5% + more (from 11.1s to 10.95s). - * remake.c (check_dep): Only set the target's state to not-started - if it's not already running. Found this while testing -j10 builds - of glibc: various targets were being rebuilt multiple times. - Fix from Knut St. Osmundsen; fixes a problem reported in Savannah - bug #15919. + * read.c (find_map_function): Do not compare against singleton sets. - * read.c (multi_glob): Don't pass GLOB_NOCHECK to glob(3); instead - handle the GLOB_NOMATCH error. This is to work around Sourceware.org - Bugzilla bug 10246. +2017-11-11 Paolo Bonzini -2009-06-04 Paul Smith + Speedup parsing of functions. + Use the stopchar map to quickly jump over everything that is + not an open/close brace, an open/close parenthesis or a comma. - * read.c (eval): Skip initial whitespace (ffeed, vtab, etc.) + This saves 1% on QEMU's noop build (from 11.23s to 11.1s). - * maintMakefile: Modify access of config and gnulib Savannah - modules to use GIT instead of CVS. + * function.c (find_next_argument, handle_function): Check + with STOP_SET before comparing against individual characters. + * main.c (initialize_stopchar_map): Initialize MAP_VARSEP + mappings in stopchar_map. + * makeint.h (MAP_VARSEP): New. - * main.c (main): Initialize the LENGTH field in SHELL_VAR. - Fixes Savannah bug #24655. +2017-11-11 Paolo Bonzini - * read.c (eval_buffer): Don't dereference reading_file if it's NULL; - this can happen during some invocations of $(eval ...) for example. - Fixes Savannah bug #24588. Patch by Lars Jessen + Remove MAP_PERCENT as strchr is faster. + * read.c (find_percent_cached): Use strchr instead of STOP_SET + to find % or nul. + * makeint.h (MAP_PERCENT): Remove. + * main.c (initialize_stopchar_map): Remove. -2009-06-02 Paul Smith +2017-11-11 Paolo Bonzini - * configure.in: Check for fileno() - * read.c (eval_makefile): If fileno() is available, set CLOSE_ON_EXEC - for the makefile file so invocations of $(shell ...) don't inherit it. - Fixes Savannah bug #24277. + Use Jenkins hash. + This is about twice as fast as the current hash, and removes the + need for double hashing (improving locality of reference). The + hash function is based on Bob Jenkins' design, slightly adapted + wherever Make needs to hash NUL-terminated strings. The old hash + function is kept for case-insensitive hashing. -2009-06-01 Paul Smith + This saves 8.5% on QEMU's no-op build (from 12.87s to 11.78s). - * main.c (main): The previous fix for .DEFAULT_GOAL had issues; - expansion was handled incorrectly. Rework the default goal - handling to save the variable only. Remove default_goal_file and - default_goal_name. - * read.c (eval): Check default_goal_var, not default_goal_name. - * read.c (record_target_var): Don't check default_goal_file here. + * configure.ac: Check endianness. + * hash.c (rol32, jhash_mix, jhash_final, JHASH_INITVAL, + sum_get_unaligned_32, jhash): New. + * hash.h (STRING_HASH_1, STRING_N_HASH_1): Use jhash. + (STRING_HASH_2, STRING_N_HASH_2): Return a dummy value. + (STRING_N_COMPARE, return_STRING_N_COMPARE): Prefer memcmp to strncmp. -2009-05-31 Paul Smith +2017-11-11 Paolo Bonzini - * main.c (main): Expand the .DEFAULT_GOAL variable before using - it, and if the multi_glob() returns nothing (say it expanded to - nothing but spaces) then don't crash. Fixes Savannah bug #25697. + Use strchr for simple case of find_char_unquote. + In most cases, find_char_unquote has a single stopchar. In that + case we can look for it using strchr's optimized implementation. - * doc/make.texi (Quick Reference): Add $(if ..), $(or ..), and - $(and ..) to the reference. Fixes Savannah bug #25694. + This saves 3.5% on QEMU's noop build (from 11.78s to 11.37s). - * make.1: Be clear that some recipes will be executed even with -n. - * doc/make.texi: Ditto. Fixes Savannah bug #25460. + * read.c (find_char_unquote): Rename to find_map_unquote. Replace + with an implementation optimized for the case where the stopchar + is a singleton. Adjust all callers. - * doc/make.texi (Override Directive): Make more clear how - overrides and appends interact. - Elucidates part of Savannah bug #26207. +2017-11-11 Paolo Bonzini - * read.c (record_target_var): Don't reset the origin on - target-specific variables; try_variable_definition() will handle - this correctly. Fixes Savannah bug #26207. + Use strchr/memmove in collapse_continuations. + collapse_continuations is already using strchr to speed up the + common case of no backslash-newline sequence, but on modern + processors it is faster to scan the string twice with + strchr+memmove (or strlen+memmove) than to move bytes manually. - * maintMakefile (do-po-update): Copy PO files into $(top_srcdir). - Fixes Savannah bug #25712. + Saves about 1.5% on QEMU's no-op build (from 11.37s to 11.23s). - * implicit.c (pattern_search): Keep a pointer to the beginning of - the filename and save that instead of the constructed pointer. - Fixes Savannah bug #26593. - Patch by Mark Seaborn + * misc.c (collapse_continuations): Rewrite the scanning of LINE. -2009-05-30 Paul Smith +2017-10-31 Paul Smith - * doc/make.texi (Multi-Line): Add a description of the new abilities - of define/endef. Rename "Sequences" to "Multi-Line" and fix some - "command sequence" vs. "recipe" syntax. - * read.c (do_define): Modify to allow assignment tokens (=, :=, etc.) - after a define, to create variables with those flavors. + * main.c (main): [SV 48274] Allow -j in makefile MAKEFLAGS variable. + * tests/jhelp.pl: New file to allow testing parallelism without sleep. + * tests/scripts/features/parallelism: Test this. + * tests/scripts/features/jobserver: Update tests. + * tests/scripts/features/output-sync: Remove useless rm command. -2009-05-25 Paul Smith +2017-10-30 Paul Smith - Reworked the parser for variable assignments to allow multiple - modifiers, and in any order. Also allows variable and - prerequisites to be modifier names ('export', 'private', etc.) + * job.c (child_error): Modify error message string. + Ensure Emacs compile-mode's next-error doesn't match target failure + messages. Syntax errors in makefiles are still matched. - * NEWS: Add notes about user-visible changes. + * function.c (func_if): Check the first character of condition. + Reported by Rob W - * read.c (struct vmodifiers): Remember what modifiers were seen. - (parse_var_assignment): New function to parse variable assignments. - (eval): Call the new function. Handle variable assignments earlier. +2017-10-30 Paul Eggert - * variable.c (parse_variable_definition): Only parse; don't create var. - (assign_variable_definition): Call parse, then create the var. + glob: Do not assume glibc glob internals. + It has been proposed that glibc glob start using gl_lstat, + which the API allows it to do. GNU 'make' should not get in + the way of this. See: + https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html -2009-05-24 Paul Smith + * dir.c (local_lstat): New function, like local_stat. + (dir_setup_glob): Use it to initialize gl_lstat too, as the API + requires. - * doc/make.texi: Fix the ISBN for the GNU make manual. Incorrect - value noticed by Hans Stol . +2017-10-30 Paul Smith -2009-03-14 Eli Zaretskii + Compute load from number of running processes. + * job.c (load_too_high): If /proc/loadavg is available, compare the + maximum load against the number of processes currently running. If + we can't parse /proc/loadavg, use the previous algorithm. - * w32/pathstuff.c (convert_Path_to_windows32): Fix last change. - Fixes Savannah bug #25412. + Concept and initial patch from Sven C. Dack - * w32/subproc/sub_proc.c : Update Copyright years. Add - prototype for xmalloc. - (find_file): Accept 3 arguments PATH_VAR, FULL_FNAME, and FULL_LEN - instead of an LPOFSTRUCT pointer. Use xmalloc instead of malloc. - Loop over an array of extensions, instead of duplicating the same - code inline. Use SearchPath followed by CreateFile, instead of - the obsolete OpenFile. Fixes Savannah bug #17277. - (process_begin): Find $(PATH) in `envp', and pass a pointer to it - to `find_file'. Fixes Savannah bug #25662. +2017-09-30 Eli Zaretskii -2009-03-07 Eli Zaretskii + Fix checking existence of directories on MS-Windows + * remake.c (name_mtime) [WINDOWS32]: Emulate Posix behavior of + 'stat' with the likes of "foo/" and "foo/.". - * function.c (func_shell): Don't close pipedes[1] if it is -1. - Fixes Savannah bug #20495. +2017-07-09 Paul Smith -2009-02-28 Ralf Wildenhues + Update copyright statements for 2017. - * doc/make.texi (Instead of Execution): Document interaction of - -t with phony targets. + Remove uses of unnecessary "register" keyword. -2009-02-23 Ramon Garcia + * variable.c (create_pattern_var): [SV 51266] Create with xcalloc(). + Reported by Chris Metcalf - Introduce a new keyword "private" which applies to target-specific - variables and prevents their values from being inherited. + [SV 51400] Only unblock fatal signals after child invocation + * job.c (unblock_sigs): Only unblock fatal signals not all signals. + (unblock_all_sigs): Unblock all signals not just fatal signals. + (child_execute_job): Call unblock_all_sigs() in child process. + * job.h: Remove unused function definitions. + * remote-cstms.c (start_remote_job): Call unblock_all_sigs() in + child process. + Reported by Koen Van Hoof - * variable.h (struct variable): Add private_var flag to each variable. - Add a flag to specify which list entry switches to the parent target. - * variable.c (define_variable_in_set): Initialize private_var flag. - (lookup_variable): Skip private variables in parent contexts. - (initialize_file_variables): Set next_is_parent appropriately. - (print_variable): Show the private_var flag. - * read.c (eval): Recognize the private keyword. - (record_target_var): Set private_var. - * doc/make.texi (Suppressing Inheritance): Add documentation. +2017-07-01 Paul Smith -2008-10-26 Paul Smith + * function.c (shell_completed): [SV 51014] Add signal to .SHELLSTATUS + * tests/scripts/functions/shell: Verify that .SHELLSTATUS contains + a non-0 value when the shell exits due to a signal. - * configure.in: Check for strndup(). - * misc.c (xstrndup): Rename savestring to xstrndup. Use strndup - if it's available. - * make.h: Rename savestring to xstrndup. - * commands.c (chop_commands): Ditto. - * function.c (func_foreach): Ditto. - * read.c (eval, record_files): Ditto. - * variable.c (define_variable_in_set): Ditto. +2017-06-07 Eli Zaretskii -2008-09-30 Eli Zaretskii + Avoid crashes when SHELL=abcde is specified on the command line + * variable.c (do_variable_definition): If $SHELL was not found, + process "SHELL=foo" as any other variable definition. This avoids + segfaults when SHELL=foo is specified on the Make command line. + Reported by Orgad Shaneh . - * build_w32.bat (GCCBuild): Use "-gdwarf-2 -g3" instead of - "-gstabs+ -ggdb3". +2017-06-04 Paul Smith - * w32/subproc/build.bat (GCCBuild): Likewise. + [SV 51159] Use a non-blocking read with pselect to avoid hangs. + * posixos.c (set_blocking): Set blocking on a file descriptor. + (jobserver_setup): Set non-blocking on the jobserver read side. + (jobserver_parse_auth): Ditto. + (jobserver_acquire_all): Set blocking to avoid a busy-wait loop. + (jobserver_acquire): If the non-blocking read() returns without + taking a token then try again. -2008-09-30 David Russo (tiny change) + [SV 50823] Support filenames containing '$' in MAKEFILE_LIST + * variable.h (enum variable_flavor: Add a new flavor for appended + values that shouldn't be expanded. + * variable.c (do_variable_definition): If given this new flavor, + do not expand the value before appending it. + * read.c (eval_makefile): Use this new flavor for MAKEFILE_LIST + * tests/scripts/variables/MFILE_LIST: Test filenames containing '$'. - * job.c (construct_command_argv_internal): Avoid extra backslash - in batch-mode Unixy shells. Under DB_JOBS, display the contents - of the batch file. + * tests/test_driver.pl: Useful error if given an invalid test name. -2008-05-31 Eli Zaretskii + * NEWS: Do not insert a space during '+=' if the value is empty. + * doc/make.texi (Appending): Document this behavior. + * variable.c (do_variable_definition): Only add a space if the variable + value is not empty. + * tests/scripts/variables/flavors: Test this behavior. - * README.W32.template: Remove obsolete text about non-support for - -jN without Unixy shell. Remove obsolete text about not supplying - Visual Studio project files (we do supply them). Modify text to - prefer GCC builds to MSC builds. +2017-06-04 Enrique Olaizola (tiny change) -2008-04-02 Ralf Wildenhues + * read.c (read_all_makefiles): [SV 50909] Add MAKEFILES to strcache - * doc/make.texi (Empty Targets): Fix typo. +2017-06-04 Paul Smith -2008-03-27 Paul Smith + * po/LINGUAS: Add support for traditional Chinese (zh_TW) - Fix Savannah bug #22379: - * ar.c (ar_glob_match): Zero the allocated structure. + Rename output_tmpfile() to a misc function get_tmpfile() + * output.c: Remove output_tmpfile() and umask handling. + * output.h: Ditto. + * misc.c: Add get_tmpfile() and umask handling. + * makeint.h: Ditto. + * function.c: Rename output_tmpfile() to get_tmpfile(). + * main.c: Ditto. + * vmsjobs.c: Ditto. + + [SV 13651] Handle out-of-memory conditions slightly more gracefully. + * makeint.h: Change OUT_OF_MEM() macro to out_of_memory() function. + * output.h, job.h: Move FD_* macros from job.h to output.h. + * output.c (output_write): Write a buffer to an FD directly. + (out_of_memory): Use output_write() to avoid allocating more + memory while writing the error, and call exit() instead of die(). + This does mean we can't translate the error string, though. + * misc.c (xmalloc, xcalloc, xrealloc, xstrdup, xstrndup): Call new + out_of_memory() rather than OUT_OF_MEM(). * read.c (parse_file_seq): Ditto. -2008-03-08 Brian Dessent - - * maintMakefile: Update Translation Project location. + Clean up close-on-exec, particularly with jobserver pipes. + * configure.ac: Check sys/file.h and assume fileno() always exists. + * output.h: Move output-specific content from job.h to output.h. + * os.h (fd_inherit, fd_noinherit): New functions manage FD inheritance. + * posixos.c (fd_inherit, fd_noinherit): Implement for POSIX systems. + (jobserver_setup): Force jobserver FDs to not be inherited by default. + (jobserver_pre_child): Enable inheritance in recursive invocations. + (jobserver_post_child): Disable inheritance after recursive invocations. + * w32/w32os.c (fd_inherit, fd_noinherit): Implement for W32 systems. + * job.h (CLOSE_ON_EXEC): Remove macro in deference to new fd_noinherit. + * function.c (func_shell_base): Convert CLOSE_ON_EXEC to fd_noinherit. + * job.c (child_execute_job): Ditto. + * output.c (setup_tmpfile): Ditto. + * read.c (eval_makefile): Ditto, plus remove HAVE_FILENO check. + * w32/include/sub_proc.h: Remove process_noinherit for fd_noinherit. + * w32/subproc/sub_proc.c: Ditto. + + [SV 50300] Use CFLAGS value of "-O1" in POSIX mode. + * read.c (record_files): Use "-O1" not "-O" for CFLAGS and FFLAGS. + * tests/scripts/targets/POSIX: Test for the new value. + + * configure.ac: [SV 50648] Detect Guile 2.2 packages. + + * doc/make.texi: [SV 50304] Add missing close parenthesis. + + Add test suite support to Windows + * main.c (main): Sanitize program name detection on Windows. + * makeint.h: 'program' is a const string on all platforms now. + * tests/run_make_tests.bat: Windows bat file to invoke tests + * tests/test_driver.pl: Obtain system-specific error messages. + (get_osname): Compute the $port_type here. Add more $osname checks + for different Windows Perl ports. + (_run_command): Rewrite the timeout capability to work properly + with Windows. Don't use Perl fork/exec; instead use system(1,...) + which allows a more reliable/proper kill operation. + Also, allow options to be given as a list instead of a string, to + allow more complex quoting of command-line arguments. + * tests/run_make_tests.pl (run_make_with_options): Allow options + to be provided as a list in addition to a simple string. + (set_more_defaults): Write sample makefiles and run make on them + instead of trying to run echo and invoking make with -f-, to avoid + relying on shell and echo to get basic configuration values. Also + create a $sh_name variable instead of hard-coding /bin/sh. + * tests/scripts/features/archives: Skip on Windows. + * tests/scripts/features/escape: Use list method for passing options. + * tests/scripts/features/include: Use system-specific error messages. + * tests/scripts/features/output-sync: "Command not found" errors + generate very different / odd output on Windows. This needs to be + addressed but for now disable these tests on Windows. + * tests/scripts/functions/abspath: Disable on Windows. + * tests/scripts/functions/file: Use system-specific error messages. + * tests/scripts/functions/shell: "Command not found" errors generate + very different / odd output on Windows. This needs to be addressed + but for now disable these tests on Windows. + * tests/scripts/misc/close_stdout: Disable on Windows. + * tests/scripts/options/dash-k: Use system-specific error messages. + * tests/scripts/options/dash-l: Disable on Windows. + * tests/scripts/options/eval: Use list method for passing options. + * tests/scripts/options/general: Skip some non-portable tests. + * tests/scripts/targets/ONESHELL: Skip some non-portable tests. + * tests/scripts/targets/POSIX: Skip some non-portable tests. + * tests/scripts/variables/MAKEFILES: Skip some non-portable tests. + * tests/scripts/variables/SHELL: Use a makefile not -f- for testing. + +2017-06-04 Enrique Olaizola + + * tests/run_make_tests.pl: [SV 50902] Find Perl modules + +2017-01-11 Eli Zaretskii + + [SV 50021] Avoid infloop on MS-Windows with short scripts + * job.c (reap_children) [WINDOWS32]: Avoid recursive call to + reap_children when the argument passed to + map_windows32_error_to_string is negative or too large. + +2016-12-28 Paul Smith + + * main.c (switches): Add -E as an alias for --eval. + * make.1: Document the -E and --eval options. + * doc/make.texi: Document the -E option. + * tests/scripts/options/eval: Test the -E option and MAKEFILES. + * NEWS: Add information about the new option. + + * main.c (switches): Add --no-silent to undo -s options. + * make.1: Document the new flag. + * doc/make.texi: Document the new flag. Remove suggestions that the + .SILENT special target is deprecated or should not be used. + * tests/scripts/options/dash-s: Test the -s and --no-silent options. + * NEWS: Add information about the new option. + +2016-12-26 Martin Dorey + + * job.c (child_execute_job): [SV 49938] Avoid spurious GCC warning. + + * main.c (main): [SV 49935] Fix uninitialized variable. + +2016-12-26 Paul Smith + + [SV 40236] Handle included file open failures properly. + * read.c (eval_makefile): Set deps->error if we discovered any + error reading makefiles, and set NONEXISTENT_MTIME so we know + it needs to be rebuilt. + * main.c (main): Clean up management of makefile_mtimes. + * tests/scripts/features/include: Add open failure testcases. + + Portability changes for the test suite. + * tests/test_driver.pl: Save error strings for later comparison. + * tests/run_make_tests.pl: Create portable commands for later use. + * tests/*: Use these new variables. + + [SV 20513] Un-escaped # are not comments in function invocations + * NEWS: Document the change, as a backward-incompatible change. + * main.c (main): Add 'nocomment' to the .FEATURES variable. + * read.c (remove_comments): Skip variable references during remove. + (find_char_unquote): Fix comments for new STOPMAP support. + * tests/scripts/features/escape: Test new escape syntax. + * tests/scripts/functions/guile: Ditto. + * tests/scripts/functions/shell: Ditto. + + * main.c (main): [SV 40234] Show correct error message. + +2016-12-26 Christoph Schulz + + * main.c (switches): [SV 48809] Accept obsolete jobserver flag. + +2016-12-26 Paul Smith + + * read.c (get_next_mword): [SV 49865] Make fallthrough explicit. + + [SV 49114] Remove support for the NO_FLOAT compile flag. + * makeint.h (max_load_average): Always a double. + * main.c (max_load_average, default_load_average): Always doubles. + (switches): -l option is a "floating" format. + (decode_switches, define_makeflags): Support "floating" format. + * remake.c (f_mtime): Show time skew as double. + * rule.c (print_rule_data_base): Show percentages as double. + * Makefile.ami, README.DOS.template, SMakefile.template: Remove + references to NO_FLOAT. + * SCOPTIONS, glob/SCOPTIONS: Remove NO_FLOAT settings. + + [SV 45477] [SV 49115] Parse DOS/Windows drivespecs correctly. + * read.c (parse_file_seq) [WINDOWS32]: Only consider a colon part of + a path if it's in a valid Windows drivespec. -2008-01-26 Eli Zaretskii +2016-12-25 Paul Smith - * variable.c (target_environment): Don't use shell_var if its - `value' field is NULL. + [SV 49116] Check potential null pointer dereference. + * w32/subproc/sub_proc.c (make_command_line): Simplify cygwin shell + check for correctness. -2007-12-22 Eli Zaretskii +2016-12-25 Jaak Ristioja - Suggested by Juan Manuel Guerrero : + * expand.c (variable_append): [SV 49113] Possible null ptr deref - * Makefile.DOS.template (info_TEXINFOS): Remove unused variable. - (TEXINFOS): Value changed to `doc/make.texi'. - (.SUFFIXES): Use .texi instead of .texinfo. - (make.info, make.dvi): Depend on doc/make.texi. - (.texi.info): New target, instead of ".texinfo.info". Change -I - switch to $(MAKEINFO) to look in doc/. Use --no-split. - (.texi): New target, instead of ".texinfo". Change -I switch to - $(MAKEINFO) to look in doc/. Use --no-split. - (.texi.dvi): New target, instead of ".texinfo.dvi". Change -I - switch to $(MAKEINFO) to look in doc/. - (install-info-am, uninstall-info): Don't look for "*.i[0-9]" and - "*.i[0-9][0-9]" (due to --no-split above). - (noinst_TEXINFOS, TEXI2HTML, TEXI2HTML_FLAGS): New variables. - (html, make_1.html): New targets. - (.PHONY): Add "html". - (.SUFFIXES): Add .html. + * w32/*/dirent.*: [SV 49111] Remove unused telldir() -2007-12-22 Juan Manuel Guerrero (tiny change) +2016-12-25 Paul Smith - * configh.dos.template [__DJGPP__]: Replace HAVE_SYS_SIGLIST with - HAVE_DECL_SYS_SIGLIST. + Add more GCC warnings to the maintainer build. + * arscan.c: [SV 49112] Correct TEST printf() formatting. + Recommended by Jaak Ristioja + * hash.c: Correct fprintf() formatting. + * maintMakefile: Add extra GCC warning flags. - * job.c (child_execute_job): Remove __MSDOS__ because MSDOS/DJGPP - build does not use child_execute_job. + * po/Makevars, makeint.h, debug.h: Add xgettext C format flags. - * variable.c (define_automatic_variables) [__MSDOS__]: Always - export the SHELL environment variable to the child. + * po/LINGUAS: Added Serbian translation. -2007-12-22 Eli Zaretskii + * README.template: Clarify some items in the README - * config.h.W32: Include sys/types.h. - [!_PID_T_] (pid_t): Define only if not already defined by sys/types.h. + * doc/make.texi: [SV 48951] Fix documentation typo. - * vpath.c (construct_vpath_list) [HAVE_DOS_PATHS]: Support VPATH - values that use `:' in drive letters, when PATH_SEPARATOR_CHAR is - also `:'. + * maintMakefile: Update default GPG ID for new key. -2007-11-04 Paul Smith +2016-12-14 Paul Smith - * doc/make.texi: Convert references to "commands", "command - lines", and "command script" to "recipe". - * NEWS: Ditto. - * commands.c, file.c, job.c, remake.c, read.c, variable.c, main.c: - Ditto. + Resolve issues discovered by static code analysis. + * maintMakefile: Add a rule to submit code for analysis. + * configure.ac: Check for availability of the umask() function. + * output.c (output_tmpfd, output_tmpfile): Use umask on temp files. + * makeint.h (PATH_VAR): Reserve an extra character for nul bytes. + * function.c (func_error): Initialize buffer to empty string. + * job.c (child_execute_job): Verify validity of fdin. + * main.c (main): Simplify code for makefile updating algorithm. + * arscan.c (ar_scan): Verify member name length before reading. + * read.c (readline): Cast pointer arithmetic to avoid warnings. + * remake.c (update_file): Remove unreachable code. + (name_mtime): Verify symlink name length. -2007-10-27 Bruno Haible +2016-11-12 Eli Zaretskii - * remake.c (f_mtime): Print time difference values between 100 and - ULONG_MAX in fixed-point notation rather than in exponention notation. + * NEWS: Mention the extended support for -jN on MS-Windows. -2007-10-12 Eli Zaretskii +2016-11-12 Marc Ullman - * variable.c (do_variable_definition): Allow $(SHELL) to expand to - a more complex value than a simple shell: if it's not a default - shell now then expand it and see if is a default shell then. + Support more than 63 jobs on MS-Windows + * job.c (start_waiting_job, load_too_high): + * w32/w32os.c (jobserver_setup, jobserver_acquire): Abstracted out + MAXIMUM_WAIT_OBJECTS. Call process_table_full instead. + * w32/include/sub_proc.h: Update and add prototypes. + * w32/subproc/sub_proc.c (GMAKE_MAXIMUM_WAIT_OBJECTS): New macro. + (process_wait_for_multiple_objects): Drop-in replacement for Windows + API WaitForMultipleOjects. + (process_wait_for_any_private): Replaced MAXIMUM_WAIT_OBJECTS with + GMAKE_MAXIMUM_WAIT_OBJECTS. + (process_table_full): Replacement for process_used_slots. + (process_used_slots): Removed, as no longer needed. + (process_table_usable_size): Returns maximum usable size of process + table. + (process_table_actual_size): Returns actual size of process table. + (process_register): Added assertion. + (process_easy): Abstracted out MAXIMUM_WAIT_OBJECTS. -2007-10-10 Eli Zaretskii +2016-10-09 Eli Zaretskii - * dir.c (find_directory) [WINDOWS32]: Remove trailing slashes from - pathnames, with const strings. - * build_w32.bat [WINDOWS32]: If no config.h.W32 exists, create one - from the template (used for building from CVS, not a dist). + Only include strings.h in MinGW builds + * main.c: + * job.c: Include strings.h only if HAVE_STRINGS_H is defined. -2007-10-10 Paul Smith + * config.h.W32.template (HAVE_STRINGS_H): Define only for MinGW, + as MSVC doesn't have this header. - * make.h: Add a prototype for w32_kill() (change suggested by - Yongwei Wu ). +2016-10-06 Eli Zaretskii -2007-09-21 Eli Zaretskii + Update the Guile version tested with the MS-Windows build. - * w32/pathstuff.c (convert_Path_to_windows32): Handle quoted - directories in Path. + Avoid compiler warnings with MinGW runtime 3.22.2 + * main.c: + * job.c: Include strings.h, to get the prototypes of strcasecmp + and strncasecmp with latest MinGW runtime versions. + * config.h.W32.template (HAVE_STRINGS_H): Define. -2007-09-12 Paul Smith +2016-06-24 Paul Smith - * doc/make.texi: Applied wording cleanups from Savannah patch #6195. - Provided by Diego Biurrun - (Complex Makefile): Remove .PHONY setting for tar: patch #6196. - Provided by Diego Biurrun + * README.W32.template: Update the build documentation. + * build_w32.bat: Fix issues with Visual Studio builds. Fix an error + that always created Debug builds. Support 32bit and 64bit builds. -2007-09-11 Paul Smith + * Update to pre-release version 4.2.90. - * doc/make.texi (Special Variables): Moved this into the "How to - Use Variables" chapter. Added a table entry for .RECIPEPREFIX. - (MAKEFILE_LIST) No longer a section; this was added into the - "Special Variables" section. - (Rule Introduction): Reference .RECIPEPREFIX. - (Simple Makefile): Ditto. - (Rule Syntax): Ditto. - (Command Syntax): Ditto. - (Error Messages): Ditto. +2016-06-10 Paul Smith -2007-09-10 Paul Smith + GNU Make release 4.2.1. - * commands.c (print_commands): Don't print an extra line in the - command scripts. Prefix the command scripts with cmd_prefix, not \t. +2016-06-06 Paul Smith - * read.c (construct_include_path): Add the full string to the cache; we - were chopping the last char. + * maintMakefile: TP recommends rsync for retrieving PO files. - * NEWS: Announce the .RECIPEPREFIX special variable. - * variable.c (lookup_special_var): Rename from handle_special_var(). - (lookup_variable): Call the new name. - (set_special_var): New function: handle setting of special variables. - When setting .RECIPEPREFIX, reset the cmd_prefix global variable. - (do_variable_definition): Call it. - * make.h (RECIPEPREFIX_DEFAULT): Define the default command prefix char. - (RECIPEPREFIX_NAME): Define the command prefix special variable name. - * main.c (main): Create the .RECIPEPREFIX special variable. - * read.c (eval): Remove the cmd_prefix characters from the command - scripts here, so they're not stored in the commands array at all, - rather than waiting and stripping them out during command construction. - * job.c (construct_command_argv_internal): Don't skip cmd_prefix here. +2016-05-31 Jeremy Devenport (tiny change) -2007-08-15 Paul Smith + * main.c (main): [SV 48009] Reset stack limit for make re-exec. - * doc/make.texi (GNU Free Documentation License): The fdl.texi - file has had the section info removed, so add some to make.texi - before we include it. +2016-05-31 Paul Smith -2007-08-15 Icarus Sparry + [SV 47995] Ensure forced double-colon rules work with -j. + The fix for SV 44742 had a side-effect that some double-colon targets + were skipped. This happens because the "considered" facility assumed + that all targets would be visited on each walk through the dependency + graph: we used a bit for considered and toggled it on each pass; if + we didn't walk the entire graph on every pass the bit would get out + of sync. The new behavior after SV 44742 might return early without + walking the entire graph. To fix this I changed the considered value + to an integer which is monotonically increasing: it is then never + possible to incorrectly determine that a previous pass through the + graph already considered the current target. - * remake.c (check_dep): Reset the target state for intermediate - files. They might have been considered before but not updated - then (order-only for example) but they will be this time. - Fixes Savannah bug #'s 3330 and 15919. + * filedef.h (struct file): make CONSIDERED an unsigned int. + * main.c (main): No longer need to reset CONSIDERED. + * remake.c (update_goal_chain): increment CONSIDERED rather than + inverting it between 0<->1. + (update_file_1): Reset CONSIDERED to 0 so it's re-considered. + (check_dep): Ditto. + * tests/scripts/features/double_colon: Add a regression test. -2007-07-21 Eli Zaretskii +2016-05-31 Paul Smith - Fix Savannah bug #20549: - * function.c (func_shell): Call construct_command_argv with zero - value of FLAGS. - * job.c (construct_command_argv_internal): New argument FLAGS; all - callers changed. - [WINDOWS32]: If FLAGS has the COMMANDS_RECURSE bit set, ignore - just_print_flag. - * job.h (construct_command_argv_internal): Update prototype. + * DELETE_ON_ERROR: [SV 48061] Use "exit 1" for portability. + Reported by Joel Fredrikson -2007-07-13 Paul Smith + * w32/pathstuff.c: [SV 47996] Use ISBLANK() not isblank(). - * file.c (expand_deps): Use variable_buffer as the start of the - buffer, not the original pointer (in case it was reallocated). - Fix suggested by Rafi Einstein . - Fixes Savannah bug #20452. +2016-05-28 Eli Zaretskii -2007-07-04 Paul Smith + Fix printing time stamps on MS-Windows + * dir.c (print_dir_data_base) [WINDOWS32]: Use %I64u format for + printing unsigned 64-bit data types, as %ull is not universally + supported. - * (ALL FILES): Update to GPLv3. - * (ALL FILES): Update copyright for 2007. +2016-05-27 Luke Allardyce (tiny change) - * main.c (print_version): Move the host type info to the second line. + [SV 48037] Fix MinGW build with Posix configury tools + * w32/Makefile.am (libw32_a_CPPFLAGS): Add -I$(srcdir)/glob. -2007-06-29 Thiemo Seufer +2016-05-22 Paul Smith - * maintMakefile: Update Translation Project location. + GNU Make release 4.2. -2007-06-13 Paul Smith +2016-05-21 Joe Crayne (tiny change) - * doc/make.texi (Reading Makefiles): "Expansion of deferred" -> - "Expansion of a deferred" - Fixes Savannah bug #20018. + [SV 44742] Fix double-colon rules plus parallel builds. + * remake.c (update_file): Don't update double-colon target status + if we're still building targets. + (ftime_t): Don't propagate timestamps for double-colon targets that + we've not examined yet. + * tests/scripts/features/double_colon: Add parallel build tests. - * expand.c (variable_expand_for_file): Preserve the value of - reading_file rather than setting it to 0 at the end. - Fixes Savannah bug #20033. +2016-05-21 Paul Smith -2007-05-11 Paul Smith + * read.c (eval): [SV 47960] Skip record waiting files when ignoring. + * tests/scripts/features/conditionals: Test this scenario. - * job.c (new_job): Add debug info to specify where make found the - command script it is running to build a target. - Fixes Savannah bug #18617. + Separate the GNU make load ABI from internal types. + Create an internal type "floc" and convert all users to that type. + * gnumake.h (gmk_floc): Remove the offset field from this type. + * loadapi.c (gmk_eval): Convert gmk_floc to internal floc. - * default.c (default_suffixes,default_suffix_rules,default_variables): - Add support for Objective C. Fixes Savannah bug #16389. - Based on a patch provided by Peter O'Gorman . +2016-05-21 Paul Eggert - * function.c (func_lastword): Initialize p. + Fixes for enhanced GCC warnings. + Move function prototypes into header files and out of .c files. + Use void argument lists for functions that accept no args. + Remove unused macros. Make private functions static. Align + types with printf format characters. - * doc/make.texi (Eval Function, Implicit Variables, Special Targets): - Doc fixes noticed by Bob . Patch from - Dave Korn +2016-05-21 Paul Smith -2007-05-08 Paul Smith + Fix compile issues with Windows and VMS. + * main.c (initialize_stopchar_map): isblank() is not part of C89. + Install bits for space and tab directly. + * makeint.h: Don't define vfork; autoconf handles this for us. + * vmsjobs.c: Rename NEXT_TOKEN to V_NEXT_TOKEN to avoid conflicts. + * dir.c (print_dir_data_base): Visual Studio C doesn't have int64_t. + * w32/subproc/sub_proc.c (process_begin): Missing arg to memset(). + * build_w32.bat: Don't use obsolete Visual Studio flags. - Fix Savannah bug #19656: - - * configure.in: Check for strcasecmp(), strcmpi(), and stricmp(). - - * make.h: Change all case-insensitive string compares to use - strcasecmp() (from POSIX). If we don't have that but do have one - of the others, define strcasecmp to be one of those instead. If - we don't have any, declare a prototype for our own version. - - * misc.c (strcasecmp): Use this if we can't find any native - case-insensitive string comparison function. - * vmsfunctions.c: Remove strcmpi(); we'll use misc.c:strcasecmp(). - * main.c (find_and_set_default_shell): Use strcasecmp() instead of - strcmpi(). - * job.c (_is_unixy_shell, construct_command_argv_internal): Use - strcasecmp() instead of stricmp(). - * hash.h (ISTRING_COMPARE, return_ISTRING_COMPARE): Use strcasecmp() - instead of strcmpi(). - * acinclude.m4: Remove the strcasecmp() check from here. - -2007-03-21 Paul Smith - - * configure.in: Don't turn on case-insensitive file system support - if --disable-... is given. Fixes Savannah bug #19348. - -2007-03-19 Paul Smith - - * ALL: Use the strcache for all file name strings, or other - strings which we will never free. The goal is to save memory by - avoiding duplicate copies of strings. However, at the moment this - doesn't save much memory in most situations: due to secondary - expansion we actually save prerequisite lists twice (once before - the secondary expansion, and then again after it's been parsed - into individual file names in the dep list). We will resolve this - in a future change, by doing the parsing up-front for targets - where secondary expansion is not set. - - Moving things into the strcache also allows us to use const - pointers in many more places. - -2007-01-03 Paul Smith - - * make.h (ENULLLOOP): Reset errno after each failed invocation of - the function, not just the first. Fixes Savannah bug #18680. - -2006-11-18 Paul Smith - - * strcache.c (strcache_add_len): Don't allocate a new buffer - unless the string is not already nil-terminated. Technically this - is a violation of the standard, since we may be passed an array - that is not long enough to test one past. However, in make this - is never true since we only use nil-terminated strings or - sub-strings thereof. - - * read.c (eval, do_define): Use cmd_prefix instead of '\t'. - - * main.c: New global cmd_prefix, defaults to '\t'. - * job.c (construct_command_argv_internal): Use cmd_prefix instead - of '\t'. - - * dir.c: Constified. - (dir_contents_file_exists_p): Check for an error return from - readdir(), just in case. - - * commands.c: Constified. - * default.c: Constified. - * expand.c: Constified. - * function.c: Partial constification. - * variable.c: Partial constification. - * vmsify.c: Constification. Hard to test this but I hope I didn't - screw it up! - * vpath.c: Partial constification. - * w32/pathstuff.c: Partial constification. - -2006-11-16 Eli Zaretskii - - * main.c (main) [HAVE_DOS_PATHS]: Treat DOS style argv[0] with - backslashes and drive letters as absolute. - -2006-10-22 Paul Smith - - * main.c (struct command_switch): Use const and void*. - -2006-10-21 Paul Smith - - * ar.c: Constified. - * arscan.c: Constified. - -2006-09-30 Paul Smith - - * doc/make.texi (MAKEFILE_LIST Variable): Modify reference to - point to lastword since the example was updated. - Fixes Savannah bug #16304. - (Secondary Expansion): Correct example description. - Fixes Savannah bug #16468. - (Makefile Contents): Clarify that comments cannot appear within - variable references or function calls. - Fixes Savannah bug #16577. - (Special Targets): Clarify how .NOTPARALLEL works in recursion. - Fixes Savannah bug #17701. - Reported by Ralf Wildenhues : - (Prerequisite Types): Added an example of using order-only - prerequisites. Fixes Savannah bug #17880. - (Rule Syntax): "lise" -> "list" - (Multiple Rules): ... -> @dots{} - (Splitting Lines): ditto. - - * remake.c (update_file_1): Prereqs that don't exist should be - considered changed, for the purposes of $?. - Fixes Savannah bug #16051. - - * make.1: Remove extraneous "+". - Fixes Savannah bug #16652. - -2006-09-06 Paul D. Smith - - * configure.in: Include sys/types.h when checking for sys/wait.h. - -2006-08-18 Eli Zaretskii - - * configure.in (PATH_SEPARATOR_CHAR): Define to the value of - $PATH_SEPARATOR. - - * make.h (PATH_SEPARATOR_CHAR): Define only if still undefined. - Normally, it is defined in config.h. - - * config/dospaths.m4 : Define to yes on Cygwin as - well. - - * job.c (construct_command_argv_internal) [HAVE_DOS_PATHS]: Define - sh_chars_sh for Windows platforms that emulate Unix. - -2006-05-07 Paul D. Smith - - * README.OS2.template: Updates provided by Andreas Buening - . - -2006-04-30 Paul D. Smith - - * make.h: Include if HAVE_DIRECT_H. - * config.h.W32.template (HAVE_DIRECT_H): Set it if it's available. - -2006-04-26 Paul D. Smith - - * README.cvs: Add a reminder to notify the GNU translation robot. - - * doc/make.texi: Change @direcategory (requested by Karl Berry). - -2006-04-20 Paul D. Smith - - * maintMakefile (po-check): Use Perl instead of grep -E, for systems - that don't have extended grep. - (cvsclean): Use $(PERL) instead of perl. - -2006-04-09 Paul D. Smith - - * maintMakefile: Add some extra warning options (GCC 4.1 only?) - - * expand.c, implicit.c, main.c, read.c: Rename variables so that - inner-scope variables don't mask outer-scope variables. - - * ar.c, arscan.c, commands.c, default.c, dir.c, expand.c, file.c: - * function.c, getloadavg.c, implicit.c, job.c, main.c, misc.c, read.c: - * remake.c, remote-cstms.c, rule.c, strcache.c, variable.c: - * vmsfunctions.c, vmsify.c, vpath.c: Remove all casts of returned - values from memory allocation functions: they return void* and so - don't need to be cast. Also remove (char *) casts of arguments to - xrealloc(). - - * configure.in: Remove checks for memcpy/memmove/strchr. - - * make.h: Remove bcmp/bcopy/bzero/strchr/strrchr macros. - - * ar.c, arscan.c, commands.c, dir.c: Convert all bzero/bcopy/bcmp - calls to memset/memcpy/memmove/memcmp calls. - * expand.c, file.c, function.c, getloadavg.c, implicit.c: Ditto. - * job.c, main.c, misc.c, read.c, remake.c, rule.c: Ditto. - * variable.c, vpath.c: Ditto. - - * make.h (EXIT_FAILURE): Should be 1, not 0. - -2006-04-06 Paul D. Smith - - * configure.in: Removed AM_C_PROTOTYPES. Starting now on we - require an ISO C 1989 standard compiler and runtime library. - - * Makefile.am: Remove the ansi2knr feature. - - * make.h: Remove the PARAMS() macro definition and all uses of it. - - * amiga.h, ar.c, arscan.c: Remove all uses of the PARAMS() macro. - * commands.c, commands.h, config.h-vms.template: Ditto. - * dep.h, dir.c, expand.c, filedef.h, function.c: Ditto. - * implicit.c, job.c, job.h, main.c, read.c, remake.c: Ditto. - * rule.c, rule.h, variable.h, vmsdir.h, vmsjobs.c, vpath.c: Ditto. - - * NEWS: Update. - -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 - target. - * job.c (construct_command_argv_internal) [HAVE_DOS_PATHS]: - Declare and define sh_chars_sh[]. - -2006-03-23 Paul D. Smith - - * configure.in: Look for build.sh.in in $srcdir so it will be - built for remote configurations as well. - - * Makefile.am: Make sure to clean up build.sh 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 - function. - (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. - 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 - global_setlist. - 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 - reading_file. - * 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. + Allow compiling with an ISO C 1989/1990 compiler. + * posixos.c (jobserver_post_child): Use C89 for loop syntax. + * remake.c (update_goal_chain): Ditto. + * variable.c (parse_variable_definition): Ditto. -2006-02-10 Eli Zaretskii +2016-05-17 Eli Zaretskii + + [SV 47942] Avoid random crashes in subordinate programs on MS-Windows + * w32/subproc/sub_proc.c (process_begin): Zero out startInfo + before using it. Fixes crashes in Intel Fortran compiler invoked + by Make. + +2016-04-24 Eli Zaretskii + + Fix the MS-Windows MinGW build + * build_w32.bat (GccCompile): Use -std=gnu99, as some code uses + C99 features ('for' loop initial declarations). + + * dir.c (print_dir_data_base) [WINDOWS32]: Cast 'mtime' to + 'int64_t', and use %I64d to print it, to avoid compile-time + warning about printing a 'time_t' value, which could be either + a 32-bit or a 64 bit integral type. + +2016-04-23 Paul Smith + + * tests/scripts/features/output-sync: increase test timeout. + I'm getting random failures with a timeout of 10s; increase to 30s. + +2016-04-11 Paul Smith + + * NEWS: Update for pre-release + + * dep.h, makeint.h (show_goal_error): Move to makeint.h. + +2016-04-11 Paul Smith + + [SV 46433] Show recipe line offsets in line number messages. + While displaying line numbers, show the relevant line number inside + the recipe not just the first line of the entire recipe. + Sample changes suggested by Brian Vandenberg + + * gnumake.h (gmk_floc): Add an 'offset' to track the recipe offset. + * read.c (eval, eval_makefile, eval_buffer): Initialize 'offset'. + (record_files, install_pattern_rule): Ditto. + * job.c (new_job, job_next_command): Update 'offset' based on the + line of the recipe we're expanding or invoking. + (child_error): Add 'offset' when showing the line number. + * function.c (func_shell_base): Ditto. + * output.c (error, fatal): Ditto. + * NEWS: Mention the new ability. + * tests/scripts/features/errors: Check the line number on errors. + * tests/scripts/functions/warning: Check the line number on warnings. + * tests/scripts/features/output-sync, + tests/scripts/features/parallelism, tests/scripts/functions/shell, + tests/scripts/functions/error: Update line numbers. + +2016-04-09 Paul Smith + + * maintMakefile: Add a rule for storing preprocessor output. + + [SV 102] Don't show unnecessary include file errors. + Delay the generation of error messages for included files until we + are sure that we can't rebuild that included file. + * dep.h (struct dep): Don't reuse "changed"; make a separate field + to keep "flags". Get rid of dontcare and use the flag. + (struct goaldep): Create a new structure for goal prereqs + that tracks an errno value and the floc where the include happened. + Rework the structures to ensure they are supersets as expected. + In maintainer mode with GCC, use inline to get type checking. + * read.c (eval_makefile): Return a struct goaldep for the new + makefile. Ensure errno is set properly to denote a failure. + (read_all_makefiles): Switch to goaldep and check errno. + (eval): Don't show included file errors; instead remember them. + * remake.c (update_goal_chain): Set global variables to the current + goaldep we're building, and the entire chain. + (show_goal_error): Check if the current failure is a consequence + of building an included makefile and if so print an error. + (complain): Call show_goal_error() on rule failure. + * job.c (child_error): Call show_goal_error() on child error. + * main.c (main): Switch from struct dep to goaldep. + * misc.c (free_dep_chain): Not used; make into a macro. + * tests/scripts/features/include: Update and include new tests. + * tests/scripts/options/dash-B, tests/scripts/options/dash-W, + tests/scripts/options/print-directory, + tests/scripts/variables/MAKE_RESTARTS: Update known-good-output. + + * job.c (child_error): Add filename length to output length. + Reported by Dale Stimson + +2016-04-04 Paul Smith + + Preserve the real value of -jN in MAKEFLAGS using jobserver. + Previously if the jobserver was active, MAKEFLAGS would contain only + the -j option but not the number (not -j5 or whatever) so users + could not discover that value. Allow that value to be provided in + MAKEFLAGS without error but still give warnings if -jN is provided + on the command line if the jobserver is already activated. + + * NEWS: Discuss the new behavior. + * os.h, posixos.c, w32/w32os.c: Return success/failure from + jobserver_setup() and jobserver_parse_auth(). + * main.c (main): Separate the command line storage of job slots (now + in arg_job_slots) from the control storage (in job_slots). Make a + distinction between -jN flags read from MAKEFLAGS and those seen + on the command line: for the latter if the jobserver is enabled then + warn and disable it, as before. + * tests/scripts/features/jobserver: Add new testing. + +2016-04-04 Paul Smith + + * tests/run_make_tests.pl: Add file/lineno info to .run file. + + * maintMakefile: Fix logging of check-alt-config target. + + * job.c (child_execute_job): Fix $(shell...) under NO_OUTPUT_SYNC. + * main.c (decode_output_sync_flags): Use NONE for NO_OUTPUT_SYNC. + + * main.c (main): Restrict disabling debugging for MAKEFILES. + + * Makefile.am, w32/Makefile.am: Fix *os.c for Windows builds. + Original change provided by Luke Allardyce + + * make.texi: Confirm that CURDIR contains an absolute path. + + * docs/make.texi: [SV 47392] Add "Integrating make" chapter. + + Change --jobserver-fds to more generic --jobserver-auth. + * NEWS: Mention the change. + * main.c: Rename jobserver_fds variable to jobserver_auth and + --jobserver-fds option to --jobserver-auth. + * os.h, posixos.c, w32/w32os.c: Rename jobserver_parse_arg() and + jobserver_get_arg() to jobserver_parse_auth()/jobserver_get_auth(). + +2016-03-23 Paul Smith + + * tests/run_make_tests.pl: Preserve $make_command + * tests/scripts/options/dash-n: Use $make_command. This fixes + a spurious failure when running tests with valgrind enabled. + + * variable.c: Clean up some memory leaks. + + [SV 46995] Strip leading/trailing space from variable names + * makeint.h: Change MAP_SPACE to MAP_NEWLINE, and add MAP_PATHSEP + and MAP_SPACE which is now MAP_BLANK|MAP_NEWLINE. Create + NEW_TOKEN(), END_OF_TOKEN(), ISBLANK(), ISSPACE() macros. + * main.c (initialize_stopchar_map): Set MAP_NEWLINE only for + newline characters. + * Convert all uses of isblank() and isspace() to macros. + * Examine all uses of isblank() (doesn't accept newlines) and + change them wherever possible to ISSPACE() (does accept newlines). + * function.c (func_foreach): Strip leading/trailing space. + * variable.c (parse_variable_definition): Clean up. + * tests/scripts/functions/foreach: Test settings and errors. + * tests/scripts/functions/call: Rewrite to new-style. + * tests/scripts/misc/bs-nl: Add many more tests for newlines. + +2016-03-21 Paul Smith + + * function.c (func_file): Support reading from files. + * NEWS: Add information about reading files. + * make.texi (File Function): Describe reading files. + * tests/scripts/functions/file: Test new features for $(file ...) + +2016-03-20 Paul Smith + + * doc/make.texi (Setting Variables): Fix typo (add comma). + + * job.c (child_error): Combine file info with error message. + * tests/scripts/...: Update error message matches. + +2016-03-19 Paul Smith + + * variable.c: Align type of variable_changenum. + +2016-03-13 Paul Smith + + [SV 45728] Detect changes in .VARIABLES more accurately. + For performance, we only recompute .VARIABLES when (a) it's expanded + and (b) when its value will change from a previous expansion. To + determine (b) we were checking the number of entries in the hash + table which used to work until we started undefining entries: now if + you undefine and redefine the same number of entries in between + expanding .VARIABLES, it doesn't detect any change. Instead, keep + an increasing change number. + * variables.c: Add variable_changenum. + (define_variable_in_set, merge_variable_sets): Increment + variable_changenum if adding a new variable to the global set. + (undefine_variable_in_set): Increment variable_changenum if + undefining a variable from the global set. + (lookup_special_var): Test variable_changenum not the hash table. + * tests/scripts/variables/special: Test undefining variables. + + * main.c(main): Disable output sync without parallel builds. + + [SV 46581] Pre-define .LOADED to avoid warnings. + * main.c (main): Pre-define .LOADED as a default-level variable. + * load.c (load_file): Set the value rather than append it. Avoid + adding an extra initial whitespace. + * tests/scripts/features/load: Run with --warn-undefined-variables. + +2016-03-13 Paul Smith + + [SV 44555] Use vfork() instead of fork() where available. + Testing has shown that vfork() is actually significantly + more efficient on systems where it's supported, even for + copy-on-write implementations. If make is big enough, + duplicating the page tables is significant overhead. - * 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 . + * configure.ac: Check for fork/vfork. + * makeint.h: Include vfork.h and set up #define for it. + * os.h, posixos.c (get_bad_stdin): For children who can't use + the normal stdin file descriptor, get a broken one. + * job.c (start_job_command): Avoid so many ifdefs and simplify + the invocation of child_execute_job() + (child_execute_job): move the fork operation here so it can + return early for the parent process. Switch to use vfork(). + * function.c (func_shell_base): Use new child_execute_job() and + simplify ifdefs. + * job.h, main.c, remote-cstms.c, vmsjobs.c, w32os.c: Update + declarations and calls. + +2016-03-09 Paul Smith + + * job.c (exec_command): [SV 47365] Show error on exec failure. + +2016-03-08 Paul Smith + + [SV 46261] Use pselect() for jobserver where supported. + * Makefile.am, configure.ac: Check for pselect() and sys/select.h. + * main.c (main): Block SIGCHLD if we have pselect() support. + * posixos.c (jobserver_acquire): If we support pselect() then use + it to query the jobserver pipe, while also listening for SIGCHLD. + Also pselect() supports a timeout so avoid alarm() calls. + + Clean up some compiler warnings. + * commands.c, commands.h: Use unsigned char for flags. + * dir.c: Use time_t and size_t, and char for a boolean value. + * job.c: Use unsigned and char. + * read.c: Return a signed type since -1 is a valid return code. + + Extract jobserver implementation into OS-specific files. + * os.h, posixos.c, w32/w32os.c: New files implementing jobserver. + * job.c, job.h, main.c, makeint.h: Move content to new files. + * w32/include/sub_proc.h, w32/subproc/sub_proc.c: Ditto. + * Makefile.am: Build and package OS-specific files. + * build_w32.bat, make_msvc_net2003.vcproj, README.W32.template: + Update for new files, and clean up the build. + * POTFILES.in, maintMakefile, NMakefile.template: Ditto. + * w32/subproc/build.bat: Delete as unused. + + [SV 46261] Add more EINTRLOOP wrappers. + This cannot be a perfect solution because there are always other + possible places EINTR can happen, including external libraries + such as gettext, Guile etc. + +2016-02-29 Paul Smith + + * strcache.c (add_hugestring): [SV 46832] Support huge strings. + The strcache was limited to strings of length 65535 or less, + because the length is kept in an unsigned short. To support + huge strings add a new simple linked list, which we don't try + to hash. + + * strcache.c (add_string): [SV 47071] Handle huge initial string. + If the very first string added to the string cache is more than + half the maximum size, we failed when moving the only strcache + buffer to the full list. + + [SV 47151] Exit with 1 when checking recursive make -q + * job.h (struct child): New bit to mark recursive command lines. + * job.c (start_job_command): Set the recursive command line bit. + (reap_children): If the child is a recursive command and it exits + with 1 during question mode, don't print an error and exit with 1. + * tests/scripts/options/dash-q: Add a regression test. + + * main.c (define_makeflags): Add parens to avoid GCC warning. + +2016-02-29 Paul Smith + + * tests/scripts/features/archives: Handle deterministic archives. + Newer versions of binutils allow ar to be compiled to generate + "deterministic archives" by default: in this mode no timestamp + information is generated in the static archive, which utterly + breaks GNU make's archive updating capability. Debian and Ubuntu + have turned this feature on by default in their distributions + which causes the regression tests to fail. + + Update the regression tests to check for the availability of the + "U" option to ar which disables deterministic archives and allows + GNU make's archive support to work properly again. + +2016-02-28 Paul Smith + + Update Copyright statements for the new year. + + * doc/make.texi: [SV 47163] Fix typo in 'ifdef' documentation. + + * doc/make.texi: [SV 35455] Add more uses for Empty Recipes. + +2015-11-07 Gisle Vanem + + Fix diagnostics on MS-Windows when environment is too large + * w32/subproc/sub_proc.c (process_begin): Fix test of the error + cause when the environment block is too large. + +2015-10-27 Eli Zaretskii + + Update README.W32.template + * README.W32.template: Update for latest developments. Make it + clear we don't recommend using HAVE_CASE_INSENSITIVE_FS in + general. + + [SV 46304] Don't invoke C++ compiler on C sources on MS-Windows + * default.c (default_variables) [HAVE_CASE_INSENSITIVE_FS]: Make + COMPILE.C and LINK.C be synonyms for COMPILE.c and LINK.c, + respectively. + +2015-09-23 Eli Zaretskii -2006-02-09 Paul D. Smith + [SV 45838] When invoking w32 programs, don't use free'd memory. + * w32/subproc/sub_proc.c (process_begin): Freeing argv[0] makes + the other argv[i] pointers invalid, so need to allocate a new + array and copy argv[i] for i != 0 first, replacing argv[0] with + the batch file name, before we can free argv[0]. + +2015-07-13 Paul Smith + + * implicit.c (pattern_search): [SV 43677] Mark files secondary. + In order to fix SV 12267 we were marking the prerequisites of + implicit (pattern) targets that existed elsewhere in the makefile + as precious to keep them from being deleted as intermediate files. + However this also keeps them from being deleted on error. Instead + mark them as secondary. + * tests/scripts/targets/DELETE_ON_ERROR: Test DELETE_ON_ERROR. + +2015-07-12 Paul Smith + + [SV 28092] Preserve the exit status of the $(shell...) function. + Add a new variable .SHELLSTATUS which holds the exit status of the + last-invoked shell function or != assignment. + + * NEWS, doc/make.texi: Document the change. + * function.c (shell_completed, msdos_openpipe, func_shell_base): Add + shell_completed() to handle the completion of the shell, by setting + .SHELLSTATUS. Call it where needed. + * job.c (child_handler): Call shell_completed(). + * tests/scripts/functions/shell: Add tests for .SHELLSTATUS. - * 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 +2015-07-12 Paul Smith - * 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. + * tests/scripts/misc/fopen-fail: [SV 42390] Increase test timeout. + * Makefile.am (check-regression): Force ulimit -n for fopen-fail test. -2006-02-06 Paul D. Smith + * job.c: [SV 43936] Check sigaction for error return. - * 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. + [SV 45049] Check for '$' being the last character in a string. + * expand.c (variable_expand_string): Add a single '$' if '$' ends the + string. + * read.c (find_char_unquote, get_next_mword): Stop if '$' ends the + string. + * variable.c (parse_variable_definition): Ditto. - Updates from Markus Mauhart : + * read.c (unescape_char): [SV 45050] Handle final backslashes. + If the last thing in the string to be unescaped is a backslash, + stop without reading beyond the end of the string. - * 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. + * strcache.c: [SV 45275] Handle very long strings. + Our previous behavior for handling too-long strings involved + increasing the size of the default string cache buffer, but the + implementation was incomplete. Instead, create a one-off large + string cache entry and add it directly to the full cache list + without changing the default buffer size. -2006-02-05 Paul D. Smith +2015-07-12 Duncan Moore (tiny change) - * 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. + * job.c [RISCOS]: Remove logic that is no longer required. - * 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. +2015-07-12 Paul Smith - * doc/make.texi: Update the chapter on writing commands to reflect - the changes made in 3.81 for backslash/newline and SHELL handling. + * remake.c (update_file): [SV 44742] Keep double-colon rule status. + Fix suggested by Everett Boyer -2006-02-01 Paul D. Smith +2015-07-10 James Johnston (tiny change) - * dir.c (dir_contents_file_exists_p) [WINDOWS32]: Make sure - variable st is not used when it's not initialized. - Patch from Eli Zaretskii . + [SVN 45515] Check exit status of sub-make in subproc.bat + * subproc.bat: Exit when sub-make invocation fails. -2006-01-31 Paul D. Smith +2015-07-10 Eli Zaretskii - * 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 . + [SV 45515] Ignore Windows-specific build artifacts + * .gitignore: Ignore *.exe, *.dll.a, *.lib, *pdb, and a few more MSVC + specific artifacts. + Suggested by James Johnston - * main.c: Update the copyright year in the version output. - * prepare_w32.bat: Remove this file from the distribution. +2015-02-28 Eli Zaretskii -2006-01-21 Eli Zaretskii + [SV 44348] Fix handling of shell widlcards on MS-Windows. + * job.c (construct_command_argv_internal): If shell wildcard + characters are found inside a string quoted with "..", give up the + fast route and go through the shell. Fixes Savannah bug #44348. - * 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. +2015-01-27 John Malmberg - * w32/include/sub_proc.h: Add a prototype for process_used_slots. + Fix bs-nl handling, exit and Environment for VMS. + This fix required a complete rewrite of the command parser vmsjobs.c + child_execute_job. The old parser had too many incorrect assumptions + about DCL commands and could not be repaired to extended. - * w32/subproc/sub_proc.c: Change dimension of proc_array[] to - MAXIMUM_WAIT_OBJECTS. - (process_wait_for_any_private): Change dimension of handles[] - array to MAXIMUM_WAIT_OBJECTS. - (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. + The parser now more closely parses VMS commands and handles quoted + commands and redirection. Command File mode has been improved, but can + not fully support bs-nl syntax. - * 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 - fails. + VMS Unix shell simulation has been improved. -2006-01-14 Eli Zaretskii + * commands.c: vms_comma_separator is now a run-time setting. + * function.c: vms_comma_separator is now a run-time setting. + * function.c(func_basename_dir) now reports "[]" or "./" based on + VMS crtl runtime setting. + * job.c(start_job_command): VMS Handle empty commands propery. + * main.c: Add VMS environment variables for run-time settings. + * vms_legacy_behavior - Force older behavior. + * vms_comma_separator - Commas or spaces for separators. + * vms_unix_simulation - Enhanced Posix shell simulation features. + * Detect if VMS CRTL is set to report Unix paths instead of VMS. + * ':' and '>' are also MAP_DIRSEP on VMS. + * makeint.h: Add VMS run-time option variables. + * readme.vms: Update to current behavior. + * variable.c(define_variable_in_set): Fix VMS Environment variable + lookup. + * variable.c(define_automatic_variables): Remove some VMS specific + automatic variables and use the Unix ones instead. + * vms_export_symbol.c: Set max symbol size correctly. + * vmsjobs.c: child_execute_job() complete rewrite of VMS comand + parsing. + * vmsjobs.c(build_vms_cmd): VMS commmand building with shell simulation. - * main.c (main) [WINDOWS32]: Don't refuse to run with -jN, even if - the shell is not sh.exe. +2014-12-27 Christian Boos (tiny change) - * 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 - descriptor. - (construct_command_argv_internal): Use _fdopen instead of fopen to - open the batch file. + Fix $(shell) on hosts with 64-bit pid_t. + * function.c: Use pid_t for shell_function_pid. + * job.c: Likewise. -2006-01-04 Paul D. Smith +2014-10-20 Paul Smith + + * main.c (main): [SV 43434] Handle NULL returns from ttyname(). + +2014-10-20 Benedikt Morbach (tiny change) + + * tests/scripts/features/archives: [SV 43405] override AR variable. + +2014-10-20 John Malmberg + + Fix VMS implicit rules and UNIX paths. + This fixes VMS implicit rules and UNIX style pathname handling. + It also fixes some of the VMS style pathname handling, more work + there will be needed later. + TODO: There are other case insensitive platforms besides VMS. + We need to find out why there is extra VMS code for this. This + indicates either the extra VMS code is not needed, or the case + insensitive support may not be complete on the other case + insensitive platforms. + + * default.c: Add missing definitions to default_suffix_rules[] and + default_variables[]. + TODO: As it is important that VMS DCL mode definitions must always + be a superset of UNIX definitions, a better way of maintaining the + VMS DCL mode definitions should be devised. + * dir.c (downcase_inplace): Add a reentrant downcase() routine. + Add future support for VMS 8.2+ _USE_STD_STAT macro which will + disable a lot of VMS specific code from compiling. + (dir_file_exists_p): vmsify filename only if directory name has VMS + directory delimiters. + (file_exists_p): Handle both VMS and UNIX directories. + (file_impossible): Handle both VMS and Unix directories. Track + whether a VMS format path is needed for the return value. + * file.c (lookup_file): Check if vmsify is needed; handle UNIX paths. + * implicit.c (pattern_search): Enable UNIX paths. + * read.c (parse_file_seq): Enable UNIX paths. + * remake.c (f_mtime): Fix gpath_search call for VMS paths. + * rule.c (count_implicit_rule): Enable UNIX paths, Fix VMS paths. + * vpath.c (selective_vpath_search): Enable UNIX paths. + +2014-10-20 John Malmberg + + Update README.VMS and move news to the NEWS file + * NEWS: Merge in VMS history. + * README.VMS: Remove VMS history, document current behavior and + known issues. + +2014-10-20 John Malmberg + + [SV 41758]: Fix archive support for VMS. + Upated to match change to run_make_tests and some future fixes to + make on VMS. + + * arscan.c: Use ANSI compatible pragmas instead of VAX C extensions. + * tests/scripts/features/archives: Fix tests to use VMS rules and + answers when running on VMS and using DCL as a shell. + * tests/scripts/features/vpath3: Fix epected answer on test when + run on VMS. + * tests/scripts/vms/library: (New) Test the VMS library rules that + are not tested by existing tests. + +2014-10-20 John Malmberg + + [SV 42447]: VMS simulate exporting symbols + This also includes fixing the most of the exit handling code for VMS. + + Self tests: + Previously about 94 Tests in 36 categories fail. + Now about 45 tests in 22 categories fail. + + Because some tests do not properly clean up, the number of tests that + fail can vary by one or two test cases between consecutive runs. + + * Makefile.am: Add new VMS files. + * job.c: add prototype for vms_strsignal(). + * job.c: (child_error): Remove VMS specific code as no longer needed. + * job.c: (reap_children): The VMS specific code was setting the + status to 0 instead of setting it to the proper exit status. + * job.h: Add vms_launch_status to struct child. + * main.c: (main): Use environment variables for options to use MCR + * instead of a foreign command, and to always use command files for + subprocesses. + For VMS use (set_program_name) routine which is common to ports of + other GNU packages to VMS to set the program name used internally. + Use (vms_putenv_symbol) to set up symbols to be visible in child + programs, including recursive make launched by execve() + Start of Bash shell detection code for VMS. + * makefile.com: Need nested_include=none for building on VMS search + lists. Add vms_progname, vms_exit, and vms_export_symbol. + * makefile.vms: Need nested_include=none for building on VMS search + lists. Add vms_progname, vms_exit, vms_export_symbol. + * makeint.h: Make sure non-standard "VMS" macro is defined. Add + prototypes for new VMS routines. Remove VMS-specific failure codes. + * vmsjobs.c: Add VMS POSIX exit code constants. + (_is_unixy_shell): Detect Bash shell. + (vms_strsignal): simulate strsignal() on VMS. + (vmsHandleChildTerm): fix to properly report failed LIB$SPAWN() exit + status codes. Remove code that duplicated code in job.c. + (child_execute_job): Export environment symbols before spawning a + child and restore afterward unless option to use command files for + subprocesses is set. Improve handling of UNIX null commands ":". + * vms_exit.c: Provides vms_exit() to detect if an exit code is UNIX + or VMS, and converts the UNIX code into a VMS exit code. + * vms_export_symbol.c: Routines to create DCL symbols that work like + shell aliases or exported shell symbols and clean them up on exit. + * vms_export_symbol_test.com: Unit test for vms_export_symbol.c + * vms_progname.c: New file: VMS specific replace for progname.c that + is used in some GNU projects. + +2014-10-20 John Malmberg + + Set up for running tests on VMS. + * run_make_tests.pl: set $port_type to be 'VMS-DCL' when the test are + run from the VMS DCL Interpreter. When the tests are run from GNV + on VMS, the $port_type will be 'UNIX'. + * run_make_tests.com: VMS search list support. This is needed for + using a search list such as prj_root = lcl_root:,vms_root:,src_root: + for building and testing. + +2014-10-09 Paul Smith + + * configure.ac, NEWS, README.git: Set up for the next release. + +2014-10-05 Paul Smith + + GNU Make release 4.1. + +2014-10-02 Eli Zaretskii + + Fix Cygwin compilation error. + * job.c (construct_command_argv_internal) [HAVE_DOS_PATHS]: Fix + initializer for sh_chars_sh. + Reported by Denis Excoffier. + +2014-10-01 Gisle Vanem + + Fix last commit. + + * makeint.h (ftruncate): Define also for __WATCOMC__. + +2014-10-01 Eli Zaretskii + + Avoid compilation warnings. + * main.c (find_and_set_default_shell, main) [WINDOWS32]: Declare + variables 'const char *' to avoid compiler warnings. + * job.c (construct_command_argv_internal) [!NDEBUG]: Declare 'end' + and set it only if NDEBUG is not defined, to avoid compiler + warnings. + + Treat redirection of standard handles on Windows as it is done on Unix. + * job.c (start_job_command) [WINDOWS32]: Compute outfd and errfd + as on Posix platforms, and pass the results to process_easy. + * function.c (windows32_openpipe) [WINDOWS32]: Accept an + additional argument ERRFD and use it for redirecting the standard + error handle passed to the subprocess. + (func_shell_base) [WINDOWS32]: Pass the computed errfd to + windows32_openpipe. + +2014-09-30 Paul Smith + + Update Copyright statements for 2014. + + * tests/scripts/features/load: Avoid unused variable warnings. + + * loadapi.c (gmk_eval): Use C90 syntax. + +2014-09-30 Hartmut Becker + + * job.c: fix make action continuation lines. + * vmsjobs.c: fix writing DCL command files when trimming (white + spaces and $ signs) especially after a split (command continuation). + +2014-09-15 Bernhard Reutner-Fischer (tiny change) + + * configure.ac: Fix spacing in helptext of customs + +2014-09-15 Eli Zaretskii + + Support MAKE_TERMOUT and MAKE_TERMERR on MS-Windows. + * w32/compat/posixfcn.c (isatty, ttyname): New functions. + * config.h.W32.template (HAVE_TTYNAME): Define. Add a prototype + for ttyname. + +2014-09-15 Paul Smith + + * loadapi.c (gmk_eval): [SV 43221] Preserve var buff content for eval. + + * main.c, NEWS, doc/make.text: Rename MAKE_TTY* to MAKE_TERM* - * 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. +2014-09-14 Paul Smith - * make.1: Add a section on the exit codes for make. + * main.c (main): Set MAKE_TTYOUT and MAKE_TTYERR. + * configure.ac: Test for isatty() and ttyname() + * makeint.h: provide a substitute for ttyname() if it's not available. + * config.ami.template, config.h-vms.template, config.h.W32.template: + define/undefine HAVE_ISATTY/HAVE_TTYNAME macros. + * NEWS, doc/make.texi: Document these new variables. - * doc/make.texi: A number of minor updates to the documentation. +2014-09-07 Paul Smith -2006-01-03 Paul D. Smith + * tests/config-flags.pm.in, tests/scripts/features/archives: [SV 43046] + Use the "ar" program detected by configure when running the test suite. - * remake.c (update_file_1): Mark a prerequisite changed if it - doesn't exist. + * doc/make.texi: Clarify implicit rule lookup of phony targets + Reported by Frank Heckenbach - * 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. +2014-09-07 Hartmut Becker -2005-12-28 Paul D. Smith + Fix and enhance VMS library support. + * ar.c: fix VMS library search for members, which do not have + suffixes, aka filename extensions. + * arscan.c: fix time conversion and library callback routines. + * default.c: more suffixes and automatically create the VMS library + if it doesn't exists. - * config.h.W32.template [WINDOWS32]: Add in some pragmas to - disable warnings for MSC. - Patch by Rob Tulloh . + Enhance VMS exporting make environment variables. + * config.h-vms.template: add feature macro USE_DCL_COM_FILE to always + write a DCL command file, enabled by default. + * vmsjobs.c: with USE_DCL_COM_FILE enabled write make variables as DCL + symbol assignments into the command file. This enables printing + directory and make level info for recursive use of make. This also + enables forced DCL symbol substitution in the actions. -2005-12-17 Eli Zaretskii + Fix VMS automatic variable expansion + * function.c: add VMS code to func_notdir_suffix and func_basename_dir + to work on comma separated lists; this fixes the expansion of + $(^D), $(+D) and the F variants for VMS. - * doc/make.texi (Execution): Add a footnote about changes in - handling of backslash-newline sequences. Mention the differences - on MS-DOS and MS-Windows. + * main.c [VMS]: Say that parallel jobs (-j) are not supported on VMS - * 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. + Enhance/fix VMS ONESHELL implementation and command execution + * job.c, vmsjobs.c: fix some double quote and new line handling; + implement ONESHELL with writing multiple lines into one DCL command + procedure; in ONESHELL allow VMS/make internal redirection only on the + first line; fix the created DCL command procedure, which didn't abort + on errors; return correct exit status from the DCL command procedure; + preserve current procedure verification; make the generated command + procedure more robust. -2005-12-17 Eli Zaretskii + Enhance/fix VMS setting of program name, MAKE/MAKE_COMMAND variables + * default.c, main.c, makeint.h, vmsfunctions.c: prefix argv[0] with + "mcr " for MAKE/MAKE_COMMAND and set the program name to the image + filename (without the .exe;version) + * vmsfunctions.c: remove obsolete code + * vmsify: use xmalloc - * 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. + Enhance/fix VMS exit code handling. + * commands.c, function.c, hash.c, job.c, main.c, output.c: + use MAKE exit codes. + * makeint.h: encode make exit codes so that they are VMS compatible. + * job.c: check child exit code for VMS style exit codes. + * vmsjobs.c: save and return VMS style exit code. - * 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." + Enhance/fix VMS multi-line support. + * job.c: split the command line at a newline. + * default.c, vmsjobs.c: change ECHO variable to a pseudo builtin, + which ensures that the VMS/DCL ECHO ("write sys$output") is used + and is correctly quoted. + * vmsjobs.c: remove unused builtin 'rm'. -2005-12-14 Boris Kolpackov + * config_flags_pm.com, [RENAMED test_make.com] run_make_tests.com: + Moved into tests directory. - * 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. + Enhance/fix VMS build environment + * config.h-vms.template: make sure the CRTL version is known + * makefile.com: always compile/link the guile module, remove VAXCRTL + parameter, new LIST parameter + * makefile.vms: always compile/link the guile module, use more + complete dependencies + * prepare_vms.com: helper to create a VMS config file when building + from a snapshot of the repository -2005-12-12 Paul D. Smith +2014-09-07 Paul Smith - * make.1: Fix some display errors and document all existing options. - Patch by Mike Frysinger . + * configure.ac, maintMakefile, w32/Makefile.am: Fix autotools issues. + Reported by Paul Eggert -2005-12-11 Paul D. Smith +2014-08-30 Eli Zaretskii - * 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. + Change the order of "makefile" and "Makefile" to match the manual. -2005-12-09 Boris Kolpackov + Fix regression with "makefile" not being found on MS-Windows. + * read.c (read_all_makefiles) [WINDOWS32]: Recognize "makefile", + all-lowercase, as a makefile. Reported by Michael Waeber + . - * 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. +2014-07-16 Eli Zaretskii -2005-12-07 Boris Kolpackov + Fix compilation on MS-Windows. + * makeint.h [WINDOWS32]: Don't declare 'program' as 'const char *', + since it is modified in 'main'. - * 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. +2014-07-12 Eli Zaretskii -2005-11-17 Boris Kolpackov + [SV 42695] Fix compilation error on MS-Windows. + * main.c [WINDOWS32]: Don't declare 'program' as 'const char *', + since it is modified in 'main'. - * 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. +2014-07-12 Jonny Grant (tiny change) -2005-11-14 Boris Kolpackov + Fix defalt_makefiles[] for MS-Windows. + * read.c (read_all_makefiles) [WINDOWS32]: Remove the redundant + "makefile" and add "makefile.mak". - * read.c (construct_include_path): Set the .INCLUDE_DIRS special - variable. - * doc/make.texi (Special Variables): Document .INCLUDE_DIRS. - * NEWS: Add .INCLUDE_DIRS to the list of new special variables. +2014-07-07 Fredrik Fornwall (tiny change) -2005-10-26 Paul Smith + * arscan.c [ANDROID]: Android has no ar.h but supports archives. - * 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". +2014-07-07 Paul Smith -2005-10-24 Paul D. Smith + * read.c (eval): [SV 41677] Correct test for TAB vs. 8 spaces. - Make secondary expansion optional: its enabled by declaring the - special target .SECONDEXPANSION. +2014-07-07 Piotr Jaroszynski (tiny change) - * 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 - field. - * 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. + * output.c (pump_from_tmp): [SV 42378] Flush the output file regularly. -2005-10-16 Paul D. Smith +2014-07-07 John Malmberg - * 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. + Update the regression test harness to support VMS. + * config_flags_pm.com, test_make.com: set up and run the regression + test environment on VMS. + * tests/run_make_tests.pl [VMS]: Use an alternate rmdir() + implementation on VMS. + (run_make_with_options) [VMS]: Provide VMS-specific quoting and shell + invocations. + (set_more_defaults) [VMS]: Set default values when running on VMS. + * tests/test_driver.pl (vms_get_process_logicals) [VMS]: Retrieve the + proper values from %ENV on VMS. + (resetENV) [VMS]: Use it. + (toplevel) [VMS]: Fix a bug with opendir() on some logical_devices. + (compare_output) [VMS]: Convert VMS test output to a "standard" format. + (_run_command) [VMS]: Handle signals and exit codes the VMS way. + (remove_directory_tree_inner) [VMS]: Unlink all versions of the file. -2005-09-26 Paul D. Smith +2014-07-07 Paul Smith - * job.c (construct_command_argv_internal): If the line is empty - remember to free the temporary argv strings. - Fixes bug # 14527. + * various: Assume ISO C89-compliant free() implementation. -2005-09-16 Paul D. Smith + * maintMakefile, various: Improve constification of the codebase. - * job.c (start_job_command): The noerror flag is a boolean (single - bit); set it appropriately. - Reported by Mark Eichin + [SV 41983] Support omitting the text argument to $(file ...) + Reported by Tim Murphy + * function.c (func_file): Only write TEXT if it is not NULL. + * NEWS, doc/make.texi: Document the new feature + * tests/scripts/functions/file: Verify that the no-text version of + $(file ...) works and doesn't add a newline. -2005-08-29 Paul D. Smith +2014-05-13 Jacques Germishuys - * function.c (func_error): On Windows, output from $(info ...) - seems to come in the wrong order. Try to force it with fflush(). + NMakefile.template ($(OUTDIR)/posixfcn.obj): Fix a typo. -2005-08-10 Boris Kolpackov +2014-05-01 Paul Smith - * 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. + [SV 42249] Propagate correct rule status results. + * remake.c (update_file, update_file_1, check_dep): Return an enum + update_status value instead of an int, and keep the highest value we + find as we walk the graph so that the ultimate status is correct. + * tests/scripts/options/dash-q: Add a test for updating prerequisites. -2005-08-08 Paul D. Smith +2014-02-08 Paul 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. + * Rename MAP_PATHSEP to MAP_DIRSEP. -2005-08-07 Paul D. Smith + * configure.ac: Fixup for newer autoconf/automake - * w32/pathstuff.c (getcwd_fs): Fix warning about assignment in a - conditional (slightly different version of a fix from Eli). +2014-02-08 Ray Donnelly (tiny change) - 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. + * output.c: Ensure space for final nul byte in fmtbuf. - * 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. +2014-02-07 Gisle Vanem (tiny change) -2005-08-06 Eli Zaretskii + Improve error reporting in the Windows port when env size is too large. + w32/subproc/misc.c (arr2envblk): Compute and return the size of + the environment passed to child process. - * 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. + w32/subproc/sub_proc.c (process_begin): If the call to + CreateProcess failed with EINVAL, and the required environment + size was larger than 32KB, assume it's a Windows XP limitation, + and display an error message to that effect. - * 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. + w32/subproc/proc.h (arr2envblk): Update prototype. - * 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. +2014-02-01 Paul Smith -2005-07-30 Eli Zaretskii + * job.c (set_child_handler_action_flags): [SV 41341] + Ensure signal handler is in place before alarm(1). - * w32/subproc/sub_proc.c (process_begin): Don't pass a NULL - pointer to fprintf. +2014-01-20 Alan Hourihane (tiny change) - * 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. + * configure.ac: [SV 40790] Fix load autoconf variables. - * job.c (construct_command_argv_internal): Check unixy_shell, not - no_default_sh_exe, to decide whether to use Unixy or DOSish - builtin commands. +2014-01-17 Pavel Fedin (tiny change) - * README.W32: Update with info about the MinGW build. + Allow the EMX build to use output_sync. + job.c (start_job_command): Move the child output diversion out + of non-EMX branch. + [__EMX__]: Don't use fixed FD_STDOUT and FD_STDERR in the call to + child_execute_job. - * build_w32.bat: Support MinGW. +2014-01-12 Paul Smith - * w32/subproc/build.bat: Likewise. + * commands.c: [SV 40789] Remove unneeded header dlfcn.h - * w32/subproc/sub_proc.c (process_easy): Fix format strings for - printing DWORD args. + * main.c (die): Close output_context AND make_sync. + die() can be invoked inside a separate output_context, if the + $(error ...) function is expanded as part of a recipe. - * function.c (windows32_openpipe): Fix format strings for printing - DWORD args. +2014-01-11 Pavel Fedin (tiny change) - * job.c (reap_children) [WINDOWS32]: Don't declare 'status' and - 'reap_mode'. - (start_job_command): Fix format string for printing the result of - process_easy. - (start_job_command) [WINDOWS32]: Do not define. - (exec_command): Fix format string for printing HANDLE args. + Fix .LIBPATTERNS for MS-Windows builds. + default.c (.LIBPATTERNS) [__CYGWIN__ || WINDOWS32]: Provide + library patterns for MS-Windows. - * 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) +2013-11-27 Paul Smith -2005-07-30 J. Grant + * w32/*: Remove TABs from the source code. + I know whitespace commits are annoying, but having these TABs is + causing me to miss things when I search through the code. This + doesn't try to change the w32 code to meet GNU coding standards. - * prepare_w32.bat: Copy config.h.w32 to config.h if not exist. - * make_msvc_net2003.vcproj, make_msvc_net2003.sln: MSVC Project files. - * Makefile.am (EXTRA_DIST): Add MSVC Project files. + * main.c (decode_env_switches): Ensure we have enough space. + Reported (with patch) by Gerte Hoogewerf -2005-07-15 Paul Smith +2013-11-27 Stephan T. Lavavej (tiny change) - * 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 - - * configure.in: 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 + Solve some Windows build issues. + * main.c (main): Use ONS(), not OSN(). + (prepare_mutex_handle_string) [WINDOWS32]: Use %Ix formatting to + support both 32bit and 64bit systems. + * job.c (free_child, new_job): Use ONS(), not OSN(). + * w32/subproc/w32err.c (map_windws32_error_to_string): Use O() when + calling fatal(). -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 +2013-11-24 Paul Smith - From J. Grant : + * features/loadapi (test_expand): Allocate memory for the nul byte. - * 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. + * load.c (load_file): Reset the name length minus the symbol. -2005-06-28 Paul D. Smith + * read.c (unescape_char): Use memmove() for overlapping memory. - * 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. + Fix memory leak during environment option decoding. + * main.c (decode_switches): Always make a copy of option arguments. + (decode_env_switches): Use a stack buffer to convert environment + switches for parsing. - * 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 . - 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. - * NEWS: Mention 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. - - * configure.in: 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 - semantics. - 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 - - * Makefile.am (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. - * configure.in: 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. + [SV 40226] Add a new type of switch: single-string options + * main.c (struct command_switch): Change the "string" types to "strlist" + and make "string" be a single-valued string instead. + (output_sync_option, jobserver_fds, sync_mutex): Change to string type. + (decode_output_sync_flags): Handle single strings instead of lists. + (prepare_mutex_handle_string): 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. + (clean_jobserver): Ditto. + (init_switches): Handle the new type. + (decode_switches): Ditto. + (define_makeflags): Ditto. -2005-03-13 Paul D. Smith +2013-11-23 Daniel Richard G (tiny change) - * main.c (main) [MSDOS]: Export SHELL in MSDOS. Requested by Eli - Zaretskii. + * load.c: [SV 40515] Define RTLD_GLOBAL if not set. -2005-03-11 Paul D. Smith +2013-11-23 Paul Smith - * signame.c (strsignal): HAVE_DECL_SYS_SIGLIST is 0 when not - available, not undefined (from Earnie Boyd). + [SV 40361] Don't use vsnprintf(), which is an ISO C99 function. + * output.c (error, fatal, message): Take an extra argument specifying + how many bytes are used by the formatted arguments. + (get_buffer): New function that allocates the requested buffer size. + Remove msc_vsnprintf(), vfmtconcat(), and fmtconcat() as unneeded. + * makeint.h: Declare various helper macros for generating output. + * *.c: Change all error(), fatal(), message() calls to use the macros, + or pass the extra length argument directly. -2005-03-10 Boris Kolpackov +2013-10-27 Paul Smith - * 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. + * makeint.h (STOP_SET): [SV 40371] Cast to unsigned char. + * tests/scripts/misc/utf8: Test variable names with characters >127. + Fix suggested by Robert Bogomip -2005-03-09 Paul D. Smith +2013-10-24 Gerte Hoogewerf - * read.c (eval_makefile): Add alloca(0). - (eval_buffer): Ditto. + Fix MS Visual Studio NET2003 build. + * make_msvc_net2003.vcproj: Do not exclude guile.c from compilation. -2005-03-09 Boris Kolpackov +2013-10-23 Christian Boos - * 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. + Fix SV bug #40227 with respect to stack size set for the MSVC build. + * NMakefile.template (/STACK): Increase to 0x400000, mainly for + the 64-bit builds. Fixes SV bug #40227. + (guile): Uncomment. -2005-03-04 Boris Kolpackov +2013-10-23 Eli Zaretskii - * imlicit.c (pattern_search): Mark files for which an implicit - rule has been found as targets. Fixes Savannah bug #12202. + Fix the MS-Windows build: now guile.c must always be compiled in. + * build_w32.bat: Always compile guile.c and link against guile.o. + Reported by Alexey Pavlov . -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. - - * configure.in: 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. - - * configure.in (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(). - (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 - variables. - - * 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 - expansion. - - * 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 - - * configure.in: Add MinGW configuration options, and extra w32 code - directory. - * Makefile.am: Add MinGW configuration options, and extra w32 code - directory. - * main.c: Determine correct program string (after last \ without .exe). - * subproc/sub_proc.c: `GetExitCodeProcess' from incompatible pointer - type fix x2 - * w32/Makefile.am: Import to build win32 lib of sub_proc etc. - * subproc/w32err.c: MSVC thread directive not applied to MinGW builds. - * tests/run_make_tests.pl, tests/test_driver.pl: 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 ftp://ftp.gnu.org/GNUinfo 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 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 - - * configure.in: The old way we avoided creating build.sh from - build.sh.in before build.sh.in exists doesn't work anymore; we - have to use raw M4 (thanks to Andreas Schwab for - the help!). This also keeps automake from complaining. - * Makefile.am (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. - - * configure.in: 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(). - (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. - * 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 david.baird@homemail.com. - 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 - there. - (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, - REBUILDING_MAKEFILES. - (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 : - - * configure.in [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 (build.sh.in): 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 - - * configure.in (HAVE_ANSI_COMPILER): Define if we have an ANSI/ISO - compiler. - * 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 - argument. - - * configure.in: 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. - - * configure.in: 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. - * configure.in [OS/2]: Force SA_RESTART for OS/2. - * Makefile.am (check-regression): Use $(EXEEXT) for Windows-type - systems. - -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. - * configure.in: Change make_FUNC_SETVBUF_REVERSED to - AC_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 ftp.gnu.org. - -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 - notice. - -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. - * configure.in: 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 - variables. - - * 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 - parse. - (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 - - * configure.in (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 - - * configure.in, Makefile.am, glob/Makefile.am, doc/Makefile.am: - 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 - exec_command(). - - * 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]: Set proper default suffixes - for OS/2. - * vpath.c (construct_vpath_list) [OS/2]: Handle OS/2 paths like - DOS paths. - -2003-02-24 Paul D. Smith - - * default.c [VMS]: New default rules for .cxx -> .obj compiles. - * job.c (child_execute_job) [VMS]: New code for handling spawn(). - (child_execute_job) [VMS]: Handle error status properly. - Patches provided by Hartmut Becker . - - * function.c (func_shell): Use EINTRLOOP() while reading from the - subshell pipe (Fixes bug #2502). - * job.c (free_child): Use EINTRLOOP() while writing tokens to the - jobserver pipe. - * main.c (main): Ditto. - -2003-01-30 Paul D. Smith - - * read.c (eval): eval() was not fully reentrant, because the - collapsed buffer was static. Change it to be an automatic - variable so that eval() can be invoked recursively. - Fixes bug # 2238. - (eval): Apply patch # 1022: fix memory reference error on long - target-specific variable lines. - Patch provided by Steve Brown . - - * function.c (check_numeric): Combine the is_numeric() function - into this function, since it's only called from one place. - Constify this function. Have it print the incorrect string in the - error message. Fixes bug #2407. - (strip_whitespace): Constify. - (func_if): Constify. - * expand.c (expand_argument): Constify. - -2003-01-29 Paul D. Smith - - Fix bug # 2169, also reported by other people on various systems. - - * make.h: Some systems, such as Solaris and PTX, do not fully - implement POSIX-compliant SA_RESTART functionality; important - system calls like stat() and readdir() can still fail with EINTR - even if SA_RESTART has been set on the signal handler. So, - introduce macros EINTRLOOP() and ENULLLOOP() which can loop on - EINTR for system calls which return -1 or 0 (NULL), respectively, - on error. - Also, remove the old atomic_stat()/atomic_readdir() and - HAVE_BROKEN_RESTART handling. - - * configure.in: Remove setting of HAVE_BROKEN_RESTART. - - * arscan.c (ar_member_touch): Use EINTRLOOP() to wrap fstat(). - * remake.c (touch_file): Ditto. - - * commands.c (delete_target): Use EINTRLOOP() to wrap stat(). - * read.c (construct_include_path): Ditto. - * remake.c (name_mtime): Ditto. - * vpath.c (selective_vpath_search): Ditto. - * dir.c (find_directory): Ditto. - (local_stat): Ditto. - (find_directory): Use ENULLLOOP() to wrap opendir(). - (dir_contents_file_exists_p): Use ENULLLOOP() to wrap readdir(). - - * misc.c: Remove HAVE_BROKEN_RESTART, atomic_stat(), and - atomic_readdir() handling. - -2003-01-22 Paul D. Smith - - * function.c (func_call): Fix Bug #1744. If we're inside a - recursive invocation of $(call ...), mask any of the outer - invocation's arguments that aren't used by this one, so that this - invocation doesn't "inherit" them accidentally. - -2002-12-05 Paul D. Smith - - * function.c (subst_expand): Valery Khamenia reported a - pathological performance hit when doing substitutions on very - large values with lots of words: turns out we were invoking - strlen() a ridiculous number of times. Instead of having each - call to sindex() call strlen() again, keep track of how much of - the text we've seen and pass the length to sindex(). - -2002-11-19 Paul D. Smith - - * README.cvs, configure.in: Upgrade to require autoconf 2.56. - - -2002-11-16 Paul D. Smith - - * NMakefile.template (OBJS): Add hash.c object file. - * SMakefile.template (srcs): Ditto. - * Makefile.ami (objs): Ditto. - * build_w32.bat: Ditto. - - * Makefile.DOS.template: Remove extra dependencies. - -2002-10-25 Paul D. Smith - - * expand.c (install_variable_buffer): New function. Install a new - variable_buffer context and return the previous one. - (restore_variable_buffer): New function. Free the current - variable_buffer context and put a previously saved one back. - * variable.h: Prototypes for {install,restore}_variable_buffer. - * function.c (func_eval): Push a new variable_buffer context - before we eval, then restore the old one when we're done. - Fixes Bug #1517. - - * read.c (install_conditionals): New function. Install a new - conditional context and return the previous one. - (restore_conditionals): New function. Free the current - conditional context and put a previously saved one back. - (eval): Use the {install,restore}_conditionals for "include" - handling. - (eval_buffer): Use {install,restore}_conditionals to preserve the - present conditional state before we evaluate the buffer. - Fixes Bug #1516. - - * doc/make.texi (Quick Reference): Add references to $(eval ...) - and $(value ...). - (Recursion): Add a variable index entry for CURDIR. - - * README.cvs: Update to appropriate versions. - * Makefile.am (nodist_loadavg_SOURCES): automake gurus point out I - don't need to copy loadavg.c: automake is smart enough to create - it for me. Still have a bug in automake related to ansi2knr tho. - -2002-10-14 Paul D. Smith - - * remake.c (notice_finished_file): Only touch targets if they have - at least one command (as per POSIX). Resolve Bug #1418. - - * *.c: Convert to using ANSI C-style function definitions. - * Makefile.am: Enable the ansi2knr feature of automake. - * configure.in: ditto. - -2002-10-13 Paul D. Smith - - * commands.c (set_file_variables): Bug #1379: Don't use alloca() - for automatic variable values like $^, etc. In the case of very - large lists of prerequisites this causes problems. Instead reuse - a static buffer (resizeable) for each variable. - - * read.c (eval): Fix Bug #1391: allow "export" keyword in - target-specific variable definitions. Check for it and set an - "exported" flag. - (record_target_var): Set the export field to v_export if the - "exported" flag is set. - * doc/make.texi (Target-specific): Document the ability to use - "export". - - * doc/make.texi: Change the name of the section on automatic - variables from "Automatic" to "Automatic Variables". Added text - clarifying the scope of automatic variables. - -2002-10-04 Paul D. Smith - - * read.c (eval): Allow SysV $$@ variables to use {} braces as well - as () braces. - (record_files): Ditto. - - * expand.c (variable_expand_string): In $(A:x=y) expansion limit - the search for the '=' to only within the enclosing parens. - -2002-10-03 Paul D. Smith - - Version 3.80 released. - - * dir.c: Change hash functions to use K&R function definition style. - * function.c: Ditto. - * read.c: Ditto. - * variable.c: Ditto. - - Update to automake 1.7. - - * Makefile.am (AUTOMAKE_OPTIONS): Update to require 1.7. - (pdf): Remove this target as automake now provides one. - - * configure.in: Change AM_CONFIG_HEADER to AC_CONFIG_HEADERS. - -2002-09-30 Martin P.J. Zinser - - * makefile.com: Updates for GNU make 3.80. - * makefile.vms: Ditto. - -2002-09-23 Paul D. Smith - - * read.c (enum make_word_type): Remove w_comment. - (get_next_mword): Don't treat comment characters as special; where - this function is used we will never see a comment (it's stripped - before we get here) and treating comments specially means that - targets like "foo\#bar" aren't handled properly. - -2002-09-18 Paul D. Smith - - * doc/make.texi (Bugs): Update with some info on Savannah, etc. - - * read.c (eval): Expansion of arguments to export/unexport was - ignoring all arguments after the first one. Change the algorithm - to expand the whole line once, then parse the results. - -2002-09-17 Paul D. Smith - - Fix Bug #940 (plus another bug I found while looking at this): - - * read.c (record_target_var): enter_file() will add a new entry if - it's a double-colon target: we don't want to do that in this - situation. Invoke lookup_file() and only enter_file() if it does - not already exist. If the file we get back is a double-colon then - add this variable to the "root" double-colon target. - - * variable.c (initialize_file_variables): If this file is a - double-colon target but is not the "root" target, then initialize - the root and make the root's variable list the parent of our - variable list. - -2002-09-13 Paul D. Smith - - * doc/make.texi (MAKE Variable): Add some indexing for "+". - - * hash.c (round_up_2): Get rid of a warning. - -2002-09-12 Paul D. Smith - - * Makefile.am (loadavg_SOURCES, loadavg.c): Tiptoe around automake - so it doesn't complain about getloadavg.c. - - * commands.c (set_file_variables): Make sure we always alloca() at - least 1 character for the value of $? (for '\0'). - -2002-09-11 Paul D. Smith - - * hash.h (STRING_COMPARE, ISTRING_COMPARE, STRING_N_COMPARE): Fix - macro to use RESULT instead of the incorrect _RESULT_. - - * make.h (HAVE_BROKEN_RESTART): Add prototypes for atomic_stat() - and atomic_readdir(). We need to #include dirent.h to get this to - work. - * misc.c (atomic_readdir): Fix typos. - -2002-09-10 Paul D. Smith - - * read.c (eval): Expand variable lists given to export and - unexport, so that "export $(LIST_OF_VARIABLES)" (etc.) works. - (conditional_line): Ditto for "ifdef". Fixes bug #103. - - * doc/make.texi (Variables/Recursion): Document this. - (Conditional Syntax): And here. - -2002-09-09 Paul D. Smith - - * configure.in: Check for memmove(). - -2002-09-07 Paul D. Smith - - * configure.in (HAVE_BROKEN_RESTART): Define this on PTX systems; - Michael Sterrett reports that while it has - SA_RESTART, it does not work properly. - - * misc.c (atomic_stat): If HAVE_BROKEN_RESTART, create a function - that invokes stat() and loops to do it again if it returns EINTR. - (atomic_readdir): Ditto, with readdir(). - - * make.h (stat, readdir): If HAVE_BROKEN_RESTART, alias stat() - and readdir() to atomic_stat() and atomic_readdir(). - -2002-09-04 Paul D. Smith - - * implicit.c (pattern_search): Daniel - reports that GNU make sometimes doesn't recognize that targets can - be made, when directories can be created as prerequisites. He - reports that changing the order of predicates in the DEP->changed - flag test so that lookup_file() is always performed, solves this - problem. - -2002-08-08 Paul D. Smith - - * configure.in: Require a newer version of gettext. - - * misc.c (perror_with_name): Translate the format string (for - right-to-left language support). - (pfatal_with_name): Ditto. - - * main.c: Create a static array of strings to store the usage - text. This is done to facilitate translations. - (struct command_switch): Remove argdesc and description fields. - (switches): Remove values for obsolete fields. - (print_usage): Print each element of the usage array. - - * hash.c: Change function definitions to be K&R style. - -2002-08-02 Paul D. Smith - - * NEWS: Remove the mention of .TARGETS; we aren't going to publish - this one because it's too hard to get right. We'll look at it for - a future release. - * main.c (main): Don't create the .TARGETS variable. - * variable.c (handle_special_var): Don't handle .TARGETS. - -2002-08-01 Paul D. Smith - - * main.c (switches): Add a new option, -B (--always-make). If - specified, make will rebuild all targets that it encounters even - if they don't appear to be out of date. - (always_make_flag): New flag. - * make.h: Extern always_make_flag. - * remake.c (update_file_1): Check always_make_flag; if it's set we - will always rebuild any target we can, even if none of its - prerequisites are newer. - * NEWS: Mention it. - - * doc/make.texi (Shell Function): Make it clear that make - variables marked as "export" are not passed to instances of the - shell function. - - Add new introspection variable .VARIABLES and .TARGETS. - - * variable.c (handle_special_var): New function. If the variable - reference passed in is "special" (.VARIABLES or .TARGETS), - calculate the new value if necessary. .VARIABLES is handled here: - walk through the hash of defined variables and construct a value - which is a list of the names. .TARGETS is handled by - build_target_list(). - (lookup_variable): Invoke handle_special_var(). - * file.c (build_target_list): Walk through the hask of known files - and construct a list of the names of all the ones marked as - targets. - * main.c (main): Initialize them to empty (and as simple variables). - * doc/make.texi (Special Variables): Document them. - * NEWS: Mention them. - - * variable.h (struct variable): Add a new flag "exportable" which - is true if the variable name is valid for export. - * variable.c (define_variable_in_set): Set "exportable" when a new - variable is defined. - (target_environment): Use the "exportable" flag instead of - re-checking the name here... an efficiency improvement. - -2002-07-31 Paul D. Smith - - * config.h-vms.template: Updates to build on VMS. Thanks to - Brian_Benning@aksteel.com for helping verify the build. - * makefile.com: Build the new hash.c file. - * hash.h: Use strcpmi(), not stricmp(), in the - HAVE_CASE_INSENSITIVE_FS case. - -2002-07-30 Paul D. Smith - - * hash.h (ISTRING_COMPARE, return_ISTRING_COMPARE): Add missing - backslashes to the HAVE_CASE_INSENSITIVE_FS case. - Reported by . - -2002-07-10 Paul D. Smith - - * variable.c (pop_variable_scope): Remove variable made unused by - new hash infrastructure. - * read.c (dep_hash_cmp): Rewrite this to handle ignore_mtime - comparisons as well as name comparisons. - * variable.h: Add a prototype for new hash_init_function_table(). - * file.c (lookup_file): Remove variables made unused by new hash - infrastructure. - * dir.c (directory_contents_hash_2): Missing return of hash value. - (dir_contents_file_exists_p): Remove variables made unused by new - hash infrastructure. - - - Installed Greg McGary's integration of the hash functions from the - GNU id-utils package: - -2002-07-10 Greg McGary - - * scripts/functions/filter-out: Add literals to to the - pattern space in order to add complexity, and trigger - use of an internal hash table. Fix documentation strings. - * scripts/targets/INTERMEDIATE: Reverse order of files - passed to expected `rm' command. - -2002-07-10 Greg McGary - - * Makefile.am (SRCS): Add hash.c (noinst_HEADERS): Add hash.h - * hash.c: New file, taken from id-utils. - * hash.h: New file, taken from id-utils. - - * make.h (HASH, HASHI): Remove macros. - (find_char_unquote): Change arglist in decl. - (hash_init_directories): New function decl. - * variable.h (hash.h): New #include. - (MAKELEVEL_NAME, MAKELEVEL_LENGTH): New constants. - * filedef.h (hash.h): New #include. - (struct file) [next]: Remove member. - (file_hash_enter): Remove function decl. - (init_hash_files): New function decl. - - * ar.c (ar_name): Delay call to strlen until needed. - * main.c (initialize_global_hash_tables): New function. - (main): Call it. Use MAKELEVEL_NAME & MAKELEVEL_LENGTH. - * misc.c (remove_comments): Pass char constants to find_char_unquote. - * remake.c (notice_finished_file): Update last_mtime on `prev' chain. - - * dir.c (hash.h): New #include. - (struct directory_contents) [next, files]: Remove members. - [ctime]: Add member for VMS. [dirfiles]: Add hash-table member. - (directory_contents_hash_1, directory_contents_hash_2, - directory_contents_hash_cmp): New functions. - (directories_contents): Change type to `struct hash_table'. - (struct directory) [next]: Remove member. - (directory_hash_1, directory_hash_2, directory_hash_cmp): New funcs. - (directory): Change type to `struct hash_table'. - (struct dirfile) [next]: Remove member. - [length]: Add member. [impossible]: widen type to fill alignment gap. - (dirfile_hash_1, dirfile_hash_2, dirfile_hash_cmp): New functions. - (find_directory): Use new hash table package. - (dir_contents_file_exists_p): Likewise. - (file_impossible): Likewise. - (file_impossible_p): Likewise. - (print_dir_data_base): Likewise. - (open_dirstream): Likewise. - (read_dirstream): Likewise. - (hash_init_directories): New function. - - * file.c (hash.h): New #include. - (file_hash_1, file_hash_2, file_hash_cmp): New functions. - (files): Change type to `struct hash_table'. - (lookup_file): Use new hash table package. - (enter_file): Likewise. - (remove_intermediates): Likewise. - (snap_deps): Likewise. - (print_file_data_base): Likewise. - - * function.c - (function_table_entry_hash_1, function_table_entry_hash_2, - function_table_entry_hash_cmp): New functions. - (lookup_function): Remove `table' argument. - Use new hash table package. - (struct a_word) [chain, length]: New members. - (a_word_hash_1, a_word_hash_2, a_word_hash_cmp): New functions. - (struct a_pattern): New struct. - (func_filter_filterout): Pass through patterns noting boundaries - and '%', if present. Note a_word length. Use a hash table if - arglists are large enough to justify cost. - (function_table_init): Renamed from function_table. - (function_table): Declare as `struct hash_table'. - (FUNCTION_TABLE_ENTRIES): New constant. - (hash_init_function_table): New function. - - * read.c (hash.h): New #include. - (read_makefile): Pass char constants to find_char_unquote. - (dep_hash_1, dep_hash_2, dep_hash_cmp): New functions. - (uniquize_deps): Use hash table to efficiently identify duplicates. - (find_char_unquote): Accept two char-constant stop chars, rather - than a string constant, avoiding zillions of calls to strchr. - Tighten inner search loops to test only for desired delimiters. - - * variable.c (variable_hash_1, variable_hash_2, - variable_hash_cmp): New functions. - (variable_table): Declare as `struct hash_table'. - (global_variable_set): Remove initialization. - (init_hash_global_variable_set): New function. - (define_variable_in_set): Use new hash table package. - (lookup_variable): Likewise. - (lookup_variable_in_set): Likewise. - (initialize_file_variables): Likewise. - (pop_variable_scope): Likewise. - (create_new_variable_set): Likewise. - (merge_variable_sets): Likewise. - (define_automatic_variables): Likewise. - (target_environment): Likewise. - (print_variable_set): Likewise. - -2002-07-10 Paul D. Smith - - Implement the SysV make syntax $$@, $$(@D), and $$(@F) in the - prerequisite list. A real SysV make will expand the entire - prerequisites list _twice_: we don't do that as it's a big - backward-compatibility problem. We only replace those specific - variables. - - * read.c (record_files): Replace any $@, $(@D), and $(@F) variable - references left in the list of prerequisites. Check for .POSIX as - we record targets, so we can disable non-POSIX behavior while - reading makefiles as well as running them. - (eval): Check the prerequisite list to see if we have anything - that looks like a SysV prerequisite variable reference. - -2002-07-09 Paul D. Smith - - * doc/make.texi (Prerequisite Types): Add a new section describing - order-only prerequisites. - - * read.c (uniquize_deps): If we have the same file as both a - normal and order-only prereq, get rid of the order-only prereq, - since the normal one supersedes it. - -2002-07-08 Paul D. Smith - - * AUTHORS: Added Greg McGary to the AUTHORS file. - * NEWS: Blurbed order-only prerequisites. - * file.c (print_file): Show order-only deps properly when printing - the database. - - * maintMakefile: Add "update" targets for wget'ing the latest - versions of various external files. Taken from Makefile.maint in - autoconf, etc. - - * dosbuild.bat: Somehow we got _double_ ^M's. Remove them. - Reported by Eli Zaretskii . - -2002-07-07 Paul D. Smith - - * po/*.po: Remove. We'll use wget to retrieve them at release - time. - - * variable.c (do_variable_definition) [W32]: On W32 using cmd - rather than a shell you get an exception. Make sure we look up - the variable. Patch provided by Eli Zaretskii . - - * remake.c (notice_finished_file): Fix handling of -t flag. - Patch provided by Henning Makholm . - - * implicit.c (pattern_search): Some systems apparently run short - of stack space, and using alloca() in this function caused an - overrun. I modified it to use xmalloc() on the two variables - which seemed like they might get large. Fixes Bug #476. - - * main.c (print_version): Update copyright notice to conform with - GNU standards. - (print_usage): Update help output. - - * function.c (func_eval): Create a new make function, $(eval - ...). Expand the arguments, put them into a buffer, then invoke - eval_buffer() on the resulting string. - (func_quote): Create a new function, $(quote VARNAME). Inserts - the value of the variable VARNAME without expanding it any - further. - - * read.c (struct ebuffer): Change the linebuffer structure to an - "eval buffer", which can be either a file or a buffer. - (eval_makefile): Move the code in the old read_makefile() which - located a makefile into here: create a struct ebuffer with that - information. Have it invoke the new function eval() with that - ebuffer. - (eval_buffer): Create a new function that creates a struct ebuffer - that holds a string buffer instead of a file. Have it invoke - eval() with that ebuffer. - (eval): New function that contains the guts of the old - read_makefile() function: this function parses makefiles. Obtains - data to parse from the provided ebuffer. Some modifications to - make the flow of the function cleaner and clearer. Still could - use some work here... - (do_define): Takes a struct ebuffer instead of a FILE*. Read the - contents of the define/endef variable from the ebuffer. - (readstring): Read the next line from a string-style ebuffer. - (readline): Read the next line from an ebuffer. If it's a string - ebuffer, invoke readstring(). If it's a FILE* ebuffer, read it - from the file. - - * dep.h (eval_buffer): Prototype eval_buffer(); - - * variable.c (do_variable_definition): Make sure that all - non-target-specific variables are registered in the global set. - If we're invoked from an $(eval ...) we might be inside a $(call - ...) or other function which has pushed a variable scope; we still - want to define our variables from evaluated makefile code in the - global scope. - -2002-07-03 Greg McGary - - * dep.h (struct dep) [ignore_mtime]: New member. - [changed]: convert to a bitfield. - * implicit.c (pattern_search): Zero ignore_mtime. - * main.c (main, handle_non_switch_argument): Likewise. - * rule.c (convert_suffix_rule): Likewise. - * read.c (read_all_makefiles, read_makefile, multi_glob): Likewise. - (read_makefile): Parse '|' in prerequisite list. - (uniquize_deps): Consider ignore_mtime when comparing deps. - * remake.c (update_file_1, check_dep): Don't force remake for - dependencies that have d->ignore_mtime. - * commands.c (FILE_LIST_SEPARATOR): New constant. - (set_file_variables): Don't include a - prerequisite in $+, $^ or $? if d->ignore_mtime. - Define $|. - -2002-06-18 Paul D. Smith - - * make.texinfo: Updates for next revision. New date/rev/etc. - Recreate all Info menus. Change license on the manual to the GNU - Free Documentation License. A number of typos. - (Variables Simplify): Don't use "-" before it's defined. - (Automatic Prerequisites): Rewrite the target example to work - properly if the compile fails. Remove incorrect comments about - how "set -e" behaves. - (Text Functions): Move the "word", "wordlist", "words", and - "firstword" functions here, from "File Name Functions". - * make-stds.texi: Update from latest GNU version. - * fdl.texi: (created) Import the latest GNU version. - -2002-06-06 Paul D. Smith - - * variable.c (do_variable_definition): New function: extract the - part of try_variable_definition() that actually sets the value - into a separate function. - (try_variable_definition): Call do_variable_definition() after - parsing the variable definition string. - (define_variable_in_set): Make the name argument const. - - * variable.h (enum variable_flavor): Make public. - (do_variable_definition): Create prototype. - - * read.c (read_all_makefiles): Create a new built-in variable, - MAKEFILE_LIST. - (read_makefile): Add each makefile read in to this variable value. - -2002-05-18 Eli Zaretskii - - * Makefile.DOS.template: Tweak according to changes in the - distribution. Add back the dependencies of *.o files. - - * configh.dos.template: Synchronize with config.h.in. - -2002-05-09 Paul D. Smith - - * file.c (file_timestamp_now): Use K&R function declaration. - - * getloadavg.c (getloadavg): Merge setlocale() fix from sh-utils - getloadavg.c. Autoconf thinks QNX is SVR4-like, but it isn't, so - #undef it. Remove predefined setup of NLIST_STRUCT. Decide - whether to include nlist.h based on HAVE_NLIST_H. Change obsolete - NLIST_NAME_UNION to new HAVE_STRUCT_NLIST_N_UN_N_NAME. - * configure.in (NLIST_STRUCT): Define this if we have nlist.h and - nlist.n_name is a pointer rather than an array. - - * acinclude.m4 (make_FUNC_SETVBUF_REVERSED): Grab the latest - version of AC_FUNC_SETVBUF_REVERSED from autoconf CVS. - * configure.in: Use it instead of the old version. - - * main.c (main): Prefer setvbuf() to setlinebuf(). - -2002-05-08 Paul D. Smith - - * Makefile.am (make_LDADD): Add GETLOADAVG_LIBS. - (loadavg_LDADD): Ditto. - -2002-04-29 Paul D. Smith - - * expand.c (recursively_expand_for_file): Rename - recursively_expand() to recursively_expand_for_file() and provide - an extra argument, struct file. If the argument is provided, set - the variable scope to that of the file before expanding. - * variable.h (recursively_expand): Make this a macro that invokes - recursively_expand_for_file() with a NULL file pointer. - * variable.c (target_environment): Call the renamed function and - provide the current file context. - Fixes Debian bug #144306. - -2002-04-28 Paul D. Smith - - Allow $(call ...) user-defined variables to be self-referencing - without throwing an error. Allows implementation of transitive - closures, among other possibly useful things. - Requested by: Philip Guenther - - * variable.h (struct variable): Add a new field: exp_count, and - new macros to hold its size and maximum value. - (warn_undefined): Make this a macro. - * variable.c (define_variable_in_set): Initialize it. - * expand.c (recursively_expand): If we detect recursive expansion - of a variable, check the exp_count field. If it's greater than 0 - allow the recursion and decrement the count. - (warn_undefined): Remove this (now a macro in variable.h). - * function.c (func_call): Before we expand the user-defined - function, modify its exp_count field to contain the maximum - number of recursive calls we'll allow. After the call, reset it - to 0. - -2002-04-21 Paul D. Smith - - Modified to use latest autoconf (2.53), automake (1.6.1), and - gettext (0.11.1). We're using gettext's new "external" support, - to avoid including libintl source with GNU make. - - * README.cvs: New file. Explain how to build GNU make from CVS. - - * configure.in: Modify checking for the system glob library. - Use AC_EGREP_CPP instead of AC_TRY_CPP. Remove the setting of - GLOBDIR (we will always put "glob" in SUBDIRS, so automake - etc. will manage it correctly). Set an automake conditional - USE_LOCAL_GLOB to decide whether to compile the glob library. - - * getloadavg.c (main): Include make.h in the "TEST" program to - avoid warnings. - - * Makefile.am: Remove special rules for loadavg. Replace them - with Automake capabilities for building extra programs. - - * signame.c: This file does nothing if the system provide - strsignal(). If not, it implements strsignal(). If the system - doesn't define sys_siglist, then we make our own; otherwise we use - the system version. - * signame.h: Removed. - - * main.c (main): No need to invoke signame_init(). Update copyright. - - * ABOUT-NLS: Removed. - * gettext.c: Removed. - * gettext.h: Get a simplified copy from the gettext package. - * po/*: Created. - * i18n/*.po: Moved to po/. - * i18n/: Removed. - - * config/*: Created. Contains package configuration helper files. - * config.guess, config.sub: Moved to config directory. - - * configure.in (AC_CONFIG_FILES): Add po/Makefile.in, config/Makefile. - Rework to use new-style autoconf features. Use the "external" - mode for gettext. Make the build.sh config file conditional on - whether build.sh.in exists, to avoid autoconf errors. - * acinclude.m4: Removed almost all macros as being obsolete. - Rewrote remaining macros to use AC_DEFINE. - * acconfig.h: Removed. - - * Makefile.am (EXTRA_DIST): Add config/config.rpath. Use a - conditional to handle customs support. Remove special handling - for i18n features. - -2002-04-20 Paul D. Smith - - * function.c (func_call): Don't mark the argument variables $1, - etc. as recursive. They've already been fully expanded so - there's no need to do it again, and doing so strips escaped $'s. - Reported by Sebastian Glita . - - * remake.c (notice_finished_file): Walk through double-colon - entries via the prev field, not the next field! - Reported by Greg McGary . - - * main.c (main): If the user specifies -q and asks for a specific - target which is a makefile, we got an assert. In that case it - turns out we should continue normally instead. - - * i18n/de.po, i18n/fr.po: Installed an updated translation. - - * i18n/he.po: Installed a new translation. - -2002-01-07 Paul D. Smith - - * i18n/es.po, i18n/ru.po: Installed an updated translation. - -2001-12-04 Paul D. Smith - - * i18n/ja.po: Installed an updated translation. - -2001-09-06 Paul Eggert - - * configure.in (AC_CHECK_HEADERS): Add sys/resource.h. - (AC_CHECK_FUNCS): Add getrlimit, setrlimit. - - * main.c: Include if it, getrlimit, and setrlimit - are available. - (main): Get rid of any avoidable limit on stack size. - -2001-09-04 Paul D. Smith - - * i18n/da.po: Installed an updated translation. - -2001-08-03 Paul D. Smith - - * i18n/fr.po: Installed an updated translation. - Resolves Debian bug #106720. - -2001-06-13 Paul D. Smith - - * i18n/da.po, configure.in (ALL_LINGUAS): Installed a new - translation. - -2001-06-11 Paul D. Smith - - * i18n/ko.po: Installed a new translation. - -2001-05-06 Paul D. Smith - - Modify the EINTR handling. - - * job.c (new_job): Reorganize the jobserver algorithm. Reorder - the way in which we manage the file descriptor/signal handler race - trap to be more efficient. - -2001-05-06 Paul Eggert - - Restart almost all system calls that are interrupted, instead - of worrying about EINTR. The lone exception is the read() for - job tokens. - - * configure.in (HAVE_SA_RESTART): New macro. - (MAKE_JOBSERVER): Define to 1 only if HAVE_SA_RESTART. - * main.c (main): Use SA_RESTART instead of the old, - nonstandard SA_INTERRUPT. - - * configure.in (AC_CHECK_FUNCS): Add bsd_signal. - * main.c (bsd_signal): New function or macro, - if the implementation doesn't supply it. - (The bsd_signal function will be in POSIX 1003.1-200x.) - (HANDLESIG): Remove. - (main, FATAL_SIG): Use bsd_signal instead of signal or HANDLESIG. - - * make.h (EINTR_SET): Remove. - (SA_RESTART): New macro. - - * arscan.c (ar_member_touch): Don't worry about EINTR. - * function.c (func_shell): Likewise. - * job.c (reap_children, free_child, new_job): Likewise. - * main.c (main): Likewise. - * remake.c (touch_file, name_mtime): Likewise. - - * arscan.c (ar_member_touch): Fix bug uncovered by EINTR removal; - if fstat failed with errno!=EINTR, the error was ignored. - - * job.c (set_child_handler_action_flags): New function. - (new_job): Use it to temporarily clear the SIGCHLD action flags - while reading the token. - -2001-05-02 Paul D. Smith - - * job.c (start_job_command): Don't add define/endef per-line flags - to the top-level flags setting. - -2001-04-03 Paul D. Smith - - * arscan.c (VMS_get_member_info,ar_scan) [VMS]: VMS sets the low - bit on error, so check for odd return values, not non-0 return - values. - (VMS_get_member_info): Calculate the timezone differences correctly. - Reported by John Fowler . - - -2001-03-14 Paul D. Smith - - * variable.c (lookup_variable) [VMS]: Null-terminate the variable - value before invoking define_variable(). - Reported by John Fowler . - -2001-02-07 Paul D. Smith - - * read.c (record_target_var): If we reset the variable due to a - command-line variable setting overriding it, turn off the "append" - flag. - -2001-01-17 Paul D. Smith - - * variable.c (lookup_variable) [VMS]: When getting values from the - environment, allocate enough space for the _value_ plus escapes, - not enough space for the name plus escapes :-/. - Reported by John Fowler . - - * remake.c (f_mtime): Removed the "***" prefix from the mod time - warnings that make generates, so it doesn't look like an error. - Reported by Karl Berry . - - - Fix for PR/2020: Rework appended target-specific variables. I'm - fairly confident this algorithm is finally correct. - - * expand.c (allocated_variable_append): Rewrite. Instead of - expanding each appended variable then adding all the expanded - strings together, we append all the unexpanded values going up - through the variable set contexts, then expand the final result. - This behaves just like non-target-specific appended variable - values, while the old way didn't in various corner cases. - (variable_append): New function: recursively append the unexpanded - value of a variable, walking from the outermost variable scope to - the innermost. - * variable.c (lookup_variable): Remove the code that looked up the - variable set list if the found variable was "append". We don't - need this anymore. - (lookup_variable_in_set): Make this non-static so we can use it - elsewhere. - (try_variable_definition): Use lookup_variable_in_set() rather - than faking out current_variable_set_list by hand (cleanup). - * variable.h: Add a prototype for the now non-static - lookup_variable_in_set(). - -2000-11-17 Paul D. Smith - - * remake.c (f_mtime) [WINDOWS32]: On various advice, I changed the - WINDOWS32 port to assume timestamps can be up to 3 seconds away - before throwing a fit. - -2000-11-17 Paul D. Smith - - * read.c (readline): CRLF calculations had a hole, if you hit the - buffer grow scenario just right. Reworked the algorithm to avoid - the need for len or lastlen at all. Problem description with - sample code chages provided by Chris Faylor . - -2000-10-24 Paul D. Smith - - * gettext.c (SWAP): Declare this with the prototype, otherwise - some systems don't work (non-32-bit? Reported for Cray T3E). - Reported by Thorstein Thorsteinsson . - -2000-10-05 Paul D. Smith - - * acinclude.m4 (AM_LC_MESSAGES): Remove undefined macro - AM_LC_MESSAGES; it doesn't seem to do anything anyway?? - - * i18n/gl.po, configure.in (ALL_LINGUAS): New Galician translation. - -2000-09-22 Paul D. Smith - - * gettext.c: Don't #define _GETTEXT_H here; we only include some - parts of the real gettext.h here, and we expect to really include - the real gettext.h later. If we keep this #define, it's ignored. - -2000-09-21 Paul D. Smith - - * main.c (log_working_directory): Rework the text to use complete - sentences, to make life simpler for the translators. - -2000-08-29 Paul D. Smith - - * file.c (remove_intermediates): Print a debug message before we - remove intermediate files, so the user (if she uses -d) knows - what's going on. - -2000-08-21 Paul D. Smith - - * variable.c (try_variable_definition): Change how we handle - target-specific append variable defns: instead of just setting the - value, expand it as an append _but_ only within the current - target's context. Otherwise we lose all but the last value if the - variable is appended more than once within the current target - context. Fixes PR/1831. - -2000-08-16 Paul D. Smith - - * function.c (func_shell): Nul-terminate the buffer before - printing an exec error message (just in case it's not!). - Fixes PR/1860, reported by Joey Hess . - -2000-07-25 Paul D. Smith - - * job.c (construct_command_argv_internal): Add "~" to the list of - sh_chars[] which disallow optimizing out the shell call. - -2000-07-23 Paul Eggert - - * NEWS, make.texinfo: Document .LOW_RESOLUTION_TIME, which - supersedes --disable-nsec-timestamps. - * make.texinfo: Consistently use "time stamp" instead of "timestamp". - * README: Remove --disable-nsec-timestamps. - - * filedef.h (struct file.low_resolution_time): New member. - * file.c (snap_deps): Add support for .LOW_RESOLUTION_TIME. - * remake.c (update_file_1): - Avoid spurious rebuilds due to low resolution time stamps, - generalizing the earlier code that applied only to archive members. - (f_mtime): Archive members always have low resolution time stamps. - - * configure.in: Remove --disable-nsec-timestamps, as this has - been superseded by .LOW_RESOLUTION_TIME. - -2000-07-23 Paul Eggert - - * configure.in (enable_nsec_timestamps): Renamed from - make_cv_nsec_timestamps, since enable/disable options - shouldn't be cached. - -2000-07-23 Bruno Haible - and Paul Eggert - - * file.c (file_timestamp_now): - Use preprocessor-time check for FILE_TIMESTAMP_HI_RES - so that clock_gettime is not linked unless needed. - - * filedef.h (FILE_TIMESTAMP_HI_RES): - Remove definition; "configure" now does this. - - * configure.in (jm_AC_TYPE_UINTMAX_T): Move up, - to before high resolution file timestamp check, - since that check now uses uintmax_t. - (FILE_TIMESTAMP_HI_RES): Define to nonzero if the code should use - high resolution file timestamps. - (HAVE_CLOCK_GETTIME): Do not define if !FILE_TIMESTAMP_HI_RES, - so that we don't link in clock_gettime unnecessarily. - -2000-07-17 Paul D. Smith - - * i18n/ja.po: New version of the translation file. - -2000-07-07 Paul D. Smith - - * remake.c (f_mtime): If NO_FLOAT is defined, don't bother with - the offset calculation. - (name_mtime): Replace EINTR test with EINTR_SET macro. + * makeint.h (guile_gmake_setup): Define prototype unconditionally, + to avoid compiler warnings. -2000-07-07 Paul Eggert +2013-10-22 Eli Zaretskii - Fix for PR/1811: + Fix Savannah bug #31150 with failures due to setting window title. + * sub_proc.c (process_begin): Don't set startInfo.lpTitle, it + reportedly causes SV bug #31150, and according to MSDN it's a + no-no. - * remake.c (update_file_1): - Avoid spurious rebuilds of archive members due to their - timestamp resolution being only one second. - (f_mtime): Avoid spurious warnings of timestamps in the future due to - the clock's resolution being lower than file timestamps'. - When warning about future timestamps, report only the discrepancy, - not the absolute value of the timestamp and the current time. + Fix Savannah bug 40241 with Unixy file names as commands to MSYS shell. + * sub_proc.c: Include filedef.h and variable.h. + (process_begin): If exec_path was not found, but its first + character is '/', assume there's some shell magic, and invoke the + command through '$(SHELL) -c "COMMAND"'. Fixes SV bug#40241. + (make_command_line): Kludgey feature: if full_exec_path is "-c", + assume that argv[0] is not to be skipped, as it holds the command + string to be passed to the shell. - * file.c (file_timestamp_now): New arg RESOLUTION. - * filedef.h (file_timestamp_now): Likewise. - (FILE_TIMESTAMP_NS): Now returns int. All uses changed. +2013-10-20 Paul Smith -2000-07-05 Paul D. Smith + * glob.c (glob) [SV 18123]: Cherry-pick glibc fix + Apply commit a471e96a5352a5f0bde6d32dd36d33524811a2b1 from + git://sourceware.org/git/glibc.git to fix + https://sourceware.org/bugzilla/show_bug.cgi?id=10278 - * variable.c (lookup_variable) [VMS]: Remove vestigial references - to listp. Fixes PR/1793. + * read.c (record_files): [SV 33034] Change fatal() to error() + Allows deprecated syntax. However we don't guarantee this syntax + will continue to be legal in the future. + Change suggested by David Boyce -2000-06-26 Paul Eggert + * README.git: Add some missing release steps. - * Makefile.am (MAINTAINERCLEANFILES): New macro, with stamp-pot in it. +2013-10-19 Paul Smith - * dir.c (vms_hash): Ensure ctype macro args are nonnegative. + [SV 40240] Use configure info to build load test shared libs + * tests/config-flags.pm.in: A new file containing variable assignments + for the test suite; these variables are set by configure to contain + the values detected there for compilers, flags, etc. + * tests/run_make_tests.pl: Require the config-flags.pm file + * tests/scripts/features/load, tests/scripts/features/loadapi: Use the + configure-provided values when building the shared test library. + * configure.ac: Replace tests/config-flags.pm.in + * Makefile.am: Make sure tests/config-flags.pm is up to date - * remake.c (f_mtime): Remove unused var memtime. + * maintMakefile (checkcfg.%): Add testing of build.sh -2000-06-25 Martin Buchholz + [SV 40254] Modify build.sh to work properly with Guile support. + * guile.c (guile_gmake_setup) [HAVE_GUILE]: Define a stub function + when Guile support is not enabled. + * main.c (main) [HAVE_GUILE]: Always invoke guile_gmake_setup(). + * Makefile.am: Make guile.c standard, not optional. + * build.template: Add the Guile compiler and linker flags. - * make.texinfo, NEWS, TODO.private: Minor spelling corrections. - Ran spell-check on make.texinfo. + * maintMakefile: Accept variable overrides from the environment. -2000-06-23 Paul D. Smith + * NEWS: Fix version so we can build a distfile. - * main.c (main): Replace EXIT_SUCCESS, EXIT_FAILURE, and - EXIT_TROUBLE with MAKE_SUCCESS, MAKE_FAILURE, and MAKE_TROUBLE. - * make.h: Define these macros. + * read.c (eval): Avoid GCC warning to add braces. - * Version 3.79.1 released. + * GNUMAKEFLAGS: Remove -O so it passes in NO_OUTPUT_SYNC mode. - * configure.in: Add a new option, --disable-nsec-timestamps, to - avoid using sub-second timestamps on systems that support it. It - can lead to problems, e.g. if your makefile relies on "cp -p". - * README.template: Document the issue with "cp -p". +2013-10-18 Christian Boos - * config.guess, config.sub: Updated. + Fix initialization of stringlist variables for jobserver_fds and sync_mutex. + (tiny change) - + main.c (prepare_mutex_handle_string, main): Initialize + stringlist variables with at least 2 members, as one member is not + currently supported. -See ChangeLog.2, available in the Git repository at: +2013-10-18 Eli Zaretskii - http://git.savannah.gnu.org/cgit/make.git/tree/ + Fix MinGW64 problem with non-compliant vsnprintf. + makeint.h (__USE_MINGW_ANSI_STDIO) [__MINGW64_VERSION_MAJOR]: + Define for MinGW64, to force it to use an ANSI-compliant + implementation of vsnprintf. Reported by Christian Boos + . -for earlier changes. + Fix the MSVC build on MS-Windows. + output.c (vsnprintf) [_MSC_VER]: Define, instead of defining + snprintf, which isn't used. Reported by Christian Boos + . + NMakefile.template (OBJS): Add load.obj and posixfcn.obj. + ($(OUTDIR)/pathstuff.obj): New dependency. + Suggested by Christian Boos . +2013-10-13 Paul Smith -Copyright (C) 2000-2013 Free Software Foundation, Inc. -This file is part of GNU Make. + [SV 40139] Modify "missing separator" for better translation -GNU Make is free software; you can redistribute it and/or modify it under the -terms of the GNU General Public License as published by the Free Software -Foundation; either version 3 of the License, or (at your option) any later -version. + Add support for updating the GNU make web pages. + Add makefile rules for updating the http://www.gnu.org/software/make + web pages, including the online GNU make manual. -GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. See the GNU General Public License for more details. + Convert to auto-generated ChangeLog files. + Rename existing ChangeLog files so they won't be distributed. + Add targets to maintMakefile to generate ChangeLog from the Git + repository. This will require a version of gnulib be available. + Because ChangeLog is auto-generated, we have to switch our + automake mode to "foreign" or it will complain and fail. -You should have received a copy of the GNU General Public License along with -this program. If not, see . + Set up for the next release.