Various changes getting ready for the release of 3.81.

- Updates to make.texi and make.1 and other documentation
- Some VMS patches
- Fix minor bugs reported on the mailing list and from Debian.
This commit is contained in:
Paul Smith 2006-01-04 14:45:16 +00:00
parent 3d0d9e5d75
commit 64e16d6c00
20 changed files with 392 additions and 152 deletions

View File

@ -1,3 +1,63 @@
2006-01-04 Paul D. Smith <psmith@gnu.org>
* readme.vms: Updates for case-insensitive VMS file systems from
Hartmut Becker <Hartmut.Becker@hp.com>.
* dir.c (vms_hash): Ditto.
* vmsify.c (copyto): Ditto.
* vmsfunctions.c (readdir): Ditto.
* make.1: Add a section on the exit codes for make.
* doc/make.texi: A number of minor updates to the documentation.
2006-01-03 Paul D. Smith <psmith@gnu.org>
* remake.c (update_file_1): Mark a prerequisite changed if it
doesn't exist.
* read.c (eval): Be sure to strip off trailing whitespace from the
prerequisites list properly. Also, initialize all fields in
struct dep when creating a new one.
2005-12-28 Paul D. Smith <psmith@gnu.org>
* config.h.W32.template [WINDOWS32]: Add in some pragmas to
disable warnings for MSC.
Patch by Rob Tulloh <rtulloh@yahoo.com>.
2005-12-18 Paul D. Smith <psmith@gnu.org>
* Makefile.am (EXTRA_DIST): Distribute prepare_w32.bat.
2005-12-17 Eli Zaretskii <eliz@gnu.org>
* doc/make.texi (Execution): Add a footnote about changes in
handling of backslash-newline sequences. Mention the differences
on MS-DOS and MS-Windows.
* NEWS: More details about building the MinGW port and a pointer
to README.W32. Fix the section name that describes the new
backward-incompatible processing of backslash-newline sequences.
The special processing of SHELL set to "cmd" is only relevant to
MS-Windows, not MS-DOS.
2005-12-17 Eli Zaretskii <eliz@gnu.org>
* main.c (handle_runtime_exceptions): Cast exrec->ExceptionAddress
to DWORD, to avoid compiler warnings.
* job.c (exec_command): Cast hWaitPID and hPID to DWORD, and
use %ld in format, to avoid compiler warnings.
* doc/make.texi (Special Targets): Fix a typo.
(Appending): Fix cross-reference to Setting.
(Special Variables, Secondary Expansion, File Name Functions)
(Flavor Function, Pattern Match, Quick Reference): Ensure two
periods after a sentence.
(Execution): Add @: after "e.g.".
(Environment): Fix punctuation.
(Target-specific, Call Function, Quick Reference): Add @: after "etc."
(Shell Function, Target-specific): Add @: after "vs."
2005-12-14 Boris Kolpackov <boris@kolpackov.net> 2005-12-14 Boris Kolpackov <boris@kolpackov.net>
* read.c (record_target_var): Initialize variable's export field * read.c (record_target_var): Initialize variable's export field

View File

@ -59,7 +59,7 @@ EXTRA_DIST = README build.sh.in $(man_MANS) \
README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h \ README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h \
README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\ README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\
README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat \ README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat \
make_msvc_net2003.sln make_msvc_net2003.vcproj \ make_msvc_net2003.sln make_msvc_net2003.vcproj prepare_w32.bat\
readme.vms makefile.vms makefile.com config.h-vms \ readme.vms makefile.vms makefile.com config.h-vms \
vmsdir.h vmsfunctions.c vmsify.c vmsdir.h vmsfunctions.c vmsify.c
@ -137,7 +137,7 @@ check-loadavg: loadavg$(EXEEXT)
-./loadavg$(EXEEXT) -./loadavg$(EXEEXT)
# The loadavg function is invoked during "make check" to test getloadavg. # The loadavg function is invoked during "make check" to test getloadavg.
noinst_PROGRAMS = loadavg check_PROGRAMS = loadavg
nodist_loadavg_SOURCES = getloadavg.c nodist_loadavg_SOURCES = getloadavg.c
loadavg_CPPFLAGS = -DTEST loadavg_CPPFLAGS = -DTEST
loadavg_LDADD = @GETLOADAVG_LIBS@ loadavg_LDADD = @GETLOADAVG_LIBS@

35
NEWS
View File

@ -1,6 +1,6 @@
GNU make NEWS -*-indented-text-*- GNU make NEWS -*-indented-text-*-
History of user-visible changes. History of user-visible changes.
12 December 2005 28 December 2005
Copyright (C) 2002,2003,2004,2005 Free Software Foundation, Inc. Copyright (C) 2002,2003,2004,2005 Free Software Foundation, Inc.
See the end for copying conditions. See the end for copying conditions.
@ -14,7 +14,9 @@ Version 3.81beta4
* GNU make is ported to OS/2. * GNU make is ported to OS/2.
* GNU make is ported to MinGW. * GNU make is ported to MinGW. The MinGW build is only supported by
the build_w32.bat batch file; see the file README.W32 for more
details.
* WARNING: Backward-incompatibility! * WARNING: Backward-incompatibility!
GNU make now implements a generic "second expansion" feature on the GNU make now implements a generic "second expansion" feature on the
@ -36,8 +38,11 @@ Version 3.81beta4
* WARNING: Backward-incompatibility! * WARNING: Backward-incompatibility!
In order to comply with POSIX, the way in which GNU make processes In order to comply with POSIX, the way in which GNU make processes
backslash-newline sequences in command strings has changed. See the backslash-newline sequences in command strings has changed. If your
GNU make manual section "Shell Execution" for details. makefiles use backslash-newline sequences inside of single-quoted
strings in command scripts you will be impacted by this change. See
the GNU make manual section "Command Execution" (node "Execution") for
details.
* New command-line option: -L (--check-symlink-times). On systems that * New command-line option: -L (--check-symlink-times). On systems that
support symbolic links, if this option is given then GNU make will support symbolic links, if this option is given then GNU make will
@ -45,7 +50,7 @@ Version 3.81beta4
used to resolve target files. The default behavior remains as it used to resolve target files. The default behavior remains as it
always has: use the modification time of the actual target file only. always has: use the modification time of the actual target file only.
* The "else" conditional line can now be followed by any other legal * The "else" conditional line can now be followed by any other valid
conditional on the same line: this does not increase the depth of the conditional on the same line: this does not increase the depth of the
conditional nesting, so only one "endif" is required to close the conditional nesting, so only one "endif" is required to close the
conditional. conditional.
@ -98,10 +103,13 @@ Version 3.81beta4
an enhancement to POSIX, if you export the make variable SHELL then an enhancement to POSIX, if you export the make variable SHELL then
it will be set in the environment, just as before. it will be set in the environment, just as before.
* On DOS and MS Windows systems, explicitly setting SHELL to a pathname * On MS Windows systems, explicitly setting SHELL to a pathname ending
ending in "cmd" or "cmd.exe" (case-insensitive) will force GNU make to in "cmd" or "cmd.exe" (case-insensitive) will force GNU make to use
use the DOS command interpreter in batch mode even if a UNIX-like the DOS command interpreter in batch mode even if a UNIX-like shell
shell could be found on the system. could be found on the system.
* On VMS there is now support for case-sensitive filesystems such as ODS5.
See the readme.vms file for information.
* Updated to autoconf 2.59, automake 1.9.5, and gettext 0.14.1. Users * Updated to autoconf 2.59, automake 1.9.5, and gettext 0.14.1. Users
should not be impacted. should not be impacted.
@ -110,6 +118,10 @@ Version 3.81beta4
Belarusian, Finnish, Kinyarwandan, and Irish. Many updated Belarusian, Finnish, Kinyarwandan, and Irish. Many updated
translations. translations.
A complete list of bugs fixed in this version is available here:
http://savannah.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=101
Version 3.80 Version 3.80
@ -187,6 +199,11 @@ Version 3.80
See ABOUT-NLS for more information. See ABOUT-NLS for more information.
* Updated to autoconf 2.54 and automake 1.7. Users should not be impacted. * Updated to autoconf 2.54 and automake 1.7. Users should not be impacted.
A complete list of bugs fixed in this version is available here:
http://savannah.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=102
Version 3.79.1 Version 3.79.1

