]> git.ipfire.org Git - thirdparty/make.git/log
thirdparty/make.git
3 years ago[SV 62706] Only second-expand targets that might be built
Dmitry Goncharov [Sun, 24 Jul 2022 22:16:50 +0000 (18:16 -0400)] 
[SV 62706] Only second-expand targets that might be built

Second-expand only the prerequisites of the targets being built.
Defer second-expanding the prerequisites of targets until we need
to decide if they should be built.

* NEWS: Mention the change in behavior.
* doc/make.texi (Secondary Expansion): Document the new behavior.
* src/filedef.h (struct file): Add flag snapped.
(expand_deps): Declare a function to second expand the
prerequisites of a target.
* src/file.c (rehash_file): Merge flag snapped.
(expand_deps): Remove qualifier static. Check flag snapped.
(snap_deps): Remove the loop which performed second expansion for all
targets.
* src/remake.c (update_file_1): Second expand the prerequisites of
the considered target.
* tests/scripts/features/se_explicit: Add tests.
* tests/scripts/features/se_implicit: Ditto.
* tests/scripts/features/se_statpat: Ditto.

3 years agoDisable the jobserver in non-recursive children
Paul Smith [Sun, 24 Jul 2022 18:14:32 +0000 (14:14 -0400)] 
Disable the jobserver in non-recursive children

Savannah issues such as SV 57242 and SV 62397 show how passing
references to closed file descriptors via the --jobserver-auth option
in MAKEFLAGS can lead to problematic outcomes.

When computing the child environment for a non-recursive shell, add
an extra option to MAKEFLAGS to disable the file descriptors for the
jobserver.

Unfortunately this doesn't modify the value of the make variable
MAKEFLAGS, it only modifies the value of the sub-shell environment
variable MAKEFLAGS.  This can lead to confusion if the user is not
considering the distinction.

* src/makeint.h: Publish the jobserver-auth value.  Add a global
definition of the name of the command line option.
* src/os.h (jobserver_get_invalid_auth): New function to return a
string invalidating the jobserver-auth option.
* src/w32/w32os.c (jobserver_get_invaid_auth): Implement it.  On
Windows we use a semaphore so there's no need to invalidate.
* src/posixos.c (jobserver_parse_auth): If we parse the invalid
auth string, don't set up the jobserver.
(jobserver_get_invalid_auth): Return an invalid option.
* src/variable.h (target_environment): Specify if the target
environment is for a recursive shell or non-recursive shell.
* src/variable.c (target_environment): Move checking for MAKELEVEL
into the loop rather than doing it at the end.
Along with this, check for MAKEFLAGS and MFLAGS, and update them
based on whether we're invoking a recursive or non-recursive child,
and also on whether it's necessary to invalidate the jobserver.
* src/function.c (func_shell_base): Shell functions can never be
recursive to pass 0 to target_environment().
* src/job.c (start_job_command): Specify whether the child is
recursive when calling target_environment().
* src/main.c: Export jobserver_auth.  sync_mutex doesn't need to
be exported.  Use the global definition for the option name.
* tests/scripts/variables/MAKEFLAGS: Add tests for $MAKEFLAGS.

3 years agoEnsure that MAKEFLAGS is set when invoking $(shell ...)
Paul Smith [Sat, 16 Jul 2022 23:43:34 +0000 (19:43 -0400)] 
Ensure that MAKEFLAGS is set when invoking $(shell ...)

* src/main.c (main): Don't reset the jobserver if the number of
slots has not changed.
(define_makeflags): Add all normal flags even when ALL is not set.
* tests/scripts/functions/shell: Test invoking make in $(shell ...).
* tests/scripts/variables/MAKEFLAGS: Test the value of MAKEFLAGS in
$(shell ...).

3 years agoTake advantage of mempcpy() and stpcpy()
Paul Smith [Sat, 9 Jul 2022 17:26:30 +0000 (13:26 -0400)] 
Take advantage of mempcpy() and stpcpy()

* src/makeint.h (stpcpy): Add missing declaration.
* src/amiga.c (MyExecute): Avoid extra strlen using stpcpy.
* src/function.c (func_shell_base): Ditto.
(func_error): Use memcpy() not strcpy() when we know the length.
* src/job.c (construct_command_argv_internal): Use stpcpy().
* src/main.c (main): Ditto.
(define_makeflags): Ditto.
* src/variable.c (print_target_variables): Use memcpy() when we know
the length.
* src/commands.c (set_file_variables): Use mempcpy().
* src/expand.c (variable_buffer_output): Ditto.
* src/file.c (expand_deps): Ditto.
* src/function.c (abspath): Ditto.
(handle_function): Ditto.
* src/implicit.c (pattern_search): Ditto.
* src/job.c (construct_command_argv_internal): Use mempcpy() and
don't add multiple spaces when there are no shell flags.
* src/main.c (decode_env_switches): Use mempcpy() to simplify.
(define_makeflags): Ditto.
* src/variable.c (selective_vpath_search): Ditto.

3 years agoConvert HAVE_GETLOADAVG to HAVE_DECL_GETLOADAVG
Paul Smith [Fri, 8 Jul 2022 21:20:31 +0000 (17:20 -0400)] 
Convert HAVE_GETLOADAVG to HAVE_DECL_GETLOADAVG

We want to know if getloadavg() is declared, not if we have it.

* configure.ac: Add it as a define (why is this not the default?)
* src/job.c: Conditionalize declaration on HAVE_DECL_GETLOADAVG.
* config.ami.template: Rename HAVE_GETLOADAVG to HAVE_DECL_GETLOADAVG.
* config.h-vms.template: Ditto.
* config.h.W32.template: Ditto.
Clean up and add new elements from latest config.h.

3 years agoMerge in the latest gnulib findprog-in module
Paul Smith [Sat, 9 Jul 2022 15:08:49 +0000 (11:08 -0400)] 
Merge in the latest gnulib findprog-in module

3 years agoMerge in the latest gnulib concat-filename module
Paul Smith [Sat, 9 Jul 2022 15:07:23 +0000 (11:07 -0400)] 
Merge in the latest gnulib concat-filename module

3 years agoMerge in the latest gnulib getloadavg module
Paul Smith [Sat, 9 Jul 2022 15:05:14 +0000 (11:05 -0400)] 
Merge in the latest gnulib getloadavg module

3 years agoInitial merge of the gnulib-port branch
Paul Smith [Sat, 9 Jul 2022 14:56:05 +0000 (10:56 -0400)] 
Initial merge of the gnulib-port branch

