Commit graph

2358 commits

Author SHA1 Message Date
Paul Smith
dc92144e62
[SV 47151] Exit with 1 when checking recursive make -q
* job.h (struct child): New bit to mark recursive command lines.
* job.c (start_job_command): Set the recursive command line bit.
(reap_children): If the child is a recursive command and it exits
with 1 during question mode, don't print an error and exit with 1.
* tests/scripts/options/dash-q: Add a regression test.
2016-03-09 16:09:14 -08:00
Manoj Srivastava
d791b866f9 Merge branch 'development-4.1' into upstream 2016-01-18 22:18:43 -08:00
Manoj Srivastava
bd8a0ad047 Imported Upstream version 4.1 2016-01-16 02:25:59 -08:00
Paul Smith
a66bf2d736 GNU Make release 4.1. 2014-10-05 12:18:08 -04:00
Eli Zaretskii
31c2024b2e Fix Cygwin compilation error.
* job.c (construct_command_argv_internal) [HAVE_DOS_PATHS]: Fix
initializer for sh_chars_sh.
Reported by Denis Excoffier<cygwin@Denis-Excoffier.org>.
2014-10-02 18:11:43 +03:00
Gisle Vanem
7df0fe77d8 Fix last commit. 2014-10-01 20:43:12 +03:00
Gisle Vanem
9fc787c658 * makeint.h (ftruncate): Define also for __WATCOMC__.
Copyright-paperwork-exempt: yes.
2014-10-01 20:41:28 +03:00
Eli Zaretskii
1afb0ad372 Avoid compilation warnings.
* main.c (find_and_set_default_shell, main) [WINDOWS32]: Declare
variables 'const char *' to avoid compiler warnings.
* job.c (construct_command_argv_internal) [!NDEBUG]: Declare 'end'
and set it only if NDEBUG is not defined, to avoid compiler
warnings.
2014-10-01 18:34:29 +03:00
Eli Zaretskii
86a058029b Treat redirection of standard handles on Windows as it is done on Unix.
* job.c (start_job_command) [WINDOWS32]: Compute outfd and errfd
as on Posix platforms, and pass the results to process_easy.
* function.c (windows32_openpipe) [WINDOWS32]: Accept an
additional argument ERRFD and use it for redirecting the standard
error handle passed to the subprocess.
(func_shell_base) [WINDOWS32]: Pass the computed errfd to
windows32_openpipe.
2014-10-01 18:26:28 +03:00
Paul Smith
0a3a0756b9 Update Copyright statements for 2014. 2014-09-30 09:32:42 -04:00
Paul Smith
3712e8a819 * tests/scripts/features/load: Avoid unused variable warnings. 2014-09-30 09:32:41 -04:00
Paul Smith
9ed452b041 * loadapi.c (gmk_eval): Use C90 syntax. 2014-09-30 08:32:06 -04:00
Hartmut Becker
b11bef0bea * job.c: fix make action continuation lines.
* vmsjobs.c: fix writing DCL command files when trimming (white
  spaces and $ signs) especially after a split (command continuation).
