make-alpha
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] make branch, master, updated. 4.3-218-g15a7e383


From: Paul D. Smith
Subject: [SCM] make branch, master, updated. 4.3-218-g15a7e383
Date: Tue, 30 Aug 2022 21:36:25 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "make".

The branch, master has been updated
       via  15a7e3830fd7b84238e4909522ce3cd6fec7b702 (commit)
       via  26e359c71d1758ea1f6ac43f1d1591254d1bf0c2 (commit)
       via  4da2055a10bd21b4e34f1b650484f0636d3b3ca2 (commit)
       via  a2ba5ccbda4606dde29503f57caab33a974af5bf (commit)
       via  5eff618c8cbfbe1f386e3a55499cd8fe26cd35a1 (commit)
       via  10e130b20793f650835085d5ebe85e4ad0c83654 (commit)
       via  62da1c45e51f90892dd785fbdd42aeff769defb6 (commit)
       via  ab31f0b5941721ed2f5ea20c33388caad01bd657 (commit)
       via  8f1b6bca46c1e209e1ede83bd8904f7cdf00b090 (commit)
       via  6faa02247ee85244601cfb9baa9d6281faa70c17 (commit)
       via  c72e1ec44673e89fceab4cc9a672f38aeb83abbc (commit)
       via  91d87ccf321c16eb48531e39ba103878c15dafd1 (commit)
      from  7ad2593b2d2bb5b9332f4444d8bf93ac6f958bc6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 15a7e3830fd7b84238e4909522ce3cd6fec7b702
Author: Paul Smith <psmith@gnu.org>
Date:   Tue Aug 30 13:41:37 2022 -0400

    Fix tests for MacOS and Windows
    
    * maintMakefile: Remove the template headers as prerequisites.
    * tests/scripts/features/jobserver: Only test fifo if enabled.
    * tests/scripts/variables/INCLUDE_DIRS: On MacOS none of the default
    directories exist so .INCLUDE_DIRS is empty by default.
    * tests/scripts/features/se_explicit: Fail via exit.  cp will show
    different error messages on different systems.
    * tests/scripts/features/se_implicit: Ditto.
    * tests/scripts/features/se_statpat: Ditto.

commit 26e359c71d1758ea1f6ac43f1d1591254d1bf0c2
Author: Paul Smith <psmith@gnu.org>
Date:   Tue Aug 30 09:02:33 2022 -0400

    [SV 62840] Don't change IO buffering before printing version
    
    If users run 'make --version | head -n1' they expect make to exit
    with a success (0) code.  This works because the pipe forces the
    default buffering on stdout to be fully buffered so all the output
    is printed to the pipe in a single write(2) and won't fail.  However
    due to output sync we forcibly set stdout to line buffered, which
    means if the reader closes the pipe fast enough make will exit with
    an error code because the write to stdout failed.
    
    Move the setup done in output_init() back into main() where it can
    be done in a proper order.  Rework the order of operations during
    startup so that we check for help and version flags before we change
    the buffering.  Clean up the behavior of print_usage().
    
    Original changes from Dmitry Goncharov <dgoncharov@users.sf.net>.
    
    * src/main.c (switches): Don't send --version in the environment.
    (print_usage): Add a blank line after the version before the usage.
    Move the die() into this function since we always die() afterward.
    Note the die will flush so no need to do it explicitly.
    (print_version): The caller will fflush when appropriate.
    (close_stdout): Move from output.c so it is installed early.
    (decode_switches): Only call print_usage on error, not for --help.
    (main): Install the close_stdout handler immediately after start.
    Move the calls to print_usage() due to --help and --version to be
    called immediately after we decode the switches.  Move the buffer set
    here from output_init(), immediately after we know we'll be running.
    * src/output.c (output_init): Move buffer setting to main().
    (close_stdout): Move to main().