3 years agoMove our local m4 macros to gl/m4
Paul Smith [Thu, 7 Jul 2022 05:38:26 +0000 (01:38 -0400)] 
Move our local m4 macros to gl/m4

The gl subdirectory contains our local versions of gnulib module
implementations, so move m4/acinclude.m4 and m4/dospaths.m4 there.

* gl/modules/make-macros: Create a new module to handle the macros.
* bootstrap.conf: Add the new module.
* configure.ac: Macro invocation is moved to make-macros.
* m4/.gitignore: Delete unnecessary ignore file: m4 is empty.
* .gitignore: Add m4/ as an ignored directory.

3 years agoMove our fnmatch/glob implementation into gl/lib
Paul Smith [Thu, 7 Jul 2022 05:18:45 +0000 (01:18 -0400)] 
Move our fnmatch/glob implementation into gl/lib

The gl subdirectory contains our local versions of gnulib module
implementations, so move fnmatch* and glob* from lib to gl/lib.

* gl/modules/make-glob: Add a proper Files: section.
* lib/.gitignore: Delete unnecessary ignore file: lib is empty.
* .gitignore: Add lib/ as an ignored directory.

3 years ago* tests/run_make_tests.pl: Exit 1 if we detect an error.
Paul Smith [Wed, 6 Jul 2022 03:45:40 +0000 (23:45 -0400)] 
* tests/run_make_tests.pl: Exit 1 if we detect an error.

3 years ago* configure.ac: Remove AC_FUNC_SETVBUF_REVERSED.
Paul Smith [Mon, 4 Jul 2022 22:18:01 +0000 (18:18 -0400)] 
* configure.ac: Remove AC_FUNC_SETVBUF_REVERSED.

This macro is obsolete: no useful system has this problem anymore.
* src/output.c (output_init): Remove reference to SETVBUF_REVERSED.
* src/config.ami.template: Remove undef of SETVBUF_REVERSED.
* src/config.h-vms.template: Ditto.
* src/config.h.W32.template: Ditto.

3 years ago* configure.ac: Check for stpcpy() support.
Paul Smith [Mon, 4 Jul 2022 22:10:08 +0000 (18:10 -0400)] 
* configure.ac: Check for stpcpy() support.

* src/misc.c (stpcpy): Define it if not provided.

3 years agogetloadavg: Remove support for privileged invocation
Paul Smith [Mon, 4 Jul 2022 21:30:42 +0000 (17:30 -0400)] 
getloadavg: Remove support for privileged invocation

This was needed when getloadavg required privileged access; in this
case GNU make needed to be installed as a setgid program.  But this
hasn't been supported by gnulib getloadavg() since 2011 and systems
are no longer using it, so remove it.

* src/makeint.h (user_access): Remove unnecessary function.
(make_access): Ditto.
(child_access): Ditto.
* src/misc.c: Remove implementations of the *_access() functions.
* src/main.c (main): Remove unneeded call to user_access().
* src/job.c (load_too_high): Remove calls to {make,user}_access().
(exec_command): Remove call to child_access().
* src/remote-cstms.c: Remove calls to these methods.  I suppose it
might be possible this is needed and was piggy-backing on the
privileged setting but since that's been broken for a while I doubt
this is needed.  If so we can bring back the implementation into
this source file.
* src/config.h.W32.template: Remove GETLOADAVG_PRIVILEGED undef.
* src/config.h-vms.template: Ditto.
* src/config.ami.template: Ditto.

3 years ago* maintMakefile: Allow checkcfg rules to succeed.
Paul Smith [Mon, 4 Jul 2022 21:20:30 +0000 (17:20 -0400)] 
* maintMakefile: Allow checkcfg rules to succeed.

We can no longer pass our mondo-warnings options to the builds,
as these will impact all the code including gnulib code, and this
won't work.  Also allow the caller to disable either the build.sh
or makefile invocation, for testing.
* Makefile.am: Allow the caller to reset the path to the make
binary to be tested.  Remove c90 test: gnulib doesn't support it.

3 years ago* build.sh: Manage libgnu_a-prefixed source files
Paul Smith [Sun, 26 Jun 2022 20:35:25 +0000 (16:35 -0400)] 
* build.sh: Manage libgnu_a-prefixed source files

3 years agobootstrap: Remove strerror()
Paul Smith [Sun, 26 Jun 2022 20:49:52 +0000 (16:49 -0400)] 
bootstrap: Remove strerror()

* bootstrap.conf: Remove strerror module
* configure.ac: Add a check for strerror
* src/misc.c: Add a default strerror() if not found

3 years agobootstrap: Remove strtoll()
Paul Smith [Sun, 26 Jun 2022 20:33:30 +0000 (16:33 -0400)] 
bootstrap: Remove strtoll()

This pulls in entirely too much stuff we don't need.  Instead grab
just the gnulib source file, then include it in src/misc.c.

* bootstrap.conf: Add just the lib/strtol.c source file.
* configure.ac: Check for strtoll.
* src/misc.c: Include strtol.c, with QUAD set, if needed.

3 years agobootstrap: Remove gnulib version of mempcpy()
Paul Smith [Sun, 26 Jun 2022 19:55:25 +0000 (15:55 -0400)] 
bootstrap: Remove gnulib version of mempcpy()

This pulls in a metric ton of stuff that we otherwise don't need, just
for a one-liner that we already have a replacement for in src/misc.c.

* bootstrap.conf: Remove mempcpy
* configure.ac: Add mempcpy to AC_CHECK_FUNCS

3 years agoRun autoupdate and clean up autoconf usage
Paul Smith [Mon, 4 Jul 2022 13:47:24 +0000 (09:47 -0400)] 
Run autoupdate and clean up autoconf usage

We can assume that the return type of a signal handler is void.
We can assume that, if sys/time.h exists, it can be included
with time.h.

* bootstrap: Get the latest version
* configure.ac: Require a newer version of autoconf.
Remove unnecessary AC_PROG_CC_C99 (already have AC_PROC_CC).
Remove unnecessary AC_AIX, AC_ISC_POSIX, AC_MINIX.
Remove unnecessary AC_HEADER_STDC, AC_HEADER_TIME, AC_TYPE_SIGNAL.
Use strerror to search for the cposix library.
* src/commands.c (fatal_error_signal): Assume return type is void.
* src/commands.h: Ditto.
* src/job.c: Ditto.
* src/job.h: Ditto.
* src/main.c: Ditto.
* src/makeint.h: Ditto.
Don't bother with TIME_WITH_SYS_TIME.
* src/remote-cstms.c: Check HAVE_SYS_TIME_H.
* src/config.ami.template: Remove RETSIGTYPE.
* src/config.h-vms.template: Ditto.
* src/config.h.W32.template: Ditto.
Remove TIME_WITH_SYS_TIME.