View File

@ -1,6 +1,10 @@
Port of GNU make to Microsoft Windows 95/98/NT/2000/XP This version of GNU make has been tested on Microsoft Windows 2000/XP/2003.
Builds natively with MSVC 2.x, 4.x, 5.x, 6.x and MSVC.NET 7.x. It has also been used on Windows 95/98/NT, and on OS/2.
Also builds with the MinGW port of GCC 3.x (tested with GCC 3.4.2).
It builds natively with MSVC 2.x, 4.x, 5.x, 6.x, and 2003 as well as
.NET 7.x and .NET 2003.
It builds with the MinGW port of GCC 3.x (tested with GCC 3.4.2).
The Windows 32-bit port of GNU make is maintained jointly by various The Windows 32-bit port of GNU make is maintained jointly by various
people. It was originally made by Rob Tulloh. people. It was originally made by Rob Tulloh.
@ -234,23 +238,23 @@ SAMBA/NTFS/VFAT:
package using SAMBA as my file server. The reason seems to be package using SAMBA as my file server. The reason seems to be
related to the way VC++ 4.0 changes the case name of the pdb related to the way VC++ 4.0 changes the case name of the pdb
filename it is passed on the command line. It seems to change filename it is passed on the command line. It seems to change
the name always to to lower case. I contend that the name always to to lower case. I contend that the VC++
the VC++ compiler should not change the casename of files that compiler should not change the casename of files that are passed
are passed as arguments on the command line. I don't think this as arguments on the command line. I don't think this was a
was a problem in MSVC 2.x, but I know it is a problem in MSVC 4.x. problem in MSVC 2.x, but I know it is a problem in MSVC 4.x.
The package builds fine on VFAT and NTFS filesystems. The package builds fine on VFAT and NTFS filesystems.
Most all of the development I have done to date has been using Most all of the development I have done to date has been using
NTFS and long file names. I have not done any considerable work NTFS and long file names. I have not done any considerable work
under VFAT. VFAT users may wish to be aware that this port under VFAT. VFAT users may wish to be aware that this port of
of make does respect case sensitivity. make does respect case sensitivity.
FAT: FAT:
Version 3.76 added support for FAT filesystems. Make Version 3.76 added support for FAT filesystems. Make works
works around some difficulties with stat'ing of around some difficulties with stat'ing of files and caching of
files and caching of filenames and directories internally. filenames and directories internally.
Bug reports: Bug reports:

View File

@ -350,7 +350,7 @@
/* Define for case insensitve filenames */ /* Define for case insensitve filenames */
#define HAVE_CASE_INSENSITIVE_FS 1 #define HAVE_CASE_INSENSITIVE_FS 1
/* VMS specific, define it if you want to use case sensitve targets */ /* VMS specific, define it if you want to use case sensitive targets */
/* #undef WANT_CASE_SENSITIVE_TARGETS */ /* #undef WANT_CASE_SENSITIVE_TARGETS */
/* VMS specific, V7.0 has opendir() and friends, so it's undefined */ /* VMS specific, V7.0 has opendir() and friends, so it's undefined */

View File

@ -1,5 +1,13 @@
/* config.h.W32 -*-C-*- */ /* config.h.W32 -*-C-*- */
/* Suppress some Visual C++ warnings.
Maybe after the code cleanup for ISO C we can remove some/all of these. */
#if _MSC_VER > 1000
# pragma warning(disable:4100) /* unreferenced formal parameter */
# pragma warning(disable:4127) /* conditional expression is constant */
# pragma warning(disable:4702) /* unreachable code */
#endif
/* Define to 1 if the `closedir' function returns void instead of `int'. */ /* Define to 1 if the `closedir' function returns void instead of `int'. */
/* #undef CLOSEDIR_VOID */ /* #undef CLOSEDIR_VOID */

4
dir.c
View File