commit 4da2055a10bd21b4e34f1b650484f0636d3b3ca2
Author: Paul Smith <psmith@gnu.org>
Date:   Sun Aug 28 20:15:35 2022 -0400

    Rework output sync to lock a temp file on POSIX
    
    Some POSIX systems do not allow locks to be taken on non-files, such
    as pipes.  This is a problem since very often make is invoked with
    its stdout redirected to a pipe.  Also, if stdout is redirected to a
    file that already has a lock on it for some other reason (perhaps a
    shared file such as /dev/null) it can cause a hang.
    
    This means our previous method of locking stdout, although it had some
    nice advantages, is not portable enough.  Instead, use a temporary
    file and take the lock on that.  We pass the name of the file to child
    make processes.  On Windows we continue to use a shared mutex for
    output sync.
    
    Remove POSIX emulation functions like fcntl from Windows; instead
    follow the lead of the jobserver and create an interface in os.h for
    output sync, and move the OS-specific content to posixos.c and
    w32os.c.
    
    * NEWS: Add a note.
    * src/makeint.h (ALL_SET): Check that all bits are set.
    * src/os.h: Add bits for checking the state of stdin/stdout/stderr.
    Add prototypes for OS-specific output sync methods.
    * src/posixos.c (check_io_state): Determine the status of stdin,
    stdout, stderr an return a suite of bits describing them.
    (osync_enabled): If the global variable holding the FD of the lock
    file (osync_handle) is valid return true.
    (osync_setup): Create a temporary file and remember its name in a
    global variable (osync_tmpfile), and set osync_handle.
    (osync_get_mutex): If output sync is enabled, return the filename
    of the lock file prefixed with "fnm:" to denote a filename.
    (osync_parse_mutex): If the provided filename has the wrong format
    disable output sync.  Else open the lock file and set osync_handle.
    (osync_clear): Close osync_handle.  If we're the parent make, then
    also unlink the temporary file.
    (osync_acquire): Take a lock on the osync_handle descriptor.
    (osync_release): Release the lock on the osync_handle descriptor.
    (fd_set_append): Add APPEND mode to a file descriptor.
    * src/w32/w32os.c: Perform the same actions as posixos.c, copying
    the details from src/w32/compat/posixfcn.c.  Use a mutex rather
    than locking a temporary file.
    * src/output.h: Remove all the OS-specific content.
    * src/output.c: Remove all the OS-specific content.
    (set_append_mode): Remove and replace with fd_set_append().
    (sync_init): Remove and replace with check_io_state().
    (acquire_semaphore): Remove and replace with osync_acquire().
    (release_semaphore): Remove and replace with osync_release().
    (setup_tmpfile): If the IO state is not obtained, get it.  If stdout
    and/or stderr are valid, set up a tempfile to capture them.
    (output_init): Set io_state if not set already, and check it when
    deciding whether to close stdout on exit.
    * src/main.c (main): If we're syncing, set up the mutex using the
    new osync_setup() / osync_parse_mutex() methods.
    (prepare_mutex_handl_string): Replace with osync_parse_mutex().
    (die): Call osync_clear().
    * src/w32/compat/posixfcn.c: Remove implementations of fcntl(),
    record_sync_mutex(), create_mutex(), and same_stream().

commit a2ba5ccbda4606dde29503f57caab33a974af5bf
Author: Paul Smith <psmith@gnu.org>
Date:   Sat Aug 27 19:03:40 2022 -0400

    Add get_tmpfd() and allow anonymous temp files
    
    The output sync feature wants a file descriptor not a FILE*.  We were
    using tmpfile() but this returns FILE* which means we needed to dup()
    the descriptor then fclose() the original, which is just unnecessary
    overhead for every command we run.
    
    Create a get_tmpfd() method that returns a file descriptor directly
    by using mkstemp() if available, else do the best we can.
    
    Also allow anonymous temp files if the filename pointer is NULL.
    This causes the file to be unlinked.  On Windows this requires a
    special open so add an os_anontmp() method to handle this.
    
    * src/makeint.h: Add prototype for get_tmpfd().
    * src/misc.c (get_tmpfd): If we have mkstemp() use that, else just
    open(2).  If we don't want to keep the filename, unlink the file.
    (get_tmpfile): Use get_tmpfd() if we have fdopen(), else use fopen().
    * src/output.c (output_tmpfd): Call get_tmpfd() with NULL.
    * src/os.h (os_anontmp): On Windows make this a function, else fails.
    * src/w32/compat/posixcfn.c (tmpfile): Move to w32os.c:os_anontmp().
    * src/w32/w32os.c (os_anontmp): Create a temp file that will be deleted
    when the process exits, and return a file descriptor to it.

commit 5eff618c8cbfbe1f386e3a55499cd8fe26cd35a1
Author: Paul Smith <psmith@gnu.org>
Date:   Sun Aug 28 23:48:09 2022 -0400

    test_driver: check for leftover temp files after each test
    
    Reset the temp directory for every test to a local directory, then
    after each test see if any new temp files were created and not
    deleted: if they were then fail the test.  Rather than delete the
    temp files we leave them there and avoid reporting files that were
    seen before, so the user can investigate them.
    
    Rewrite the temp_stdin tests to rely on this built-in behavior
    rather than implementing the checks directly.
    
    * tests/test_driver.pl: Create a $TEMPDIR variable pointing to a
    temporary directory outside the test temp directory.
    (toplevel) Before starting any tests create a temp directory and set
    the POSIX and Windows temp directory environment variables to use it.
    (compare_output) Check the contents of the temp directory.  If any
    new files have appeared, fail the test.
    * tests/scripts/features/temp_stdin: Remove check_tempfile() and
    all users of it, plus setting of temp environment variables.