3 years ago[SV 10593] Export variables to $(shell ...) commands
Paul Smith [Sun, 19 Jun 2022 00:25:30 +0000 (20:25 -0400)] 
[SV 10593] Export variables to $(shell ...) commands

Export all variables, including exported makefile variables, when
invoking a shell for the $(shell ...) function.  If we detect a
recursive variable expansion, silently ignore that variable and do
not export it.  We do print a debug message.

* NEWS: Announce the potential backward-incompatibility.
* doc/make.texi (Shell Function): Document the export behavior.
* src/main.c (main): Add "shell-export" to .FEATURES.
* src/job.h: New function to free struct childbase.
* src/job.c (free_childbase): Implement it; call from free_child.
* src/function.c (func_shell_base): Use target_environment() to
obtain the proper environment for the shell function.
Use free_childbase() to free memory.
(windows32_openpipe): Don't reset the environment: the caller
already provided a proper PATH variable in envp.
* src/variable.c (target_environment): If we detect a recursive
expansion and we're called from func_shell, ignore the variable.
(sync_Path_environment): Simplify and reduce memory allocation.
* tests/scripts/functions/shell: Add tests for this.

3 years ago[SV 62650] Show correct warning when combining targets
Dmitry Goncharov [Sun, 19 Jun 2022 17:44:09 +0000 (13:44 -0400)] 
[SV 62650] Show correct warning when combining targets

* src/file.c (rehash_file): Fix warning message.
(rehash_file): Fix comment to match the behavior.
* tests/scripts/features/se_explicit: Fix test.
* tests/scripts/features/mult_rules: Add a new test.

3 years ago[SV 62514] Honor command line interface flags
Dmitry Goncharov [Sat, 18 Jun 2022 21:14:46 +0000 (17:14 -0400)] 
[SV 62514] Honor command line interface flags

Commit f2771aa614 introduced a bug where some switches were left out
of MAKEFLAGS.  Instead of resetting switches, get the same results by
filtering out duplicates.

* src/makeint.h: Remove reset_switches.
* src/main.c: (reset_switches): Remove reset_switches.
* (main): Remove call to reset_switches.
* (decode_switches): Filter out duplicate flags.
* src/variable.c: (set_special_var):  Remove call to reset_switches.
* tests/scripts/variables/MAKEFLAGS: Verify that duplicate flags are
properly filtered out.

3 years agoAdd gnulib findprog-in
Paul Smith [Mon, 4 Jul 2022 20:09:13 +0000 (16:09 -0400)] 
Add gnulib findprog-in

3 years agoAdd gnulib concat-filename
Paul Smith [Mon, 4 Jul 2022 22:54:22 +0000 (18:54 -0400)] 
Add gnulib concat-filename

3 years agoAdd gnulib getloadavg
Paul Smith [Mon, 4 Jul 2022 20:32:08 +0000 (16:32 -0400)] 
Add gnulib getloadavg

3 years agoInitial gnulib-port branch commit
Paul Smith [Mon, 4 Jul 2022 20:02:59 +0000 (16:02 -0400)] 
Initial gnulib-port branch commit

3 years agoDon't add GNUMAKEFLAGS to the environment
Paul Smith [Sun, 19 Jun 2022 18:33:57 +0000 (14:33 -0400)] 
Don't add GNUMAKEFLAGS to the environment

If GNUMAKEFLAGS was not present in the environment when we started,
don't add it.

* src/main.c (main): Don't mess with GNUMAKEFLAGS unless it exists.
* tests/scripts/variables/GNUMAKEFLAGS: Test this behavior.

3 years ago* tests/test_driver.pl: Don't freak if diff can't be found
Paul Smith [Sat, 18 Jun 2022 20:42:37 +0000 (16:42 -0400)] 
* tests/test_driver.pl: Don't freak if diff can't be found

3 years ago* build_w32.bat [WIN]: Use call for all invocations
Paul Smith [Sat, 18 Jun 2022 20:42:11 +0000 (16:42 -0400)] 
* build_w32.bat [WIN]: Use call for all invocations

3 years agoAvoid overwriting buffers with long pathnames
Paul Smith [Fri, 17 Jun 2022 23:55:11 +0000 (19:55 -0400)] 
Avoid overwriting buffers with long pathnames

Reported, with initial patch, by Gisle Vanem <gvanem@online.no>

* src/main.c (find_and_set_default_shell) [W32]: Pass search_token
directly to w32ify: no need to make a copy first.  When we need to
construct a path, use snprintf() to be sure we don't overwrite
the locally-allocated buffer.
* src/w32/pathstuff.c (w32ify) [W32]: Use the malloc version of
_fullpath(), followed by strncpy(), to avoid overwriting buffers.

3 years ago* tests/scripts/features/temp_stdin: Remove nested "my"
Paul Smith [Sat, 4 Jun 2022 22:54:22 +0000 (18:54 -0400)] 
* tests/scripts/features/temp_stdin: Remove nested "my"

* tests/scripts/features/statipattrules: Remove unset variable refs.

3 years ago* tests/scripts/features/archives: Fix typo
Dmitry Goncharov [Sat, 4 Jun 2022 22:34:33 +0000 (18:34 -0400)] 
* tests/scripts/features/archives: Fix typo

3 years ago[SV 62100] Add '--shuffle' option support
Sergei Trofimovich [Sat, 4 Jun 2022 19:48:01 +0000 (15:48 -0400)] 
[SV 62100] Add '--shuffle' option support

Introduce non-deterministic ordering into goal and prerequisite
traversal to help tease out inconsistent failures that may happen
when running in parallel build mode.

Introduce second order into each dependency chain:
1. Existing order is syntactic order reachable via 'dep->next'
2. New order is shuffled order stored as 'dep->shuf' in each 'dep'

When updating goals and prerequisites and '--shuffle' is provided,
use the shuffled order to walk the graph.  When automatic variable
are set always use the syntactic order of parameters.

