summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* [SV 63821] Don't set up default suffix rules if makefile sets -rDmitry Goncharov2023-02-203-16/+81
| | | | | | | | | | | When built-in rules are disabled by adding -r to MAKEFLAGS in the makefile, don't add suffix rules at all so that if suffixes are added back via .SUFFIXES, the rules are still not there. * src/main.c (main): Set default suffix rules after parsing makefiles. * src/default.c (install_default_suffix_rules): Install a default suffix rule only if there is no user defined rule. * tests/scripts/features/suffixrules: Add tests.
* * tests/scripts/misc/general4: Only test empty PATH on UNIXPaul Smith2023-02-202-5/+6
|
* * gl/modules/make-glob: Avoid glibc glob if bug #866 is presentPaul Smith2023-02-192-17/+55
|
* * tests/scripts/features/include [AIX]: Set explicit timestampsPaul Smith2023-02-191-3/+5
|
* * tests/scripts/features/archives: Set CC properlyPaul Smith2023-02-191-3/+3
|
* Prerelease GNU Make 4.4.0.914.4.0.91Paul Smith2023-02-192-3/+7
| | | | | * NEWS: Update the date. * configure.ac: Change the release.
* * src/makeint.h [CYGWIN]: Use pipe mode for the jobserverPaul Smith2023-02-191-2/+5
|
* Don't block for child exit if other commands have completedPaul Smith2023-02-191-2/+6
| | | | | | | | | | | Running regression tests on a single CPU system shows that if a child exits while we're checking prerequisites we might not notice it, and then we might block waiting for the next child to exit before we try to do more work even though we could. * src/remake.c (update_goal_chain): Remember the command_count before we start checking prerequisites and if it is different when we restart at the top of the goal chain then don't block.
* Clean up depth handling in debug outputPaul Smith2023-02-193-28/+39
| | | | | | | | | | | | | | The indentation shown in debug output was misleading. Increment the depth when we are working on a prerequisite, not for the current target. * src/remake.c (check_dep): Increment depth only on recursion. (update_file_1): Ditto. Don't show "Finished..." if prereqs are still running. * src/implicit.c (pattern_search): Increment depth for the entire search. * tests/scripts/features/output-sync: Support debug output when run by hand.
* * src/makeint.h (WIN32_LEAN_AND_MEAN) [Windows]: Don't redefine.Paul Smith2023-02-191-1/+3
| | | | Suggested for tcc builds by Christian Jullien <eligis@orange.fr>.
* * src/misc.c (ttyname) [OS/2]: Add an implementation for OS/2 kLIBCKO Myung-Hun2023-02-191-0/+39
|
* Allow jobserver style to be forced to "pipe"Paul Smith2023-02-195-3/+18
| | | | | | | | | | | | | | Some systems that support mkfifo() don't support the usage that GNU make wants. Provide a way to force using "pipe" jobserver mode even when mkfifo() is available. * src/makeint.h (MK_OS_HURD): Define if we're on Hurd. (JOBSERVER_USE_FIFO): Define if we have mkfifo() and we're NOT on Hurd. * src/main.c (main): Test JOBSERVER_USE_FIFO not HAVE_MKFIFO. * src/posixos.c (jobserver_setup): Ditto. * maintMakefile: Create a config check test for forcing "pipe" mode. * tests/run_make_tests.pl: Show discovered FEATURES in verbose mode.
* [SV 63668] Use autoconf to detect the default C++ compilerPaul Smith2023-02-052-7/+15
| | | | | | * configure.ac: Add AC_PROG_CXX to search for a C++ compiler. (MAKE_CXX): Add the discovered compiler to config.h. * src/default.c (default_variables): Use MAKE_CXX as the C++ compiler.
* * doc/make.texi: Fix typo (reported by <mao492479407@163.com>)Paul Smith2023-02-051-1/+1
|
* * tests/scripts/variables/MAKEFLAGS: Fix some Perl warningsPaul Smith2023-02-041-34/+38
|
* * doc/make.texi: [SV 63689] Fix typos in examplesDmitry Goncharov2023-01-281-2/+2
|
* * src/job.c: Switch from bit operators to flags macrosPaul Smith2023-01-282-12/+12
| | | | * src/remake.c: Ditto.
* [SV 63667] In .POSIX, use shell flags -c when ignoring errorsPaul Smith2023-01-284-4/+78
| | | | | | | | | | | * src/variable.c (lookup_variable_for_file): New function to retrieve a variable assignment in a file context. * src/variable.h (lookup_variable_for_file): Declare it. * src/job.c (construct_command_argv): Look up .SHELLFLAGS. If .POSIX is set and we're using the default value, choose -c if we're ignoring errors else choose -ec. (construct_command_argv_internal): Ditto. * tests/scripts/targets/POSIX: Add tests.
* * tests/scripts/features/archives: [SV 63688] Quote cmd line varsDmitry Goncharov2023-01-281-4/+5
|
* * README.in: Mention README.z/OSPaul Smith2023-01-281-0/+2
|
* * tests/test_driver.pl: Convert z/OS answers for regex outputPaul Smith2023-01-153-20/+22
| | | | | | Allow z/OS customizations to apply to regex output matching. * tests/scripts/features/output-sync: Use a regex for Terminated. * tests/scripts/features/temp_stdin: Ditto.
* * tests/scripts/features/archives: Use the configured compiler for CCPaul Smith2023-01-151-1/+4
|
* * configure.ac: Delay setting HAVE_GUILE until we're surePaul Smith2023-01-151-1/+3
|
* Prerelease GNU Make 4.4.0.904.4.0.90Paul Smith2023-01-143-36/+8
| | | | | | | * NEWS: Update the date. * README.git: Fix a typo. * maintMakefile (check-alt-config): Report success. (upload-*): Use the gnulib gnupload script for uploads.
* * tests/scripts/features/reinvoke: Warn about closing STDIN.Paul Smith2023-01-113-1/+6
| | | | | * tests/scripts/features/temp_stdin: Ditto. * tests/scripts/options/dash-f: Ditto.
* [SV 63638] Fix processing PATH on MS-WindowsEli Zaretskii2023-01-111-2/+4
| | | | | * src/variable.c (sync_Path_environment): Pass only the value of PATH to convert_Path_to_windows32, excluding the "PATH=" part.
* Update support for OS/2Paul Smith2023-01-089-27/+46
| | | | | | | | | | | | | | | | | | Patches provided by KO Myung-Hun <komh78@gmail.com> * NEWS: Add a note. * AUTHORS: Add a new author. * README.OS2: Updates to build instructions. * src/dir.c (dir_contents_file_exists_p): Use a stack copy when modifying a const string. * src/job.c (construct_command_argv_internal): Ditto. Reuse variables rather than re-defining them. (exec_command): Cast a const string (we don't change it anyway). * src/getopt.c (_getopt_initialize): Reference unused variables. (_getopt_internal): Add block braces to quiet the compiler. * src/main.c (main): Cast argument to child_execute_job(). * src/posixos.c (set_blocking): Reference unused variables. * src/remake.c (f_mtime): Delete useless code.
* [SV 17448] Ignore whitespace around $(file ...) namesPaul Smith2023-01-083-18/+53
| | | | | | | | | | The other issues related to whitespace reported in this bug are not addressed by this change. * src/functions.c (func_file): Strip whitespace from the start and end of the filename provided to the $(file ...) function. * tests/scripts/functions/file: Add tests for this. * tests/test_driver.pl: Use 3-arg version of open().
* [SV 61218] Ensure MAKEFLAGS is expanded even with -ePaul Smith2023-01-083-6/+16
| | | | | | | | | | | | | | If -e was given we weren't expanding MAKEFLAGS before passing it through the environment to jobs: we don't expand variables we receive from the environment and when -e is given we set the origin of MAKEFLAGS to "environment override". Check for MAKEFLAGS specifically, which seems like a hack but I don't have a better idea offhand. * src/main.c (main): Drive-by: use o_default for MAKEOVERRIDES. * src/variable.c (target_environment): Always expand MAKEFLAGS regardless of the origin type. * tests/scripts/options/dash-e: Create a test.
* [SV 62654] Support GNU Make on z/OSPaul Smith2023-01-0821-43/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original patches provided by Igor Todorovski <itodorov@ca.ibm.com> Reworked by Paul Smith <psmith@gnu.org>. Thanks to IBM for providing a test system. * NEWS: Announce support. * AUTHORS: Ditto. * README.zOS: Provide details on building GNU Make on z/OS. * build.sh (get_mk_var): z/OS sh has a strange bug which causes it to generate extra lines of output: rework the function to print output as we compute it instead of collecting it into a variable, which works around this bug. * src/makeint.h: Declare MK_OS_ZOS if we're building for z/OS. * src/arscan.c: Don't include <ar.h> on z/OS. * src/job.c: We can't change environ in ASCII mode on z/OS. * src/main.c: Ditto. Also we can't use pselect() on z/OS. * src/posixos.c: pselect() seems to hang on z/OS: don't use it. * tests/run_make_tests.pl: Handle different exit codes on z/OS. * tests/test_driver.pl: Preserve some special z/OS env.vars. Add special checks to output comparisons when on z/OS. * tests/scripts/features/archives: Don't validate names. Don't try to compile empty files as IBM compilers complain. * tests/scripts/features/shell_assignment: Fix octal value of #. * tests/scripts/features/temp_stdin: Don't print "term". * tests/scripts/functions/shell: Handle shell exit codes. * tests/scripts/targets/ONESHELL: Ditto. * tests/scripts/targets/POSIX: sh -x prints differently. * tests/scripts/variables/SHELL: Ditto.
* Create src/mkcustom.h which is included by config.hPaul Smith2023-01-088-41/+83
| | | | | | | | | | | | | | | | Put declarations for missing functions which we create in src/misc.c into a file which is included by config.h via AH_BOTTOM(). This ensures those prototypes are available, even in files added to lib/... from gnulib. * src/mkcustom.h: Add a new file with function declarations. * configure.ac: Include src/mkcustom.h in config.h with AH_BOTTOM() * Makefile.am: Add the header to the SRCS list. * src/makeint.h: Remove content that we added to src/mkcustom.h. * src/config.ami: Add #include "mkcustom.h" to specialized config.h. * src/config.h-vms: Ditto. * src/config.h.W32: Ditto. * src/configh.dos: Ditto.
* Include <strings.h> globallyPaul Smith2023-01-084-10/+6
| | | | | | | | | | Various code uses str{,n}casecmp() so include <strings.h>, if it exists, everywhere. * configure.ac: Check for <strings.h> explicitly. * src/makeint.h: Include it if HAVE_STRINGS_H, for str{,n}casecmp(). * src/job.c: Remove include of <strings.h>. * src/main.c: Ditto.
* * gl/lib/glob.c: Don't try to support _LIBC, don't use __stat()Paul Smith2023-01-071-35/+15
|
* [SV 63609] Avoid buffer overrun in --warn-undefined-variablesPaul Smith2023-01-032-8/+33
| | | | | | | | | Reported by Dmitry Goncharov <dgoncharov@users.sf.net> * src/variable.c (struct defined_vars): Create a struct that holds the name and length of each variable name. (warn_undefined): Check the lengths before comparing the contents. * tests/scripts/options/warn-undefined-variables: Add a test.
* [SV 14927] Allow parallel builds for archivesPaul Smith2023-01-034-16/+86
| | | | | | | | | | | | | | Compare the timestamp of the object file (if it exists) with the archived object and if the object file is newer, ensure it's updated in the archive. * NEWS: Announce the new capability. * doc/make.texi (Dangers When Using Archives): Explain how to enable parallel builds with archives. * src/remake.c (f_mtime): For archive element files check the mod time of the object file (if it exists) against the archive object (if it exists). * tests/scripts/features/archives: Add tests for this capability.
* [SV 61463] Don't export inherited private variablesPaul Smith2023-01-024-6/+84
| | | | | | | | | | | If a parent target has an exported variable that is private, don't export it in child targets. * NEWS: Mention this change. * src/variable.c (target_environment): Ignore private inherited variables. * tests/thelp.pl: Add a new "env" operation to show env.var. values. * tests/scripts/variables/private: Verify this new behavior.
* Update ancient glob/fnmatch implementationsPaul Smith2023-01-026-288/+103
| | | | | | | | | | | | | | | | | | | | | | | | I looked again at trying to use the latest gnulib implemenentations of GNU glob and fnmatch, and the effort required to extract them from gnulib and make them portable to systems which don't support configure is simply far too daunting for me. However it's clear that the previous implementations are growing too long on the tooth to continue to be used without some maintenance, so perform some upkeep on them. - Remove support for pre-ANSI function definitions. - Remove the obsolete "register" keyword. - Assume standard ISO C90/C99 header file support. - Assume standard ISO C "void" and "const" support. - Avoid symbols prefixed with "__" as they're reserved. * maintMakefile: Add a rule to verify lib has the latest content. * src/dir.c: Use void* not __ptr_t which was removed. * gl/lib/glob.c: See above. * gl/lib/fnmatch.in.h: See above. * gl/lib/glob.in.h: See above. * gl/lib/fnmatch.c: See above. Remove __strchrnul(): it is not checked anywhere and is only used in one place anyway.
* * doc/make.texi (Special Targets): Fix minor typoPaul Smith2023-01-021-1/+1
| | | | Reported by Andrey Melnikov <vafilor@gmail.com>.
* Don't free uninitialized hash_tablePaul Smith2023-01-011-42/+40
| | | | | | * src/dir.c (clear_directory_contents): We use ht_vec to mark when we have initialized the hash_table: don't free if it's NULL. (everywhere): Use NULL instead of 0 when working with pointers.
* * maintMakefile: Add missing quotePaul Smith2023-01-011-1/+1
|
* Convert references from "GNU make" to "GNU Make"Paul Smith2023-01-0149-153/+153
|
* Update to the latest gnulib stable branchPaul Smith2023-01-016-719/+739
| | | | | | | | | * bootstrap.conf: Request the latest gnulib stable branch. * README.git: Recommend the argument form of autogen/autopull. * bootstrap: Import the latest version of bootstrap. * bootstrap-funclib.sh: Ditto. * autogen.sh: Ditto. * autopull.sh: Ditto.
* Update the copyright year on all filesPaul Smith2023-01-01116-118/+118
|
* Apply spelling fixes discovered by CodespellPaul Smith2022-12-3115-18/+18
| | | | | | | | | | | | | | | | | | * maintMakefile: Apply spelling fixes. * src/file.c: Ditto. * src/misc.c: Ditto. * src/remake.c: Ditto. * src/vmsjobs.c: Ditto. * src/w32/pathstuff.c: Ditto. * tests/test_driver.pl: Ditto. * tests/run_make_tests.com: Ditto * tests/scripts/features/implicit_search: Ditto * tests/scripts/features/output-sync: Ditto * tests/scripts/features/patternrules: Ditto * tests/scripts/features/se_explicit: Ditto * tests/scripts/features/statipattrules: Ditto * tests/scripts/functions/foreach: Ditto * tests/scripts/variables/MAKEFLAGS: Ditto
* Avoid using false(1) in regression testsPaul Smith2022-12-315-47/+32
| | | | | | | | | | | | The POSIX standard only requires false(1) to return a "non-zero" exit code; almost all systems return 1 but some (Solaris!!!) return 255 or possibly even other values. Use our helper "fail" instead. * tests/thelp.pl: Have the "fail" command obey -q. * tests/scripts/features/parallelism: Helper -q no longer prints fail. * tests/scripts/targets/POSIX: Replace false with #HELPER# -q fail 1. * tests/scripts/variables/MAKEFLAGS: Ditto. * tests/scripts/variables/SHELL: Ditto.
* Make bootstrap.bat more portablePaul Smith2022-12-263-5/+30
| | | | | | | | | | | Using backslashes in a sed command line is tricky as different programs use them differently as escape sequences. Eli Zaretskii points out that Windows "echo" doesn't do any processing, so rework all our sed invocations to use script files created by echo. * bootstrap.bat: Use echo to create sed script files instead of -e. * Basic.mk.template: Fix typo in the comments. * .gitignore: Ignore any .sed scripts.
* * NEWS: Add a section for the next releasePaul Smith2022-12-241-1/+17
| | | | Add a note for the MAKEFLAGS enhancements.
* [SV 63439, SV 63452] Don't warn on undefined internal variablesPaul Smith2022-12-245-42/+45
| | | | | | | | | | | | | | | | | Don't generate undefined variable warnings for variables that are internal / special to make and where the empty string is valid. Rather than defining them to empty, which could introduce unwanted behavior, keep a list of variable names which we should never warn about. * src/variable.h (warn_undefined): Convert the macro to a function. * src/variable.c (defined_vars): Always "defined" variable names. (warn_undefined): Implement as a function and check against the defined_vars before generating a warning. * src/read.c (read_all_makefiles): No need to reset warning flag. * src/vpath.c (build_vpath_lists): Ditto. * tests/scripts/options/warn-undefined-variables: Expand all the pre-defined variables to ensure warnings are not generated.
* [SV 63552] Change directories before constructing include pathsPaul Smith2022-12-244-57/+53
| | | | | | | | | | | | | | * src/makeint.h (reset_makeflags): New function to handle changing MAKEFLAGS from within makefiles. Remove decode_env_switches(). * src/variable.c (set_special_var): Call reset_makeflags() instead of various internal methods. * src/main.c (decode_env_switches): Only internal now so make static. (decode_switches): Don't invoke construct_include_path() yet. (reset_makeflags): Decode env switches and construct include paths. (main): Construct include paths after we process -C options. * tests/scripts/options/dash-C: Rewrite to use new test constructs. Add a test using both -C and -I together. Add a test for multiple -C options.
* tests [WINDOWS32]: Support Strawberry Perl on WindowsPaul Smith2022-12-2010-35/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Strawberry Perl has some different behaviors from ActiveState Perl which impact the test suite: - Avoid Perl's chomp() as it may not remove CRs; chomp() may remove only the final NL but not the CR in a CRNL line ending. - Strawberry Perl doesn't support ActiveState's system(1, ...) form. - Strawberry Perl (or msys?) does something weird with "/tmp" when provided to exec(), replacing it with the user's %TEMP%. - Strawberry Perl uses msys paths like /c/foo instead of C:\foo. * tests/test_driver.pl (get_osname): Strawberry Perl uses 'msys' as its $^O so if we see that use a port of 'W32'. (_run_with_timeout): Strawberry Perl doesn't support the special system(1, ...) form of system() so use POSIX standard fork/exec. (compare_answer): Paths generated by Strawberry Perl use msys path format (e.g., /c/foo instead of C:\foo); check for those differences and compare RE against both the unmodified and modified log. * tests/run_make_tests.pl (set_defaults): Switch from chomp to s/// to remove CRNL and NL line endings. * tests/scripts/features/errors: Executing directories on Strawberry will give an error; translate it to Windows error output format. * tests/scripts/features/output-sync: Ditto. * tests/scripts/features/temp_stdin: Ditto. * tests/scripts/functions/realpath: Ditto. * tests/scripts/options/dash-I: Ditto. * tests/scripts/variables/INCLUDE_DIRS: Ditto. * tests/scripts/misc/close_stdout: /dev/full is reported as existing on Strawberry Perl, but it doesn't do anything. Skip the test. * tests/scripts/variables/MAKEFLAGS: When an argument containing /tmp is passed to a program via exec(), something replaces it with the expansion of the %TEMP% variable. Instead of using /tmp create a local directory to use.