commit 10e130b20793f650835085d5ebe85e4ad0c83654
Author: Dmitry Goncharov <dgoncharov@users.sf.net>
Date:   Mon Aug 22 21:27:08 2022 -0400

    [SV 62908] Don't free fifo_name twice during error handling
    
    * src/posixos.c (jobserver_setup): Set fifo_name to NULL after free.
    * tests/scripts/features/jobserver: Add tests.

commit 62da1c45e51f90892dd785fbdd42aeff769defb6
Author: Paul Smith <psmith@gnu.org>
Date:   Sun Aug 14 15:03:40 2022 -0400

    Fix bootstrap.bat for bootstrapping on Windows
    
    * README.git: Clarify that these methods are lightly tested.
    * build_w32.bat: Don't support any config step: fail if not completed.
    Move the config steps into bootstrap.bat.  Don't print compile lines
    by default and add a --verbose option to show them.
    * bootstrap.bat: Ensure we have curl and sed before we do anything.
    Pull the latest necessary files from gnulib.  Create a convert.sed
    script that can update the various template files, and update
    Basic.mk, config.h.W32, and gmk-default.h.
    * tests/run_make_tests.pl: Remove CRLF rather than using chop.  If we
    run perl in Git for Bash it seems to handle newlines differently.
    * tests/scripts/features/temp_stdin: Remove the make copy and close
    STDIN so we can delete the temp file on Windows.
    * .gitignore: Ignore the convert.sed script.

commit ab31f0b5941721ed2f5ea20c33388caad01bd657
Author: Paul Smith <psmith@gnu.org>
Date:   Sun Aug 14 14:05:07 2022 -0400

    * doc/make.texi (Variables/Recursion): [SV 56446] Clarify export docs

commit 8f1b6bca46c1e209e1ede83bd8904f7cdf00b090
Author: Paul Smith <psmith@gnu.org>
Date:   Sun Aug 7 17:29:49 2022 -0400

    * doc/make.texi (Goals): [SV 51306] Improve MAKECMDGOALS example

commit 6faa02247ee85244601cfb9baa9d6281faa70c17
Author: Dmitry Goncharov <dgoncharov@users.sf.net>
Date:   Wed Aug 3 00:22:48 2022 -0400

    * doc/make.texi (Remaking Makefiles): [SV 61623] Add optimization

commit c72e1ec44673e89fceab4cc9a672f38aeb83abbc
Author: Paul Smith <psmith@gnu.org>
Date:   Wed Aug 3 00:13:34 2022 -0400

    * doc/make.texi (Chained Rules): [SV 61957] Clarify NOTINTERMEDIATE

commit 91d87ccf321c16eb48531e39ba103878c15dafd1
Author: Paul Smith <psmith@gnu.org>
Date:   Wed Aug 3 00:05:39 2022 -0400

    [SV 62496] Fix example of testing MAKEFLAGS
    
    * doc/make.texi (Options/Recursion): Define the layout of MAKEFLAGS.
    (Testing Flags): Fix the example to test the first word.

-----------------------------------------------------------------------

Summary of changes:
 .gitignore                           |   1 +
 NEWS                                 |   7 +
 README.git                           |   4 +
 bootstrap.bat                        |  62 ++++++-
 build_w32.bat                        |  42 +++--
 doc/make.texi                        | 134 +++++++++-----
 maintMakefile                        |   5 +-
 src/job.c                            |  19 +-
 src/main.c                           | 189 +++++++++++++-------
 src/makeint.h                        |   3 +
 src/misc.c                           |  90 +++++++---
 src/os.h                             |  83 +++++++--
 src/output.c                         | 221 +++--------------------
 src/output.h                         |  63 +------
 src/posixos.c                        | 175 +++++++++++++++++-
 src/w32/compat/posixfcn.c            | 338 -----------------------------------
 src/w32/w32os.c                      | 284 +++++++++++++++++++++++++++++
 tests/run_make_tests.pl              |   4 +-
 tests/scripts/features/jobserver     |  16 ++
 tests/scripts/features/se_explicit   |   5 +-
 tests/scripts/features/se_implicit   |   5 +-
 tests/scripts/features/se_statpat    |   5 +-
 tests/scripts/features/temp_stdin    |  36 +---
 tests/scripts/functions/shell        |   6 +-
 tests/scripts/variables/INCLUDE_DIRS |  40 +++--
 tests/test_driver.pl                 |  54 +++++-
 26 files changed, 1036 insertions(+), 855 deletions(-)


hooks/post-receive
-- 
make



reply via email to

[Prev in Thread] Current Thread [Next in Thread]