@ -155,7 +155,11 @@ vms_hash (char *name)
while (*name) while (*name)
{ {
unsigned char uc = *name; unsigned char uc = *name;
#ifdef HAVE_CASE_INSENSITIVE_FS
h = (h << 4) + (isupper (uc) ? tolower (uc) : uc); h = (h << 4) + (isupper (uc) ? tolower (uc) : uc);
#else
h = (h << 4) + uc;
#endif
name++; name++;
g = h & 0xf0000000; g = h & 0xf0000000;
if (g) if (g)

View File

@ -10,8 +10,8 @@
@set RCSID $Id$ @set RCSID $Id$
@set EDITION 0.70 @set EDITION 0.70
@set VERSION 3.81 @set VERSION 3.81
@set UPDATED 07 May 2005 @set UPDATED 28 Dec 2005
@set UPDATE-MONTH May 2005 @set UPDATE-MONTH Dec 2005
@c ISBN provided by Lisa M. Opus Goldstein <opus@gnu.org>, 5 May 2004 @c ISBN provided by Lisa M. Opus Goldstein <opus@gnu.org>, 5 May 2004
@set ISBN 1-882114-83-5 @set ISBN 1-882114-83-5
@ -1290,7 +1290,7 @@ Sets the default goal to be used if no targets were specified on the
command line (@pxref{Goals, , Arguments to Specify the Goals}). The command line (@pxref{Goals, , Arguments to Specify the Goals}). The
@code{.DEFAULT_GOAL} variable allows you to discover the current @code{.DEFAULT_GOAL} variable allows you to discover the current
default goal, restart the default goal selection algorithm by clearing default goal, restart the default goal selection algorithm by clearing
its value, or to explicitly set the default goal. The following its value, or to explicitly set the default goal. The following
example illustrates these cases: example illustrates these cases:
@example @example
@ -1738,7 +1738,7 @@ when the target is an archive member, the target member name. The
rule for this target. @code{$$^} and @code{$$+} evaluate to the list rule for this target. @code{$$^} and @code{$$+} evaluate to the list
of all prerequisites of rules @emph{that have already appeared} for of all prerequisites of rules @emph{that have already appeared} for
the same target (@code{$$+} with repetitions and @code{$$^} the same target (@code{$$+} with repetitions and @code{$$^}
without). The following example will help illustrate these behaviors: without). The following example will help illustrate these behaviors:
@example @example
.SECONDEXPANSION: .SECONDEXPANSION:
@ -1750,12 +1750,12 @@ foo: foo.2 bar.2 $$< $$^ $$+ # line #2
foo: foo.3 bar.3 $$< $$^ $$+ # line #3 foo: foo.3 bar.3 $$< $$^ $$+ # line #3
@end example @end example
For the first line, all three variables (@code{$$<}, @code{$$^}, and In the first prerequisite list, all three variables (@code{$$<},
@code{$$+}) expand to the empty string. For the second line, they will @code{$$^}, and @code{$$+}) expand to the empty string. In the
have values @code{foo.1}, @code{foo.1 bar.1}, and @code{foo.1 bar.1} second, they will have values @code{foo.1}, @code{foo.1 bar.1}, and
respectively. For the third they will have values @code{foo.1}, @code{foo.1 bar.1} respectively. In the third they will have values
@code{foo.1 bar.1 foo.2 bar.2}, and @code{foo.1 bar.1 foo.2 bar.2} @code{foo.1}, @code{foo.1 bar.1 foo.2 bar.2}, and @code{foo.1 bar.1
respectively. foo.2 bar.2} respectively.
Rules undergo secondary expansion in makefile order, except that Rules undergo secondary expansion in makefile order, except that
the rule with the command script is always evaluated last. the rule with the command script is always evaluated last.
@ -2680,8 +2680,8 @@ build the rest of the directories even when one fails. This can be
overcome by adding shell commands to note the error and exit, but then overcome by adding shell commands to note the error and exit, but then
it will do so even if @code{make} is invoked with the @code{-k} option, it will do so even if @code{make} is invoked with the @code{-k} option,
which is unfortunate. Second, and perhaps more importantly, you cannot which is unfortunate. Second, and perhaps more importantly, you cannot
take advantage of the parallel build capabilities of make using this take advantage of @code{make}'s ability to build targets in parallel
method, since there is only one rule. (@pxref{Parallel, ,Parallel Execution}), since there is only one rule.
By declaring the subdirectories as phony targets (you must do this as By declaring the subdirectories as phony targets (you must do this as
the subdirectory obviously always exists; otherwise it won't be built) the subdirectory obviously always exists; otherwise it won't be built)
@ -2907,7 +2907,7 @@ intermediate).
@findex .SECONDEXPANSION @findex .SECONDEXPANSION
@item .SECONDEXPANSION @item .SECONDEXPANSION
If @code{.SECONDEXPANSION} is mentioned as a target anwyeren in the If @code{.SECONDEXPANSION} is mentioned as a target anywhere in the
makefile, then all prerequisite lists defined @emph{after} it appears makefile, then all prerequisite lists defined @emph{after} it appears
will be expanded a second time after all makefiles have been read in. will be expanded a second time after all makefiles have been read in.
@xref{Secondary Expansion, ,Secondary Expansion}. @xref{Secondary Expansion, ,Secondary Expansion}.
@ -3424,7 +3424,7 @@ called @file{@var{name}.d} from a C source file called @file{@var{name}.c}:
@smallexample @smallexample
@group @group
%.d: %.c %.d: %.c
@set -e; rm -f $@@; \ @@set -e; rm -f $@@; \
$(CC) -M $(CPPFLAGS) $< > $@@.$$$$; \ $(CC) -M $(CPPFLAGS) $< > $@@.$$$$; \
sed 's,\($*\)\.o[ :]*,\1.o $@@ : ,g' < $@@.$$$$ > $@@; \ sed 's,\($*\)\.o[ :]*,\1.o $@@ : ,g' < $@@.$$$$ > $@@; \
rm -f $@@.$$$$ rm -f $@@.$$$$
@ -3585,21 +3585,28 @@ by making a new subshell for each line. (In practice, @code{make} may
take shortcuts that do not affect the results.) take shortcuts that do not affect the results.)
@cindex @code{cd} (shell command) @cindex @code{cd} (shell command)
@strong{Please note:} this implies that shell commands such as @code{cd} @strong{Please note:} this implies that shell commands such as
that set variables local to each process will not affect the following @code{cd} that set variables local to each process will not affect the
command lines. @footnote{On MS-DOS, the value of current working following command lines.@footnote{On MS-DOS, the value of current
directory is @strong{global}, so changing it @emph{will} affect the working directory is @strong{global}, so changing it @emph{will}
following command lines on those systems.} If you want to use @code{cd} affect the following command lines on those systems.} If you want to
to affect the next command, put the two on a single line with a use @code{cd} to affect the next command, put them on a single line.
semicolon between them. Then @code{make} will consider them a single Then @code{make} will consider them a single command and pass them
command and pass them, together, to a shell which will execute them in both to a single shell which will execute them in sequence. For
sequence. For example: example:
@example @example
foo : bar/lose foo : bar/lose
cd bar; gobble lose > ../foo cd $(@@D) && gobble $(@@F) > ../$@@
@end example @end example
@noindent
Here we use the shell AND operator (@code{&&}) so that if the
@code{cd} command fails, the script will fail without trying to invoke
the @code{gobble} command in the wrong directory, which could very
easily cause problems (in this case it would certainly cause
@file{../foo} to be truncated, at least).
@cindex commands, backslash (@code{\}) in @cindex commands, backslash (@code{\}) in
@cindex commands, quoting newlines in @cindex commands, quoting newlines in
@cindex backslash (@code{\}), in commands @cindex backslash (@code{\}), in commands
@ -3620,15 +3627,22 @@ all :
space space
@@echo no\ @@echo no\
space space
@@echo one \
space
@@echo one\
space
@end group @end group
@end example @end example
consists of two separate shell commands where the output is: @noindent
consists of four separate shell commands where the output is:
@example @example
@group @group
nospace nospace
nospace nospace
one space
one space
@end group @end group
@end example @end example
@ -3642,6 +3656,7 @@ all : ; @@echo 'hello \
@end group @end group
@end example @end example
@noindent
will run one shell with a command script of: will run one shell with a command script of:
@example @example
@ -3652,6 +3667,7 @@ world' ; echo "hello \
@end group @end group
@end example @end example
@noindent
which, according to shell quoting rules, will yield the following output: which, according to shell quoting rules, will yield the following output:
@example @example
@ -3662,6 +3678,13 @@ hello world
@end group @end group
@end example @end example
@noindent
Notice how the backslash/newline pair was removed inside the string quoted
with double quotes (@code{"..."}), but not from the string quoted with single
quotes (@code{'...'}). This is the way the default shell (@file{/bin/sh})
handles backslash/newline pairs. If you specify a different shell in your
makefiles it may treat them differently.
@vindex SHELL @vindex SHELL
The program used as the shell is taken from the variable @code{SHELL}. The program used as the shell is taken from the variable @code{SHELL}.
By default, the program @file{/bin/sh} is used. By default, the program @file{/bin/sh} is used.
@ -3719,7 +3742,7 @@ pathname of the shell, exactly as things are on Unix.
The effect of the above DOS-specific processing is that a Makefile that The effect of the above DOS-specific processing is that a Makefile that
says @samp{SHELL = /bin/sh} (as many Unix makefiles do), will work says @samp{SHELL = /bin/sh} (as many Unix makefiles do), will work
on MS-DOS unaltered if you have e.g. @file{sh.exe} installed in some on MS-DOS unaltered if you have e.g.@: @file{sh.exe} installed in some
directory along your @code{PATH}. directory along your @code{PATH}.
@cindex environment, @code{SHELL} in @cindex environment, @code{SHELL} in
@ -5287,7 +5310,7 @@ definition of the variable. If you defined it first with @samp{:=},
making it a simply-expanded variable, @samp{+=} adds to that making it a simply-expanded variable, @samp{+=} adds to that
simply-expanded definition, and expands the new text before appending it simply-expanded definition, and expands the new text before appending it
to the old value just as @samp{:=} does to the old value just as @samp{:=} does
(@pxref{Setting, ,Setting Variables} for a full explanation of @samp{:=}). (see @ref{Setting, ,Setting Variables}, for a full explanation of @samp{:=}).
In fact, In fact,
@example @example
@ -5528,7 +5551,7 @@ and therefore are not affected by the value in the environment.)
When @code{make} runs a command script, variables defined in the When @code{make} runs a command script, variables defined in the
makefile are placed into the environment of that command. This allows makefile are placed into the environment of that command. This allows
you to pass values to sub-@code{make} invocations. (@pxref{Recursion, you to pass values to sub-@code{make} invocations (@pxref{Recursion,
,Recursive Use of @code{make}}). By default, only variables that came ,Recursive Use of @code{make}}). By default, only variables that came
from the environment or the command line are passed to recursive from the environment or the command line are passed to recursive
invocations. You can use the @code{export} directive to pass other invocations. You can use the @code{export} directive to pass other
@ -5605,7 +5628,7 @@ conditional (@samp{?=}). All variables that appear within the
target: thus, any previously-defined target-specific variable values target: thus, any previously-defined target-specific variable values
will be in effect. Note that this variable is actually distinct from will be in effect. Note that this variable is actually distinct from
any ``global'' value: the two variables do not have to have the same any ``global'' value: the two variables do not have to have the same
flavor (recursive vs. static). flavor (recursive vs.@: static).
Target-specific variables have the same priority as any other makefile Target-specific variables have the same priority as any other makefile
variable. Variables provided on the command-line (and in the variable. Variables provided on the command-line (and in the
@ -5616,7 +5639,7 @@ variable value to be preferred.
There is one more special feature of target-specific variables: when There is one more special feature of target-specific variables: when
you define a target-specific variable that variable value is also in you define a target-specific variable that variable value is also in
effect for all prerequisites of this target, and all their effect for all prerequisites of this target, and all their
prerequisites, etc. (unless those prerequisites override that variable prerequisites, etc.@: (unless those prerequisites override that variable
with their own target-specific variable value). So, for example, a with their own target-specific variable value). So, for example, a
statement like this: statement like this:
@ -6596,8 +6619,8 @@ that match the pattern.
@cindex file name, realpath of @cindex file name, realpath of
For each file name in @var{names} return the canonical absolute name. For each file name in @var{names} return the canonical absolute name.
A canonical name does not contain any @code{.} or @code{..} components, A canonical name does not contain any @code{.} or @code{..} components,
nor any repeated path separators (@code{/}) or symlinks. In case of a nor any repeated path separators (@code{/}) or symlinks. In case of a
failure the empty string is returned. Consult the @code{realpath(3)} failure the empty string is returned. Consult the @code{realpath(3)}
documentation for a list of possible failure causes. documentation for a list of possible failure causes.
@item $(abspath @var{names}@dots{}) @item $(abspath @var{names}@dots{})
@ -6606,9 +6629,9 @@ documentation for a list of possible failure causes.
@cindex file name, abspath of @cindex file name, abspath of
For each file name in @var{names} return an absolute name that does For each file name in @var{names} return an absolute name that does
not contain any @code{.} or @code{..} components, nor any repeated path not contain any @code{.} or @code{..} components, nor any repeated path
separators (@code{/}). Note that in contrast to @code{realpath} separators (@code{/}). Note that, in contrast to @code{realpath}
function, @code{abspath} does not resolve symlinks and does not require function, @code{abspath} does not resolve symlinks and does not require
the file names to refer to an existing file or directory. Use the the file names to refer to an existing file or directory. Use the
@code{wildcard} function to test for existence. @code{wildcard} function to test for existence.
@end table @end table
@ -6804,7 +6827,7 @@ LS := $(call pathsearch,ls)
Now the variable LS contains @code{/bin/ls} or similar. Now the variable LS contains @code{/bin/ls} or similar.
The @code{call} function can be nested. Each recursive invocation gets The @code{call} function can be nested. Each recursive invocation gets
its own local values for @code{$(1)}, etc. that mask the values of its own local values for @code{$(1)}, etc.@: that mask the values of
higher-level @code{call}. For example, here is an implementation of a higher-level @code{call}. For example, here is an implementation of a
@dfn{map} function: @dfn{map} function:
@ -7058,9 +7081,9 @@ Here the redefinition takes place if @samp{$(origin bletch)} returns either
The @code{flavor} function is unlike most other functions (and like The @code{flavor} function is unlike most other functions (and like
@code{origin} function) in that it does not operate on the values of @code{origin} function) in that it does not operate on the values of
variables; it tells you something @emph{about} a variable. Specifically, variables; it tells you something @emph{about} a variable.
it tells you the flavor of a variable Specifically, it tells you the flavor of a variable (@pxref{Flavors,
(@pxref{Flavors, ,The Two Flavors of Variables}). ,The Two Flavors of Variables}).
The syntax of the @code{flavor} function is: The syntax of the @code{flavor} function is:
@ -7117,7 +7140,7 @@ function calls are expanded (@pxref{Reading Makefiles, , How
@code{make} Reads a Makefile}). Because this function involves @code{make} Reads a Makefile}). Because this function involves
spawning a new shell, you should carefully consider the performance spawning a new shell, you should carefully consider the performance
implications of using the @code{shell} function within recursively implications of using the @code{shell} function within recursively
expanded variables vs. simply expanded variables (@pxref{Flavors, ,The expanded variables vs.@: simply expanded variables (@pxref{Flavors, ,The
Two Flavors of Variables}). Two Flavors of Variables}).
Here are some examples of the use of the @code{shell} function: Here are some examples of the use of the @code{shell} function:
@ -7217,6 +7240,7 @@ find out which files are out of date without changing them.
By giving arguments when you run @code{make}, you can do any of these By giving arguments when you run @code{make}, you can do any of these
things and many others. things and many others.
@cindex exit status of make
The exit status of @code{make} is always one of three values: The exit status of @code{make} is always one of three values:
@table @code @table @code
@item 0 @item 0
@ -8139,13 +8163,19 @@ available unless the makefile explicitly overrides or cancels them.
canceling or overriding an implicit rule. The @samp{-r} or canceling or overriding an implicit rule. The @samp{-r} or
@samp{--no-builtin-rules} option cancels all predefined rules. @samp{--no-builtin-rules} option cancels all predefined rules.
This manual only documents the default rules available on POSIX-based
operating systems. Other operating systems, such as VMS, Windows,
OS/2, etc. may have different sets of default rules. To see the full
list of default rules and variables available in your version of GNU
@code{make}, run @samp{make -p} in a directory with no makefile.
Not all of these rules will always be defined, even when the @samp{-r} Not all of these rules will always be defined, even when the @samp{-r}
option is not given. Many of the predefined implicit rules are option is not given. Many of the predefined implicit rules are
implemented in @code{make} as suffix rules, so which ones will be implemented in @code{make} as suffix rules, so which ones will be
defined depends on the @dfn{suffix list} (the list of prerequisites of defined depends on the @dfn{suffix list} (the list of prerequisites of
the special target @code{.SUFFIXES}). The default suffix list is: the special target @code{.SUFFIXES}). The default suffix list is:
@code{.out}, @code{.a}, @code{.ln}, @code{.o}, @code{.c}, @code{.cc}, @code{.out}, @code{.a}, @code{.ln}, @code{.o}, @code{.c}, @code{.cc},
@code{.C}, @code{.p}, @code{.f}, @code{.F}, @code{.r}, @code{.y}, @code{.C}, @code{.cpp}, @code{.p}, @code{.f}, @code{.F}, @code{.r}, @code{.y},
@code{.l}, @code{.s}, @code{.S}, @code{.mod}, @code{.sym}, @code{.def}, @code{.l}, @code{.s}, @code{.S}, @code{.mod}, @code{.sym}, @code{.def},
@code{.h}, @code{.info}, @code{.dvi}, @code{.tex}, @code{.texinfo}, @code{.h}, @code{.info}, @code{.dvi}, @code{.tex}, @code{.texinfo},
@code{.texi}, @code{.txinfo}, @code{.w}, @code{.ch} @code{.web}, @code{.texi}, @code{.txinfo}, @code{.w}, @code{.ch} @code{.web},
@ -8170,12 +8200,13 @@ a command of the form @samp{$(CC) -c $(CPPFLAGS) $(CFLAGS)}.@refill
@item Compiling C++ programs @item Compiling C++ programs
@cindex C++, rule to compile @cindex C++, rule to compile
@pindex g++ @pindex g++
@pindex .C
@pindex .cc @pindex .cc
@file{@var{n}.o} is made automatically from @file{@var{n}.cc} or @pindex .cpp
@file{@var{n}.C} with a command of the form @samp{$(CXX) -c $(CPPFLAGS) @pindex .C
$(CXXFLAGS)}. We encourage you to use the suffix @samp{.cc} for C++ @file{@var{n}.o} is made automatically from @file{@var{n}.cc},
source files instead of @samp{.C}.@refill @file{@var{n}.cpp}, or @file{@var{n}.C} with a command of the form
@samp{$(CXX) -c $(CPPFLAGS) $(CXXFLAGS)}. We encourage you to use the
suffix @samp{.cc} for C++ source files instead of @samp{.C}.@refill
@item Compiling Pascal programs @item Compiling Pascal programs
@cindex Pascal, rule to compile @cindex Pascal, rule to compile
@ -8436,11 +8467,11 @@ the value @w{@samp{; mv $*.o $@@}}.
@cindex flags for compilers @cindex flags for compilers
The commands in built-in implicit rules make liberal use of certain The commands in built-in implicit rules make liberal use of certain
predefined variables. You can alter these variables in the makefile, predefined variables. You can alter the values of these variables in
with arguments to @code{make}, or in the environment to alter how the the makefile, with arguments to @code{make}, or in the environment to
implicit rules work without redefining the rules themselves. You can alter how the implicit rules work without redefining the rules
cancel all variables used by implicit rules with the @samp{-R} or themselves. You can cancel all variables used by implicit rules with
@samp{--no-builtin-variables} option. the @samp{-R} or @samp{--no-builtin-variables} option.
For example, the command used to compile a C source file actually says For example, the command used to compile a C source file actually says
@samp{$(CC) -c $(CFLAGS) $(CPPFLAGS)}. The default values of the variables @samp{$(CC) -c $(CFLAGS) $(CPPFLAGS)}. The default values of the variables
@ -8459,7 +8490,15 @@ some command arguments, but it must start with an actual executable program
name.) If a variable value contains more than one argument, separate them name.) If a variable value contains more than one argument, separate them
with spaces. with spaces.
Here is a table of variables used as names of programs in built-in rules: The following tables describe of some of the more commonly-used predefined
variables. This list is not exhaustive, and the default values shown here may
not be what is selected by @code{make} for your environment. To see the
complete list of predefined variables for your instance of GNU @code{make} you
can run @samp{make -p} in a directory with no makefiles.
Here is a table of some of the more common variables used as names of
programs in built-in rules:
makefiles.
@table @code @table @code
@item AR @item AR
@ -8469,7 +8508,7 @@ Archive-maintaining program; default @samp{ar}.
@item AS @item AS
@vindex AS @vindex AS
Program for doing assembly; default @samp{as}. Program for compiling assembly files; default @samp{as}.
@pindex as @pindex as
@item CC @item CC
@ -8477,6 +8516,11 @@ Program for doing assembly; default @samp{as}.
Program for compiling C programs; default @samp{cc}. Program for compiling C programs; default @samp{cc}.
@pindex cc @pindex cc
@item CO
@vindex CO
Program for checking out files from RCS; default @samp{co}.
@pindex cc
@item CXX @item CXX
@vindex CXX @vindex CXX
Program for compiling C++ programs; default @samp{g++}. Program for compiling C++ programs; default @samp{g++}.
@ -8505,25 +8549,29 @@ Program for extracting a file from SCCS; default @samp{get}.
@item LEX @item LEX
@vindex LEX @vindex LEX
Program to use to turn Lex grammars into C programs or Ratfor programs; Program to use to turn Lex grammars into source code; default @samp{lex}.
default @samp{lex}.
@pindex lex @pindex lex
@item YACC
@vindex YACC
Program to use to turn Yacc grammars into source code; default @samp{yacc}.
@pindex yacc
@item LINT
@vindex LINT
Program to use to run lint on source code; default @samp{lint}.
@pindex lint
@item M2C
@vindex M2C
Program to use to compile Modula-2 source code; default @samp{m2c}.
@pindex m2c
@item PC @item PC
@vindex PC @vindex PC
Program for compiling Pascal programs; default @samp{pc}. Program for compiling Pascal programs; default @samp{pc}.
@pindex pc @pindex pc
@item YACC
@vindex YACC
Program to use to turn Yacc grammars into C programs; default @samp{yacc}.
@pindex yacc
@item YACCR
@vindex YACCR
Program to use to turn Yacc grammars into Ratfor
programs; default @samp{yacc -r}.
@item MAKEINFO @item MAKEINFO
@vindex MAKEINFO @vindex MAKEINFO
Program to convert a Texinfo source file into an Info file; default Program to convert a Texinfo source file into an Info file; default
@ -8609,13 +8657,17 @@ Extra flags to give to the SCCS @code{get} program.
@item LDFLAGS @item LDFLAGS
@vindex LDFLAGS @vindex LDFLAGS
Extra flags to give to compilers when they are Extra flags to give to compilers when they are supposed to invoke the linker,
supposed to invoke the linker, @samp{ld}. @samp{ld}.
@item LFLAGS @item LFLAGS
@vindex LFLAGS @vindex LFLAGS
Extra flags to give to Lex. Extra flags to give to Lex.
@item YFLAGS
@vindex YFLAGS
Extra flags to give to Yacc.
@item PFLAGS @item PFLAGS
@vindex PFLAGS @vindex PFLAGS
Extra flags to give to the Pascal compiler. Extra flags to give to the Pascal compiler.
@ -8624,9 +8676,9 @@ Extra flags to give to the Pascal compiler.
@vindex RFLAGS @vindex RFLAGS
Extra flags to give to the Fortran compiler for Ratfor programs. Extra flags to give to the Fortran compiler for Ratfor programs.
@item YFLAGS @item LINTFLAGS
@vindex YFLAGS @vindex LINTFLAGS
Extra flags to give to Yacc. Extra flags to give to lint.
@end table @end table
@node Chained Rules, Pattern Rules, Implicit Variables, Implicit Rules @node Chained Rules, Pattern Rules, Implicit Variables, Implicit Rules
@ -9119,7 +9171,7 @@ before it is compared with the target prefix and suffix. After the
comparison of the file name to the target pattern, the directory comparison of the file name to the target pattern, the directory
names, along with the slash that ends them, are added on to the names, along with the slash that ends them, are added on to the
prerequisite file names generated from the pattern rule's prerequisite prerequisite file names generated from the pattern rule's prerequisite
patterns and the file name. The directories are ignored only for the patterns and the file name. The directories are ignored only for the
purpose of finding an implicit rule to use, not in the application of purpose of finding an implicit rule to use, not in the application of
that rule. Thus, @samp{e%t} matches the file name @file{src/eat}, that rule. Thus, @samp{e%t} matches the file name @file{src/eat},
with @samp{src/a} as the stem. When prerequisites are turned into file with @samp{src/a} as the stem. When prerequisites are turned into file
@ -10276,7 +10328,7 @@ and concatenate the results.@*
@item $(call @var{var},@var{param},@dots{}) @item $(call @var{var},@var{param},@dots{})
Evaluate the variable @var{var} replacing any references to @code{$(1)}, Evaluate the variable @var{var} replacing any references to @code{$(1)},
@code{$(2)} with the first, second, etc. @var{param} values.@* @code{$(2)} with the first, second, etc.@: @var{param} values.@*
@xref{Call Function, ,The @code{call} Function}. @xref{Call Function, ,The @code{call} Function}.
@item $(eval @var{text}) @item $(eval @var{text})
@ -10376,7 +10428,7 @@ environment. @xref{Environment, ,Using Variable from the Environment}.
@item MAKESHELL @item MAKESHELL
On MS-DOS only, the name of the command interpreter that is to be used On MS-DOS only, the name of the command interpreter that is to be used
by @code{make}. This value takes precedence over the value of by @code{make}. This value takes precedence over the value of
@code{SHELL}. @xref{Execution, ,MAKESHELL variable}. @code{SHELL}. @xref{Execution, ,MAKESHELL variable}.
@item MAKE @item MAKE

