Commit Graph

609 Commits

Author SHA1 Message Date
Paul Smith
a674abe702 Make MFLAGS and MAKEFLAGS more reliable and predictable.
Ensure all simple flags are kept in the initial batch of flags.
Do not allow any flags with options in that batch.
If there are only non-simple flags ensure MAKEFLAGS begins with " ".
Don't let MFLAGS start with "- ".
2013-05-22 02:14:19 -04:00
Alexey Pavlov
80183457ad Fix the MS-Windows build using the Posix configury.
w32/Makefile.am (libw32_a_SOURCES): Add compat/posixfcn.c.

 configure.ac (OUTPUT_SYNC): Define for mingw32 target.
2013-05-18 17:58:10 +03:00
Eli Zaretskii
cece7ad61f Support "move" as internal shell command on Windows with cmd.exe.
job.c (construct_command_argv_internal) <sh_cmds_dos> [WINDOWS32]: Add
 "move".  Fixes Savannah bug #30714.
2013-05-18 14:07:36 +03:00
Eli Zaretskii
943c06de47 Fix MS-Windows build with Guile.
guile.c: Move inclusion of makeint.h before gnumake.h.  This
 order must be observed when building Make, because gnumake.h must
 be included with GMK_BUILDING_MAKE defined, which makeint.h
 already does.  Otherwise, the linker will look for, and fail to
 find, gmk_* functions in some external dynamic library.
2013-05-18 14:03:26 +03:00
Eli Zaretskii
171eb41908 Fix MS-Windows compilation when OUTPUT_SYNC is not defined.
main.c (prepare_mutex_handle_string): Define conditioned on OUTPUT_SYNC.
2013-05-17 16:24:13 +03:00
Eli Zaretskii
9babfe49a5 Fix a bug in build_w32.bat when building a released tarball.
build_w32.bat: Copy config.h.W32 to config.h regardless of
 whether or not we are building from SCM.
