Commit graph

2093 commits

Author SHA1 Message Date
Paul Smith
7670c84f77 Implement new "load" directive.
Provides support for dynamically loadable objects in GNU make, as a
"technology preview".
2012-10-29 07:05:21 +00:00
Paul Smith
2efd6b47bf Rearrange elements to reduce struct size on 64bit architectures. 2012-10-28 14:57:49 +00:00
Paul Smith
ca8885d5be Remove extraneous close(). 2012-10-28 14:56:28 +00:00
Paul Smith
3a285e342e Update the required version of gettext to get new bugfix macros. 2012-09-30 03:20:50 +00:00
Paul Smith
f263ff4ce9 Define _GNU_SOURCE before testing for bsd_signal.
Fixes Savannah bug #32247
2012-09-10 03:05:49 +00:00
Paul Smith
fbe5b2c9cd Force intermediate targets to be considered if their non-intermediate
parent needs to be remade.  Fixes Savannah bug #30653.
2012-09-10 02:36:05 +00:00
Paul Smith
a94b0b0ea5 Keep the command line on the heap to avoid stack overflow.
Fixes Savannah bug #36451.
2012-09-09 23:25:07 +00:00
Paul Smith
b9c4a38022 On BSD, realpath(3) doesn't fail if the target doesn't exist, so test
explicitly with stat(2).  Fixes Savannah bug #35919.
2012-09-09 23:14:55 +00:00
Paul Smith
90ee335724 Get error messages in the C locale for comparision with make output.
Fixes Savannah bug #35764.
2012-09-09 22:52:50 +00:00
Paul Smith
7d3743dfdc Verify that backslashes before non-special characters are preserved. 2012-09-09 22:37:13 +00:00
Paul Smith
a839588fc9 Save the variable buffer content, not a potentially old pointer to it.
Fixes Savannah bug #36925.
2012-09-09 21:56:55 +00:00
Paul Smith
8a0d46468a Fix stupid wrong-pointer error handling target vars containing semicolons.
Fixes Savannah bug #36106.
2012-09-09 21:31:20 +00:00
Paul Smith
bc578b6c8e Ignore UTF-8 BOMs. See Savannah bug #36529. 2012-09-09 21:11:00 +00:00
Eli Zaretskii
1820908804 read.c (unescape_char): Fix a thinko in the last change. 2012-09-09 20:33:58 +00:00
Paul Smith
145661a541 Savannah bug #37179: Use alternate shared library syntax for MacOS. 2012-09-09 20:14:09 +00:00
Paul Smith
a95dc485fa Break out of an infinite loop if we're not making progress. 2012-09-09 20:06:03 +00:00
Paul Smith
30b2e4207d When .POSIX: is specified use POSIX-standard macro values by default. 2012-09-09 19:19:15 +00:00
Eli Zaretskii
7f5309ebb4 Update README.W32.template for Guile and job-server support. 2012-09-01 07:58:14 +00:00
Eli Zaretskii
6cb5be7813 Fix unescape_char when not unescaping.
read.c (unescape_char): Advance 'p' after copying the unescaped
 characters.  Otherwise the backslashes are incorrectly erased from
 the original string.
2012-09-01 07:52:54 +00:00
Paul Smith
adb50bd4c9 Simplify copyrights using ranges of years.
The new GNU Maintainer's Manual allows the use of year ranges in certain
situations; take advantage of this simplification.
2012-03-05 14:10:39 +00:00
Paul Smith
cf1c79c9a3 Improve handling for escaped colons in prerequisite lists.
Fixes Savannah bug #12126 and bug #16545
2012-03-04 16:53:50 +00:00
Paul Smith
76827d7c10 Create a new CSTRLEN (constant string length) macro, and use it. 2012-03-04 08:58:44 +00:00
Paul Smith
eb632d7676 Ensure appending private variables in pattern-specific target variables.
Fixes Savannah bug #35468.
2012-03-04 08:09:09 +00:00
Paul Smith
fdb5fcc28d Support nanosecond timestamps in stat() for AIX 5.2+.
Fixes Savannah bug #32485
2012-03-04 00:35:28 +00:00
Paul Smith
23c2b99e9d Convert all "`'" quotes to "''" per new GNU Coding Standard guidelines.
Fixes Savannah bug #34530.
2012-03-04 00:24:20 +00:00
Paul Smith
405c89ba1e Ensure that .ONESHELL works with .SHELLFLAGS options containing whitespace.
See Savannah bug #35397.
2012-03-03 22:56:20 +00:00
Paul Smith
a77c5c0910 Fix Savannah bug #35410: handle escape chars in filter/filter-out
Also add a valgrind suppression file for Guile-enabled make.
2012-03-03 22:12:46 +00:00
Paul Smith
88f1bc8b55 Modify backslash/newline handling for POSIX.
We fixed Savannah 16670 but that broke previously-working makefiles
that relied on the GNU make behavior.  The POSIX behavior doesn't
seem to me to be better, and can be obtained using GNU make as well,
so put it back as the default behavior and require .POSIX to
get the POSIX behavior.
Add a new section to the manual discussing backslash/newline handling.
Update the test suite.
2012-03-03 18:45:08 +00:00
Paul Smith
6405534814 Check for possible buffer overflow on very long filenames.
Fixes Savannah bug #35525
2012-02-26 21:34:51 +00:00
Eli Zaretskii
c0751bd3fc Ifdef away unused w32 functions.
w32/subproc/sub_proc.c (proc_stdin_thread, proc_stdout_thread)
 (proc_stderr_thread, process_pipe_io): Ifdef away unused
 functions.