4
job.c
View File

@ -2027,8 +2027,8 @@ exec_command (char **argv, char **envp)
break; break;
else else
fprintf(stderr, fprintf(stderr,
_("make reaped child pid %d, still waiting for pid %d\n"), _("make reaped child pid %ld, still waiting for pid %ld\n"),
hWaitPID, hPID); (DWORD)hWaitPID, (DWORD)hPID);
} }
/* return child's exit code as our exit code */ /* return child's exit code as our exit code */

4
main.c
View File

@ -668,7 +668,7 @@ handle_runtime_exceptions( struct _EXCEPTION_POINTERS *exinfo )
{ {
sprintf(errmsg, sprintf(errmsg,
_("%s: Interrupt/Exception caught (code = 0x%lx, addr = 0x%lx)\n"), _("%s: Interrupt/Exception caught (code = 0x%lx, addr = 0x%lx)\n"),
prg, exrec->ExceptionCode, exrec->ExceptionAddress); prg, exrec->ExceptionCode, (DWORD)exrec->ExceptionAddress);
fprintf(stderr, errmsg); fprintf(stderr, errmsg);
exit(255); exit(255);
} }
@ -676,7 +676,7 @@ handle_runtime_exceptions( struct _EXCEPTION_POINTERS *exinfo )
sprintf(errmsg, sprintf(errmsg,
_("\nUnhandled exception filter called from program %s\nExceptionCode = %lx\nExceptionFlags = %lx\nExceptionAddress = %lx\n"), _("\nUnhandled exception filter called from program %s\nExceptionCode = %lx\nExceptionFlags = %lx\nExceptionAddress = %lx\n"),
prg, exrec->ExceptionCode, exrec->ExceptionFlags, prg, exrec->ExceptionCode, exrec->ExceptionFlags,
exrec->ExceptionAddress); (DWORD)exrec->ExceptionAddress);
if (exrec->ExceptionCode == EXCEPTION_ACCESS_VIOLATION if (exrec->ExceptionCode == EXCEPTION_ACCESS_VIOLATION
&& exrec->NumberParameters >= 2) && exrec->NumberParameters >= 2)