2013-05-17 13:34:24 +03:00
Paul Smith
b16852a77f Update for GNU make release candidate 3.99.90. 2013-05-17 02:40:37 -04:00
Paul Smith
96cf67bd29 Update source file format: remove TABs, use GNU coding styles. 2013-05-17 02:29:46 -04:00
Paul Smith
5370238316 Update copyright for changes in 2013. 2013-05-17 01:47:42 -04:00
Paul Smith
398058a873 Use xcalloc() in hash.c to handle out of memory errors. 2013-05-17 01:24:19 -04:00
Paul Smith
b730fbc6b8 Remove the dlopen() pointer from struct filedef.
This pointer is almost never needed, and it increases the size of the filedef
struct for all files (of which there are a huge number for large builds).
Instead keep a bit field marking whether the file is a loaded object and if so
call a new function to unload it.  In load.c we keep a simple linked list of
loaded objects (of which there will be very few typically) and their dlopen()
pointers.
2013-05-17 01:20:39 -04:00
Paul Smith
c21c1455fd Add requirement for plugin_is_GPL_compatible symbol in loaded objects. 2013-05-14 22:53:42 -04:00
Paul Smith
58dae24352 [Savannah #20501] Handle adding -r/-R to MAKEFLAGS in the makefile.
If -R is set in the makefile and not the command line, then go through all the
default variables and undefine them.  If -r is set in the makefile and not in
the command line, then remove all .SUFFIX prefixes (unless the user set it)
and SUFFIX variable setting.  In -p mode don't print builtins.
2013-05-13 04:30:20 -04:00
Paul Smith
2627d83221 Use level o_env_override for MAKEFLAGS so it's reset even with -e.
Fixes Savannah bug #2216.
2013-05-13 02:30:14 -04:00
Paul Smith
381baeef7a Add new --trace[=MODE] flags, with --trace=dir
This mode replaces the previous heuristic setting enabled with -O, where we
would log directory enter/leave for each synchronized output.  Now we only
do that if --trace=dir is given.
2013-05-13 01:30:24 -04:00
Eli Zaretskii
5367d393dd Avoid printing stdout and stderr messages without a newline between them.
job.c (child_out): Output the newline following the message
 before fllush-ing the stream.  Avoids displaying the following
 failure message, which goes to stderr, on the same line.
2013-05-11 17:42:56 +03:00
Eli Zaretskii
f0529daced Rearrange dllimport/dllexport declarations for MS-Windows.
gnumake.h (GMK_EXPORT) [_WIN32]: Move the dllexport declaration
 here from makeint.h.
 makeint.h (GMK_BUILDING_MAKE) [WINDOWS32]: Define before
 including gnumake.h.
2013-05-06 20:18:58 +03:00
Eli Zaretskii
a668c520b2 doc/make.texi (Loaded Object Example): Add a note about building
shared objects on MS-Windows.
2013-05-06 20:16:40 +03:00
Stefano Lattarini
c8bf04e141 build: enable 'subdir-objects' and 'silent-rules' automake options
On 04/30/2013 05:11 PM, Stefano Lattarini wrote:
> * configure.ac (AM_INIT_AUTOMAKE): Here.  The future major Automake
> version 2.0 (ETA about one, one and half year from now) will likely
> enable them by default, so better prepare ourselves.
>
Please drop this patch.  Enabling 'subdir-objects' would require
sublter changes to several other parts of the build system that I
don't know how to test properly.  We should only enable the
'silent-rules' option for the moment.  The updated patch below
does this.

Sorry for the noise,
  Stefano

---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ----

>From 46623411f017a447caa8fe75b3b42ec2fbeac458 Mon Sep 17 00:00:00 2001
Message-Id: <46623411f017a447caa8fe75b3b42ec2fbeac458.1367335124.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Tue, 30 Apr 2013 16:30:04 +0200
Subject: [PATCH] build: enable the 'silent-rules' automake options

* configure.ac (AM_INIT_AUTOMAKE): Here.  The future major Automake
version 2.0 (ETA about one, one and half year from now) will enable
it by default, so better prepare ourselves.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
2013-05-06 00:30:19 -04:00
Stefano Lattarini
0a56034aac build: require Autoconf >= 2.62 and Automake >= 1.11.1
Older versions of those tools should be considered fully obsolete.
Also, GNU make already requires Gettext >= 0.18.1, which has been
released six months after Automake 1.11.1 and two years after
Autoconf 2.62; so the new requirement shouldn't be problematic
for people already bootstrapping GNU make from the Git repository.

* configure.ac (AC_PREREQ): Require Autoconf 2.62 or later.
(AM_INIT_AUTOMAKE): Require Automake 1.11.1 or later (1.11 had
some serious bugs, and should not be used).

Copyright-paperwork-exempt: yes
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
2013-05-06 00:26:29 -04:00
Stefano Lattarini
13f13b96b3 cosmetics: fix few innocuous typos
Most of these were found using Lucas De Marchi's 'codespell' tool.

* ChangeLog: Fix minor typos.
* ChangeLog.2: Likewise.
* README.Amiga: Likewise.
* TODO.private: Likewise.
* function.c: Likewise.
* glob/glob.h: Likewise.
* job.c: Likewise.
* main.c: Likewise.
* readme.vms: Likewise.
* remake.c: Likewise.
* tests/ChangeLog: Likewise.
* tests/NEWS: Likewise.
* tests/README: Likewise.
* tests/scripts/variables/private: Likewise.
* vmsdir.h: Likewise.
* signame.c: Likewise.  While at it, improve line wrapping in the
touched comment.

Copyright-paperwork-exempt: yes
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
2013-05-05 20:50:37 -04:00
Stefano Lattarini
c3cd78066c build: get rid of 'HAVE_ANSI_COMPILER' C preprocessor conditional
GNU make already assume C89 or later throughout the codebase, and
that preprocessor conditional was no longer used anyway.

* configure.ac: Remove AC_DEFINE of HAVE_ANSI_COMPILER.
* config.ami.template: Remove #define of HAVE_ANSI_COMPILER.
* config.h-vms.template: Likewise.
* config.h.W32.template: Likewise.
* configh.dos.template: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
2013-05-05 20:45:44 -04:00
Paul Smith
15f7957939 Rename the -O "job" mode to "line" and "make" to "recurse". 2013-05-05 20:19:00 -04:00
Paul Smith
1d992d8fe7 Ensure command lines are written synchronously with -O.
If output-sync is enabled, have make write the command line to the temp file
instead of printing it directly to the screen to ensure that the output is
ordered properly.  Also, remove extraneous enter/leave operations by having
them printed directly when dumping temp file output.
2013-05-05 17:03:51 -04:00
Paul Smith
3484c9675a Add memory allocation cleanup to loadable objects.
Add gmk_alloc() and gmk_free() functions so loadable objects can access our
memory model.  Also provide a more extensive example in the manual.
2013-05-04 17:38:53 -04:00
Paul Smith
a0c5d0c63f Don't pump output to the descriptor, as we use FILE* elsewhere. 2013-05-04 17:31:20 -04:00
Eli Zaretskii
64dd61bcb8 Minor portabiulity fixes for MS-Windows.
makeint.h (ftruncate) [_MSC_VER]: Redirect to _chsize.
 (_S_ISDIR): If not defined (MinGW64), define to S_ISDIR.
2013-05-04 21:03:55 +03:00
Paul Smith
b8467292c9 Improve sync handling for -Ojob/-Otarget and recursion.
If we are not going to sync a command line then dump any collected output
first to preserve ordering.  Do some code cleanup:
  * Move the handle init to a separate function.
  * Move the temp file truncation to the output function.
  * Remember whether we sync in a variable for readability.
  * Handle EINTR and short writes in child_out().
  * Always call sync_output() in case output_sync was changed due to error.
2013-05-04 13:10:56 -04:00
Eli Zaretskii
01bad6f73a Fix the MS-Windows branch of output_sync code.
job.c (start_job_command): Make the condition for creating a
 temporary output file be identical to the Posix code branch.
 Suggested by Frank Heckenbach <f.heckenbach@fh-soft.de>.
2013-05-04 10:41:11 +03:00
Eli Zaretskii
82793f85f5 Fix invocation of Windows batch files with whitespace in their names.
w32/subproc/sub_proc.c: Include makeint.h.  Remove a private
 incompatible prototype of xmalloc.
 (batch_file_with_spaces): New function, detects Windows batch
 files whose names include whitespace characters.
 (process_begin): If exec_name is a batch file with whitespace
 characters in its name, pass NULL as the first argument to
 CreateProcess.  This avoids weird failures due to buggy quoting by
 CreateProcess.  For the details, see the discussion starting at
 http://lists.gnu.org/archive/html/make-w32/2013-04/msg00008.html.
2013-05-03 16:24:24 +03:00
Eli Zaretskii
a66469e003 Fix interfacing with and remaking dynamic objects on MS-Windows.
load.c (load_object, load_file): Accept an additional argument
 DLP and return in it a pointer that can be used to unload the
 dynamic object.
 read.c (eval): Call load_file with an additional argument, and
 record the pointer returned there in the 'struct file' object of
 dynamic objects in that object's 'struct file'.
 commands.c (execute_file_commands): Unload dynamic objects
 before remaking them, to avoid failure to remake if the OS doesn't
 allow overwriting objects that are in use.
 filedef.h (struct file): New member dlopen_ptr.
 gnumake.h (GMK_EXPORT): Define to dllexport/dllimport
 decorations for Windows and to nothing on other platforms.
 (gmk_eval, gmk_expand, gmk_add_function): Add GMK_EXPORT qualifier
 to prototypes.
 makeint.h (MAIN): Define before including gnumake.h, to give
 correct dllexport decorations to exported functions.
 (load_file): Adjust prototype.
 loadapi.c: Don't include gnumake.h, since makeint.h already
 includes it, and takes care of defining MAIN before doing so.
 build_w32.bat (LinkGCC): Produce an import library for functions
 exported by Make for loadable dynamic objects.

 w32/compat/posixfcn.c (dlclose): New function.
 w32/include/dlfcn.h (dlclose): Add prototype.

 scripts/features/load: Fix signatures of testload_gmk_setup and
 explicit_setup, to bring them in line with the documentation.
2013-05-03 16:09:12 +03:00
Eli Zaretskii
2926f7b466 Fix treatment of whitespace after a backslash on MS-Windows.
job.c (construct_command_argv_internal): Don't treat a backslash as an
 escape character before whitespace, if the shell is not a Posix
 shell.   For the description of the problem, see
 http://lists.gnu.org/archive/html/make-w32/2013-04/msg00014.html.
2013-05-01 18:31:53 +03:00
Eli Zaretskii
a87ff20158 job.c (start_job_command) [WINDOWS32]: Make the same fix for
MS-Windows as the previous commit did for Posix platforms.
2013-05-01 18:15:16 +03:00
Paul Smith
9acb657eb1 Don't synchronize output for recursive make unless -Omake 2013-05-01 07:59:24 -04:00
Eli Zaretskii
19a69bafc0 Support dynamic object loading on MS-Windows.
w32/include/dlfcn.h: New file.
 w32/compat/posixfcn.c: Include dlfcn.h.
 (dlopen, dlerror, dlsym) [MAKE_LOAD]: New functions, in support of
 dynamic loading.

 config.h.W32.template (MAKE_LOAD): Define.
 load.c (load_object) [HAVE_DOS_PATHS]: Support backslashes and
 drive letters in file names of dynamic objects.
2013-04-29 19:26:06 +03:00
Eli Zaretskii
9a7fe22b19 Fix the .ONESHELL operation on MS-Windows.
job.c (construct_command_argv_internal) [WINDOWS32]: Return
 right after generating new_argv for one_shell case.  This fixes
 the Windows build for both Unixy shell and stock Windows shells.
2013-04-29 19:17:07 +03:00
Paul Smith
9253a34a57 Merge branch 'master' of git.savannah.gnu.org:/srv/git/make 2013-04-28 19:25:24 -04:00
Paul Smith
f88eb23b02 Ensure error messages are printed with sync'd output.
Enhance the child_error() function so that it will write error output to the
child's sync output buffer, if it exists.  If it doesn't the output goes to
stdout/stderr.
2013-04-28 19:09:20 -04:00
Paul Smith
441b643355 Remove support for pre-ANSI variadic function calls.
We've required support for ANSI C (ISO C 89) or better for quite a while.  Get
rid of the old varags.h, doprnt() stuff and simply assume ANSI C variadic
function capability and basic C runtime library support (vfprintf, vsprintf,
etc.)
2013-04-28 17:59:28 -04:00
Eli Zaretskii
5667376edc Fix Savannah bug #37065 with $(wildcard foo/*/.) returning non-directories.
dir.c (local_stat) [WINDOWS32]: Use the wrapper on MS-Windows.
 If the argument ends in "dir/.", make sure the parent dir exists
 and is indeed a directory.  Fixes Savannah bug #37065.
2013-04-28 20:53:36 +03:00
Paul Smith
7f01830927 Add support for per-job output sync.
A new flag to the -O/--output-sync, "job", selects a per-job (that is, per
line of a recipe) output synchronization.  To support this move the close of
the temp file out of the sync_output() function and don't do it until we free
the child, since we may call sync_output() multiple times in a given recipe.
When we set up for a new temp file, if we're in per-job mode we truncate the
file and seek to the beginning to re-use it for every job.
2013-04-28 01:19:19 -04:00
Paul Smith
30843dea3a Fix support for .ONESHELL when dealing with non-POSIX shells. 2013-04-27 17:28:05 -04:00
Paul Smith
14d7654551 Rework the implementation of load.c to increase portability.
It should be sufficient, now, to write a new version of the load_object()
function.  That function won't be called unless we really want to load, so all
checking and parsing is taken care of before that.
2013-04-27 16:57:05 -04:00
Paul Smith
054d6d91e7 Merge branch 'master' of git.savannah.gnu.org:/srv/git/make 2013-04-27 16:24:08 -04:00
Eli Zaretskii
e56aad4061 Support .ONESHELL on MS-Windows, for default Windows shells.
read.c (record_files): Pay attention to .ONESHELL in MS-Windows.
 job.c (construct_command_argv_internal): Support .ONESHELL on
 MS-Windows, when the shell is not a Unixy shell.
2013-04-27 19:12:01 +03:00
Eli Zaretskii
049f8e88fc job.c: Fix compilation error on GNU/Linux due to "label at end of compound statement". 2013-04-27 14:30:01 +03:00
Eli Zaretskii
da7df54309 Support --output-sync on MS-Windows.
w32/compat/posixfcn.c: New file, with emulations of Posix
 functions and Posix functionality for MS-Windows.
 w32/subproc/sub_proc.c: Include io.h.
 (process_noinherit): New function, forces a file descriptor to not
 be inherited by child processes.
 (process_easy): Accept two additional arguments, and use them to
 set up the standard output and standard error handles of the child
 process.
 w32/include/sub_proc.h (process_easy): Adjust prototype.
 (process_noinherit): Add prototype.

 read.c [WINDOWS32]: Include windows.h and sub_proc.h.
 makeint.h (LOCALEDIR) [WINDOWS32}: Define to NULL if not
 defined.  This is needed because the MS-Windows build doesn't have
 a canonical place for LOCALEDIR.
 (WIN32_LEAN_AND_MEAN) [WINDOWS32]: Define, to avoid getting from
 windows.h header too much stuff that could conflict with the code.
 main.c <sync_mutex>: New static variable.
 <switches>: Add support for "--sync-mutex" switch.
 (decode_output_sync_flags): Decode the --sync-mutex= switch.
 (prepare_mutex_handle_string) [WINDOWS32]: New function.
 (main): Add "output-sync" to .FEATURES.
 job.h (CLOSE_ON_EXEC) [WINDOWS32]: Define to call
 process_noinherit.
 (F_GETFD, F_SETLKW, F_WRLCK, F_UNLCK, struct flock) [WINDOWS32]:
 New macros.
 (RECORD_SYNC_MUTEX): New macro, a no-op for Posix platforms.
 (sync_handle_t): New typedef.
 job.c <sync_handle>: Change type to sync_handle_t.
 (FD_NOT_EMPTY): Seek to the file's end.  Suggested by Frank
 Heckenbach <f.heckenbach@fh-soft.de>.
 (pump_from_tmp_fd) [WINDOWS32]: Switch to_fd to binary mode for
 the duration of this function, and then change back before
 returning.
 (start_job_command) [WINDOWS32]: Support output_sync mode on
 MS-Windows.  Use a system-wide mutex instead of locking
 stdout/stderr.  Call process_easy with two additional arguments:
 child->outfd and child->errfd.
 (exec_command) [WINDOWS32]: Pass two additional arguments, both
 -1, to process_easy, to adjust for the changed function signature.
 function.c (windows32_openpipe) [WINDOWS32]: This function now
 returns an int, which is -1 if it fails and zero otherwise.  It
 also calls 'error' instead of 'fatal', to avoid exiting
 prematurely.
 (func_shell_base) [WINDOWS32]: Call perror_with_name if
 windows32_openpipe fails, now that it always returns.  This avoids
 a compiler warning that error_prefix is not used in the MS-Windows
 build.
 config.h.W32.template (OUTPUT_SYNC): Define.
 build_w32.bat: Add w32/compat/posixfcn.c to compilation and
 linking commands.

 From Frank Heckenbach <f.heckenbach@fh-soft.de>:
 job.c (sync_output): Don't discard the output if
 acquire_semaphore fails; instead, dump the output unsynchronized.
2013-04-27 14:20:49 +03:00
Eli Zaretskii
f3a4b4ce6f Improve MS-Windows build scripts.
build_w32.bat: Improve.  Remove 'setlocal', as it isn't
 supported on Windows 9X.  Add --help and usage instructions.
 Support both debug and optimized builds with GCC under --debug.
 If building out of Git repo, always produce config.h, and edit
 gmk-default.scm into gmk-default.h.
 w32/subproc/build.bat: Support debug and optimized builds with
 GCC.
2013-04-25 20:41:53 +03:00
Stefano Lattarini
0daa9d37c4 Reflect the 'configure.in' -> 'configure.ac' rename throughout
In README, code comments, and auxiliary files.

Copyright-paperwork-exempt: yes
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
2013-04-21 19:21:43 -04:00
Paul Smith
50e2cb1b1a Some cleanups for Windows builds after the output-sync option.
Note currently output-sync is not supported on Windows.
2013-04-16 19:51:29 -04:00
Paul Smith
b5d017c624 Create an open_tmpfd() function to return temp files by FD. Use it. 2013-04-16 01:03:59 -04:00
Paul Smith
2bd957a89d Change the arg option for -O from numeric to string. 2013-04-15 13:22:51 -04:00
Paul Smith
6a52395ed1 Clarify LDFLAGS vs. LDLIBS. Fixes Savannah bug #37970. 2013-04-06 10:51:57 -04:00
Paul Smith
29cd1e9699 Reconsider targets waiting for prerequisites. Fixes Savannah bug #37703. 2013-04-06 10:29:20 -04:00
Paul Smith
450b7e1a3d Use ENULLLOOP to handle EINTR during realpath(). Fixes Savannah bug #38420 2013-02-28 00:55:15 -05:00
Paul Smith
5058a94ee7 Expand the loadable object support.
Provide a simple API for loaded objects to interact with GNU make.  I still
won't guarantee that this API won't change but it's much closer to something
that's supported and provides easy-to-use interfaces with a public header
file.
2013-02-25 01:38:36 -05:00
Paul Smith
ac1c6b404a Create externally referencable header file "gnumake.h".
Move the gmk_floc type to gnumake.h.
2013-01-20 13:39:54 -05:00
Paul Smith
51fb930ef2 Rename struct floc to typedef gmk_floc as an externally scoped symbol. 2013-01-20 13:16:46 -05:00
Paul Smith
a45f25ece3 Rename the make.h file to makeint.h for internal use only. 2013-01-20 11:33:20 -05:00
Paul Smith
b70aa3709e Allow dynamically loaded objects to be rebuilt by make. 2013-01-20 00:55:57 -05:00
Paul Smith
8e0a5645b8 Add more documentation on Git workflow and rules. 2013-01-19 17:11:23 -05:00
Eli Zaretskii
7899c6f383 Fix a typo in ChangeLog. 2013-01-18 18:02:16 +02:00
Paul Smith
686a74bfb2 [SV #38051] Recover all MAKEFLAGS after makefile rebuild step is complete.
Patch suggested by Frank Heckenbach <f.heckenbach@fh-soft.de>.
2013-01-13 12:21:01 -05:00
Paul Smith
ca17e5538f Add ChangeLog entries for Git migration. 2013-01-13 12:17:03 -05:00
Paul Smith
002702c89c Modify instructions, etc. for Git support. 2013-01-12 19:31:13 -05:00
Eli Zaretskii
0d12b1a207 job.c (create_batch_file): Fix last change: always increment the
counter of batch files before trying to use it.
2012-12-08 10:26:36 +00:00
Eli Zaretskii
299f5faf93 job.c (construct_command_argv_internal): Remove " from
sh_chars_dos[].  Ignore an escaped backslash inside a string
 quoted with "..".  This lifts the 4KB or 8KB command-line length
 limitation imposed by the Windows shell when a command uses quoted
 strings, because we now don't call the shell in that case.
2012-12-07 14:23:39 +00:00
Eli Zaretskii
0d5d963bcf job.c (reap_children): Add debug message for when removal of a temporary
batch file fails.
2012-12-07 14:13:16 +00:00
Eli Zaretskii
715927552f Avoid leaving temporary batch files in the temporary directory.
job.c (create_batch_file): Declare the counter of batch files
 static, to avoid having 2 jobs using the same file name and
 stepping on each other's toes.  When all 64K names are used up,
 make one more loop looking for slots that became vacant.  This
 avoids leaving behind temporary batch files in the temporary
 directory, which happens frequently on a fast machine when using
 parallel builds.
2012-12-07 14:11:15 +00:00
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
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
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