* Makefile.am: Add new src/shuffle.c and src/shuffle.h file.
* build_w32.bat: Ditto.
* builddos.bat: Ditto.
* makefile.com: Ditto.
* po/POTFILES.in: Ditto.
* doc/make.texi: Add documentation for --shuffle.
* doc/make.1: Ditto.
* src/dep.h (DEP): Add the shuf pointer.
* src/filedef.h (struct file): Add was_shuffled flag.
* src/main.c: (shuffle_mode): Global flag for the shuffle mode.
(usage): Add the --shuffle option.
(switches): Ditto.
(main): Set shuffle_mode based on the command line parameter.
Reshuffle prerequisites if requested.
* src/remake.c (update_goal_chain): Walk the shuffled list if enabled.
(update_file_1): Ditto.
* src/shuffle.h: Provide an interface for shuffling prerequisites.
* src/shuffle.c: Implement option parsing and prerequisite shuffling.
* tests/scripts/options/shuffle: Test shuffle option and modes.

3 years ago* src/misc.c (make_toui): Parse a string into an unsigned int
Paul Smith [Sat, 4 Jun 2022 21:44:21 +0000 (17:44 -0400)] 
* src/misc.c (make_toui): Parse a string into an unsigned int

* src/makeint.h: Declare it.
* src/arscan.c (ar_scan): Replace atoi() calls with make_toui().
Modify some integral types to be more correct.
* src/job.c (load_too_high): Replace atoi() calls with make_toui().
* src/main.c (main): Ditto.
(decode_switches): Ditto.

3 years ago* src/misc.c (make_pid): A function to return the PID
Paul Smith [Sat, 4 Jun 2022 20:48:26 +0000 (16:48 -0400)] 
* src/misc.c (make_pid): A function to return the PID

* src/makeint.h: Declare it.
* src/commands.c (fatal_error_signal): Call it.

3 years ago* po/LINGUAS: Add a translation for Romanian
Paul Smith [Sat, 4 Jun 2022 21:04:13 +0000 (17:04 -0400)] 
* po/LINGUAS: Add a translation for Romanian

3 years agoReplace strcmp() with memcmp() where possible
Noah Goldstein [Sun, 24 Apr 2022 21:43:56 +0000 (17:43 -0400)] 
Replace strcmp() with memcmp() where possible

memcmp() is always faster than strcmp().  In places where we already
know that both buffers have sufficient size, replace strcmp() with
memcmp().

* src/main.c (main): Replace strncmp() with memcmp()==0.
* src/read.c (word1eq): Ditto.
* src/commands.c (set_file_variables): Ditto.
* src/function.c (func_filter_filterout): Ditto.
(a_word_hash_cmp): Use STRING_N_COMPARE since we know the length.
(func_sort): Replace strcmp() with memcmp().

3 years agohash: Remove unnecessary isupper() check before tolower()
Noah Goldstein [Sun, 24 Apr 2022 21:39:35 +0000 (17:39 -0400)] 
hash: Remove unnecessary isupper() check before tolower()

The standard requires that tolower() returns its argument if there's
no valid lowercase conversion: it's not necessary to check isupper()
before invoking tolower().

Comparing the performance of the old ISTRING_HASH to the new one
on all the files present in GLIBC.

  Data Type            Old Time   New Time
  Alternating case    24985.754  13883.422
  random case         35211.777  13569.051
  all lower           18818.974  13706.645
  all upper           38859.454  13506.315

* src/hash.h (ISTRING_HASH_1): Omit isupper() check.
(ISTRING_HASH_2): Ditto.

3 years ago[SV 62206] Fix %-substitution in second expansion of pattern rules
Dmitry Goncharov [Sun, 24 Apr 2022 21:10:46 +0000 (17:10 -0400)] 
[SV 62206] Fix %-substitution in second expansion of pattern rules

During second expansion of pattern rules only the first pattern in
each "group" was being substituted.  E.g. in this makefile:

  .SECONDEXPANSION:
  all: hello.x
  %.x: $$(wordlist 1, 99, %.1 %.%.2) ; $(info $@ from $^)
  hello.1 hello.\%.2 \%.1 \%.\%.2: ;

the output would build "hello.1" and "%.%.2" because each function
is considered a single "word" and only the first pattern is replaced.

Fix the expansion so each whitespace-separated string is considered a
word and the first pattern is replaced, giving "hello.1" and
"hello.%.2".

* src/rule.c (snap_implicit_rules): Keep enough space to replace %
with $(*F) if necessary.
* src/implicit.c (pattern_search): During second expansion break each
get_next_word result into individual words and replace the first % in
each with $* or $(*F) as needed.
* tests/scripts/features/patternrules: Add tests for variations.

3 years ago[SV 62175] Rework secondary expansion tests
Dmitry Goncharov [Sun, 24 Apr 2022 18:56:26 +0000 (14:56 -0400)] 
[SV 62175] Rework secondary expansion tests

The hash function we use can yield different results on big- and
little-endian systems which makes test output different.  Choose
names to avoid this.

* tests/scripts/features/patternrules: Choose portable target names.
* tests/scripts/features/se_explicit: Ditto.
* tests/scripts/features/se_implicit: Ditto.

3 years ago* Makefile.am (check-regression): Rename jhelp to thelp
Paul Smith [Sun, 24 Apr 2022 14:50:03 +0000 (10:50 -0400)] 
* Makefile.am (check-regression): Rename jhelp to thelp

3 years ago* tests/scripts/options/dash-f: [SV 62118] Close STDIN
Paul Smith [Sun, 24 Apr 2022 14:40:10 +0000 (10:40 -0400)] 
* tests/scripts/options/dash-f: [SV 62118] Close STDIN

On Windows we can't delete open files, so close STDIN before
removing the temporary input file.

3 years ago* tests/scripts/features/reinvoke: [SV 62088] Close STDIN
Paul Smith [Sun, 24 Apr 2022 14:38:12 +0000 (10:38 -0400)] 
* tests/scripts/features/reinvoke: [SV 62088] Close STDIN

On Windows we can't delete open files, so close STDIN before
removing the temporary input file.

3 years ago* tests/test_driver.pl (run_all_tests): Keep one copy of STDIN
Paul Smith [Sun, 24 Apr 2022 17:34:15 +0000 (13:34 -0400)] 
* tests/test_driver.pl (run_all_tests): Keep one copy of STDIN

3 years ago* Makefile.am: Add INSTALL to the EXTRA_DIST files
Paul Smith [Sun, 24 Apr 2022 13:48:41 +0000 (09:48 -0400)] 
* Makefile.am: Add INSTALL to the EXTRA_DIST files

