Commit Graph

481 Commits

Author SHA1 Message Date
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
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
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
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
dc2a6ceb81 Enable jobserver on W32 when using configure.
Some W32 cleanups: see Savannah bug #34830
Forgot to modify the config.h.W32.template file for jobserver support.
2011-11-15 21:12:53 +00:00
Paul Smith
4f47fbf953 Be sure to start parsing prereqs in the right place even if there are
escape characters (backslashes) in the target name.
See Savannah bug #33399
2011-11-14 07:31:06 +00:00
Paul Smith
9fcd90e36c Changes to resolve warnings.
Fixes Savannah bug #34608.
2011-11-14 02:26:00 +00:00
Paul Smith
83ce81fcaa Don't use Hungarian notation: remove _p/_ptr from var names.
Fixes Savannah bug #32567.
2011-11-14 00:58:49 +00:00
Paul Smith
63888b91f6 Support jobserver capability on Windows systems.
Implementation contributed by Troy Runkel <Troy.Runkel@mathworks.com>
2011-11-14 00:42:49 +00:00
Paul Smith
934f51d166 In very obscure situations we may write the free token back to the pipe.
Don't do that.  I couldn't come up with a repro case for this!
2011-11-14 00:18:38 +00:00
Paul Smith
bfc3e1ca7c Enable high-resolution timestamps for Darwin (Mac OSX)
Patch provided by Troy Runkel <Troy.Runkel@mathworks.com>
2011-11-13 23:39:54 +00:00
Paul Smith
d472624f33 When we re-exec the master makefile in a jobserver environment, ensure
that MAKEFLAGS is set properly so the re-exec'd make runs in parallel.
See Savannah bug #33873.
2011-09-18 23:39:26 +00:00
Paul Smith
0369a93825 We compute various values for vpath lookup the first time through
and store them in static variables; however one value (std_dirs)
was not being stored statically so the second time through it was
not set.
Fixes Savannah bug #32511
2011-09-18 20:52:13 +00:00
Paul Smith
ef2b0425e7 Avoid certificate checks when getting PO files from translationproject.org 2011-09-17 01:45:09 +00:00
Paul Smith
a5c774a51b Ensure variables defined in $(call ...) have global scope
Add a note about using #!/usr/bin/make -f to the manual.
Clean up the w32 subdirectory in the dist tarball.
2011-09-12 05:29:58 +00:00
Paul Smith
9a9f83e8b5 Ensure that -n takes precedence over -t.
Patch from Michael Witten <mfwitten@gmail.com>
2011-09-02 05:37:54 +00:00
Paul Smith
e4d5d43424 Save strings we're expanding in case an embedded eval causes them
to be freed (if they're the value of a variable that's reset for example).
See Savannah patch #7534
2011-08-29 16:20:19 +00:00
Paul Smith
b06b8c64a2 Fix another error related to whitespace handling in archives.
Newer version of VMS support strncasecmp() so update the config.h.
2011-06-12 16:22:04 +00:00
Paul Smith
f15efca811 Ensure private variables are not used when appending target-specific
variables.  Fixes Savannah bug #32872.
2011-05-07 20:03:49 +00:00
Paul Smith
b664d3a91d Inverted the boolean test from what I wanted it to be. Added a
regression test to make sure this continues to work.
2011-05-07 14:36:11 +00:00
Eli Zaretskii
b5c065418f job.c (construct_command_argv_internal): Don't assume shellflags
is always non-NULL.  Escape-protect characters special to the
 shell when copying the value of SHELL into new_line.  Fixes
 Savannah bug #23922.
2011-05-07 08:29:13 +00:00
Paul Smith
bd6f63e563 Updated documentation to fix Savannah bugs #32058 and #31582 2011-05-02 15:11:23 +00:00