11
make.1
View File

@ -319,6 +319,17 @@ except that the modification time is changed only in the imagination of
.TP 0.5i .TP 0.5i
.B \-\-warn\-undefined\-variables .B \-\-warn\-undefined\-variables
Warn when an undefined variable is referenced. Warn when an undefined variable is referenced.
.SH "EXIT STATUS"
GNU
.I make
exits with a status of zero if all makefiles were successfully parsed
and no targets that were built failed. A status of one will be returned
if the
.B \-q
flag was used and
.I make
determines that a target needs to be rebuilt. A status of two will be
returned if any errors were encountered.
.SH "SEE ALSO" .SH "SEE ALSO"
.I "The GNU Make Manual" .I "The GNU Make Manual"
.SH BUGS .SH BUGS

View File

@ -12,7 +12,7 @@ $! zinser@decus.de (preferred) or zinser@sysdev.deutsche-boerse.com
$ $
$! hb $! hb
$! But don't ask Martin Zinser about the lines, I added/changed. $! But don't ask Martin Zinser about the lines, I added/changed.
$! In case of an error do some cleanup $! In case of an error do some cleanup
$ on error then $ goto cleanup $ on error then $ goto cleanup
$! in case somebody set up her/his own symbol for cc $! in case somebody set up her/his own symbol for cc
$ set symbol/scope=(nolocal,noglobal) $ set symbol/scope=(nolocal,noglobal)
@ -33,7 +33,7 @@ $ then
$ if f$trnlnm("SYS").eqs."" then def/nolog sys sys$library: $ if f$trnlnm("SYS").eqs."" then def/nolog sys sys$library:
$ ccopt = "" $ ccopt = ""
$ else $ else
$ ccopt = "/decc/prefix=all" $ ccopt = "/decc/prefix=(all,except=(globfree,glob))"
$ if f$trnlnm("SYS").eqs."" $ if f$trnlnm("SYS").eqs.""
$ then $ then
$ if f$trnlnm("DECC$LIBRARY_INCLUDE").nes."" $ if f$trnlnm("DECC$LIBRARY_INCLUDE").nes.""
@ -68,7 +68,7 @@ $ gosub check_cc_qual
$ endif $ endif
$ filelist = "alloca ar arscan commands default dir expand file function " + - $ filelist = "alloca ar arscan commands default dir expand file function " + -
"hash implicit job main misc read remake remote-stub rule " + - "hash implicit job main misc read remake remote-stub rule " + -
"signame variable version vmsfunctions vmsify vpath " + - "signame variable version vmsfunctions vmsify vpath " + -
"[.glob]glob [.glob]fnmatch getopt1 getopt" "[.glob]glob [.glob]fnmatch getopt1 getopt"
$ copy config.h-vms config.h $ copy config.h-vms config.h
$ n=0 $ n=0
@ -101,12 +101,12 @@ $! Check if this is a define relating to the properties of the C/C++
$! compiler $! compiler
$! $!
$CHECK_CC_QUAL: $CHECK_CC_QUAL:
$ open/write tmpc 'tc $ open/write tmpc 'tc
$ ccqual = "/warn=(disable=questcompare)" $ ccqual = "/warn=(disable=questcompare)"
$ write tmpc "#include <stdio.h>" $ write tmpc "#include <stdio.h>"
$ write tmpc "unsigned int i = 1;" $ write tmpc "unsigned int i = 1;"
$ write tmpc "int main(){" $ write tmpc "int main(){"
$ write tmpc "if (i < 0){printf(""Mission impossible\n"");}}" $ write tmpc "if (i < 0){printf(""Mission impossible\n"");}}"
$ close tmpc $ close tmpc
$ gosub cc_qual_check $ gosub cc_qual_check
$ return $ return
@ -122,7 +122,7 @@ $ cc 'ccqual' 'tmpnam'
$ if $status then cc_qual = true $ if $status then cc_qual = true
$ set message/fac/ident/sever/text $ set message/fac/ident/sever/text
$ delete/nolog 'tmpnam'.*;* $ delete/nolog 'tmpnam'.*;*
$ if cc_qual then ccopt = ccopt + ccqual $ if cc_qual then ccopt = ccopt + ccqual
$ return $ return
$!------------------------------------------------------------------------------ $!------------------------------------------------------------------------------
$! $!
@ -131,8 +131,8 @@ $ ploc = f$locate("]",p1)
$ filnam = p1 $ filnam = p1
$ if ploc .lt. f$length(p1) then filnam=f$extract(ploc+1,100,p1) $ if ploc .lt. f$length(p1) then filnam=f$extract(ploc+1,100,p1)
$ write optf "''filnam'" $ write optf "''filnam'"
$ cc'ccopt'/include=([],[.glob]) - $ cc'ccopt'/include=([],[.glob]) -
/define=("allocated_variable_expand_for_file=alloc_var_expand_for_file","unlink=remove","HAVE_CONFIG_H","VMS") - /define=("allocated_variable_expand_for_file=alloc_var_expand_for_file","unlink=remove","HAVE_CONFIG_H","VMS") -
'p1' 'p1'
$ exit $ exit
$ endsubroutine : compileit $ endsubroutine : compileit