3 years ago[SV 62356] If -R is set in the makefile, disable -r
Dmitry Goncharov [Sun, 24 Apr 2022 00:46:32 +0000 (20:46 -0400)] 
[SV 62356] If -R is set in the makefile, disable -r

If -R is given on the command line it implies -r as well; make this
same assumption if -R is provided in MAKEFLAGS set in the makefile.

* src/main.c (main): Check no_builtin_variables_flag after reading
makefiles.
* tests/scripts/options/dash-r: Add a test.

3 years ago[SV 62324] Simplify set_file_variables by passing in the stem
Dmitry Goncharov [Sun, 24 Apr 2022 00:34:18 +0000 (20:34 -0400)] 
[SV 62324] Simplify set_file_variables by passing in the stem

Previously we always used the file->stem value as our stem in
set_file_variables(); when that wasn't correct we had to temporarily
set that value while the function was called, then reset it afterward.
This led to issues (for example when we assumed the stem was a cached
string but it wasn't).

Avoid this by passing in the stem as an argument so that different
values can be provided.

Add tests to verify this.

* src/commands.c (set_file_variables): Take second parameter stem to
relieve the callers of set_file_variables() from setting/restoring
file->stem.
* src/commands.h (set_file_variables): Ditto.
(execute_file_commands): Pass file->stem to set_file_variables().
* src/file.c (expand_deps): Pass d->stem to set_file_variables() and
remove set and restore of file->stem.
* src/implicit.c (pattern_search): Pass stem to set_file_variables()
and remove set and restore of file->stem.
* tests/scripts/features/se_explicit: Add new tests.
* tests/scripts/features/se_implicit: Ditto.
* tests/scripts/features/se_statpat: Ditto.
* tests/scripts/variables/automatic: Ditto.

3 years ago[SV 62278] Only expand the first pattern during secondary expansion
Dmitry Goncharov [Sun, 24 Apr 2022 00:21:31 +0000 (20:21 -0400)] 
[SV 62278] Only expand the first pattern during secondary expansion

During normal pattern rule expansion only the first pattern (%) is
expanded; however during secondary expansion all patterns were
expanded.  Modify secondary expansion to match the behavior of normal
expansion.

Implementation tweaked by Paul Smith <psmith@gnu.org>

* src/file.c (expand_deps): Don't use subst_expand() which replaces
all % with $*: instead replace only the first one, by hand.
Fix a memory leak where the dep structure was not always freed.
* tests/scripts/features/statipattrules: Use .RECIPEPREFIX not TAB.
Add a series of tests verifying that static pattern rules with and
without secondary expansion both return the same results.

3 years ago* src/commands.h: [SV 62213] Forward-declare struct file / child
Paul Smith [Sat, 23 Apr 2022 21:13:26 +0000 (17:13 -0400)] 
* src/commands.h: [SV 62213] Forward-declare struct file / child

3 years ago* tests/test_driver.pl (toplevel): [SV 62174] Enforce the C locale
Paul Smith [Sat, 23 Apr 2022 20:45:15 +0000 (16:45 -0400)] 
* tests/test_driver.pl (toplevel): [SV 62174] Enforce the C locale

3 years ago[SV 62173] Fix archive tests for non-GNU systems
Paul Smith [Sat, 23 Apr 2022 20:30:02 +0000 (16:30 -0400)] 
[SV 62173] Fix archive tests for non-GNU systems

Original patch from Dmitry Goncharov <dgoncharov@users.sf.net>

Fix the ar flags to match the default values in make.  If the
U option is supported, add it to the end not the beginning,
since ARFLAGS now starts with a "-".

* tests/test_driver.pl: Add defaults for global variables.
(get_osname): Preserve $osname if it's set from $^O
* tests/scripts/features/archive: Set the default arflags.
If "U" is available add it to the end of the flags.

3 years ago* tests/scripts/options/dash-l: [SV 62172] Skip if not available
Dmitry Goncharov [Sat, 23 Apr 2022 19:53:36 +0000 (15:53 -0400)] 
* tests/scripts/options/dash-l: [SV 62172] Skip if not available

3 years ago* src/read.c (check_specials): [SV 62171] Reset ARFLAGS under .POSIX
Dmitry Goncharov [Sat, 23 Apr 2022 19:47:52 +0000 (15:47 -0400)] 
* src/read.c (check_specials): [SV 62171] Reset ARFLAGS under .POSIX

3 years ago[SV 62145] Remove a stdin temp file on re-exec failure.
Dmitry Goncharov [Sat, 23 Apr 2022 19:33:41 +0000 (15:33 -0400)] 
[SV 62145] Remove a stdin temp file on re-exec failure.

If the re-exec fails, be sure to remove a temp makefile that was
created to read from stdin.

* src/job.c (exec_command): Return on failure.
(child_execute_job): Call exit if exec_command returns.
* src/job.h (exec_command): Don't mark as NORETURN.
* src/main.c (main): Unlink stdin temporary file if re-exec fails.
* tests/run_make_tests.pl: Get value for ERR_nonexe_file/ERR_exe_dir.
* tests/scripts/features/temp_stdin: Test that temp file unlink works.

3 years ago* tests/scripts/features/errors: Fix Perl warnings
Paul Smith [Mon, 18 Apr 2022 20:57:06 +0000 (16:57 -0400)] 
* tests/scripts/features/errors: Fix Perl warnings

* tests/scripts/options/dash-f: Ditto.

3 years ago[SV 62118] Correctly handle -f- options on re-exec
Paul Smith [Sun, 27 Feb 2022 20:24:19 +0000 (15:24 -0500)] 
[SV 62118] Correctly handle -f- options on re-exec

The -f, -file, and --makefile options were not properly handled when
re-exec'ing due to makefile updates.  This problem, plus a patch and
tests, was reported by Dmitry Goncharov <dgoncharov@users.sf.net>.

While examining this I found another bug: after re-exec we forgot the
batch file was temporary and never deleted it.

I decided to fix all these problems at once using a different fix
than Dmitry's: I created a new internal-only command-line option,
--temp-stdin.  When reconstructing the make options for a re-exec,
replace the -f/--file/--makefile option that reads from stdin with
--temp-stdin=<filename> so that the re-exec'd version of make knows
it's a temporary batch file and will delete it.

We no longer need to add the -o options because the re-exec'd make
knows this is a temporary makefile and treats it as such.

To simplify, replace the --file and --makefile options taking a
filename, with just -f<filename> on re-exec.

Some examples of the rewrite:

  User command line               Re-exec command line
  -----------------               --------------------
  -f-                             --temp-stdin=<batch>
  --file -                        --temp-stdin=<batch>
  -f - --makefile a.mk            --temp-stdin=<batch> -fa.mk
  --file=a.mk                     -fa.mk
  -fa.mk                          -fa.mk
  -Rf a.mk                        -Rf a.mk
  -Rf-                            -R --temp-stdin=<batch>

* src/main.c (stdin_offset): Remember the offset into the makefiles
list of the batch file read from stdin.  Remove stdin_nm.
(struct command_switch): Create a new --temp-stdin option, which
also updates the makefiles list.
(main): Add the temporary filename to the string cache.
Move the tempfile handling after checking makefile arguments for "-"
so that files provided via --temp-stdin are also handled specially.
When rewriting re-exec options, we may need one more than we had
originally so create a new argv list.  Walk through the original
list and convert it to the new list, following the above process.
(decode_switches): Set the stdin_offset flag if we see --temp-stdin.
* tests/scripts/options/dash-f: Add many more tests, provided by
Dmitry Goncharov <dgoncharov@users.sf.net>.

3 years ago* tests/scripts/variables/MAKE_RESTARTS: Remove TAB chars
Paul Smith [Sun, 27 Feb 2022 20:14:40 +0000 (15:14 -0500)] 
* tests/scripts/variables/MAKE_RESTARTS: Remove TAB chars

3 years ago* README.git: Fix compiler options for ASAN
Paul Smith [Sun, 27 Feb 2022 20:14:12 +0000 (15:14 -0500)] 
* README.git: Fix compiler options for ASAN

3 years agoRemove extraneous characters from fatal() calls
Paul Smith [Sat, 26 Feb 2022 23:30:00 +0000 (18:30 -0500)] 
Remove extraneous characters from fatal() calls

The fatal() method adds ".  Stop.\n" to every message.

* src/amiga.c (MyExecute): Remove newline from fatal() message.
* src/job.c (<various>): Ditto.
* src/file.c (snap_deps): Remove "." from fatal() message.
* src/main.c (main): Ditto.
* src/load.c: Ditto.
* tests/scripts/targets/NOTINTERMEDIATE: Fix expected output.

3 years ago* src/main.c: Ensure the stdin temp file is deleted when dying.
Paul Smith [Sat, 26 Feb 2022 22:17:20 +0000 (17:17 -0500)] 
* src/main.c: Ensure the stdin temp file is deleted when dying.

3 years ago[SV 62088] Avoid re-exec due to stdin.
Dmitry Goncharov [Sat, 26 Feb 2022 22:12:03 +0000 (17:12 -0500)] 
[SV 62088] Avoid re-exec due to stdin.

The fix for SV 60595 causes make to re-execute when the makefile is
read from stdin.  E.g.
    $ printf 'all:; $(info hello)' | make -sf -

Reported by Sergei Trofimovich <siarheit@google.com>
Test added by Paul Smith <psmith@gnu.org>

* src/main.c (main): Set the mtime of the stdin temporary file.
* tests/scripts/features/reinvoke: Add a test.

3 years agotests: Allow run_make_test() to avoid passing -f
Paul Smith [Sat, 26 Feb 2022 22:19:42 +0000 (17:19 -0500)] 
tests: Allow run_make_test() to avoid passing -f

We already use undef makefile strings to mean "re-use the previous
makefile", so if the string is empty we'll assume it means "don't
use a makefile at all" (don't add -f).

* tests/run_make_tests.pl (run_make_test): If the makefile string
is empty, don't create a makefile or add -f.
* tests/scripts/features/include: Change empty makefile to "\n".
* tests/scripts/misc/close_stdout: Ditto.
* tests/scripts/options/dash-r: Ditto.

3 years agotests: Preserve Windows temp environment variables
Paul Smith [Sun, 27 Feb 2022 22:44:16 +0000 (17:44 -0500)] 
tests: Preserve Windows temp environment variables

* src/main.c (main): Show the temp filename on error.  Also on
Windows prefer TMP, then TEMP, and only lastly TMPDIR.
* tests/test_driver.pl: Add TMP, TEMP, and USERPROFILE to the list
of environment variables to preserve.

3 years ago* tests/test_driver.pl: Support STDIN redirection.
Paul Smith [Sat, 26 Feb 2022 22:19:26 +0000 (17:19 -0500)] 
* tests/test_driver.pl: Support STDIN redirection.

Before running tests, duplicate STDIN then reset it after the test
completes.  Also when -keep is provided, preserve the base and run
files.

3 years agoEnsure buffers are large enough for integer values
Paul Smith [Mon, 21 Feb 2022 14:29:41 +0000 (09:29 -0500)] 
Ensure buffers are large enough for integer values

Issue raised by Sergei Trofimovich <siarheit@google.com>

* src/makeint.h (INTSTR_LENGTH): Update for unsigned values.
* src/function.c (func_lastword): Use INTSTR_LENGTH as buffer size.
(shell_function_completed): Ditto.
(func_call): Ditto.
* src/remote-cstms.c (start_remote_job): Ditto.

3 years ago* <all>: Update copyright notices.
Paul Smith [Thu, 10 Feb 2022 19:48:26 +0000 (14:48 -0500)] 
* <all>: Update copyright notices.

3 years ago* doc/make.1: Use "target" from the SYNOPSIS.
Paul Smith [Sun, 6 Feb 2022 22:53:48 +0000 (17:53 -0500)] 
* doc/make.1: Use "target" from the SYNOPSIS.

Reported by Helge Kreutzmann <debian@helgefjell.de>

3 years agoDon't write $(shell ...) stdout to stderr on failure
Paul Smith [Sun, 6 Feb 2022 21:22:40 +0000 (16:22 -0500)] 
Don't write $(shell ...) stdout to stderr on failure

If a $(shell ...) invocation failed due to a command-not-found error,
make wrote the stdout of that shell to our stderr for some reason.
That seems very wrong.

If the command's stderr was not redirected then its output would have
already been written to its stderr, and if it was redirected then we
shouldn't take it upon ourselves to force it to go to stderr!

* src/function.c (func_shell_base): Append shell stdout even if the
shell command failed.
* tests/run_make_tests.pl: Determine the error generated for
command-not-found situations.
* tests/scripts/functions/shell: Verify that redirecting stderr to
stdout will behave properly if the command is not found.

3 years ago* Basic.mk.template: Allow arguments to the check target.
Paul Smith [Mon, 24 Jan 2022 06:16:58 +0000 (01:16 -0500)] 
* Basic.mk.template: Allow arguments to the check target.

3 years ago[SV 61805] Support quoted whitespace in .SHELLFLAGS with .ONESHELL
Dmitry Goncharov [Mon, 24 Jan 2022 05:57:28 +0000 (00:57 -0500)] 
[SV 61805] Support quoted whitespace in .SHELLFLAGS with .ONESHELL

* src/job.c (construct_command_argv_internal): Call recursively to
parse .SHELLFLAGS when .ONESHELL is active.
* tests/scripts/targets/ONESHELL: Add tests.

3 years ago* tests/scripts/features/double_colon: Update for modern tests.
Paul Smith [Sun, 23 Jan 2022 20:46:56 +0000 (15:46 -0500)] 
* tests/scripts/features/double_colon: Update for modern tests.

3 years ago* tests/scripts/features/implicit_search: Add -r for safety.
Paul Smith [Sun, 23 Jan 2022 16:41:46 +0000 (11:41 -0500)] 
* tests/scripts/features/implicit_search: Add -r for safety.

3 years ago[SV 48643] Add more tests of intermediates and unrelated targets
Dmitry Goncharov [Fri, 21 Jan 2022 23:37:44 +0000 (18:37 -0500)] 
[SV 48643] Add more tests of intermediates and unrelated targets

If a prereq of a pattern is explicitly mentioned as a prereq of an
unrelated rule, it should not be considered an intermediate file.

* tests/scripts/features/double_colon: Add tests mentioning unrelated
explicit targets.
* tests/scripts/features/grouped_targets: Ditto.
* tests/scripts/features/implicit_search: Ditto.
* tests/scripts/features/patternrules: Ditto.
* tests/scripts/features/se_implicit: Ditto.
* tests/scripts/features/statipattrules: Ditto.

3 years ago[SV 48643] Make prereqs mentioned in unrelated rules explicit
Dmitry Goncharov [Fri, 21 Jan 2022 23:29:23 +0000 (18:29 -0500)] 
[SV 48643] Make prereqs mentioned in unrelated rules explicit

* src/implicit.c (pattern_search): Set is_explicit when a prereq
is mentioned in an unrelated rule.

3 years ago* src/implicit.c (pattern_search): [SV 61864] Fix debug output.
Dmitry Goncharov [Thu, 20 Jan 2022 07:19:52 +0000 (02:19 -0500)] 
* src/implicit.c (pattern_search): [SV 61864] Fix debug output.

3 years agoAvoid interleaved $(info ) output
Paul Smith [Wed, 19 Jan 2022 23:49:19 +0000 (15:49 -0800)] 
Avoid interleaved $(info ) output

Since $(info ) function output is written using two system calls for
the message and the newline, it's possible for output from another
parallel make job to sneak in between them.

Reported by Paul Eggert <eggert@cs.ucla.edu>, who saw the report from
Lars Ingebrigtsen <https://bugs.gnu.org/53358>.

* src/function.c (func_error): Paul provided a fix but instead I
rewrote the entire function: it's not possible for it to be invoked
with anything other than exactly one argument so don't worry about
re-combining the arguments.

3 years ago* tests/scripts/features/implicit_search: [SV 48643] Cleanups.
Paul Smith [Thu, 20 Jan 2022 00:45:12 +0000 (19:45 -0500)] 
* tests/scripts/features/implicit_search: [SV 48643] Cleanups.

3 years ago* src/implicit.c (pattern_search): Use const ptrs when possible.
Paul Smith [Wed, 19 Jan 2022 22:43:57 +0000 (17:43 -0500)] 
* src/implicit.c (pattern_search): Use const ptrs when possible.

Change suggested by Joe Filion <joefilion4@gmail.com>

3 years ago* src/job.c (load_too_high): Re-enable Linux /proc/loadavg checks.
Paul Smith [Wed, 19 Jan 2022 18:44:22 +0000 (13:44 -0500)] 
* src/job.c (load_too_high): Re-enable Linux /proc/loadavg checks.

Further experimentation shows that my previous thinking that there
was a problem using this was woefully mistaken.  The value generated
by the kernel shows runn*ABLE* processes not runn*ING* processes.
* NEWS: Announce the change.

3 years ago* doc/make.texi (Using One Shell): Correct example to use $<.
Paul Smith [Tue, 18 Jan 2022 21:06:24 +0000 (16:06 -0500)] 
* doc/make.texi (Using One Shell): Correct example to use $<.

3 years ago* src/function.c (parse_textint): Handle ints without 0 properly.
Jouke Witteveen [Tue, 18 Jan 2022 00:11:59 +0000 (19:11 -0500)] 
* src/function.c (parse_textint): Handle ints without 0 properly.

* tests/scripts/functions/intcmp: Add tests for values without 0.

3 years ago[SV 61226] Revert changes to detect missing included files
Paul Smith [Mon, 17 Jan 2022 23:23:42 +0000 (18:23 -0500)] 
[SV 61226] Revert changes to detect missing included files

The fix for SV 60595 introduced a backward-incompatibility: rules that
purported to rebuild included files, but didn't actually do so, were
treated as errors whereas before they were ignored.  This breaks a
common idiom in makefiles where an empty recipe is created for an
included makefile so make doesn't complain if it doesn't exist.

Unfortunately this means make cannot diagnose some types of errors.

Extra tests supplied by Dmitry Goncharov <dgoncharov@users.sf.net>.

* doc/make.texi (Including Other Makefiles): Clarify this behavior.
* src/main.c (main): Don't run the new check-for-errors behavior.
* tests/scripts/features/reinvoke: Reset tests of the "old" behavior
and add new tests for this situation.

3 years agoEnsure that loaded functions increment the command count
Paul Smith [Mon, 17 Jan 2022 22:15:00 +0000 (17:15 -0500)] 
Ensure that loaded functions increment the command count

Since we don't know what a loaded function (via Guile or load) may
do, increment the command count just in case.

* src/function.c (struct file_table_entry): New adds_command bool.
(FT_ENTRY): Initialize it to 0 for built-in functions.
(expand_builtin_function): If adds_command, increment the count.
(define_new_function): Set adds_command for loaded functions.

3 years ago* src/read.c (tilde_expand): Put back '/' before returning.
Paul Smith [Sat, 8 Jan 2022 22:31:56 +0000 (17:31 -0500)] 
* src/read.c (tilde_expand): Put back '/' before returning.

Joe Filion <joefilion4@gmail.com> noted that the string is modified,
and Henrik Carlqvist <hc94@poolhem.se> noticed that it wasn't put
back in all cases.

3 years ago* tests/scripts/targets/INTERMEDIATE: Rewrite for new test method
Paul Smith [Wed, 29 Dec 2021 20:27:04 +0000 (15:27 -0500)] 
* tests/scripts/targets/INTERMEDIATE: Rewrite for new test method

3 years agoDo not force targets to be SECONDARY
Paul Smith [Wed, 29 Dec 2021 19:44:46 +0000 (14:44 -0500)] 
Do not force targets to be SECONDARY

In SV 43677 we forced targets to be secondary if we found an
intermediate file that was listed as a prerequisite of another
target.  This overrides .INTERMEDIATE settings, so doesn't work.
Now that we have an is_explicit flag in targets, use that instead.

* src/implicit.c (pattern_search): Remove setting of secondary.
Preserve the value of the is_explicit flag when creating a new
file target, and consider it when setting the intermediate flag.
* tests/scripts/features/patternrules: Add a test w/out INTERMEDIATE
* tests/scripts/targets/INTERMEDIATE: Add a test with INTERMEDIATE

3 years ago[SV 48643] Preserve target-specific variables on intermediate files
Dmitry Goncharov [Wed, 29 Dec 2021 19:26:40 +0000 (14:26 -0500)] 
[SV 48643] Preserve target-specific variables on intermediate files

Target-specific variables used to define the target as "ought to
exist" so they could never be intermediate.  Now they can be, so
merge the target-specific variables from the intermediate target
so they're not lost.

* src/implicit.c (pattern_search): Use merge_variable_set_lists
to merge target-specific variables.
* tests/scripts/features/implicit_search: Add tests of target-
specific variable assignments and implicit rules.

3 years ago* README.template: Clean up patch submission information
Paul Smith [Mon, 20 Dec 2021 05:31:05 +0000 (00:31 -0500)] 
* README.template: Clean up patch submission information

3 years ago* src/read.c (find_percent_cached): [SV 60798] Silence GCC11 warnings
Jouke Witteveen [Sun, 19 Dec 2021 21:19:02 +0000 (16:19 -0500)] 
* src/read.c (find_percent_cached): [SV 60798] Silence GCC11 warnings

3 years ago[SV 60798] Silence bogus GCC10 and GCC11 warnings
Jouke Witteveen [Sun, 19 Dec 2021 21:09:07 +0000 (16:09 -0500)] 
[SV 60798] Silence bogus GCC10 and GCC11 warnings

* src/main.c (main): Use a separate variable to track final character.
* src/read.c (eval): Track the semicolon position not one beyond it.
* src/variable.c (do_variable_definition): Include a default switch
case to ease the work of the exhaustiveness prover.

3 years agoUpdate documentation with instructions for patch submission
Paul Smith [Sat, 18 Dec 2021 23:25:38 +0000 (18:25 -0500)] 
Update documentation with instructions for patch submission

* README.template: Add notes on how to submit patches.
* README.git: Point to the README.
* doc/make.texi: Ditto.

3 years agoChange HTTP URLs to use HTTPS instead
Paul Smith [Sat, 18 Dec 2021 23:23:16 +0000 (18:23 -0500)] 
Change HTTP URLs to use HTTPS instead

Also remove unnecessary tests/COPYING file.

* README.template: Change http: to https:
* README.git: Ditto
* doc/make.texi: Ditto
* doc/make.1: Ditto
* src/main.c: Ditto
* maintMakefile: Remove invalid URL

3 years ago* src/makeint.h: Compute INTSTR_LENGTH based on size of intmax_t
Paul Smith [Sun, 19 Dec 2021 19:48:26 +0000 (14:48 -0500)] 
* src/makeint.h: Compute INTSTR_LENGTH based on size of intmax_t

Math suggested by Edward Welbourne <edward.welbourne@qt.io>

3 years agoRemove arbitrary limits on intcmp integers
Paul Eggert [Sun, 19 Dec 2021 19:48:14 +0000 (14:48 -0500)] 
Remove arbitrary limits on intcmp integers

We don't need to parse strings into C integer values to compare them.

* src/function.c (parse_textint): Find boundaries of a numeric string.
(func_intcmp): Use parse_textint() to compare integers textually.
* tests/scripts/functions/intcmp: Test with extra-large numbers.

3 years agoUse a well-known error string for out-of-bound function arguments
Paul Smith [Sat, 18 Dec 2021 23:11:30 +0000 (18:11 -0500)] 
Use a well-known error string for out-of-bound function arguments

* src/function.c (parse_numeric): Check for empty value and error.
If we find ERANGE just print our own error, not strerror.
(func_word): Use a generic "not good" error message.
(func_wordlist): Ditto
(func_intcmp): Ditto
* tests/run_make_tests.pl: Remove code to find strerror(ERANGE)
* tests/scrips/functions/intcmp: Update the error message.
* tests/scrips/functions/word: Ditto.

3 years ago* doc/make.text (Wildcards): Document that glob results are sorted.
Paul Smith [Sun, 5 Dec 2021 20:16:26 +0000 (15:16 -0500)] 
* doc/make.text (Wildcards): Document that glob results are sorted.

3 years ago[SV 61621] Don't use POSIX_SPAWN_RESETIDS with posix_spawn()
Paul Smith [Sun, 5 Dec 2021 19:22:43 +0000 (14:22 -0500)] 
[SV 61621] Don't use POSIX_SPAWN_RESETIDS with posix_spawn()

When make is invoked in a environment where the user namespace is
restricted, such as under unshare(1) (on GNU/Linux), it won't be able
to find its real UID so the effective UID can't be set to it and
posix_spawn() will fail with EINVAL.

It's not less safe to run recipe jobs using the same UID values that
make was invoked with, so don't worry about this flag.

* src/job.c (child_execute_job): Don't set POSIX_SPAWN_RESETIDS flag.

3 years ago* .gitignore: Ignore patch files.
Paul Smith [Sun, 5 Dec 2021 19:21:47 +0000 (14:21 -0500)] 
* .gitignore: Ignore patch files.