2014-09-30 08:12:46 -04:00
Bernhard Reutner-Fischer
bd716a1ec1 * configure.ac: Fix spacing in helptext of customs
Copyright-paperwork-exempt: yes
2014-09-15 14:17:49 -04:00
Eli Zaretskii
b484efca56 Support MAKE_TERMOUT and MAKE_TERMERR on MS-Windows.
* w32/compat/posixfcn.c (isatty, ttyname): New functions.
* config.h.W32.template (HAVE_TTYNAME): Define.  Add a prototype
for ttyname.
2014-09-15 19:51:41 +03:00
Paul Smith
562344122f * loadapi.c (gmk_eval): [SV 43221] Preserve var buff content for eval. 2014-09-15 09:42:52 -04:00
Paul Smith
9a2451af0b * main.c, NEWS, doc/make.text: Rename MAKE_TTY* to MAKE_TERM* 2014-09-15 09:30:40 -04:00
Paul Smith
7f9ce6e97b * main.c (main): Set MAKE_TTYOUT and MAKE_TTYERR.
* configure.ac: Test for isatty() and ttyname()
* makeint.h: provide a substitute for ttyname() if it's not available.
* config.ami.template, config.h-vms.template, config.h.W32.template:
define/undefine HAVE_ISATTY/HAVE_TTYNAME macros.
* NEWS, doc/make.texi: Document these new variables.
2014-09-14 01:03:19 -04:00
Paul Smith
621e9edfe9 * tests/config-flags.pm.in, tests/scripts/features/archives: [SV 43046]
Use the "ar" program detected by configure when running the test suite.
2014-09-07 20:14:26 -04:00
Paul Smith
986632ec23 * doc/make.texi: Clarify implicit rule lookup of phony targets
Reported by Frank Heckenbach <f.heckenbach@fh-soft.de>
2014-09-07 20:02:31 -04:00
Hartmut Becker
95ffcda425 Fix and enhance VMS library support.
* ar.c: fix VMS library search for members, which do not have
suffixes, aka filename extensions.
* arscan.c: fix time conversion and library callback routines.
* default.c: more suffixes and automatically create the VMS library
if it doesn't exists.
2014-09-07 18:11:36 -04:00
Hartmut Becker
dcca1b5b0e Enhance VMS exporting make environment variables.
* config.h-vms.template: add feature macro USE_DCL_COM_FILE to always
write a DCL command file, enabled by default.
* vmsjobs.c: with USE_DCL_COM_FILE enabled write make variables as DCL
symbol assignments into the command file.  This enables printing
directory and make level info for recursive use of make. This also
enables forced DCL symbol substitution in the actions.
2014-09-07 18:10:11 -04:00
Hartmut Becker
9cad73ad82 Fix VMS automatic variable expansion
* function.c: add VMS code to func_notdir_suffix and func_basename_dir
to work on comma separated lists; this fixes the expansion of
$(^D), $(+D) and the F variants for VMS.
2014-09-07 18:03:45 -04:00
Hartmut Becker
8e7a28a6a4 * main.c [VMS]: Say that parallel jobs (-j) are not supported on VMS 2014-09-07 18:02:10 -04:00
Hartmut Becker
98de32a681 Enhance/fix VMS ONESHELL implementation and command execution
* job.c, vmsjobs.c: fix some double quote and new line handling;
implement ONESHELL with writing multiple lines into one DCL command
procedure; in ONESHELL allow VMS/make internal redirection only on the
first line; fix the created DCL command procedure, which didn't abort
on errors; return correct exit status from the DCL command procedure;
preserve current procedure verification; make the generated command
procedure more robust.
2014-09-07 18:01:35 -04:00
Hartmut Becker
5369be5079 Enhance/fix VMS setting of program name, MAKE/MAKE_COMMAND variables
* default.c, main.c, makeint.h, vmsfunctions.c: prefix argv[0] with
"mcr " for MAKE/MAKE_COMMAND and set the program name to the image
filename (without the .exe;version)
* vmsfunctions.c: remove obsolete code
* vmsify: use xmalloc
2014-09-07 17:48:14 -04:00
Hartmut Becker
8de07f3e4a Enhance/fix VMS exit code handling.
* commands.c, function.c, hash.c, job.c, main.c, output.c:
use MAKE exit codes.
* makeint.h: encode make exit codes so that they are VMS compatible.
* job.c: check child exit code for VMS style exit codes.
* vmsjobs.c: save and return VMS style exit code.
2014-09-07 17:41:59 -04:00
Hartmut Becker
f970315766 Enhance/fix VMS multi-line support.
* job.c: split the command line at a newline.
* default.c, vmsjobs.c: change ECHO variable to a pseudo builtin,
which ensures that the VMS/DCL ECHO ("write sys$output") is used
and is correctly quoted.
* vmsjobs.c: remove unused builtin 'rm'.
2014-09-07 17:40:28 -04:00
Hartmut Becker
579ee85941 * config_flags_pm.com, [RENAMED test_make.com] run_make_tests.com:
Moved into tests directory.
2014-09-07 17:30:37 -04:00
Hartmut Becker
7e51810bb5 Enhance/fix VMS build environment
* config.h-vms.template: make sure the CRTL version is known
* makefile.com: always compile/link the guile module, remove VAXCRTL
parameter, new LIST parameter
* makefile.vms: always compile/link the guile module, use more
complete dependencies
* prepare_vms.com: helper to create a VMS config file when building
from a snapshot of the repository
2014-09-07 17:13:56 -04:00
Paul Smith
bd30df4478 * configure.ac, maintMakefile, w32/Makefile.am: Fix autotools issues.
Reported by Paul Eggert <eggert@cs.ucla.edu>
2014-09-07 16:59:37 -04:00
Eli Zaretskii
1f2fd22fec Change the order of "makefile" and "Makefile" to match the manual. 2014-08-30 10:43:34 +03:00
Eli Zaretskii
ab1210b1fe Fix regression with "makefile" not being found on MS-Windows.
* read.c (read_all_makefiles) [WINDOWS32]: Recognize "makefile",
all-lowercase, as a makefile.  Reported by Michael Waeber
<waeber@gmail.com>.
2014-08-30 10:40:12 +03:00
Eli Zaretskii
241787d8e4 Fix compilation on MS-Windows.
* makeint.h [WINDOWS32]: Don't declare 'program' as 'const char *',
since it is modified in 'main'.
2014-07-16 18:23:04 +03:00
Eli Zaretskii
faeeb27166 [SV 42695] Fix compilation error on MS-Windows.
* main.c [WINDOWS32]: Don't declare 'program' as 'const char *',
since it is modified in 'main'.
2014-07-12 13:01:18 +03:00
Jonny Grant
cab353d1dd Fix defalt_makefiles[] for MS-Windows.
* read.c (read_all_makefiles) [WINDOWS32]: Remove the redundant
"makefile" and add "makefile.mak".