6
read.c
View File

@ -1177,10 +1177,12 @@ eval (struct ebuffer *ebuf, int set_default)
/* Put all the prerequisites here; they'll be parsed later. */ /* Put all the prerequisites here; they'll be parsed later. */
deps = (struct dep *) xmalloc (sizeof (struct dep)); deps = (struct dep *) xmalloc (sizeof (struct dep));
deps->next = 0; deps->next = 0;
deps->name = xstrdup (beg); deps->name = savestring (beg, end - beg + 1);
deps->file = 0;
deps->changed = 0;
deps->ignore_mtime = 0;
deps->staticpattern = 0; deps->staticpattern = 0;
deps->need_2nd_expansion = 0; deps->need_2nd_expansion = 0;
deps->file = 0;
} }
else else
deps = 0; deps = 0;

View File

@ -48,6 +48,68 @@ for this is to set this switch just prior to calling main: in an
initialization routine. This adds more complexity and more VMS specific initialization routine. This adds more complexity and more VMS specific
code. It is easier to tell the compiler NOT to map the routine names code. It is easier to tell the compiler NOT to map the routine names
with a simple change in makefile.vms. with a simple change in makefile.vms.
Some notes on case sensitive names in rules and on the disk. In the VMS
template for CONFIG.H case sensitive rules can be enabled with defining
WANT_CASE_SENSITIVE_TARGETS. For recent version of VMS there is a case
sensitive file system: ODS5. To make use of that, additionally un-defining
the HAVE_CASE_INSENSITIVE_FS is required. As these are C macros, different
versions of make need to be built to have any case sensitivity for VMS
working. Unfortunately, for ODS5 disks that's not all.
- Usually DCL upcases command line tokens (except strings) and usually the
file system is case blind (similar to how Windows systems work)
$ set proc/parse=extended/case=sensitive
preserves lower and UPPER on the command line and (for this process and all
sub-processes) enables case sensitivity in the file system
- Usually the CRTL tries to reverse what DCL did with command line tokens, it
lowercases all tokens (except strings)
$ define DECC$ARGV_PARSE_STYLE enable
passes (the now preserved) lower and UPPER from the command line to main()
- Usually the CRTL upcases the arguments to open() and friends
$ define DECC$EFS_CASE_PRESERVE enable
preserves the names as is.
It is important to know that not all VMS tools are ready for case sensitivity.
With this setup some tools may not work as expected. The setup should not
blindly be applied for all users in default login procedures.
Example? The poor coding gives a compiler message, showing that there are
different files:
$ dir
Directory ODS5DISK[HB]
A.c;1 B.c;1 c.c;1 X.c;1
x.c;1
Total of 5 files.
$ ods5make x.obj
cc /obj=x.obj x.c
foo(){lowercase_x();}
......^
%CC-I-IMPLICITFUNC, In this statement, the identifier "lowercase_x" is implicitly declared as a function.
at line number 1 in file ODS5DISK[HB]x.c;1
$ mc SYS$SYSDEVICE:[HARTMUT.MAKE_3_80P]ods5make X.obj
cc /obj=X.obj X.c
foo() {UPPERCASE_X();}
.......^
%CC-I-IMPLICITFUNC, In this statement, the identifier "UPPERCASE_X" is implicitly declared as a function.
at line number 1 in file ODS5DISK[HB]X.c;1
$ dir
Directory ODS5DISK[HB]
A.c;1 B.c;1 c.c;1 X.c;1
x.c;1 X.obj;1 x.obj;1
Total of 7 files.
$
This is the VMS port of GNU Make done by Hartmut.Becker@compaq.com. This is the VMS port of GNU Make done by Hartmut.Becker@compaq.com.

