| 1 |
2023-02-26 Paul Smith <[email protected]> |
| 2 |
|
| 3 |
GNU Make release 4.4.1 |
| 4 |
* NEWS: Set the release number and date. |
| 5 |
* configure.ac: Update the version. |
| 6 |
* README.git: Remind to update doc/make.1. |
| 7 |
* doc/make.1: Update the date. Fix some "GNU Make" references. |
| 8 |
* doc/make.texi: Update the edition. |
| 9 |
|
| 10 |
* tests/scripts/options/dash-l: Simplify the test via the helper |
| 11 |
* tests/thelp.pl: Add "exist" and "noexist" operators. |
| 12 |
|
| 13 |
2023-02-21 Paul Smith <[email protected]> |
| 14 |
|
| 15 |
* README.W32: Add Windows 11 |
| 16 |
* build_w32.bat: Ditto. |
| 17 |
|
| 18 |
2023-02-21 Paul Smith <[email protected]> |
| 19 |
|
| 20 |
Use a recursive environment if any command needs it |
| 21 |
We only create one target environment for all commands in a recipe. |
| 22 |
Ensure it's set for recursive make if ANY command is recursive, not |
| 23 |
just the first one. |
| 24 |
|
| 25 |
* src/job.c (start_job_command): Check for any recursive command. |
| 26 |
* tests/scripts/features/jobserver: Test recursion on second line. |
| 27 |
|
| 28 |
2023-02-21 Dmitry Goncharov <[email protected]> |
| 29 |
|
| 30 |
* src/main.c (main): Install suffix rules near pattern updates |
| 31 |
|
| 32 |
2023-02-20 Paul Smith <[email protected]> |
| 33 |
|
| 34 |
* Makefile.am: Add mkconfig.h to the test error file |
| 35 |
|
| 36 |
2023-02-20 Dmitry Goncharov <[email protected]> |
| 37 |
|
| 38 |
[SV 63821] Don't set up default suffix rules if makefile sets -r |
| 39 |
When built-in rules are disabled by adding -r to MAKEFLAGS in the |
| 40 |
makefile, don't add suffix rules at all so that if suffixes are |
| 41 |
added back via .SUFFIXES, the rules are still not there. |
| 42 |
|
| 43 |
* src/main.c (main): Set default suffix rules after parsing makefiles. |
| 44 |
* src/default.c (install_default_suffix_rules): Install a default |
| 45 |
suffix rule only if there is no user defined rule. |
| 46 |
* tests/scripts/features/suffixrules: Add tests. |
| 47 |
|
| 48 |
2023-02-20 Paul Smith <[email protected]> |
| 49 |
|
| 50 |
* tests/scripts/misc/general4: Only test empty PATH on UNIX |
| 51 |
|
| 52 |
2023-02-19 Paul Smith <[email protected]> |
| 53 |
|
| 54 |
* gl/modules/make-glob: Avoid glibc glob if bug #866 is present |
| 55 |
|
| 56 |
* tests/scripts/features/include [AIX]: Set explicit timestamps |
| 57 |
|
| 58 |
* tests/scripts/features/archives: Set CC properly |
| 59 |
|
| 60 |
Prerelease GNU Make 4.4.0.91 |
| 61 |
* NEWS: Update the date. |
| 62 |
* configure.ac: Change the release. |
| 63 |
|
| 64 |
* src/makeint.h [CYGWIN]: Use pipe mode for the jobserver |
| 65 |
|
| 66 |
2023-02-19 Paul Smith <[email protected]> |
| 67 |
|
| 68 |
Don't block for child exit if other commands have completed |
| 69 |
Running regression tests on a single CPU system shows that if a child |
| 70 |
exits while we're checking prerequisites we might not notice it, and |
| 71 |
then we might block waiting for the next child to exit before we try |
| 72 |
to do more work even though we could. |
| 73 |
|
| 74 |
* src/remake.c (update_goal_chain): Remember the command_count before |
| 75 |
we start checking prerequisites and if it is different when we restart |
| 76 |
at the top of the goal chain then don't block. |
| 77 |
|
| 78 |
2023-02-19 Paul Smith <[email protected]> |
| 79 |
|
| 80 |
Clean up depth handling in debug output |
| 81 |
The indentation shown in debug output was misleading. Increment the |
| 82 |
depth when we are working on a prerequisite, not for the current |
| 83 |
target. |
| 84 |
|
| 85 |
* src/remake.c (check_dep): Increment depth only on recursion. |
| 86 |
(update_file_1): Ditto. Don't show "Finished..." if prereqs are |
| 87 |
still running. |
| 88 |
* src/implicit.c (pattern_search): Increment depth for the entire |
| 89 |
search. |
| 90 |
* tests/scripts/features/output-sync: Support debug output when run |
| 91 |
by hand. |
| 92 |
|
| 93 |
2023-02-19 Paul Smith <[email protected]> |
| 94 |
|
| 95 |
* src/makeint.h (WIN32_LEAN_AND_MEAN) [Windows]: Don't redefine. |
| 96 |
Suggested for tcc builds by Christian Jullien <[email protected]>. |
| 97 |
|
| 98 |
2023-02-19 KO Myung-Hun <[email protected]> |
| 99 |
|
| 100 |
* src/misc.c (ttyname) [OS/2]: Add an implementation for OS/2 kLIBC |
| 101 |
|
| 102 |
2023-02-19 Paul Smith <[email protected]> |
| 103 |
|
| 104 |
Allow jobserver style to be forced to "pipe" |
| 105 |
Some systems that support mkfifo() don't support the usage that GNU |
| 106 |
make wants. Provide a way to force using "pipe" jobserver mode even |
| 107 |
when mkfifo() is available. |
| 108 |
|
| 109 |
* src/makeint.h (MK_OS_HURD): Define if we're on Hurd. |
| 110 |
(JOBSERVER_USE_FIFO): Define if we have mkfifo() and we're NOT on |
| 111 |
Hurd. |
| 112 |
* src/main.c (main): Test JOBSERVER_USE_FIFO not HAVE_MKFIFO. |
| 113 |
* src/posixos.c (jobserver_setup): Ditto. |
| 114 |
* maintMakefile: Create a config check test for forcing "pipe" mode. |
| 115 |
* tests/run_make_tests.pl: Show discovered FEATURES in verbose mode. |
| 116 |
|
| 117 |
2023-02-05 Paul Smith <[email protected]> |
| 118 |
|
| 119 |
[SV 63668] Use autoconf to detect the default C++ compiler |
| 120 |
* configure.ac: Add AC_PROG_CXX to search for a C++ compiler. |
| 121 |
(MAKE_CXX): Add the discovered compiler to config.h. |
| 122 |
* src/default.c (default_variables): Use MAKE_CXX as the C++ compiler. |
| 123 |
|
| 124 |
* doc/make.texi: Fix typo (reported by <[email protected]>) |
| 125 |
|
| 126 |
2023-02-04 Paul Smith <[email protected]> |
| 127 |
|
| 128 |
* tests/scripts/variables/MAKEFLAGS: Fix some Perl warnings |
| 129 |
|
| 130 |
2023-01-28 Dmitry Goncharov <[email protected]> |
| 131 |
|
| 132 |
* doc/make.texi: [SV 63689] Fix typos in examples |
| 133 |
|
| 134 |
2023-01-28 Paul Smith <[email protected]> |
| 135 |
|
| 136 |
* src/job.c: Switch from bit operators to flags macros |
| 137 |
* src/remake.c: Ditto. |
| 138 |
|
| 139 |
[SV 63667] In .POSIX, use shell flags -c when ignoring errors |
| 140 |
* src/variable.c (lookup_variable_for_file): New function to retrieve |
| 141 |
a variable assignment in a file context. |
| 142 |
* src/variable.h (lookup_variable_for_file): Declare it. |
| 143 |
* src/job.c (construct_command_argv): Look up .SHELLFLAGS. If .POSIX |
| 144 |
is set and we're using the default value, choose -c if we're ignoring |
| 145 |
errors else choose -ec. |
| 146 |
(construct_command_argv_internal): Ditto. |
| 147 |
* tests/scripts/targets/POSIX: Add tests. |
| 148 |
|
| 149 |
2023-01-28 Dmitry Goncharov <[email protected]> |
| 150 |
|
| 151 |
* tests/scripts/features/archives: [SV 63688] Quote cmd line vars |
| 152 |
|
| 153 |
2023-01-28 Paul Smith <[email protected]> |
| 154 |
|
| 155 |
* README.in: Mention README.z/OS |
| 156 |
|
| 157 |
2023-01-15 Paul Smith <[email protected]> |
| 158 |
|
| 159 |
* tests/test_driver.pl: Convert z/OS answers for regex output |
| 160 |
Allow z/OS customizations to apply to regex output matching. |
| 161 |
* tests/scripts/features/output-sync: Use a regex for Terminated. |
| 162 |
* tests/scripts/features/temp_stdin: Ditto. |
| 163 |
|
| 164 |
* tests/scripts/features/archives: Use the configured compiler for CC |
| 165 |
|
| 166 |
* configure.ac: Delay setting HAVE_GUILE until we're sure |
| 167 |
|
| 168 |
2023-01-14 Paul Smith <[email protected]> |
| 169 |
|
| 170 |
Prerelease GNU Make 4.4.0.90 |
| 171 |
* NEWS: Update the date. |
| 172 |
* README.git: Fix a typo. |
| 173 |
* maintMakefile (check-alt-config): Report success. |
| 174 |
(upload-*): Use the gnulib gnupload script for uploads. |
| 175 |
|
| 176 |
2023-01-11 Paul Smith <[email protected]> |
| 177 |
|
| 178 |
* tests/scripts/features/reinvoke: Warn about closing STDIN. |
| 179 |
* tests/scripts/features/temp_stdin: Ditto. |
| 180 |
* tests/scripts/options/dash-f: Ditto. |
| 181 |
|
| 182 |
2023-01-11 Eli Zaretskii <[email protected]> |
| 183 |
|
| 184 |
[SV 63638] Fix processing PATH on MS-Windows |
| 185 |
* src/variable.c (sync_Path_environment): Pass only the value of |
| 186 |
PATH to convert_Path_to_windows32, excluding the "PATH=" part. |
| 187 |
|
| 188 |
2023-01-08 Paul Smith <[email protected]> |
| 189 |
|
| 190 |
Update support for OS/2 |
| 191 |
Patches provided by KO Myung-Hun <[email protected]> |
| 192 |
|
| 193 |
* NEWS: Add a note. |
| 194 |
* AUTHORS: Add a new author. |
| 195 |
* README.OS2: Updates to build instructions. |
| 196 |
* src/dir.c (dir_contents_file_exists_p): Use a stack copy when |
| 197 |
modifying a const string. |
| 198 |
* src/job.c (construct_command_argv_internal): Ditto. |
| 199 |
Reuse variables rather than re-defining them. |
| 200 |
(exec_command): Cast a const string (we don't change it anyway). |
| 201 |
* src/getopt.c (_getopt_initialize): Reference unused variables. |
| 202 |
(_getopt_internal): Add block braces to quiet the compiler. |
| 203 |
* src/main.c (main): Cast argument to child_execute_job(). |
| 204 |
* src/posixos.c (set_blocking): Reference unused variables. |
| 205 |
* src/remake.c (f_mtime): Delete useless code. |
| 206 |
|
| 207 |
2023-01-08 Paul Smith <[email protected]> |
| 208 |
|
| 209 |
[SV 17448] Ignore whitespace around $(file ...) names |
| 210 |
The other issues related to whitespace reported in this bug are |
| 211 |
not addressed by this change. |
| 212 |
|
| 213 |
* src/functions.c (func_file): Strip whitespace from the start and |
| 214 |
end of the filename provided to the $(file ...) function. |
| 215 |
* tests/scripts/functions/file: Add tests for this. |
| 216 |
* tests/test_driver.pl: Use 3-arg version of open(). |
| 217 |
|
| 218 |
2023-01-08 Paul Smith <[email protected]> |
| 219 |
|
| 220 |
[SV 61218] Ensure MAKEFLAGS is expanded even with -e |
| 221 |
If -e was given we weren't expanding MAKEFLAGS before passing it |
| 222 |
through the environment to jobs: we don't expand variables we |
| 223 |
receive from the environment and when -e is given we set the |
| 224 |
origin of MAKEFLAGS to "environment override". Check for MAKEFLAGS |
| 225 |
specifically, which seems like a hack but I don't have a better |
| 226 |
idea offhand. |
| 227 |
|
| 228 |
* src/main.c (main): Drive-by: use o_default for MAKEOVERRIDES. |
| 229 |
* src/variable.c (target_environment): Always expand MAKEFLAGS |
| 230 |
regardless of the origin type. |
| 231 |
* tests/scripts/options/dash-e: Create a test. |
| 232 |
|
| 233 |
2023-01-08 Paul Smith <[email protected]> |
| 234 |
|
| 235 |
[SV 62654] Support GNU Make on z/OS |
| 236 |
Original patches provided by Igor Todorovski <[email protected]> |
| 237 |
Reworked by Paul Smith <[email protected]>. |
| 238 |
Thanks to IBM for providing a test system. |
| 239 |
|
| 240 |
* NEWS: Announce support. |
| 241 |
* AUTHORS: Ditto. |
| 242 |
* README.zOS: Provide details on building GNU Make on z/OS. |
| 243 |
* build.sh (get_mk_var): z/OS sh has a strange bug which causes it to |
| 244 |
generate extra lines of output: rework the function to print output |
| 245 |
as we compute it instead of collecting it into a variable, which |
| 246 |
works around this bug. |
| 247 |
* src/makeint.h: Declare MK_OS_ZOS if we're building for z/OS. |
| 248 |
* src/arscan.c: Don't include <ar.h> on z/OS. |
| 249 |
* src/job.c: We can't change environ in ASCII mode on z/OS. |
| 250 |
* src/main.c: Ditto. Also we can't use pselect() on z/OS. |
| 251 |
* src/posixos.c: pselect() seems to hang on z/OS: don't use it. |
| 252 |
* tests/run_make_tests.pl: Handle different exit codes on z/OS. |
| 253 |
* tests/test_driver.pl: Preserve some special z/OS env.vars. |
| 254 |
Add special checks to output comparisons when on z/OS. |
| 255 |
* tests/scripts/features/archives: Don't validate names. Don't |
| 256 |
try to compile empty files as IBM compilers complain. |
| 257 |
* tests/scripts/features/shell_assignment: Fix octal value of #. |
| 258 |
* tests/scripts/features/temp_stdin: Don't print "term". |
| 259 |
* tests/scripts/functions/shell: Handle shell exit codes. |
| 260 |
* tests/scripts/targets/ONESHELL: Ditto. |
| 261 |
* tests/scripts/targets/POSIX: sh -x prints differently. |
| 262 |
* tests/scripts/variables/SHELL: Ditto. |
| 263 |
|
| 264 |
2023-01-08 Paul Smith <[email protected]> |
| 265 |
|
| 266 |
Create src/mkcustom.h which is included by config.h |
| 267 |
Put declarations for missing functions which we create in src/misc.c |
| 268 |
into a file which is included by config.h via AH_BOTTOM(). This |
| 269 |
ensures those prototypes are available, even in files added to |
| 270 |
lib/... from gnulib. |
| 271 |
|
| 272 |
* src/mkcustom.h: Add a new file with function declarations. |
| 273 |
* configure.ac: Include src/mkcustom.h in config.h with AH_BOTTOM() |
| 274 |
* Makefile.am: Add the header to the SRCS list. |
| 275 |
* src/makeint.h: Remove content that we added to src/mkcustom.h. |
| 276 |
* src/config.ami: Add #include "mkcustom.h" to specialized config.h. |
| 277 |
* src/config.h-vms: Ditto. |
| 278 |
* src/config.h.W32: Ditto. |
| 279 |
* src/configh.dos: Ditto. |
| 280 |
|
| 281 |
2023-01-08 Paul Smith <[email protected]> |
| 282 |
|
| 283 |
Include <strings.h> globally |
| 284 |
Various code uses str{,n}casecmp() so include <strings.h>, if it |
| 285 |
exists, everywhere. |
| 286 |
|
| 287 |
* configure.ac: Check for <strings.h> explicitly. |
| 288 |
* src/makeint.h: Include it if HAVE_STRINGS_H, for str{,n}casecmp(). |
| 289 |
* src/job.c: Remove include of <strings.h>. |
| 290 |
* src/main.c: Ditto. |
| 291 |
|
| 292 |
2023-01-07 Paul Smith <[email protected]> |
| 293 |
|
| 294 |
* gl/lib/glob.c: Don't try to support _LIBC, don't use __stat() |
| 295 |
|
| 296 |
2023-01-03 Paul Smith <[email protected]> |
| 297 |
|
| 298 |
[SV 63609] Avoid buffer overrun in --warn-undefined-variables |
| 299 |
Reported by Dmitry Goncharov <[email protected]> |
| 300 |
|
| 301 |
* src/variable.c (struct defined_vars): Create a struct that holds the |
| 302 |
name and length of each variable name. |
| 303 |
(warn_undefined): Check the lengths before comparing the contents. |
| 304 |
* tests/scripts/options/warn-undefined-variables: Add a test. |
| 305 |
|
| 306 |
2023-01-03 Paul Smith <[email protected]> |
| 307 |
|
| 308 |
[SV 14927] Allow parallel builds for archives |
| 309 |
Compare the timestamp of the object file (if it exists) with the |
| 310 |
archived object and if the object file is newer, ensure it's updated |
| 311 |
in the archive. |
| 312 |
|
| 313 |
* NEWS: Announce the new capability. |
| 314 |
* doc/make.texi (Dangers When Using Archives): Explain how to enable |
| 315 |
parallel builds with archives. |
| 316 |
* src/remake.c (f_mtime): For archive element files check the mod |
| 317 |
time of the object file (if it exists) against the archive object |
| 318 |
(if it exists). |
| 319 |
* tests/scripts/features/archives: Add tests for this capability. |
| 320 |
|
| 321 |
2023-01-02 Paul Smith <[email protected]> |
| 322 |
|
| 323 |
[SV 61463] Don't export inherited private variables |
| 324 |
If a parent target has an exported variable that is private, don't |
| 325 |
export it in child targets. |
| 326 |
|
| 327 |
* NEWS: Mention this change. |
| 328 |
* src/variable.c (target_environment): Ignore private inherited |
| 329 |
variables. |
| 330 |
* tests/thelp.pl: Add a new "env" operation to show env.var. values. |
| 331 |
* tests/scripts/variables/private: Verify this new behavior. |
| 332 |
|
| 333 |
2023-01-02 Paul Smith <[email protected]> |
| 334 |
|
| 335 |
Update ancient glob/fnmatch implementations |
| 336 |
I looked again at trying to use the latest gnulib implemenentations |
| 337 |
of GNU glob and fnmatch, and the effort required to extract them |
| 338 |
from gnulib and make them portable to systems which don't support |
| 339 |
configure is simply far too daunting for me. However it's clear |
| 340 |
that the previous implementations are growing too long on the tooth |
| 341 |
to continue to be used without some maintenance, so perform some |
| 342 |
upkeep on them. |
| 343 |
|
| 344 |
- Remove support for pre-ANSI function definitions. |
| 345 |
- Remove the obsolete "register" keyword. |
| 346 |
- Assume standard ISO C90/C99 header file support. |
| 347 |
- Assume standard ISO C "void" and "const" support. |
| 348 |
- Avoid symbols prefixed with "__" as they're reserved. |
| 349 |
|
| 350 |
* maintMakefile: Add a rule to verify lib has the latest content. |
| 351 |
* src/dir.c: Use void* not __ptr_t which was removed. |
| 352 |
* gl/lib/glob.c: See above. |
| 353 |
* gl/lib/fnmatch.in.h: See above. |
| 354 |
* gl/lib/glob.in.h: See above. |
| 355 |
* gl/lib/fnmatch.c: See above. Remove __strchrnul(): it is not |
| 356 |
checked anywhere and is only used in one place anyway. |
| 357 |
|
| 358 |
2023-01-02 Paul Smith <[email protected]> |
| 359 |
|
| 360 |
* doc/make.texi (Special Targets): Fix minor typo |
| 361 |
Reported by Andrey Melnikov <[email protected]>. |
| 362 |
|
| 363 |
2023-01-01 Paul Smith <[email protected]> |
| 364 |
|
| 365 |
Don't free uninitialized hash_table |
| 366 |
* src/dir.c (clear_directory_contents): We use ht_vec to mark when |
| 367 |
we have initialized the hash_table: don't free if it's NULL. |
| 368 |
(everywhere): Use NULL instead of 0 when working with pointers. |
| 369 |
|
| 370 |
* maintMakefile: Add missing quote |
| 371 |
|
| 372 |
Convert references from "GNU make" to "GNU Make" |
| 373 |
|
| 374 |
Update to the latest gnulib stable branch |
| 375 |
* bootstrap.conf: Request the latest gnulib stable branch. |
| 376 |
* README.git: Recommend the argument form of autogen/autopull. |
| 377 |
* bootstrap: Import the latest version of bootstrap. |
| 378 |
* bootstrap-funclib.sh: Ditto. |
| 379 |
* autogen.sh: Ditto. |
| 380 |
* autopull.sh: Ditto. |
| 381 |
|
| 382 |
Update the copyright year on all files |
| 383 |
|
| 384 |
2022-12-31 Paul Smith <[email protected]> |
| 385 |
|
| 386 |
Apply spelling fixes discovered by Codespell |
| 387 |
* maintMakefile: Apply spelling fixes. |
| 388 |
* src/file.c: Ditto. |
| 389 |
* src/misc.c: Ditto. |
| 390 |
* src/remake.c: Ditto. |
| 391 |
* src/vmsjobs.c: Ditto. |
| 392 |
* src/w32/pathstuff.c: Ditto. |
| 393 |
* tests/test_driver.pl: Ditto. |
| 394 |
* tests/run_make_tests.com: Ditto |
| 395 |
* tests/scripts/features/implicit_search: Ditto |
| 396 |
* tests/scripts/features/output-sync: Ditto |
| 397 |
* tests/scripts/features/patternrules: Ditto |
| 398 |
* tests/scripts/features/se_explicit: Ditto |
| 399 |
* tests/scripts/features/statipattrules: Ditto |
| 400 |
* tests/scripts/functions/foreach: Ditto |
| 401 |
* tests/scripts/variables/MAKEFLAGS: Ditto |
| 402 |
|
| 403 |
2022-12-31 Paul Smith <[email protected]> |
| 404 |
|
| 405 |
Avoid using false(1) in regression tests |
| 406 |
The POSIX standard only requires false(1) to return a "non-zero" exit |
| 407 |
code; almost all systems return 1 but some (Solaris!!!) return 255 or |
| 408 |
possibly even other values. Use our helper "fail" instead. |
| 409 |
|
| 410 |
* tests/thelp.pl: Have the "fail" command obey -q. |
| 411 |
* tests/scripts/features/parallelism: Helper -q no longer prints fail. |
| 412 |
* tests/scripts/targets/POSIX: Replace false with #HELPER# -q fail 1. |
| 413 |
* tests/scripts/variables/MAKEFLAGS: Ditto. |
| 414 |
* tests/scripts/variables/SHELL: Ditto. |
| 415 |
|
| 416 |
2022-12-26 Paul Smith <[email protected]> |
| 417 |
|
| 418 |
Make bootstrap.bat more portable |
| 419 |
Using backslashes in a sed command line is tricky as different programs |
| 420 |
use them differently as escape sequences. Eli Zaretskii points out |
| 421 |
that Windows "echo" doesn't do any processing, so rework all our sed |
| 422 |
invocations to use script files created by echo. |
| 423 |
|
| 424 |
* bootstrap.bat: Use echo to create sed script files instead of -e. |
| 425 |
* Basic.mk.template: Fix typo in the comments. |
| 426 |
* .gitignore: Ignore any .sed scripts. |
| 427 |
|
| 428 |
2022-12-24 Paul Smith <[email protected]> |
| 429 |
|
| 430 |
* NEWS: Add a section for the next release |
| 431 |
Add a note for the MAKEFLAGS enhancements. |
| 432 |
|
| 433 |
2022-12-24 Paul Smith <[email protected]> |
| 434 |
|
| 435 |
[SV 63439, SV 63452] Don't warn on undefined internal variables |
| 436 |
Don't generate undefined variable warnings for variables that are |
| 437 |
internal / special to make and where the empty string is valid. |
| 438 |
Rather than defining them to empty, which could introduce unwanted |
| 439 |
behavior, keep a list of variable names which we should never warn |
| 440 |
about. |
| 441 |
|
| 442 |
* src/variable.h (warn_undefined): Convert the macro to a function. |
| 443 |
* src/variable.c (defined_vars): Always "defined" variable names. |
| 444 |
(warn_undefined): Implement as a function and check against the |
| 445 |
defined_vars before generating a warning. |
| 446 |
* src/read.c (read_all_makefiles): No need to reset warning flag. |
| 447 |
* src/vpath.c (build_vpath_lists): Ditto. |
| 448 |
* tests/scripts/options/warn-undefined-variables: Expand all the |
| 449 |
pre-defined variables to ensure warnings are not generated. |
| 450 |
|
| 451 |
2022-12-24 Paul Smith <[email protected]> |
| 452 |
|
| 453 |
[SV 63552] Change directories before constructing include paths |
| 454 |
* src/makeint.h (reset_makeflags): New function to handle changing |
| 455 |
MAKEFLAGS from within makefiles. Remove decode_env_switches(). |
| 456 |
* src/variable.c (set_special_var): Call reset_makeflags() instead |
| 457 |
of various internal methods. |
| 458 |
* src/main.c (decode_env_switches): Only internal now so make static. |
| 459 |
(decode_switches): Don't invoke construct_include_path() yet. |
| 460 |
(reset_makeflags): Decode env switches and construct include paths. |
| 461 |
(main): Construct include paths after we process -C options. |
| 462 |
* tests/scripts/options/dash-C: Rewrite to use new test constructs. |
| 463 |
Add a test using both -C and -I together. |
| 464 |
Add a test for multiple -C options. |
| 465 |
|
| 466 |
2022-12-20 Paul Smith <[email protected]> |
| 467 |
|
| 468 |
tests [WINDOWS32]: Support Strawberry Perl on Windows |
| 469 |
Strawberry Perl has some different behaviors from ActiveState Perl |
| 470 |
which impact the test suite: |
| 471 |
|
| 472 |
- Avoid Perl's chomp() as it may not remove CRs; chomp() may remove |
| 473 |
only the final NL but not the CR in a CRNL line ending. |
| 474 |
- Strawberry Perl doesn't support ActiveState's system(1, ...) form. |
| 475 |
- Strawberry Perl (or msys?) does something weird with "/tmp" when |
| 476 |
provided to exec(), replacing it with the user's %TEMP%. |
| 477 |
- Strawberry Perl uses msys paths like /c/foo instead of C:\foo. |
| 478 |
|
| 479 |
* tests/test_driver.pl (get_osname): Strawberry Perl uses 'msys' as |
| 480 |
its $^O so if we see that use a port of 'W32'. |
| 481 |
(_run_with_timeout): Strawberry Perl doesn't support the special |
| 482 |
system(1, ...) form of system() so use POSIX standard fork/exec. |
| 483 |
(compare_answer): Paths generated by Strawberry Perl use msys path |
| 484 |
format (e.g., /c/foo instead of C:\foo); check for those differences |
| 485 |
and compare RE against both the unmodified and modified log. |
| 486 |
* tests/run_make_tests.pl (set_defaults): Switch from chomp to s/// |
| 487 |
to remove CRNL and NL line endings. |
| 488 |
* tests/scripts/features/errors: Executing directories on Strawberry |
| 489 |
will give an error; translate it to Windows error output format. |
| 490 |
* tests/scripts/features/output-sync: Ditto. |
| 491 |
* tests/scripts/features/temp_stdin: Ditto. |
| 492 |
* tests/scripts/functions/realpath: Ditto. |
| 493 |
* tests/scripts/options/dash-I: Ditto. |
| 494 |
* tests/scripts/variables/INCLUDE_DIRS: Ditto. |
| 495 |
* tests/scripts/misc/close_stdout: /dev/full is reported as existing |
| 496 |
on Strawberry Perl, but it doesn't do anything. Skip the test. |
| 497 |
* tests/scripts/variables/MAKEFLAGS: When an argument containing |
| 498 |
/tmp is passed to a program via exec(), something replaces it with |
| 499 |
the expansion of the %TEMP% variable. Instead of using /tmp create |
| 500 |
a local directory to use. |
| 501 |
|
| 502 |
2022-12-20 Paul Smith <[email protected]> |
| 503 |
|
| 504 |
* tests/test_driver.pl: Remember if something failed and report it |
| 505 |
|
| 506 |
2022-12-19 Paul Smith <[email protected]> |
| 507 |
|
| 508 |
[WINDOWS32] Remove CRNL from FormatMessage() result string |
| 509 |
Sometimes the error message is expected to contain a newline, other |
| 510 |
times it is not. Also the result of FormatMessage() sometimes ends |
| 511 |
in CRNL already: when printed via fprintf() the final newline is |
| 512 |
converted to CRNL, giving an output of CRCRNL which causes tests |
| 513 |
to fail to match. Remove any CR/NL chars from the result string. |
| 514 |
|
| 515 |
* src/job.c (reap_children): Add \n to the error message fprintf. |
| 516 |
(exec_command): Ditto. |
| 517 |
* src/w32/subproc/w32err.c (map_windows32_error_to_string): Remove |
| 518 |
any trailing CR or NL from the string before returning. |
| 519 |
|
| 520 |
2022-12-18 Dmitry Goncharov <[email protected]> |
| 521 |
|
| 522 |
[SV 63537] Document and test flippable switches |
| 523 |
* doc/make.texi (Options/Recursion): Clarify that MAKEFLAGS values |
| 524 |
from the environment have precedence over those set in the makefile. |
| 525 |
* tests/scripts/variables/MAKEFLAGS: Check boolean switches -k/-S, |
| 526 |
-w/--no-print-directory and -s/--no-silent as follows: |
| 527 |
1. A switch can be enabled or disabled on the command line. |
| 528 |
2. A switch can be enabled or disabled in env. |
| 529 |
3. A switch can be enabled or disabled in makefile. |
| 530 |
4. Command line beats env and makefile. |
| 531 |
5. Env beats makefile. |
| 532 |
6. MAKEFLAGS contains each specified switch at parse and build time. |
| 533 |
7. If switches are specified in multiple origins, MAKEFLAGS contains |
| 534 |
the winning switch at parse and build time. |
| 535 |
8. MAKEFLAGS does not contain the losing switch. |
| 536 |
Also test that --debug settings from different origins are combined |
| 537 |
together into one option. |
| 538 |
|
| 539 |
2022-12-18 Dmitry Goncharov <[email protected]> |
| 540 |
|
| 541 |
[SV 63537] Pass enabled-by-default switches to submake |
| 542 |
Certain switches, such as -S or --no-silent, turn on behavior that is |
| 543 |
enabled by default. When a switch is specified via the command line, |
| 544 |
makefile, or env, ensure the switch is added to MAKEFLAGS. |
| 545 |
|
| 546 |
* src/main.c (struct command_switch): Add bit "specified". |
| 547 |
(switches): Initialize command_switch->specified. |
| 548 |
(decode_switches): Set command_switch->specified. |
| 549 |
(define_makeflags): Check command_switch->specified. |
| 550 |
|
| 551 |
2022-12-18 Dmitry Goncharov <[email protected]> |
| 552 |
|
| 553 |
[SV 63537] Remember the origin of command line options |
| 554 |
Certain options can be flipped on and off: -k/-S, -s/--no-silent, and |
| 555 |
-w/--no-print-directory. Ensure they behave as follows: |
| 556 |
1. A switch can be enabled or disabled on the command line. |
| 557 |
2. A switch can be enabled or disabled in env. |
| 558 |
3. A switch can be enabled or disabled in makefile. |
| 559 |
4. Command line beats env and makefile. |
| 560 |
5. Env beats makefile. |
| 561 |
|
| 562 |
* src/main.c: Add variables to hold the origin of relevant options. |
| 563 |
(struct command_switch): Add origin field. |
| 564 |
(switches): Set a pointer to hold the origin of relevant options. |
| 565 |
(decode_switches): For any switch that can be specified in makefile or |
| 566 |
env, honor the switch only if cs->origin is not set or the specified |
| 567 |
origin beats cs->origin. Set cs->origin when relevant. |
| 568 |
|
| 569 |
2022-12-18 Dmitry Goncharov <[email protected]> |
| 570 |
|
| 571 |
[SV 63537] Fix setting -w in makefiles |
| 572 |
* src/makeint.h: Replace print_directory flag with should_print_dir(). |
| 573 |
* src/main.c (main): Remove print_directory flag and related code. |
| 574 |
(should_print_dir): Create. |
| 575 |
* src/output.c (output_dump): Use should_print_dir(). |
| 576 |
(output_start): Ditto. |
| 577 |
|
| 578 |
2022-12-18 Dmitry Goncharov <[email protected]> |
| 579 |
|
| 580 |
[SV 63484] Force included makefiles to be explicit |
| 581 |
Ensure included makefiles are not treated as intermediate, even if |
| 582 |
they are created by an implicit rule. |
| 583 |
Reported by Patrick Oppenlander <[email protected]>. |
| 584 |
|
| 585 |
* src/read.c (eval_makefile): Mark makefiles as explicit. |
| 586 |
* tests/scripts/features/include: Add a test. |
| 587 |
|
| 588 |
2022-12-18 Paul Smith <[email protected]> |
| 589 |
|
| 590 |
[SV 63516] [DOS] Support include files with drivespecs |
| 591 |
* src/makeint.h (HAVE_DRIVESPEC): Create a macro to check. |
| 592 |
* src/main.c (.FEATURES): Add "dospaths" as a feature. |
| 593 |
* src/read.c (eval_makefile) [DOS]: If the included makefile name |
| 594 |
starts with a drivespec, don't search the include directories. |
| 595 |
* doc/make.texi (Include): Document this behavior. |
| 596 |
* tests/scripts/features/include: Add a test. |
| 597 |
|
| 598 |
* src/job.c (new_job): [SV 63510] Trace phony prerequisite rebuilds |
| 599 |
|
| 600 |
* configure.ac: Update for a new release |
| 601 |
* README.git: Add some packages needed for building from Git. |
| 602 |
* AUTHORS: Updates. |
| 603 |
|
| 604 |
2022-11-28 Dmitry Goncharov <[email protected]> |
| 605 |
|
| 606 |
[SV 63417] Ensure global .NOTINTERMEDIATE disables all intermediates |
| 607 |
Fix .NOTINTERMEDIATE without prerequisites to disable intermediate |
| 608 |
status for all targets. |
| 609 |
|
| 610 |
* src/makeint.h: Declare extern no_intermediates. |
| 611 |
* src/main.c: Add global definition of no_intermediates. |
| 612 |
* src/file.c: Remove static no_intermediates to use global variable. |
| 613 |
(remove_intermediates): Check no_intermediates. |
| 614 |
* src/implicit.c (pattern_search): For a file found by implicit search |
| 615 |
set file->notintermediate if no_intermediates is set. |
| 616 |
* src/remake.c (update_file_1): Don't set file->secondary for a |
| 617 |
pre-existing file if no_intermediates is set. The check for |
| 618 |
no_intermediates here is redundant, but won't hurt: keep it in case |
| 619 |
things change so that it matters. |
| 620 |
* tests/scripts/targets/NOTINTERMEDIATE: Fix a test. |
| 621 |
|
| 622 |
2022-11-28 Paul Smith <[email protected]> |
| 623 |
|
| 624 |
* doc/make.texi: Use $(firstword) rather than $(word 1,) |
| 625 |
|
| 626 |
2022-11-28 Dmitry Goncharov <[email protected]> |
| 627 |
|
| 628 |
[SV 63347] Always add command line variable assignments to MAKEFLAGS |
| 629 |
This commit introduces two visible changes: |
| 630 |
1. Keep command line variable assignments in MAKEFLAGS at all times, |
| 631 |
even while parsing makefiles. |
| 632 |
2. Define makeflags immediately when a makefile modifies MAKEFLAGS. |
| 633 |
|
| 634 |
The new MAKEFLAGS and MAKEOVERRIDES initialization procedure: |
| 635 |
1. decode_switches (argc, argv, o_command) is called to parse command |
| 636 |
line variable assignments. |
| 637 |
2. Command line variable assignments go through quote_for_env. |
| 638 |
Initialize -*-command-variables-*- to the quoted values. |
| 639 |
3. MAKEOVERRIDES is initialized to refer to -*-command-variables-*- |
| 640 |
with origin o_env to keep the definitions in the database intact. |
| 641 |
4. define_makeflags() is called which adds MAKEOVERRIDES to MAKEFLAGS. |
| 642 |
5. Makefiles are parsed. If a makefile modifies MAKEFLAGS, the new |
| 643 |
value of MAKEFLAGS is defined right away. |
| 644 |
6. Env switches are decoded again as o_env. The definitions set by |
| 645 |
decode_switches at step 1 stay intact, as o_command beats o_env. |
| 646 |
|
| 647 |
We must preserve the original intact definitions in order to detect |
| 648 |
failure cases; for example: |
| 649 |
$ cat makefile |
| 650 |
all:; $(hello) |
| 651 |
$ make hello='$(world' |
| 652 |
makefile:1: *** unterminated variable reference. Stop. |
| 653 |
|
| 654 |
* src/makeint.h: Declare enum variable_origin, struct variable and |
| 655 |
define_makeflags(). Add parameter origin to decode_env_switches(). |
| 656 |
* src/main.c (define_makeflags): Remove "all". If a variable is |
| 657 |
assigned on the command line then append MAKEOVERRIDES to MAKEFLAGS. |
| 658 |
(decode_env_switches): Replace parameter env with origin. |
| 659 |
(decode_switches): Replace parameter env with origin. |
| 660 |
Treat origin == o_command as env == 0. |
| 661 |
(handle_non_switch_argument): Replace parameter env with origin. |
| 662 |
Treat origin == o_command as env == 0. |
| 663 |
(main): Call decode_switches() with origin==o_command before parsing |
| 664 |
makefiles. Call decode_switches() with origin==o_env after parsing |
| 665 |
makefiles. |
| 666 |
* src/variable.c (set_special_var): Define makeflags at parse time, |
| 667 |
each time a makefile modifies MAKEFLAGS. |
| 668 |
(do_variable_definition): Strip command line variable assignments from |
| 669 |
MAKEFLAGS before appending extra flags. set_special_var() adds them |
| 670 |
back. |
| 671 |
* tests/scripts/variables/MAKEFLAGS: Add tests. |
| 672 |
|
| 673 |
2022-11-16 Paul Smith <[email protected]> |
| 674 |
|
| 675 |
* src/main.c (main): [SV 63373] Don't use macros with memcmp() |
| 676 |
Reported by djm <[email protected]> |
| 677 |
|
| 678 |
2022-11-15 Paul Smith <[email protected]> |
| 679 |
|
| 680 |
Add specific hints for errors due to invalid conditionals |
| 681 |
* src/read.c (eval): If "missing separator" appears to be due to |
| 682 |
missing space after ifeq/ifneq, give a hint about the error. |
| 683 |
* tests/scripts/misc/failure: Check for these types of failures. |
| 684 |
* tests/scripts/variables/special: Move error checking unrelated |
| 685 |
to special variables, to misc/failure. |
| 686 |
|
| 687 |
2022-11-13 Dmitry Goncharov <[email protected]> |
| 688 |
|
| 689 |
[SV 63333] Be more lenient when failing to create temporary files |
| 690 |
If make cannot create a temporary lock file for output sync, continue |
| 691 |
without output sync enabled rather than dying. |
| 692 |
|
| 693 |
However, if make cannot store a makefile from stdin to a temporary |
| 694 |
file that is still a fatal error. |
| 695 |
|
| 696 |
* misc.c (get_tmppath): Keep running on failure to generate a |
| 697 |
temporary file name. |
| 698 |
(get_tmpfd): Keep running on failure to get a temporary file. |
| 699 |
(get_tmpfile): Keep running on failure to open a temporary file. |
| 700 |
Ensure memory is freed if we return an error. |
| 701 |
* posixos.c (os_anontmp): Keep running on failure to open an |
| 702 |
anonymous temporary file. |
| 703 |
* output.c (setup_tmpfile): Print an error on failure to create an |
| 704 |
output sync lock file. |
| 705 |
* main.c (main): Die on failure to store makefile from stdin to a |
| 706 |
temporary file. |
| 707 |
* tests/scripts/features/output-sync: Add tests. |
| 708 |
* tests/scripts/features/temp_stdin: Ditto. |
| 709 |
|
| 710 |
2022-11-13 Paul Smith <[email protected]> |
| 711 |
|
| 712 |
Keep going if we can't connect to the jobserver |
| 713 |
* src/posixos.c (jobserver_parse_auth): Don't invoke fatal() if we |
| 714 |
can't connect to an existing jobserver: just keep going without it. |
| 715 |
* src/w32/w32os.c (jobserver_parse_auth): Ditto. |
| 716 |
* tests/scripts/features/jobserver: Add a test for invalid FIFO |
| 717 |
auth files. |
| 718 |
|
| 719 |
* src/dir.c (dir_contents_file_exists_p): Show dir name in error. |
| 720 |
If we fail to read a directory show the directory name in the error |
| 721 |
message. Pass struct directory instead of directory_contents to |
| 722 |
allow that. |
| 723 |
(dir_file_exists_p): Change dir_contents_file_exists_p caller. |
| 724 |
(open_dirstrem): Ditto. |
| 725 |
|
| 726 |
* src/main.c (main): [SV 63307] Handle SIGPIPE as a fatal signal |
| 727 |
Always ignoring SIGPIPE is visible to child processes. |
| 728 |
|
| 729 |
2022-11-13 Paul Smith <[email protected]> |
| 730 |
|
| 731 |
[SV 63315] tests: Simplify TERM signaling |
| 732 |
Tests that try to kill the make process were not behaving as expected |
| 733 |
on OpenBSD: the signal was sent from make to its children but the |
| 734 |
sleep didn't die. Something odd about the way the shell treats TERM. |
| 735 |
To reduce platform dependencies add "term" to the helper tool and run |
| 736 |
that instead of kill / sleep. |
| 737 |
|
| 738 |
* tests/thelp.pl: Add a new operation "term" that takes a PID. |
| 739 |
* tests/scripts/features/output-sync: Use it. |
| 740 |
* tests/scripts/features/temp_stdin: Ditto. |
| 741 |
|
| 742 |
2022-11-13 Paul Smith <[email protected]> |
| 743 |
|
| 744 |
[SV 63315] Allocate function names when defining functions |
| 745 |
* src/function.c (define_new_function): Don't keep a pointer to the |
| 746 |
user-provided name of a user-defined function: if the .so is unloaded |
| 747 |
it will point to garbage. Add the name to the strcache instead. |
| 748 |
|
| 749 |
2022-11-13 Paul Smith <[email protected]> |
| 750 |
|
| 751 |
tests: Don't convert \ to / when checking regex's |
| 752 |
When tests compare the output they will try converting backslashes |
| 753 |
to slashes to see if that works. When we compare using regex's, |
| 754 |
we can't do that because backslashes can escape special characters. |
| 755 |
|
| 756 |
* tests/test_driver.pl (compare_output): Clean up this function. |
| 757 |
(compare_answer_vms) [VMS]: Comparing answers on VMS is complex; |
| 758 |
move all of it into its own function returning 0/1. |
| 759 |
(compare_answer): A new function to compare answers: return 0/1. |
| 760 |
Remember the CRLF->LF conversion forever; only check \ -> / when |
| 761 |
we compare strings, not regex's. |
| 762 |
|
| 763 |
2022-11-13 Justine Tunney <[email protected]> (tiny change) |
| 764 |
|
| 765 |
* src/hash.c (jhash_string): Help the compiler optimize the hash |
| 766 |
Invoke memcpy() with a constant length, where possible. |
| 767 |
|
| 768 |
2022-11-12 Paul Smith <[email protected]> |
| 769 |
|
| 770 |
* src/config.h.W32 [TCC]: Only redefine strtoll if not defined |
| 771 |
|
| 772 |
2022-11-09 Eli Zaretskii <[email protected]> |
| 773 |
|
| 774 |
* src/config.h.W32: Fix last change. |
| 775 |
|
| 776 |
2022-11-05 Eli Zaretskii <[email protected]> |
| 777 |
|
| 778 |
Fix build with Tiny C |
| 779 |
* src/config.h.W32 (strtoll, strtoull) [__TINYC__]: Redirect to |
| 780 |
_strtoi64 and _strtoui64, respectively. Reported by Christian |
| 781 |
Jullien <[email protected]>. |
| 782 |
|
| 783 |
2022-10-31 Paul Smith <[email protected]> |
| 784 |
|
| 785 |
Release GNU Make 4.4 |
| 786 |
* NEWS: Update the version and date. |
| 787 |
* configure.ac: Update the version. |
| 788 |
* doc/make.texi: Update the EDITION. |
| 789 |
|
| 790 |
* README.git: Update and clarify release operations |
| 791 |
|
| 792 |
Fix issues found by ASAN and Coverity |
| 793 |
* tests/test_driver.pl: Preserve the LSAN_OPTIONS variable. |
| 794 |
* tests/scripts/targets/ONESHELL: Don't set a local variable. |
| 795 |
* tests/scripts/functions/let: Test empty let variable. |
| 796 |
* src/posixos.c (osync_parse_mutex): Free existing osync_tmpfile. |
| 797 |
* src/misc.c (get_tmpfd): Set umask() before invoking mkstemp(). |
| 798 |
* src/ar.c (ar_parse_name): Check invalid name (shouldn't happen). |
| 799 |
* src/function.c (define_new_function): Free previous function entry |
| 800 |
when replacing it with a new one. |
| 801 |
* src/job.c (child_execute_job): Initialize pid for safety. |
| 802 |
(construct_command_argv_internal): In oneshell mode ensure that the |
| 803 |
returned argv has the right format (0th element is a pointer to the |
| 804 |
entire buffer). |
| 805 |
|
| 806 |
2022-10-29 Paul Smith <[email protected]> |
| 807 |
|
| 808 |
Avoid C99 constructs |
| 809 |
Although gnulib requires C99, most of the code does compile with a |
| 810 |
C90 compiler (perhaps with a lot of warnings). Reinstate our C90 |
| 811 |
configuration test, and clean up a few C99 things that crept in. |
| 812 |
|
| 813 |
* src/job.c (construct_command_argv_internal): Don't use loop-local |
| 814 |
variables or C++ comments. |
| 815 |
* src/read.c (eval_makefile): Don't use loop-local variables. |
| 816 |
|
| 817 |
2022-10-29 Paul Smith <[email protected]> |
| 818 |
|
| 819 |
* build.sh: Allow a "keep-going" mode during builds |
| 820 |
|
| 821 |
2022-10-29 Paul Smith <[email protected]> |
| 822 |
|
| 823 |
tests: Avoid the use of File::Temp->newdir() |
| 824 |
This was added in Perl 5.8 but some systems still only provide older |
| 825 |
versions such as Perl 5.6. We don't really need it anyway. |
| 826 |
Paul Eggert <[email protected]> reported this issue. |
| 827 |
|
| 828 |
* tests/README: Update this to be a bit more modern. |
| 829 |
* tests/test_driver.pl: Delete the $TEMPDIR variable. |
| 830 |
* tests/scripts/features/temp_stdin: Use $temppath not $TEMPDIR. |
| 831 |
|
| 832 |
2022-10-29 Paul Smith <[email protected]> |
| 833 |
|
| 834 |
* src/posixos.c (os_anontmp): [SV 63287] Only fail O_TMPFILE once |
| 835 |
Reported by Dmitry Goncharov <[email protected]>. |
| 836 |
|
| 837 |
2022-10-28 Paul Smith <[email protected]> |
| 838 |
|
| 839 |
[SV 62174] Force locale to be "C" before retrieving error messages |
| 840 |
We attempt to do this with POSIX::setlocale() but apparently on some |
| 841 |
systems (AIX) this isn't sufficient. So, in addition force the LC |
| 842 |
environment variables to use "C". |
| 843 |
Reported by Dmitry Goncharov <[email protected]>. |
| 844 |
|
| 845 |
* tests/run_make_tests.pl: Move the global setup into set_default(). |
| 846 |
Force the %ENV locale variables to use the ones we'll use when running |
| 847 |
make, then reset them back again after we find error messages. |
| 848 |
|
| 849 |
2022-10-27 Paul Smith <[email protected]> |
| 850 |
|
| 851 |
* src/job.c: [SV 63185] Don't use ifdef with HAVE_DECL_* macros |
| 852 |
|
| 853 |
2022-10-25 Paul Smith <[email protected]> |
| 854 |
|
| 855 |
* tests/scripts/features/exec: Don't test with C shells |
| 856 |
Using C shells (csh, tcsh) with make is known to be problematic due |
| 857 |
to incorrect ways it handles open file descriptors, at least. If |
| 858 |
the user's shell is *csh then don't try it during exec tests. |
| 859 |
|
| 860 |
2022-10-25 Paul Smith <[email protected]> |
| 861 |
|
| 862 |
Increase the test framework timeout from 5s to 60s |
| 863 |
It seems that some of the test environments hit the 5s timeout on |
| 864 |
some tests. Since it doesn't really matter, as long as we don't |
| 865 |
hang forever, increase the timeout to 60s. |
| 866 |
|
| 867 |
* tests/test_driver.pl: Increase $test_timout to 60. We don't need |
| 868 |
to handle VMS timeouts specially anymore. |
| 869 |
* tests/scripts/features/parallelism: We don't need to override the |
| 870 |
default timeout anymore. |
| 871 |
* tests/scripts/features/patternrules: Remove confusing comment. |
| 872 |
|
| 873 |
2022-10-25 Paul Smith <[email protected]> |
| 874 |
|
| 875 |
* Makefile.am (check-regression): Add a random suffix to results file |
| 876 |
Put the results into a subdirectory for easy unpacking. |
| 877 |
* .gitignore: Ignore it. |
| 878 |
|
| 879 |
2022-10-24 Paul Smith <[email protected]> |
| 880 |
|
| 881 |
Release GNU Make 4.3.92 |
| 882 |
* configure.ac: Modify the release version. |
| 883 |
* NEWS: Update the version and date. |
| 884 |
|
| 885 |
2022-10-24 Paul Smith <[email protected]> |
| 886 |
|
| 887 |
[SV 63260] Don't recurse forever if setup_tmpfile() fails |
| 888 |
If we fail during setup_tmpfile() we'll try to write an error, which |
| 889 |
will invoke setup_tmpfile() again, etc. Avoid infinite recursion. |
| 890 |
Original patch by Dmitry Goncharov <[email protected]> |
| 891 |
|
| 892 |
* src/output.c (setup_tmpfile): Remember we're in this function and |
| 893 |
return immediately if we enter it during recursion. |
| 894 |
(message): Remember the starting location and use that instead of |
| 895 |
fmtbuf.buffer. |
| 896 |
(error): Ditto. |
| 897 |
(fatal): Ditto. |
| 898 |
|
| 899 |
2022-10-24 Paul Smith <[email protected]> |
| 900 |
|
| 901 |
* src/output.c (_outputs): Don't use invalid output sync FDs |
| 902 |
Just write to stdout/stderr in this situation. |
| 903 |
|
| 904 |
* src/misc.c (get_tmpdir): Report errors if tmpdirs are invalid |
| 905 |
* src/main.c (main): Set up initial temporary directories. |
| 906 |
|
| 907 |
2022-10-23 Dmitry Goncharov <[email protected]> |
| 908 |
|
| 909 |
* src/posixos.c (os_anontmp): If O_TMPFILE fails try dup() method. |
| 910 |
|
| 911 |
2022-10-23 Paul Smith <[email protected]> |
| 912 |
|
| 913 |
* src/rule.c (get_rule_defn): Don't use STRING_SIZE_TUPLE in mempcpy |
| 914 |
If mempcpy() is a macro then STRING_SIZE_TUPLE won't compile. |
| 915 |
|
| 916 |
2022-10-23 Paul Smith <[email protected]> |
| 917 |
|
| 918 |
Provide a maintainer-only debug method |
| 919 |
Generating debug logs to stdout or stderr makes it impossible to |
| 920 |
run tests etc. so create a dumb DBG facility to log to a temp file. |
| 921 |
This exists only in maintainer mode and the DBG macro gives a |
| 922 |
compile error if it's used in non-maintainer mode. |
| 923 |
|
| 924 |
* src/makeint.h (DBG): Call dbg() in maintainer mode, else error. |
| 925 |
(dbg): Define it in maintainer mode. |
| 926 |
* src/misc.c (dbg): Open a log file for append, write, then close. |
| 927 |
|
| 928 |
2022-10-22 Paul Smith <[email protected]> |
| 929 |
|
| 930 |
* configure.ac: Check that we can link with Guile |
| 931 |
On multi-arch systems we may be able to find the header file but |
| 932 |
not successfully link the library. |
| 933 |
|
| 934 |
2022-10-22 Paul Smith <[email protected]> |
| 935 |
|
| 936 |
Set PATH_MAX on systems without a default value |
| 937 |
Some systems (HURD) use fully-dynamic pathnames, with no limit. |
| 938 |
We can't support this without significant effort so for now set |
| 939 |
PATH_MAX to a large value. |
| 940 |
|
| 941 |
* src/makeint.h: Set PATH_MAX to 4096 if not set and MAXPATHLEN |
| 942 |
is also not set. Remove MAXPATHLEN setting: we won't use it. |
| 943 |
* src/misc.c (get_path_max): If we can't get the path max via |
| 944 |
pathconf() use the default PATH_MAX. |
| 945 |
* src/dir.c (find_directory) [W32]: Use MAX_PATH not MAXPATHLEN. |
| 946 |
(local_stat) [W32]: Ditto. |
| 947 |
* src/job.c (create_batch_file) [W32]: Ditto. |
| 948 |
* src/remake.c (name_mtime) [W32]: Ditto. |
| 949 |
* src/w32/w32os.c (os_anontmp) [W32]: Ditto. |
| 950 |
|
| 951 |
2022-10-22 Paul Smith <[email protected]> |
| 952 |
|
| 953 |
[SV 63098] Enhance detection of missing peer also-make targets |
| 954 |
The previous attempt to detect missing peer targets for implicit |
| 955 |
rules had some holes. Move the detection to notice_finished_file(). |
| 956 |
|
| 957 |
* src/remake.c (check_also_make): If we don't have the current mtime |
| 958 |
for the file, obtain it. |
| 959 |
(update_goal_chain): Don't call check_also_make() here. |
| 960 |
(check_dep): Ditto. |
| 961 |
(notice_finished_file): If we finished running an implicit rule that |
| 962 |
has also_make targets, invoke check_also_make(). |
| 963 |
|
| 964 |
2022-10-22 Paul Smith <[email protected]> |
| 965 |
|
| 966 |
Collect failure details when the regression tests fail |
| 967 |
* README.in: Add a section on running regression tests. |
| 968 |
* Makefile.am (check-regression): Capture the test run output, and |
| 969 |
on failure collect configure and test results into a tar file. |
| 970 |
|
| 971 |
2022-10-22 Paul Smith <[email protected]> |
| 972 |
|
| 973 |
Enhance tests to work on different systems |
| 974 |
The GNU platform testers reported a number of test errors on |
| 975 |
different systems; try to address them. |
| 976 |
|
| 977 |
* tests/thelp.pl: A number of tests timed out with a 4-second |
| 978 |
timeout. Increase the default timeout to 10 seconds. |
| 979 |
* tests/run_make_tests.pl: Executing directories on cygwin behaves |
| 980 |
differently in Perl than make so skip these tests there. |
| 981 |
* tests/scripts/options/symlinks: Check for the symlink feature |
| 982 |
in make, rather than whether the system supports them. |
| 983 |
* tests/scripts/features/implicit_search: On some systems "false" |
| 984 |
exits with a different exit code. Use the helper instead. |
| 985 |
* tests/scripts/features/loadapi: Ditto. |
| 986 |
* tests/scripts/features/output-sync: Sleep before make -f bar in |
| 987 |
the first test as well as the second one. |
| 988 |
* tests/scripts/features/exec: Skip on cygwin, which seems to |
| 989 |
be "UNIX" but where scripts don't run normally. |
| 990 |
* tests/scripts/misc/fopen-fail: Skip on cygwin, where make |
| 991 |
eventually exits with exit code 0 and no error messages. |
| 992 |
|
| 993 |
2022-10-22 Dmitry Goncharov <[email protected]> |
| 994 |
|
| 995 |
[SV 63243] tests: Avoid SIGTERM racing with make error messages |
| 996 |
Original patch from Frank Heckenbach <[email protected]>. |
| 997 |
|
| 998 |
* tests/scripts/features/output-sync: Introduce a sleep to let make |
| 999 |
write its error message. Some systems use different names for |
| 1000 |
SIGTERM so match with a regex. |
| 1001 |
* tests/scripts/features/temp_stdin: Ditto. |
| 1002 |
|
| 1003 |
2022-10-22 Dmitry Goncharov <[email protected]> |
| 1004 |
|
| 1005 |
[SV 63236] Fix getloadavg related error message on AIX |
| 1006 |
On AIX getloadavg keeps errno intact when it fails, resulting in a |
| 1007 |
bogus error message from make. |
| 1008 |
|
| 1009 |
* src/job.c (load_too_high): Reset errno before calling getloadavg. |
| 1010 |
|
| 1011 |
2022-10-22 Dmitry Goncharov <[email protected]> |
| 1012 |
|
| 1013 |
[SV 63248] Ignore SIGPIPE |
| 1014 |
Don't terminate when make's output is redirected to a pipe and the |
| 1015 |
reader exits early; e.g.: |
| 1016 |
$ echo 'all:; sleep 2' | make -f- -j2 -O |: |
| 1017 |
|
| 1018 |
This lets us unlink temporary files, and tell the user that make was |
| 1019 |
not able to write its output. |
| 1020 |
Reported by Frank Heckenbach <[email protected]>. |
| 1021 |
|
| 1022 |
* src/main.c (main): Ignore SIGPIPE. |
| 1023 |
* src/posixos.c (osync_clear): Fix a memory leak. |
| 1024 |
|
| 1025 |
2022-10-18 Paul Smith <[email protected]> |
| 1026 |
|
| 1027 |
* NEWS: Release GNU make 4.3.91 |
| 1028 |
|
| 1029 |
* AUTHORS: Update the authors list. |
| 1030 |
|
| 1031 |
* NEWS: Use GNU Make instead of GNU make |
| 1032 |
* README.git: Ditto. |
| 1033 |
* README.Amiga: Ditto. |
| 1034 |
* README.DOS: Ditto. |
| 1035 |
* README.OS2: Ditto. |
| 1036 |
* README.VMS: Ditto. |
| 1037 |
* README.W32: Ditto. |
| 1038 |
* README.customs: Ditto. |
| 1039 |
* make-gdb.py: Ditto. |
| 1040 |
* tests/run_make_tests.pl: Ditto. |
| 1041 |
|
| 1042 |
Update URLs to use https rather than http |
| 1043 |
* (all): Change http:// to https:// |
| 1044 |
* README.W32: Remove invalid link to mingw.org. |
| 1045 |
|
| 1046 |
2022-10-18 Paul Smith <[email protected]> |
| 1047 |
|
| 1048 |
Rework temp file handling to avoid GNU libc warnings |
| 1049 |
Original patch provided by Paul Eggert <[email protected]>. |
| 1050 |
GNU libc will generate a link-time warning if we use mktemp() even |
| 1051 |
though we are using it safely (we only use it with mkfifo()). |
| 1052 |
Avoid this and clean up some handling. |
| 1053 |
|
| 1054 |
First, check all calls related to temporary files and exit with a |
| 1055 |
fatal error and a useful message if we can't obtain them. In some |
| 1056 |
situations it might be possible to continue with reduced capability |
| 1057 |
but it's not worth the effort. |
| 1058 |
|
| 1059 |
On POSIX systems we can create anonymous temp files using O_TMPFILE |
| 1060 |
if it's supported, else if we're using the default location and we |
| 1061 |
have dup(2), we can use standard tmpfile() and get an FD from it. |
| 1062 |
|
| 1063 |
If we need a named temp file and FILE* and we have mkstemp() we can |
| 1064 |
use that, else if we have fdopen() we can get a temp FD and open it. |
| 1065 |
If none of those are available all we can do is generate a temp name |
| 1066 |
then open it with fopen() which is not secure. |
| 1067 |
|
| 1068 |
* src/makeint.h (get_tmpdir): Declare it for use elsewhere. |
| 1069 |
* src/misc.c (get_tmpdir): Make it public not static. |
| 1070 |
(get_tmptemplate): Simplify the implementation. |
| 1071 |
(get_tmppath): Only define this if we have to have it to avoid |
| 1072 |
warnings from GNU libc. |
| 1073 |
(get_tmpfd): Generate fatal errors on error. |
| 1074 |
(get_tmpfile): Ditto. Open files in "wb+" mode to match tmpfile(). |
| 1075 |
Require a filename pointer (all callers want it). |
| 1076 |
* src/os.h (os_anontmp): Implement for posixos.c as well. |
| 1077 |
* src/posix.c (jobserver_setup): Don't use mktemp to avoid GNU libc |
| 1078 |
errors. Instead construct the FIFO name based on the PID. |
| 1079 |
(osync_setup): get_tmpfd() can't fail so don't check it. |
| 1080 |
(os_anontmp): If the system supports O_TMPFILE use it. If not, and |
| 1081 |
we want to create the temporary file in the default directory, we |
| 1082 |
can use tmpfile() then use dup() to copy the file descriptor. |
| 1083 |
* src/main.c (main): get_tmpfile() can't fail. |
| 1084 |
* src/vmsjobs.c (child_execute_job): get_tmpfile() can't fail. |
| 1085 |
|
| 1086 |
2022-10-18 Paul Smith <[email protected]> |
| 1087 |
|
| 1088 |
Add ISDIRSEP() helper macro and use it |
| 1089 |
Create a ISDIRSEP() macro to check for directory separator chars |
| 1090 |
using the stopchar_map, and replace inline checks and explicit |
| 1091 |
STOP_SET calls with this macro. |
| 1092 |
|
| 1093 |
* src/makeint.h (ISDIRSEP): Create the macro using MAP_DIRSEP. |
| 1094 |
* src/dir.c (find_directory): Replace inline checks with ISDIRSEP. |
| 1095 |
(file_exists_p): Ditto. |
| 1096 |
(file_impossible): Ditto. |
| 1097 |
(file_impossible_p): Ditto. |
| 1098 |
(local_stat): Ditto. |
| 1099 |
* src/file.c (lookup_file): Ditto. |
| 1100 |
* src/function.c (abspath): Ditto. |
| 1101 |
* src/job.c (_is_unixy_shell): Ditto. |
| 1102 |
(is_bourne_compatible_shell): Ditto. |
| 1103 |
(construct_command_argv): Ditto. |
| 1104 |
* src/main.c (find_and_set_default_shell): Ditto. |
| 1105 |
(main): Ditto. |
| 1106 |
* src/read.c (eval): Ditto. |
| 1107 |
(parse_file_seq): Ditto. |
| 1108 |
* src/remake.c (name_mtime): Ditto. |
| 1109 |
* src/vpath.c (construct_vpath_list): Ditto. |
| 1110 |
|
| 1111 |
2022-10-18 Paul Smith <[email protected]> |
| 1112 |
|
| 1113 |
Add preprocessor macros for different platforms |
| 1114 |
* configure.ac: MK_CONFIGURE shows config.h was generated by configure. |
| 1115 |
* src/config.ami: Define MK_AMIGAOS. |
| 1116 |
* src/config.h-vms: Define MK_VMS. |
| 1117 |
* src/configh.dos: Define MK_DJGPP. |
| 1118 |
* src/config.h.W32: Define MK_W32 and WINDOWS32. |
| 1119 |
* src/build_w32.bat: Let WINDOWS32 be defined by config.h. Remove |
| 1120 |
unused setting of WIN32. |
| 1121 |
* src/job.c: Clean up use of WIN32. |
| 1122 |
* src/main.c: Ditto. |
| 1123 |
* tests/scripts/features/default_names: Ditto. |
| 1124 |
|
| 1125 |
2022-10-18 Paul Smith <[email protected]> |
| 1126 |
|
| 1127 |
Check for recipe line count overflow before it overflows |
| 1128 |
awk 'BEGIN { |
| 1129 |
print "x:" |
| 1130 |
for (i = 0; i < 65536; i++) |
| 1131 |
printf "\techo %d\n", i} |
| 1132 |
' | make -f - |
| 1133 |
|
| 1134 |
Outputs only "make: 'x' is up to date." Larger values run only the |
| 1135 |
lines above 65536. Reported by Paul Eggert <[email protected]>. |
| 1136 |
|
| 1137 |
* src/commands.c (chop_commands): Check the line count before it has |
| 1138 |
a chance to overflow. Use size_t for max count so it can't overflow. |
| 1139 |
Remove stray 'd' in diagnostic. |
| 1140 |
|
| 1141 |
2022-10-18 Paul Smith <[email protected]> |
| 1142 |
|
| 1143 |
Remove template files to simplify distribution creation |
| 1144 |
The README templates were not useful since the replacement step |
| 1145 |
didn't have anything to replace: rename them. |
| 1146 |
|
| 1147 |
Rather than creating template files for the config variants, create |
| 1148 |
mkconfig.h.in containg PACKAGE_* variables to be replaced, and have |
| 1149 |
config variant header files include it. Note on POSIX we don't use |
| 1150 |
this, and continue to generate a single config.h.in file. |
| 1151 |
|
| 1152 |
Use config.status to convert the README.in and mkconfig.h.in files |
| 1153 |
during distribution creation. |
| 1154 |
|
| 1155 |
Modify all users of VERSION to use PACKAGE_VERSION instead. |
| 1156 |
|
| 1157 |
* configure.ac: Use GNU Make not GNU make as the package name. |
| 1158 |
* README.in: Use GNU Make not GNU make. |
| 1159 |
* README.git: Remove references to README.W32.template. |
| 1160 |
* .gitignore: Update for new behavior. |
| 1161 |
* Basic.mk.template: Remove unused posix_SOURCES and VERSION, and |
| 1162 |
references to unshipped mk/Posix.mk |
| 1163 |
* Makefile.am: Add src/mkconfig.h as an extra dist file. |
| 1164 |
* bootstrap.bat: Rewrite mkconfig.h.in to mkconfig.h |
| 1165 |
* maintMakefile: Remove obsolete template files; add mkconfig.h.in. |
| 1166 |
* prepare_vms.com: Rewrite mkconfig.h.in to mkconfig.h |
| 1167 |
* mk/VMS.mk: Fix incorrect header file prerequisite. |
| 1168 |
* src/mkconfig.h.in: New file containing PACKAGE variables. |
| 1169 |
* src/config.ami: Include mkconfig.h. |
| 1170 |
* src/config.h.W32: Ditto. |
| 1171 |
* src/configh.dos: Ditto. |
| 1172 |
* src/config.h-vms: Ditto. |
| 1173 |
* src/version.c: Use PACKAGE_VERSION not VERSION. |
| 1174 |
|
| 1175 |
2022-10-16 Juan M. Guerrero <[email protected]> |
| 1176 |
|
| 1177 |
Support building with DJGPP 2.05 |
| 1178 |
* builddos.bat: Use env var settings for paths. Fix a typo in |
| 1179 |
expand.o. Add the missing load.o compilation and link. Enable |
| 1180 |
Guile support. Copy Basic.mk from the correct location. |
| 1181 |
* src/configh.dos.templage: DJGPP supports strtoll() and ssize_t |
| 1182 |
given new enough versions. Set preprocessor variables to 1 not 0. |
| 1183 |
|
| 1184 |
2022-10-16 Paul Smith <[email protected]> |
| 1185 |
|
| 1186 |
* src/job.c: [SV 63185] Include sys/loadavg.h if needed. |
| 1187 |
|
| 1188 |
2022-10-16 Paul Smith <[email protected]> |
| 1189 |
|
| 1190 |
[SV 63215] Remember the random seed for shuffle mode |
| 1191 |
Basic fix provided by James Hilliard <[email protected]>. |
| 1192 |
Ensure we remember and propagate the random seed we generate during |
| 1193 |
shuffle mode. Also add a debug statement displaying the seed. |
| 1194 |
|
| 1195 |
* src/shuffle.c (shuffle_set_mode): Init and save the randoms seed. |
| 1196 |
* src/misc.c (make_rand): Code cleanups. |
| 1197 |
* src/main.c (main): Show a debug message containing the seed. |
| 1198 |
|
| 1199 |
2022-10-15 Paul Smith <[email protected]> |
| 1200 |
|
| 1201 |
Use (void) rather than () in function declarations |
| 1202 |
In C, a function declaration with () allows any set of arguments. |
| 1203 |
Use (void) to mean "no arguments". |
| 1204 |
|
| 1205 |
* src/dep.h: Switch () to (void) for functions with no arguments. |
| 1206 |
* src/makeint.h: Ditto. |
| 1207 |
* src/os.h: Ditto. |
| 1208 |
* src/shuffle.h: Ditto. |
| 1209 |
* src/variable.h: Ditto. |
| 1210 |
|
| 1211 |
2022-10-15 Paul Smith <[email protected]> |
| 1212 |
|
| 1213 |
[SV 63157] Ensure temporary files are removed when signaled |
| 1214 |
Original patch from Dmitry Goncharov <[email protected]>. |
| 1215 |
When handling a fatal signal ensure the temporary files for |
| 1216 |
stdin and the jobserver fifo (if in use) are deleted. |
| 1217 |
|
| 1218 |
* src/makeint.h (temp_stdin_unlink): Declare a new method. |
| 1219 |
* src/main.c (temp_stdin_unlink): Delete the stdin temporary file |
| 1220 |
if it exists. If the unlink fails and we're not handling a signal |
| 1221 |
then show an error. |
| 1222 |
(main): Call temp_stdin_unlink() instead of unlinking by hand. |
| 1223 |
* src/commands.c (fatal_error_signal): Invoke cleanup methods if |
| 1224 |
we're handling a fatal signal. |
| 1225 |
* tests/scripts/features/output-sync: Test signal handling during |
| 1226 |
output sync and jobserver with FIFO. |
| 1227 |
* tests/scripts/features/temp_stdin: Test signal handling when |
| 1228 |
makefiles are read from stdin. |
| 1229 |
|
| 1230 |
2022-10-15 Paul Smith <[email protected]> |
| 1231 |
|
| 1232 |
* src/posixos.c (job_root): Remember root jobserver instances |
| 1233 |
(jobserver_setup): Set job_root to true. |
| 1234 |
(jobserver_clear): if we're the root instance and we're using a |
| 1235 |
FIFO, unlink it. If we're not in a signal handler, free memory. |
| 1236 |
(jobserver_acquire_all): Call jobserver_clear(). |
| 1237 |
(sync_root): Rename from sync_parent for consistency. |
| 1238 |
|
| 1239 |
Set the proper type for variables set in signal handlers |
| 1240 |
* bootstrap.conf: Get gnulib's sig_atomic_t type checking M4 macro. |
| 1241 |
* configure.ac: Invoke it. |
| 1242 |
* src/makeint.h (handling_fatal_signal): Set the type correctly. |
| 1243 |
* src/commands.c (handling_fatal_signal): Ditto. |
| 1244 |
|
| 1245 |
2022-10-08 Dmitry Goncharov <[email protected]> |
| 1246 |
|
| 1247 |
* tests/test_driver.pl (toplevel): [SV 63156] Keep temp env vars |
| 1248 |
|
| 1249 |
2022-10-03 Paul Smith <[email protected]> |
| 1250 |
|
| 1251 |
Clean up some warnings on Windows builds |
| 1252 |
* src/arscan.c (parse_int): Avoid conversion from int to char and |
| 1253 |
check for overflow given a max value. |
| 1254 |
(ar_scan): Check intmax sizes then cast to the proper type. |
| 1255 |
(ar_member_touch): Get proper return type from ar_scan and cast it |
| 1256 |
to off_t. |
| 1257 |
* src/function.c (a_word_hash_cmp): Don't cast from size_t to int. |
| 1258 |
(func_filter_filterout): Count using unsigned long to avoid casts. |
| 1259 |
(construct_include_path): Explicitly cast to void*. |
| 1260 |
* src/shuffle.c (reverse_shuffle_array): Use size_t index. |
| 1261 |
* src/w32/subproc/sub_proc.c (process_wait_for_multiple_objects): |
| 1262 |
Initialize the return value in case the count is 0. |
| 1263 |
|
| 1264 |
* src/misc.c (make_lltoa): Use printf format macro from makeint.h |
| 1265 |
(make_ulltoa): Ditto. |
| 1266 |
|
| 1267 |
* src/arscan.c (ar_scan): Avoid sign comparison warnings |
| 1268 |
Pacify 12.2.1 20220819 (Red Hat 12.2.1-2) -Wsign-compare by checking |
| 1269 |
the readbuf() return explicitly for errors then casting from ssize_t. |
| 1270 |
Initial patch provided by Paul Eggert <[email protected]>. |
| 1271 |
|
| 1272 |
2022-10-03 Paul Eggert <[email protected]> |
| 1273 |
|
| 1274 |
Support systems with 32-bit long and 64-bit time_t |
| 1275 |
Don't assume that time_t fits in long, as some hosts (e.g., |
| 1276 |
glibc x86 -D_TIME_BITS=64) have 32-bit long and 64-bit time_t. |
| 1277 |
|
| 1278 |
* bootstrap.conf (gnulib_modules): Add largefile, to support files |
| 1279 |
with timestamps after Y2038 on hosts with 32-bit long. |
| 1280 |
* configure.ac: Do not call AC_SYS_LARGEFILE, as the largefile module |
| 1281 |
does that for us. |
| 1282 |
* src/makeint.h (PRIdMAX, PRIuMAX, SCNdMAX): Define if not already |
| 1283 |
defined (taken from gnulib). |
| 1284 |
* src/ar.c: Include intprops.h, for TYPE_MAXIMUM, as |
| 1285 |
INTEGER_TYPE_MAXIMUM does not work on time_t without issuing a bunch |
| 1286 |
of warnings. |
| 1287 |
(ar_member_date): Check that result is in time_t range. |
| 1288 |
(ar_member_date_1): Use intmax_t to hold the date. |
| 1289 |
(ar_glob_match): Ditto. |
| 1290 |
* src/arscan.c (VMS_function, VMS_function_ret, ar_scan) |
| 1291 |
(parse_int, ar_scan, ar_member_pos, ar_member_touch) |
| 1292 |
(describe_member): Convert long int to intmax_t. |
| 1293 |
* src/file.c (file_timestamp_sprintf): Use intmax_t/uintmax_t instead |
| 1294 |
of long/unsigned long for values that might be time_t. |
| 1295 |
* src/arscan.c (ar_member_touch): Fix buffer overrun if the timestamp |
| 1296 |
is too large. |
| 1297 |
|
| 1298 |
2022-10-03 Paul Smith <[email protected]> |
| 1299 |
|
| 1300 |
Add support for intmax_t |
| 1301 |
* configure.ac: Ask autoconf to detect it. |
| 1302 |
* src/config.ami.template: Add #define intmax_t for AmigaOS. |
| 1303 |
* src/config.h-vms.template: Add #define intmax_t for VMS. |
| 1304 |
* src/config.h.W32.template: Add #define intmax_t for Windows. |
| 1305 |
* src/configh.dos.template: Add #define intmax_t for MS-DOS/DJPP. |
| 1306 |
|
| 1307 |
* NEWS: Deprecate Xenix |
| 1308 |
|
| 1309 |
2022-10-02 Paul Smith <[email protected]> |
| 1310 |
|
| 1311 |
[SV 63098] Temporarily revert the change to pattern rule behavior |
| 1312 |
The fix for SV 12078 caused a backward-compatibility issue with some |
| 1313 |
makefiles. In order to allow users to resolve this issue, revert |
| 1314 |
that change for this release cycle: it will be reinstated in the |
| 1315 |
next release cycle. Introduce a warning if we detect that the recipe |
| 1316 |
of a multi-target pattern rule doesn't create all the targets. |
| 1317 |
|
| 1318 |
* NEWS: Announce the future backward-incompatibility. |
| 1319 |
* doc/make.texi (Pattern Intro): Describe the behavior and that it |
| 1320 |
will change in the future. |
| 1321 |
* src/remake.c (check_also_make): Check for also_make targets that |
| 1322 |
were not created and generate a warning. |
| 1323 |
(update_goal_chain): Call the new function. |
| 1324 |
(check_dep): Ditto. |
| 1325 |
(update_file_1): Defer implicit rule detection until after we check |
| 1326 |
all the also_make files (as it used to be). |
| 1327 |
* tests/scripts/features/patternrules: Add tests of the new warning. |
| 1328 |
Skip the tests for SV 12078. |
| 1329 |
|
| 1330 |
2022-10-02 Paul Smith <[email protected]> |
| 1331 |
|
| 1332 |
* doc/make.texi (Prerequisite Types): [SV 58056] Clarify ordering. |
| 1333 |
|
| 1334 |
* src/filedef.h (is_ordinary_mtime): Check for "ordinary" mod time. |
| 1335 |
* src/remake.c (update_file_1): Use the new macro. |
| 1336 |
|
| 1337 |
* src/remake.c (update_file_1): Return valid enum element, not 0. |
| 1338 |
|
| 1339 |
* NEWS: Announce deprecation of OS/2 and AmigaOS ports |
| 1340 |
|
| 1341 |
* src/main.c (main): Add debug output for jobserver and osync. |
| 1342 |
* src/posixos.c (jobserver_setup): Remove redundant debug output. |
| 1343 |
(jobserver_parse_auth): Ditto. |
| 1344 |
|
| 1345 |
2022-10-02 Andreas Schwab <[email protected]> (tiny change) |
| 1346 |
|
| 1347 |
[SV 63111] Ensure output-sync is cleaned on re-exec and recursion |
| 1348 |
Now that output-sync is using a separate file as a mutex rather than |
| 1349 |
stdout, ensure the new file descriptor is closed before re-exec and |
| 1350 |
not inherited by children. |
| 1351 |
|
| 1352 |
* src/main.c (main): Call osync_clear() before re-exec. |
| 1353 |
* src/posixos.c (osync_setup): Reset output-sync handle inheritance. |
| 1354 |
(osync_parse_mutex): Ditto. |
| 1355 |
|
| 1356 |
2022-10-01 Paul Smith <[email protected]> |
| 1357 |
|
| 1358 |
* src/function.c: Change int to uint to align with gmk_func_ptr |
| 1359 |
|
| 1360 |
2022-10-01 Dmitry Goncharov <[email protected]> |
| 1361 |
|
| 1362 |
* doc/make.texi (Loaded Object API): [SV 63126] Fix typos and examples |
| 1363 |
|
| 1364 |
2022-10-01 Paul Smith <[email protected]> |
| 1365 |
|
| 1366 |
Implement a simple xorshift 32bit random number generator |
| 1367 |
Avoid relying on the system random number generator for our random |
| 1368 |
shuffle, so that the same seed gives the same results on all systems. |
| 1369 |
This generator doesn't need to be amazing, just pretty good, so don't |
| 1370 |
bother with xorshift* or xorshift+, etc. |
| 1371 |
|
| 1372 |
* src/makeint.h: Declare make_seed() and make_rand(). |
| 1373 |
* src/misc.c (make_seed): Set the seed value for the RNG. |
| 1374 |
(make_rand): Return the next random number. If the seed was not set |
| 1375 |
initialize it first. |
| 1376 |
* src/shuffle.c (shuffle_set_mode): If we don't get a seed from the |
| 1377 |
user just leave it unset (0). |
| 1378 |
(shuffle_deps_recursive): Use make_seed() not srand(). |
| 1379 |
(random_shuffle_array): Use make_rand() not rand(). |
| 1380 |
|
| 1381 |
2022-09-25 Dmitry Goncharov <[email protected]> |
| 1382 |
|
| 1383 |
[SV 63100] Set the floc of every created goal dep struct |
| 1384 |
* src/read.c (eval): Initialize the goaldep floc pointer. |
| 1385 |
* tests/scripts/features/loadapi: Verify that the floc is set after |
| 1386 |
unloading and reloading dynamic objects. |
| 1387 |
|
| 1388 |
2022-09-25 Paul Smith <[email protected]> |
| 1389 |
|
| 1390 |
* doc/make.texi: Update out of date behavior for grouped targets. |
| 1391 |
|
| 1392 |
* README.git: Announce releases to the platform-testers list |
| 1393 |
|
| 1394 |
2022-09-25 Paul Smith <[email protected]> |
| 1395 |
|
| 1396 |
Provide new functions to convert long long to string |
| 1397 |
The previous attempt to use PRI* macros to avoid compiler-specific |
| 1398 |
printf format specifiers didn't work because we are using raw |
| 1399 |
long long type, not the uintX_t types. On systems where long and |
| 1400 |
long long are the same size, uint64_t might be type "long" and PRId64 |
| 1401 |
is just "ld". |
| 1402 |
|
| 1403 |
Instead write new functions that convert [unsigned] long long to a |
| 1404 |
string and call those instead. |
| 1405 |
|
| 1406 |
* src/makeint.h: Declare make_lltoa() and make_ulltoa(). |
| 1407 |
* src/misc.c (make_lltoa): New function that writes a long long value |
| 1408 |
into a provided buffer. Return the buffer for ease-of-use. |
| 1409 |
(make_ulltoa): Ditto, for unsigned long long. |
| 1410 |
* src/function.c (func_wordlist): Call these new methods. Also |
| 1411 |
rework the error strings so we share the translated string. |
| 1412 |
* src/dir.c (print_dir_data_base): Call the new methods instead of |
| 1413 |
using MSVC macros. |
| 1414 |
|
| 1415 |
2022-09-25 Paul Smith <[email protected]> |
| 1416 |
|
| 1417 |
Always restore global environ if we use vfork |
| 1418 |
We may change the global environ variable in the child; when using |
| 1419 |
vfork() this also sets it in the parent. Preserve the parent's |
| 1420 |
environ in child_execute_job() so it takes effect for all callers. |
| 1421 |
|
| 1422 |
Reported by Denis Excoffier <[email protected]> |
| 1423 |
Root cause found by Martin Dorey <[email protected]> |
| 1424 |
|
| 1425 |
* src/job.c (start_job_command): Remove save/restore of the parent |
| 1426 |
environment. |
| 1427 |
(child_execute_job): Add save/restore of the parent environment, |
| 1428 |
if we use vfork(). |
| 1429 |
* tests/scripts/functions/shell: Add a test the crashes if we don't |
| 1430 |
reset environ after we run $(shell ...). |
| 1431 |
|
| 1432 |
2022-09-25 Dmitry Goncharov <[email protected]> |
| 1433 |
|
| 1434 |
* configure.ac: [SV 63070] Clean up the test program for posix_spawn. |
| 1435 |
|
| 1436 |
2022-09-25 Paul Smith <[email protected]> |
| 1437 |
|
| 1438 |
* src/posixos.c (osync_clear): Don't close invalid FDs. |
| 1439 |
|
| 1440 |
* maintMakefile: Use gnulib ncftpput-ftp if ncftpput is missing. |
| 1441 |
|
| 1442 |
* src/misc.c (strncasecmp): Use size_t for length to match std. |
| 1443 |
* src/misc.h (strncasecmp): Fix the declaration. |
| 1444 |
|
| 1445 |
* configure.ac: Update to GNU make 4.3.91 |
| 1446 |
* NEWS: Update the version and clarify some backward-compat issues. |
| 1447 |
|
| 1448 |
2022-09-25 Eli Zaretskii <[email protected]> |
| 1449 |
|
| 1450 |
Fix compiler warnings in the MS-Windows build. |
| 1451 |
* src/w32/w32os.c (osync_get_mutex, osync_parse_mutex): Cast to |
| 1452 |
DWORD_PTR when converting integers to HANDLEs and vice versa. |
| 1453 |
|
| 1454 |
* src/w32/pathstuff.c (w32ify): Pacify compiler warnings about |
| 1455 |
'strncpy'. |
| 1456 |
|
| 1457 |
* src/makeint.h (PRId64) [!HAVE_INTTYPES_H]: Define if undefined. |
| 1458 |
* src/function.c (func_wordlist): Use PRId64 instead of %lld. |
| 1459 |
|
| 1460 |
2022-09-24 Eli Zaretskii <[email protected]> |
| 1461 |
|
| 1462 |
Avoid compilation warnings |
| 1463 |
* src/implicit.c: (pattern_search): |
| 1464 |
* src/main.c: (main): Avoid compilation warnings for variables |
| 1465 |
only used when compiling a debug version with assertions. |
| 1466 |
|
| 1467 |
2022-09-20 Paul Smith <[email protected]> |
| 1468 |
|
| 1469 |
Release GNU make 4.3.90 |
| 1470 |
* NEWS: Update for the prerelease. |
| 1471 |
* bootstrap.conf: Choose the latest stable gnulib. |
| 1472 |
* README.git: Updates. |
| 1473 |
|
| 1474 |
* tests/script/parallelism: Force wait to remove races. |
| 1475 |
|
| 1476 |
2022-09-20 Dmitry Goncharov <[email protected]> |
| 1477 |
|
| 1478 |
[SV 56301] Fail if an included makefile can't be built |
| 1479 |
Fail if a mandatory include file fails to be built even if it's |
| 1480 |
built as part of a grouped target where the other include file |
| 1481 |
is optional. |
| 1482 |
|
| 1483 |
* src/main.c (main): If a makefile doesn't build set any_failed. |
| 1484 |
* tests/scripts/features/include: Add tests. |
| 1485 |
* tests/scripts/options/dash-k: Stop after include build failure. |
| 1486 |
|
| 1487 |
2022-09-20 Paul Smith <[email protected]> |
| 1488 |
|
| 1489 |
* tests/scripts/features/statipattrules: [SV 17374] Add test |
| 1490 |
Verify that double-colon static pattern rules work. |
| 1491 |
|
| 1492 |
2022-09-20 Paul Smith <[email protected]> |
| 1493 |
|
| 1494 |
[SV 12078, SV 62809] Rebuild grouped targets if any is missing |
| 1495 |
If any of a set of grouped targets is missing or out of date, even |
| 1496 |
if make is not trying to build that target, rebuild them all. |
| 1497 |
Ensure this is true for explicit grouped targets as well as pattern |
| 1498 |
rule grouped targets. |
| 1499 |
|
| 1500 |
Original patch by Jonathan Gravel <[email protected]> |
| 1501 |
|
| 1502 |
* src/remake.c (update_file_1): After matching any pattern rules, |
| 1503 |
go through the also_make targets and set noexist as needed. Also |
| 1504 |
compute the oldest this_mtime. |
| 1505 |
* tests/scripts/features/grouped_targets: Add regression tests. |
| 1506 |
* tests/scripts/features/patternrules: Ditto. |
| 1507 |
* tests/features/vpath: Rewrite to use modern run_make_test(). |
| 1508 |
Add a test that we check for VPATH before implicit rule search. |
| 1509 |
Move the tests in vpath2 and vpath3 into this suite. |
| 1510 |
* tests/features/vpathplus: Rewrite to use modern run_make_test(). |
| 1511 |
|
| 1512 |
2022-09-17 Dmitry Goncharov <[email protected]> |
| 1513 |
|
| 1514 |
* tests/scripts/targets/WAIT: [SV 63071] Remove possible test races. |
| 1515 |
|
| 1516 |
2022-09-13 Paul Smith <[email protected]> |
| 1517 |
|
| 1518 |
* doc/make.texi (Parallel Disable): Add clarifications. |
| 1519 |
* NEWS: Suggest how to change makefiles that use $(MAKEFLAGS). |
| 1520 |
|
| 1521 |
2022-09-12 Paul Smith <[email protected]> |
| 1522 |
|
| 1523 |
[SV 13862] Implement the .WAIT special target |
| 1524 |
The next version of the POSIX standard defines parallel execution |
| 1525 |
and requires the .WAIT special target as is implemented in some other |
| 1526 |
versions of make. |
| 1527 |
|
| 1528 |
This implementation behaves similarly to others in that it does not |
| 1529 |
create a relationship between targets in the dependency graph, so |
| 1530 |
that the same two targets may be run in parallel if they appear as |
| 1531 |
prerequisites elsewhere without .WAIT between them. |
| 1532 |
|
| 1533 |
Now that we support .WAIT it's trivial to also support prerequisites |
| 1534 |
of the .NOTPARALLEL special target, which forces the prerequisites of |
| 1535 |
those targets to be run serially (as if .WAIT was specified between |
| 1536 |
each one). |
| 1537 |
|
| 1538 |
* NEWS: Announce the new .WAIT and .NOTPARALLEL support. |
| 1539 |
* doc/make.texi (Parallel Disable): A new section to discuss ways in |
| 1540 |
which parallel execution can be controlled. Modify cross-refs to |
| 1541 |
refer to this section. |
| 1542 |
* src/dep.h (struct dep): Add a new wait_here boolean. |
| 1543 |
(parse_file_seq): Add PARSEFS_WAIT to check for .WAIT dependencies. |
| 1544 |
* src/file.c (split_prereqs): Use PARSEFS_WAIT. |
| 1545 |
(snap_deps): If .NOTPARALLEL has prerequisites, set .WAIT between |
| 1546 |
each of _their_ prerequisites. |
| 1547 |
(print_prereqs): Add back in .WAIT when printing prerequisites. |
| 1548 |
* src/implicit.c (struct patdeps): Preserve wait_here. |
| 1549 |
(pattern_search): Ditto. Use PARSEFS_WAIT when parsing prereqs for |
| 1550 |
pattern rule expansion. |
| 1551 |
* src/read.c (check_specials): Don't give up early: remembering to |
| 1552 |
update these options is not worth the rare speedup. |
| 1553 |
(check_special_file): If .WAIT is given as a target show an error-- |
| 1554 |
once--if it has prereqs or commands. |
| 1555 |
(record_files): Call check_special_file on each target. |
| 1556 |
(parse_file_seq): If PARSEFS_WAIT is given, look for .WAIT prereqs. |
| 1557 |
If we see one assume that we are building a struct dep chain and set |
| 1558 |
the wait_here option while not putting it into the list. |
| 1559 |
* src/remake.c (update_file_1): If wait_here is set and we are still |
| 1560 |
running, then stop trying to build this target's prerequisites. |
| 1561 |
* src/rule.c (get_rule_defn): Add .WAIT to the prerequisite list. |
| 1562 |
* src/shuffle.c (shuffle_deps): Don't shuffle the prerequisite list |
| 1563 |
if .WAIT appears anywhere in it. |
| 1564 |
* tests/scripts/targets/WAIT: Add a test suite for this feature. |
| 1565 |
|
| 1566 |
2022-09-12 Dmitry Goncharov <[email protected]> |
| 1567 |
|
| 1568 |
[SV 63045] Reload each intact unloaded shared object |
| 1569 |
If makefile rules do not update an unloaded shared object, load it |
| 1570 |
again. Avoid double loading of the same object if the setup function |
| 1571 |
returns -1. |
| 1572 |
|
| 1573 |
* src/filedef.h (struct file): Add "unloaded" flag. |
| 1574 |
* src/makeint.h (load_file): Take struct file *. |
| 1575 |
(unload_file): Return int. |
| 1576 |
* src/main.c (main): Reload unloaded shared objects if they weren't |
| 1577 |
updated. |
| 1578 |
* src/commands.c (execute_file_commands): Set "unloaded" and reset |
| 1579 |
"loaded" when a shared object is unloaded. |
| 1580 |
* src/read.c (eval): Set "loaded" and reset "unloaded" when a shared |
| 1581 |
object is loaded. Add successfully loaded files to the db. |
| 1582 |
* src/load.c (load_file): Check "loaded" to avoid double loading the |
| 1583 |
same object. Fix a memory leak of string loaded. Return -1, rather |
| 1584 |
than 1, if the object is already loaded. This fixes double loading of |
| 1585 |
the same object when the setup routine returns -1. |
| 1586 |
(load_object): Add a log message. |
| 1587 |
(unload_file): Return an error on dlclose failure. Log a message. |
| 1588 |
* tests/scripts/features/loadapi: Add new tests. |
| 1589 |
|
| 1590 |
2022-09-12 Sergei Trofimovich <[email protected]> |
| 1591 |
|
| 1592 |
[SV 63047] Fix shuffle of SECONDEXPANSION prerequisites |
| 1593 |
Commit 07eea3aa4 `make --shuffle` prevented shuffling prerequisites |
| 1594 |
that use .SECONDEXPANSION, since shuffle happens before expansion. |
| 1595 |
This has two problems: |
| 1596 |
1. No shuffling happens for such prerequisites. |
| 1597 |
2. Use-after-free when outdated '->shuf' links are used. |
| 1598 |
|
| 1599 |
Add a reshuffle into expansion phase right after dependency changes. |
| 1600 |
|
| 1601 |
* src/file.c (expand_deps): Add reshuffle if dependencies change. |
| 1602 |
* src/shuffle.c (identity_shuffle_array): Fix comment typo. |
| 1603 |
* tests/scripts/options/shuffle: Add new SECONDEXPANSION test. |
| 1604 |
|
| 1605 |
2022-09-11 Paul Smith <[email protected]> |
| 1606 |
|
| 1607 |
* doc/make.texi (How Make Works): Clarify default goal exceptions. |
| 1608 |
|
| 1609 |
* src/shuffle.c: Minor coding changes. |
| 1610 |
|
| 1611 |
2022-09-11 Paul Smith <[email protected]> |
| 1612 |
|
| 1613 |
Support the MAKE_TMPDIR environment variable |
| 1614 |
Allow build systems to choose an alternative location for make to |
| 1615 |
store its temporary files. |
| 1616 |
|
| 1617 |
* NEWS: Announce the new environment variable. |
| 1618 |
* doc/make.texi (Temporary Files): Provide documentation. |
| 1619 |
* src/misc.c (get_tmpdir): Split into a new function. Compute the |
| 1620 |
temporary directory and store it in a static location. |
| 1621 |
* tests/scripts/features/jobserver: Add a test of MAKE_TMPDIR. |
| 1622 |
|
| 1623 |
2022-09-10 Paul Smith <[email protected]> |
| 1624 |
|
| 1625 |
[SV 62898] Document ways to hide special chars from make functions |
| 1626 |
* doc/make.texi (Function Call Syntax): Add a subsubheading describing |
| 1627 |
which special characters may need to be hidden from make functions. |
| 1628 |
|
| 1629 |
2022-09-10 Dmitry Goncharov <[email protected]> |
| 1630 |
|
| 1631 |
[SV 63044] load: Update .LOADED if the setup function returns -1 |
| 1632 |
* src/load.c (load_file): Update .LOADED if setup returns non-0. |
| 1633 |
* tests/scripts/features/load: Change the return value based on an |
| 1634 |
environment variable. Ensure that returning -1 still adds to |
| 1635 |
.LOADED. Also add a test that verifies that make doesn't try to |
| 1636 |
rebuild the loaded file if -1 is returned. |
| 1637 |
|
| 1638 |
2022-09-10 Paul Smith <[email protected]> |
| 1639 |
|
| 1640 |
Enhance the make.texi formatting |
| 1641 |
Notes provided by Tzvetelin Katchov <[email protected]>. |
| 1642 |
|
| 1643 |
* doc/make.texi: Remove obsolete @refill statements. Add some breaks |
| 1644 |
to overfull lines. Fix up some example text. |
| 1645 |
|
| 1646 |
2022-09-10 Paul Smith <[email protected]> |
| 1647 |
|
| 1648 |
Clean up maintMakefile |
| 1649 |
Notes provided by Tzvetelin Katchov <[email protected]> |
| 1650 |
|
| 1651 |
* maintMakefile (git-very-clean): Add -x to git clean. |
| 1652 |
(GNULIBDIR): Use GNULIB_SRCDIR, or the local module if not set. |
| 1653 |
|
| 1654 |
2022-09-10 Paul Smith <[email protected]> |
| 1655 |
|
| 1656 |
[SV 63037] Fix tests for newer OS / compiler |
| 1657 |
* tests/scripts/features/load: Add function prototypes. |
| 1658 |
* tests/scripts/features/temp_stdin: Only set user execute bits. |
| 1659 |
Some configurations don't allow changing the group bits...?? |
| 1660 |
|
| 1661 |
2022-09-10 Paul Smith <[email protected]> |
| 1662 |
|
| 1663 |
[SV 63040] shell: Fall back to the callers environment |
| 1664 |
If we detect a recursive variable reference when constructing the |
| 1665 |
environment for the shell function, return the original value from the |
| 1666 |
caller's environment. Other options such as failing, returning the |
| 1667 |
empty string, or returning the unexpanded make variable value have |
| 1668 |
been shown to not behave well in real-world environments. If the |
| 1669 |
variable doesn't exist in the caller's environment, return the empty |
| 1670 |
string. |
| 1671 |
|
| 1672 |
Found by Sergei Trofimovich <[email protected]> when testing older |
| 1673 |
versions of autoconf. |
| 1674 |
|
| 1675 |
* NEWS: Clarify this behavior. |
| 1676 |
* doc/make.texi (Shell Function): Ditto. Also add info about !=. |
| 1677 |
* src/expand.c (recursively_expand_for_file): Search the caller's |
| 1678 |
environment if we detect a recursive variable expansion. |
| 1679 |
* tests/scripts/functions/shell: Add tests for this behavior. |
| 1680 |
|
| 1681 |
2022-09-08 Paul Smith <[email protected]> |
| 1682 |
|
| 1683 |
[SV 63016] Don't fail exporting to $(shell ...) |
| 1684 |
The fix for SV 10593 caused recursive expansion errors when exporting |
| 1685 |
a variable that contains a $(shell ...) invocation. If we see this |
| 1686 |
type of recursion, ignore it and expand to the empty string rather |
| 1687 |
than failing. |
| 1688 |
|
| 1689 |
* src/variable.h (env_recursion): New global variable. |
| 1690 |
* src/variable.c (target_environment): If creating the environment |
| 1691 |
for a $(shell ...) function increment env_recursion. Remove the |
| 1692 |
check for expansion in a shell function context. |
| 1693 |
* src/expand.c (recursively_expand_for_file): Check for recursive |
| 1694 |
expansion in a $(shell ...) environment context and if present, |
| 1695 |
show the verbose message and return the empty string. |
| 1696 |
* tests/scripts/functions/shell: Add a test for this situation. |
| 1697 |
|
| 1698 |
2022-09-08 Paul Smith <[email protected]> |
| 1699 |
|
| 1700 |
Ensure debug output ends in newline |
| 1701 |
* src/load.c (load_object): Debug output strings must include \n. |
| 1702 |
* src/variable.c (target_environment): Ditto. |
| 1703 |
* src/posixos.c: Remove extra newlines. |
| 1704 |
|
| 1705 |
2022-09-08 Paul Smith <[email protected]> |
| 1706 |
|
| 1707 |
Sanitize tar file ownership, mode, and order |
| 1708 |
For reproducibility ensure all files in the dist tar file are owned by |
| 1709 |
root, and sorted by name. Force the mode on all files to be writable |
| 1710 |
by the owner and not writable by group or user, by default. |
| 1711 |
|
| 1712 |
Remove unnecessary execute permissions from build_w32.bat. |
| 1713 |
|
| 1714 |
Recommended by Tzvetelin Katchov <[email protected]>. |
| 1715 |
|
| 1716 |
2022-09-08 Paul Smith <[email protected]> |
| 1717 |
|
| 1718 |
bootstrap: Update to the latest gnulib bootstrap model |
| 1719 |
* README.git: Document the changes. |
| 1720 |
* bootstrap.conf: Set GNULIB_REVISION to avoid random updates. |
| 1721 |
* configure.ac: Set the minimum autoconf version back to 2.69: |
| 1722 |
that's the most common version deployed today, and it still works. |
| 1723 |
* bootstrap: Copy the latest from gnulib. |
| 1724 |
* autogen.sh: Ditto. |
| 1725 |
* autopull.sh: Ditto. |
| 1726 |
* bootstrap-funclib.sh: Ditto. |
| 1727 |
|
| 1728 |
2022-08-30 Paul Smith <[email protected]> |
| 1729 |
|
| 1730 |
Fix tests for MacOS and Windows |
| 1731 |
* maintMakefile: Remove the template headers as prerequisites. |
| 1732 |
* tests/scripts/features/jobserver: Only test fifo if enabled. |
| 1733 |
* tests/scripts/variables/INCLUDE_DIRS: On MacOS none of the default |
| 1734 |
directories exist so .INCLUDE_DIRS is empty by default. |
| 1735 |
* tests/scripts/features/se_explicit: Fail via exit. cp will show |
| 1736 |
different error messages on different systems. |
| 1737 |
* tests/scripts/features/se_implicit: Ditto. |
| 1738 |
* tests/scripts/features/se_statpat: Ditto. |
| 1739 |
|
| 1740 |
2022-08-30 Paul Smith <[email protected]> |
| 1741 |
|
| 1742 |
[SV 62840] Don't change IO buffering before printing version |
| 1743 |
If users run 'make --version | head -n1' they expect make to exit |
| 1744 |
with a success (0) code. This works because the pipe forces the |
| 1745 |
default buffering on stdout to be fully buffered so all the output |
| 1746 |
is printed to the pipe in a single write(2) and won't fail. However |
| 1747 |
due to output sync we forcibly set stdout to line buffered, which |
| 1748 |
means if the reader closes the pipe fast enough make will exit with |
| 1749 |
an error code because the write to stdout failed. |
| 1750 |
|
| 1751 |
Move the setup done in output_init() back into main() where it can |
| 1752 |
be done in a proper order. Rework the order of operations during |
| 1753 |
startup so that we check for help and version flags before we change |
| 1754 |
the buffering. Clean up the behavior of print_usage(). |
| 1755 |
|
| 1756 |
Original changes from Dmitry Goncharov <[email protected]>. |
| 1757 |
|
| 1758 |
* src/main.c (switches): Don't send --version in the environment. |
| 1759 |
(print_usage): Add a blank line after the version before the usage. |
| 1760 |
Move the die() into this function since we always die() afterward. |
| 1761 |
Note the die will flush so no need to do it explicitly. |
| 1762 |
(print_version): The caller will fflush when appropriate. |
| 1763 |
(close_stdout): Move from output.c so it is installed early. |
| 1764 |
(decode_switches): Only call print_usage on error, not for --help. |
| 1765 |
(main): Install the close_stdout handler immediately after start. |
| 1766 |
Move the calls to print_usage() due to --help and --version to be |
| 1767 |
called immediately after we decode the switches. Move the buffer set |
| 1768 |
here from output_init(), immediately after we know we'll be running. |
| 1769 |
* src/output.c (output_init): Move buffer setting to main(). |
| 1770 |
(close_stdout): Move to main(). |
| 1771 |
|
| 1772 |
2022-08-30 Paul Smith <[email protected]> |
| 1773 |
|
| 1774 |
Rework output sync to lock a temp file on POSIX |
| 1775 |
Some POSIX systems do not allow locks to be taken on non-files, such |
| 1776 |
as pipes. This is a problem since very often make is invoked with |
| 1777 |
its stdout redirected to a pipe. Also, if stdout is redirected to a |
| 1778 |
file that already has a lock on it for some other reason (perhaps a |
| 1779 |
shared file such as /dev/null) it can cause a hang. |
| 1780 |
|
| 1781 |
This means our previous method of locking stdout, although it had some |
| 1782 |
nice advantages, is not portable enough. Instead, use a temporary |
| 1783 |
file and take the lock on that. We pass the name of the file to child |
| 1784 |
make processes. On Windows we continue to use a shared mutex for |
| 1785 |
output sync. |
| 1786 |
|
| 1787 |
Remove POSIX emulation functions like fcntl from Windows; instead |
| 1788 |
follow the lead of the jobserver and create an interface in os.h for |
| 1789 |
output sync, and move the OS-specific content to posixos.c and |
| 1790 |
w32os.c. |
| 1791 |
|
| 1792 |
* NEWS: Add a note. |
| 1793 |
* src/makeint.h (ALL_SET): Check that all bits are set. |
| 1794 |
* src/os.h: Add bits for checking the state of stdin/stdout/stderr. |
| 1795 |
Add prototypes for OS-specific output sync methods. |
| 1796 |
* src/posixos.c (check_io_state): Determine the status of stdin, |
| 1797 |
stdout, stderr an return a suite of bits describing them. |
| 1798 |
(osync_enabled): If the global variable holding the FD of the lock |
| 1799 |
file (osync_handle) is valid return true. |
| 1800 |
(osync_setup): Create a temporary file and remember its name in a |
| 1801 |
global variable (osync_tmpfile), and set osync_handle. |
| 1802 |
(osync_get_mutex): If output sync is enabled, return the filename |
| 1803 |
of the lock file prefixed with "fnm:" to denote a filename. |
| 1804 |
(osync_parse_mutex): If the provided filename has the wrong format |
| 1805 |
disable output sync. Else open the lock file and set osync_handle. |
| 1806 |
(osync_clear): Close osync_handle. If we're the parent make, then |
| 1807 |
also unlink the temporary file. |
| 1808 |
(osync_acquire): Take a lock on the osync_handle descriptor. |
| 1809 |
(osync_release): Release the lock on the osync_handle descriptor. |
| 1810 |
(fd_set_append): Add APPEND mode to a file descriptor. |
| 1811 |
* src/w32/w32os.c: Perform the same actions as posixos.c, copying |
| 1812 |
the details from src/w32/compat/posixfcn.c. Use a mutex rather |
| 1813 |
than locking a temporary file. |
| 1814 |
* src/output.h: Remove all the OS-specific content. |
| 1815 |
* src/output.c: Remove all the OS-specific content. |
| 1816 |
(set_append_mode): Remove and replace with fd_set_append(). |
| 1817 |
(sync_init): Remove and replace with check_io_state(). |
| 1818 |
(acquire_semaphore): Remove and replace with osync_acquire(). |
| 1819 |
(release_semaphore): Remove and replace with osync_release(). |
| 1820 |
(setup_tmpfile): If the IO state is not obtained, get it. If stdout |
| 1821 |
and/or stderr are valid, set up a tempfile to capture them. |
| 1822 |
(output_init): Set io_state if not set already, and check it when |
| 1823 |
deciding whether to close stdout on exit. |
| 1824 |
* src/main.c (main): If we're syncing, set up the mutex using the |
| 1825 |
new osync_setup() / osync_parse_mutex() methods. |
| 1826 |
(prepare_mutex_handl_string): Replace with osync_parse_mutex(). |
| 1827 |
(die): Call osync_clear(). |
| 1828 |
* src/w32/compat/posixfcn.c: Remove implementations of fcntl(), |
| 1829 |
record_sync_mutex(), create_mutex(), and same_stream(). |
| 1830 |
|
| 1831 |
2022-08-30 Paul Smith <[email protected]> |
| 1832 |
|
| 1833 |
Add get_tmpfd() and allow anonymous temp files |
| 1834 |
The output sync feature wants a file descriptor not a FILE*. We were |
| 1835 |
using tmpfile() but this returns FILE* which means we needed to dup() |
| 1836 |
the descriptor then fclose() the original, which is just unnecessary |
| 1837 |
overhead for every command we run. |
| 1838 |
|
| 1839 |
Create a get_tmpfd() method that returns a file descriptor directly |
| 1840 |
by using mkstemp() if available, else do the best we can. |
| 1841 |
|
| 1842 |
Also allow anonymous temp files if the filename pointer is NULL. |
| 1843 |
This causes the file to be unlinked. On Windows this requires a |
| 1844 |
special open so add an os_anontmp() method to handle this. |
| 1845 |
|
| 1846 |
* src/makeint.h: Add prototype for get_tmpfd(). |
| 1847 |
* src/misc.c (get_tmpfd): If we have mkstemp() use that, else just |
| 1848 |
open(2). If we don't want to keep the filename, unlink the file. |
| 1849 |
(get_tmpfile): Use get_tmpfd() if we have fdopen(), else use fopen(). |
| 1850 |
* src/output.c (output_tmpfd): Call get_tmpfd() with NULL. |
| 1851 |
* src/os.h (os_anontmp): On Windows make this a function, else fails. |
| 1852 |
* src/w32/compat/posixcfn.c (tmpfile): Move to w32os.c:os_anontmp(). |
| 1853 |
* src/w32/w32os.c (os_anontmp): Create a temp file that will be deleted |
| 1854 |
when the process exits, and return a file descriptor to it. |
| 1855 |
|
| 1856 |
2022-08-29 Paul Smith <[email protected]> |
| 1857 |
|
| 1858 |
test_driver: check for leftover temp files after each test |
| 1859 |
Reset the temp directory for every test to a local directory, then |
| 1860 |
after each test see if any new temp files were created and not |
| 1861 |
deleted: if they were then fail the test. Rather than delete the |
| 1862 |
temp files we leave them there and avoid reporting files that were |
| 1863 |
seen before, so the user can investigate them. |
| 1864 |
|
| 1865 |
Rewrite the temp_stdin tests to rely on this built-in behavior |
| 1866 |
rather than implementing the checks directly. |
| 1867 |
|
| 1868 |
* tests/test_driver.pl: Create a $TEMPDIR variable pointing to a |
| 1869 |
temporary directory outside the test temp directory. |
| 1870 |
(toplevel) Before starting any tests create a temp directory and set |
| 1871 |
the POSIX and Windows temp directory environment variables to use it. |
| 1872 |
(compare_output) Check the contents of the temp directory. If any |
| 1873 |
new files have appeared, fail the test. |
| 1874 |
* tests/scripts/features/temp_stdin: Remove check_tempfile() and |
| 1875 |
all users of it, plus setting of temp environment variables. |
| 1876 |
|
| 1877 |
2022-08-22 Dmitry Goncharov <[email protected]> |
| 1878 |
|
| 1879 |
[SV 62908] Don't free fifo_name twice during error handling |
| 1880 |
* src/posixos.c (jobserver_setup): Set fifo_name to NULL after free. |
| 1881 |
* tests/scripts/features/jobserver: Add tests. |
| 1882 |
|
| 1883 |
2022-08-22 Paul Smith <[email protected]> |
| 1884 |
|
| 1885 |
Fix bootstrap.bat for bootstrapping on Windows |
| 1886 |
* README.git: Clarify that these methods are lightly tested. |
| 1887 |
* build_w32.bat: Don't support any config step: fail if not completed. |
| 1888 |
Move the config steps into bootstrap.bat. Don't print compile lines |
| 1889 |
by default and add a --verbose option to show them. |
| 1890 |
* bootstrap.bat: Ensure we have curl and sed before we do anything. |
| 1891 |
Pull the latest necessary files from gnulib. Create a convert.sed |
| 1892 |
script that can update the various template files, and update |
| 1893 |
Basic.mk, config.h.W32, and gmk-default.h. |
| 1894 |
* tests/run_make_tests.pl: Remove CRLF rather than using chop. If we |
| 1895 |
run perl in Git for Bash it seems to handle newlines differently. |
| 1896 |
* tests/scripts/features/temp_stdin: Remove the make copy and close |
| 1897 |
STDIN so we can delete the temp file on Windows. |
| 1898 |
* .gitignore: Ignore the convert.sed script. |
| 1899 |
|
| 1900 |
2022-08-14 Paul Smith <[email protected]> |
| 1901 |
|
| 1902 |
* doc/make.texi (Variables/Recursion): [SV 56446] Clarify export docs |
| 1903 |
|
| 1904 |
2022-08-07 Paul Smith <[email protected]> |
| 1905 |
|
| 1906 |
* doc/make.texi (Goals): [SV 51306] Improve MAKECMDGOALS example |
| 1907 |
|
| 1908 |
2022-08-07 Dmitry Goncharov <[email protected]> |
| 1909 |
|
| 1910 |
* doc/make.texi (Remaking Makefiles): [SV 61623] Add optimization |
| 1911 |
|
| 1912 |
2022-08-03 Paul Smith <[email protected]> |
| 1913 |
|
| 1914 |
* doc/make.texi (Chained Rules): [SV 61957] Clarify NOTINTERMEDIATE |
| 1915 |
|
| 1916 |
[SV 62496] Fix example of testing MAKEFLAGS |
| 1917 |
* doc/make.texi (Options/Recursion): Define the layout of MAKEFLAGS. |
| 1918 |
(Testing Flags): Fix the example to test the first word. |
| 1919 |
|
| 1920 |
2022-08-02 Paul Smith <[email protected]> |
| 1921 |
|
| 1922 |
Support implementing the jobserver using named pipes |
| 1923 |
Using anonymous pipes for jobserver support has some advantages: |
| 1924 |
for example there is nothing on disk that needs to be cleaned up. |
| 1925 |
However it has many obscure problems, related to the fact that in |
| 1926 |
order for it to work we need to ensure these resources are properly |
| 1927 |
passed through to child processes that want to use the jobserver. |
| 1928 |
At the same time we don't want to pass the pipe to process which |
| 1929 |
DON'T know about the jobserver. |
| 1930 |
|
| 1931 |
Other processes can open file descriptors which we then think are |
| 1932 |
our jobserver, but aren't. And, we open the pipe file descriptors |
| 1933 |
in blocking mode which doesn't work for all users. |
| 1934 |
|
| 1935 |
See issues such as SV 57178, SV 57242, and SV 62397 |
| 1936 |
|
| 1937 |
To avoid these issues, use named pipes (on systems where they are |
| 1938 |
available) instead of anonoymous pipes. This simplifies many things: |
| 1939 |
we never need to pass open file descriptors to our children; they |
| 1940 |
can open the jobserver named pipe. We don't need to worry about |
| 1941 |
recursive vs. non-recursive children. Users don't have to "pass |
| 1942 |
through" the resources if they are invoking sub-makes. Each child |
| 1943 |
can open its own file descriptor and set blocking as needed. |
| 1944 |
|
| 1945 |
The downside is the named pipe exists on disk and so must be cleaned |
| 1946 |
up when the "top-level" make instance exits. |
| 1947 |
|
| 1948 |
In order to allow make to continue to be used in build systems where |
| 1949 |
older versions of GNU make, or other tools that want to use the |
| 1950 |
jobserver, but don't understand named pipes, introduce a new option |
| 1951 |
--jobserver-style that allows the user to choose anonymous pipes. |
| 1952 |
|
| 1953 |
* NEWS: Announce the change and the --jobserver-style option. |
| 1954 |
* doc/make.1: Add --jobserver-style documentation. |
| 1955 |
* doc/make.texi (Special Variables): Add missing items to .FEATURES. |
| 1956 |
(Options Summary): Add --jobserver-style. |
| 1957 |
(POSIX Jobserver): Named pipes, changes to --jobserver-auth, and the |
| 1958 |
--jobserver-style option. |
| 1959 |
(Windows Jobserver): Document --jobserver-style for Windows. |
| 1960 |
* configure.ac: Check for mkfifo. |
| 1961 |
* src/config.h-vms.template: Undefined HAVE_MKFIFO. |
| 1962 |
* src/config.h.W32.template: Ditto. |
| 1963 |
* src/main.c: Add jobserver-style as a new command line option. |
| 1964 |
(main): Add jobserver-fifo to .FEATURES if supported. Pass the style |
| 1965 |
option to jobserver_setup(). |
| 1966 |
* src/os.h (jobserver_setup): Accept a style string option. |
| 1967 |
* src/posixos.c (enum js_type): Enumeration of the jobserver style. |
| 1968 |
(js_type): Which style we are currently using. |
| 1969 |
(fifo_name): The path to the named pipe (if in use). |
| 1970 |
(jobserver_setup): If no style is given, or "fifo" is given, set up a |
| 1971 |
named pipe: get a temporary file and use mkfifo() on it, then open it |
| 1972 |
for reading and writing. If something fails fall back to anonymous |
| 1973 |
pipes. |
| 1974 |
(jobserver_parse_auth): Parse jobserver-auth to determine the style. |
| 1975 |
If we are using a named pipe, open it. If we're using anonymous pipes |
| 1976 |
ensure they're valid as before. |
| 1977 |
(jobserver_get_invalid_auth): Don't invalidate the jobserver when |
| 1978 |
using named pipes. |
| 1979 |
(jobserver_clear): Clean up memory used for named pipes. |
| 1980 |
(jobserver_acquire_all): Unlink the named pipe when done. |
| 1981 |
* src/w32/w32os.c (jobserver_setup): Check the style argument. |
| 1982 |
* tests/scripts/features/jobserver: Use --jobserver-style to test |
| 1983 |
the anonymous pipe behavior, and also test named pipe/semaphore |
| 1984 |
behavior. Check invalid jobserver-style options. |
| 1985 |
* tests/scripts/functions/shell: Use --jobserver-style to test the |
| 1986 |
anonymous pipe behavior, and also test named pipe/semaphore |
| 1987 |
behavior. |
| 1988 |
|
| 1989 |
2022-08-02 Paul Smith <[email protected]> |
| 1990 |
|
| 1991 |
Enhance get_tmpfile() and add get_tmppath() |
| 1992 |
Move all the logic on creating temporary files into misc.c, and add |
| 1993 |
a new function get_tmppath() that returns the pathname to a temporary |
| 1994 |
file without creating or opening it. |
| 1995 |
|
| 1996 |
* src/makeint.h: Add a declaration for get_tmppath(). Remove the |
| 1997 |
template argument from get_tmpfile(): it will compute its own. |
| 1998 |
* src/main.c (main): Remove the logic for computing templates. |
| 1999 |
* src/vmsjobs.c (child_execute_job): Ditto. |
| 2000 |
* src/misc.c (get_tmptemplate): New function to return an allocated |
| 2001 |
template string for use with various mktemp-style functions. |
| 2002 |
(get_tmppath): Return an allocated path to a temporary file, but do |
| 2003 |
not create it. Generally this should be avoided due to TOCTOU issues. |
| 2004 |
(get_tmpfile): Use get_tmptemplate() to generate a template rather |
| 2005 |
than using one passed in. If we don't have mkstemp() then use |
| 2006 |
get_tmppath() to compute the path of a temp file. |
| 2007 |
|
| 2008 |
2022-07-30 Dmitry Goncharov <[email protected]> |
| 2009 |
|
| 2010 |
[SV 62706] Only second-expand targets that might be built |
| 2011 |
Second-expand only the prerequisites of the targets being built. |
| 2012 |
Defer second-expanding the prerequisites of targets until we need |
| 2013 |
to decide if they should be built. |
| 2014 |
|
| 2015 |
* NEWS: Mention the change in behavior. |
| 2016 |
* doc/make.texi (Secondary Expansion): Document the new behavior. |
| 2017 |
* src/filedef.h (struct file): Add flag snapped. |
| 2018 |
(expand_deps): Declare a function to second expand the |
| 2019 |
prerequisites of a target. |
| 2020 |
* src/file.c (rehash_file): Merge flag snapped. |
| 2021 |
(expand_deps): Remove qualifier static. Check flag snapped. |
| 2022 |
(snap_deps): Remove the loop which performed second expansion for all |
| 2023 |
targets. |
| 2024 |
* src/remake.c (update_file_1): Second expand the prerequisites of |
| 2025 |
the considered target. |
| 2026 |
* tests/scripts/features/se_explicit: Add tests. |
| 2027 |
* tests/scripts/features/se_implicit: Ditto. |
| 2028 |
* tests/scripts/features/se_statpat: Ditto. |
| 2029 |
|
| 2030 |
2022-07-30 Paul Smith <[email protected]> |
| 2031 |
|
| 2032 |
Disable the jobserver in non-recursive children |
| 2033 |
Savannah issues such as SV 57242 and SV 62397 show how passing |
| 2034 |
references to closed file descriptors via the --jobserver-auth option |
| 2035 |
in MAKEFLAGS can lead to problematic outcomes. |
| 2036 |
|
| 2037 |
When computing the child environment for a non-recursive shell, add |
| 2038 |
an extra option to MAKEFLAGS to disable the file descriptors for the |
| 2039 |
jobserver. |
| 2040 |
|
| 2041 |
Unfortunately this doesn't modify the value of the make variable |
| 2042 |
MAKEFLAGS, it only modifies the value of the sub-shell environment |
| 2043 |
variable MAKEFLAGS. This can lead to confusion if the user is not |
| 2044 |
considering the distinction. |
| 2045 |
|
| 2046 |
* src/makeint.h: Publish the jobserver-auth value. Add a global |
| 2047 |
definition of the name of the command line option. |
| 2048 |
* src/os.h (jobserver_get_invalid_auth): New function to return a |
| 2049 |
string invalidating the jobserver-auth option. |
| 2050 |
* src/w32/w32os.c (jobserver_get_invaid_auth): Implement it. On |
| 2051 |
Windows we use a semaphore so there's no need to invalidate. |
| 2052 |
* src/posixos.c (jobserver_parse_auth): If we parse the invalid |
| 2053 |
auth string, don't set up the jobserver. |
| 2054 |
(jobserver_get_invalid_auth): Return an invalid option. |
| 2055 |
* src/variable.h (target_environment): Specify if the target |
| 2056 |
environment is for a recursive shell or non-recursive shell. |
| 2057 |
* src/variable.c (target_environment): Move checking for MAKELEVEL |
| 2058 |
into the loop rather than doing it at the end. |
| 2059 |
Along with this, check for MAKEFLAGS and MFLAGS, and update them |
| 2060 |
based on whether we're invoking a recursive or non-recursive child, |
| 2061 |
and also on whether it's necessary to invalidate the jobserver. |
| 2062 |
* src/function.c (func_shell_base): Shell functions can never be |
| 2063 |
recursive to pass 0 to target_environment(). |
| 2064 |
* src/job.c (start_job_command): Specify whether the child is |
| 2065 |
recursive when calling target_environment(). |
| 2066 |
* src/main.c: Export jobserver_auth. sync_mutex doesn't need to |
| 2067 |
be exported. Use the global definition for the option name. |
| 2068 |
* tests/scripts/variables/MAKEFLAGS: Add tests for $MAKEFLAGS. |
| 2069 |
|
| 2070 |
2022-07-30 Paul Smith <[email protected]> |
| 2071 |
|
| 2072 |
Ensure that MAKEFLAGS is set when invoking $(shell ...) |
| 2073 |
* src/main.c (main): Don't reset the jobserver if the number of |
| 2074 |
slots has not changed. |
| 2075 |
(define_makeflags): Add all normal flags even when ALL is not set. |
| 2076 |
* tests/scripts/functions/shell: Test invoking make in $(shell ...). |
| 2077 |
* tests/scripts/variables/MAKEFLAGS: Test the value of MAKEFLAGS in |
| 2078 |
$(shell ...). |
| 2079 |
|
| 2080 |
Take advantage of mempcpy() and stpcpy() |
| 2081 |
* src/makeint.h (stpcpy): Add missing declaration. |
| 2082 |
* src/amiga.c (MyExecute): Avoid extra strlen using stpcpy. |
| 2083 |
* src/function.c (func_shell_base): Ditto. |
| 2084 |
(func_error): Use memcpy() not strcpy() when we know the length. |
| 2085 |
* src/job.c (construct_command_argv_internal): Use stpcpy(). |
| 2086 |
* src/main.c (main): Ditto. |
| 2087 |
(define_makeflags): Ditto. |
| 2088 |
* src/variable.c (print_target_variables): Use memcpy() when we know |
| 2089 |
the length. |
| 2090 |
* src/commands.c (set_file_variables): Use mempcpy(). |
| 2091 |
* src/expand.c (variable_buffer_output): Ditto. |
| 2092 |
* src/file.c (expand_deps): Ditto. |
| 2093 |
* src/function.c (abspath): Ditto. |
| 2094 |
(handle_function): Ditto. |
| 2095 |
* src/implicit.c (pattern_search): Ditto. |
| 2096 |
* src/job.c (construct_command_argv_internal): Use mempcpy() and |
| 2097 |
don't add multiple spaces when there are no shell flags. |
| 2098 |
* src/main.c (decode_env_switches): Use mempcpy() to simplify. |
| 2099 |
(define_makeflags): Ditto. |
| 2100 |
* src/variable.c (selective_vpath_search): Ditto. |
| 2101 |
|
| 2102 |
2022-07-09 Paul Smith <[email protected]> |
| 2103 |
|
| 2104 |
Convert HAVE_GETLOADAVG to HAVE_DECL_GETLOADAVG |
| 2105 |
We want to know if getloadavg() is declared, not if we have it. |
| 2106 |
|
| 2107 |
* configure.ac: Add it as a define (why is this not the default?) |
| 2108 |
* src/job.c: Conditionalize declaration on HAVE_DECL_GETLOADAVG. |
| 2109 |
* config.ami.template: Rename HAVE_GETLOADAVG to HAVE_DECL_GETLOADAVG. |
| 2110 |
* config.h-vms.template: Ditto. |
| 2111 |
* config.h.W32.template: Ditto. |
| 2112 |
Clean up and add new elements from latest config.h. |
| 2113 |
|
| 2114 |
2022-07-09 Paul Smith <[email protected]> |
| 2115 |
|
| 2116 |
Merge in the latest gnulib findprog-in module |
| 2117 |
|
| 2118 |
Merge in the latest gnulib concat-filename module |
| 2119 |
|
| 2120 |
Merge in the latest gnulib getloadavg module |
| 2121 |
|
| 2122 |
Initial merge of the gnulib-port branch |
| 2123 |
|
| 2124 |
2022-07-09 Paul Smith <[email protected]> |
| 2125 |
|
| 2126 |
Move our local m4 macros to gl/m4 |
| 2127 |
The gl subdirectory contains our local versions of gnulib module |
| 2128 |
implementations, so move m4/acinclude.m4 and m4/dospaths.m4 there. |
| 2129 |
|
| 2130 |
* gl/modules/make-macros: Create a new module to handle the macros. |
| 2131 |
* bootstrap.conf: Add the new module. |
| 2132 |
* configure.ac: Macro invocation is moved to make-macros. |
| 2133 |
* m4/.gitignore: Delete unnecessary ignore file: m4 is empty. |
| 2134 |
* .gitignore: Add m4/ as an ignored directory. |
| 2135 |
|
| 2136 |
2022-07-09 Paul Smith <[email protected]> |
| 2137 |
|
| 2138 |
Move our fnmatch/glob implementation into gl/lib |
| 2139 |
The gl subdirectory contains our local versions of gnulib module |
| 2140 |
implementations, so move fnmatch* and glob* from lib to gl/lib. |
| 2141 |
|
| 2142 |
* gl/modules/make-glob: Add a proper Files: section. |
| 2143 |
* lib/.gitignore: Delete unnecessary ignore file: lib is empty. |
| 2144 |
* .gitignore: Add lib/ as an ignored directory. |
| 2145 |
|
| 2146 |
2022-07-09 Paul Smith <[email protected]> |
| 2147 |
|
| 2148 |
* tests/run_make_tests.pl: Exit 1 if we detect an error. |
| 2149 |
|
| 2150 |
* configure.ac: Remove AC_FUNC_SETVBUF_REVERSED. |
| 2151 |
This macro is obsolete: no useful system has this problem anymore. |
| 2152 |
* src/output.c (output_init): Remove reference to SETVBUF_REVERSED. |
| 2153 |
* src/config.ami.template: Remove undef of SETVBUF_REVERSED. |
| 2154 |
* src/config.h-vms.template: Ditto. |
| 2155 |
* src/config.h.W32.template: Ditto. |
| 2156 |
|
| 2157 |
* configure.ac: Check for stpcpy() support. |
| 2158 |
* src/misc.c (stpcpy): Define it if not provided. |
| 2159 |
|
| 2160 |
2022-07-09 Paul Smith <[email protected]> |
| 2161 |
|
| 2162 |
getloadavg: Remove support for privileged invocation |
| 2163 |
This was needed when getloadavg required privileged access; in this |
| 2164 |
case GNU make needed to be installed as a setgid program. But this |
| 2165 |
hasn't been supported by gnulib getloadavg() since 2011 and systems |
| 2166 |
are no longer using it, so remove it. |
| 2167 |
|
| 2168 |
* src/makeint.h (user_access): Remove unnecessary function. |
| 2169 |
(make_access): Ditto. |
| 2170 |
(child_access): Ditto. |
| 2171 |
* src/misc.c: Remove implementations of the *_access() functions. |
| 2172 |
* src/main.c (main): Remove unneeded call to user_access(). |
| 2173 |
* src/job.c (load_too_high): Remove calls to {make,user}_access(). |
| 2174 |
(exec_command): Remove call to child_access(). |
| 2175 |
* src/remote-cstms.c: Remove calls to these methods. I suppose it |
| 2176 |
might be possible this is needed and was piggy-backing on the |
| 2177 |
privileged setting but since that's been broken for a while I doubt |
| 2178 |
this is needed. If so we can bring back the implementation into |
| 2179 |
this source file. |
| 2180 |
* src/config.h.W32.template: Remove GETLOADAVG_PRIVILEGED undef. |
| 2181 |
* src/config.h-vms.template: Ditto. |
| 2182 |
* src/config.ami.template: Ditto. |
| 2183 |
|
| 2184 |
2022-07-09 Paul Smith <[email protected]> |
| 2185 |
|
| 2186 |
* maintMakefile: Allow checkcfg rules to succeed. |
| 2187 |
We can no longer pass our mondo-warnings options to the builds, |
| 2188 |
as these will impact all the code including gnulib code, and this |
| 2189 |
won't work. Also allow the caller to disable either the build.sh |
| 2190 |
or makefile invocation, for testing. |
| 2191 |
* Makefile.am: Allow the caller to reset the path to the make |
| 2192 |
binary to be tested. Remove c90 test: gnulib doesn't support it. |
| 2193 |
|
| 2194 |
* build.sh: Manage libgnu_a-prefixed source files |
| 2195 |
|
| 2196 |
bootstrap: Remove strerror() |
| 2197 |
* bootstrap.conf: Remove strerror module |
| 2198 |
* configure.ac: Add a check for strerror |
| 2199 |
* src/misc.c: Add a default strerror() if not found |
| 2200 |
|
| 2201 |
2022-07-09 Paul Smith <[email protected]> |
| 2202 |
|
| 2203 |
bootstrap: Remove strtoll() |
| 2204 |
This pulls in entirely too much stuff we don't need. Instead grab |
| 2205 |
just the gnulib source file, then include it in src/misc.c. |
| 2206 |
|
| 2207 |
* bootstrap.conf: Add just the lib/strtol.c source file. |
| 2208 |
* configure.ac: Check for strtoll. |
| 2209 |
* src/misc.c: Include strtol.c, with QUAD set, if needed. |
| 2210 |
|
| 2211 |
2022-07-09 Paul Smith <[email protected]> |
| 2212 |
|
| 2213 |
bootstrap: Remove gnulib version of mempcpy() |
| 2214 |
This pulls in a metric ton of stuff that we otherwise don't need, just |
| 2215 |
for a one-liner that we already have a replacement for in src/misc.c. |
| 2216 |
|
| 2217 |
* bootstrap.conf: Remove mempcpy |
| 2218 |
* configure.ac: Add mempcpy to AC_CHECK_FUNCS |
| 2219 |
|
| 2220 |
2022-07-09 Paul Smith <[email protected]> |
| 2221 |
|
| 2222 |
Run autoupdate and clean up autoconf usage |
| 2223 |
We can assume that the return type of a signal handler is void. |
| 2224 |
We can assume that, if sys/time.h exists, it can be included |
| 2225 |
with time.h. |
| 2226 |
|
| 2227 |
* bootstrap: Get the latest version |
| 2228 |
* configure.ac: Require a newer version of autoconf. |
| 2229 |
Remove unnecessary AC_PROG_CC_C99 (already have AC_PROC_CC). |
| 2230 |
Remove unnecessary AC_AIX, AC_ISC_POSIX, AC_MINIX. |
| 2231 |
Remove unnecessary AC_HEADER_STDC, AC_HEADER_TIME, AC_TYPE_SIGNAL. |
| 2232 |
Use strerror to search for the cposix library. |
| 2233 |
* src/commands.c (fatal_error_signal): Assume return type is void. |
| 2234 |
* src/commands.h: Ditto. |
| 2235 |
* src/job.c: Ditto. |
| 2236 |
* src/job.h: Ditto. |
| 2237 |
* src/main.c: Ditto. |
| 2238 |
* src/makeint.h: Ditto. |
| 2239 |
Don't bother with TIME_WITH_SYS_TIME. |
| 2240 |
* src/remote-cstms.c: Check HAVE_SYS_TIME_H. |
| 2241 |
* src/config.ami.template: Remove RETSIGTYPE. |
| 2242 |
* src/config.h-vms.template: Ditto. |
| 2243 |
* src/config.h.W32.template: Ditto. |
| 2244 |
Remove TIME_WITH_SYS_TIME. |
| 2245 |
|
| 2246 |
2022-07-09 Paul Smith <[email protected]> |
| 2247 |
|
| 2248 |
[SV 10593] Export variables to $(shell ...) commands |
| 2249 |
Export all variables, including exported makefile variables, when |
| 2250 |
invoking a shell for the $(shell ...) function. If we detect a |
| 2251 |
recursive variable expansion, silently ignore that variable and do |
| 2252 |
not export it. We do print a debug message. |
| 2253 |
|
| 2254 |
* NEWS: Announce the potential backward-incompatibility. |
| 2255 |
* doc/make.texi (Shell Function): Document the export behavior. |
| 2256 |
* src/main.c (main): Add "shell-export" to .FEATURES. |
| 2257 |
* src/job.h: New function to free struct childbase. |
| 2258 |
* src/job.c (free_childbase): Implement it; call from free_child. |
| 2259 |
* src/function.c (func_shell_base): Use target_environment() to |
| 2260 |
obtain the proper environment for the shell function. |
| 2261 |
Use free_childbase() to free memory. |
| 2262 |
(windows32_openpipe): Don't reset the environment: the caller |
| 2263 |
already provided a proper PATH variable in envp. |
| 2264 |
* src/variable.c (target_environment): If we detect a recursive |
| 2265 |
expansion and we're called from func_shell, ignore the variable. |
| 2266 |
(sync_Path_environment): Simplify and reduce memory allocation. |
| 2267 |
* tests/scripts/functions/shell: Add tests for this. |
| 2268 |
|
| 2269 |
2022-07-09 Dmitry Goncharov <[email protected]> |
| 2270 |
|
| 2271 |
[SV 62650] Show correct warning when combining targets |
| 2272 |
* src/file.c (rehash_file): Fix warning message. |
| 2273 |
(rehash_file): Fix comment to match the behavior. |
| 2274 |
* tests/scripts/features/se_explicit: Fix test. |
| 2275 |
* tests/scripts/features/mult_rules: Add a new test. |
| 2276 |
|
| 2277 |
2022-07-09 Dmitry Goncharov <[email protected]> |
| 2278 |
|
| 2279 |
[SV 62514] Honor command line interface flags |
| 2280 |
Commit f2771aa614 introduced a bug where some switches were left out |
| 2281 |
of MAKEFLAGS. Instead of resetting switches, get the same results by |
| 2282 |
filtering out duplicates. |
| 2283 |
|
| 2284 |
* src/makeint.h: Remove reset_switches. |
| 2285 |
* src/main.c: (reset_switches): Remove reset_switches. |
| 2286 |
* (main): Remove call to reset_switches. |
| 2287 |
* (decode_switches): Filter out duplicate flags. |
| 2288 |
* src/variable.c: (set_special_var): Remove call to reset_switches. |
| 2289 |
* tests/scripts/variables/MAKEFLAGS: Verify that duplicate flags are |
| 2290 |
properly filtered out. |
| 2291 |
|
| 2292 |
2022-07-07 Paul Smith <[email protected]> |
| 2293 |
|
| 2294 |
Add gnulib findprog-in |
| 2295 |
|
| 2296 |
Add gnulib concat-filename |
| 2297 |
|
| 2298 |
Add gnulib getloadavg |
| 2299 |
|
| 2300 |
Initial gnulib-port branch commit |
| 2301 |
|
| 2302 |
2022-06-19 Paul Smith <[email protected]> |
| 2303 |
|
| 2304 |
Don't add GNUMAKEFLAGS to the environment |
| 2305 |
If GNUMAKEFLAGS was not present in the environment when we started, |
| 2306 |
don't add it. |
| 2307 |
|
| 2308 |
* src/main.c (main): Don't mess with GNUMAKEFLAGS unless it exists. |
| 2309 |
* tests/scripts/variables/GNUMAKEFLAGS: Test this behavior. |
| 2310 |
|
| 2311 |
2022-06-18 Paul Smith <[email protected]> |
| 2312 |
|
| 2313 |
* tests/test_driver.pl: Don't freak if diff can't be found |
| 2314 |
|
| 2315 |
* build_w32.bat [WIN]: Use call for all invocations |
| 2316 |
|
| 2317 |
2022-06-17 Paul Smith <[email protected]> |
| 2318 |
|
| 2319 |
Avoid overwriting buffers with long pathnames |
| 2320 |
Reported, with initial patch, by Gisle Vanem <[email protected]> |
| 2321 |
|
| 2322 |
* src/main.c (find_and_set_default_shell) [W32]: Pass search_token |
| 2323 |
directly to w32ify: no need to make a copy first. When we need to |
| 2324 |
construct a path, use snprintf() to be sure we don't overwrite |
| 2325 |
the locally-allocated buffer. |
| 2326 |
* src/w32/pathstuff.c (w32ify) [W32]: Use the malloc version of |
| 2327 |
_fullpath(), followed by strncpy(), to avoid overwriting buffers. |
| 2328 |
|
| 2329 |
2022-06-04 Paul Smith <[email protected]> |
| 2330 |
|
| 2331 |
* tests/scripts/features/temp_stdin: Remove nested "my" |
| 2332 |
* tests/scripts/features/statipattrules: Remove unset variable refs. |
| 2333 |
|
| 2334 |
2022-06-04 Dmitry Goncharov <[email protected]> |
| 2335 |
|
| 2336 |
* tests/scripts/features/archives: Fix typo |
| 2337 |
|
| 2338 |
2022-06-04 Sergei Trofimovich <[email protected]> |
| 2339 |
|
| 2340 |
[SV 62100] Add '--shuffle' option support |
| 2341 |
Introduce non-deterministic ordering into goal and prerequisite |
| 2342 |
traversal to help tease out inconsistent failures that may happen |
| 2343 |
when running in parallel build mode. |
| 2344 |
|
| 2345 |
Introduce second order into each dependency chain: |
| 2346 |
1. Existing order is syntactic order reachable via 'dep->next' |
| 2347 |
2. New order is shuffled order stored as 'dep->shuf' in each 'dep' |
| 2348 |
|
| 2349 |
When updating goals and prerequisites and '--shuffle' is provided, |
| 2350 |
use the shuffled order to walk the graph. When automatic variable |
| 2351 |
are set always use the syntactic order of parameters. |
| 2352 |
|
| 2353 |
* Makefile.am: Add new src/shuffle.c and src/shuffle.h file. |
| 2354 |
* build_w32.bat: Ditto. |
| 2355 |
* builddos.bat: Ditto. |
| 2356 |
* makefile.com: Ditto. |
| 2357 |
* po/POTFILES.in: Ditto. |
| 2358 |
* doc/make.texi: Add documentation for --shuffle. |
| 2359 |
* doc/make.1: Ditto. |
| 2360 |
* src/dep.h (DEP): Add the shuf pointer. |
| 2361 |
* src/filedef.h (struct file): Add was_shuffled flag. |
| 2362 |
* src/main.c: (shuffle_mode): Global flag for the shuffle mode. |
| 2363 |
(usage): Add the --shuffle option. |
| 2364 |
(switches): Ditto. |
| 2365 |
(main): Set shuffle_mode based on the command line parameter. |
| 2366 |
Reshuffle prerequisites if requested. |
| 2367 |
* src/remake.c (update_goal_chain): Walk the shuffled list if enabled. |
| 2368 |
(update_file_1): Ditto. |
| 2369 |
* src/shuffle.h: Provide an interface for shuffling prerequisites. |
| 2370 |
* src/shuffle.c: Implement option parsing and prerequisite shuffling. |
| 2371 |
* tests/scripts/options/shuffle: Test shuffle option and modes. |
| 2372 |
|
| 2373 |
2022-06-04 Paul Smith <[email protected]> |
| 2374 |
|
| 2375 |
* src/misc.c (make_toui): Parse a string into an unsigned int |
| 2376 |
* src/makeint.h: Declare it. |
| 2377 |
* src/arscan.c (ar_scan): Replace atoi() calls with make_toui(). |
| 2378 |
Modify some integral types to be more correct. |
| 2379 |
* src/job.c (load_too_high): Replace atoi() calls with make_toui(). |
| 2380 |
* src/main.c (main): Ditto. |
| 2381 |
(decode_switches): Ditto. |
| 2382 |
|
| 2383 |
* src/misc.c (make_pid): A function to return the PID |
| 2384 |
* src/makeint.h: Declare it. |
| 2385 |
* src/commands.c (fatal_error_signal): Call it. |
| 2386 |
|
| 2387 |
* po/LINGUAS: Add a translation for Romanian |
| 2388 |
|
| 2389 |
2022-04-24 Noah Goldstein <[email protected]> |
| 2390 |
|
| 2391 |
Replace strcmp() with memcmp() where possible |
| 2392 |
memcmp() is always faster than strcmp(). In places where we already |
| 2393 |
know that both buffers have sufficient size, replace strcmp() with |
| 2394 |
memcmp(). |
| 2395 |
|
| 2396 |
* src/main.c (main): Replace strncmp() with memcmp()==0. |
| 2397 |
* src/read.c (word1eq): Ditto. |
| 2398 |
* src/commands.c (set_file_variables): Ditto. |
| 2399 |
* src/function.c (func_filter_filterout): Ditto. |
| 2400 |
(a_word_hash_cmp): Use STRING_N_COMPARE since we know the length. |
| 2401 |
(func_sort): Replace strcmp() with memcmp(). |
| 2402 |
|
| 2403 |
2022-04-24 Noah Goldstein <[email protected]> |
| 2404 |
|
| 2405 |
hash: Remove unnecessary isupper() check before tolower() |
| 2406 |
The standard requires that tolower() returns its argument if there's |
| 2407 |
no valid lowercase conversion: it's not necessary to check isupper() |
| 2408 |
before invoking tolower(). |
| 2409 |
|
| 2410 |
Comparing the performance of the old ISTRING_HASH to the new one |
| 2411 |
on all the files present in GLIBC. |
| 2412 |
|
| 2413 |
Data Type Old Time New Time |
| 2414 |
Alternating case 24985.754 13883.422 |
| 2415 |
random case 35211.777 13569.051 |
| 2416 |
all lower 18818.974 13706.645 |
| 2417 |
all upper 38859.454 13506.315 |
| 2418 |
|
| 2419 |
* src/hash.h (ISTRING_HASH_1): Omit isupper() check. |
| 2420 |
(ISTRING_HASH_2): Ditto. |
| 2421 |
|
| 2422 |
2022-04-24 Dmitry Goncharov <[email protected]> |
| 2423 |
|
| 2424 |
[SV 62206] Fix %-substitution in second expansion of pattern rules |
| 2425 |
During second expansion of pattern rules only the first pattern in |
| 2426 |
each "group" was being substituted. E.g. in this makefile: |
| 2427 |
|
| 2428 |
.SECONDEXPANSION: |
| 2429 |
all: hello.x |
| 2430 |
%.x: $$(wordlist 1, 99, %.1 %.%.2) ; $(info $@ from $^) |
| 2431 |
hello.1 hello.\%.2 \%.1 \%.\%.2: ; |
| 2432 |
|
| 2433 |
the output would build "hello.1" and "%.%.2" because each function |
| 2434 |
is considered a single "word" and only the first pattern is replaced. |
| 2435 |
|
| 2436 |
Fix the expansion so each whitespace-separated string is considered a |
| 2437 |
word and the first pattern is replaced, giving "hello.1" and |
| 2438 |
"hello.%.2". |
| 2439 |
|
| 2440 |
* src/rule.c (snap_implicit_rules): Keep enough space to replace % |
| 2441 |
with $(*F) if necessary. |
| 2442 |
* src/implicit.c (pattern_search): During second expansion break each |
| 2443 |
get_next_word result into individual words and replace the first % in |
| 2444 |
each with $* or $(*F) as needed. |
| 2445 |
* tests/scripts/features/patternrules: Add tests for variations. |
| 2446 |
|
| 2447 |
2022-04-24 Dmitry Goncharov <[email protected]> |
| 2448 |
|
| 2449 |
[SV 62175] Rework secondary expansion tests |
| 2450 |
The hash function we use can yield different results on big- and |
| 2451 |
little-endian systems which makes test output different. Choose |
| 2452 |
names to avoid this. |
| 2453 |
|
| 2454 |
* tests/scripts/features/patternrules: Choose portable target names. |
| 2455 |
* tests/scripts/features/se_explicit: Ditto. |
| 2456 |
* tests/scripts/features/se_implicit: Ditto. |
| 2457 |
|
| 2458 |
2022-04-24 Paul Smith <[email protected]> |
| 2459 |
|
| 2460 |
* Makefile.am (check-regression): Rename jhelp to thelp |
| 2461 |
|
| 2462 |
* tests/scripts/options/dash-f: [SV 62118] Close STDIN |
| 2463 |
On Windows we can't delete open files, so close STDIN before |
| 2464 |
removing the temporary input file. |
| 2465 |
|
| 2466 |
* tests/scripts/features/reinvoke: [SV 62088] Close STDIN |
| 2467 |
On Windows we can't delete open files, so close STDIN before |
| 2468 |
removing the temporary input file. |
| 2469 |
|
| 2470 |
* tests/test_driver.pl (run_all_tests): Keep one copy of STDIN |
| 2471 |
|
| 2472 |
* Makefile.am: Add INSTALL to the EXTRA_DIST files |
| 2473 |
|
| 2474 |
2022-04-24 Dmitry Goncharov <[email protected]> |
| 2475 |
|
| 2476 |
[SV 62356] If -R is set in the makefile, disable -r |
| 2477 |
If -R is given on the command line it implies -r as well; make this |
| 2478 |
same assumption if -R is provided in MAKEFLAGS set in the makefile. |
| 2479 |
|
| 2480 |
* src/main.c (main): Check no_builtin_variables_flag after reading |
| 2481 |
makefiles. |
| 2482 |
* tests/scripts/options/dash-r: Add a test. |
| 2483 |
|
| 2484 |
2022-04-24 Dmitry Goncharov <[email protected]> |
| 2485 |
|
| 2486 |
[SV 62324] Simplify set_file_variables by passing in the stem |
| 2487 |
Previously we always used the file->stem value as our stem in |
| 2488 |
set_file_variables(); when that wasn't correct we had to temporarily |
| 2489 |
set that value while the function was called, then reset it afterward. |
| 2490 |
This led to issues (for example when we assumed the stem was a cached |
| 2491 |
string but it wasn't). |
| 2492 |
|
| 2493 |
Avoid this by passing in the stem as an argument so that different |
| 2494 |
values can be provided. |
| 2495 |
|
| 2496 |
Add tests to verify this. |
| 2497 |
|
| 2498 |
* src/commands.c (set_file_variables): Take second parameter stem to |
| 2499 |
relieve the callers of set_file_variables() from setting/restoring |
| 2500 |
file->stem. |
| 2501 |
* src/commands.h (set_file_variables): Ditto. |
| 2502 |
(execute_file_commands): Pass file->stem to set_file_variables(). |
| 2503 |
* src/file.c (expand_deps): Pass d->stem to set_file_variables() and |
| 2504 |
remove set and restore of file->stem. |
| 2505 |
* src/implicit.c (pattern_search): Pass stem to set_file_variables() |
| 2506 |
and remove set and restore of file->stem. |
| 2507 |
* tests/scripts/features/se_explicit: Add new tests. |
| 2508 |
* tests/scripts/features/se_implicit: Ditto. |
| 2509 |
* tests/scripts/features/se_statpat: Ditto. |
| 2510 |
* tests/scripts/variables/automatic: Ditto. |
| 2511 |
|
| 2512 |
2022-04-24 Dmitry Goncharov <[email protected]> |
| 2513 |
|
| 2514 |
[SV 62278] Only expand the first pattern during secondary expansion |
| 2515 |
During normal pattern rule expansion only the first pattern (%) is |
| 2516 |
expanded; however during secondary expansion all patterns were |
| 2517 |
expanded. Modify secondary expansion to match the behavior of normal |
| 2518 |
expansion. |
| 2519 |
|
| 2520 |
Implementation tweaked by Paul Smith <[email protected]> |
| 2521 |
|
| 2522 |
* src/file.c (expand_deps): Don't use subst_expand() which replaces |
| 2523 |
all % with $*: instead replace only the first one, by hand. |
| 2524 |
Fix a memory leak where the dep structure was not always freed. |
| 2525 |
* tests/scripts/features/statipattrules: Use .RECIPEPREFIX not TAB. |
| 2526 |
Add a series of tests verifying that static pattern rules with and |
| 2527 |
without secondary expansion both return the same results. |
| 2528 |
|
| 2529 |
2022-04-24 Paul Smith <[email protected]> |
| 2530 |
|
| 2531 |
* src/commands.h: [SV 62213] Forward-declare struct file / child |
| 2532 |
|
| 2533 |
* tests/test_driver.pl (toplevel): [SV 62174] Enforce the C locale |
| 2534 |
|
| 2535 |
2022-04-24 Paul Smith <[email protected]> |
| 2536 |
|
| 2537 |
[SV 62173] Fix archive tests for non-GNU systems |
| 2538 |
Original patch from Dmitry Goncharov <[email protected]> |
| 2539 |
|
| 2540 |
Fix the ar flags to match the default values in make. If the |
| 2541 |
U option is supported, add it to the end not the beginning, |
| 2542 |
since ARFLAGS now starts with a "-". |
| 2543 |
|
| 2544 |
* tests/test_driver.pl: Add defaults for global variables. |
| 2545 |
(get_osname): Preserve $osname if it's set from $^O |
| 2546 |
* tests/scripts/features/archive: Set the default arflags. |
| 2547 |
If "U" is available add it to the end of the flags. |
| 2548 |
|
| 2549 |
2022-04-24 Dmitry Goncharov <[email protected]> |
| 2550 |
|
| 2551 |
* tests/scripts/options/dash-l: [SV 62172] Skip if not available |
| 2552 |
|
| 2553 |
* src/read.c (check_specials): [SV 62171] Reset ARFLAGS under .POSIX |
| 2554 |
|
| 2555 |
2022-04-24 Dmitry Goncharov <[email protected]> |
| 2556 |
|
| 2557 |
[SV 62145] Remove a stdin temp file on re-exec failure. |
| 2558 |
If the re-exec fails, be sure to remove a temp makefile that was |
| 2559 |
created to read from stdin. |
| 2560 |
|
| 2561 |
* src/job.c (exec_command): Return on failure. |
| 2562 |
(child_execute_job): Call exit if exec_command returns. |
| 2563 |
* src/job.h (exec_command): Don't mark as NORETURN. |
| 2564 |
* src/main.c (main): Unlink stdin temporary file if re-exec fails. |
| 2565 |
* tests/run_make_tests.pl: Get value for ERR_nonexe_file/ERR_exe_dir. |
| 2566 |
* tests/scripts/features/temp_stdin: Test that temp file unlink works. |
| 2567 |
|
| 2568 |
2022-04-18 Paul Smith <[email protected]> |
| 2569 |
|
| 2570 |
* tests/scripts/features/errors: Fix Perl warnings |
| 2571 |
* tests/scripts/options/dash-f: Ditto. |
| 2572 |
|
| 2573 |
2022-02-27 Paul Smith <[email protected]> |
| 2574 |
|
| 2575 |
[SV 62118] Correctly handle -f- options on re-exec |
| 2576 |
The -f, -file, and --makefile options were not properly handled when |
| 2577 |
re-exec'ing due to makefile updates. This problem, plus a patch and |
| 2578 |
tests, was reported by Dmitry Goncharov <[email protected]>. |
| 2579 |
|
| 2580 |
While examining this I found another bug: after re-exec we forgot the |
| 2581 |
batch file was temporary and never deleted it. |
| 2582 |
|
| 2583 |
I decided to fix all these problems at once using a different fix |
| 2584 |
than Dmitry's: I created a new internal-only command-line option, |
| 2585 |
--temp-stdin. When reconstructing the make options for a re-exec, |
| 2586 |
replace the -f/--file/--makefile option that reads from stdin with |
| 2587 |
--temp-stdin=<filename> so that the re-exec'd version of make knows |
| 2588 |
it's a temporary batch file and will delete it. |
| 2589 |
|
| 2590 |
We no longer need to add the -o options because the re-exec'd make |
| 2591 |
knows this is a temporary makefile and treats it as such. |
| 2592 |
|
| 2593 |
To simplify, replace the --file and --makefile options taking a |
| 2594 |
filename, with just -f<filename> on re-exec. |
| 2595 |
|
| 2596 |
Some examples of the rewrite: |
| 2597 |
|
| 2598 |
User command line Re-exec command line |
| 2599 |
----------------- -------------------- |
| 2600 |
-f- --temp-stdin=<batch> |
| 2601 |
--file - --temp-stdin=<batch> |
| 2602 |
-f - --makefile a.mk --temp-stdin=<batch> -fa.mk |
| 2603 |
--file=a.mk -fa.mk |
| 2604 |
-fa.mk -fa.mk |
| 2605 |
-Rf a.mk -Rf a.mk |
| 2606 |
-Rf- -R --temp-stdin=<batch> |
| 2607 |
|
| 2608 |
* src/main.c (stdin_offset): Remember the offset into the makefiles |
| 2609 |
list of the batch file read from stdin. Remove stdin_nm. |
| 2610 |
(struct command_switch): Create a new --temp-stdin option, which |
| 2611 |
also updates the makefiles list. |
| 2612 |
(main): Add the temporary filename to the string cache. |
| 2613 |
Move the tempfile handling after checking makefile arguments for "-" |
| 2614 |
so that files provided via --temp-stdin are also handled specially. |
| 2615 |
When rewriting re-exec options, we may need one more than we had |
| 2616 |
originally so create a new argv list. Walk through the original |
| 2617 |
list and convert it to the new list, following the above process. |
| 2618 |
(decode_switches): Set the stdin_offset flag if we see --temp-stdin. |
| 2619 |
* tests/scripts/options/dash-f: Add many more tests, provided by |
| 2620 |
Dmitry Goncharov <[email protected]>. |
| 2621 |
|
| 2622 |
2022-02-27 Paul Smith <[email protected]> |
| 2623 |
|
| 2624 |
* tests/scripts/variables/MAKE_RESTARTS: Remove TAB chars |
| 2625 |
|
| 2626 |
* README.git: Fix compiler options for ASAN |
| 2627 |
|
| 2628 |
2022-02-27 Paul Smith <[email protected]> |
| 2629 |
|
| 2630 |
Remove extraneous characters from fatal() calls |
| 2631 |
The fatal() method adds ". Stop.\n" to every message. |
| 2632 |
|
| 2633 |
* src/amiga.c (MyExecute): Remove newline from fatal() message. |
| 2634 |
* src/job.c (<various>): Ditto. |
| 2635 |
* src/file.c (snap_deps): Remove "." from fatal() message. |
| 2636 |
* src/main.c (main): Ditto. |
| 2637 |
* src/load.c: Ditto. |
| 2638 |
* tests/scripts/targets/NOTINTERMEDIATE: Fix expected output. |
| 2639 |
|
| 2640 |
2022-02-27 Paul Smith <[email protected]> |
| 2641 |
|
| 2642 |
* src/main.c: Ensure the stdin temp file is deleted when dying. |
| 2643 |
|
| 2644 |
2022-02-27 Dmitry Goncharov <[email protected]> |
| 2645 |
|
| 2646 |
[SV 62088] Avoid re-exec due to stdin. |
| 2647 |
The fix for SV 60595 causes make to re-execute when the makefile is |
| 2648 |
read from stdin. E.g. |
| 2649 |
$ printf 'all:; $(info hello)' | make -sf - |
| 2650 |
|
| 2651 |
Reported by Sergei Trofimovich <[email protected]> |
| 2652 |
Test added by Paul Smith <[email protected]> |
| 2653 |
|
| 2654 |
* src/main.c (main): Set the mtime of the stdin temporary file. |
| 2655 |
* tests/scripts/features/reinvoke: Add a test. |
| 2656 |
|
| 2657 |
2022-02-27 Paul Smith <[email protected]> |
| 2658 |
|
| 2659 |
tests: Allow run_make_test() to avoid passing -f |
| 2660 |
We already use undef makefile strings to mean "re-use the previous |
| 2661 |
makefile", so if the string is empty we'll assume it means "don't |
| 2662 |
use a makefile at all" (don't add -f). |
| 2663 |
|
| 2664 |
* tests/run_make_tests.pl (run_make_test): If the makefile string |
| 2665 |
is empty, don't create a makefile or add -f. |
| 2666 |
* tests/scripts/features/include: Change empty makefile to "\n". |
| 2667 |
* tests/scripts/misc/close_stdout: Ditto. |
| 2668 |
* tests/scripts/options/dash-r: Ditto. |
| 2669 |
|
| 2670 |
2022-02-27 Paul Smith <[email protected]> |
| 2671 |
|
| 2672 |
tests: Preserve Windows temp environment variables |
| 2673 |
* src/main.c (main): Show the temp filename on error. Also on |
| 2674 |
Windows prefer TMP, then TEMP, and only lastly TMPDIR. |
| 2675 |
* tests/test_driver.pl: Add TMP, TEMP, and USERPROFILE to the list |
| 2676 |
of environment variables to preserve. |
| 2677 |
|
| 2678 |
2022-02-26 Paul Smith <[email protected]> |
| 2679 |
|
| 2680 |
* tests/test_driver.pl: Support STDIN redirection. |
| 2681 |
Before running tests, duplicate STDIN then reset it after the test |
| 2682 |
completes. Also when -keep is provided, preserve the base and run |
| 2683 |
files. |
| 2684 |
|
| 2685 |
2022-02-21 Paul Smith <[email protected]> |
| 2686 |
|
| 2687 |
Ensure buffers are large enough for integer values |
| 2688 |
Issue raised by Sergei Trofimovich <[email protected]> |
| 2689 |
|
| 2690 |
* src/makeint.h (INTSTR_LENGTH): Update for unsigned values. |
| 2691 |
* src/function.c (func_lastword): Use INTSTR_LENGTH as buffer size. |
| 2692 |
(shell_function_completed): Ditto. |
| 2693 |
(func_call): Ditto. |
| 2694 |
* src/remote-cstms.c (start_remote_job): Ditto. |
| 2695 |
|
| 2696 |
2022-02-10 Paul Smith <[email protected]> |
| 2697 |
|
| 2698 |
* <all>: Update copyright notices. |
| 2699 |
|
| 2700 |
2022-02-06 Paul Smith <[email protected]> |
| 2701 |
|
| 2702 |
* doc/make.1: Use "target" from the SYNOPSIS. |
| 2703 |
Reported by Helge Kreutzmann <[email protected]> |
| 2704 |
|
| 2705 |
2022-02-06 Paul Smith <[email protected]> |
| 2706 |
|
| 2707 |
Don't write $(shell ...) stdout to stderr on failure |
| 2708 |
If a $(shell ...) invocation failed due to a command-not-found error, |
| 2709 |
make wrote the stdout of that shell to our stderr for some reason. |
| 2710 |
That seems very wrong. |
| 2711 |
|
| 2712 |
If the command's stderr was not redirected then its output would have |
| 2713 |
already been written to its stderr, and if it was redirected then we |
| 2714 |
shouldn't take it upon ourselves to force it to go to stderr! |
| 2715 |
|
| 2716 |
* src/function.c (func_shell_base): Append shell stdout even if the |
| 2717 |
shell command failed. |
| 2718 |
* tests/run_make_tests.pl: Determine the error generated for |
| 2719 |
command-not-found situations. |
| 2720 |
* tests/scripts/functions/shell: Verify that redirecting stderr to |
| 2721 |
stdout will behave properly if the command is not found. |
| 2722 |
|
| 2723 |
2022-02-06 Paul Smith <[email protected]> |
| 2724 |
|
| 2725 |
* Basic.mk.template: Allow arguments to the check target. |
| 2726 |
|
| 2727 |
2022-02-06 Dmitry Goncharov <[email protected]> |
| 2728 |
|
| 2729 |
[SV 61805] Support quoted whitespace in .SHELLFLAGS with .ONESHELL |
| 2730 |
* src/job.c (construct_command_argv_internal): Call recursively to |
| 2731 |
parse .SHELLFLAGS when .ONESHELL is active. |
| 2732 |
* tests/scripts/targets/ONESHELL: Add tests. |
| 2733 |
|
| 2734 |
2022-02-06 Paul Smith <[email protected]> |
| 2735 |
|
| 2736 |
* tests/scripts/features/double_colon: Update for modern tests. |
| 2737 |
|
| 2738 |
* tests/scripts/features/implicit_search: Add -r for safety. |
| 2739 |
|
| 2740 |
2022-02-06 Dmitry Goncharov <[email protected]> |
| 2741 |
|
| 2742 |
[SV 48643] Add more tests of intermediates and unrelated targets |
| 2743 |
If a prereq of a pattern is explicitly mentioned as a prereq of an |
| 2744 |
unrelated rule, it should not be considered an intermediate file. |
| 2745 |
|
| 2746 |
* tests/scripts/features/double_colon: Add tests mentioning unrelated |
| 2747 |
explicit targets. |
| 2748 |
* tests/scripts/features/grouped_targets: Ditto. |
| 2749 |
* tests/scripts/features/implicit_search: Ditto. |
| 2750 |
* tests/scripts/features/patternrules: Ditto. |
| 2751 |
* tests/scripts/features/se_implicit: Ditto. |
| 2752 |
* tests/scripts/features/statipattrules: Ditto. |
| 2753 |
|
| 2754 |
2022-02-06 Dmitry Goncharov <[email protected]> |
| 2755 |
|
| 2756 |
[SV 48643] Make prereqs mentioned in unrelated rules explicit |
| 2757 |
* src/implicit.c (pattern_search): Set is_explicit when a prereq |
| 2758 |
is mentioned in an unrelated rule. |
| 2759 |
|
| 2760 |
* src/implicit.c (pattern_search): [SV 61864] Fix debug output. |
| 2761 |
|
| 2762 |
2022-02-06 Paul Smith <[email protected]> |
| 2763 |
|
| 2764 |
Avoid interleaved $(info ) output |
| 2765 |
Since $(info ) function output is written using two system calls for |
| 2766 |
the message and the newline, it's possible for output from another |
| 2767 |
parallel make job to sneak in between them. |
| 2768 |
|
| 2769 |
Reported by Paul Eggert <[email protected]>, who saw the report from |
| 2770 |
Lars Ingebrigtsen <https://bugs.gnu.org/53358>. |
| 2771 |
|
| 2772 |
* src/function.c (func_error): Paul provided a fix but instead I |
| 2773 |
rewrote the entire function: it's not possible for it to be invoked |
| 2774 |
with anything other than exactly one argument so don't worry about |
| 2775 |
re-combining the arguments. |
| 2776 |
|
| 2777 |
2022-02-06 Paul Smith <[email protected]> |
| 2778 |
|
| 2779 |
* tests/scripts/features/implicit_search: [SV 48643] Cleanups. |
| 2780 |
|
| 2781 |
* src/implicit.c (pattern_search): Use const ptrs when possible. |
| 2782 |
Change suggested by Joe Filion <[email protected]> |
| 2783 |
|
| 2784 |
* src/job.c (load_too_high): Re-enable Linux /proc/loadavg checks. |
| 2785 |
Further experimentation shows that my previous thinking that there |
| 2786 |
was a problem using this was woefully mistaken. The value generated |
| 2787 |
by the kernel shows runn*ABLE* processes not runn*ING* processes. |
| 2788 |
* NEWS: Announce the change. |
| 2789 |
|
| 2790 |
* doc/make.texi (Using One Shell): Correct example to use $<. |
| 2791 |
|
| 2792 |
2022-01-17 Jouke Witteveen <[email protected]> |
| 2793 |
|
| 2794 |
* src/function.c (parse_textint): Handle ints without 0 properly. |
| 2795 |
* tests/scripts/functions/intcmp: Add tests for values without 0. |
| 2796 |
|
| 2797 |
2022-01-17 Paul Smith <[email protected]> |
| 2798 |
|
| 2799 |
[SV 61226] Revert changes to detect missing included files |
| 2800 |
The fix for SV 60595 introduced a backward-incompatibility: rules that |
| 2801 |
purported to rebuild included files, but didn't actually do so, were |
| 2802 |
treated as errors whereas before they were ignored. This breaks a |
| 2803 |
common idiom in makefiles where an empty recipe is created for an |
| 2804 |
included makefile so make doesn't complain if it doesn't exist. |
| 2805 |
|
| 2806 |
Unfortunately this means make cannot diagnose some types of errors. |
| 2807 |
|
| 2808 |
Extra tests supplied by Dmitry Goncharov <[email protected]>. |
| 2809 |
|
| 2810 |
* doc/make.texi (Including Other Makefiles): Clarify this behavior. |
| 2811 |
* src/main.c (main): Don't run the new check-for-errors behavior. |
| 2812 |
* tests/scripts/features/reinvoke: Reset tests of the "old" behavior |
| 2813 |
and add new tests for this situation. |
| 2814 |
|
| 2815 |
2022-01-17 Paul Smith <[email protected]> |
| 2816 |
|
| 2817 |
Ensure that loaded functions increment the command count |
| 2818 |
Since we don't know what a loaded function (via Guile or load) may |
| 2819 |
do, increment the command count just in case. |
| 2820 |
|
| 2821 |
* src/function.c (struct file_table_entry): New adds_command bool. |
| 2822 |
(FT_ENTRY): Initialize it to 0 for built-in functions. |
| 2823 |
(expand_builtin_function): If adds_command, increment the count. |
| 2824 |
(define_new_function): Set adds_command for loaded functions. |
| 2825 |
|
| 2826 |
2022-01-17 Paul Smith <[email protected]> |
| 2827 |
|
| 2828 |
* src/read.c (tilde_expand): Put back '/' before returning. |
| 2829 |
Joe Filion <[email protected]> noted that the string is modified, |
| 2830 |
and Henrik Carlqvist <[email protected]> noticed that it wasn't put |
| 2831 |
back in all cases. |
| 2832 |
|
| 2833 |
2021-12-29 Paul Smith <[email protected]> |
| 2834 |
|
| 2835 |
* tests/scripts/targets/INTERMEDIATE: Rewrite for new test method |
| 2836 |
|
| 2837 |
2021-12-29 Paul Smith <[email protected]> |
| 2838 |
|
| 2839 |
Do not force targets to be SECONDARY |
| 2840 |
In SV 43677 we forced targets to be secondary if we found an |
| 2841 |
intermediate file that was listed as a prerequisite of another |
| 2842 |
target. This overrides .INTERMEDIATE settings, so doesn't work. |
| 2843 |
Now that we have an is_explicit flag in targets, use that instead. |
| 2844 |
|
| 2845 |
* src/implicit.c (pattern_search): Remove setting of secondary. |
| 2846 |
Preserve the value of the is_explicit flag when creating a new |
| 2847 |
file target, and consider it when setting the intermediate flag. |
| 2848 |
* tests/scripts/features/patternrules: Add a test w/out INTERMEDIATE |
| 2849 |
* tests/scripts/targets/INTERMEDIATE: Add a test with INTERMEDIATE |
| 2850 |
|
| 2851 |
2021-12-29 Dmitry Goncharov <[email protected]> |
| 2852 |
|
| 2853 |
[SV 48643] Preserve target-specific variables on intermediate files |
| 2854 |
Target-specific variables used to define the target as "ought to |
| 2855 |
exist" so they could never be intermediate. Now they can be, so |
| 2856 |
merge the target-specific variables from the intermediate target |
| 2857 |
so they're not lost. |
| 2858 |
|
| 2859 |
* src/implicit.c (pattern_search): Use merge_variable_set_lists |
| 2860 |
to merge target-specific variables. |
| 2861 |
* tests/scripts/features/implicit_search: Add tests of target- |
| 2862 |
specific variable assignments and implicit rules. |
| 2863 |
|
| 2864 |
2021-12-29 Paul Smith <[email protected]> |
| 2865 |
|
| 2866 |
* README.template: Clean up patch submission information |
| 2867 |
|
| 2868 |
2021-12-19 Jouke Witteveen <[email protected]> |
| 2869 |
|
| 2870 |
* src/read.c (find_percent_cached): [SV 60798] Silence GCC11 warnings |
| 2871 |
|
| 2872 |
[SV 60798] Silence bogus GCC10 and GCC11 warnings |
| 2873 |
* src/main.c (main): Use a separate variable to track final character. |
| 2874 |
* src/read.c (eval): Track the semicolon position not one beyond it. |
| 2875 |
* src/variable.c (do_variable_definition): Include a default switch |
| 2876 |
case to ease the work of the exhaustiveness prover. |
| 2877 |
|
| 2878 |
2021-12-19 Paul Smith <[email protected]> |
| 2879 |
|
| 2880 |
Update documentation with instructions for patch submission |
| 2881 |
* README.template: Add notes on how to submit patches. |
| 2882 |
* README.git: Point to the README. |
| 2883 |
* doc/make.texi: Ditto. |
| 2884 |
|
| 2885 |
2021-12-19 Paul Smith <[email protected]> |
| 2886 |
|
| 2887 |
Change HTTP URLs to use HTTPS instead |
| 2888 |
Also remove unnecessary tests/COPYING file. |
| 2889 |
|
| 2890 |
* README.template: Change http: to https: |
| 2891 |
* README.git: Ditto |
| 2892 |
* doc/make.texi: Ditto |
| 2893 |
* doc/make.1: Ditto |
| 2894 |
* src/main.c: Ditto |
| 2895 |
* maintMakefile: Remove invalid URL |
| 2896 |
|
| 2897 |
2021-12-19 Paul Smith <[email protected]> |
| 2898 |
|
| 2899 |
* src/makeint.h: Compute INTSTR_LENGTH based on size of intmax_t |
| 2900 |
Math suggested by Edward Welbourne <[email protected]> |
| 2901 |
|
| 2902 |
2021-12-19 Paul Eggert <[email protected]> |
| 2903 |
|
| 2904 |
Remove arbitrary limits on intcmp integers |
| 2905 |
We don't need to parse strings into C integer values to compare them. |
| 2906 |
|
| 2907 |
* src/function.c (parse_textint): Find boundaries of a numeric string. |
| 2908 |
(func_intcmp): Use parse_textint() to compare integers textually. |
| 2909 |
* tests/scripts/functions/intcmp: Test with extra-large numbers. |
| 2910 |
|
| 2911 |
2021-12-19 Paul Smith <[email protected]> |
| 2912 |
|
| 2913 |
Use a well-known error string for out-of-bound function arguments |
| 2914 |
* src/function.c (parse_numeric): Check for empty value and error. |
| 2915 |
If we find ERANGE just print our own error, not strerror. |
| 2916 |
(func_word): Use a generic "not good" error message. |
| 2917 |
(func_wordlist): Ditto |
| 2918 |
(func_intcmp): Ditto |
| 2919 |
* tests/run_make_tests.pl: Remove code to find strerror(ERANGE) |
| 2920 |
* tests/scrips/functions/intcmp: Update the error message. |
| 2921 |
* tests/scrips/functions/word: Ditto. |
| 2922 |
|
| 2923 |
* doc/make.text (Wildcards): Document that glob results are sorted. |
| 2924 |
|
| 2925 |
2021-12-19 Paul Smith <[email protected]> |
| 2926 |
|
| 2927 |
[SV 61621] Don't use POSIX_SPAWN_RESETIDS with posix_spawn() |
| 2928 |
When make is invoked in a environment where the user namespace is |
| 2929 |
restricted, such as under unshare(1) (on GNU/Linux), it won't be able |
| 2930 |
to find its real UID so the effective UID can't be set to it and |
| 2931 |
posix_spawn() will fail with EINVAL. |
| 2932 |
|
| 2933 |
It's not less safe to run recipe jobs using the same UID values that |
| 2934 |
make was invoked with, so don't worry about this flag. |
| 2935 |
|
| 2936 |
* src/job.c (child_execute_job): Don't set POSIX_SPAWN_RESETIDS flag. |
| 2937 |
|
| 2938 |
2021-12-05 Paul Smith <[email protected]> |
| 2939 |
|
| 2940 |
* .gitignore: Ignore patch files. |
| 2941 |
|
| 2942 |
2021-11-28 U2FsdGVkX1 <[email protected]> (tiny change) |
| 2943 |
|
| 2944 |
* src/commands.c (fatal_error_signal) [W32]: Use %lu for DWORD. |
| 2945 |
* src/function.c (windows32_openpipe) [W32]: Ditto. |
| 2946 |
|
| 2947 |
2021-11-28 Paul Smith <[email protected]> |
| 2948 |
|
| 2949 |
* NEWS: Update with author details |
| 2950 |
|
| 2951 |
Special-case Windows error results |
| 2952 |
* tests/scripts/features/errors: Match Windows-specific errors. |
| 2953 |
* tests/scripts/features/targetvars: Match Windows-specific errors. |
| 2954 |
* tests/scripts/misc/general4: Match Windows-specific errors. |
| 2955 |
|
| 2956 |
2021-11-28 Paul Smith <[email protected]> |
| 2957 |
|
| 2958 |
Convert word, wordlist, and intcmp functions to use long long |
| 2959 |
Modify make functions that parse integer values to use long long |
| 2960 |
values instead of long: on Windows long is the same as int (4 bytes) |
| 2961 |
and we don't want behavior to differ between different platforms. |
| 2962 |
|
| 2963 |
* bootstrap.conf: Change strtol module to strtoll module. |
| 2964 |
* src/function.c (parse_numeric): Use strtoll() and return long long. |
| 2965 |
(func_word): Use long long. |
| 2966 |
(func_wordlist): Use long long. Verify second argument is >= 0. |
| 2967 |
(func_intcmp): Use long long. |
| 2968 |
* src/config.ami.template: Don't define HAVE_STRTOLL. |
| 2969 |
* src/config-vms.template: Define HAVE_STRTOLL. |
| 2970 |
* src/config.W32.template: Define HAVE_STRTOLL. |
| 2971 |
* tests/run_make_tests.pl: Set $ERR_out_of_range to the proper string. |
| 2972 |
* tests/scripts/functions/word: Rework to use the new style and avoid |
| 2973 |
TAB characters. Verify trailing whitespace is ignored. Add a test |
| 2974 |
for a negative second argument to wordlist. Add tests for max signed |
| 2975 |
integer values. Use $ERR_out_of_range for the error string. |
| 2976 |
* tests/scripts/functions/intcmp: Add tests for min and max signed |
| 2977 |
integer values. Use $ERR_out_of_range for the error string. |
| 2978 |
|
| 2979 |
2021-11-28 Jouke Witteveen <[email protected]> |
| 2980 |
|
| 2981 |
Introduce $(intcmp ...) for numerical comparison |
| 2982 |
Numbers can come from $(words ...), automatic variables such as |
| 2983 |
$(MAKELEVEL), from environment variables, or from shell output such as |
| 2984 |
through $(shell expr ...). The $(intcmp ...) function allows |
| 2985 |
conditional evaluation controlled by numerical variables. |
| 2986 |
|
| 2987 |
* NEWS: Announce this feature. |
| 2988 |
* doc/make.texi (Functions for Conditionals): Document 'intcmp'. |
| 2989 |
* src/function.c (func_intcmp): Create the 'intcmp' built-in function. |
| 2990 |
* tests/scripts/functions/intcmp: Test the 'intcmp' built-in function. |
| 2991 |
|
| 2992 |
2021-11-28 Jouke Witteveen <[email protected]> |
| 2993 |
|
| 2994 |
Use strtol() instead of atoi() |
| 2995 |
strtol() is part of C89 and a fallback is provided by gnulib. |
| 2996 |
|
| 2997 |
* src/function.c (func_word, func_wordlist): Change atoi to strtol. |
| 2998 |
* test/scripts/functions/word: Add out-of-range verification testing. |
| 2999 |
|
| 3000 |
2021-11-27 Jouke Witteveen <[email protected]> |
| 3001 |
|
| 3002 |
* src/makeint.h: Removed unused atol declaration |
| 3003 |
|
| 3004 |
2021-11-27 Paul Smith <[email protected]> |
| 3005 |
|
| 3006 |
* src/implicit.c (pattern_search): Fix text for easier translation. |
| 3007 |
|
| 3008 |
[SV 48643] Update the implicit rule search docs |
| 3009 |
* NEWS: Announce the change. |
| 3010 |
* doc/make.texi (Implicit Rule Search): Update the definition of |
| 3011 |
"ought to exist" and add the extra step for compatibility mode. |
| 3012 |
|
| 3013 |
2021-11-27 Dmitry Goncharov <[email protected]> |
| 3014 |
|
| 3015 |
[SV 48643] Enhance "ought to exist" definition |
| 3016 |
The traditional definition of "ought to exist" in the user's manual can |
| 3017 |
lead to make choosing a poor series of chained implicit rules. Modify |
| 3018 |
that rule so that we first attempt to resolve implicit rules by |
| 3019 |
considering targets which are only (a) targets or (b) explicit |
| 3020 |
prerequisites of the current target. |
| 3021 |
|
| 3022 |
For backward-compatibility, if we don't find a solution using that |
| 3023 |
algorithm use the previous definition where "ought to exist" means |
| 3024 |
"mentioned as a prerequisite of any target". |
| 3025 |
|
| 3026 |
* src/implicit.c (pattern_search): An extra argument controls whether |
| 3027 |
to perform the backward-compatible rule search or not. If a prereq is |
| 3028 |
a target, or if it's a prerequisite of THIS target, then choose it. |
| 3029 |
If we get to the end and haven't found a match, but we have found a |
| 3030 |
potential compatibility rule, then retry with compat rules enabled. |
| 3031 |
If we're searching with compat rules enabled and we find a file |
| 3032 |
mentioned as a prerequisite of ANY target, then use it. |
| 3033 |
* tests/features/implicit_search: Provide a large suite of tests for |
| 3034 |
different steps of implicit rule search. |
| 3035 |
|
| 3036 |
2021-11-27 Paul Smith <[email protected]> |
| 3037 |
|
| 3038 |
tests: Enhance output to contain filename/line number info |
| 3039 |
* tests/scripts/options/dash-I: Use string comparison operator. |
| 3040 |
* tests/test_driver.pl (cmd2str): New method to convert a |
| 3041 |
command line to a string with proper quoting. |
| 3042 |
* tests/run_make_tests.pl (create_command): Call cmd2str() to format |
| 3043 |
the command. Add the filename/line number to the output. |
| 3044 |
|
| 3045 |
2021-10-18 Dmitry Goncharov <[email protected]> |
| 3046 |
|
| 3047 |
[SV 61042] Enhance logging of implicit rule search |
| 3048 |
Logging of implicit rule search gives limited information as to why a |
| 3049 |
given implicit rule was rejected, and if no implicit rule is found we |
| 3050 |
get the confusing "No rule to make target" result when the real issue |
| 3051 |
is that some prerequisite of some implicit rule could not be built. |
| 3052 |
|
| 3053 |
Enhance logging around implicit rule search as follows: |
| 3054 |
1. The messages which refer to a rule print a description (the targets |
| 3055 |
and prerequisites) of the rule. |
| 3056 |
2. A new message tells when a rule is rejected, along with the reason. |
| 3057 |
3. The 'Looking for an implicit rule...' message is printed for every |
| 3058 |
prerequisite, not just the top-level target. |
| 3059 |
4. "Trying harder" message is printed, when intermediate prerequisites |
| 3060 |
are going to be searched. |
| 3061 |
5. The 'No rule found...' and 'Found implicit rule...' messages are |
| 3062 |
printed for every prerequisite, not just the top-level target. |
| 3063 |
6. "Ought to exist...", "Found..." or "Not found..." message is |
| 3064 |
printed for each prerequisite. |
| 3065 |
|
| 3066 |
* src/rule.h (struct rule): Remember the definition of the rule. |
| 3067 |
* src/rule.c (get_rule_defn): Compute the definition of a rule. |
| 3068 |
(install_pattern_rule): Initialize the definition to empty. |
| 3069 |
(create_pattern_rule): Ditto. |
| 3070 |
(freerule): Free the definition. |
| 3071 |
(print_rule): Use the definition when printing rules. |
| 3072 |
* src/remake.c (update_file_1): Push debug output down into |
| 3073 |
try_implicit_rule(). |
| 3074 |
* src/implicit.c (try_implicit_rule): Add debugging |
| 3075 |
(pattern_search): Show the rule definition in various debug output. |
| 3076 |
Add new debug messages for implicit rule search. |
| 3077 |
|
| 3078 |
Additional changes by Paul Smith <[email protected]>: |
| 3079 |
|
| 3080 |
Since we usually don't need the rule definition, defer computing it |
| 3081 |
until we do. |
| 3082 |
|
| 3083 |
* bootstrap.conf: Include the mempcpy Gnulib module. |
| 3084 |
* src/makeint.h (mempcpy): Declare mempcpy if not available. |
| 3085 |
* src/misc.c (mempcpy): Define mempcpy if not available. |
| 3086 |
* src/config.h-vms.template: Don't set HAVE_MEMPCPY. |
| 3087 |
* src/config.h.W32.template: Ditto. |
| 3088 |
* src/rule.h (get_rule_defn): Return the definition of a rule. |
| 3089 |
* src/rule.c (get_rule_defn): If we don't have a definition compute |
| 3090 |
it; either way return it. |
| 3091 |
* src/implicit.c (pattern_search): Rework the handling of explicit |
| 3092 |
prerequisites to pattern rules to be more clear. There is no change |
| 3093 |
in behavior. |
| 3094 |
|
| 3095 |
2021-10-17 Dmitry Goncharov <[email protected]> |
| 3096 |
|
| 3097 |
* doc/make.texi (Special Targets): [SV 61122] Add .SECONDARY example |
| 3098 |
|
| 3099 |
2021-10-17 Paul Smith <[email protected]> |
| 3100 |
|
| 3101 |
* README.git: Update C version prerequisite |
| 3102 |
|
| 3103 |
2021-09-20 Paul Smith <[email protected]> |
| 3104 |
|
| 3105 |
Add support for the POSIX :::= assignment operator. |
| 3106 |
POSIX Issue 8 will require a new assignment operator, :::=. |
| 3107 |
This operator behaves similarly to the BSD make := operator: the |
| 3108 |
right-hand side is expanded immediately, but then the value is |
| 3109 |
re-escaped (all '$' are converted to '$$') and the resulting variable |
| 3110 |
is considered a recursive variable: the value is re-expanded on use. |
| 3111 |
|
| 3112 |
* src/variable.h (enum variable_flavor): Add f_expand flavor. |
| 3113 |
* src/variable.c (do_variable_definition): When defining f_expand, |
| 3114 |
post-process the result to re-escape '$' characters. |
| 3115 |
Remove default: to the compiler warns about un-handled enum values. |
| 3116 |
Set recursive values for both f_recursive and f_expand. |
| 3117 |
(parse_variable_definition): Rewrite this method. |
| 3118 |
The previous version was annoying to extend to ':::='. |
| 3119 |
(print_variable): Remove default: so the compiler warns us about |
| 3120 |
un-handled enum values. |
| 3121 |
* src/function.c (func_origin): Remove default: so the compiler warns |
| 3122 |
us about un-handled enum values. |
| 3123 |
* doc/make.texi: Add documentation for :::=. |
| 3124 |
* tests/scripts/variables/define: Add a test for define :::=. |
| 3125 |
* tests/scripts/variables/flavors: Add tests for :::=. |
| 3126 |
* tests/scripts/variables/negative: Add tests for :::=. |
| 3127 |
|
| 3128 |
2021-09-07 Paul Smith <[email protected]> |
| 3129 |
|
| 3130 |
Clean up more Windows warnings. |
| 3131 |
* src/config.h.W32.template: Re-enable warnings that we don't violate. |
| 3132 |
Add a new disabled warning: 4130 (logical operation on address of |
| 3133 |
string constant). |
| 3134 |
* src/w32/compat/posixfcn.c: Make makeint.h the first included header. |
| 3135 |
* src/w32/subproc/sub_proc.c: Ditto. It includes config.h already. |
| 3136 |
|
| 3137 |
2021-09-07 Dmitry Goncharov <[email protected]> |
| 3138 |
|
| 3139 |
[SV 60435] Ensure intermediate grouped files are removed |
| 3140 |
If multiple intermediate files are built together be sure all of them |
| 3141 |
are removed after make is finished. Continue to ensure that targets |
| 3142 |
that exist before make starts are not removed even if they appear to be |
| 3143 |
intermediate. |
| 3144 |
|
| 3145 |
Add a number of tests to pattern rules to verify this behavior. |
| 3146 |
|
| 3147 |
* src/filedef.h (struct file): Add a new is_explicit bitfield. |
| 3148 |
* src/file.c (rehash_file): Merge the is_explicit bit. |
| 3149 |
(enter_prereqs): Set is_explicit if the file is explicitly mentioned. |
| 3150 |
* src/implicit.c (pattern_search): Set intermediate on the file if it's |
| 3151 |
not explicit. |
| 3152 |
(record_files): Set is_explicit if a file is mentioned as a target. |
| 3153 |
* src/remake.c (update_file_1): Set secondary on files that already |
| 3154 |
exist so they won't be removed. |
| 3155 |
* tests/scripts/features/double_colon: Add a test for double-colon |
| 3156 |
pattern rules. |
| 3157 |
* tests/scripts/features/patternrules: Update KGO for tests where more |
| 3158 |
files are removed. |
| 3159 |
Add new tests to verify handling removal of intermediate files in the |
| 3160 |
context of grouped pattern targets. |
| 3161 |
|
| 3162 |
2021-09-06 Paul Smith <[email protected]> |
| 3163 |
|
| 3164 |
* src/default.c (default_variables): Use CPP in PREPROCESS.S. |
| 3165 |
|
| 3166 |
2021-09-06 Dmitry Goncharov <[email protected]> |
| 3167 |
|
| 3168 |
* src/main.c (decode_debug_flags): [SV 607777] Preserve -d options |
| 3169 |
* tests/scripts/options/dash-d: Test that -d --trace keeps -d. |
| 3170 |
|
| 3171 |
2021-09-06 Dmitry Goncharov <[email protected]> |
| 3172 |
|
| 3173 |
[SV 57778] Don't ignore included makefiles that can't be read |
| 3174 |
If we find an included makefile but it's not readable, stop |
| 3175 |
immediately with an error rather than continuing to look in other |
| 3176 |
directories. |
| 3177 |
|
| 3178 |
* src/read.c (eval_makefile): Only keep searching if the fopen error |
| 3179 |
is ENOENT, else stop and fail. |
| 3180 |
* tests/scripts/features/include: Add tests to verify this behavior. |
| 3181 |
|
| 3182 |
2021-09-06 Paul Smith <[email protected]> |
| 3183 |
|
| 3184 |
[SV 60795] Don't remake phony included makefiles and show errors |
| 3185 |
Change the handling of included makefiles which are phony targets to |
| 3186 |
be similar to double-colon rules with no prerequisites: simply don't |
| 3187 |
build them at all during the remake a makefile phase. |
| 3188 |
|
| 3189 |
Ensure that any included makefile which is needed but not built |
| 3190 |
results in an error. |
| 3191 |
|
| 3192 |
Update the documentation to make this clear. |
| 3193 |
Add tests to verify this behavior. |
| 3194 |
|
| 3195 |
* doc/make.texi (Remaking Makefiles): Clarify double-colon exception. |
| 3196 |
Document that phony targets are handled the same way. |
| 3197 |
(Phony Targets): Ditto. |
| 3198 |
* src/main.c (main): Check for phony targets when skipping goals. |
| 3199 |
Rather than throwing out skipped but failed goals keep them |
| 3200 |
separately then report them as errors. |
| 3201 |
* src/read.c (eval): Set the file location on included makefiles even |
| 3202 |
when there's no error. |
| 3203 |
* tests/scripts/features/include: Add tests for handling included |
| 3204 |
makefiles with both phony and double-colon rules to rebuild them. |
| 3205 |
|
| 3206 |
2021-09-06 Paul Smith <[email protected]> |
| 3207 |
|
| 3208 |
* doc/make.texi (Environment): [SV 60841] Clarify variable exporting. |
| 3209 |
|
| 3210 |
* doc/make.texi (Chained Rules): [SV 60904] Clarify intermediate files. |
| 3211 |
|
| 3212 |
2021-09-06 Paul Smith <[email protected]> |
| 3213 |
|
| 3214 |
Remove UBSAN issues discovered via fuzzing tests. |
| 3215 |
The arithmetic conversions in C say that if a binary operator has an |
| 3216 |
unsigned and signed type as operands and the unsigned type has a greater |
| 3217 |
rank then the signed value is converted to unsigned. This is bad if the |
| 3218 |
signed value is negative. |
| 3219 |
|
| 3220 |
There are a few places in the code which have this situation; convert |
| 3221 |
the signed value to positive and add instead of subtracting. |
| 3222 |
|
| 3223 |
Reported by He Jingxuan <[email protected]> |
| 3224 |
|
| 3225 |
* src/read.c (find_map_unquote): Use a positive int in memmove(). |
| 3226 |
(find_char_unquote): Ditto. |
| 3227 |
(find_percent_cached): Ditto. |
| 3228 |
|
| 3229 |
2021-09-05 Paul Smith <[email protected]> |
| 3230 |
|
| 3231 |
* doc/make.texi (Prerequisite Types): [SV 61069] Mention PHONY prereqs |
| 3232 |
|
| 3233 |
* doc/make.1: Clean up man page text. |
| 3234 |
|
| 3235 |
* README.git: Add a section on ways to test. |
| 3236 |
|
| 3237 |
* src/main.c (decode_switches): Fix memory leak. |
| 3238 |
|
| 3239 |
Clean up a few Windows build warnings (not all!) |
| 3240 |
* build_w32.bat: Quote uses of %VSWHERE% so it can contain spaces |
| 3241 |
* src/hash.c (hash_init): Avoid use of an undefined struct. |
| 3242 |
(hash_rehash): Ditto. |
| 3243 |
* src/vpath.c (construct_vpath_list): Cast explicitly to void*. |
| 3244 |
|
| 3245 |
2021-09-05 Paul Smith <[email protected]> |
| 3246 |
|
| 3247 |
[SV 45211] Parse MAKEFLAGS immediately when it's reset |
| 3248 |
When MAKEFLAGS is set in a makefile, reparse it immediately rather |
| 3249 |
than waiting until after all makefiles have been read and parsed. |
| 3250 |
This change doesn't actually fix the SV bug referenced because, even |
| 3251 |
though we do reparse MAKEFLAGS, we don't handle the -r or -R options |
| 3252 |
immediately. Doing this will require more effort. |
| 3253 |
|
| 3254 |
* NEWS: Announce the change. |
| 3255 |
* src/makeint.h: Publish reset_switches() and decode_env_switches() |
| 3256 |
from main.c |
| 3257 |
* src/main.c (main): Don't call construct_include_path(); it will be |
| 3258 |
invoked decode_switches(). |
| 3259 |
Preserve the old values of builtin_rules, builtin_variables, and |
| 3260 |
job_slots before we read makefiles since they can be changed now. |
| 3261 |
(reset_switches): Publish (remove static). Set the initial value of |
| 3262 |
the stringlist list to NULL. |
| 3263 |
(decode_switches): Call construct_include_path() after decoding. |
| 3264 |
(decode_env_switches): Publish (remove static). |
| 3265 |
(define_makeflags): Set the MAKEFLAGS variable for special handling. |
| 3266 |
* src/read.c (eval_makefile): Check for empty include_directories. |
| 3267 |
(construct_include_path): Clear any old value of .INCLUDE_DIRS before |
| 3268 |
appending new values. Free the previous include_directories. |
| 3269 |
* src/variable.c (lookup_special_var): When MAKEFLAGS is set, first |
| 3270 |
reset the switches then re-parse the variable. |
| 3271 |
* tests/run_make_tests.pl: Memo-ize some default variable values. |
| 3272 |
* tests/scripts/options/dash-r: Create tests for setting -r and -R. |
| 3273 |
* tests/scripts/variables/MAKEFLAGS: Test that resetting -I from |
| 3274 |
within the makefile takes effect immediately. |
| 3275 |
|
| 3276 |
2021-09-05 Paul Smith <[email protected]> |
| 3277 |
|
| 3278 |
* make-gdb.py: Add pretty-printers and clean up. |
| 3279 |
Create a pretty-printer for next-pointer lists. |
| 3280 |
Create a pretty-printer for stringlists. |
| 3281 |
Change showargv from a function to a command (easier to use). |
| 3282 |
|
| 3283 |
Clean up some Python PEP violations. Add support for testing null |
| 3284 |
pointers and caching gdb.Types. |
| 3285 |
|
| 3286 |
2021-09-03 Paul Smith <[email protected]> |
| 3287 |
|
| 3288 |
[SV 60595] Restart whenever any makefile is rebuilt |
| 3289 |
Previously if an included makefile was rebuilt as a prerequisite of |
| 3290 |
another included makefile which didn't need to be rebuilt, make would |
| 3291 |
not realize that it needed to re-exec itself. |
| 3292 |
|
| 3293 |
Ensure that if any included makefile target is rebuilt we re-exec. |
| 3294 |
Also ensure that if an included makefile is not readable, and our rule |
| 3295 |
for rebuilding it doesn't actually change it, we will still fail. |
| 3296 |
|
| 3297 |
* src/remake.c (update_goal_chain): If a goal's update was successful |
| 3298 |
then check its status, even if no actual commands were run because it |
| 3299 |
was already up to date. |
| 3300 |
(show_goal_error): Remove superfluous cast. |
| 3301 |
* src/main.c (main): If the makefile remake did nothing, check that we |
| 3302 |
were able to successfully include all the makefiles we care about; if |
| 3303 |
not fail. When generating error messages about included makefiles be |
| 3304 |
sure to show the filename/linenumber information. |
| 3305 |
* test/scripts/features/reinvoke: Add tests for this behavior. |
| 3306 |
* test/scripts/options/dash-k: Update error messages. |
| 3307 |
|
| 3308 |
2021-09-03 Paul Smith <[email protected]> |
| 3309 |
|
| 3310 |
[SV 60412] Allow -I- to throw out the current directory path |
| 3311 |
Accept a "-" directory value to the -I option to clear the set of |
| 3312 |
directories to be searched up to that point, including the default |
| 3313 |
directories. |
| 3314 |
|
| 3315 |
* NEWS: Announce the change. |
| 3316 |
* doc/make.texi (Summary of Options): Add documentation. |
| 3317 |
* src/read.c (construct_include_path): Check for '-' and if found, |
| 3318 |
clear the list of directories to be searched. |
| 3319 |
* tests/scripts/options/dash-I: Add tests for -I-. |
| 3320 |
* tests/scripts/variables/INCLUDE_DIRS: Add tests for -I-. |
| 3321 |
|
| 3322 |
2021-07-25 Dmitry Goncharov <[email protected]> |
| 3323 |
|
| 3324 |
[SV 60699] Avoid calling strlen() repeatedly in a loop |
| 3325 |
* src/variable.c (lookup_pattern_var): Accept target length parameter. |
| 3326 |
(initialize_file_variables): Pass computed target length to lookup. |
| 3327 |
|
| 3328 |
2021-07-25 Paul Smith <[email protected]> |
| 3329 |
|
| 3330 |
* NEWS: Add a few missing attributions |
| 3331 |
* AUTHORS: Add some missing attributions |
| 3332 |
|
| 3333 |
2021-07-25 Dmitry Goncharov <[email protected]> |
| 3334 |
|
| 3335 |
[SV 60297] Add .NOTINTERMEDIATE special target |
| 3336 |
Support a new special target, .NOTINTERMEDIATE. Any file or pattern |
| 3337 |
prerequisite of this target will never be considered intermediate. |
| 3338 |
This differs from .SECONDARY in that .SECONDARY files won't be deleted |
| 3339 |
but they will still not be built if they are missing. |
| 3340 |
|
| 3341 |
.NOTINTERMEDIATE files are treated the same way as a target which is |
| 3342 |
explicitly mentioned in the makefile. This is mostly useful with |
| 3343 |
patterns; obviously mentioning a target explicitly here is enough in |
| 3344 |
and of itself to make something not intermediate. |
| 3345 |
|
| 3346 |
Some adjustments made by [email protected] |
| 3347 |
|
| 3348 |
* NEWS: Announce the new feature. |
| 3349 |
* doc/make.texi (Special Targets): Document .NOTINTERMEDIATE. |
| 3350 |
(Chained Rules): Describe how to use .NOTINTERMEDIATE. |
| 3351 |
* src/main.c (main): Add "notintermediate" to the .FEATURES variable. |
| 3352 |
* src/filedef.h (struct file): Add "notintermediate" flag. |
| 3353 |
* src/file.c (no_intermediates): Mark global .NOTINTERMEDIATE. |
| 3354 |
(snap_file): Support .NOTINTERMEDIATE special target. Throw an error |
| 3355 |
if the same target is marked both .NOTINTERMEDIATE and .SECONDARY or |
| 3356 |
.INTERMEDIATE. |
| 3357 |
(rehash_file): Merge intermediate, notintermediate, secondary flags. |
| 3358 |
(remove_intermediates): Check notintermediate flag before removing. |
| 3359 |
(print_file): |
| 3360 |
* src/implicit.c (pattern_search): Set notintermediate based on the |
| 3361 |
pattern. |
| 3362 |
* tests/scripts/targets/NOTINTERMEDIATE: Add a new test suite. |
| 3363 |
|
| 3364 |
2021-05-30 Paul Smith <[email protected]> |
| 3365 |
|
| 3366 |
* make.texi (Reading Makefiles): != creates recursive variables. |
| 3367 |
Reported by Ronald Hoogenboom <[email protected]>. |
| 3368 |
|
| 3369 |
2021-05-30 Dmitry Goncharov <[email protected]> |
| 3370 |
|
| 3371 |
[SV 60659] Set $$< properly in second expansion |
| 3372 |
Set the $$< automatic variable as best we can during secondary |
| 3373 |
expansion of prerequisites. |
| 3374 |
|
| 3375 |
* src/commands.c (set_file_variables): Don't break without setting |
| 3376 |
'less' if secondary expansion is enabled. |
| 3377 |
* tests/scripts/features/se_explicit: Test secondary expansion results. |
| 3378 |
* tests/scripts/features/se_implicit: Test secondary expansion results. |
| 3379 |
|
| 3380 |
2021-05-30 Paul Smith <[email protected]> |
| 3381 |
|
| 3382 |
[SV 58341] Add non-trivial options to $(MAKEFLAGS) |
| 3383 |
Previously only trivial (single-letter) options were available in |
| 3384 |
$(MAKEFLAGS) when it is examined from inside a makefile (the full |
| 3385 |
value was set before expanding recipes). |
| 3386 |
|
| 3387 |
Ensure that all options (but, not command line variable overrides!) |
| 3388 |
are visible in the $(MAKEFLAGS) variable. In order to do this |
| 3389 |
reset the default values of options, particularly options which are |
| 3390 |
lists, before re-reading MAKEFLAGS after makefiles have been read. |
| 3391 |
Otherwise we'll get duplicate values for options such as -I. |
| 3392 |
|
| 3393 |
Unfortunately there are complications here as well: sometimes (for |
| 3394 |
jobserver options in particular) we modify the values of these |
| 3395 |
options while running: we must not reset these modifications. |
| 3396 |
|
| 3397 |
* NEWS: Announce this change |
| 3398 |
* src/main.c (main): Call new reset_switches() before re-parsing |
| 3399 |
MAKEFLAGS. |
| 3400 |
(reset_switches): Reset the value of non-special options to their |
| 3401 |
defaults. |
| 3402 |
(define_makeflags): Add non-special options into MAKEFLAGS even |
| 3403 |
if 'all' is not set. |
| 3404 |
|
| 3405 |
2021-05-30 Dmitry Goncharov <[email protected]> |
| 3406 |
|
| 3407 |
[SV 60378] Don't add duplicate default search directories |
| 3408 |
Depending on how make was configured it may add duplicate |
| 3409 |
directories in the default include search path: avoid this. |
| 3410 |
|
| 3411 |
(Tweaked by [email protected]) |
| 3412 |
|
| 3413 |
* configure.ac: Set AM variable KNOWN_PREFIX if --prefix is known |
| 3414 |
* Makefile.am: Only set INCLUDEDIR if prefix is not known |
| 3415 |
* read.c [default_include_directories]: Only add INCLUDEDIR if set |
| 3416 |
|
| 3417 |
2021-05-30 Dmitry Goncharov <[email protected]> |
| 3418 |
|
| 3419 |
* tests/scripts/targets/INTERMEDIATE: [SV 60188] Add one more test |
| 3420 |
|
| 3421 |
2021-05-29 Eli Zaretskii <[email protected]> |
| 3422 |
|
| 3423 |
[SV 58656] Fix mtime for large files on MS-Windows |
| 3424 |
In MSVC builds, 'stat' fails when called on files larger than |
| 3425 |
2GB. Call '_stat64' instead to work around this. |
| 3426 |
|
| 3427 |
* src/remake.c (STAT): Define to '_stat64' for MSVC builds. |
| 3428 |
(name_mtime) [WINDOWS32]: Use STAT instead of 'stat'. |
| 3429 |
Suggested by Makoto Kato <[email protected]>. |
| 3430 |
|
| 3431 |
2021-03-28 Paul Smith <[email protected]> |
| 3432 |
|
| 3433 |
Fix build and test issues on Windows |
| 3434 |
* src/dep.h (DEP): Remove extraneous semicolon. |
| 3435 |
* src/dir.c (find_directory) [W32]: Replace removed variable. |
| 3436 |
* tests/scripts/features/include: Allow the extra default makefile |
| 3437 |
searched for on Windows. |
| 3438 |
* tests/scripts/functions/file: Use $(info ...) to avoid "command |
| 3439 |
too long" errors on Windows. |
| 3440 |
|
| 3441 |
2021-03-28 Tobias Stoeckmann <[email protected]> (tiny change) |
| 3442 |
|
| 3443 |
* src/remake.c (name_mtime): Reserve space for nul in readlink result |
| 3444 |
|
| 3445 |
2021-03-25 Cao jin <[email protected]> (tiny change) |
| 3446 |
|
| 3447 |
* doc/make.texi (Call Function): Apply consistent formatting |
| 3448 |
|
| 3449 |
2021-03-25 Pete Dietl <[email protected]> (tiny change) |
| 3450 |
|
| 3451 |
* src/job.c (child_execute_job): Update gnulib find_in_given_path() |
| 3452 |
|
| 3453 |
2021-03-25 Mike Frysinger <[email protected]> (tiny change) |
| 3454 |
|
| 3455 |
* doc/make.texi (Automatic Variables): Relocate the $? example |
| 3456 |
|
| 3457 |
2021-03-15 Paul Smith <[email protected]> |
| 3458 |
|
| 3459 |
[SV 58497] Ensure $(file <) newline removal succeeds |
| 3460 |
Keep a count of bytes read rather than comparing pointers since the |
| 3461 |
variable_buffer might get reallocated. |
| 3462 |
|
| 3463 |
Bug and patch by Ken Tossell <[email protected]> |
| 3464 |
Regression tests by Dmitry Goncharov <[email protected]> |
| 3465 |
Tweaked by Paul Smith <[email protected]> |
| 3466 |
|
| 3467 |
* src/function.c (func_file): Use bytes read rather than a pointer. |
| 3468 |
* tests/scripts/functions/file: Provide various tests for reading |
| 3469 |
empty files, files with/without newlines, and large files. |
| 3470 |
|
| 3471 |
2021-03-15 Dmitry Goncharov <[email protected]> |
| 3472 |
|
| 3473 |
[SV 60188] Explicit prereqs cannot be intermediate files |
| 3474 |
If a prereq of a pattern is an explicit target, it should not be |
| 3475 |
considered an intermediate file. |
| 3476 |
|
| 3477 |
(Minor tweaks by Paul Smith <[email protected]>) |
| 3478 |
|
| 3479 |
* src/dep.h (struct nameseq): Add is_explicit flag. |
| 3480 |
* src/implicit.c (struct patdeps): Ditto. |
| 3481 |
(pattern_search): Set the is_explicit flag appropriately for each |
| 3482 |
prerequisite, based on whether it contained a pattern or not. |
| 3483 |
Update the help output to note implicit vs. explicit prereqs. |
| 3484 |
* tests/scripts/features/double_colon: Add tests. |
| 3485 |
* tests/scripts/features/grouped_targets: Ditto. |
| 3486 |
* tests/scripts/features/patternrules: Ditto. |
| 3487 |
* tests/scripts/features/se_implicit: Ditto. |
| 3488 |
* tests/scripts/features/statipattrules: Ditto. |
| 3489 |
|
| 3490 |
2021-03-15 Paul Smith <[email protected]> |
| 3491 |
|
| 3492 |
* tests/scripts/features/exec: Small cleanup |
| 3493 |
|
| 3494 |
2021-03-15 Paul Smith <[email protected]> |
| 3495 |
|
| 3496 |
Ensure variable_buffer is always set. |
| 3497 |
Initialize the global variable_buffer in main() so that it is never |
| 3498 |
a null pointer. Then invoking variable_expand("") is never needed: |
| 3499 |
simply use the variable_buffer pointer when we want to restart the |
| 3500 |
variable buffer. The main point of this simplification is not to |
| 3501 |
keep a separate pointer to the beginning of the buffer: this is |
| 3502 |
dangerous because the buffer may be re-allocated. Instead always |
| 3503 |
use the variable_buffer pointer itself. |
| 3504 |
|
| 3505 |
* src/variable.h (initialize_variable_output): Publish. |
| 3506 |
* src/expand.c (initialize_variable_output): Remove static. |
| 3507 |
* src/main.c (main): Initialize variable_buffer. |
| 3508 |
* src/file.c (enter_prereqs): Don't call variable_expand("") and |
| 3509 |
don't save a separate buffer pointer than might be outdated. |
| 3510 |
(expand_deps): Ditto. |
| 3511 |
* src/read.c (record_files): Ditto. |
| 3512 |
* src/remake.c (library_search): Ditto. |
| 3513 |
|
| 3514 |
2021-03-15 Paul Smith <[email protected]> |
| 3515 |
|
| 3516 |
[SV 59881] Handle vertical TAB consistently |
| 3517 |
While parsing makefiles get_next_mword() was treating VTAB as a word |
| 3518 |
character rather than a word separator. However, when using |
| 3519 |
find_next_token(), for example in patsubst_expand_pat(), we treated |
| 3520 |
VTAB as a word separator causing multiple words to appear where we |
| 3521 |
didn't expect them. |
| 3522 |
|
| 3523 |
* src/makeint.h (END_OF_TOKEN): Change from a loop to a boolean check. |
| 3524 |
* src/misc.c (end_of_token): Move the loop here. |
| 3525 |
* src/read.c (get_next_mword): Skip whitespace, not just blank, to |
| 3526 |
find the start of the word and use END_OF_TOKEN() to decide when the |
| 3527 |
current word is finished. |
| 3528 |
|
| 3529 |
2021-03-14 Paul Smith <[email protected]> |
| 3530 |
|
| 3531 |
[SV 59870] define/undefine prerequisites are not target-specific vars |
| 3532 |
* src/read.c (parse_var_assignment): If called in a target-specific |
| 3533 |
variable context don't allow define/undefine as variable assignments. |
| 3534 |
* test/scripts/variables/define: Add a test. |
| 3535 |
* test/scripts/variables/undefine: Add a test. |
| 3536 |
|
| 3537 |
* maintMakefile: Don't make .check-git-HEAD .PHONY |
| 3538 |
|
| 3539 |
2021-03-07 Jouke Witteveen <[email protected]> |
| 3540 |
|
| 3541 |
More correctly describe the scope of variables |
| 3542 |
* NEWS: Use "local" instead of the incorrect "lexically-scoped". |
| 3543 |
* doc/make.texi: Refer to let/foreach variables as local variables. |
| 3544 |
|
| 3545 |
2021-03-07 Paul Smith <[email protected]> |
| 3546 |
|
| 3547 |
* doc/make.text: Clarify that patsubst doesn't touch unmatched words |
| 3548 |
|
| 3549 |
* .dir-locals.el: Update for newer LSP config |
| 3550 |
|
| 3551 |
* file.c (remove_intermediates): Restart "rm ..." on error |
| 3552 |
|
| 3553 |
2020-12-07 Paul Smith <[email protected]> |
| 3554 |
|
| 3555 |
* doc/make.texi (How Patterns Match): [SV 58639] Fix chaining info. |
| 3556 |
|
| 3557 |
2020-12-06 Jouke Witteveen <[email protected]> |
| 3558 |
|
| 3559 |
Create $(let ...) providing lexically scoped variables |
| 3560 |
Add a new function $(let ...) which allows lexically scoped variables. |
| 3561 |
|
| 3562 |
* NEWS: Add information on this feature. |
| 3563 |
* doc/make.texi (Let Function): Document the 'let' function. |
| 3564 |
* src/function.c (func_let): Create the 'let' built-in function. |
| 3565 |
* tests/scripts/functions/let: Test the 'let' built-in function. |
| 3566 |
|
| 3567 |
2020-12-06 Paul Smith <[email protected]> |
| 3568 |
|
| 3569 |
* doc/make.texi (Phony Targets): [SV 58961] Clarify pattern handling |
| 3570 |
|
| 3571 |
* doc/make.texi (Synchronized Terminal Output): [SV 58960] Fix link |
| 3572 |
|
| 3573 |
2020-12-05 Paul Smith <[email protected]> |
| 3574 |
|
| 3575 |
[SV 59169] Add --debug=why and --debug=print options |
| 3576 |
Add debug options to print recipes even if they would otherwise be |
| 3577 |
silent, and to print the reason that a target was considered out of |
| 3578 |
date. |
| 3579 |
|
| 3580 |
Modify --trace to simply be a shorthand for --debug=print,why. |
| 3581 |
|
| 3582 |
* NEWS: Announce changes. |
| 3583 |
* doc/make.texi (Summary of Options): Document the new options. |
| 3584 |
* doc/make.1: Ditto. |
| 3585 |
* src/debug.h: Add new flags DB_PRINT and DB_WHY. |
| 3586 |
* src/makeint.h: Remove the trace_flag variable. |
| 3587 |
* src/job.c (start_job_command): Check debug flags not trace_flag. |
| 3588 |
(new_job): Ditto. |
| 3589 |
* src/main.c (trace_flag): Make a static variable for switches. |
| 3590 |
(decode_debug_flags): Set DB_PRINT and DB_WHY if trace_flag is set. |
| 3591 |
* tests/scripts/variables/GNUMAKEFLAGS: Update known-good messages. |
| 3592 |
* tests/scripts/variables/MAKEFLAGS: Ditto. |
| 3593 |
|
| 3594 |
2020-12-05 Paul Smith <[email protected]> |
| 3595 |
|
| 3596 |
* configure.ac: [SV 58836] Copy build.sh to the build directory |
| 3597 |
|
| 3598 |
2020-12-05 Paul Smith <[email protected]> |
| 3599 |
|
| 3600 |
[SV 57676] Support included files being built after failing |
| 3601 |
If a -include file does not exist, then some subsequent operation |
| 3602 |
creates it, then allow it to be successfully included. |
| 3603 |
|
| 3604 |
* src/read.c (eval_makefile): If our last mtime was NONEXISTENT then |
| 3605 |
reset it to 0 so we'll check it again. |
| 3606 |
* tests/scripts/features/include: Add a test for this behavior. |
| 3607 |
|
| 3608 |
2020-12-02 Paul Smith <[email protected]> |
| 3609 |
|
| 3610 |
* src/makeint.h (free_alloca): Check for builtin alloca |
| 3611 |
|
| 3612 |
* src/main.c (main): [SV 59601] Check for malformed env. variables |
| 3613 |
|
| 3614 |
2020-11-29 Paul Smith <[email protected]> |
| 3615 |
|
| 3616 |
* maintMakefile: [SV 58794] Check for file existence in the release |
| 3617 |
|
| 3618 |
* Makefile.am (HAVE_GUILE): Only use Guile options if HAVE_GUILE. |
| 3619 |
|
| 3620 |
* tests/scripts/features/vpathgpath: Avoid duplicate function name. |
| 3621 |
|
| 3622 |
Resolve unused-result warnings for alloca(0) |
| 3623 |
* src/makeint.h (free_alloca): New macro to defeat warn_unused_result. |
| 3624 |
* src/read.c (eval_makefile): Call it. |
| 3625 |
(eval_buffer): Ditto. |
| 3626 |
* src/remake.c (update_file): Ditto. |
| 3627 |
|
| 3628 |
2020-11-29 Paul Smith <[email protected]> |
| 3629 |
|
| 3630 |
Avoid some valgrind warnings |
| 3631 |
Using sscanf() to parse archive header values (struct ar_hdr) can lead |
| 3632 |
to valgrind warnings which are probably bogus but are annoying. |
| 3633 |
To be safer, create a local method to convert the ASCII integer |
| 3634 |
strings into integers. |
| 3635 |
|
| 3636 |
* src/arscan.c (parse_int): Turn integer strings into integers. |
| 3637 |
(ar_scan): Initialize struct ar_hdr memory. |
| 3638 |
Call parse_int() rather than sscanf/atol. |
| 3639 |
|
| 3640 |
2020-11-29 Paul Smith <[email protected]> |
| 3641 |
|
| 3642 |
[SV 41273] Allow the directory cache to be invalidated |
| 3643 |
Each time we invoke a command it's possible that it will change the |
| 3644 |
filesystem in ways that were not described by the target. If that |
| 3645 |
happens but we have cached previous directory contents then we may |
| 3646 |
make decisions or report results based on obsolete information. |
| 3647 |
|
| 3648 |
Keep a count of how many commands we've invoked, and remember the |
| 3649 |
current command count every time we load the contents of a directory. |
| 3650 |
If we request the directory and the current command count has changed |
| 3651 |
we know the cache is outdated so reload from scratch. |
| 3652 |
|
| 3653 |
* NEWS: Announce the change. |
| 3654 |
* src/makeint.h (command_count): Create a global counter. |
| 3655 |
* src/main.c (command_count): Ditto. |
| 3656 |
* src/job.c (reap_children): Increment the counter on job completion. |
| 3657 |
* src/function.c (func_file): Increment if we write a file. |
| 3658 |
* src/dir.c (clear_directory_contents): Clear the current contents of |
| 3659 |
a cached directory. |
| 3660 |
(struct directory_contents): Remember the counter value. |
| 3661 |
(struct directory): Remember the counter value for non-existing dirs. |
| 3662 |
(find_directory): If we have a cached directory and the count hasn't |
| 3663 |
changed then return it. Else, clear the previous contents and re-read |
| 3664 |
from scratch. |
| 3665 |
* tests/scripts/features/dircache: Add tests of the directory cache. |
| 3666 |
|
| 3667 |
2020-11-29 Paul Smith <[email protected]> |
| 3668 |
|
| 3669 |
Support "unexport" in target-specific variables. |
| 3670 |
Rewrite the environment variable algorithm to correctly inherit |
| 3671 |
export settings from parent variable sets. The new algorithm |
| 3672 |
for computing the table of environment variables is: |
| 3673 |
|
| 3674 |
- Start with the most local variable set and proceed to global. |
| 3675 |
- If the variable already exists in the table and we don't know |
| 3676 |
its export status, update it with the current variable's status. |
| 3677 |
- If the variable is not in the table and it's not global, add it |
| 3678 |
regardless of its status so if it's unexported we remember that. |
| 3679 |
- If the variable is not in the table and is global, check its |
| 3680 |
export status and don't add it if we won't export it. |
| 3681 |
|
| 3682 |
Then when generating the environment variables, check the export |
| 3683 |
status of each variable in case it was a target-specific variable |
| 3684 |
and we have determined it should not be exported. |
| 3685 |
|
| 3686 |
Rework SHELL handling to check at the end whether we added it or |
| 3687 |
not and if we didn't, add the value from the environment. |
| 3688 |
|
| 3689 |
* NEWS: Announce support for target-specific "unexport"." |
| 3690 |
* doc/make.texi (Target-specific): Document the support. |
| 3691 |
* src/variable.h (enum variable_export): Make into a global type. |
| 3692 |
* src/read.c (struct vmodifiers): Use enum variable_export rather |
| 3693 |
than individual booleans. |
| 3694 |
(parse_var_assignment): Parse the "unexport" keyword. |
| 3695 |
(eval): Remember the vmodifier value in the variable. |
| 3696 |
(record_target_var): Ditto. |
| 3697 |
* src/variable.c (should_export): Check if the variable should be |
| 3698 |
exported. |
| 3699 |
(target_environment): Implement the above algorithm. |
| 3700 |
* tests/scripts/features/export: Test export/unexport with variable |
| 3701 |
assignments on the same line. |
| 3702 |
* tests/scripts/features/targetvars: Add a comprehensive suite of |
| 3703 |
tests for different types of target-specific export / unexport. |
| 3704 |
* tests/scripts/variables/SHELL: Update the comment. |
| 3705 |
|
| 3706 |
2020-11-29 Dmitry Goncharov <[email protected]> |
| 3707 |
|
| 3708 |
[SV 59230] Preserve export settings for target-specific vars |
| 3709 |
* src/read.c (record_target_var): Don't overwrite pre-existing export |
| 3710 |
flag unless we're changing it. |
| 3711 |
* tests/scripts/features/targetvars: Add a test. |
| 3712 |
|
| 3713 |
2020-11-29 Paul Smith <[email protected]> |
| 3714 |
|
| 3715 |
[SV 59230] Ensure environment variables are exportable |
| 3716 |
When checking for invalid environment variable names we searched the |
| 3717 |
entire name string instead of just the first LENGTH chars; this could |
| 3718 |
cause us to incorrectly decide the variable was not exportable. |
| 3719 |
|
| 3720 |
Dmitry Goncharov <[email protected]> found this bug and |
| 3721 |
provided a test case and sample fix: I used the test but chose a |
| 3722 |
slightly different fix. |
| 3723 |
|
| 3724 |
* src/variable.c (define_variable_in_set): check the variable name |
| 3725 |
not the input string. |
| 3726 |
* tests/scripts/features/targetvars: Ensure environment variable |
| 3727 |
values are exported. |
| 3728 |
|
| 3729 |
2020-11-29 Paul Smith <[email protected]> |
| 3730 |
|
| 3731 |
* src/default.c (default_variables) [AIX]: [SV 59096] Fix ARFLAGS |
| 3732 |
Reported by Dmitry Goncharov <[email protected]>, with a patch |
| 3733 |
changing the pattern rule for building archives. I decided to |
| 3734 |
change the default value of ARFLAGS on AIX instead. |
| 3735 |
|
| 3736 |
2020-11-29 Paul Smith <[email protected]> |
| 3737 |
|
| 3738 |
[SV 35711] Check for special targets earlier |
| 3739 |
GNU make must recognize some special targets as they are defined. |
| 3740 |
Because of the way targets are defined, we were not recognizing these |
| 3741 |
special targets until we were handling the NEXT statement. However |
| 3742 |
that's too late for some special targets such as .POSIX etc. which can |
| 3743 |
change the behavior of make during parsing. |
| 3744 |
|
| 3745 |
Check for special targets earlier, as soon as we've finished parsing |
| 3746 |
the target introduction line (before we've even parsed the recipe). |
| 3747 |
|
| 3748 |
* NEWS: Mention the change. |
| 3749 |
* src/read.c (check_specials): New function to look for special |
| 3750 |
targets. Move checks from eval() and record_files() to this new |
| 3751 |
function. |
| 3752 |
(eval): Call check_specials() after we've completed parsing the target |
| 3753 |
introduction line. Move default goal detection to check_specials(). |
| 3754 |
(record_files): Move handling of .POSIX, .SECONDEXPANSION, and |
| 3755 |
.ONESHELL to check_specials(). |
| 3756 |
* tests/scripts/misc/bs-nl: Remove workaround for late .POSIX issue. |
| 3757 |
* tests/scripts/targets/POSIX: Add a comment. |
| 3758 |
|
| 3759 |
2020-11-29 Paul Smith <[email protected]> |
| 3760 |
|
| 3761 |
* .ccls: Disable clang compare against static string warning |
| 3762 |
|
| 3763 |
2020-11-13 Paul Smith <[email protected]> |
| 3764 |
|
| 3765 |
[SV 59093] Rewrite filter/filter-out to avoid large stack usage |
| 3766 |
* src/function.c (func_filter_filterout): Allocate arrays to hold |
| 3767 |
pattern and word information rather than creating linked lists on |
| 3768 |
the stack. |
| 3769 |
* tests/scripts/functions/filter-out: Test large filters. |
| 3770 |
|
| 3771 |
2020-10-28 Paul Smith <[email protected]> |
| 3772 |
|
| 3773 |
* doc/make.texi (Include): Update behavior for missing included files |
| 3774 |
|
| 3775 |
2020-07-19 Paul Smith <[email protected]> |
| 3776 |
|
| 3777 |
* NEWS: [SV 58435] Document minimum C compiler version requirement |
| 3778 |
* configure.ac: Require c99 via AC_PROG_CC_C99 |
| 3779 |
|
| 3780 |
2020-07-19 Paul Smith <[email protected]> |
| 3781 |
|
| 3782 |
[SV 58735] Define the order that makefiles are rebuilt. |
| 3783 |
Ensure that makefiles are rebuilt in the order in which make first |
| 3784 |
considered them, and document this behavior in the manual. |
| 3785 |
|
| 3786 |
* NEWS: Add a note about the new behavior |
| 3787 |
* doc/make.text (How make Processes a Makefile): Document it. |
| 3788 |
* main.c (main): Inverse the list of makefile goals. |
| 3789 |
* read.c (read_all_makefiles): Add default makefiles to the list at |
| 3790 |
the front in reverse order, the same way other makefiles are added. |
| 3791 |
* tests/scripts/features/include: Add tests to verify rebuild order. |
| 3792 |
|
| 3793 |
2020-07-10 Paul Smith <[email protected]> |
| 3794 |
|
| 3795 |
* src/makeint.h: [ARM] [SV 58347] Don't assume ARM is not POSIX |
| 3796 |
|
| 3797 |
* src/job.c (unblock_sigs): [!POSIX] [SV 58743] Fix syntax errors |
| 3798 |
|
| 3799 |
2020-05-14 Paul Smith <[email protected]> |
| 3800 |
|
| 3801 |
* NEWS: Fix some tortured grammar. |
| 3802 |
|
| 3803 |
2020-05-03 Paul Smith <[email protected]> |
| 3804 |
|
| 3805 |
[SV 57930] Cast char to unsigned char to call ctype functions |
| 3806 |
This cast was already done almost everywhere: fix some stragglers. |
| 3807 |
|
| 3808 |
* src/load.c (load_file): Cast char to unsigned char. |
| 3809 |
* src/misc.c (strcasecmp, strncasecmp): [!POSIX] Ditto. |
| 3810 |
* src/dir.c (vms_hash): [VMS] Ditto. |
| 3811 |
* src/vms_progname.c (set_program_name): [VMS] Ditto. |
| 3812 |
* src/vms_jobs.c (posix_parse_dq): [VMS] Ditto. |
| 3813 |
(posix_parse_dollar): [VMS] Ditto. |
| 3814 |
(build_vms_cmd): [VMS] Ditto. |
| 3815 |
(child_execute_job): [VMS] Ditto. |
| 3816 |
|
| 3817 |
2020-05-03 Paul Smith <[email protected]> |
| 3818 |
|
| 3819 |
Convert [ ... ] to test ... in scripting. |
| 3820 |
The "[" link may be missing during OS boostrapping. |
| 3821 |
|
| 3822 |
* build.sh: Convert "[ ... ]" to "test ..." |
| 3823 |
* maintMakefile: Ditto. |
| 3824 |
* scripts/copyright-update: Ditto |
| 3825 |
* tests/scripts/features/reinvoke: Ditto |
| 3826 |
* tests/scripts/features/targetvars: Ditto |
| 3827 |
|
| 3828 |
2020-05-03 Paul Smith <[email protected]> |
| 3829 |
|
| 3830 |
* maintMakefile: Clean up output |
| 3831 |
|
| 3832 |
* mainMakefile: Check that INSTALL exists in the dist file |
| 3833 |
For some reason the INSTALL file symlinked to gnulib was omitted from |
| 3834 |
the 4.3 release package: I can't reproduce this but check for it. |
| 3835 |
|
| 3836 |
2020-05-02 Kevin Buettner <[email protected]> (tiny change) |
| 3837 |
|
| 3838 |
[SV 58232] Disable inheritance of jobserver FDs for recursive make |
| 3839 |
A parent make will invoke a sub-make with close-on-exec disabled for |
| 3840 |
the jobserver pipe FDs. Force close-on-exec to be to be enabled in |
| 3841 |
the sub-make so the pipe is not always passed to child jobs. |
| 3842 |
|
| 3843 |
I have a test case which, when invoked with a suitable -j switch, |
| 3844 |
will hang if the recipe inherits the jobserver pipe. This test case |
| 3845 |
was inspired by a real world case in which testing GDB on Fedora |
| 3846 |
would hang due to some poorly written test GDB cases having been |
| 3847 |
passed the jobserver file descriptors. |
| 3848 |
|
| 3849 |
* src/posixos.c (jobserver_parse_auth): Call fd_noinherit() for |
| 3850 |
jobserver pipe descriptors. |
| 3851 |
|
| 3852 |
2020-04-01 Paul Smith <[email protected]> |
| 3853 |
|
| 3854 |
[SV 57674] Use the system default PATH if $PATH is not set |
| 3855 |
When using execvp() if $PATH is not present in the environment |
| 3856 |
it will automatically search the system default PATH string. Emulate |
| 3857 |
this by passing the system default PATH to find_in_given_path() if |
| 3858 |
we don't find PATH in the environment. |
| 3859 |
|
| 3860 |
* src/job.c (child_execute_job): Use confstr(_CS_PATH) if PATH is not |
| 3861 |
found. |
| 3862 |
|
| 3863 |
2020-04-01 Paul Smith <[email protected]> |
| 3864 |
|
| 3865 |
tests: Simplify customization of %ENV |
| 3866 |
Rather than having an %extraENV that is added to the default %ENV |
| 3867 |
and resetting %ENV _before_ each test, allow the test setup to |
| 3868 |
modify %ENV directly as needed then reset %ENV _after_ each test. |
| 3869 |
|
| 3870 |
* tests/test_driver.pl: Remove unused %extraENV. |
| 3871 |
(resetENV): Don't add in %extraENV. |
| 3872 |
(_run_command): Reset after we run the command rather than before. |
| 3873 |
* tests/scripts/features/export: Convert %extraENV to %ENV |
| 3874 |
* tests/scripts/features/jobserver: Ditto |
| 3875 |
* tests/scripts/features/parallelism: Ditto |
| 3876 |
* tests/scripts/features/targetvars: Ditto |
| 3877 |
* tests/scripts/functions/eval: Ditto |
| 3878 |
* tests/scripts/functions/foreach: Ditto |
| 3879 |
* tests/scripts/functions/origin: Ditto |
| 3880 |
* tests/scripts/misc/general4: Ditto |
| 3881 |
* tests/scripts/options/dash-e: Ditto |
| 3882 |
* tests/scripts/targets/POSIX: Ditto |
| 3883 |
* tests/scripts/variables/GNUMAKEFLAGS: Ditto |
| 3884 |
* tests/scripts/variables/SHELL: Ditto |
| 3885 |
|
| 3886 |
2020-03-31 Jens Rehsack <[email protected]> (tiny change) |
| 3887 |
|
| 3888 |
* src/output.h: [WINDOWS32] [SV 57888] Use gnulib fcntl if available |
| 3889 |
If gnulib fcntl is available (for MinGW32) use it rather than our |
| 3890 |
homegrown version. |
| 3891 |
|
| 3892 |
* src/w32/compat/dirent.c: [SV 57888] Use gnulib opendir on MinGW32 |
| 3893 |
|
| 3894 |
* src/dir.c (local_stat): [WINDOWS32] Fix buffer-overflow warning. |
| 3895 |
[SV 57888] Provide space for the path to use MAXPATHLEN plus nul. |
| 3896 |
|
| 3897 |
2020-03-31 Paul Smith <[email protected]> |
| 3898 |
|
| 3899 |
[SV 57896] Change directories before checking jobserver auth |
| 3900 |
We want to process -C options as early as possible, before we might |
| 3901 |
write informational messages, so that Entering/Leaving messages have |
| 3902 |
the correct directory. |
| 3903 |
|
| 3904 |
* src/main.c (main): Move code dealing with changing directories |
| 3905 |
before parsing of the jobserver auth flag. |
| 3906 |
* tests/scripts/features/jobserver: Test the order of enter/leave. |
| 3907 |
|
| 3908 |
2020-03-31 Paul Smith <[email protected]> (tiny change) |
| 3909 |
|
| 3910 |
[SV 57967] Only set APPEND mode for regular files |
| 3911 |
APPEND is a permanent mode shared by all users of a file. If we |
| 3912 |
set it on a tty, pipe, etc. it will stay in effect even after make |
| 3913 |
exits, which can cause problems. |
| 3914 |
|
| 3915 |
Patch provided by [email protected] |
| 3916 |
|
| 3917 |
* src/output.c (set_append_mode): Check for a regular file. |
| 3918 |
|
| 3919 |
2020-03-31 Paul Smith <[email protected]> |
| 3920 |
|
| 3921 |
Obey order of multiple print/no-print directory options |
| 3922 |
Previously if --no-print-directory was seen anywhere even once |
| 3923 |
(environment, command line, etc.) it would always take precedence |
| 3924 |
over any --print-directory option. Change this so that the last |
| 3925 |
seen option (which will be the command line, if present there) takes |
| 3926 |
precedence. |
| 3927 |
|
| 3928 |
* NEWS: Mark this change in behavior. |
| 3929 |
* src/makeint.h (print_directory): A new variable to control printing. |
| 3930 |
* src/output.c (output_dump): Use the new variable. |
| 3931 |
(output_start): Ditto. |
| 3932 |
* src/main.c: Add a new variable print_directory. Use -1 for |
| 3933 |
print_directory_flag so we know of the option was seen or not. Add a |
| 3934 |
new default_print_directory_flag set to -1 to keep options from being |
| 3935 |
added. |
| 3936 |
(switches): Use flag_off for --no-print-directory, rather than a |
| 3937 |
separate inhibit_print_directory_flag. |
| 3938 |
(main): If print_directory_flag was set by the user, use that for |
| 3939 |
print_directory. If not, compute the print_directory value based on |
| 3940 |
-s, -C, and sub-makes as before. |
| 3941 |
* tests/scripts/variables/GNUMAKEFLAGS: -w is not added automatically |
| 3942 |
* tests/scripts/options/print-directory: Add tests for overriding |
| 3943 |
print-directory options. |
| 3944 |
|
| 3945 |
2020-03-29 Paul Smith <[email protected]> |
| 3946 |
|
| 3947 |
* NEWS: Update 4.3 with information on .SILENT / -s |
| 3948 |
|
| 3949 |
2020-02-29 Eli Zaretskii <[email protected]> |
| 3950 |
|
| 3951 |
* NEWS: Mention the new tcc support. |
| 3952 |
|
| 3953 |
2020-02-29 Christian Jullien <[email protected]> |
| 3954 |
|
| 3955 |
Add support for building with Tiny C for MS-Windows |
| 3956 |
* src/config.h.W32.template (HAVE_DIRECT_H, HAVE_STRCASECMP) |
| 3957 |
(HAVE_STRNCASECMP, HAVE_UMASK): Add __TINYC__ to MinGW condition. |
| 3958 |
(BATCH_MODE_ONLY_SHELL): Make this the default for Tiny C. |
| 3959 |
|
| 3960 |
* build_w32.bat: Support building with Tiny C's tcc compiler. |
| 3961 |
|
| 3962 |
2020-01-20 Paul Smith <[email protected]> |
| 3963 |
|
| 3964 |
Apply spelling corrections from Fossies spellcheck |
| 3965 |
See https://fossies.org/features.html#codespell |
| 3966 |
Spelling issues in Git commit messages or lib/* source are not applied. |
| 3967 |
|
| 3968 |
* README.OS2.template: Apply spelling corrections. |
| 3969 |
* README.VMS: Ditto. |
| 3970 |
* src/commands.c: Ditto. |
| 3971 |
* src/config.ami.template: Ditto. |
| 3972 |
* src/configh.dos.template: Ditto. |
| 3973 |
* src/job.c: Ditto. |
| 3974 |
* src/job.h: Ditto. |
| 3975 |
* src/read.c: Ditto. |
| 3976 |
* src/variable.c: Ditto. |
| 3977 |
* src/vms_exit.c: Ditto. |
| 3978 |
* src/vms_export_symbol.c: Ditto. |
| 3979 |
* src/vms_progname.c: Ditto. |
| 3980 |
* src/vmsfunctions.c: Ditto. |
| 3981 |
* src/vmsjobs.c: Ditto. |
| 3982 |
* src/w32/pathstuff.c: Ditto. |
| 3983 |
* tests/scripts/variables/automatic: Ditto. |
| 3984 |
* tests/test_driver.pl: Ditto. |
| 3985 |
|
| 3986 |
2020-01-20 Paul Smith <[email protected]> |
| 3987 |
|
| 3988 |
Update to GNU make 4.3.90 |
| 3989 |
* NEWS: Add a 4.3.90 section and update Savannah bug URL |
| 3990 |
* configure.ac (AC_INIT): Change release to 4.3.90 |
| 3991 |
|
| 3992 |
2020-01-19 Paul Smith <[email protected]> |
| 3993 |
|
| 3994 |
GNU Make release 4.3 |
| 3995 |
* NEWS: Update for the release |
| 3996 |
* configure.ac: New release number |
| 3997 |
* doc/make.texi: New edition number |
| 3998 |
|
| 3999 |
* configure.ac (guile): Check for Guile 3.0 installations |
| 4000 |
|
| 4001 |
* src/job.c (sh_cmds): [SV 57625] Update builtin shell command list |
| 4002 |
|
| 4003 |
Resolve some documentation issues |
| 4004 |
* doc/make.texi (Interrupts): [SV 46193] Recommend defensive recipes |
| 4005 |
* doc/make.texi: [SV 49262] Clarify interaction of prerequisites and |
| 4006 |
non-terminal match-anything rules. |
| 4007 |
|
| 4008 |
2020-01-19 Paul Smith <[email protected]> |
| 4009 |
|
| 4010 |
[SV 40657] Reinstate old behavior for suffix rules with prereqs |
| 4011 |
POSIX says that suffix rules cannot have prerequisites, but after |
| 4012 |
making this change we observed a number of makefiles "in the wild" |
| 4013 |
that were relying on this behavior and failed. |
| 4014 |
|
| 4015 |
For .POSIX: makefiles, obey POSIX. Otherwise preserve the old |
| 4016 |
behavior. However, generate a warning so users know this is a |
| 4017 |
problem. In a future version we will change all behavior to be |
| 4018 |
POSIX-conforming. |
| 4019 |
|
| 4020 |
* NEWS: describe the change |
| 4021 |
* src/rule.c (convert_to_pattern): If posix_pedantic don't make a |
| 4022 |
pattern rule if prereqs exist. Otherwise show a warning. |
| 4023 |
* tests/scripts/features/suffixrules: Add tests for the new behavior |
| 4024 |
including .POSIX vs. non-.POSIX. |
| 4025 |
|
| 4026 |
2020-01-05 Dmitry Goncharov <[email protected]> |
| 4027 |
|
| 4028 |
* tests/test_driver.pl: Enhance error messages |
| 4029 |
|
| 4030 |
2020-01-04 Paul Smith <[email protected]> |
| 4031 |
|
| 4032 |
* doc/make.texi: Change the GFDL to an Appendix |
| 4033 |
|
| 4034 |
* NEWS: Clarify authorship of new features. |
| 4035 |
|
| 4036 |
Enable compilation with C90 compilers |
| 4037 |
* configure.ac: Try compiling Guile headers: they don't work with C90. |
| 4038 |
* maintMakefile: Simplify config checks via target-specific variables. |
| 4039 |
* src/makeint.h: Use ATTRIBUTE rather than defining __attribute__, |
| 4040 |
as that causes compile issues with system headers. |
| 4041 |
(ENUM_BITFIELD): Don't use enum bitfields in ANSI mode. |
| 4042 |
* src/main.c: Use ATTRIBUTE instead of __attribute__. |
| 4043 |
* src/job.h: Ditto. |
| 4044 |
* src/file.c: Don't define variables inside for loops. |
| 4045 |
* src/rule.c: Ditto. |
| 4046 |
* src/dep.h (SI): Only use static inline in non-ANSI mode. |
| 4047 |
|
| 4048 |
2020-01-03 Paul Smith <[email protected]> |
| 4049 |
|
| 4050 |
* bootstrap: Update to the latest gnulib version |
| 4051 |
|
| 4052 |
Release GNU make 4.2.93 |
| 4053 |
* NEWS: Update the release and date |
| 4054 |
* configure.ac: Update the release number |
| 4055 |
|
| 4056 |
Update copyright statements for 2020 |
| 4057 |
|
| 4058 |
2020-01-03 Paul Smith <[email protected]> |
| 4059 |
|
| 4060 |
Support the .EXTRA_PREREQS special variable |
| 4061 |
Initial implementation by Christof Warlich <[email protected]> |
| 4062 |
|
| 4063 |
* NEWS: Announce the new feature. |
| 4064 |
* doc/make.texi (Other Special Variables): Document .EXTRA_PREREQS. |
| 4065 |
* src/dep.h (struct dep): New flag to note extra prereq deps. |
| 4066 |
* src/filedef.h (expand_extra_prereqs): Declare a function to expand |
| 4067 |
the value of .EXTRA_PREREQS. |
| 4068 |
* src/file.c (expand_extra_prereqs): Given a struct variable lookup |
| 4069 |
of .EXTRA_PREREQS, convert it into a list of deps and for each one |
| 4070 |
make sure it has a struct file and has the new flag set. |
| 4071 |
(snap_file): A new function invoked by hash_map that will perform |
| 4072 |
per-file operations: set up second expansion, intermediate, and also |
| 4073 |
.EXTRA_PREREQS. Manage circular dependencies by ignoring them. |
| 4074 |
(snap_deps): Defer per-file operations until the end. Look up the |
| 4075 |
global .EXTRA_PREREQS and pass it along to snap_file for each file. |
| 4076 |
* src/implicit.c (struct patdeps): Remember the extra prereqs flag. |
| 4077 |
(pattern_search): Transfer extra prereqs flag settings into the |
| 4078 |
matched pattern rule. |
| 4079 |
* src/rule.h (snap_implicit_rules): Rename count_implicit_rules to |
| 4080 |
snap_implicit_rules since we now do more than count. |
| 4081 |
* src/rule.c (snap_implicit_rules): As we walk through all the pattern |
| 4082 |
rules, add in any global .EXTRA_PREREQS to the dep list. Ensure we |
| 4083 |
take them into account for the max number of prereqs and name length. |
| 4084 |
* src/main.c (main): Add extra-prereqs to .FEATURES. |
| 4085 |
Call the renamed snap_implicit_rules. |
| 4086 |
* tests/scripts/variables/EXTRA_PREREQS: Add tests. |
| 4087 |
|
| 4088 |
2020-01-03 Paul Smith <[email protected]> |
| 4089 |
|
| 4090 |
* tests/scripts/features/patternrules: Use Windows-compatible quoting |
| 4091 |
|
| 4092 |
* tests/test_driver.pl: Compute full path to Perl interpreter |
| 4093 |
|
| 4094 |
* tests/scripts/features/exec: Don't use $ENV in the description |
| 4095 |
|
| 4096 |
* src/makeint.h: Add a declaration for memrchr() |
| 4097 |
|
| 4098 |
2019-12-27 Paul Smith <[email protected]> |
| 4099 |
|
| 4100 |
* NEWS: Remove info about disabled /proc/loadavg usage. |
| 4101 |
|
| 4102 |
2019-12-27 Paul Smith <[email protected]> |
| 4103 |
|
| 4104 |
[SV 57022] Avoid posix_spawn which fails asynchronously |
| 4105 |
Avoid using posix_spawn implementations that fail asynchronously when |
| 4106 |
the spawned program can't be invoked: this means instead of getting |
| 4107 |
an error such as "No such file or directory" we get just "Exit 127". |
| 4108 |
|
| 4109 |
Original implementation of the configure.ac macro provided by |
| 4110 |
Martin Dorey <[email protected]> |
| 4111 |
|
| 4112 |
Original implementation of the regression tests provided by |
| 4113 |
Dmitry Goncharov <[email protected]> |
| 4114 |
|
| 4115 |
* configure.ac: Test whether posix_spawn fails asynchronously. In a |
| 4116 |
cross-compilation environment, assume that it does not. If we detect |
| 4117 |
that it does, fall back to fork/exec. |
| 4118 |
* tests/scripts/features/exec: Add regression tests for different |
| 4119 |
shebang invocation methods. |
| 4120 |
|
| 4121 |
2019-12-26 Paul Smith <[email protected]> |
| 4122 |
|
| 4123 |
[SV 56655] Allow pattern expansion to contain spaces |
| 4124 |
* src/dep.h: Add a new flag PARSEFS_ONEWORD |
| 4125 |
* src/read.c (parse_file_seq): If PARSEFS_ONEWORD is given, treat the |
| 4126 |
entire incoming string as a single pattern. |
| 4127 |
* src/implicit.c (pattern_search): Pass PARSEFS_ONEWORD when parsing |
| 4128 |
patterns for wildcards. |
| 4129 |
* tests/scripts/features/patternrules: Add a new test. |
| 4130 |
|
| 4131 |
2019-12-18 Ben Wijen <[email protected]> |
| 4132 |
|
| 4133 |
* src/misc.c (spin): On WINDOWS32 use Sleep() instead of sleep() |
| 4134 |
|
| 4135 |
* bootstrap.bat: Fix typo in batch file name |
| 4136 |
|
| 4137 |
2019-12-18 Paul Smith <[email protected]> |
| 4138 |
|
| 4139 |
* src/config.h.W32.template: [SV 57152] MinGW32 doesn't support d_type |
| 4140 |
|
| 4141 |
2019-12-18 Jouke Witteveen <[email protected]> |
| 4142 |
|
| 4143 |
[SV 54161] Fix second expansion of $* for paths |
| 4144 |
If the stem matches a path containing a directory not just a |
| 4145 |
filename, make sure the second expansion of $* in the |
| 4146 |
prerequisites matches $* in the recipe. This requires using |
| 4147 |
$(*F) when replacing % in the first expansion to preserve the |
| 4148 |
simple filename. |
| 4149 |
|
| 4150 |
* src/implicit.c (pattern_search): If lastslash is set prepend |
| 4151 |
the directory onto the stem. Then use $(*F) when expanding %. |
| 4152 |
* tests/scripts/features/se_implicit: Add a test case |
| 4153 |
|
| 4154 |
2019-12-17 Jouke Witteveen <[email protected]> |
| 4155 |
|
| 4156 |
* src/implicit.c (pattern_search): Set lastslash correctly |
| 4157 |
If filename contained multiple slashes lastslash is wrongly set to 0. |
| 4158 |
* configure.ac: Check for the GNU memrchr() extension function. |
| 4159 |
* src/misc.c (memrchr): Supply memrchr() if not available. |
| 4160 |
|
| 4161 |
* src/implicit.c (pattern-search): Remove unneeded 'dir' variable |
| 4162 |
|
| 4163 |
2019-12-17 Paul Smith <[email protected]> |
| 4164 |
|
| 4165 |
* Makefile.am: Build lzip package instead of bzip2 |
| 4166 |
* README.git: Mention changed requirements. |
| 4167 |
|
| 4168 |
* src/job.c (load_too_high): Disable Linux /proc/loadavg for now |
| 4169 |
This new feature has a problem: if you provide a load which is |
| 4170 |
larger than the number of cores then it will always run every job. |
| 4171 |
Before we can enable it we need to at the least learn how to clamp |
| 4172 |
this value to the number of cores. To experiment with it, set |
| 4173 |
PROC_FD_INIT to -2 in job.c to re-enable the feature. |
| 4174 |
|
| 4175 |
* tests/run_make_tests.pl (set_more_defaults): Fix typo |
| 4176 |
|
| 4177 |
2019-12-16 Paul Smith <[email protected]> |
| 4178 |
|
| 4179 |
* tests/run_make_tests.pl (subst_make_string): Force use of / |
| 4180 |
On Windows the path to the helper tool will contain '\': this will |
| 4181 |
fail if recipes are run with a POSIX shell. Convert '\' to '/' |
| 4182 |
on Windows. While here, escape any spaces in the path as well. |
| 4183 |
|
| 4184 |
Rename jhelp.pl to thelp.pl and make it a generic test helper. |
| 4185 |
* tests/thelp.pl: Rename from tests/jhelp.pl. |
| 4186 |
(op): Use names instead of options for the operations. |
| 4187 |
(op): Add new operations for sleep, mkdir, and rm. |
| 4188 |
(op): Enhance wait to time out |
| 4189 |
* tests/run_make_tests.pl: Add a new #HELPER# replacement |
| 4190 |
(subst_make_string): Use fully-qualified path to thelp.pl |
| 4191 |
* tests/scripts/features/parallelism: Update to use thelp.pl |
| 4192 |
and the new named operations. Use thelp.pl sleep instead of |
| 4193 |
system-specific sleep commands. |
| 4194 |
* tests/scripts/features/output-sync: Update to use thelp.pl |
| 4195 |
instead of complex shell scripts. |
| 4196 |
* Makefile.am: Distribute tests/thelp.pl instead of tests/jhelp.pl |
| 4197 |
|
| 4198 |
2019-10-10 Paul Eggert <[email protected]> |
| 4199 |
|
| 4200 |
Port functions/shell test to Solaris 10 |
| 4201 |
* tests/scripts/functions/shell: Port exit-status calculation |
| 4202 |
to Solaris 10 with Perl 5.8.4. |
| 4203 |
|
| 4204 |
2019-10-08 Paul Smith <[email protected]> |
| 4205 |
|
| 4206 |
Release GNU make 4.2.92 |
| 4207 |
* NEWS: Update the release and date |
| 4208 |
* configure.ac: Update the release number |
| 4209 |
|
| 4210 |
2019-10-06 Paul Smith <[email protected]> |
| 4211 |
|
| 4212 |
* doc/make.text (Reading Makefiles): Rewrite to be more clear. |
| 4213 |
|
| 4214 |
2019-10-05 Paul Smith <[email protected]> |
| 4215 |
|
| 4216 |
* Makefile.am (check-regression): Use PERLFLAGS when running Perl |
| 4217 |
* maintMakefile: Set PERLFLAGS to enable warnings. |
| 4218 |
* tests/run_make_tests.pl: Clean up issues pointed out by perl -w. |
| 4219 |
|
| 4220 |
* tests/scripts/functions/wildcard: Skip slash tests for local glob. |
| 4221 |
|
| 4222 |
tests: Convert %CONFIG_FLAGS to get_config() |
| 4223 |
* tests/config-flags.pm.W32: Create a predefined Windows file. |
| 4224 |
* Makefile.am (test_FILES): Add it to the distribution. |
| 4225 |
* build_w32.bat: Install tests/config-flags.pm if not existing. |
| 4226 |
* tests/run_make_tests.pl (get_config): Create new function. |
| 4227 |
* tests/scripts/features/archives: Call get_config() rather than |
| 4228 |
using %CONFIG_FLAGS directly. |
| 4229 |
* tests/scripts/features/load: Ditto. |
| 4230 |
* tests/scripts/features/loadapi: Ditto. |
| 4231 |
* tests/scripts/functions/wildcard: Ditto. |
| 4232 |
|
| 4233 |
* src/hash.c (jhash_string): Don't read past end of string. |
| 4234 |
Original patch from Dmitry Goncharov <[email protected]>. |
| 4235 |
|
| 4236 |
* tests/run_make_tests.pl (valid_option): Add missing File::Spec |
| 4237 |
|
| 4238 |
2019-09-23 Paul Smith <[email protected]> |
| 4239 |
|
| 4240 |
* src/function.c (func_realpath) [AIX]: Remove trailing slashes. |
| 4241 |
|
| 4242 |
2019-09-22 Paul Smith <[email protected]> |
| 4243 |
|
| 4244 |
* tests/scripts/features/vpathplus: Fix output for big-endian systems. |
| 4245 |
Our hashing algorithm gives different ordering on LE vs BE systems. |
| 4246 |
Patch from Dmitry Goncharov <[email protected]>. |
| 4247 |
|
| 4248 |
2019-09-22 Florian Weimer <[email protected]> (tiny change) |
| 4249 |
|
| 4250 |
* configure.ac (HAVE_GETTIMEOFDAY): Avoid undeclared exit function. |
| 4251 |
|
| 4252 |
2019-09-22 Paul Smith <[email protected]> |
| 4253 |
|
| 4254 |
* test/test_driver.el (_run_with_timeout): Show error message. |
| 4255 |
|
| 4256 |
* job.c (child_error): Modify error message string. |
| 4257 |
This reverts commit 6264deece3bb77798240a906ceed79097adbcf48. |
| 4258 |
Further investigation discovers that the real issue is that |
| 4259 |
GNU Emacs compile mode doesn't have a matching regex for GNU |
| 4260 |
make error messages generated when targets fail. I submitted |
| 4261 |
a patch to GNU Emacs adding a matcher for compile mode. |
| 4262 |
|
| 4263 |
2019-09-21 Paul Smith <[email protected]> |
| 4264 |
|
| 4265 |
* tests: Convert from File::Spec::Functions to File::Spec. |
| 4266 |
Users report the Functions version doesn't work correctly for some |
| 4267 |
older versions of Perl. |
| 4268 |
|
| 4269 |
* tests/scripts/function/guile: Valgrind doesn't work with Guile. |
| 4270 |
|
| 4271 |
* src/job.c (child_execute_job): Allocate space for argv NULL. |
| 4272 |
|
| 4273 |
2019-09-21 Paul Smith <[email protected]> |
| 4274 |
|
| 4275 |
[SV 56918] Compute job slots properly on failing command |
| 4276 |
Ensure we properly reduce job_slots_used if a command fails because |
| 4277 |
it doesn't exist/can't be started. |
| 4278 |
|
| 4279 |
* src/job.h (struct child): Add a field jobslot to be set when using |
| 4280 |
a job slot. |
| 4281 |
* src/job.c (start_waiting_job): Remember if we are using a job slot. |
| 4282 |
(reap_children): Reduce number of job slots used by jobslot. |
| 4283 |
|
| 4284 |
2019-09-21 Paul Smith <[email protected]> |
| 4285 |
|
| 4286 |
* src/arscan.c (ar_scan): Restrict length for sscanf of ar_mode. |
| 4287 |
|
| 4288 |
* tests/scripts/functions/shell: Detect correct SHELLSTATUS code. |
| 4289 |
|
| 4290 |
* tests/run_make_test.pl: Fix support for valgrind. |
| 4291 |
Change the variable holding the make command to be a list that can |
| 4292 |
hold extra commands and options, not just a string. |
| 4293 |
|
| 4294 |
* tests/run_make_tests.pl (find_prog): Fix syntax error. |
| 4295 |
|
| 4296 |
2019-09-16 Paul Smith <[email protected]> |
| 4297 |
|
| 4298 |
* NEWS: Update date and clarify -l change. |
| 4299 |
|
| 4300 |
* tests/run_make_tests.pl: Create $scriptsuffix for Windows/VMS. |
| 4301 |
* tests/scripts/features/targetvars: Add a suffix to scripts. |
| 4302 |
* tests/scripts/misc/general4: Ditto. |
| 4303 |
|
| 4304 |
2019-09-16 Paul Smith <[email protected]> |
| 4305 |
|
| 4306 |
Refresh the test suite framework implementation. |
| 4307 |
Go through both run_make_tests.pl and test_driver.pl and slightly |
| 4308 |
modernize the Perl and clean up indentation etc. Fix a number of |
| 4309 |
warnings in the test scripts detected by running with -w. |
| 4310 |
|
| 4311 |
* tests/test_driver.pl: Move make error string detection out of the |
| 4312 |
base test driver. |
| 4313 |
(run_all_tests): Ensure that we always look for tests in the cwd. |
| 4314 |
* tests/run_make_tests.pl: Use File::Spec for path manipulations. |
| 4315 |
Correctly use setlocale() when detecting error strings. |
| 4316 |
Get configuration from the config-flags.pm file not config.status. |
| 4317 |
* tests/scripts/features/archives: Use new $cwddir variable. |
| 4318 |
* tests/scripts/features/reinvoke: Add missing semicolon. |
| 4319 |
* tests/scripts/features/vpath2: Avoid non-existent variable. |
| 4320 |
* tests/scripts/functions/foreach: Escape variables. |
| 4321 |
* tests/scripts/misc/bs-nl: Remove non-existing \v escape sequence. |
| 4322 |
* tests/scripts/misc/general4: Use handy create_file(). |
| 4323 |
* tests/scripts/options/dash-C: Use Cwd/$cwddir. |
| 4324 |
* tests/scripts/options/dash-I: Use subst_make_string() and #PWD#. |
| 4325 |
* tests/scripts/options/symlinks: Use File::Spec. |
| 4326 |
* tests/scripts/targets/DEFAULT: Use create_file and run_make_test. |
| 4327 |
* tests/scripts/variables/CURDIR: Use run_make_test. |
| 4328 |
* tests/scripts/variables/automatic: Remove extraneous "\". |
| 4329 |
* tests/scripts/vms/library: Remove extra "my" and extraneous "\". |
| 4330 |
|
| 4331 |
2019-09-16 Paul Smith <[email protected]> |
| 4332 |
|
| 4333 |
* tests/config-flags.pm.in: Add USE_SYSTEM_GLOB. |
| 4334 |
* tests/config_flags_pm.com [VMS]: Ditto. |
| 4335 |
|
| 4336 |
* README.git: [SV 56895] Provide more info about "maintainer mode". |
| 4337 |
* src/read.c (get_next_mword) [HAVE_DOS_PATHS]: Don't fall through to |
| 4338 |
parsing variable references if we find a drivespec in a word! |
| 4339 |
|
| 4340 |
* tests/test_driver.pl: Remember error for "running" a directory. |
| 4341 |
* tests/scripts/features/errors: Check errors "running" a directory. |
| 4342 |
|
| 4343 |
* src/job.c (child_execute_job): Use errno from find_in_given_path(). |
| 4344 |
* tests/test_driver.pl: Determine non-executable error message. |
| 4345 |
* tests/scripts/features/errors: Use the local non-executable error. |
| 4346 |
|
| 4347 |
* src/job.c (child_execute_job): Use newer gnulib findprog version. |
| 4348 |
|
| 4349 |
2019-09-10 Eli Zaretskii <[email protected]> |
| 4350 |
|
| 4351 |
Revert "[SV 56449] (Windows) Use slow path if '%' appears in the command" |
| 4352 |
This reverts commit 38e96eadea6e2cd42a0f414959bac327de9f468a. |
| 4353 |
Per discussion on Savannah, the modified behavior matches |
| 4354 |
the way % is handled in batch files, but not in cmd command |
| 4355 |
lines. And since Make mostly tries to emulate the command |
| 4356 |
line, the new behavior is unexpected and backward-incompatible. |
| 4357 |
|
| 4358 |
2019-09-09 Paul Smith <[email protected]> |
| 4359 |
|
| 4360 |
Rework the creation of build.sh so it's not a template. |
| 4361 |
* build.sh: Rename from build.template. Get the list of objects |
| 4362 |
from the Makefile. Move configure-replaced variables ... |
| 4363 |
* build.cfg.in: to this new .in file. |
| 4364 |
* configure.ac: Remove special handling of build.sh.in and add |
| 4365 |
build.cfg as a generated file. |
| 4366 |
* Makefile.am (EXTRA_DIST): Remove build.sh.in and add build.sh |
| 4367 |
and build.cfg.in for build.sh.in. |
| 4368 |
* maintMakefile: Remove handling for build.template. Treat |
| 4369 |
build.sh as a source file, not a generated file. |
| 4370 |
* .gitignore: Ignore generated build.cfg file. |
| 4371 |
|
| 4372 |
2019-09-08 Paul Smith <[email protected]> |
| 4373 |
|
| 4374 |
* gl/modules/make-glob: Move local glob configure.ac to here |
| 4375 |
* configure.ac: from here. |
| 4376 |
|
| 4377 |
2019-09-08 Paul Smith <[email protected]> |
| 4378 |
|
| 4379 |
[SV 56834] Support local PATH search with posix_spawnp |
| 4380 |
When using exec we install the child's environment before invoking |
| 4381 |
execlp(), so commands are found on the child's PATH. posix_spawnp |
| 4382 |
searches on the parent's PATH, which we don't want. |
| 4383 |
|
| 4384 |
Import gnulib's findprog-in module and use it to search the child's |
| 4385 |
PATH, then use posix_spawn() to run it. |
| 4386 |
|
| 4387 |
Also, posix_spawn() does not fall back to trying sh on ENOEXEC, as |
| 4388 |
execlp() does, so implement that as well. |
| 4389 |
|
| 4390 |
* bootstrap.conf: Add the findprog-in gnulib module |
| 4391 |
* src/job.c: Include findprog.h if we're using posix_spawn. |
| 4392 |
(start_job_command): Remove the handling of child->cmd_name, |
| 4393 |
(child_execute_job): and add it here. Look up the command to be |
| 4394 |
run in the child's path and invoke it if found. If it fails with |
| 4395 |
ENOEXEC then retry it as an argument to the default shell. |
| 4396 |
* tests/scripts/misc/general4: Test makefile PATH assignments. |
| 4397 |
* tests/scripts/features/targetvars: Ditto, for target variables. |
| 4398 |
|
| 4399 |
2019-09-07 Paul Smith <[email protected]> |
| 4400 |
|
| 4401 |
* doc/make.texi (Recipe Execution): Correct example to use $(<[DF]) |
| 4402 |
|
| 4403 |
* configure.ac: Check whether struct dirent has a d_type field |
| 4404 |
* src/dir.c (dir_contents_file_exists_p): Use the autoconf macro |
| 4405 |
HAVE_STRUCT_DIRENT_D_TYPE rather than relying on the GNU libc- |
| 4406 |
specific _DIRENT_HAVE_D_TYPE. |
| 4407 |
* lib/glob.c: Set HAVE_D_TYPE if HAVE_STRUCT_DIRENT_D_TYPE. |
| 4408 |
|
| 4409 |
* src/config.h.W32.template [W32]: Add support for dirent.d_type |
| 4410 |
* src/w32/include/dirent.h: Add DT_* values for dirent.d_type |
| 4411 |
(struct dirent): Add d_type |
| 4412 |
* src/w32/compat/durent.c (readdir): Set dirent.d_type based on |
| 4413 |
Windows file attributes. |
| 4414 |
|
| 4415 |
* src/makeint.h: Add typedef for mode_t if !HAVE_UMASK |
| 4416 |
|
| 4417 |
* build.template: Rewrite to allow gnulib support. |
| 4418 |
|
| 4419 |
* doc/make.texi: Clarify that the jobserver pipe is "blocking" |
| 4420 |
|
| 4421 |
2019-09-07 Paul Smith <[email protected]> |
| 4422 |
|
| 4423 |
Align child_execute_job among different ports |
| 4424 |
Create a struct childbase which is the basics of struct child needed |
| 4425 |
to invoke child_execute_job(), and can be cast back and forth to a |
| 4426 |
struct child. Ensure all implementations of child_execute_job() take |
| 4427 |
the same arguments. |
| 4428 |
|
| 4429 |
* src/job.h (CHILDBASE): Create a macro to hold the base parts. |
| 4430 |
(struct childbase): A structure containing CHILDBASE. |
| 4431 |
(struct child): Use CHILDBASE as the initial part of child. |
| 4432 |
[VMS]: Remove declaration of VMS version of child_execute_job. |
| 4433 |
* src/job.c (start_job_command): Use new child_execute_job() call. |
| 4434 |
(child_execute_job) [__EMX__]: Implement new calling signature. |
| 4435 |
(child_execute_job): Implement new calling signature. |
| 4436 |
* src/main.c (main) [__EMX__]: Use new child_execute_job() call. |
| 4437 |
* src/function.c (func_shell_base): Use new child_execute_job() call. |
| 4438 |
* src/vmsjobs.c (vmsHandleChildTerm): Accept struct childbase. |
| 4439 |
* src/vmsjobs.c (child_execute_job): Implement new calling signature. |
| 4440 |
Modify the return value to be pid_t, not a boolean, and return the |
| 4441 |
PID rather than setting it in the child. This is OK because our only |
| 4442 |
caller immediately reset PID to -1 anyway if we return 0. |
| 4443 |
|
| 4444 |
2019-09-07 Paul Smith <[email protected]> |
| 4445 |
|
| 4446 |
* doc/make.tex (Substitution Refs): Clarify patsubst relationship. |
| 4447 |
|
| 4448 |
* src/job.c (start_job_command) [VMS]: Correct VMS comment. |
| 4449 |
|
| 4450 |
2019-09-07 Paul Smith <[email protected]> |
| 4451 |
|
| 4452 |
Show useful errors when posix_spawn() doesn't do so |
| 4453 |
The posix_spawn() function may not detect that the command to run is |
| 4454 |
invalid when it's invoked. Instead, it will run then exit with |
| 4455 |
error code 127. If that happens do our best to present the user |
| 4456 |
with a useful error message. |
| 4457 |
|
| 4458 |
* src/job.h (struct child): Add cmd_name to hold the command we ran. |
| 4459 |
* src/job.c (start_job_command): On success, remember the cmd_name. |
| 4460 |
(reap_children): On exit 127, stat cmd_name and show a useful error. |
| 4461 |
(free_child): Free cmd_name. |
| 4462 |
|
| 4463 |
2019-09-07 Paul Smith <[email protected]> |
| 4464 |
|
| 4465 |
* README.git: Describe GCC and GNU make requirements |
| 4466 |
* maintMakefile: Put custom C flags into a separate variable |
| 4467 |
so they can be overridden more easily on the command line. |
| 4468 |
|
| 4469 |
* tests/scripts/features/archives: Fix expected long ar name output. |
| 4470 |
|
| 4471 |
* tetss/run_make_test.pl: Avoid 'sh -c' for Windows portability. |
| 4472 |
|
| 4473 |
Update to GNU make release candidate 4.2.91 |
| 4474 |
|
| 4475 |
* tests/scripts/functions/wildcard: Skip dangling symlink test. |
| 4476 |
The built-in glob implementation does not correctly handle dangling |
| 4477 |
symlinks. This needs to be fixed by switching to the latest glob |
| 4478 |
implementation from gnulib but that's a big job: for now avoid the |
| 4479 |
test if we know it will fail. |
| 4480 |
|
| 4481 |
* maintMakefile: Use check-local when testing build.sh. |
| 4482 |
Running 'make check' will rebuild 'make' so we're not testing the |
| 4483 |
build.sh-generated make binary. |
| 4484 |
|
| 4485 |
2019-09-07 Paul Smith <[email protected]> |
| 4486 |
|
| 4487 |
Don't reset stack size when using posix_spawn() |
| 4488 |
There's no way to run setrlimit() from posix_spawn() so we can't reset |
| 4489 |
the stack limit in children; thus, don't change it in the parent. |
| 4490 |
|
| 4491 |
* src/makeint.h (SET_STACK_SIZE): Don't set this when HAVE_POSIX_SPAWN. |
| 4492 |
* src/job.c (child_execute_job): Remove useless comment. |
| 4493 |
|
| 4494 |
2019-09-07 Paul Smith <[email protected]> |
| 4495 |
|
| 4496 |
* configure.ac: Remove redundant getloadavg gnulib support |
| 4497 |
|
| 4498 |
* src/dir.c (dir_setup_glob): Initialize unused gl_offs. |
| 4499 |
* tests/scripts/functions/wildcard: Add trailing slash tests. |
| 4500 |
Initial changes by Dmitry Goncharov <[email protected]> |
| 4501 |
|
| 4502 |
2019-09-02 Paul Eggert <[email protected]> |
| 4503 |
|
| 4504 |
Pacify Oracle Studio c99 |
| 4505 |
* src/dep.h (DEP): |
| 4506 |
* src/function.c (struct function_table_entry): |
| 4507 |
Use unsigned int, not unsigned short. Without this patch, c99 |
| 4508 |
complains ‘warning: nonportable bit-field type’. |
| 4509 |
|
| 4510 |
Port grouped_targets test to Solaris 10 |
| 4511 |
* tests/scripts/features/grouped_targets: Use ‘printf ''’ |
| 4512 |
instead of ‘echo -n’, as POSIX says the latter is not portable. |
| 4513 |
|
| 4514 |
Remove useless code in eval |
| 4515 |
* src/read.c (eval): Remove useless code. Without this patch, |
| 4516 |
Oracle Studio 12.6 complains ‘"src/read.c", line 1405: warning: |
| 4517 |
loop not entered at top’. |
| 4518 |
|
| 4519 |
Pacify Oracle Studio 12.6 in init_switches |
| 4520 |
* src/main.c (init_switches): Use a cast to convert char const * |
| 4521 |
to char *. Without this patch, the compiler complains |
| 4522 |
‘"src/main.c", line 2643: warning: assignment type mismatch: |
| 4523 |
pointer to char "=" pointer to const char’. |
| 4524 |
|
| 4525 |
Pacify Oracle Studio 12.6 |
| 4526 |
* src/arscan.c [VMS]: Use ‘#if !defined LBR$_HDRTRUNC’ instead |
| 4527 |
of ‘#ifndef LBR$_HDRTRUNC’ to pacify Oracle Studio 12.6, which |
| 4528 |
looks inside unused #if branches for preprocessor syntax errors. |
| 4529 |
Without this patch it complains ‘"src/arscan.c", line 43: warning: |
| 4530 |
tokens ignored at end of directive line’. |
| 4531 |
|
| 4532 |
2019-09-02 Paul Smith <[email protected]> |
| 4533 |
|
| 4534 |
* NEWS: Fix incorrect notes. |
| 4535 |
|
| 4536 |
* src/read.c (parse_file_seq): [SV 52076] Don't reverse glob() results. |
| 4537 |
|
| 4538 |
2019-08-28 Eli Zaretskii <[email protected]> |
| 4539 |
|
| 4540 |
Fix MS-Windows MinGW build |
| 4541 |
* src/w32/subproc/sub_proc.c (process_wait_for_multiple_objects): |
| 4542 |
Fix format specifier for GetLastError's value. |
| 4543 |
|
| 4544 |
* src/job.c (reap_children): Define the 'remote_status_lose' label |
| 4545 |
only for Posix platforms, to avoid compiler warning. |
| 4546 |
|
| 4547 |
* build_w32.bat (LNKOUT): New variable, using forward slashes. |
| 4548 |
Use forward slashes in calls to :Compile, so that linking with GNU |
| 4549 |
ld works. |
| 4550 |
|
| 4551 |
* src/makeint.h [!HAVE_UMASK]: Prototype for 'umask'. |
| 4552 |
(UMASK, MODE_T): Don't define. |
| 4553 |
|
| 4554 |
* src/misc.c (get_tmpfile): Don't call UMASK, call umask, to |
| 4555 |
avoid compilation warning on !HAVE_UMASK platforms. |
| 4556 |
* src/output.c (output_tmpfd): Likewise. |
| 4557 |
|
| 4558 |
* src/misc.c (umask) [!HAVE_UMASK]: New no-op function. |
| 4559 |
|
| 4560 |
* src/config.h.W32.template (__USE_MINGW_ANSI_STDIO) |
| 4561 |
[__MINGW32__]: Define to 1, to force Make use ANSI-compatible |
| 4562 |
stdio functions, which also support the non-standard 'Id' and 'Ix' |
| 4563 |
specifiers. |
| 4564 |
(HAVE_UMASK) [__MINGW32__]: Define to 1. |
| 4565 |
|
| 4566 |
* src/arscan.c (ar_member_touch): Type-cast argument of strlen to |
| 4567 |
avoid compiler warnings. |
| 4568 |
|
| 4569 |
2019-08-26 Paul Smith <[email protected]> |
| 4570 |
|
| 4571 |
* NEWS: Update for pre-release |
| 4572 |
|
| 4573 |
2019-08-26 Paul Smith <[email protected]> |
| 4574 |
|
| 4575 |
Update maintainer mode to support debug wait points. |
| 4576 |
Make a spin() method available when compiled in maintainer mode. |
| 4577 |
If a file exists in the working directory with a specific name, |
| 4578 |
make will sleep until the file is deleted. |
| 4579 |
|
| 4580 |
Ensure that maintainer mode is enabled on Windows, using the same |
| 4581 |
algorithm we use on POSIX / autoconf systems. |
| 4582 |
|
| 4583 |
* build_w32.bat: If maintMakefile exists, enable maintainer mode. |
| 4584 |
* src/main.c (main): Replace Windows-only suspend flag with spin(). |
| 4585 |
* src/makeint.h: A SPIN() macro calls spin() in maintainer mode. |
| 4586 |
* src/misc.c (spin): If a spin file exists sleep until it's deleted. |
| 4587 |
|
| 4588 |
2019-08-26 Paul Smith <[email protected]> |
| 4589 |
|
| 4590 |
* tests/scripts/features/archives: [SV 54395] Support non-GNU ar. |
| 4591 |
|
| 4592 |
* tests/scripts/misc/general3: Add more tests for SHELL/.SHELLFLAGS |
| 4593 |
|
| 4594 |
2019-08-25 Paul Smith <[email protected]> |
| 4595 |
|
| 4596 |
* src/job.c (construct_command_argv): Remove unused VMS code |
| 4597 |
|
| 4598 |
* src/job.c (child_execute_job): Set pid to -1 on posix_spawn failure. |
| 4599 |
|
| 4600 |
2019-08-24 Paul Smith <[email protected]> |
| 4601 |
|
| 4602 |
* bootstrap: Update from latest gnulib version |
| 4603 |
|
| 4604 |
* scripts/copyright-update: Use git ls-files for controlled files |
| 4605 |
|
| 4606 |
* po/LINGUAS: Add a translation for Bulgarian. |
| 4607 |
|
| 4608 |
2019-07-14 Christian Eggers <[email protected]> (tiny change) |
| 4609 |
|
| 4610 |
[SV 56449] (Windows) Use slow path if '%' appears in the command |
| 4611 |
* src/job.c (sh_chars_dos): Add '%' as a special character |
| 4612 |
* src/job.c (construct_command_argv_internal): Check for '%' in quotes |
| 4613 |
|
| 4614 |
For the windows version of make, a recipe line cannot be executed |
| 4615 |
diretly by make (without a shell) if a '%' character is present. This |
| 4616 |
character starts a cmd.exe escape sequence. |
| 4617 |
|
| 4618 |
2019-07-14 Paul Smith <[email protected]> |
| 4619 |
|
| 4620 |
* src/read.c (parse_file_seq): Update comments. |
| 4621 |
|
| 4622 |
2019-07-13 Mike Haboustak <[email protected]> (tiny change) |
| 4623 |
|
| 4624 |
[SV 28456] Don't override $< when no default rule has been defined |
| 4625 |
The check for matching a file's command to the default rule's command |
| 4626 |
does not account for null. If no .DEFAULT is defined a rule with no |
| 4627 |
recipe has it's $< variable set to the value of $@. This breaks second |
| 4628 |
expansion, particularly when used with pattern rules. |
| 4629 |
|
| 4630 |
* src/commands.c [set_file_variables]: Check that cmds is set |
| 4631 |
* tests/scripts/features/se_explicit: Test case |
| 4632 |
* tests/scripts/features/se_implicit: Test case |
| 4633 |
|
| 4634 |
2019-07-13 Paul Smith <[email protected]> |
| 4635 |
|
| 4636 |
Switch to the gnulib version of strerror() |
| 4637 |
* bootstrap.conf: Add strerror module |
| 4638 |
* configure.ac: Remove strerror check |
| 4639 |
* src/misc.c: Remove local strerror() implementation |
| 4640 |
* src/config.ami.template: Remove HAVE_STRERROR |
| 4641 |
* src/config.h-vms.template: Ditto. |
| 4642 |
* src/config.h.W32.template: Ditto. |
| 4643 |
|
| 4644 |
2019-05-19 Paul Smith <[email protected]> |
| 4645 |
|
| 4646 |
* doc/make.texi: [SV 51974] Clarify makefile parsing operations. |
| 4647 |
|
| 4648 |
* doc/make.texi: [SV 54116] Document whitespace removal trick. |
| 4649 |
Discovered and explained by Michael Henry <[email protected]> |
| 4650 |
* tests/scripts/variables/flavors: Add a test to preserve the behavior. |
| 4651 |
|
| 4652 |
2019-05-19 Paul Smith <[email protected]> |
| 4653 |
|
| 4654 |
[SV 46013] Allow recursive variable overrides from Makefiles |
| 4655 |
Ensure that variable overrides are passed to recursive make instances |
| 4656 |
even if no overrides were provided on the command line. |
| 4657 |
Fix suggested by Rici Lake <[email protected]> |
| 4658 |
|
| 4659 |
* src/main.c (define_makeflags): Add overrides without respect to the |
| 4660 |
value of command_variables. |
| 4661 |
* tests/scripts/features/recursion: Add a test. |
| 4662 |
|
| 4663 |
2019-05-19 Paul Smith <[email protected]> |
| 4664 |
|
| 4665 |
Update developer customizations |
| 4666 |
* .ccls: Remove -std=c99: it disables __attribute__ causing warnings. |
| 4667 |
* .dir-locals.el: Force the C coding style to "gnu". |
| 4668 |
* make-gdb.py: Add GDB macros for pretty-printing GNU make structs. |
| 4669 |
* scripts/copyright-update: Use GNULIB_SRCDIR to find update-copyright. |
| 4670 |
|
| 4671 |
2019-05-19 Paul Smith <[email protected]> |
| 4672 |
|
| 4673 |
[SV 54549] Don't free used set_lists during merge |
| 4674 |
When merging the variable_set_lists for two targets it could be |
| 4675 |
that the "from" set list is a subset of the "to" set list: check |
| 4676 |
for this situation to avoid freeing used memory. |
| 4677 |
|
| 4678 |
* src/variable.c (merge_variable_set_lists): Walk the "to" list and |
| 4679 |
if the "from" list is contained in it, nothing to do. |
| 4680 |
* tests/scripts/features/se_explicit: Add a test. |
| 4681 |
|
| 4682 |
2019-05-19 Paul Smith <[email protected]> |
| 4683 |
|
| 4684 |
* src/hash.c (jash_string): [SV 54980] Avoid ASAN error |
| 4685 |
|
| 4686 |
2019-05-19 Paul Smith <[email protected]> |
| 4687 |
|
| 4688 |
[SV 54740] Ensure .SILENT settings do not leak into sub-makes |
| 4689 |
Create a new variable run_silent to hold the current instance's global |
| 4690 |
silence setting, allowing silent_flag to represent only whether the -s |
| 4691 |
option was provided on the command line. |
| 4692 |
|
| 4693 |
* src/makeint.h: Change silent_flag variable to run_silent. |
| 4694 |
* src/job.c: Ditto. |
| 4695 |
* src/remake.c: Ditto. |
| 4696 |
* src/file.c: Ditto. |
| 4697 |
* src/main.c: Add a new global variable run_silent. |
| 4698 |
(decode_switches): After switches are decoded, initialize run_silent. |
| 4699 |
* tests/scripts/targets/SILENT: Add a test for recursive behavior. |
| 4700 |
|
| 4701 |
2019-05-19 Paul Smith <[email protected]> |
| 4702 |
|
| 4703 |
Update copyright statements for 2019 |
| 4704 |
|
| 4705 |
2019-05-12 Kaz Kylheku <[email protected]> |
| 4706 |
|
| 4707 |
[SV 8297] Implement "grouped targets" for explicit rules. |
| 4708 |
This patch allows "grouped targets" using the &: syntax: |
| 4709 |
|
| 4710 |
tgt1 tgt2 ... tgtn &: pre1 pre2 ... |
| 4711 |
recipe |
| 4712 |
|
| 4713 |
When the &: separator is used (in single or double colon forms), all |
| 4714 |
the targets are understood to be built by a single invocation of the |
| 4715 |
recipe. This is accomplished by piggy-backing on the already-existing |
| 4716 |
pattern rule feature, using the file's "also_make" list. |
| 4717 |
|
| 4718 |
* NEWS: Add information about grouped targets. |
| 4719 |
* doc/make.texi (Multiple Targets): Add information on grouped targets. |
| 4720 |
(Pattern Intro): Refer to the new section to discuss multiple patterns. |
| 4721 |
* src/main.c (main): Add "grouped-targets" to .FEATURES |
| 4722 |
* src/read.c (make_word_type): Add new types for &: and &::. |
| 4723 |
(eval): Recognize the &: and &:: separator and remember when used. |
| 4724 |
(record_files): Accept an indicator of whether the rule is grouped. |
| 4725 |
If so, update also_make for each file to depend on the other files. |
| 4726 |
(get_next_mword): Recognize the &: and &:: word types. |
| 4727 |
* tests/scripts/features/grouped_targets: New test script. |
| 4728 |
* AUTHORS: Add Kaz Kylheku |
| 4729 |
|
| 4730 |
2019-05-12 Paul Smith <[email protected]> |
| 4731 |
|
| 4732 |
* variable.c (define_variable_in_set): Clear new structs |
| 4733 |
|
| 4734 |
* po/LINGUAS: Add Portuguese translation |
| 4735 |
|
| 4736 |
Add developer customizations |
| 4737 |
* .ccls: Configure the ccls LSP server |
| 4738 |
* .dir-locals.el: Reset some parameters for ccls and lsp-mode |
| 4739 |
* .gitignore: Update for GTAGS and ccls |
| 4740 |
* maintMakefile: Don't search hidden directories for sources |
| 4741 |
|
| 4742 |
2018-09-16 Paul Smith <[email protected]> |
| 4743 |
|
| 4744 |
* src/arscan.c (ar_member_touch): [SV 54533] Stop \0 in archive headers |
| 4745 |
|
| 4746 |
Change output_write() to writebuf(), add readbuf() helper. |
| 4747 |
* src/misc.c (writebuf, readbuf): Create helper functions that will |
| 4748 |
reliably write a buffer to a file descriptor in the face of EINTR |
| 4749 |
causing short writes, and read from a file descriptor into a buffer |
| 4750 |
in the face of EINTR causing short reads. |
| 4751 |
* src/makeint.h: Declare these functions. |
| 4752 |
* src/output.c: Remove output_write() and replace with writebuf(). |
| 4753 |
(_outputs, out_of_memory): Call writebuf(), not output_write(). |
| 4754 |
* src/arscan.c (ar_scan): Call readbuf() instead of read(2). |
| 4755 |
(ar_member_touch): Remove duplicate header write, call writebuf() |
| 4756 |
instead of output_write(), and readbuf() instead of read(2). |
| 4757 |
|
| 4758 |
2018-09-15 Paul Smith <[email protected]> |
| 4759 |
|
| 4760 |
* doc/make.texi (Remaking Makefiles): [SV 52273] Note MAKE_RESTARTS |
| 4761 |
|
| 4762 |
* src/main.c (main): Set jobserver permissions before re-execing |
| 4763 |
Fixes an issue seen in the Linux kernel build system, reported by |
| 4764 |
Masahiro Yamada <[email protected]>. Fix suggested |
| 4765 |
on the bug-make mailing list by Mike Shal <[email protected]>. |
| 4766 |
* tests/scripts/features/parallelism: Add a test to verify this. |
| 4767 |
|
| 4768 |
* doc/make.texi: [SV 48970] Clarify the value of $? |
| 4769 |
|
| 4770 |
* doc/make.text: [SV 54360] Weaken "obsolete" language in the manual. |
| 4771 |
There's no need to frighten users away from capabilities which are |
| 4772 |
perfectly reasonable and definitely not going away, by calling them |
| 4773 |
obsolete or discouraged in the manual. |
| 4774 |
|
| 4775 |
[SV 40657] Don't create pattern rules for suffix rules with deps. |
| 4776 |
* NEWS: Update with a backward-compatibility warning. |
| 4777 |
* src/rule.c (convert_to_pattern): If a suffix rule has dependencies, |
| 4778 |
do not create a pattern rule for it. According to the manual suffix |
| 4779 |
rules with prerequisites are treated as normal targets. |
| 4780 |
* tests/scrips/features/suffixrules: Create some regression tests for |
| 4781 |
.SUFFIXES and suffix rules. |
| 4782 |
|
| 4783 |
2018-08-04 Paul Smith <[email protected]> |
| 4784 |
|
| 4785 |
* NEWS: Update for the latest changes. |
| 4786 |
|
| 4787 |
2018-08-04 Paul Smith <[email protected]> |
| 4788 |
|
| 4789 |
[SV 54233] Preserve higher command_state values on also_make targets. |
| 4790 |
If multiple pattern rules have the same pattern as also-make targets |
| 4791 |
and we attempt to run them at the same time, we might downgrade the |
| 4792 |
command state from 'running' to 'deps_running'; this will prevent |
| 4793 |
that also_make from being considered complete causing make to wait |
| 4794 |
forever for it to finish. |
| 4795 |
|
| 4796 |
Ensure that set_command_state never downgrades the state of a target. |
| 4797 |
|
| 4798 |
* src/file.c (set_command_state): Don't downgrade command_state. |
| 4799 |
* src/filedef.h (struct file): Document the order prerequisite. |
| 4800 |
* test/scripts/features/patternrules: Test the behavior. |
| 4801 |
|
| 4802 |
2018-08-04 Paul Smith <[email protected]> |
| 4803 |
|
| 4804 |
* src/job.c (reap_children): Fix inverted win/lose message. |
| 4805 |
|
| 4806 |
* tests/scripts/functions/wildcard: [SV 52018] Test dangling symlink. |
| 4807 |
|
| 4808 |
2018-08-04 Bernhard M. Wiedemann <[email protected]> |
| 4809 |
|
| 4810 |
* src/read.c (parse_file_seq): [SV 52076] Sort wildcard results. |
| 4811 |
|
| 4812 |
2018-08-04 Paul Smith <[email protected]> |
| 4813 |
|
| 4814 |
* tests/scripts/features/archives: [SV 54395] Test long archive names. |
| 4815 |
|
| 4816 |
2018-08-04 Ben Hutchings <[email protected]> |
| 4817 |
|
| 4818 |
* src/arscan.c (ar_scan): [SV 54395] Allow long names in archives. |
| 4819 |
Commit bc9d72beb0cb "Resolve issues discovered by static code |
| 4820 |
analysis." added range checks on archive member name length. However, |
| 4821 |
on non-AIX systems it also checked BSD-style long names against the |
| 4822 |
short name limits and and checked the *offset* for GNU-style long |
| 4823 |
names against the short name limits. This caused valid long names to |
| 4824 |
be rejected. |
| 4825 |
|
| 4826 |
* Record the size of the GNU name map and validate offsets against it |
| 4827 |
* Ensure that the last entry in the name map is null-terminated |
| 4828 |
* Apply a maximum length of INT_MAX for element sizes |
| 4829 |
|
| 4830 |
Reported-by: Philipp Wolski <[email protected]> |
| 4831 |
|
| 4832 |
2018-08-04 Paul Smith <[email protected]> |
| 4833 |
|
| 4834 |
* lib/glob.c (glob_in_dir): [SV 53465] Allow symlinks to directories. |
| 4835 |
Fix from Rich Felker <[email protected]> on the musl mailing list. |
| 4836 |
* tests/scripts/functions/wildcard: Create a regression test for this. |
| 4837 |
|
| 4838 |
* configure.ac: Add --disable-posix-spawn option |
| 4839 |
* maintMakefile: Add a test for the option |
| 4840 |
* src/job.c: Change HAVE_* preprocessor checks to USE_POSIX_SPAWN |
| 4841 |
|
| 4842 |
* src/job.c (child_execute_job): Clean up posix_spawn invocation |
| 4843 |
|
| 4844 |
2018-08-04 Aron Barath <[email protected]> |
| 4845 |
|
| 4846 |
* job.c (child_execute_job): Prefer posix_spawn() over fork()/exec() |
| 4847 |
|
| 4848 |
2018-08-04 Paul Smith <[email protected]> |
| 4849 |
|
| 4850 |
Clean up errors for invalid commands and add regression tests. |
| 4851 |
* src/function.c (func_shell_base): Use error() instead of recreating |
| 4852 |
the error output. |
| 4853 |
* src/job.c (exec_command): Show more standard error messages. |
| 4854 |
* src/load.c (unload_file): Fix whitespace in the error message. |
| 4855 |
* tests/scripts/features/errors: Add tests for starting non- |
| 4856 |
existent commands and new error message formats. |
| 4857 |
* tests/scripts/features/output-sync: New error message formats. |
| 4858 |
* tests/scripts/functions/shell: Ditto. |
| 4859 |
|
| 4860 |
2018-08-04 Paul Smith <[email protected]> |
| 4861 |
|
| 4862 |
Queue failed fork() (etc.) to be handled like any other failed job. |
| 4863 |
If we failed to fork() we were essentially exiting make immediately |
| 4864 |
without respect to ignore flags, etc. On one hand that makes sense |
| 4865 |
because if you can't fork you're in real trouble, but it doesn't |
| 4866 |
work so well on systems where we don't fork at all. Instead, treat |
| 4867 |
a fork error like any other error by delaying the handling until |
| 4868 |
the next call to reap_children(). Any child with a PID of -1 is |
| 4869 |
considered to have died before starting so check these first without |
| 4870 |
waiting for them. |
| 4871 |
|
| 4872 |
* src/commands.c (fatal_error_signal): Don't kill children that |
| 4873 |
never started. |
| 4874 |
* src/function.c (func_shell_base): Handle cleanup properly if the |
| 4875 |
child doesn't start. |
| 4876 |
* src/job.c (reap_children): Check for children that died before |
| 4877 |
starting and handle them without waiting for the PID. |
| 4878 |
(start_job_command): Free memory when the child doesn't start. |
| 4879 |
(start_waiting_job): Don't manage children who never started. |
| 4880 |
(child_execute_job): If the fork fails return PID -1. |
| 4881 |
* src/vmsjobs.c: Check for children that never started. |
| 4882 |
* tests/run_make_tests.pl: Parse config.status to get all options. |
| 4883 |
|
| 4884 |
2018-08-02 Aron Barath <[email protected]> |
| 4885 |
|
| 4886 |
* configure.ac: Check for posix_spawnattr_setsigmask |
| 4887 |
|
| 4888 |
* configure.ac: Check for spawn.h and posix_spawn() |
| 4889 |
|
| 4890 |
* src/makeint.h: Use pid_t to store PIDs, of int. |
| 4891 |
* src/commands.c (getpid): Ditto. |
| 4892 |
* src/job.h (*): Ditto. |
| 4893 |
* src/job.c (*): Ditto. |
| 4894 |
* src/main.c (main): Ditto. |
| 4895 |
* src/remote-cstms.c (start_remote_job): Ditto. |
| 4896 |
* src/remote-stub.c (start_remote_job): Ditto. |
| 4897 |
|
| 4898 |
2018-08-02 [email protected] <[email protected]> (tiny change) |
| 4899 |
|
| 4900 |
* src/dir.c: Preserve glob d_type field |
| 4901 |
When using GNU make on a system with glibc glob a pattern ending in |
| 4902 |
a slash is also matching regular files, but only in subdirectories: |
| 4903 |
|
| 4904 |
$ mkdir -p dir/subdir |
| 4905 |
$ cd dir |
| 4906 |
$ touch file1 subdir/file2 |
| 4907 |
$ echo 'test:; @echo $(wildcard */ */*/)' | make -f - |
| 4908 |
subdir/ subdir/file2 |
| 4909 |
$ echo 'test: */ */*/; @echo "$?" != */ */*/' | make -f - |
| 4910 |
subdir/ subdir/file2 != subdir/ */*/ |
| 4911 |
|
| 4912 |
It happens because in the gl->gl_readdir callback supplied to glob(), |
| 4913 |
dirent->d_type is set to DT_UNKNOWN, and the glob() implementation |
| 4914 |
in glibc assumes that such a directory entry *cannot* possibly be a |
| 4915 |
regular file. |
| 4916 |
|
| 4917 |
Pass the actual d_type down to glob(); this is the right thing to do |
| 4918 |
even if glibc is fixed, because it saves an extra stat() syscall for |
| 4919 |
each dirent. |
| 4920 |
|
| 4921 |
2018-08-02 Paul Smith <[email protected]> |
| 4922 |
|
| 4923 |
* src/read.c(unescape_char): Use C comments not C++ comments. |
| 4924 |
* src/posixos.c(set_blocking): Ditto. |
| 4925 |
* src/w32/subproc/sub_proc.c(process_init): Ditto |
| 4926 |
|
| 4927 |
Enhance the Basic.mk environment to work with Gnulib |
| 4928 |
* maintMakefile: Omit generated headers from Basic.mk prerequisites. |
| 4929 |
* Basic.mk.template: Rework commands to use with $(call ...) macros. |
| 4930 |
* mk/Amiga.mk: Ditto. |
| 4931 |
* mk/VMS.mk: Ditto. |
| 4932 |
* mk/Windows32.mk: Ditto, plus P2W to convert POSIX to Windows paths. |
| 4933 |
* mk/msdosdjgpp.mk: Ditto. |
| 4934 |
|
| 4935 |
2018-07-02 Paul Smith <[email protected]> |
| 4936 |
|
| 4937 |
Resolve most of the Windows Visual Studio warnings. |
| 4938 |
* Convert integer types to size_t where necessary. |
| 4939 |
* Align other integral types to avoid casts and type warnings. |
| 4940 |
|
| 4941 |
2018-07-02 Paul Smith <[email protected]> |
| 4942 |
|
| 4943 |
Update regression tests for Windows. |
| 4944 |
* tests/scripts/features/jobserver: Windows doesn't use pipes |
| 4945 |
* tests/scripts/functions/shell: Don't test kill -2 on Windows |
| 4946 |
* tests/scripts/misc/bs-nl: Windows doesn't handle single quotes |
| 4947 |
* tests/scripts/misc/general3: Ditto. |
| 4948 |
|
| 4949 |
* maintMakefile: Preserve comments during compilation |
| 4950 |
|
| 4951 |
* function.c(abspath): Use memcpy() to avoid GCC 8.1 warnings |
| 4952 |
|
| 4953 |
2018-07-02 Paul Smith <[email protected]> |
| 4954 |
|
| 4955 |
Convert GNU make to use the gnulib portability library |
| 4956 |
Move content from glob/* and config/* into standard GNU directory |
| 4957 |
locations lib/* and m4/*. |
| 4958 |
|
| 4959 |
Install the gnulib bootstrap script and its configuration file, and |
| 4960 |
create a bootstrap.bat file for Windows. Update the README.git file |
| 4961 |
with new requirements and instructions for building from Git. |
| 4962 |
|
| 4963 |
At this point we only install the alloca, getloadavg, and FDL modules |
| 4964 |
from gnulib. We keep our old glob/fnmatch implementation since the |
| 4965 |
gnulib versions require significant amounts of infrastructure which |
| 4966 |
doesn't exist on Windows yet. Further work is required here. |
| 4967 |
|
| 4968 |
Due to a problem with gnulib's version of getloadavg, we need to bump |
| 4969 |
the minimum required version of automake to 1.16.1 unfortunately. |
| 4970 |
|
| 4971 |
* README.git: Update instructions |
| 4972 |
* NEWS: Move developer news to a separate section |
| 4973 |
* configure.ac: Update for use with gnulib modules |
| 4974 |
|
| 4975 |
* bootstrap: Bootstrap from Git workspace (import from gnulib) |
| 4976 |
* bootstrap.conf: Bootstrap configuration for GNU make |
| 4977 |
* bootstrap.bat: Bootstrap from Git workspace for Windows |
| 4978 |
* gl/modules/make-glob: Support our local fnmatch/glob implementation |
| 4979 |
|
| 4980 |
* config/acinclude.m4: Move to m4/ |
| 4981 |
* config/dospaths.m4: Move to m4/ |
| 4982 |
* glob/fnmatch.c: Move to lib/ |
| 4983 |
* glob/fnmatch.h.in: Move to lib/ |
| 4984 |
* glob/glob.c: Move to lib/ |
| 4985 |
* glob/glob.h.in: Move to lib/ |
| 4986 |
|
| 4987 |
* Makefile.am: Update for new directories |
| 4988 |
* build.template: Update for new directories |
| 4989 |
* build_w32.bat: Update for new directories |
| 4990 |
* builddos.bat: Update for new directories |
| 4991 |
* maintMakefile: Update for new directories |
| 4992 |
* makefile.com: Update for new directories |
| 4993 |
* mk/Amiga.mk: Update for new directories |
| 4994 |
* mk/Posix.mk.in: Update for new directories |
| 4995 |
* mk/VMS.mk: Update for new directories |
| 4996 |
* mk/Windows32.mk: Update for new directories |
| 4997 |
* mk/msdosdjgpp.mk: Update for new directories |
| 4998 |
|
| 4999 |
* po/LINGUAS: One language per line (needed by gnulib) |
| 5000 |
|
| 5001 |
* INSTALL: Remove (obtained from gnulib) |
| 5002 |
* src/alloca.c: Remove (obtained from gnulib) |
| 5003 |
* src/getloadavg.c: Remove (obtained from gnulib) |
| 5004 |
* po/Makevars: Remove (created by bootstrap) |
| 5005 |
* config/*: Remove leftover files |
| 5006 |
* glob/*: Remove leftover files |
| 5007 |
|
| 5008 |
2018-07-01 Paul Smith <[email protected]> |
| 5009 |
|
| 5010 |
* Makefile.ami, glob/Makefile.ami: Remove obsolete files |
| 5011 |
|
| 5012 |
2018-07-01 Ola Olsson <[email protected]> |
| 5013 |
|
| 5014 |
* doc/make.texi: Updated language |
| 5015 |
|
| 5016 |
2018-07-01 Paul Smith <[email protected]> |
| 5017 |
|
| 5018 |
* all: Update Copyright statements for 2018 |
| 5019 |
|
| 5020 |
* scripts/copyright-update: Maintainer's script for copyright mgmt |
| 5021 |
|
| 5022 |
2018-02-10 Paul Smith <[email protected]> |
| 5023 |
|
| 5024 |
* build_w32.bat: Support Visual Studio 17. |
| 5025 |
|
| 5026 |
2017-11-19 Paul Smith <[email protected]> |
| 5027 |
|
| 5028 |
* configure.ac: Support GLIBC glob interface version 2 |
| 5029 |
|
| 5030 |
2017-11-19 Paul Smith <[email protected]> |
| 5031 |
|
| 5032 |
Rework directory structure to use GNU-recommended "src" directory. |
| 5033 |
Move the source code (other than glob) into the "src" subdirectory. |
| 5034 |
Update all scripting and recommendations to support this change. |
| 5035 |
|
| 5036 |
* *.c, *.h, w32/*: Move to src/ |
| 5037 |
* configure.ac, Makefile.am, maintMakefile: Locate new source files. |
| 5038 |
* Basic.mk.template, mk/*: Update for new source file locations. |
| 5039 |
* NEWS, README.DOS.template: Update for new locations. |
| 5040 |
* build.template, build_w32.bat, builddos.bat: Ditto. |
| 5041 |
* po/POTFILES.in: Ditto |
| 5042 |
* tests/run_make_tests.pl, tests/scripts/features/load*: Ditto. |
| 5043 |
* make.1: Move to doc. |
| 5044 |
* mk/VMS.mk: Add support for building on VMS (hopefully). |
| 5045 |
* makefile.vms, prepare_w32.bat: Remove. |
| 5046 |
* SCOPTIONS: Update to define HAVE_CONFIG_H |
| 5047 |
|
| 5048 |
2017-11-18 Paul Smith <[email protected]> |
| 5049 |
|
| 5050 |
* job.c: Add "command" as a known shell built-in. |
| 5051 |
This is not a POSIX shell built-in but it's common in UNIX shells. |
| 5052 |
Reported by Nick Bowler <[email protected]>. |
| 5053 |
|
| 5054 |
* tests/scripts/features/output-sync: Revert bad change in 0c5a9f9b92a |
| 5055 |
|
| 5056 |
2017-11-18 Paul Smith <[email protected]> |
| 5057 |
|
| 5058 |
Remove unsupported build facilities. |
| 5059 |
Over time the non-standard build and install systems (nmake files, |
| 5060 |
smake files, Visual Studio project files, etc.) have atrophied and |
| 5061 |
maintaining them is not worth the effort, for such a simple utility |
| 5062 |
as make. Remove all the non-standard build tool support and unify |
| 5063 |
OS-specific build rules under a basic set of (GNU make) makefiles. |
| 5064 |
|
| 5065 |
Preserve the existing bootstrapping scripts (for POSIX, Windows, |
| 5066 |
and MS-DOS). Also the existing VMS build scripts are left unchanged: |
| 5067 |
I don't have enough experience with VMS to venture into this area. |
| 5068 |
Perhaps one of the VMS maintainers might like to determine whether |
| 5069 |
conversion would be appropriate. |
| 5070 |
|
| 5071 |
Rather than create libraries for w32 and glob (non-POSIX), simply |
| 5072 |
link the object files directly to remove the complexity. |
| 5073 |
|
| 5074 |
* NEWS: Update with user-facing notes. |
| 5075 |
* Makefile.am: Clean up to use the latest automake best practices. |
| 5076 |
Build Windows code directly from the root makefile to avoid recursion. |
| 5077 |
* README.Amiga, README.DOS.template, README.W32.template: Updated. |
| 5078 |
* INSTALL: Point readers at the README.git file. |
| 5079 |
* maintMakefile: Remove obsolete files. Create Basic.mk file. |
| 5080 |
* Basic.mk.template, mk/*.mk: Create basic GNU make-based makefiles. |
| 5081 |
* build_w32.bat: Copy Basic.mk to Makefile |
| 5082 |
* configure.ac: We no longer need AM_PROG_AR. |
| 5083 |
* dosbuild.bat: Rename to builddos.bat. Incorporate configure.bat. |
| 5084 |
* Makefile.DOS.template: Remove. |
| 5085 |
* NMakefile.template, w32/subproc/NMakefile: Remove. |
| 5086 |
* SMakefile.template, glob/SMakefile, glob/SCOPTIONS, make.lnk: Remove. |
| 5087 |
* configure.bat, glob/configure.bat: Remove. |
| 5088 |
* w32/Makefile.am: Remove. |
| 5089 |
* make_msvc_net2003.sln, make_msvc_net2003.vcproj: Remove. |
| 5090 |
|
| 5091 |
2017-11-11 Paul Smith <[email protected]> |
| 5092 |
|
| 5093 |
* Makefile.am: Add jhelp.pl to remote test setup. |
| 5094 |
|
| 5095 |
2017-11-11 Paolo Bonzini <[email protected]> |
| 5096 |
|
| 5097 |
Do not use STOP_SET for singleton compares. |
| 5098 |
Compare against '$' directly rather than using MAP_VARIABLE. |
| 5099 |
This saves ~10% for find_map_function, which is the top hotspot in |
| 5100 |
QEMU's no-op build. The build is sped up overall by about 1.5% |
| 5101 |
more (from 11.1s to 10.95s). |
| 5102 |
|
| 5103 |
* read.c (find_map_function): Do not compare against singleton sets. |
| 5104 |
|
| 5105 |
2017-11-11 Paolo Bonzini <[email protected]> |
| 5106 |
|
| 5107 |
Speedup parsing of functions. |
| 5108 |
Use the stopchar map to quickly jump over everything that is |
| 5109 |
not an open/close brace, an open/close parenthesis or a comma. |
| 5110 |
|
| 5111 |
This saves 1% on QEMU's noop build (from 11.23s to 11.1s). |
| 5112 |
|
| 5113 |
* function.c (find_next_argument, handle_function): Check |
| 5114 |
with STOP_SET before comparing against individual characters. |
| 5115 |
* main.c (initialize_stopchar_map): Initialize MAP_VARSEP |
| 5116 |
mappings in stopchar_map. |
| 5117 |
* makeint.h (MAP_VARSEP): New. |
| 5118 |
|
| 5119 |
2017-11-11 Paolo Bonzini <[email protected]> |
| 5120 |
|
| 5121 |
Remove MAP_PERCENT as strchr is faster. |
| 5122 |
* read.c (find_percent_cached): Use strchr instead of STOP_SET |
| 5123 |
to find % or nul. |
| 5124 |
* makeint.h (MAP_PERCENT): Remove. |
| 5125 |
* main.c (initialize_stopchar_map): Remove. |
| 5126 |
|
| 5127 |
2017-11-11 Paolo Bonzini <[email protected]> |
| 5128 |
|
| 5129 |
Use Jenkins hash. |
| 5130 |
This is about twice as fast as the current hash, and removes the |
| 5131 |
need for double hashing (improving locality of reference). The |
| 5132 |
hash function is based on Bob Jenkins' design, slightly adapted |
| 5133 |
wherever Make needs to hash NUL-terminated strings. The old hash |
| 5134 |
function is kept for case-insensitive hashing. |
| 5135 |
|
| 5136 |
This saves 8.5% on QEMU's no-op build (from 12.87s to 11.78s). |
| 5137 |
|
| 5138 |
* configure.ac: Check endianness. |
| 5139 |
* hash.c (rol32, jhash_mix, jhash_final, JHASH_INITVAL, |
| 5140 |
sum_get_unaligned_32, jhash): New. |
| 5141 |
* hash.h (STRING_HASH_1, STRING_N_HASH_1): Use jhash. |
| 5142 |
(STRING_HASH_2, STRING_N_HASH_2): Return a dummy value. |
| 5143 |
(STRING_N_COMPARE, return_STRING_N_COMPARE): Prefer memcmp to strncmp. |
| 5144 |
|
| 5145 |
2017-11-11 Paolo Bonzini <[email protected]> |
| 5146 |
|
| 5147 |
Use strchr for simple case of find_char_unquote. |
| 5148 |
In most cases, find_char_unquote has a single stopchar. In that |
| 5149 |
case we can look for it using strchr's optimized implementation. |
| 5150 |
|
| 5151 |
This saves 3.5% on QEMU's noop build (from 11.78s to 11.37s). |
| 5152 |
|
| 5153 |
* read.c (find_char_unquote): Rename to find_map_unquote. Replace |
| 5154 |
with an implementation optimized for the case where the stopchar |
| 5155 |
is a singleton. Adjust all callers. |
| 5156 |
|
| 5157 |
2017-11-11 Paolo Bonzini <[email protected]> |
| 5158 |
|
| 5159 |
Use strchr/memmove in collapse_continuations. |
| 5160 |
collapse_continuations is already using strchr to speed up the |
| 5161 |
common case of no backslash-newline sequence, but on modern |
| 5162 |
processors it is faster to scan the string twice with |
| 5163 |
strchr+memmove (or strlen+memmove) than to move bytes manually. |
| 5164 |
|
| 5165 |
Saves about 1.5% on QEMU's no-op build (from 11.37s to 11.23s). |
| 5166 |
|
| 5167 |
* misc.c (collapse_continuations): Rewrite the scanning of LINE. |
| 5168 |
|
| 5169 |
2017-10-31 Paul Smith <[email protected]> |
| 5170 |
|
| 5171 |
* main.c (main): [SV 48274] Allow -j in makefile MAKEFLAGS variable. |
| 5172 |
* tests/jhelp.pl: New file to allow testing parallelism without sleep. |
| 5173 |
* tests/scripts/features/parallelism: Test this. |
| 5174 |
* tests/scripts/features/jobserver: Update tests. |
| 5175 |
* tests/scripts/features/output-sync: Remove useless rm command. |
| 5176 |
|
| 5177 |
2017-10-30 Paul Smith <[email protected]> |
| 5178 |
|
| 5179 |
* job.c (child_error): Modify error message string. |
| 5180 |
Ensure Emacs compile-mode's next-error doesn't match target failure |
| 5181 |
messages. Syntax errors in makefiles are still matched. |
| 5182 |
|
| 5183 |
* function.c (func_if): Check the first character of condition. |
| 5184 |
Reported by Rob W <[email protected]> |
| 5185 |
|
| 5186 |
2017-10-30 Paul Eggert <[email protected]> |
| 5187 |
|
| 5188 |
glob: Do not assume glibc glob internals. |
| 5189 |
It has been proposed that glibc glob start using gl_lstat, |
| 5190 |
which the API allows it to do. GNU 'make' should not get in |
| 5191 |
the way of this. See: |
| 5192 |
https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html |
| 5193 |
|
| 5194 |
* dir.c (local_lstat): New function, like local_stat. |
| 5195 |
(dir_setup_glob): Use it to initialize gl_lstat too, as the API |
| 5196 |
requires. |
| 5197 |
|
| 5198 |
2017-10-30 Paul Smith <[email protected]> |
| 5199 |
|
| 5200 |
Compute load from number of running processes. |
| 5201 |
* job.c (load_too_high): If /proc/loadavg is available, compare the |
| 5202 |
maximum load against the number of processes currently running. If |
| 5203 |
we can't parse /proc/loadavg, use the previous algorithm. |
| 5204 |
|
| 5205 |
Concept and initial patch from Sven C. Dack <[email protected]> |
| 5206 |
|
| 5207 |
2017-09-30 Eli Zaretskii <[email protected]> |
| 5208 |
|
| 5209 |
Fix checking existence of directories on MS-Windows |
| 5210 |
* remake.c (name_mtime) [WINDOWS32]: Emulate Posix behavior of |
| 5211 |
'stat' with the likes of "foo/" and "foo/.". |
| 5212 |
|
| 5213 |
2017-07-09 Paul Smith <[email protected]> |
| 5214 |
|
| 5215 |
Update copyright statements for 2017. |
| 5216 |
|
| 5217 |
Remove uses of unnecessary "register" keyword. |
| 5218 |
|
| 5219 |
* variable.c (create_pattern_var): [SV 51266] Create with xcalloc(). |
| 5220 |
Reported by Chris Metcalf <[email protected]> |
| 5221 |
|
| 5222 |
[SV 51400] Only unblock fatal signals after child invocation |
| 5223 |
* job.c (unblock_sigs): Only unblock fatal signals not all signals. |
| 5224 |
(unblock_all_sigs): Unblock all signals not just fatal signals. |
| 5225 |
(child_execute_job): Call unblock_all_sigs() in child process. |
| 5226 |
* job.h: Remove unused function definitions. |
| 5227 |
* remote-cstms.c (start_remote_job): Call unblock_all_sigs() in |
| 5228 |
child process. |
| 5229 |
Reported by Koen Van Hoof <[email protected]> |
| 5230 |
|
| 5231 |
2017-07-01 Paul Smith <[email protected]> |
| 5232 |
|
| 5233 |
* function.c (shell_completed): [SV 51014] Add signal to .SHELLSTATUS |
| 5234 |
* tests/scripts/functions/shell: Verify that .SHELLSTATUS contains |
| 5235 |
a non-0 value when the shell exits due to a signal. |
| 5236 |
|
| 5237 |
2017-06-07 Eli Zaretskii <[email protected]> |
| 5238 |
|
| 5239 |
Avoid crashes when SHELL=abcde is specified on the command line |
| 5240 |
* variable.c (do_variable_definition): If $SHELL was not found, |
| 5241 |
process "SHELL=foo" as any other variable definition. This avoids |
| 5242 |
segfaults when SHELL=foo is specified on the Make command line. |
| 5243 |
Reported by Orgad Shaneh <[email protected]>. |
| 5244 |
|
| 5245 |
2017-06-04 Paul Smith <[email protected]> |
| 5246 |
|
| 5247 |
[SV 51159] Use a non-blocking read with pselect to avoid hangs. |
| 5248 |
* posixos.c (set_blocking): Set blocking on a file descriptor. |
| 5249 |
(jobserver_setup): Set non-blocking on the jobserver read side. |
| 5250 |
(jobserver_parse_auth): Ditto. |
| 5251 |
(jobserver_acquire_all): Set blocking to avoid a busy-wait loop. |
| 5252 |
(jobserver_acquire): If the non-blocking read() returns without |
| 5253 |
taking a token then try again. |
| 5254 |
|
| 5255 |
[SV 50823] Support filenames containing '$' in MAKEFILE_LIST |
| 5256 |
* variable.h (enum variable_flavor: Add a new flavor for appended |
| 5257 |
values that shouldn't be expanded. |
| 5258 |
* variable.c (do_variable_definition): If given this new flavor, |
| 5259 |
do not expand the value before appending it. |
| 5260 |
* read.c (eval_makefile): Use this new flavor for MAKEFILE_LIST |
| 5261 |
* tests/scripts/variables/MFILE_LIST: Test filenames containing '$'. |
| 5262 |
|
| 5263 |
* tests/test_driver.pl: Useful error if given an invalid test name. |
| 5264 |
|
| 5265 |
* NEWS: Do not insert a space during '+=' if the value is empty. |
| 5266 |
* doc/make.texi (Appending): Document this behavior. |
| 5267 |
* variable.c (do_variable_definition): Only add a space if the variable |
| 5268 |
value is not empty. |
| 5269 |
* tests/scripts/variables/flavors: Test this behavior. |
| 5270 |
|
| 5271 |
2017-06-04 Enrique Olaizola <[email protected]> (tiny change) |
| 5272 |
|
| 5273 |
* read.c (read_all_makefiles): [SV 50909] Add MAKEFILES to strcache |
| 5274 |
|
| 5275 |
2017-06-04 Paul Smith <[email protected]> |
| 5276 |
|
| 5277 |
* po/LINGUAS: Add support for traditional Chinese (zh_TW) |
| 5278 |
|
| 5279 |
Rename output_tmpfile() to a misc function get_tmpfile() |
| 5280 |
* output.c: Remove output_tmpfile() and umask handling. |
| 5281 |
* output.h: Ditto. |
| 5282 |
* misc.c: Add get_tmpfile() and umask handling. |
| 5283 |
* makeint.h: Ditto. |
| 5284 |
* function.c: Rename output_tmpfile() to get_tmpfile(). |
| 5285 |
* main.c: Ditto. |
| 5286 |
* vmsjobs.c: Ditto. |
| 5287 |
|
| 5288 |
[SV 13651] Handle out-of-memory conditions slightly more gracefully. |
| 5289 |
* makeint.h: Change OUT_OF_MEM() macro to out_of_memory() function. |
| 5290 |
* output.h, job.h: Move FD_* macros from job.h to output.h. |
| 5291 |
* output.c (output_write): Write a buffer to an FD directly. |
| 5292 |
(out_of_memory): Use output_write() to avoid allocating more |
| 5293 |
memory while writing the error, and call exit() instead of die(). |
| 5294 |
This does mean we can't translate the error string, though. |
| 5295 |
* misc.c (xmalloc, xcalloc, xrealloc, xstrdup, xstrndup): Call new |
| 5296 |
out_of_memory() rather than OUT_OF_MEM(). |
| 5297 |
* read.c (parse_file_seq): Ditto. |
| 5298 |
|
| 5299 |
Clean up close-on-exec, particularly with jobserver pipes. |
| 5300 |
* configure.ac: Check sys/file.h and assume fileno() always exists. |
| 5301 |
* output.h: Move output-specific content from job.h to output.h. |
| 5302 |
* os.h (fd_inherit, fd_noinherit): New functions manage FD inheritance. |
| 5303 |
* posixos.c (fd_inherit, fd_noinherit): Implement for POSIX systems. |
| 5304 |
(jobserver_setup): Force jobserver FDs to not be inherited by default. |
| 5305 |
(jobserver_pre_child): Enable inheritance in recursive invocations. |
| 5306 |
(jobserver_post_child): Disable inheritance after recursive invocations. |
| 5307 |
* w32/w32os.c (fd_inherit, fd_noinherit): Implement for W32 systems. |
| 5308 |
* job.h (CLOSE_ON_EXEC): Remove macro in deference to new fd_noinherit. |
| 5309 |
* function.c (func_shell_base): Convert CLOSE_ON_EXEC to fd_noinherit. |
| 5310 |
* job.c (child_execute_job): Ditto. |
| 5311 |
* output.c (setup_tmpfile): Ditto. |
| 5312 |
* read.c (eval_makefile): Ditto, plus remove HAVE_FILENO check. |
| 5313 |
* w32/include/sub_proc.h: Remove process_noinherit for fd_noinherit. |
| 5314 |
* w32/subproc/sub_proc.c: Ditto. |
| 5315 |
|
| 5316 |
[SV 50300] Use CFLAGS value of "-O1" in POSIX mode. |
| 5317 |
* read.c (record_files): Use "-O1" not "-O" for CFLAGS and FFLAGS. |
| 5318 |
* tests/scripts/targets/POSIX: Test for the new value. |
| 5319 |
|
| 5320 |
* configure.ac: [SV 50648] Detect Guile 2.2 packages. |
| 5321 |
|
| 5322 |
* doc/make.texi: [SV 50304] Add missing close parenthesis. |
| 5323 |
|
| 5324 |
Add test suite support to Windows |
| 5325 |
* main.c (main): Sanitize program name detection on Windows. |
| 5326 |
* makeint.h: 'program' is a const string on all platforms now. |
| 5327 |
* tests/run_make_tests.bat: Windows bat file to invoke tests |
| 5328 |
* tests/test_driver.pl: Obtain system-specific error messages. |
| 5329 |
(get_osname): Compute the $port_type here. Add more $osname checks |
| 5330 |
for different Windows Perl ports. |
| 5331 |
(_run_command): Rewrite the timeout capability to work properly |
| 5332 |
with Windows. Don't use Perl fork/exec; instead use system(1,...) |
| 5333 |
which allows a more reliable/proper kill operation. |
| 5334 |
Also, allow options to be given as a list instead of a string, to |
| 5335 |
allow more complex quoting of command-line arguments. |
| 5336 |
* tests/run_make_tests.pl (run_make_with_options): Allow options |
| 5337 |
to be provided as a list in addition to a simple string. |
| 5338 |
(set_more_defaults): Write sample makefiles and run make on them |
| 5339 |
instead of trying to run echo and invoking make with -f-, to avoid |
| 5340 |
relying on shell and echo to get basic configuration values. Also |
| 5341 |
create a $sh_name variable instead of hard-coding /bin/sh. |
| 5342 |
* tests/scripts/features/archives: Skip on Windows. |
| 5343 |
* tests/scripts/features/escape: Use list method for passing options. |
| 5344 |
* tests/scripts/features/include: Use system-specific error messages. |
| 5345 |
* tests/scripts/features/output-sync: "Command not found" errors |
| 5346 |
generate very different / odd output on Windows. This needs to be |
| 5347 |
addressed but for now disable these tests on Windows. |
| 5348 |
* tests/scripts/functions/abspath: Disable on Windows. |
| 5349 |
* tests/scripts/functions/file: Use system-specific error messages. |
| 5350 |
* tests/scripts/functions/shell: "Command not found" errors generate |
| 5351 |
very different / odd output on Windows. This needs to be addressed |
| 5352 |
but for now disable these tests on Windows. |
| 5353 |
* tests/scripts/misc/close_stdout: Disable on Windows. |
| 5354 |
* tests/scripts/options/dash-k: Use system-specific error messages. |
| 5355 |
* tests/scripts/options/dash-l: Disable on Windows. |
| 5356 |
* tests/scripts/options/eval: Use list method for passing options. |
| 5357 |
* tests/scripts/options/general: Skip some non-portable tests. |
| 5358 |
* tests/scripts/targets/ONESHELL: Skip some non-portable tests. |
| 5359 |
* tests/scripts/targets/POSIX: Skip some non-portable tests. |
| 5360 |
* tests/scripts/variables/MAKEFILES: Skip some non-portable tests. |
| 5361 |
* tests/scripts/variables/SHELL: Use a makefile not -f- for testing. |
| 5362 |
|
| 5363 |
2017-06-04 Enrique Olaizola <[email protected]> |
| 5364 |
|
| 5365 |
* tests/run_make_tests.pl: [SV 50902] Find Perl modules |
| 5366 |
|
| 5367 |
2017-01-11 Eli Zaretskii <[email protected]> |
| 5368 |
|
| 5369 |
[SV 50021] Avoid infloop on MS-Windows with short scripts |
| 5370 |
* job.c (reap_children) [WINDOWS32]: Avoid recursive call to |
| 5371 |
reap_children when the argument passed to |
| 5372 |
map_windows32_error_to_string is negative or too large. |
| 5373 |
|
| 5374 |
2016-12-28 Paul Smith <[email protected]> |
| 5375 |
|
| 5376 |
* main.c (switches): Add -E as an alias for --eval. |
| 5377 |
* make.1: Document the -E and --eval options. |
| 5378 |
* doc/make.texi: Document the -E option. |
| 5379 |
* tests/scripts/options/eval: Test the -E option and MAKEFILES. |
| 5380 |
* NEWS: Add information about the new option. |
| 5381 |
|
| 5382 |
* main.c (switches): Add --no-silent to undo -s options. |
| 5383 |
* make.1: Document the new flag. |
| 5384 |
* doc/make.texi: Document the new flag. Remove suggestions that the |
| 5385 |
.SILENT special target is deprecated or should not be used. |
| 5386 |
* tests/scripts/options/dash-s: Test the -s and --no-silent options. |
| 5387 |
* NEWS: Add information about the new option. |
| 5388 |
|
| 5389 |
2016-12-26 Martin Dorey <[email protected]> |
| 5390 |
|
| 5391 |
* job.c (child_execute_job): [SV 49938] Avoid spurious GCC warning. |
| 5392 |
|
| 5393 |
* main.c (main): [SV 49935] Fix uninitialized variable. |
| 5394 |
|
| 5395 |
2016-12-26 Paul Smith <[email protected]> |
| 5396 |
|
| 5397 |
[SV 40236] Handle included file open failures properly. |
| 5398 |
* read.c (eval_makefile): Set deps->error if we discovered any |
| 5399 |
error reading makefiles, and set NONEXISTENT_MTIME so we know |
| 5400 |
it needs to be rebuilt. |
| 5401 |
* main.c (main): Clean up management of makefile_mtimes. |
| 5402 |
* tests/scripts/features/include: Add open failure testcases. |
| 5403 |
|
| 5404 |
Portability changes for the test suite. |
| 5405 |
* tests/test_driver.pl: Save error strings for later comparison. |
| 5406 |
* tests/run_make_tests.pl: Create portable commands for later use. |
| 5407 |
* tests/*: Use these new variables. |
| 5408 |
|
| 5409 |
[SV 20513] Un-escaped # are not comments in function invocations |
| 5410 |
* NEWS: Document the change, as a backward-incompatible change. |
| 5411 |
* main.c (main): Add 'nocomment' to the .FEATURES variable. |
| 5412 |
* read.c (remove_comments): Skip variable references during remove. |
| 5413 |
(find_char_unquote): Fix comments for new STOPMAP support. |
| 5414 |
* tests/scripts/features/escape: Test new escape syntax. |
| 5415 |
* tests/scripts/functions/guile: Ditto. |
| 5416 |
* tests/scripts/functions/shell: Ditto. |
| 5417 |
|
| 5418 |
* main.c (main): [SV 40234] Show correct error message. |
| 5419 |
|
| 5420 |
2016-12-26 Christoph Schulz <[email protected]> |
| 5421 |
|
| 5422 |
* main.c (switches): [SV 48809] Accept obsolete jobserver flag. |
| 5423 |
|
| 5424 |
2016-12-26 Paul Smith <[email protected]> |
| 5425 |
|
| 5426 |
* read.c (get_next_mword): [SV 49865] Make fallthrough explicit. |
| 5427 |
|
| 5428 |
[SV 49114] Remove support for the NO_FLOAT compile flag. |
| 5429 |
* makeint.h (max_load_average): Always a double. |
| 5430 |
* main.c (max_load_average, default_load_average): Always doubles. |
| 5431 |
(switches): -l option is a "floating" format. |
| 5432 |
(decode_switches, define_makeflags): Support "floating" format. |
| 5433 |
* remake.c (f_mtime): Show time skew as double. |
| 5434 |
* rule.c (print_rule_data_base): Show percentages as double. |
| 5435 |
* Makefile.ami, README.DOS.template, SMakefile.template: Remove |
| 5436 |
references to NO_FLOAT. |
| 5437 |
* SCOPTIONS, glob/SCOPTIONS: Remove NO_FLOAT settings. |
| 5438 |
|
| 5439 |
[SV 45477] [SV 49115] Parse DOS/Windows drivespecs correctly. |
| 5440 |
* read.c (parse_file_seq) [WINDOWS32]: Only consider a colon part of |
| 5441 |
a path if it's in a valid Windows drivespec. |
| 5442 |
|
| 5443 |
2016-12-25 Paul Smith <[email protected]> |
| 5444 |
|
| 5445 |
[SV 49116] Check potential null pointer dereference. |
| 5446 |
* w32/subproc/sub_proc.c (make_command_line): Simplify cygwin shell |
| 5447 |
check for correctness. |
| 5448 |
|
| 5449 |
2016-12-25 Jaak Ristioja <[email protected]> |
| 5450 |
|
| 5451 |
* expand.c (variable_append): [SV 49113] Possible null ptr deref |
| 5452 |
|
| 5453 |
* w32/*/dirent.*: [SV 49111] Remove unused telldir() |
| 5454 |
|
| 5455 |
2016-12-25 Paul Smith <[email protected]> |
| 5456 |
|
| 5457 |
Add more GCC warnings to the maintainer build. |
| 5458 |
* arscan.c: [SV 49112] Correct TEST printf() formatting. |
| 5459 |
Recommended by Jaak Ristioja <[email protected]> |
| 5460 |
* hash.c: Correct fprintf() formatting. |
| 5461 |
* maintMakefile: Add extra GCC warning flags. |
| 5462 |
|
| 5463 |
* po/Makevars, makeint.h, debug.h: Add xgettext C format flags. |
| 5464 |
|
| 5465 |
* po/LINGUAS: Added Serbian translation. |
| 5466 |
|
| 5467 |
* README.template: Clarify some items in the README |
| 5468 |
|
| 5469 |
* doc/make.texi: [SV 48951] Fix documentation typo. |
| 5470 |
|
| 5471 |
* maintMakefile: Update default GPG ID for new key. |
| 5472 |
|
| 5473 |
2016-12-14 Paul Smith <[email protected]> |
| 5474 |
|
| 5475 |
Resolve issues discovered by static code analysis. |
| 5476 |
* maintMakefile: Add a rule to submit code for analysis. |
| 5477 |
* configure.ac: Check for availability of the umask() function. |
| 5478 |
* output.c (output_tmpfd, output_tmpfile): Use umask on temp files. |
| 5479 |
* makeint.h (PATH_VAR): Reserve an extra character for nul bytes. |
| 5480 |
* function.c (func_error): Initialize buffer to empty string. |
| 5481 |
* job.c (child_execute_job): Verify validity of fdin. |
| 5482 |
* main.c (main): Simplify code for makefile updating algorithm. |
| 5483 |
* arscan.c (ar_scan): Verify member name length before reading. |
| 5484 |
* read.c (readline): Cast pointer arithmetic to avoid warnings. |
| 5485 |
* remake.c (update_file): Remove unreachable code. |
| 5486 |
(name_mtime): Verify symlink name length. |
| 5487 |
|
| 5488 |
2016-11-12 Eli Zaretskii <[email protected]> |
| 5489 |
|
| 5490 |
* NEWS: Mention the extended support for -jN on MS-Windows. |
| 5491 |
|
| 5492 |
2016-11-12 Marc Ullman <[email protected]> |
| 5493 |
|
| 5494 |
Support more than 63 jobs on MS-Windows |
| 5495 |
* job.c (start_waiting_job, load_too_high): |
| 5496 |
* w32/w32os.c (jobserver_setup, jobserver_acquire): Abstracted out |
| 5497 |
MAXIMUM_WAIT_OBJECTS. Call process_table_full instead. |
| 5498 |
* w32/include/sub_proc.h: Update and add prototypes. |
| 5499 |
* w32/subproc/sub_proc.c (GMAKE_MAXIMUM_WAIT_OBJECTS): New macro. |
| 5500 |
(process_wait_for_multiple_objects): Drop-in replacement for Windows |
| 5501 |
API WaitForMultipleOjects. |
| 5502 |
(process_wait_for_any_private): Replaced MAXIMUM_WAIT_OBJECTS with |
| 5503 |
GMAKE_MAXIMUM_WAIT_OBJECTS. |
| 5504 |
(process_table_full): Replacement for process_used_slots. |
| 5505 |
(process_used_slots): Removed, as no longer needed. |
| 5506 |
(process_table_usable_size): Returns maximum usable size of process |
| 5507 |
table. |
| 5508 |
(process_table_actual_size): Returns actual size of process table. |
| 5509 |
(process_register): Added assertion. |
| 5510 |
(process_easy): Abstracted out MAXIMUM_WAIT_OBJECTS. |
| 5511 |
|
| 5512 |
2016-10-09 Eli Zaretskii <[email protected]> |
| 5513 |
|
| 5514 |
Only include strings.h in MinGW builds |
| 5515 |
* main.c: |
| 5516 |
* job.c: Include strings.h only if HAVE_STRINGS_H is defined. |
| 5517 |
|
| 5518 |
* config.h.W32.template (HAVE_STRINGS_H): Define only for MinGW, |
| 5519 |
as MSVC doesn't have this header. |
| 5520 |
|
| 5521 |
2016-10-06 Eli Zaretskii <[email protected]> |
| 5522 |
|
| 5523 |
Update the Guile version tested with the MS-Windows build. |
| 5524 |
|
| 5525 |
Avoid compiler warnings with MinGW runtime 3.22.2 |
| 5526 |
* main.c: |
| 5527 |
* job.c: Include strings.h, to get the prototypes of strcasecmp |
| 5528 |
and strncasecmp with latest MinGW runtime versions. |
| 5529 |
* config.h.W32.template (HAVE_STRINGS_H): Define. |
| 5530 |
|
| 5531 |
2016-06-24 Paul Smith <[email protected]> |
| 5532 |
|
| 5533 |
* README.W32.template: Update the build documentation. |
| 5534 |
* build_w32.bat: Fix issues with Visual Studio builds. Fix an error |
| 5535 |
that always created Debug builds. Support 32bit and 64bit builds. |
| 5536 |
|
| 5537 |
* Update to pre-release version 4.2.90. |
| 5538 |
|
| 5539 |
2016-06-10 Paul Smith <[email protected]> |
| 5540 |
|
| 5541 |
GNU Make release 4.2.1. |
| 5542 |
|
| 5543 |
2016-06-06 Paul Smith <[email protected]> |
| 5544 |
|
| 5545 |
* maintMakefile: TP recommends rsync for retrieving PO files. |
| 5546 |
|
| 5547 |
2016-05-31 Jeremy Devenport <[email protected]> (tiny change) |
| 5548 |
|
| 5549 |
* main.c (main): [SV 48009] Reset stack limit for make re-exec. |
| 5550 |
|
| 5551 |
2016-05-31 Paul Smith <[email protected]> |
| 5552 |
|
| 5553 |
[SV 47995] Ensure forced double-colon rules work with -j. |
| 5554 |
The fix for SV 44742 had a side-effect that some double-colon targets |
| 5555 |
were skipped. This happens because the "considered" facility assumed |
| 5556 |
that all targets would be visited on each walk through the dependency |
| 5557 |
graph: we used a bit for considered and toggled it on each pass; if |
| 5558 |
we didn't walk the entire graph on every pass the bit would get out |
| 5559 |
of sync. The new behavior after SV 44742 might return early without |
| 5560 |
walking the entire graph. To fix this I changed the considered value |
| 5561 |
to an integer which is monotonically increasing: it is then never |
| 5562 |
possible to incorrectly determine that a previous pass through the |
| 5563 |
graph already considered the current target. |
| 5564 |
|
| 5565 |
* filedef.h (struct file): make CONSIDERED an unsigned int. |
| 5566 |
* main.c (main): No longer need to reset CONSIDERED. |
| 5567 |
* remake.c (update_goal_chain): increment CONSIDERED rather than |
| 5568 |
inverting it between 0<->1. |
| 5569 |
(update_file_1): Reset CONSIDERED to 0 so it's re-considered. |
| 5570 |
(check_dep): Ditto. |
| 5571 |
* tests/scripts/features/double_colon: Add a regression test. |
| 5572 |
|
| 5573 |
2016-05-31 Paul Smith <[email protected]> |
| 5574 |
|
| 5575 |
* DELETE_ON_ERROR: [SV 48061] Use "exit 1" for portability. |
| 5576 |
Reported by Joel Fredrikson <[email protected]> |
| 5577 |
|
| 5578 |
* w32/pathstuff.c: [SV 47996] Use ISBLANK() not isblank(). |
| 5579 |
|
| 5580 |
2016-05-28 Eli Zaretskii <[email protected]> |
| 5581 |
|
| 5582 |
Fix printing time stamps on MS-Windows |
| 5583 |
* dir.c (print_dir_data_base) [WINDOWS32]: Use %I64u format for |
| 5584 |
printing unsigned 64-bit data types, as %ull is not universally |
| 5585 |
supported. |
| 5586 |
|
| 5587 |
2016-05-27 Luke Allardyce <[email protected]> (tiny change) |
| 5588 |
|
| 5589 |
[SV 48037] Fix MinGW build with Posix configury tools |
| 5590 |
* w32/Makefile.am (libw32_a_CPPFLAGS): Add -I$(srcdir)/glob. |
| 5591 |
|
| 5592 |
2016-05-22 Paul Smith <[email protected]> |
| 5593 |
|
| 5594 |
GNU Make release 4.2. |
| 5595 |
|
| 5596 |
2016-05-21 Joe Crayne <[email protected]> (tiny change) |
| 5597 |
|
| 5598 |
[SV 44742] Fix double-colon rules plus parallel builds. |
| 5599 |
* remake.c (update_file): Don't update double-colon target status |
| 5600 |
if we're still building targets. |
| 5601 |
(ftime_t): Don't propagate timestamps for double-colon targets that |
| 5602 |
we've not examined yet. |
| 5603 |
* tests/scripts/features/double_colon: Add parallel build tests. |
| 5604 |
|
| 5605 |
2016-05-21 Paul Smith <[email protected]> |
| 5606 |
|
| 5607 |
* read.c (eval): [SV 47960] Skip record waiting files when ignoring. |
| 5608 |
* tests/scripts/features/conditionals: Test this scenario. |
| 5609 |
|
| 5610 |
Separate the GNU make load ABI from internal types. |
| 5611 |
Create an internal type "floc" and convert all users to that type. |
| 5612 |
* gnumake.h (gmk_floc): Remove the offset field from this type. |
| 5613 |
* loadapi.c (gmk_eval): Convert gmk_floc to internal floc. |
| 5614 |
|
| 5615 |
2016-05-21 Paul Eggert <[email protected]> |
| 5616 |
|
| 5617 |
Fixes for enhanced GCC warnings. |
| 5618 |
Move function prototypes into header files and out of .c files. |
| 5619 |
Use void argument lists for functions that accept no args. |
| 5620 |
Remove unused macros. Make private functions static. Align |
| 5621 |
types with printf format characters. |
| 5622 |
|
| 5623 |
2016-05-21 Paul Smith <[email protected]> |
| 5624 |
|
| 5625 |
Fix compile issues with Windows and VMS. |
| 5626 |
* main.c (initialize_stopchar_map): isblank() is not part of C89. |
| 5627 |
Install bits for space and tab directly. |
| 5628 |
* makeint.h: Don't define vfork; autoconf handles this for us. |
| 5629 |
* vmsjobs.c: Rename NEXT_TOKEN to V_NEXT_TOKEN to avoid conflicts. |
| 5630 |
* dir.c (print_dir_data_base): Visual Studio C doesn't have int64_t. |
| 5631 |
* w32/subproc/sub_proc.c (process_begin): Missing arg to memset(). |
| 5632 |
* build_w32.bat: Don't use obsolete Visual Studio flags. |
| 5633 |
|
| 5634 |
Allow compiling with an ISO C 1989/1990 compiler. |
| 5635 |
* posixos.c (jobserver_post_child): Use C89 for loop syntax. |
| 5636 |
* remake.c (update_goal_chain): Ditto. |
| 5637 |
* variable.c (parse_variable_definition): Ditto. |
| 5638 |
|
| 5639 |
2016-05-17 Eli Zaretskii <[email protected]> |
| 5640 |
|
| 5641 |
[SV 47942] Avoid random crashes in subordinate programs on MS-Windows |
| 5642 |
* w32/subproc/sub_proc.c (process_begin): Zero out startInfo |
| 5643 |
before using it. Fixes crashes in Intel Fortran compiler invoked |
| 5644 |
by Make. |
| 5645 |
|
| 5646 |
2016-04-24 Eli Zaretskii <[email protected]> |
| 5647 |
|
| 5648 |
Fix the MS-Windows MinGW build |
| 5649 |
* build_w32.bat (GccCompile): Use -std=gnu99, as some code uses |
| 5650 |
C99 features ('for' loop initial declarations). |
| 5651 |
|
| 5652 |
* dir.c (print_dir_data_base) [WINDOWS32]: Cast 'mtime' to |
| 5653 |
'int64_t', and use %I64d to print it, to avoid compile-time |
| 5654 |
warning about printing a 'time_t' value, which could be either |
| 5655 |
a 32-bit or a 64 bit integral type. |
| 5656 |
|
| 5657 |
2016-04-23 Paul Smith <[email protected]> |
| 5658 |
|
| 5659 |
* tests/scripts/features/output-sync: increase test timeout. |
| 5660 |
I'm getting random failures with a timeout of 10s; increase to 30s. |
| 5661 |
|
| 5662 |
2016-04-11 Paul Smith <[email protected]> |
| 5663 |
|
| 5664 |
* NEWS: Update for pre-release |
| 5665 |
|
| 5666 |
* dep.h, makeint.h (show_goal_error): Move to makeint.h. |
| 5667 |
|
| 5668 |
2016-04-11 Paul Smith <[email protected]> |
| 5669 |
|
| 5670 |
[SV 46433] Show recipe line offsets in line number messages. |
| 5671 |
While displaying line numbers, show the relevant line number inside |
| 5672 |
the recipe not just the first line of the entire recipe. |
| 5673 |
Sample changes suggested by Brian Vandenberg <[email protected]> |
| 5674 |
|
| 5675 |
* gnumake.h (gmk_floc): Add an 'offset' to track the recipe offset. |
| 5676 |
* read.c (eval, eval_makefile, eval_buffer): Initialize 'offset'. |
| 5677 |
(record_files, install_pattern_rule): Ditto. |
| 5678 |
* job.c (new_job, job_next_command): Update 'offset' based on the |
| 5679 |
line of the recipe we're expanding or invoking. |
| 5680 |
(child_error): Add 'offset' when showing the line number. |
| 5681 |
* function.c (func_shell_base): Ditto. |
| 5682 |
* output.c (error, fatal): Ditto. |
| 5683 |
* NEWS: Mention the new ability. |
| 5684 |
* tests/scripts/features/errors: Check the line number on errors. |
| 5685 |
* tests/scripts/functions/warning: Check the line number on warnings. |
| 5686 |
* tests/scripts/features/output-sync, |
| 5687 |
tests/scripts/features/parallelism, tests/scripts/functions/shell, |
| 5688 |
tests/scripts/functions/error: Update line numbers. |
| 5689 |
|
| 5690 |
2016-04-09 Paul Smith <[email protected]> |
| 5691 |
|
| 5692 |
* maintMakefile: Add a rule for storing preprocessor output. |
| 5693 |
|
| 5694 |
[SV 102] Don't show unnecessary include file errors. |
| 5695 |
Delay the generation of error messages for included files until we |
| 5696 |
are sure that we can't rebuild that included file. |
| 5697 |
* dep.h (struct dep): Don't reuse "changed"; make a separate field |
| 5698 |
to keep "flags". Get rid of dontcare and use the flag. |
| 5699 |
(struct goaldep): Create a new structure for goal prereqs |
| 5700 |
that tracks an errno value and the floc where the include happened. |
| 5701 |
Rework the structures to ensure they are supersets as expected. |
| 5702 |
In maintainer mode with GCC, use inline to get type checking. |
| 5703 |
* read.c (eval_makefile): Return a struct goaldep for the new |
| 5704 |
makefile. Ensure errno is set properly to denote a failure. |
| 5705 |
(read_all_makefiles): Switch to goaldep and check errno. |
| 5706 |
(eval): Don't show included file errors; instead remember them. |
| 5707 |
* remake.c (update_goal_chain): Set global variables to the current |
| 5708 |
goaldep we're building, and the entire chain. |
| 5709 |
(show_goal_error): Check if the current failure is a consequence |
| 5710 |
of building an included makefile and if so print an error. |
| 5711 |
(complain): Call show_goal_error() on rule failure. |
| 5712 |
* job.c (child_error): Call show_goal_error() on child error. |
| 5713 |
* main.c (main): Switch from struct dep to goaldep. |
| 5714 |
* misc.c (free_dep_chain): Not used; make into a macro. |
| 5715 |
* tests/scripts/features/include: Update and include new tests. |
| 5716 |
* tests/scripts/options/dash-B, tests/scripts/options/dash-W, |
| 5717 |
tests/scripts/options/print-directory, |
| 5718 |
tests/scripts/variables/MAKE_RESTARTS: Update known-good-output. |
| 5719 |
|
| 5720 |
* job.c (child_error): Add filename length to output length. |
| 5721 |
Reported by Dale Stimson <[email protected]> |
| 5722 |
|
| 5723 |
2016-04-04 Paul Smith <[email protected]> |
| 5724 |
|
| 5725 |
Preserve the real value of -jN in MAKEFLAGS using jobserver. |
| 5726 |
Previously if the jobserver was active, MAKEFLAGS would contain only |
| 5727 |
the -j option but not the number (not -j5 or whatever) so users |
| 5728 |
could not discover that value. Allow that value to be provided in |
| 5729 |
MAKEFLAGS without error but still give warnings if -jN is provided |
| 5730 |
on the command line if the jobserver is already activated. |
| 5731 |
|
| 5732 |
* NEWS: Discuss the new behavior. |
| 5733 |
* os.h, posixos.c, w32/w32os.c: Return success/failure from |
| 5734 |
jobserver_setup() and jobserver_parse_auth(). |
| 5735 |
* main.c (main): Separate the command line storage of job slots (now |
| 5736 |
in arg_job_slots) from the control storage (in job_slots). Make a |
| 5737 |
distinction between -jN flags read from MAKEFLAGS and those seen |
| 5738 |
on the command line: for the latter if the jobserver is enabled then |
| 5739 |
warn and disable it, as before. |
| 5740 |
* tests/scripts/features/jobserver: Add new testing. |
| 5741 |
|
| 5742 |
2016-04-04 Paul Smith <[email protected]> |
| 5743 |
|
| 5744 |
* tests/run_make_tests.pl: Add file/lineno info to .run file. |
| 5745 |
|
| 5746 |
* maintMakefile: Fix logging of check-alt-config target. |
| 5747 |
|
| 5748 |
* job.c (child_execute_job): Fix $(shell...) under NO_OUTPUT_SYNC. |
| 5749 |
* main.c (decode_output_sync_flags): Use NONE for NO_OUTPUT_SYNC. |
| 5750 |
|
| 5751 |
* main.c (main): Restrict disabling debugging for MAKEFILES. |
| 5752 |
|
| 5753 |
* Makefile.am, w32/Makefile.am: Fix *os.c for Windows builds. |
| 5754 |
Original change provided by Luke Allardyce <[email protected]> |
| 5755 |
|
| 5756 |
* make.texi: Confirm that CURDIR contains an absolute path. |
| 5757 |
|
| 5758 |
* docs/make.texi: [SV 47392] Add "Integrating make" chapter. |
| 5759 |
|
| 5760 |
Change --jobserver-fds to more generic --jobserver-auth. |
| 5761 |
* NEWS: Mention the change. |
| 5762 |
* main.c: Rename jobserver_fds variable to jobserver_auth and |
| 5763 |
--jobserver-fds option to --jobserver-auth. |
| 5764 |
* os.h, posixos.c, w32/w32os.c: Rename jobserver_parse_arg() and |
| 5765 |
jobserver_get_arg() to jobserver_parse_auth()/jobserver_get_auth(). |
| 5766 |
|
| 5767 |
2016-03-23 Paul Smith <[email protected]> |
| 5768 |
|
| 5769 |
* tests/run_make_tests.pl: Preserve $make_command |
| 5770 |
* tests/scripts/options/dash-n: Use $make_command. This fixes |
| 5771 |
a spurious failure when running tests with valgrind enabled. |
| 5772 |
|
| 5773 |
* variable.c: Clean up some memory leaks. |
| 5774 |
|
| 5775 |
[SV 46995] Strip leading/trailing space from variable names |
| 5776 |
* makeint.h: Change MAP_SPACE to MAP_NEWLINE, and add MAP_PATHSEP |
| 5777 |
and MAP_SPACE which is now MAP_BLANK|MAP_NEWLINE. Create |
| 5778 |
NEW_TOKEN(), END_OF_TOKEN(), ISBLANK(), ISSPACE() macros. |
| 5779 |
* main.c (initialize_stopchar_map): Set MAP_NEWLINE only for |
| 5780 |
newline characters. |
| 5781 |
* Convert all uses of isblank() and isspace() to macros. |
| 5782 |
* Examine all uses of isblank() (doesn't accept newlines) and |
| 5783 |
change them wherever possible to ISSPACE() (does accept newlines). |
| 5784 |
* function.c (func_foreach): Strip leading/trailing space. |
| 5785 |
* variable.c (parse_variable_definition): Clean up. |
| 5786 |
* tests/scripts/functions/foreach: Test settings and errors. |
| 5787 |
* tests/scripts/functions/call: Rewrite to new-style. |
| 5788 |
* tests/scripts/misc/bs-nl: Add many more tests for newlines. |
| 5789 |
|
| 5790 |
2016-03-21 Paul Smith <[email protected]> |
| 5791 |
|
| 5792 |
* function.c (func_file): Support reading from files. |
| 5793 |
* NEWS: Add information about reading files. |
| 5794 |
* make.texi (File Function): Describe reading files. |
| 5795 |
* tests/scripts/functions/file: Test new features for $(file ...) |
| 5796 |
|
| 5797 |
2016-03-20 Paul Smith <[email protected]> |
| 5798 |
|
| 5799 |
* doc/make.texi (Setting Variables): Fix typo (add comma). |
| 5800 |
|
| 5801 |
* job.c (child_error): Combine file info with error message. |
| 5802 |
* tests/scripts/...: Update error message matches. |
| 5803 |
|
| 5804 |
2016-03-19 Paul Smith <[email protected]> |
| 5805 |
|
| 5806 |
* variable.c: Align type of variable_changenum. |
| 5807 |
|
| 5808 |
2016-03-13 Paul Smith <[email protected]> |
| 5809 |
|
| 5810 |
[SV 45728] Detect changes in .VARIABLES more accurately. |
| 5811 |
For performance, we only recompute .VARIABLES when (a) it's expanded |
| 5812 |
and (b) when its value will change from a previous expansion. To |
| 5813 |
determine (b) we were checking the number of entries in the hash |
| 5814 |
table which used to work until we started undefining entries: now if |
| 5815 |
you undefine and redefine the same number of entries in between |
| 5816 |
expanding .VARIABLES, it doesn't detect any change. Instead, keep |
| 5817 |
an increasing change number. |
| 5818 |
* variables.c: Add variable_changenum. |
| 5819 |
(define_variable_in_set, merge_variable_sets): Increment |
| 5820 |
variable_changenum if adding a new variable to the global set. |
| 5821 |
(undefine_variable_in_set): Increment variable_changenum if |
| 5822 |
undefining a variable from the global set. |
| 5823 |
(lookup_special_var): Test variable_changenum not the hash table. |
| 5824 |
* tests/scripts/variables/special: Test undefining variables. |
| 5825 |
|
| 5826 |
* main.c(main): Disable output sync without parallel builds. |
| 5827 |
|
| 5828 |
[SV 46581] Pre-define .LOADED to avoid warnings. |
| 5829 |
* main.c (main): Pre-define .LOADED as a default-level variable. |
| 5830 |
* load.c (load_file): Set the value rather than append it. Avoid |
| 5831 |
adding an extra initial whitespace. |
| 5832 |
* tests/scripts/features/load: Run with --warn-undefined-variables. |
| 5833 |
|
| 5834 |
2016-03-13 Paul Smith <[email protected]> |
| 5835 |
|
| 5836 |
[SV 44555] Use vfork() instead of fork() where available. |
| 5837 |
Testing has shown that vfork() is actually significantly |
| 5838 |
more efficient on systems where it's supported, even for |
| 5839 |
copy-on-write implementations. If make is big enough, |
| 5840 |
duplicating the page tables is significant overhead. |
| 5841 |
|
| 5842 |
* configure.ac: Check for fork/vfork. |
| 5843 |
* makeint.h: Include vfork.h and set up #define for it. |
| 5844 |
* os.h, posixos.c (get_bad_stdin): For children who can't use |
| 5845 |
the normal stdin file descriptor, get a broken one. |
| 5846 |
* job.c (start_job_command): Avoid so many ifdefs and simplify |
| 5847 |
the invocation of child_execute_job() |
| 5848 |
(child_execute_job): move the fork operation here so it can |
| 5849 |
return early for the parent process. Switch to use vfork(). |
| 5850 |
* function.c (func_shell_base): Use new child_execute_job() and |
| 5851 |
simplify ifdefs. |
| 5852 |
* job.h, main.c, remote-cstms.c, vmsjobs.c, w32os.c: Update |
| 5853 |
declarations and calls. |
| 5854 |
|
| 5855 |
2016-03-09 Paul Smith <[email protected]> |
| 5856 |
|
| 5857 |
* job.c (exec_command): [SV 47365] Show error on exec failure. |
| 5858 |
|
| 5859 |
2016-03-08 Paul Smith <[email protected]> |
| 5860 |
|
| 5861 |
[SV 46261] Use pselect() for jobserver where supported. |
| 5862 |
* Makefile.am, configure.ac: Check for pselect() and sys/select.h. |
| 5863 |
* main.c (main): Block SIGCHLD if we have pselect() support. |
| 5864 |
* posixos.c (jobserver_acquire): If we support pselect() then use |
| 5865 |
it to query the jobserver pipe, while also listening for SIGCHLD. |
| 5866 |
Also pselect() supports a timeout so avoid alarm() calls. |
| 5867 |
|
| 5868 |
Clean up some compiler warnings. |
| 5869 |
* commands.c, commands.h: Use unsigned char for flags. |
| 5870 |
* dir.c: Use time_t and size_t, and char for a boolean value. |
| 5871 |
* job.c: Use unsigned and char. |
| 5872 |
* read.c: Return a signed type since -1 is a valid return code. |
| 5873 |
|
| 5874 |
Extract jobserver implementation into OS-specific files. |
| 5875 |
* os.h, posixos.c, w32/w32os.c: New files implementing jobserver. |
| 5876 |
* job.c, job.h, main.c, makeint.h: Move content to new files. |
| 5877 |
* w32/include/sub_proc.h, w32/subproc/sub_proc.c: Ditto. |
| 5878 |
* Makefile.am: Build and package OS-specific files. |
| 5879 |
* build_w32.bat, make_msvc_net2003.vcproj, README.W32.template: |
| 5880 |
Update for new files, and clean up the build. |
| 5881 |
* POTFILES.in, maintMakefile, NMakefile.template: Ditto. |
| 5882 |
* w32/subproc/build.bat: Delete as unused. |
| 5883 |
|
| 5884 |
[SV 46261] Add more EINTRLOOP wrappers. |
| 5885 |
This cannot be a perfect solution because there are always other |
| 5886 |
possible places EINTR can happen, including external libraries |
| 5887 |
such as gettext, Guile etc. |
| 5888 |
|
| 5889 |
2016-02-29 Paul Smith <[email protected]> |
| 5890 |
|
| 5891 |
* strcache.c (add_hugestring): [SV 46832] Support huge strings. |
| 5892 |
The strcache was limited to strings of length 65535 or less, |
| 5893 |
because the length is kept in an unsigned short. To support |
| 5894 |
huge strings add a new simple linked list, which we don't try |
| 5895 |
to hash. |
| 5896 |
|
| 5897 |
* strcache.c (add_string): [SV 47071] Handle huge initial string. |
| 5898 |
If the very first string added to the string cache is more than |
| 5899 |
half the maximum size, we failed when moving the only strcache |
| 5900 |
buffer to the full list. |
| 5901 |
|
| 5902 |
[SV 47151] Exit with 1 when checking recursive make -q |
| 5903 |
* job.h (struct child): New bit to mark recursive command lines. |
| 5904 |
* job.c (start_job_command): Set the recursive command line bit. |
| 5905 |
(reap_children): If the child is a recursive command and it exits |
| 5906 |
with 1 during question mode, don't print an error and exit with 1. |
| 5907 |
* tests/scripts/options/dash-q: Add a regression test. |
| 5908 |
|
| 5909 |
* main.c (define_makeflags): Add parens to avoid GCC warning. |
| 5910 |
|
| 5911 |
2016-02-29 Paul Smith <[email protected]> |
| 5912 |
|
| 5913 |
* tests/scripts/features/archives: Handle deterministic archives. |
| 5914 |
Newer versions of binutils allow ar to be compiled to generate |
| 5915 |
"deterministic archives" by default: in this mode no timestamp |
| 5916 |
information is generated in the static archive, which utterly |
| 5917 |
breaks GNU make's archive updating capability. Debian and Ubuntu |
| 5918 |
have turned this feature on by default in their distributions |
| 5919 |
which causes the regression tests to fail. |
| 5920 |
|
| 5921 |
Update the regression tests to check for the availability of the |
| 5922 |
"U" option to ar which disables deterministic archives and allows |
| 5923 |
GNU make's archive support to work properly again. |
| 5924 |
|
| 5925 |
2016-02-28 Paul Smith <[email protected]> |
| 5926 |
|
| 5927 |
Update Copyright statements for the new year. |
| 5928 |
|
| 5929 |
* doc/make.texi: [SV 47163] Fix typo in 'ifdef' documentation. |
| 5930 |
|
| 5931 |
* doc/make.texi: [SV 35455] Add more uses for Empty Recipes. |
| 5932 |
|
| 5933 |
2015-11-07 Gisle Vanem <[email protected]> |
| 5934 |
|
| 5935 |
Fix diagnostics on MS-Windows when environment is too large |
| 5936 |
* w32/subproc/sub_proc.c (process_begin): Fix test of the error |
| 5937 |
cause when the environment block is too large. |
| 5938 |
|
| 5939 |
2015-10-27 Eli Zaretskii <[email protected]> |
| 5940 |
|
| 5941 |
Update README.W32.template |
| 5942 |
* README.W32.template: Update for latest developments. Make it |
| 5943 |
clear we don't recommend using HAVE_CASE_INSENSITIVE_FS in |
| 5944 |
general. |
| 5945 |
|
| 5946 |
[SV 46304] Don't invoke C++ compiler on C sources on MS-Windows |
| 5947 |
* default.c (default_variables) [HAVE_CASE_INSENSITIVE_FS]: Make |
| 5948 |
COMPILE.C and LINK.C be synonyms for COMPILE.c and LINK.c, |
| 5949 |
respectively. |
| 5950 |
|
| 5951 |
2015-09-23 Eli Zaretskii <[email protected]> |
| 5952 |
|
| 5953 |
[SV 45838] When invoking w32 programs, don't use free'd memory. |
| 5954 |
* w32/subproc/sub_proc.c (process_begin): Freeing argv[0] makes |
| 5955 |
the other argv[i] pointers invalid, so need to allocate a new |
| 5956 |
array and copy argv[i] for i != 0 first, replacing argv[0] with |
| 5957 |
the batch file name, before we can free argv[0]. |
| 5958 |
|
| 5959 |
2015-07-13 Paul Smith <[email protected]> |
| 5960 |
|
| 5961 |
* implicit.c (pattern_search): [SV 43677] Mark files secondary. |
| 5962 |
In order to fix SV 12267 we were marking the prerequisites of |
| 5963 |
implicit (pattern) targets that existed elsewhere in the makefile |
| 5964 |
as precious to keep them from being deleted as intermediate files. |
| 5965 |
However this also keeps them from being deleted on error. Instead |
| 5966 |
mark them as secondary. |
| 5967 |
* tests/scripts/targets/DELETE_ON_ERROR: Test DELETE_ON_ERROR. |
| 5968 |
|
| 5969 |
2015-07-12 Paul Smith <[email protected]> |
| 5970 |
|
| 5971 |
[SV 28092] Preserve the exit status of the $(shell...) function. |
| 5972 |
Add a new variable .SHELLSTATUS which holds the exit status of the |
| 5973 |
last-invoked shell function or != assignment. |
| 5974 |
|
| 5975 |
* NEWS, doc/make.texi: Document the change. |
| 5976 |
* function.c (shell_completed, msdos_openpipe, func_shell_base): Add |
| 5977 |
shell_completed() to handle the completion of the shell, by setting |
| 5978 |
.SHELLSTATUS. Call it where needed. |
| 5979 |
* job.c (child_handler): Call shell_completed(). |
| 5980 |
* tests/scripts/functions/shell: Add tests for .SHELLSTATUS. |
| 5981 |
|
| 5982 |
2015-07-12 Paul Smith <[email protected]> |
| 5983 |
|
| 5984 |
* tests/scripts/misc/fopen-fail: [SV 42390] Increase test timeout. |
| 5985 |
* Makefile.am (check-regression): Force ulimit -n for fopen-fail test. |
| 5986 |
|
| 5987 |
* job.c: [SV 43936] Check sigaction for error return. |
| 5988 |
|
| 5989 |
[SV 45049] Check for '$' being the last character in a string. |
| 5990 |
* expand.c (variable_expand_string): Add a single '$' if '$' ends the |
| 5991 |
string. |
| 5992 |
* read.c (find_char_unquote, get_next_mword): Stop if '$' ends the |
| 5993 |
string. |
| 5994 |
* variable.c (parse_variable_definition): Ditto. |
| 5995 |
|
| 5996 |
* read.c (unescape_char): [SV 45050] Handle final backslashes. |
| 5997 |
If the last thing in the string to be unescaped is a backslash, |
| 5998 |
stop without reading beyond the end of the string. |
| 5999 |
|
| 6000 |
* strcache.c: [SV 45275] Handle very long strings. |
| 6001 |
Our previous behavior for handling too-long strings involved |
| 6002 |
increasing the size of the default string cache buffer, but the |
| 6003 |
implementation was incomplete. Instead, create a one-off large |
| 6004 |
string cache entry and add it directly to the full cache list |
| 6005 |
without changing the default buffer size. |
| 6006 |
|
| 6007 |
2015-07-12 Duncan Moore <[email protected]> (tiny change) |
| 6008 |
|
| 6009 |
* job.c [RISCOS]: Remove logic that is no longer required. |
| 6010 |
|
| 6011 |
2015-07-12 Paul Smith <[email protected]> |
| 6012 |
|
| 6013 |
* remake.c (update_file): [SV 44742] Keep double-colon rule status. |
| 6014 |
Fix suggested by Everett Boyer <[email protected]> |
| 6015 |
|
| 6016 |
2015-07-10 James Johnston <[email protected]> (tiny change) |
| 6017 |
|
| 6018 |
[SVN 45515] Check exit status of sub-make in subproc.bat |
| 6019 |
* subproc.bat: Exit when sub-make invocation fails. |
| 6020 |
|
| 6021 |
2015-07-10 Eli Zaretskii <[email protected]> |
| 6022 |
|
| 6023 |
[SV 45515] Ignore Windows-specific build artifacts |
| 6024 |
* .gitignore: Ignore *.exe, *.dll.a, *.lib, *pdb, and a few more MSVC |
| 6025 |
specific artifacts. |
| 6026 |
Suggested by James Johnston <[email protected]> |
| 6027 |
|
| 6028 |
2015-02-28 Eli Zaretskii <[email protected]> |
| 6029 |
|
| 6030 |
[SV 44348] Fix handling of shell widlcards on MS-Windows. |
| 6031 |
* job.c (construct_command_argv_internal): If shell wildcard |
| 6032 |
characters are found inside a string quoted with "..", give up the |
| 6033 |
fast route and go through the shell. Fixes Savannah bug #44348. |
| 6034 |
|
| 6035 |
2015-01-27 John Malmberg <[email protected]> |
| 6036 |
|
| 6037 |
Fix bs-nl handling, exit and Environment for VMS. |
| 6038 |
This fix required a complete rewrite of the command parser vmsjobs.c |
| 6039 |
child_execute_job. The old parser had too many incorrect assumptions |
| 6040 |
about DCL commands and could not be repaired to extended. |
| 6041 |
|
| 6042 |
The parser now more closely parses VMS commands and handles quoted |
| 6043 |
commands and redirection. Command File mode has been improved, but can |
| 6044 |
not fully support bs-nl syntax. |
| 6045 |
|
| 6046 |
VMS Unix shell simulation has been improved. |
| 6047 |
|
| 6048 |
* commands.c: vms_comma_separator is now a run-time setting. |
| 6049 |
* function.c: vms_comma_separator is now a run-time setting. |
| 6050 |
* function.c(func_basename_dir) now reports "[]" or "./" based on |
| 6051 |
VMS crtl runtime setting. |
| 6052 |
* job.c(start_job_command): VMS Handle empty commands propery. |
| 6053 |
* main.c: Add VMS environment variables for run-time settings. |
| 6054 |
* vms_legacy_behavior - Force older behavior. |
| 6055 |
* vms_comma_separator - Commas or spaces for separators. |
| 6056 |
* vms_unix_simulation - Enhanced Posix shell simulation features. |
| 6057 |
* Detect if VMS CRTL is set to report Unix paths instead of VMS. |
| 6058 |
* ':' and '>' are also MAP_DIRSEP on VMS. |
| 6059 |
* makeint.h: Add VMS run-time option variables. |
| 6060 |
* readme.vms: Update to current behavior. |
| 6061 |
* variable.c(define_variable_in_set): Fix VMS Environment variable |
| 6062 |
lookup. |
| 6063 |
* variable.c(define_automatic_variables): Remove some VMS specific |
| 6064 |
automatic variables and use the Unix ones instead. |
| 6065 |
* vms_export_symbol.c: Set max symbol size correctly. |
| 6066 |
* vmsjobs.c: child_execute_job() complete rewrite of VMS comand |
| 6067 |
parsing. |
| 6068 |
* vmsjobs.c(build_vms_cmd): VMS commmand building with shell simulation. |
| 6069 |
|
| 6070 |
2014-12-27 Christian Boos <[email protected]> (tiny change) |
| 6071 |
|
| 6072 |
Fix $(shell) on hosts with 64-bit pid_t. |
| 6073 |
* function.c: Use pid_t for shell_function_pid. |
| 6074 |
* job.c: Likewise. |
| 6075 |
|
| 6076 |
2014-10-20 Paul Smith <[email protected]> |
| 6077 |
|
| 6078 |
* main.c (main): [SV 43434] Handle NULL returns from ttyname(). |
| 6079 |
|
| 6080 |
2014-10-20 Benedikt Morbach <[email protected]> (tiny change) |
| 6081 |
|
| 6082 |
* tests/scripts/features/archives: [SV 43405] override AR variable. |
| 6083 |
|
| 6084 |
2014-10-20 John Malmberg <[email protected]> |
| 6085 |
|
| 6086 |
Fix VMS implicit rules and UNIX paths. |
| 6087 |
This fixes VMS implicit rules and UNIX style pathname handling. |
| 6088 |
It also fixes some of the VMS style pathname handling, more work |
| 6089 |
there will be needed later. |
| 6090 |
TODO: There are other case insensitive platforms besides VMS. |
| 6091 |
We need to find out why there is extra VMS code for this. This |
| 6092 |
indicates either the extra VMS code is not needed, or the case |
| 6093 |
insensitive support may not be complete on the other case |
| 6094 |
insensitive platforms. |
| 6095 |
|
| 6096 |
* default.c: Add missing definitions to default_suffix_rules[] and |
| 6097 |
default_variables[]. |
| 6098 |
TODO: As it is important that VMS DCL mode definitions must always |
| 6099 |
be a superset of UNIX definitions, a better way of maintaining the |
| 6100 |
VMS DCL mode definitions should be devised. |
| 6101 |
* dir.c (downcase_inplace): Add a reentrant downcase() routine. |
| 6102 |
Add future support for VMS 8.2+ _USE_STD_STAT macro which will |
| 6103 |
disable a lot of VMS specific code from compiling. |
| 6104 |
(dir_file_exists_p): vmsify filename only if directory name has VMS |
| 6105 |
directory delimiters. |
| 6106 |
(file_exists_p): Handle both VMS and UNIX directories. |
| 6107 |
(file_impossible): Handle both VMS and Unix directories. Track |
| 6108 |
whether a VMS format path is needed for the return value. |
| 6109 |
* file.c (lookup_file): Check if vmsify is needed; handle UNIX paths. |
| 6110 |
* implicit.c (pattern_search): Enable UNIX paths. |
| 6111 |
* read.c (parse_file_seq): Enable UNIX paths. |
| 6112 |
* remake.c (f_mtime): Fix gpath_search call for VMS paths. |
| 6113 |
* rule.c (count_implicit_rule): Enable UNIX paths, Fix VMS paths. |
| 6114 |
* vpath.c (selective_vpath_search): Enable UNIX paths. |
| 6115 |
|
| 6116 |
2014-10-20 John Malmberg <[email protected]> |
| 6117 |
|
| 6118 |
Update README.VMS and move news to the NEWS file |
| 6119 |
* NEWS: Merge in VMS history. |
| 6120 |
* README.VMS: Remove VMS history, document current behavior and |
| 6121 |
known issues. |
| 6122 |
|
| 6123 |
2014-10-20 John Malmberg <[email protected]> |
| 6124 |
|
| 6125 |
[SV 41758]: Fix archive support for VMS. |
| 6126 |
Upated to match change to run_make_tests and some future fixes to |
| 6127 |
make on VMS. |
| 6128 |
|
| 6129 |
* arscan.c: Use ANSI compatible pragmas instead of VAX C extensions. |
| 6130 |
* tests/scripts/features/archives: Fix tests to use VMS rules and |
| 6131 |
answers when running on VMS and using DCL as a shell. |
| 6132 |
* tests/scripts/features/vpath3: Fix epected answer on test when |
| 6133 |
run on VMS. |
| 6134 |
* tests/scripts/vms/library: (New) Test the VMS library rules that |
| 6135 |
are not tested by existing tests. |
| 6136 |
|
| 6137 |
2014-10-20 John Malmberg <[email protected]> |
| 6138 |
|
| 6139 |
[SV 42447]: VMS simulate exporting symbols |
| 6140 |
This also includes fixing the most of the exit handling code for VMS. |
| 6141 |
|
| 6142 |
Self tests: |
| 6143 |
Previously about 94 Tests in 36 categories fail. |
| 6144 |
Now about 45 tests in 22 categories fail. |
| 6145 |
|
| 6146 |
Because some tests do not properly clean up, the number of tests that |
| 6147 |
fail can vary by one or two test cases between consecutive runs. |
| 6148 |
|
| 6149 |
* Makefile.am: Add new VMS files. |
| 6150 |
* job.c: add prototype for vms_strsignal(). |
| 6151 |
* job.c: (child_error): Remove VMS specific code as no longer needed. |
| 6152 |
* job.c: (reap_children): The VMS specific code was setting the |
| 6153 |
status to 0 instead of setting it to the proper exit status. |
| 6154 |
* job.h: Add vms_launch_status to struct child. |
| 6155 |
* main.c: (main): Use environment variables for options to use MCR |
| 6156 |
* instead of a foreign command, and to always use command files for |
| 6157 |
subprocesses. |
| 6158 |
For VMS use (set_program_name) routine which is common to ports of |
| 6159 |
other GNU packages to VMS to set the program name used internally. |
| 6160 |
Use (vms_putenv_symbol) to set up symbols to be visible in child |
| 6161 |
programs, including recursive make launched by execve() |
| 6162 |
Start of Bash shell detection code for VMS. |
| 6163 |
* makefile.com: Need nested_include=none for building on VMS search |
| 6164 |
lists. Add vms_progname, vms_exit, and vms_export_symbol. |
| 6165 |
* makefile.vms: Need nested_include=none for building on VMS search |
| 6166 |
lists. Add vms_progname, vms_exit, vms_export_symbol. |
| 6167 |
* makeint.h: Make sure non-standard "VMS" macro is defined. Add |
| 6168 |
prototypes for new VMS routines. Remove VMS-specific failure codes. |
| 6169 |
* vmsjobs.c: Add VMS POSIX exit code constants. |
| 6170 |
(_is_unixy_shell): Detect Bash shell. |
| 6171 |
(vms_strsignal): simulate strsignal() on VMS. |
| 6172 |
(vmsHandleChildTerm): fix to properly report failed LIB$SPAWN() exit |
| 6173 |
status codes. Remove code that duplicated code in job.c. |
| 6174 |
(child_execute_job): Export environment symbols before spawning a |
| 6175 |
child and restore afterward unless option to use command files for |
| 6176 |
subprocesses is set. Improve handling of UNIX null commands ":". |
| 6177 |
* vms_exit.c: Provides vms_exit() to detect if an exit code is UNIX |
| 6178 |
or VMS, and converts the UNIX code into a VMS exit code. |
| 6179 |
* vms_export_symbol.c: Routines to create DCL symbols that work like |
| 6180 |
shell aliases or exported shell symbols and clean them up on exit. |
| 6181 |
* vms_export_symbol_test.com: Unit test for vms_export_symbol.c |
| 6182 |
* vms_progname.c: New file: VMS specific replace for progname.c that |
| 6183 |
is used in some GNU projects. |
| 6184 |
|
| 6185 |
2014-10-20 John Malmberg <[email protected]> |
| 6186 |
|
| 6187 |
Set up for running tests on VMS. |
| 6188 |
* run_make_tests.pl: set $port_type to be 'VMS-DCL' when the test are |
| 6189 |
run from the VMS DCL Interpreter. When the tests are run from GNV |
| 6190 |
on VMS, the $port_type will be 'UNIX'. |
| 6191 |
* run_make_tests.com: VMS search list support. This is needed for |
| 6192 |
using a search list such as prj_root = lcl_root:,vms_root:,src_root: |
| 6193 |
for building and testing. |
| 6194 |
|
| 6195 |
2014-10-09 Paul Smith <[email protected]> |
| 6196 |
|
| 6197 |
* configure.ac, NEWS, README.git: Set up for the next release. |
| 6198 |
|
| 6199 |
2014-10-05 Paul Smith <[email protected]> |
| 6200 |
|
| 6201 |
GNU Make release 4.1. |
| 6202 |
|
| 6203 |
2014-10-02 Eli Zaretskii <[email protected]> |
| 6204 |
|
| 6205 |
Fix Cygwin compilation error. |
| 6206 |
* job.c (construct_command_argv_internal) [HAVE_DOS_PATHS]: Fix |
| 6207 |
initializer for sh_chars_sh. |
| 6208 |
Reported by Denis Excoffier<[email protected]>. |
| 6209 |
|
| 6210 |
2014-10-01 Gisle Vanem <[email protected]> |
| 6211 |
|
| 6212 |
Fix last commit. |
| 6213 |
|
| 6214 |
* makeint.h (ftruncate): Define also for __WATCOMC__. |
| 6215 |
|
| 6216 |
2014-10-01 Eli Zaretskii <[email protected]> |
| 6217 |
|
| 6218 |
Avoid compilation warnings. |
| 6219 |
* main.c (find_and_set_default_shell, main) [WINDOWS32]: Declare |
| 6220 |
variables 'const char *' to avoid compiler warnings. |
| 6221 |
* job.c (construct_command_argv_internal) [!NDEBUG]: Declare 'end' |
| 6222 |
and set it only if NDEBUG is not defined, to avoid compiler |
| 6223 |
warnings. |
| 6224 |
|
| 6225 |
Treat redirection of standard handles on Windows as it is done on Unix. |
| 6226 |
* job.c (start_job_command) [WINDOWS32]: Compute outfd and errfd |
| 6227 |
as on Posix platforms, and pass the results to process_easy. |
| 6228 |
* function.c (windows32_openpipe) [WINDOWS32]: Accept an |
| 6229 |
additional argument ERRFD and use it for redirecting the standard |
| 6230 |
error handle passed to the subprocess. |
| 6231 |
(func_shell_base) [WINDOWS32]: Pass the computed errfd to |
| 6232 |
windows32_openpipe. |
| 6233 |
|
| 6234 |
2014-09-30 Paul Smith <[email protected]> |
| 6235 |
|
| 6236 |
Update Copyright statements for 2014. |
| 6237 |
|
| 6238 |
* tests/scripts/features/load: Avoid unused variable warnings. |
| 6239 |
|
| 6240 |
* loadapi.c (gmk_eval): Use C90 syntax. |
| 6241 |
|
| 6242 |
2014-09-30 Hartmut Becker <[email protected]> |
| 6243 |
|
| 6244 |
* job.c: fix make action continuation lines. |
| 6245 |
* vmsjobs.c: fix writing DCL command files when trimming (white |
| 6246 |
spaces and $ signs) especially after a split (command continuation). |
| 6247 |
|
| 6248 |
2014-09-15 Bernhard Reutner-Fischer <[email protected]> (tiny change) |
| 6249 |
|
| 6250 |
* configure.ac: Fix spacing in helptext of customs |
| 6251 |
|
| 6252 |
2014-09-15 Eli Zaretskii <[email protected]> |
| 6253 |
|
| 6254 |
Support MAKE_TERMOUT and MAKE_TERMERR on MS-Windows. |
| 6255 |
* w32/compat/posixfcn.c (isatty, ttyname): New functions. |
| 6256 |
* config.h.W32.template (HAVE_TTYNAME): Define. Add a prototype |
| 6257 |
for ttyname. |
| 6258 |
|
| 6259 |
2014-09-15 Paul Smith <[email protected]> |
| 6260 |
|
| 6261 |
* loadapi.c (gmk_eval): [SV 43221] Preserve var buff content for eval. |
| 6262 |
|
| 6263 |
* main.c, NEWS, doc/make.text: Rename MAKE_TTY* to MAKE_TERM* |
| 6264 |
|
| 6265 |
2014-09-14 Paul Smith <[email protected]> |
| 6266 |
|
| 6267 |
* main.c (main): Set MAKE_TTYOUT and MAKE_TTYERR. |
| 6268 |
* configure.ac: Test for isatty() and ttyname() |
| 6269 |
* makeint.h: provide a substitute for ttyname() if it's not available. |
| 6270 |
* config.ami.template, config.h-vms.template, config.h.W32.template: |
| 6271 |
define/undefine HAVE_ISATTY/HAVE_TTYNAME macros. |
| 6272 |
* NEWS, doc/make.texi: Document these new variables. |
| 6273 |
|
| 6274 |
2014-09-07 Paul Smith <[email protected]> |
| 6275 |
|
| 6276 |
* tests/config-flags.pm.in, tests/scripts/features/archives: [SV 43046] |
| 6277 |
Use the "ar" program detected by configure when running the test suite. |
| 6278 |
|
| 6279 |
* doc/make.texi: Clarify implicit rule lookup of phony targets |
| 6280 |
Reported by Frank Heckenbach <[email protected]> |
| 6281 |
|
| 6282 |
2014-09-07 Hartmut Becker <[email protected]> |
| 6283 |
|
| 6284 |
Fix and enhance VMS library support. |
| 6285 |
* ar.c: fix VMS library search for members, which do not have |
| 6286 |
suffixes, aka filename extensions. |
| 6287 |
* arscan.c: fix time conversion and library callback routines. |
| 6288 |
* default.c: more suffixes and automatically create the VMS library |
| 6289 |
if it doesn't exists. |
| 6290 |
|
| 6291 |
Enhance VMS exporting make environment variables. |
| 6292 |
* config.h-vms.template: add feature macro USE_DCL_COM_FILE to always |
| 6293 |
write a DCL command file, enabled by default. |
| 6294 |
* vmsjobs.c: with USE_DCL_COM_FILE enabled write make variables as DCL |
| 6295 |
symbol assignments into the command file. This enables printing |
| 6296 |
directory and make level info for recursive use of make. This also |
| 6297 |
enables forced DCL symbol substitution in the actions. |
| 6298 |
|
| 6299 |
Fix VMS automatic variable expansion |
| 6300 |
* function.c: add VMS code to func_notdir_suffix and func_basename_dir |
| 6301 |
to work on comma separated lists; this fixes the expansion of |
| 6302 |
$(^D), $(+D) and the F variants for VMS. |
| 6303 |
|
| 6304 |
* main.c [VMS]: Say that parallel jobs (-j) are not supported on VMS |
| 6305 |
|
| 6306 |
Enhance/fix VMS ONESHELL implementation and command execution |
| 6307 |
* job.c, vmsjobs.c: fix some double quote and new line handling; |
| 6308 |
implement ONESHELL with writing multiple lines into one DCL command |
| 6309 |
procedure; in ONESHELL allow VMS/make internal redirection only on the |
| 6310 |
first line; fix the created DCL command procedure, which didn't abort |
| 6311 |
on errors; return correct exit status from the DCL command procedure; |
| 6312 |
preserve current procedure verification; make the generated command |
| 6313 |
procedure more robust. |
| 6314 |
|
| 6315 |
Enhance/fix VMS setting of program name, MAKE/MAKE_COMMAND variables |
| 6316 |
* default.c, main.c, makeint.h, vmsfunctions.c: prefix argv[0] with |
| 6317 |
"mcr " for MAKE/MAKE_COMMAND and set the program name to the image |
| 6318 |
filename (without the .exe;version) |
| 6319 |
* vmsfunctions.c: remove obsolete code |
| 6320 |
* vmsify: use xmalloc |
| 6321 |
|
| 6322 |
Enhance/fix VMS exit code handling. |
| 6323 |
* commands.c, function.c, hash.c, job.c, main.c, output.c: |
| 6324 |
use MAKE exit codes. |
| 6325 |
* makeint.h: encode make exit codes so that they are VMS compatible. |
| 6326 |
* job.c: check child exit code for VMS style exit codes. |
| 6327 |
* vmsjobs.c: save and return VMS style exit code. |
| 6328 |
|
| 6329 |
Enhance/fix VMS multi-line support. |
| 6330 |
* job.c: split the command line at a newline. |
| 6331 |
* default.c, vmsjobs.c: change ECHO variable to a pseudo builtin, |
| 6332 |
which ensures that the VMS/DCL ECHO ("write sys$output") is used |
| 6333 |
and is correctly quoted. |
| 6334 |
* vmsjobs.c: remove unused builtin 'rm'. |
| 6335 |
|
| 6336 |
* config_flags_pm.com, [RENAMED test_make.com] run_make_tests.com: |
| 6337 |
Moved into tests directory. |
| 6338 |
|
| 6339 |
Enhance/fix VMS build environment |
| 6340 |
* config.h-vms.template: make sure the CRTL version is known |
| 6341 |
* makefile.com: always compile/link the guile module, remove VAXCRTL |
| 6342 |
parameter, new LIST parameter |
| 6343 |
* makefile.vms: always compile/link the guile module, use more |
| 6344 |
complete dependencies |
| 6345 |
* prepare_vms.com: helper to create a VMS config file when building |
| 6346 |
from a snapshot of the repository |
| 6347 |
|
| 6348 |
2014-09-07 Paul Smith <[email protected]> |
| 6349 |
|
| 6350 |
* configure.ac, maintMakefile, w32/Makefile.am: Fix autotools issues. |
| 6351 |
Reported by Paul Eggert <[email protected]> |
| 6352 |
|
| 6353 |
2014-08-30 Eli Zaretskii <[email protected]> |
| 6354 |
|
| 6355 |
Change the order of "makefile" and "Makefile" to match the manual. |
| 6356 |
|
| 6357 |
Fix regression with "makefile" not being found on MS-Windows. |
| 6358 |
* read.c (read_all_makefiles) [WINDOWS32]: Recognize "makefile", |
| 6359 |
all-lowercase, as a makefile. Reported by Michael Waeber |
| 6360 |
<[email protected]>. |
| 6361 |
|
| 6362 |
2014-07-16 Eli Zaretskii <[email protected]> |
| 6363 |
|
| 6364 |
Fix compilation on MS-Windows. |
| 6365 |
* makeint.h [WINDOWS32]: Don't declare 'program' as 'const char *', |
| 6366 |
since it is modified in 'main'. |
| 6367 |
|
| 6368 |
2014-07-12 Eli Zaretskii <[email protected]> |
| 6369 |
|
| 6370 |
[SV 42695] Fix compilation error on MS-Windows. |
| 6371 |
* main.c [WINDOWS32]: Don't declare 'program' as 'const char *', |
| 6372 |
since it is modified in 'main'. |
| 6373 |
|
| 6374 |
2014-07-12 Jonny Grant <[email protected]> (tiny change) |
| 6375 |
|
| 6376 |
Fix defalt_makefiles[] for MS-Windows. |
| 6377 |
* read.c (read_all_makefiles) [WINDOWS32]: Remove the redundant |
| 6378 |
"makefile" and add "makefile.mak". |
| 6379 |
|
| 6380 |
2014-07-07 Fredrik Fornwall <[email protected]> (tiny change) |
| 6381 |
|
| 6382 |
* arscan.c [ANDROID]: Android has no ar.h but supports archives. |
| 6383 |
|
| 6384 |
2014-07-07 Paul Smith <[email protected]> |
| 6385 |
|
| 6386 |
* read.c (eval): [SV 41677] Correct test for TAB vs. 8 spaces. |
| 6387 |
|
| 6388 |
2014-07-07 Piotr Jaroszynski <[email protected]> (tiny change) |
| 6389 |
|
| 6390 |
* output.c (pump_from_tmp): [SV 42378] Flush the output file regularly. |
| 6391 |
|
| 6392 |
2014-07-07 John Malmberg <[email protected]> |
| 6393 |
|
| 6394 |
Update the regression test harness to support VMS. |
| 6395 |
* config_flags_pm.com, test_make.com: set up and run the regression |
| 6396 |
test environment on VMS. |
| 6397 |
* tests/run_make_tests.pl [VMS]: Use an alternate rmdir() |
| 6398 |
implementation on VMS. |
| 6399 |
(run_make_with_options) [VMS]: Provide VMS-specific quoting and shell |
| 6400 |
invocations. |
| 6401 |
(set_more_defaults) [VMS]: Set default values when running on VMS. |
| 6402 |
* tests/test_driver.pl (vms_get_process_logicals) [VMS]: Retrieve the |
| 6403 |
proper values from %ENV on VMS. |
| 6404 |
(resetENV) [VMS]: Use it. |
| 6405 |
(toplevel) [VMS]: Fix a bug with opendir() on some logical_devices. |
| 6406 |
(compare_output) [VMS]: Convert VMS test output to a "standard" format. |
| 6407 |
(_run_command) [VMS]: Handle signals and exit codes the VMS way. |
| 6408 |
(remove_directory_tree_inner) [VMS]: Unlink all versions of the file. |
| 6409 |
|
| 6410 |
2014-07-07 Paul Smith <[email protected]> |
| 6411 |
|
| 6412 |
* various: Assume ISO C89-compliant free() implementation. |
| 6413 |
|
| 6414 |
* maintMakefile, various: Improve constification of the codebase. |
| 6415 |
|
| 6416 |
[SV 41983] Support omitting the text argument to $(file ...) |
| 6417 |
Reported by Tim Murphy <[email protected]> |
| 6418 |
* function.c (func_file): Only write TEXT if it is not NULL. |
| 6419 |
* NEWS, doc/make.texi: Document the new feature |
| 6420 |
* tests/scripts/functions/file: Verify that the no-text version of |
| 6421 |
$(file ...) works and doesn't add a newline. |
| 6422 |
|
| 6423 |
2014-05-13 Jacques Germishuys <[email protected]> |
| 6424 |
|
| 6425 |
NMakefile.template ($(OUTDIR)/posixfcn.obj): Fix a typo. |
| 6426 |
|
| 6427 |
2014-05-01 Paul Smith <[email protected]> |
| 6428 |
|
| 6429 |
[SV 42249] Propagate correct rule status results. |
| 6430 |
* remake.c (update_file, update_file_1, check_dep): Return an enum |
| 6431 |
update_status value instead of an int, and keep the highest value we |
| 6432 |
find as we walk the graph so that the ultimate status is correct. |
| 6433 |
* tests/scripts/options/dash-q: Add a test for updating prerequisites. |
| 6434 |
|
| 6435 |
2014-02-08 Paul Smith <[email protected]> |
| 6436 |
|
| 6437 |
* Rename MAP_PATHSEP to MAP_DIRSEP. |
| 6438 |
|
| 6439 |
* configure.ac: Fixup for newer autoconf/automake |
| 6440 |
|
| 6441 |
2014-02-08 Ray Donnelly <[email protected]> (tiny change) |
| 6442 |
|
| 6443 |
* output.c: Ensure space for final nul byte in fmtbuf. |
| 6444 |
|
| 6445 |
2014-02-07 Gisle Vanem <[email protected]> (tiny change) |
| 6446 |
|
| 6447 |
Improve error reporting in the Windows port when env size is too large. |
| 6448 |
w32/subproc/misc.c (arr2envblk): Compute and return the size of |
| 6449 |
the environment passed to child process. |
| 6450 |
|
| 6451 |
w32/subproc/sub_proc.c (process_begin): If the call to |
| 6452 |
CreateProcess failed with EINVAL, and the required environment |
| 6453 |
size was larger than 32KB, assume it's a Windows XP limitation, |
| 6454 |
and display an error message to that effect. |
| 6455 |
|
| 6456 |
w32/subproc/proc.h (arr2envblk): Update prototype. |
| 6457 |
|
| 6458 |
2014-02-01 Paul Smith <[email protected]> |
| 6459 |
|
| 6460 |
* job.c (set_child_handler_action_flags): [SV 41341] |
| 6461 |
Ensure signal handler is in place before alarm(1). |
| 6462 |
|
| 6463 |
2014-01-20 Alan Hourihane <[email protected]> (tiny change) |
| 6464 |
|
| 6465 |
* configure.ac: [SV 40790] Fix load autoconf variables. |
| 6466 |
|
| 6467 |
2014-01-17 Pavel Fedin <[email protected]> (tiny change) |
| 6468 |
|
| 6469 |
Allow the EMX build to use output_sync. |
| 6470 |
job.c (start_job_command): Move the child output diversion out |
| 6471 |
of non-EMX branch. |
| 6472 |
[__EMX__]: Don't use fixed FD_STDOUT and FD_STDERR in the call to |
| 6473 |
child_execute_job. |
| 6474 |
|
| 6475 |
2014-01-12 Paul Smith <[email protected]> |
| 6476 |
|
| 6477 |
* commands.c: [SV 40789] Remove unneeded header dlfcn.h |
| 6478 |
|
| 6479 |
* main.c (die): Close output_context AND make_sync. |
| 6480 |
die() can be invoked inside a separate output_context, if the |
| 6481 |
$(error ...) function is expanded as part of a recipe. |
| 6482 |
|
| 6483 |
2014-01-11 Pavel Fedin <[email protected]> (tiny change) |
| 6484 |
|
| 6485 |
Fix .LIBPATTERNS for MS-Windows builds. |
| 6486 |
default.c (.LIBPATTERNS) [__CYGWIN__ || WINDOWS32]: Provide |
| 6487 |
library patterns for MS-Windows. |
| 6488 |
|
| 6489 |
2013-11-27 Paul Smith <[email protected]> |
| 6490 |
|
| 6491 |
* w32/*: Remove TABs from the source code. |
| 6492 |
I know whitespace commits are annoying, but having these TABs is |
| 6493 |
causing me to miss things when I search through the code. This |
| 6494 |
doesn't try to change the w32 code to meet GNU coding standards. |
| 6495 |
|
| 6496 |
* main.c (decode_env_switches): Ensure we have enough space. |
| 6497 |
Reported (with patch) by Gerte Hoogewerf <[email protected]> |
| 6498 |
|
| 6499 |
2013-11-27 Stephan T. Lavavej <[email protected]> (tiny change) |
| 6500 |
|
| 6501 |
Solve some Windows build issues. |
| 6502 |
* main.c (main): Use ONS(), not OSN(). |
| 6503 |
(prepare_mutex_handle_string) [WINDOWS32]: Use %Ix formatting to |
| 6504 |
support both 32bit and 64bit systems. |
| 6505 |
* job.c (free_child, new_job): Use ONS(), not OSN(). |
| 6506 |
* w32/subproc/w32err.c (map_windws32_error_to_string): Use O() when |
| 6507 |
calling fatal(). |
| 6508 |
|
| 6509 |
2013-11-24 Paul Smith <[email protected]> |
| 6510 |
|
| 6511 |
* features/loadapi (test_expand): Allocate memory for the nul byte. |
| 6512 |
|
| 6513 |
* load.c (load_file): Reset the name length minus the symbol. |
| 6514 |
|
| 6515 |
* read.c (unescape_char): Use memmove() for overlapping memory. |
| 6516 |
|
| 6517 |
Fix memory leak during environment option decoding. |
| 6518 |
* main.c (decode_switches): Always make a copy of option arguments. |
| 6519 |
(decode_env_switches): Use a stack buffer to convert environment |
| 6520 |
switches for parsing. |
| 6521 |
|
| 6522 |
[SV 40226] Add a new type of switch: single-string options |
| 6523 |
* main.c (struct command_switch): Change the "string" types to "strlist" |
| 6524 |
and make "string" be a single-valued string instead. |
| 6525 |
(output_sync_option, jobserver_fds, sync_mutex): Change to string type. |
| 6526 |
(decode_output_sync_flags): Handle single strings instead of lists. |
| 6527 |
(prepare_mutex_handle_string): Ditto. |
| 6528 |
(main): Ditto. |
| 6529 |
(clean_jobserver): Ditto. |
| 6530 |
(init_switches): Handle the new type. |
| 6531 |
(decode_switches): Ditto. |
| 6532 |
(define_makeflags): Ditto. |
| 6533 |
|
| 6534 |
2013-11-23 Daniel Richard G <[email protected]> (tiny change) |
| 6535 |
|
| 6536 |
* load.c: [SV 40515] Define RTLD_GLOBAL if not set. |
| 6537 |
|
| 6538 |
2013-11-23 Paul Smith <[email protected]> |
| 6539 |
|
| 6540 |
[SV 40361] Don't use vsnprintf(), which is an ISO C99 function. |
| 6541 |
* output.c (error, fatal, message): Take an extra argument specifying |
| 6542 |
how many bytes are used by the formatted arguments. |
| 6543 |
(get_buffer): New function that allocates the requested buffer size. |
| 6544 |
Remove msc_vsnprintf(), vfmtconcat(), and fmtconcat() as unneeded. |
| 6545 |
* makeint.h: Declare various helper macros for generating output. |
| 6546 |
* *.c: Change all error(), fatal(), message() calls to use the macros, |
| 6547 |
or pass the extra length argument directly. |
| 6548 |
|
| 6549 |
2013-10-27 Paul Smith <[email protected]> |
| 6550 |
|
| 6551 |
* makeint.h (STOP_SET): [SV 40371] Cast to unsigned char. |
| 6552 |
* tests/scripts/misc/utf8: Test variable names with characters >127. |
| 6553 |
Fix suggested by Robert Bogomip <[email protected]> |
| 6554 |
|
| 6555 |
2013-10-24 Gerte Hoogewerf <[email protected]> |
| 6556 |
|
| 6557 |
Fix MS Visual Studio NET2003 build. |
| 6558 |
* make_msvc_net2003.vcproj: Do not exclude guile.c from compilation. |
| 6559 |
|
| 6560 |
2013-10-23 Christian Boos <[email protected]> |
| 6561 |
|
| 6562 |
Fix SV bug #40227 with respect to stack size set for the MSVC build. |
| 6563 |
* NMakefile.template (/STACK): Increase to 0x400000, mainly for |
| 6564 |
the 64-bit builds. Fixes SV bug #40227. |
| 6565 |
(guile): Uncomment. |
| 6566 |
|
| 6567 |
2013-10-23 Eli Zaretskii <[email protected]> |
| 6568 |
|
| 6569 |
Fix the MS-Windows build: now guile.c must always be compiled in. |
| 6570 |
* build_w32.bat: Always compile guile.c and link against guile.o. |
| 6571 |
Reported by Alexey Pavlov <[email protected]>. |
| 6572 |
|
| 6573 |
* makeint.h (guile_gmake_setup): Define prototype unconditionally, |
| 6574 |
to avoid compiler warnings. |
| 6575 |
|
| 6576 |
2013-10-22 Eli Zaretskii <[email protected]> |
| 6577 |
|
| 6578 |
Fix Savannah bug #31150 with failures due to setting window title. |
| 6579 |
* sub_proc.c (process_begin): Don't set startInfo.lpTitle, it |
| 6580 |
reportedly causes SV bug #31150, and according to MSDN it's a |
| 6581 |
no-no. |
| 6582 |
|
| 6583 |
Fix Savannah bug 40241 with Unixy file names as commands to MSYS shell. |
| 6584 |
* sub_proc.c: Include filedef.h and variable.h. |
| 6585 |
(process_begin): If exec_path was not found, but its first |
| 6586 |
character is '/', assume there's some shell magic, and invoke the |
| 6587 |
command through '$(SHELL) -c "COMMAND"'. Fixes SV bug#40241. |
| 6588 |
(make_command_line): Kludgey feature: if full_exec_path is "-c", |
| 6589 |
assume that argv[0] is not to be skipped, as it holds the command |
| 6590 |
string to be passed to the shell. |
| 6591 |
|
| 6592 |
2013-10-20 Paul Smith <[email protected]> |
| 6593 |
|
| 6594 |
* glob.c (glob) [SV 18123]: Cherry-pick glibc fix |
| 6595 |
Apply commit a471e96a5352a5f0bde6d32dd36d33524811a2b1 from |
| 6596 |
git://sourceware.org/git/glibc.git to fix |
| 6597 |
https://sourceware.org/bugzilla/show_bug.cgi?id=10278 |
| 6598 |
|
| 6599 |
* read.c (record_files): [SV 33034] Change fatal() to error() |
| 6600 |
Allows deprecated syntax. However we don't guarantee this syntax |
| 6601 |
will continue to be legal in the future. |
| 6602 |
Change suggested by David Boyce <[email protected]> |
| 6603 |
|
| 6604 |
* README.git: Add some missing release steps. |
| 6605 |
|
| 6606 |
2013-10-19 Paul Smith <[email protected]> |
| 6607 |
|
| 6608 |
[SV 40240] Use configure info to build load test shared libs |
| 6609 |
* tests/config-flags.pm.in: A new file containing variable assignments |
| 6610 |
for the test suite; these variables are set by configure to contain |
| 6611 |
the values detected there for compilers, flags, etc. |
| 6612 |
* tests/run_make_tests.pl: Require the config-flags.pm file |
| 6613 |
* tests/scripts/features/load, tests/scripts/features/loadapi: Use the |
| 6614 |
configure-provided values when building the shared test library. |
| 6615 |
* configure.ac: Replace tests/config-flags.pm.in |
| 6616 |
* Makefile.am: Make sure tests/config-flags.pm is up to date |
| 6617 |
|
| 6618 |
* maintMakefile (checkcfg.%): Add testing of build.sh |
| 6619 |
|
| 6620 |
[SV 40254] Modify build.sh to work properly with Guile support. |
| 6621 |
* guile.c (guile_gmake_setup) [HAVE_GUILE]: Define a stub function |
| 6622 |
when Guile support is not enabled. |
| 6623 |
* main.c (main) [HAVE_GUILE]: Always invoke guile_gmake_setup(). |
| 6624 |
* Makefile.am: Make guile.c standard, not optional. |
| 6625 |
* build.template: Add the Guile compiler and linker flags. |
| 6626 |
|
| 6627 |
* maintMakefile: Accept variable overrides from the environment. |
| 6628 |
|
| 6629 |
* NEWS: Fix version so we can build a distfile. |
| 6630 |
|
| 6631 |
* read.c (eval): Avoid GCC warning to add braces. |
| 6632 |
|
| 6633 |
* GNUMAKEFLAGS: Remove -O so it passes in NO_OUTPUT_SYNC mode. |
| 6634 |
|
| 6635 |
2013-10-18 Christian Boos <[email protected]> |
| 6636 |
|
| 6637 |
Fix initialization of stringlist variables for jobserver_fds and sync_mutex. |
| 6638 |
(tiny change) |
| 6639 |
|
| 6640 |
main.c (prepare_mutex_handle_string, main): Initialize |
| 6641 |
stringlist variables with at least 2 members, as one member is not |
| 6642 |
currently supported. |
| 6643 |
|
| 6644 |
2013-10-18 Eli Zaretskii <[email protected]> |
| 6645 |
|
| 6646 |
Fix MinGW64 problem with non-compliant vsnprintf. |
| 6647 |
makeint.h (__USE_MINGW_ANSI_STDIO) [__MINGW64_VERSION_MAJOR]: |
| 6648 |
Define for MinGW64, to force it to use an ANSI-compliant |
| 6649 |
implementation of vsnprintf. Reported by Christian Boos |
| 6650 |
<[email protected]>. |
| 6651 |
|
| 6652 |
Fix the MSVC build on MS-Windows. |
| 6653 |
output.c (vsnprintf) [_MSC_VER]: Define, instead of defining |
| 6654 |
snprintf, which isn't used. Reported by Christian Boos |
| 6655 |
<[email protected]>. |
| 6656 |
NMakefile.template (OBJS): Add load.obj and posixfcn.obj. |
| 6657 |
($(OUTDIR)/pathstuff.obj): New dependency. |
| 6658 |
Suggested by Christian Boos <[email protected]>. |
| 6659 |
|
| 6660 |
2013-10-13 Paul Smith <[email protected]> |
| 6661 |
|
| 6662 |
[SV 40139] Modify "missing separator" for better translation |
| 6663 |
|
| 6664 |
Add support for updating the GNU make web pages. |
| 6665 |
Add makefile rules for updating the http://www.gnu.org/software/make |
| 6666 |
web pages, including the online GNU make manual. |
| 6667 |
|
| 6668 |
Convert to auto-generated ChangeLog files. |
| 6669 |
Rename existing ChangeLog files so they won't be distributed. |
| 6670 |
Add targets to maintMakefile to generate ChangeLog from the Git |
| 6671 |
repository. This will require a version of gnulib be available. |
| 6672 |
Because ChangeLog is auto-generated, we have to switch our |
| 6673 |
automake mode to "foreign" or it will complain and fail. |
| 6674 |
|
| 6675 |
Set up for the next release. |