Copyright-paperwork-exempt: yes
2014-07-12 12:53:59 +03:00
Fredrik Fornwall
8b01e6bebf * arscan.c [ANDROID]: Android has no ar.h but supports archives.
Copyright-paperwork-exempt: yes
2014-07-07 03:56:17 -04:00
Paul Smith
55c00544cc * read.c (eval): [SV 41677] Correct test for TAB vs. 8 spaces. 2014-07-07 03:43:57 -04:00
Piotr Jaroszynski
8d577c2ff4 * output.c (pump_from_tmp): [SV 42378] Flush the output file regularly.
Copyright-paperwork-exempt: yes
2014-07-07 03:10:17 -04:00
John Malmberg
e44d6a12bb Update the regression test harness to support VMS.
* config_flags_pm.com, test_make.com: set up and run the regression
test environment on VMS.
* tests/run_make_tests.pl [VMS]: Use an alternate rmdir()
implementation on VMS.
(run_make_with_options) [VMS]: Provide VMS-specific quoting and shell
invocations.
(set_more_defaults) [VMS]: Set default values when running on VMS.
* tests/test_driver.pl (vms_get_process_logicals) [VMS]: Retrieve the
proper values from %ENV on VMS.
(resetENV) [VMS]: Use it.
(toplevel) [VMS]: Fix a bug with opendir() on some logical_devices.
(compare_output) [VMS]: Convert VMS test output to a "standard" format.
(_run_command) [VMS]: Handle signals and exit codes the VMS way.
(remove_directory_tree_inner) [VMS]: Unlink all versions of the file.
2014-07-07 02:47:30 -04:00
Paul Smith
423c3955d9 * various: Assume ISO C89-compliant free() implementation. 2014-07-07 01:59:03 -04:00
Paul Smith
ac67346d0f * maintMakefile, various: Improve constification of the codebase. 2014-07-07 01:59:03 -04:00
Paul Smith
e364498113 [SV 41983] Support omitting the text argument to $(file ...)
Reported by Tim Murphy <tnmurphy@gmail.com>
* function.c (func_file): Only write TEXT if it is not NULL.
* NEWS, doc/make.texi: Document the new feature
* tests/scripts/functions/file: Verify that the no-text version of
  $(file ...) works and doesn't add a newline.
2014-07-07 01:59:03 -04:00
Jacques Germishuys
85047eb904 NMakefile.template ($(OUTDIR)/posixfcn.obj): Fix a typo.
Copyright-paperwork-exempt: yes.
2014-05-13 20:30:47 +03:00
Paul Smith
0faa98a0bb [SV 42249] Propagate correct rule status results.
* remake.c (update_file, update_file_1, check_dep): Return an enum
  update_status value instead of an int, and keep the highest value we
  find as we walk the graph so that the ultimate status is correct.
* tests/scripts/options/dash-q: Add a test for updating prerequisites.
2014-05-01 09:51:04 -04:00
Manoj Srivastava
b5ba68e8f0 GNU Make release 4.0
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iEYEABECAAYFAlJU9CEACgkQlrBHFWM4ttRd+QCfRBoIgXCMw8oeH2ys/vgkL0NQ
 JW8Ani4g1INBsRANOYqDD/U1HoVzQgW5
 =30+D
 -----END PGP SIGNATURE-----

Merge tag '4.0' into upstream

GNU Make release 4.0
2014-04-17 15:13:45 -07:00
Manoj Srivastava
bab5ce525e Imported Upstream version 4.0 2014-04-13 01:03:46 -07:00
Paul Smith
8411528fdd * Rename MAP_PATHSEP to MAP_DIRSEP. 2014-02-08 16:01:10 -05:00
Paul Smith
d2a3e9ca9c * configure.ac: Fixup for newer autoconf/automake 2014-02-08 16:01:10 -05:00
Ray Donnelly
e1863c05d8 * output.c: Ensure space for final nul byte in fmtbuf.
Copyright-paperwork-exempt: yes
2014-02-08 16:01:10 -05:00