View File

@ -530,7 +530,10 @@ update_file_1 (struct file *file, unsigned int depth)
break; break;
if (!running) if (!running)
d->changed = file_mtime (d->file) != mtime; /* The prereq is considered changed if the timestamp has changed while
it was built, OR it doesn't exist. */
d->changed = ((file_mtime (d->file) != mtime)
|| (mtime == NONEXISTENT_MTIME));
lastd = d; lastd = d;
d = d->next; d = d->next;

View File

@ -1,3 +1,9 @@
2006-01-03 Paul D. Smith <psmith@gnu.org>
* scripts/variables/automatic: Add a test for bug #8154.
* README: Update to reflect the current state of the test suite.
2005-12-12 Paul D. Smith <psmith@gnu.org> 2005-12-12 Paul D. Smith <psmith@gnu.org>
* scripts/features/parallelism, scripts/functions/wildcard, * scripts/features/parallelism, scripts/functions/wildcard,

View File

@ -1,33 +1,30 @@
This is release 3.78 (September 6, 1999) of the GNU make test The test suite was originally written by Steve McGee and Chris Arthur.
suite. See the file NEWS for some of the changes since the last It is covered by the GNU General Public License (Version 2), described
release. in the file COPYING. It has been maintained as part of GNU make proper
since GNU make 3.78.
This release is made by psmith@gnu.org to correspond to GNU make 3.78. The test suite has a number of problems which should be addressed. One
It won't work correctly for versions before that. In addition to some VERY serious one is that there is no real documentation. You just have
infrastructure changes I've added a number of new tests. to see the existing tests. Use the newer tests: many of the tests
haven't been updated to use the latest/greatest test methods. See the
ChangeLog in the tests directory for pointers.
Rob Tulloh has contributed changes to get the suite running on NT. The second serious problem is that it's not parallelizable: it scribbles
all over its installation directory and so can only test one make at a
time. The third serious problem is that it's not relocatable: the only
way it works when you build out of the source tree is to create
symlinks, which doesn't work on every system and is bogus to boot. The
fourth serious problem is that it doesn't create its own sandbox when
running tests, so that if a test forgets to clean up after itself that
can impact future tests.
Eli Zaretskii and Esa A E Peuha <peuha@cc.helsinki.fi> have contributed The test suite requires Perl. These days, you should have at least Perl
changes to get the suite running on DJGPP/DOS. 5.004 (available from ftp.gnu.org, and portable to many machines). It
used to work with Perl 4.036 but official support for Perl 4.x was
abandoned a long time ago, due to lack of testbeds, as well as interest.
This package has a number of problems which preclude me from The test suite assumes that the first "diff" it finds on your PATH is
distributing it with make as a default "make check" test suite. The GNU diff, but that only matters if a test fails.
most serious of these is that it's not parallelizable: it scribbles all
over its installation directory and so can only test one make at a
time. I simply don't have time to do more with this than I am so far;
I'm very actively interested in finding someone willing to overhaul the
test suite infrastructure. If you're interested, contact me (see below)!
The test suite thus far has been written by Steve McGee, Chris Arthur,
and Paul D. Smith. It is covered by the GNU General Public License
(Version 2), described in the file COPYING.
The test suite requires Perl and is known to work with Perl 4.036 and
Perl 5.004 (available from ftp.gnu.org, and portable to many machines).
Earlier or later versions may work; I don't know. It assumes that the
first "diff" it finds is GNU diff, but that only matters if a test
fails.
To run the test suite on a UNIX system, use "perl ./run_make_tests" To run the test suite on a UNIX system, use "perl ./run_make_tests"
(or just "./run_make_tests" if you have a perl on your PATH). (or just "./run_make_tests" if you have a perl on your PATH).
@ -43,18 +40,14 @@ relative paths and when make is called something other than "make" (like
"gmake"). "gmake").
Tests cannot end with a "~" character, as the test suite will ignore any Tests cannot end with a "~" character, as the test suite will ignore any
that do (I was tired of having it run my Emacs backup files as test :) that do (I was tired of having it run my Emacs backup files as tests :))
If you want to run the tests in parallel, you should use the mkshadow
script included here to create temporary "copies" (via symbolic links)
of the test suite, one for each parallel job. This is a pain and one
day maybe the test suite will be rewritten so it's no longer
necessary--volunteers welcome!
Also, sometimes the tests may behave strangely on networked Also, sometimes the tests may behave strangely on networked
filesystems. You can use mkshadow to create a copy of the test suite in filesystems. You can use mkshadow to create a copy of the test suite in
/tmp or similar, and try again. If the error disappears, it's an issue /tmp or similar, and try again. If the error disappears, it's an issue
with your network or file server, not GNU make (I believe). with your network or file server, not GNU make (I believe). This
shouldn't happen very often anymore: I've done a lot of work on the
tests to reduce the impacts of this situation.
The options/dash-l test will not really test anything if the copy of The options/dash-l test will not really test anything if the copy of
make you are using can't obtain the system load. Some systems require make you are using can't obtain the system load. Some systems require
@ -73,7 +66,9 @@ There is a -help option which will give you more information about the
other possible options for the test suite. other possible options for the test suite.
Any complaints/suggestions/bugs/etc. for the test suite itself (as Any complaints/suggestions/bugs/etc. for the test suite itself (as
opposed to problems in make that the suite finds) should be sent to opposed to problems in make that the suite finds) should be handled the
psmith@gnu.org. Enjoy! same way as normal GNU make bugs/problems.
Paul D. Smith Paul D. Smith
Chris Arthur Chris Arthur