2012-02-03 12:16:57 +00:00
Eli Zaretskii
1befa76448 Fix Savannah bug #34832 with unused TLS attributes.
w32/subproc/w32err.c (map_windows32_error_to_string) [_MSC_VER]:
 Don't use TLS storage for szMessageBuffer.  Ifdef away special
 code for handling Winsock error codes.  Make the function return a
 `const char *'.  Suggested by Ozkan Sezer.  Fixes Savannah bug #34832.
2012-02-03 12:15:56 +00:00
Paul Smith
e3b394f3f0 Map Guile variable objects to the empty string.
In Guile 2.0, (define ...) results in a variable object.  Ensure make
converts that to an empty string to avoid spurious errors.
2012-01-30 01:40:56 +00:00
Paul Smith
ef6461611b Add support for "::=" simple assignment operator.
The next POSIX standard will define "::=" to have the same behavior
as GNU make's ":=", so add support for this new operator.
2012-01-30 00:21:57 +00:00
Paul Smith
fca11f6039 Create a new function $(file ...) 2012-01-29 18:12:22 +00:00
Paul Smith
d6e1c6e6c5 Guile portability
Don't support Guile 1.6 and use a portable test for printable strings.
2012-01-29 16:30:12 +00:00
Eli Zaretskii
aa07c06387 config.h.W32.template: Update from config.h.in. 2012-01-28 21:59:26 +00:00
Eli Zaretskii
dc25e84754 Support a Windows build with Guile.
README.W32.template: Update with instructions for building with Guile.
 build_w32.bat: Support building with Guile.
 make.h [HAVE_STDINT_H]: Include stdint.h.
2012-01-28 20:28:31 +00:00
Eli Zaretskii
666ad44568 Actually commit main.c with changes announced in last commit. 2012-01-28 20:19:55 +00:00
Eli Zaretskii
dddd1be5ec main.c (main, clean_jobserver): Move declarations of variables
not used in the WINDOWS32 build to the #else branch, to avoid
 compiler warnings.
2012-01-28 16:54:00 +00:00
Eli Zaretskii
eb4f966971 Fix failures on MS-Windows when Make's standard handles are invalid.
This can happen when Make is invoked from a GUI application.

  * w32/subproc/sub_proc.c (process_init_fd): Don't dereference
  pproc if it is a NULL pointer.
  (process_begin, process_cleanup): Don't try to close pipe handles
  whose value is INVALID_HANDLE_VALUE.
  (process_easy): Initialize hIn, hOut, and hErr to
  INVALID_HANDLE_VALUE.  If DuplicateHandle fails with
  ERROR_INVALID_HANDLE, duplicate a handle for the null device
  instead of STD_INPUT_HANDLE, STD_OUTPUT_HANDLE or
  STD_ERROR_HANDLE.  Don't try to close pipe handles whose value is
  INVALID_HANDLE_VALUE.

  * function.c (windows32_openpipe): Initialize hIn and hErr to
  INVALID_HANDLE_VALUE.  If DuplicateHandle fails with
  ERROR_INVALID_HANDLE, duplicate a handle for the null device
  instead of STD_INPUT_HANDLE or STD_ERROR_HANDLE.  Fix indentation.
  Don't try to close handles whose value is INVALID_HANDLE_VALUE.
2012-01-28 16:50:21 +00:00
Eli Zaretskii
715a11735f function.c (define_new_function): Fix format strings in calls to `fatal'. 2012-01-25 18:16:14 +00:00
Paul Smith
89f7058b99 Handle NULL returns from Guile. 2012-01-18 13:31:11 +00:00
Paul Smith
9fb4cdeedb Fix an issue with PATH_SEPARATOR_CHAR when cross-compiling for Windows.
Fixes Savannah bug #34818.
2012-01-16 21:29:44 +00:00
Paul Smith
0bdc191501 Fix autoconf macros for detecting DOS-style pathnames.
Fixes Savannah bug #35256.
2012-01-16 03:53:34 +00:00
Paul Smith
49cc211819 Create a new internal interface for defining new make functions.
This allows us to create new functions without changing function.c.
You still have to modify the GNU make code (for now) though: this is
simply a preliminary step to possibly allowing make to load modules.

Modify the Guile integration to use this method rather than ifdefs
in function.c.
2012-01-16 03:32:49 +00:00
Paul Smith
4e2e5eb199 Disallow whitespace in variable names. 2012-01-16 02:44:04 +00:00
Paul Smith
3f6bb04e75 Update copyright notices. 2012-01-16 02:29:20 +00:00
Paul Smith
c992c4d80f Add GNU Guile as an optional embedded scripting language for make.
On configure-enabled systems, configure will detect Guile installed
(using pkg-config, which is how GNU Guile is distributed) and enable
it if so.

On all non-configure-enabled systems, currently, the default is for
Guile support to be disabled.
2012-01-15 22:41:53 +00:00
Paul Smith
3057357c0a Add prerequisites to ensure ordering of results. 2011-12-10 17:13:14 +00:00
Paul Smith
cb0bedc3d0 Allow os2 and mingw to disable jobserver with a configure option. 2011-11-15 22:56:26 +00:00