View File

@ -87,11 +87,22 @@ run_make_test('
mbr.b: mbr.src mbr.b: mbr.src
@echo $* @echo $*
mbr.src: ; @: mbr.src: ; @:',
'',
'mbr');
', # TEST #3 -- test for Savannah bug #8154
'', # Make sure that nonexistent prerequisites are listed in $?, since they are
'mbr # considered reasons for the target to be rebuilt.
'); #
touch('foo');
run_make_test('
foo: bar ; @echo "\$$? = $?"
bar: ;',
'',
'$? = bar');
unlink('foo');
1; 1;

View File

@ -90,7 +90,10 @@ readdir (DIR *dir)
dentry->d_namlen = dnam->nam$b_name + dnam->nam$b_type; dentry->d_namlen = dnam->nam$b_name + dnam->nam$b_type;
strncpy (dentry->d_name, dnam->nam$l_name, dentry->d_namlen); strncpy (dentry->d_name, dnam->nam$l_name, dentry->d_namlen);
dentry->d_name[dentry->d_namlen] = '\0'; dentry->d_name[dentry->d_namlen] = '\0';
#ifdef HAVE_CASE_INSENSITIVE_FS
uppercasify (dentry->d_name); uppercasify (dentry->d_name);
#endif
return (dentry); return (dentry);
} }

View File

@ -79,9 +79,11 @@ copyto (char **to, char **from, char upto, int as_dir)
} }
else else
{ {
#ifdef HAVE_CASE_INSENSITIVE_FS
if (isupper ((unsigned char)**from)) if (isupper ((unsigned char)**from))
**to = tolower ((unsigned char)**from); **to = tolower ((unsigned char)**from);
else else
#endif
**to = **from; **to = **from;
} }
(*to)++; (*to)++;