mirror of
https://github.com/mirror/make.git
synced 2025-03-29 13:31:09 +08:00
- Many fixup patches from Savannah.
- Fix the test suite on Solaris (from Boris) - Update the manual for .ONESHELL
This commit is contained in:
parent
df2fa7c5a5
commit
fba20a776d
33
ChangeLog
33
ChangeLog
@ -1,3 +1,36 @@
|
|||||||
|
2010-07-18 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* configure.in: Switch bsd_signal to AC_CHECK_DECLS() to make sure
|
||||||
|
we have a declaration. Fixes Savannah bug #25713 (maybe?)
|
||||||
|
* doc/make.texi (Complex Makefile): Cleanup variable assignments.
|
||||||
|
(One Shell): New subsection for the .ONESHELL special target.
|
||||||
|
|
||||||
|
Patches by Ozkan Sezer <sezeroz@gmail.com>:
|
||||||
|
|
||||||
|
* misc.c (strncasecmp): Local implementation for systems without.
|
||||||
|
* config.h.W32.template (HAVE_STRNICMP): Define on Windows.
|
||||||
|
* configure.in: Check for strncasecmp/strncmpi/strnicmp.
|
||||||
|
* job.c [WINDOWS32]: Don't define dup2 on Windows.
|
||||||
|
(pid2str): Use "%Id" even with MSVC
|
||||||
|
(exec_command): Cast to pid_t when calling pid2str().
|
||||||
|
* w32/subproc/sub_proc.c [WINDOWS32]: Include config.h first.
|
||||||
|
Use stddef.h on MSVC to get intptr_t.
|
||||||
|
* w32/subproc/misc.c [WINDOWS32]: Include config.h first.
|
||||||
|
* w32/compat/dirent.c [WINDOWS32]: Include config.h first.
|
||||||
|
(readdir): Cast -1 to correct type for d_ino.
|
||||||
|
* w32/pathstuff.c [WINDOWS32]: Ensure make.h is included first.
|
||||||
|
* make.h [WINDOWS32]: Don't prototype alloca() on Windows.
|
||||||
|
Add configuration for strncasecmp().
|
||||||
|
* main.c (ADD_SIG) [WINDOWS32]: Avoid warnings in MSVC.
|
||||||
|
* config.h.W32.template [WINDOWS32]: Don't warn on unsafe
|
||||||
|
functions or variables.
|
||||||
|
* NMakefile.template [WINDOWS32]: Remove /MACHINE:I386.
|
||||||
|
* main.c (clean_jobserver): Cast due to MSVC brokenness.
|
||||||
|
(decode_switches): Ditto.
|
||||||
|
* vpath.c (construct_vpath_list): Ditto.
|
||||||
|
* rule.c (freerule): Ditto.
|
||||||
|
* ar.c (ar_glob): Ditto.
|
||||||
|
|
||||||
2010-07-16 Boris Kolpackov <boris@codesynthesis.com>
|
2010-07-16 Boris Kolpackov <boris@codesynthesis.com>
|
||||||
|
|
||||||
* misc.c (concat): Fix buffer overrun.
|
* misc.c (concat): Fix buffer overrun.
|
||||||
|
12
NEWS
12
NEWS
@ -1,6 +1,6 @@
|
|||||||
GNU make NEWS -*-indented-text-*-
|
GNU make NEWS -*-indented-text-*-
|
||||||
History of user-visible changes.
|
History of user-visible changes.
|
||||||
25 Oct 2009
|
16 July 2010
|
||||||
|
|
||||||
See the end of this file for copyrights and conditions.
|
See the end of this file for copyrights and conditions.
|
||||||
|
|
||||||
@ -9,7 +9,7 @@ manual, which is contained in this distribution as the file doc/make.texi.
|
|||||||
See the README file and the GNU make manual for instructions for
|
See the README file and the GNU make manual for instructions for
|
||||||
reporting bugs.
|
reporting bugs.
|
||||||
|
|
||||||
Version 3.81.90
|
Version 3.81.91
|
||||||
|
|
||||||
* Compiling GNU make now requires a conforming ISO C 1989 compiler and
|
* Compiling GNU make now requires a conforming ISO C 1989 compiler and
|
||||||
standard runtime library.
|
standard runtime library.
|
||||||
@ -48,12 +48,12 @@ Version 3.81.90
|
|||||||
|
|
||||||
* WARNING: Backward-incompatibility!
|
* WARNING: Backward-incompatibility!
|
||||||
The library search behavior has changed to be compatible with the standard
|
The library search behavior has changed to be compatible with the standard
|
||||||
linker behavior. Prior to this version for prerequisites specified using
|
linker behavior. Prior to this version for prerequisites specified using the
|
||||||
the -lfoo syntax make fist searched for libfoo.so in the current directory,
|
-lfoo syntax make first searched for libfoo.so in the current directory,
|
||||||
vpath directories, and system directories. If that didn't yield a match,
|
vpath directories, and system directories. If that didn't yield a match,
|
||||||
make then searched for libfoo.a in these directories. Starting with this
|
make then searched for libfoo.a in these directories. Starting with this
|
||||||
version make searches first for libfoo.so and then for libfoo.a in each
|
version make searches first for libfoo.so and then for libfoo.a in each of
|
||||||
of these directories in order.
|
these directories in order.
|
||||||
|
|
||||||
* New command line option: --eval=STRING causes STRING to be evaluated as
|
* New command line option: --eval=STRING causes STRING to be evaluated as
|
||||||
makefile syntax (akin to using the $(eval ...) function). The evaluation is
|
makefile syntax (akin to using the $(eval ...) function). The evaluation is
|
||||||
|
@ -33,10 +33,9 @@ CFLAGS_debug = $(CFLAGS_any) /Od /D DEBUG /D _DEBUG /FR.\WinDebug/ /Fp.\WinDebug
|
|||||||
CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/
|
CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/
|
||||||
|
|
||||||
LDFLAGS_debug = w32\subproc\WinDebug\subproc.lib /NOLOGO /SUBSYSTEM:console\
|
LDFLAGS_debug = w32\subproc\WinDebug\subproc.lib /NOLOGO /SUBSYSTEM:console\
|
||||||
/INCREMENTAL:no /PDB:WinDebug/make.pdb /MACHINE:I386 \
|
/INCREMENTAL:no /PDB:WinDebug/make.pdb /OUT:WinDebug/make.exe /DEBUG
|
||||||
/OUT:WinDebug/make.exe /DEBUG
|
|
||||||
LDFLAGS_release = w32\subproc\WinRel\subproc.lib /NOLOGO /SUBSYSTEM:console\
|
LDFLAGS_release = w32\subproc\WinRel\subproc.lib /NOLOGO /SUBSYSTEM:console\
|
||||||
/INCREMENTAL:no /MACHINE:I386 /OUT:WinRel/make.exe
|
/INCREMENTAL:no /OUT:WinRel/make.exe
|
||||||
|
|
||||||
all: config.h subproc Release Debug
|
all: config.h subproc Release Debug
|
||||||
|
|
||||||
|
3
ar.c
3
ar.c
@ -273,7 +273,8 @@ ar_glob (const char *arname, const char *member_pattern, unsigned int size)
|
|||||||
names[i++] = n->name;
|
names[i++] = n->name;
|
||||||
|
|
||||||
/* Sort them alphabetically. */
|
/* Sort them alphabetically. */
|
||||||
qsort (names, i, sizeof (*names), alpha_compare);
|
/* MSVC erroneously warns without a cast here. */
|
||||||
|
qsort ((void *)names, i, sizeof (*names), alpha_compare);
|
||||||
|
|
||||||
/* Put them back into the chain in the sorted order. */
|
/* Put them back into the chain in the sorted order. */
|
||||||
i = 0;
|
i = 0;
|
||||||
|
@ -24,6 +24,8 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
# pragma warning(disable:4127) /* conditional expression is constant */
|
# pragma warning(disable:4127) /* conditional expression is constant */
|
||||||
# pragma warning(disable:4131) /* uses old-style declarator */
|
# pragma warning(disable:4131) /* uses old-style declarator */
|
||||||
# pragma warning(disable:4702) /* unreachable code */
|
# pragma warning(disable:4702) /* unreachable code */
|
||||||
|
# define _CRT_SECURE_NO_WARNINGS /* function or variable may be unsafe */
|
||||||
|
# define _CRT_NONSTDC_NO_WARNINGS /* functions w/o a leading underscore */
|
||||||
#endif
|
#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'. */
|
||||||
@ -227,10 +229,19 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
/* #undef HAVE_STRCASECMP */
|
/* #undef HAVE_STRCASECMP */
|
||||||
|
|
||||||
/* Define to 1 if you have the `strcmpi' function. */
|
/* Define to 1 if you have the `strcmpi' function. */
|
||||||
#define HAVE_STRCMPI 1
|
/* #undef HAVE_STRCMPI */
|
||||||
|
|
||||||
/* Define to 1 if you have the `stricmp' function. */
|
/* Define to 1 if you have the `stricmp' function. */
|
||||||
/* #undef HAVE_STRICMP */
|
#define HAVE_STRICMP 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strncasecmp' function. */
|
||||||
|
/* #undef HAVE_STRNCASECMP */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strncmpi' function. */
|
||||||
|
/* #undef HAVE_STRNCMPI */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strnicmp' function. */
|
||||||
|
#define HAVE_STRNICMP 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `strchr' function. */
|
/* Define to 1 if you have the `strchr' function. */
|
||||||
#define HAVE_STRCHR 1
|
#define HAVE_STRCHR 1
|
||||||
|
@ -148,17 +148,22 @@ if test "$ac_cv_func_gettimeofday" = yes; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CHECK_FUNCS( strdup strndup mkstemp mktemp fdopen fileno \
|
AC_CHECK_FUNCS( strdup strndup mkstemp mktemp fdopen fileno \
|
||||||
bsd_signal dup2 getcwd realpath sigsetmask sigaction \
|
dup2 getcwd realpath sigsetmask sigaction \
|
||||||
getgroups seteuid setegid setlinebuf setreuid setregid \
|
getgroups seteuid setegid setlinebuf setreuid setregid \
|
||||||
getrlimit setrlimit setvbuf pipe strerror strsignal \
|
getrlimit setrlimit setvbuf pipe strerror strsignal \
|
||||||
lstat readlink atexit)
|
lstat readlink atexit)
|
||||||
|
|
||||||
|
# We need to check declarations, not just existence, because on Tru64 this
|
||||||
|
# function is not declared without special flags, which themselves cause
|
||||||
|
# other problems. We'll just use our own.
|
||||||
|
AC_CHECK_DECLS([bsd_signal], [], [], [[#include <signal.h>]])
|
||||||
|
|
||||||
AC_FUNC_SETVBUF_REVERSED
|
AC_FUNC_SETVBUF_REVERSED
|
||||||
|
|
||||||
# Rumor has it that strcasecmp lives in -lresolv on some odd systems.
|
# Rumor has it that strcasecmp lives in -lresolv on some odd systems.
|
||||||
# It doesn't hurt much to use our own if we can't find it so I don't
|
# It doesn't hurt much to use our own if we can't find it so I don't
|
||||||
# make the effort here.
|
# make the effort here.
|
||||||
AC_CHECK_FUNCS(strcasecmp strcmpi stricmp)
|
AC_CHECK_FUNCS(strcasecmp strncasecmp strcmpi strncmpi stricmp strnicmp)
|
||||||
|
|
||||||
# strcoll() is used by the GNU glob library
|
# strcoll() is used by the GNU glob library
|
||||||
AC_FUNC_STRCOLL
|
AC_FUNC_STRCOLL
|
||||||
|
203
doc/make.texi
203
doc/make.texi
@ -3,7 +3,7 @@
|
|||||||
@setfilename make.info
|
@setfilename make.info
|
||||||
|
|
||||||
@include version.texi
|
@include version.texi
|
||||||
@set EDITION 0.70
|
@set EDITION 0.71
|
||||||
@set RCSID $Id$
|
@set RCSID $Id$
|
||||||
|
|
||||||
@settitle GNU @code{make}
|
@settitle GNU @code{make}
|
||||||
@ -25,9 +25,9 @@ and issues the commands to recompile them.
|
|||||||
This is Edition @value{EDITION}, last updated @value{UPDATED},
|
This is Edition @value{EDITION}, last updated @value{UPDATED},
|
||||||
of @cite{The GNU Make Manual}, for GNU @code{make} version @value{VERSION}.
|
of @cite{The GNU Make Manual}, for GNU @code{make} version @value{VERSION}.
|
||||||
|
|
||||||
Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
|
Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
|
||||||
1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||||
Free Software Foundation, Inc.
|
2008, 2009, 2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
@quotation
|
@quotation
|
||||||
Permission is granted to copy, distribute and/or modify this document
|
Permission is granted to copy, distribute and/or modify this document
|
||||||
@ -524,13 +524,13 @@ A @dfn{prerequisite} is a file that is used as input to create the
|
|||||||
target. A target often depends on several files.
|
target. A target often depends on several files.
|
||||||
|
|
||||||
@cindex tabs in rules
|
@cindex tabs in rules
|
||||||
A @dfn{recipe} is an action that @code{make} carries out.
|
A @dfn{recipe} is an action that @code{make} carries out. A recipe
|
||||||
A recipe may have more than one command, each on its own line.
|
may have more than one command, either on the same line or each on its
|
||||||
@strong{Please note:} you need to put a tab character at the beginning of
|
own line. @strong{Please note:} you need to put a tab character at
|
||||||
every command line! This is an obscurity that catches the unwary. If
|
the beginning of every recipe line! This is an obscurity that catches
|
||||||
you prefer to prefix your recipes with a character other than tab,
|
the unwary. If you prefer to prefix your recipes with a character
|
||||||
you can set the @code{.CMDPREFIX} variable to an alternate character
|
other than tab, you can set the @code{.RECIPEPREFIX} variable to an
|
||||||
(@pxref{Special Variables}).
|
alternate character (@pxref{Special Variables}).
|
||||||
|
|
||||||
Usually a recipe is in a rule with prerequisites and serves to create a
|
Usually a recipe is in a rule with prerequisites and serves to create a
|
||||||
target file if any of the prerequisites change. However, the rule that
|
target file if any of the prerequisites change. However, the rule that
|
||||||
@ -629,13 +629,13 @@ on the header file @file{defs.h}.
|
|||||||
A recipe may follow each line that contains a target and
|
A recipe may follow each line that contains a target and
|
||||||
prerequisites. These recipes say how to update the target file. A
|
prerequisites. These recipes say how to update the target file. A
|
||||||
tab character (or whatever character is specified by the
|
tab character (or whatever character is specified by the
|
||||||
@code{.CMDPREFIX} variable; @pxref{Special Variables}) must come at
|
@code{.RECIPEPREFIX} variable; @pxref{Special Variables}) must come at
|
||||||
the beginning of every line in the recipe to distinguish recipes from
|
the beginning of every line in the recipe to distinguish recipes from
|
||||||
other lines in the makefile. (Bear in mind that @code{make} does not
|
other lines in the makefile. (Bear in mind that @code{make} does not
|
||||||
know anything about how the recipes work. It is up to you to supply
|
know anything about how the recipes work. It is up to you to supply
|
||||||
recipes that will update the target file properly. All @code{make}
|
recipes that will update the target file properly. All @code{make}
|
||||||
does is execute the commands in the recipe you have specified when the
|
does is execute the recipe you have specified when the target file
|
||||||
target file needs to be updated.)@refill
|
needs to be updated.)@refill
|
||||||
@cindex recipe
|
@cindex recipe
|
||||||
|
|
||||||
The target @samp{clean} is not a file, but merely the name of an
|
The target @samp{clean} is not a file, but merely the name of an
|
||||||
@ -1097,7 +1097,7 @@ include @var{filenames}@dots{}
|
|||||||
|
|
||||||
Extra spaces are allowed and ignored at the beginning of the line, but
|
Extra spaces are allowed and ignored at the beginning of the line, but
|
||||||
the first character must not be a tab (or the value of
|
the first character must not be a tab (or the value of
|
||||||
@code{.CMDPREFIX})---if the line begins with a tab, it will be
|
@code{.RECIPEPREFIX})---if the line begins with a tab, it will be
|
||||||
considered a recipe line. Whitespace is required between
|
considered a recipe line. Whitespace is required between
|
||||||
@code{include} and the file names, and between file names; extra
|
@code{include} and the file names, and between file names; extra
|
||||||
whitespace is ignored there and at the end of the directive. A
|
whitespace is ignored there and at the end of the directive. A
|
||||||
@ -1768,7 +1768,7 @@ target per rule, but occasionally there is a reason to have more
|
|||||||
@cindex recipes
|
@cindex recipes
|
||||||
@cindex tab character (in commands)
|
@cindex tab character (in commands)
|
||||||
The @var{recipe} lines start with a tab character (or the first
|
The @var{recipe} lines start with a tab character (or the first
|
||||||
character in the value of the @code{.CMDPREFIX} variable;
|
character in the value of the @code{.RECIPEPREFIX} variable;
|
||||||
@pxref{Special Variables}). The first recipe line may appear on the line
|
@pxref{Special Variables}). The first recipe line may appear on the line
|
||||||
after the prerequisites, with a tab character, or may appear on the
|
after the prerequisites, with a tab character, or may appear on the
|
||||||
same line, with a semicolon. Either way, the effect is the same.
|
same line, with a semicolon. Either way, the effect is the same.
|
||||||
@ -1822,12 +1822,12 @@ extra features (@pxref{Recipes, ,Writing Recipes in Rules}).
|
|||||||
There are actually two different types of prerequisites understood by
|
There are actually two different types of prerequisites understood by
|
||||||
GNU @code{make}: normal prerequisites such as described in the
|
GNU @code{make}: normal prerequisites such as described in the
|
||||||
previous section, and @dfn{order-only} prerequisites. A normal
|
previous section, and @dfn{order-only} prerequisites. A normal
|
||||||
prerequisite makes two statements: first, it imposes an order of
|
prerequisite makes two statements: first, it imposes an order in which
|
||||||
execution of recipes: any recipes necessary to build any of a
|
recipes will be invoked: the recipes for all prerequisites of a target
|
||||||
target's prerequisites will be fully executed before any recipe
|
will be completed before the recipe for the target is run. Second, it
|
||||||
necessary to build the target. Second, it imposes a dependency
|
imposes a dependency relationship: if any prerequisite is newer than
|
||||||
relationship: if any prerequisite is newer than the target, then the
|
the target, then the target is considered out-of-date and must be
|
||||||
target is considered out-of-date and must be rebuilt.
|
rebuilt.
|
||||||
|
|
||||||
Normally, this is exactly what you want: if a target's prerequisite is
|
Normally, this is exactly what you want: if a target's prerequisite is
|
||||||
updated, then the target should also be updated.
|
updated, then the target should also be updated.
|
||||||
@ -2874,6 +2874,15 @@ given. Any recursively invoked @code{make} command will still run
|
|||||||
recipes in parallel (unless its makefile also contains this target).
|
recipes in parallel (unless its makefile also contains this target).
|
||||||
Any prerequisites on this target are ignored.
|
Any prerequisites on this target are ignored.
|
||||||
|
|
||||||
|
@findex .ONESHELL
|
||||||
|
@item .ONESHELL
|
||||||
|
@cindex recipe execution, single invocation
|
||||||
|
|
||||||
|
If @code{.ONESHELL} is mentioned as a target, then when a target is
|
||||||
|
built all lines of the recipe will be given to a single invocation of
|
||||||
|
the shell rather than each line being invoked separately
|
||||||
|
(@pxref{Execution, ,Recipe Execution}).
|
||||||
|
|
||||||
@findex .POSIX
|
@findex .POSIX
|
||||||
@item .POSIX
|
@item .POSIX
|
||||||
@cindex POSIX-conforming mode, setting
|
@cindex POSIX-conforming mode, setting
|
||||||
@ -3387,7 +3396,7 @@ brought up to date.
|
|||||||
|
|
||||||
Users use many different shell programs, but recipes in makefiles are
|
Users use many different shell programs, but recipes in makefiles are
|
||||||
always interpreted by @file{/bin/sh} unless the makefile specifies
|
always interpreted by @file{/bin/sh} unless the makefile specifies
|
||||||
otherwise. @xref{Execution, ,Command Execution}.
|
otherwise. @xref{Execution, ,Recipe Execution}.
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
* Recipe Syntax:: Recipe syntax features and pitfalls.
|
* Recipe Syntax:: Recipe syntax features and pitfalls.
|
||||||
@ -3415,7 +3424,7 @@ syntax: it performs only a very few specific translations on the
|
|||||||
content of the recipe before handing it to the shell.
|
content of the recipe before handing it to the shell.
|
||||||
|
|
||||||
Each line in the recipe must start with a tab (or the first character
|
Each line in the recipe must start with a tab (or the first character
|
||||||
in the value of the @code{.CMDPREFIX} variable; @pxref{Special
|
in the value of the @code{.RECIPEPREFIX} variable; @pxref{Special
|
||||||
Variables}), except that the first recipe line may be attached to the
|
Variables}), except that the first recipe line may be attached to the
|
||||||
target-and-prerequisites line with a semicolon in between. @emph{Any}
|
target-and-prerequisites line with a semicolon in between. @emph{Any}
|
||||||
line in the makefile that begins with a tab and appears in a ``rule
|
line in the makefile that begins with a tab and appears in a ``rule
|
||||||
@ -3690,9 +3699,10 @@ started with @samp{@@}. A rule in the makefile for the special target
|
|||||||
@vindex @code{SHELL} @r{(recipe execution)}
|
@vindex @code{SHELL} @r{(recipe execution)}
|
||||||
|
|
||||||
When it is time to execute recipes to update a target, they are
|
When it is time to execute recipes to update a target, they are
|
||||||
executed by invoking a new subshell for each line of the recipe. (In
|
executed by invoking a new subshell for each line of the recipe,
|
||||||
practice, @code{make} may take shortcuts that do not affect the
|
unless the @code{.ONESHELL} special target is in effect
|
||||||
results.)
|
(@pxref{One Shell, ,Using One Shell}) (In practice, @code{make} may
|
||||||
|
take shortcuts that do not affect the results.)
|
||||||
|
|
||||||
@cindex @code{cd} (shell command)
|
@cindex @code{cd} (shell command)
|
||||||
@cindex shell variables, setting in recipes
|
@cindex shell variables, setting in recipes
|
||||||
@ -3720,11 +3730,113 @@ problems (in this case it would certainly cause @file{../foo} to be
|
|||||||
truncated, at least).
|
truncated, at least).
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
|
* One Shell:: One shell for all lines in a recipe
|
||||||
* Choosing the Shell:: How @code{make} chooses the shell used
|
* Choosing the Shell:: How @code{make} chooses the shell used
|
||||||
to run recipes.
|
to run recipes.
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
@node Choosing the Shell, , Execution, Execution
|
@node One Shell, Choosing the Shell, Execution, Execution
|
||||||
|
@subsection Using One Shell
|
||||||
|
@cindex recipe lines, single shell
|
||||||
|
@cindex @code{.ONESHELL}, use of
|
||||||
|
@findex .ONESHELL
|
||||||
|
|
||||||
|
Sometimes you would prefer that all the lines in the recipe be passed
|
||||||
|
to a single invocation of the shell. There are generally two
|
||||||
|
situations where this is useful: first, it can improve performance in
|
||||||
|
makefiles where recipes consist of many command lines, by avoiding
|
||||||
|
extra processes. Second, you might want newlines to be included in
|
||||||
|
your recipe command (for example perhaps you are using a very
|
||||||
|
different interpreter as your @code{SHELL}). If the @code{.ONESHELL}
|
||||||
|
special target appears anywhere in the makefile then @emph{all}
|
||||||
|
recipe lines for each target will be provided to a single invocation
|
||||||
|
of the shell. Newlines between recipe lines will be preserved. For
|
||||||
|
example:
|
||||||
|
|
||||||
|
@example
|
||||||
|
.ONESHELL:
|
||||||
|
foo : bar/lose
|
||||||
|
cd $(@@D)
|
||||||
|
gobble $(@@F) > ../$@@
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@noindent
|
||||||
|
would now work as expected even though the commands are on different
|
||||||
|
recipe lines.
|
||||||
|
|
||||||
|
If @code{.ONESHELL} is provided, then only the first line of the
|
||||||
|
recipe will be checked for the special prefix characters (@samp{@@},
|
||||||
|
@samp{-}, and @samp{+}). Subsequent lines will include the special
|
||||||
|
characters in the recipe line when the @code{SHELL} is invoked. If
|
||||||
|
you want your recipe to start with one of these special characters
|
||||||
|
you'll need to arrange for them to not be the first characters on the
|
||||||
|
first line, perhaps by adding a comment or similar. For example, this
|
||||||
|
would be a syntax error in Perl because the first @samp{@@} is removed
|
||||||
|
by make:
|
||||||
|
|
||||||
|
@example
|
||||||
|
.ONESHELL:
|
||||||
|
SHELL = /usr/bin/perl
|
||||||
|
.SHELLFLAGS = -e
|
||||||
|
show :
|
||||||
|
@@f = qw(a b c);
|
||||||
|
print "@@f\n";
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@noindent
|
||||||
|
However, either of these alternatives would work properly:
|
||||||
|
|
||||||
|
@example
|
||||||
|
.ONESHELL:
|
||||||
|
SHELL = /usr/bin/perl
|
||||||
|
.SHELLFLAGS = -e
|
||||||
|
show :
|
||||||
|
# Make sure "@@" is not the first character on the first line
|
||||||
|
@@f = qw(a b c);
|
||||||
|
print "@@f\n";
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@noindent
|
||||||
|
or
|
||||||
|
|
||||||
|
@example
|
||||||
|
.ONESHELL:
|
||||||
|
SHELL = /usr/bin/perl
|
||||||
|
.SHELLFLAGS = -e
|
||||||
|
show :
|
||||||
|
my @@f = qw(a b c);
|
||||||
|
print "@@f\n";
|
||||||
|
@end example
|
||||||
|
|
||||||
|
As a special feature, if @code{SHELL} is determined to be a
|
||||||
|
POSIX-style shell, the special prefix characters in ``internal''
|
||||||
|
recipe lines will @emph{removed} before the recipe is processed. This
|
||||||
|
feature is intended to allow existing makefiles to add the
|
||||||
|
@code{.ONESHELL} special target and still run properly without
|
||||||
|
extensive modifications. Since the special prefix characters are not
|
||||||
|
legal at the beginning of a line in a POSIX shell script this is not a
|
||||||
|
loss in functionality. For example, this works as expected:
|
||||||
|
|
||||||
|
@example
|
||||||
|
.ONESHELL:
|
||||||
|
foo : bar/lose
|
||||||
|
@@cd $(@@D)
|
||||||
|
@@gobble $(@@F) > ../$@@
|
||||||
|
@end example
|
||||||
|
|
||||||
|
Even with this special feature, however, makefiles with
|
||||||
|
@code{.ONESHELL} will behave differently in ways that could be
|
||||||
|
noticeable. For example, normally if any line in the recipe fails,
|
||||||
|
that causes the rule to fail and no more recipe lines are processed.
|
||||||
|
Under @code{.ONESHELL} a failure of any but the final recipe line will
|
||||||
|
not be noticed by @code{make}. You can modify @code{.SHELLFLAGS} to
|
||||||
|
add the @code{-e} option to the shell which will cause any failure
|
||||||
|
anywhere in the command line to cause the shell to fail, but this
|
||||||
|
could itself cause your recipe to behave differently. Ultimately you
|
||||||
|
may need to harden your recipe lines to allow them to work with
|
||||||
|
@code{.ONESHELL}.
|
||||||
|
|
||||||
|
@node Choosing the Shell, , One Shell, Execution
|
||||||
@subsection Choosing the Shell
|
@subsection Choosing the Shell
|
||||||
@cindex shell, choosing the
|
@cindex shell, choosing the
|
||||||
@cindex @code{SHELL}, value of
|
@cindex @code{SHELL}, value of
|
||||||
@ -3828,6 +3940,9 @@ contains @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}.
|
||||||
|
|
||||||
|
@vindex SHELL
|
||||||
|
@vindex .SHELLFLAGS
|
||||||
|
|
||||||
@node Parallel, Errors, Execution, Recipes
|
@node Parallel, Errors, Execution, Recipes
|
||||||
@section Parallel Execution
|
@section Parallel Execution
|
||||||
@cindex recipes, execution in parallel
|
@cindex recipes, execution in parallel
|
||||||
@ -5964,8 +6079,8 @@ will contain the number of times this instance has restarted. Note
|
|||||||
this is not the same as recursion (counted by the @code{MAKELEVEL}
|
this is not the same as recursion (counted by the @code{MAKELEVEL}
|
||||||
variable). You should not set, modify, or export this variable.
|
variable). You should not set, modify, or export this variable.
|
||||||
|
|
||||||
@vindex .CMDPREFIX @r{(change the recipe prefix character)}
|
@vindex .RECIPEPREFIX @r{(change the recipe prefix character)}
|
||||||
@item .CMDPREFIX
|
@item .RECIPEPREFIX
|
||||||
The first character of the value of this variable is used as the
|
The first character of the value of this variable is used as the
|
||||||
character make assumes is introducing a recipe line. If the variable
|
character make assumes is introducing a recipe line. If the variable
|
||||||
is empty (as it is by default) that character is the standard tab
|
is empty (as it is by default) that character is the standard tab
|
||||||
@ -5973,13 +6088,13 @@ character. For example, this is a valid makefile:
|
|||||||
|
|
||||||
@example
|
@example
|
||||||
@group
|
@group
|
||||||
.CMDPREFIX = >
|
.RECIPEPREFIX = >
|
||||||
all:
|
all:
|
||||||
> @@echo Hello, world
|
> @@echo Hello, world
|
||||||
@end group
|
@end group
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
The value of @code{.CMDPREFIX} can be changed multiple times; once set
|
The value of @code{.RECIPEPREFIX} can be changed multiple times; once set
|
||||||
it stays in effect for all rules parsed until it is modified.
|
it stays in effect for all rules parsed until it is modified.
|
||||||
|
|
||||||
@vindex .VARIABLES @r{(list of variables)}
|
@vindex .VARIABLES @r{(list of variables)}
|
||||||
@ -10941,7 +11056,7 @@ editors) have attempted to indent your recipe lines with spaces
|
|||||||
instead of a tab character. In this case, @code{make} will use the
|
instead of a tab character. In this case, @code{make} will use the
|
||||||
second form of the error above. Remember that every line in the
|
second form of the error above. Remember that every line in the
|
||||||
recipe must begin with a tab character (unless you set
|
recipe must begin with a tab character (unless you set
|
||||||
@code{.CMDPREFIX}; @pxref{Special Variables}). Eight spaces do not
|
@code{.RECIPEPREFIX}; @pxref{Special Variables}). Eight spaces do not
|
||||||
count. @xref{Rule Syntax}.
|
count. @xref{Rule Syntax}.
|
||||||
|
|
||||||
@item recipe commences before first target. Stop.
|
@item recipe commences before first target. Stop.
|
||||||
@ -11201,18 +11316,16 @@ infodir = $(prefix)/info
|
|||||||
|
|
||||||
#### End of system configuration section. ####
|
#### End of system configuration section. ####
|
||||||
|
|
||||||
SRC1 = tar.c create.c extract.c buffer.c \
|
@group
|
||||||
getoldopt.c update.c gnu.c mangle.c
|
SRCS_C = tar.c create.c extract.c buffer.c \
|
||||||
SRC2 = version.c list.c names.c diffarch.c \
|
getoldopt.c update.c gnu.c mangle.c \
|
||||||
port.c wildmat.c getopt.c
|
version.c list.c names.c diffarch.c \
|
||||||
SRC3 = getopt1.c regex.c getdate.y
|
port.c wildmat.c getopt.c getopt1.c \
|
||||||
SRCS = $(SRC1) $(SRC2) $(SRC3)
|
regex.c
|
||||||
OBJ1 = tar.o create.o extract.o buffer.o \
|
SRCS_Y = getdate.y
|
||||||
getoldopt.o update.o gnu.o mangle.o
|
SRCS = $(SRCS_C) $(SRCS_Y)
|
||||||
OBJ2 = version.o list.o names.o diffarch.o \
|
OBJS = $(SRCS_C:.c=.o) $(SRCS_Y:.y=.o) $(RTAPELIB)
|
||||||
port.o wildmat.o getopt.o
|
@end group
|
||||||
OBJ3 = getopt1.o regex.o getdate.o $(RTAPELIB)
|
|
||||||
OBJS = $(OBJ1) $(OBJ2) $(OBJ3)
|
|
||||||
@group
|
@group
|
||||||
AUX = README COPYING ChangeLog Makefile.in \
|
AUX = README COPYING ChangeLog Makefile.in \
|
||||||
makefile.pc configure configure.in \
|
makefile.pc configure configure.in \
|
||||||
|
10
job.c
10
job.c
@ -174,11 +174,9 @@ int wait ();
|
|||||||
|
|
||||||
#endif /* Don't have `union wait'. */
|
#endif /* Don't have `union wait'. */
|
||||||
|
|
||||||
#ifndef HAVE_UNISTD_H
|
#if !defined(HAVE_UNISTD_H) && !defined(WINDOWS32)
|
||||||
int dup2 ();
|
int dup2 ();
|
||||||
#if !(defined(_MSC_VER) && defined(_WIN64))
|
|
||||||
int execve ();
|
int execve ();
|
||||||
#endif
|
|
||||||
void _exit ();
|
void _exit ();
|
||||||
# ifndef VMS
|
# ifndef VMS
|
||||||
int geteuid ();
|
int geteuid ();
|
||||||
@ -194,7 +192,7 @@ static const char *
|
|||||||
pid2str (pid_t pid)
|
pid2str (pid_t pid)
|
||||||
{
|
{
|
||||||
static char pidstring[100];
|
static char pidstring[100];
|
||||||
#if defined(WINDOWS32) && __GNUC__ > 3
|
#ifdef WINDOWS32
|
||||||
sprintf (pidstring, "%Id", pid);
|
sprintf (pidstring, "%Id", pid);
|
||||||
#else
|
#else
|
||||||
sprintf (pidstring, "%lu", (unsigned long) pid);
|
sprintf (pidstring, "%lu", (unsigned long) pid);
|
||||||
@ -2121,11 +2119,11 @@ exec_command (char **argv, char **envp)
|
|||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *pidstr = xstrdup (pid2str ((DWORD_PTR)hWaitPID));
|
char *pidstr = xstrdup (pid2str ((pid_t)hWaitPID));
|
||||||
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
_("make reaped child pid %s, still waiting for pid %s\n"),
|
_("make reaped child pid %s, still waiting for pid %s\n"),
|
||||||
pidstr, pid2str ((DWORD_PTR)hPID));
|
pidstr, pid2str ((pid_t)hPID));
|
||||||
free (pidstr);
|
free (pidstr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
12
main.c
12
main.c
@ -523,7 +523,7 @@ int fatal_signal_mask;
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined HAVE_BSD_SIGNAL && !defined bsd_signal
|
#if !HAVE_DECL_BSD_SIGNAL && !defined bsd_signal
|
||||||
# if !defined HAVE_SIGACTION
|
# if !defined HAVE_SIGACTION
|
||||||
# define bsd_signal signal
|
# define bsd_signal signal
|
||||||
# else
|
# else
|
||||||
@ -986,7 +986,7 @@ main (int argc, char **argv, char **envp)
|
|||||||
fatal_signal_mask = 0;
|
fatal_signal_mask = 0;
|
||||||
#define ADD_SIG(sig) fatal_signal_mask |= sigmask (sig)
|
#define ADD_SIG(sig) fatal_signal_mask |= sigmask (sig)
|
||||||
#else
|
#else
|
||||||
#define ADD_SIG(sig)
|
#define ADD_SIG(sig) (void)sig /* Needed to avoid warnings in MSVC. */
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2577,7 +2577,8 @@ decode_switches (int argc, char **argv, int env)
|
|||||||
else if (sl->idx == sl->max - 1)
|
else if (sl->idx == sl->max - 1)
|
||||||
{
|
{
|
||||||
sl->max += 5;
|
sl->max += 5;
|
||||||
sl->list = xrealloc (sl->list,
|
/* MSVC erroneously warns without a cast here. */
|
||||||
|
sl->list = xrealloc ((void *)sl->list,
|
||||||
sl->max * sizeof (char *));
|
sl->max * sizeof (char *));
|
||||||
}
|
}
|
||||||
if (cs->type == filename)
|
if (cs->type == filename)
|
||||||
@ -3060,7 +3061,7 @@ print_version (void)
|
|||||||
year, and none of the rest of it should be translated (including the
|
year, and none of the rest of it should be translated (including the
|
||||||
word "Copyright", so it hardly seems worth it. */
|
word "Copyright", so it hardly seems worth it. */
|
||||||
|
|
||||||
printf ("%sCopyright (C) 2009 Free Software Foundation, Inc.\n", precede);
|
printf ("%sCopyright (C) 2010 Free Software Foundation, Inc.\n", precede);
|
||||||
|
|
||||||
printf (_("%sLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\
|
printf (_("%sLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\
|
||||||
%sThis is free software: you are free to change and redistribute it.\n\
|
%sThis is free software: you are free to change and redistribute it.\n\
|
||||||
@ -3149,7 +3150,8 @@ clean_jobserver (int status)
|
|||||||
job_slots = default_job_slots;
|
job_slots = default_job_slots;
|
||||||
if (jobserver_fds)
|
if (jobserver_fds)
|
||||||
{
|
{
|
||||||
free (jobserver_fds->list);
|
/* MSVC erroneously warns without a cast here. */
|
||||||
|
free ((void *)jobserver_fds->list);
|
||||||
free (jobserver_fds);
|
free (jobserver_fds);
|
||||||
jobserver_fds = 0;
|
jobserver_fds = 0;
|
||||||
}
|
}
|
||||||
|
15
make.h
15
make.h
@ -35,7 +35,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
# ifdef _AIX
|
# ifdef _AIX
|
||||||
#pragma alloca
|
#pragma alloca
|
||||||
# else
|
# else
|
||||||
# ifndef __GNUC__
|
# if !defined(__GNUC__) && !defined(WINDOWS32)
|
||||||
# ifndef alloca /* predefined by HP cc +Olibcalls */
|
# ifndef alloca /* predefined by HP cc +Olibcalls */
|
||||||
char *alloca ();
|
char *alloca ();
|
||||||
# endif
|
# endif
|
||||||
@ -487,7 +487,18 @@ char *getwd ();
|
|||||||
# define strcasecmp strcmpi
|
# define strcasecmp strcmpi
|
||||||
# else
|
# else
|
||||||
/* Create our own, in misc.c */
|
/* Create our own, in misc.c */
|
||||||
int strcasecmp (const char *s1, const char *s2);
|
int strcasecmp (const char *s1, const char *s2, int n);
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !HAVE_STRNCASECMP
|
||||||
|
# if HAVE_STRNICMP
|
||||||
|
# define strncasecmp strnicmp
|
||||||
|
# elif HAVE_STRNCMPI
|
||||||
|
# define strncasecmp strncmpi
|
||||||
|
# else
|
||||||
|
/* Create our own, in misc.c */
|
||||||
|
int strncasecmp (const char *s1, const char *s2);
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
28
misc.c
28
misc.c
@ -614,6 +614,34 @@ strcasecmp (const char *s1, const char *s2)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !HAVE_STRNCASECMP && !HAVE_STRNICMP && !HAVE_STRNCMPI
|
||||||
|
|
||||||
|
/* If we don't have strncasecmp() (from POSIX), or anything that can
|
||||||
|
substitute for it, define our own version. */
|
||||||
|
|
||||||
|
int
|
||||||
|
strncasecmp (const char *s1, const char *s2, int n)
|
||||||
|
{
|
||||||
|
while (n-- > 0)
|
||||||
|
{
|
||||||
|
int c1 = (int) *(s1++);
|
||||||
|
int c2 = (int) *(s2++);
|
||||||
|
|
||||||
|
if (isalpha (c1))
|
||||||
|
c1 = tolower (c1);
|
||||||
|
if (isalpha (c2))
|
||||||
|
c2 = tolower (c2);
|
||||||
|
|
||||||
|
if (c1 != '\0' && c1 == c2)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
return (c1 - c2);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef GETLOADAVG_PRIVILEGED
|
#ifdef GETLOADAVG_PRIVILEGED
|
||||||
|
|
||||||
|
5
rule.c
5
rule.c
@ -404,8 +404,9 @@ freerule (struct rule *rule, struct rule *lastrule)
|
|||||||
|
|
||||||
free_dep_chain (rule->deps);
|
free_dep_chain (rule->deps);
|
||||||
|
|
||||||
free (rule->targets);
|
/* MSVC erroneously warns without a cast here. */
|
||||||
free (rule->suffixes);
|
free ((void *)rule->targets);
|
||||||
|
free ((void *)rule->suffixes);
|
||||||
free (rule->lens);
|
free (rule->lens);
|
||||||
|
|
||||||
/* We can't free the storage for the commands because there
|
/* We can't free the storage for the commands because there
|
||||||
|
@ -62,8 +62,7 @@ all:
|
|||||||
> @$$a=5
|
> @$$a=5
|
||||||
> +7;
|
> +7;
|
||||||
> @y=qw(a b c);
|
> @y=qw(a b c);
|
||||||
>print "a = $$a, \
|
>print "a = $$a, y = (@y)\n";
|
||||||
y = (@y)\n";
|
|
||||||
!,
|
!,
|
||||||
'', "a = 12, y = (a b c)\n");
|
'', "a = 12, y = (a b c)\n");
|
||||||
|
|
||||||
|
@ -6,10 +6,12 @@ $details = "";
|
|||||||
|
|
||||||
|
|
||||||
# Ensure turning on .POSIX enables the -e flag for the shell
|
# Ensure turning on .POSIX enables the -e flag for the shell
|
||||||
|
# We can't just use "false" because on different systems it provides a
|
||||||
|
# different exit code.
|
||||||
|
|
||||||
run_make_test(q!
|
run_make_test(q!
|
||||||
.POSIX:
|
.POSIX:
|
||||||
all: ; @false; true
|
all: ; @r() { return 1; }; r; true
|
||||||
!,
|
!,
|
||||||
'', "#MAKE#: *** [all] Error 1\n", 512);
|
'', "#MAKE#: *** [all] Error 1\n", 512);
|
||||||
|
|
||||||
@ -18,9 +20,9 @@ all: ; @false; true
|
|||||||
run_make_test(q!
|
run_make_test(q!
|
||||||
.SHELLFLAGS = -xc
|
.SHELLFLAGS = -xc
|
||||||
.POSIX:
|
.POSIX:
|
||||||
all: ; @false; true
|
all: ; @r() { return 1; }; r; true
|
||||||
!,
|
!,
|
||||||
'', "+ false\n+ true\n");
|
'', "+ r\n+ return 1\n+ true\n");
|
||||||
|
|
||||||
# This tells the test driver that the perl test script executed properly.
|
# This tells the test driver that the perl test script executed properly.
|
||||||
1;
|
1;
|
||||||
|
@ -58,16 +58,27 @@ one two:;@echo "$@: $(SHELL) $$SHELL"
|
|||||||
|
|
||||||
# Test .SHELLFLAGS
|
# Test .SHELLFLAGS
|
||||||
|
|
||||||
run_make_test(q!
|
# We can't assume the value here: on Solaris for example, every line printed
|
||||||
.SHELLFLAGS = -xc
|
# by the shell in -x mode has a trailing space (!!)
|
||||||
all: ; @true
|
my $script = 'true';
|
||||||
!,
|
my $out = `/bin/sh -xc '$script' 2>&1`;
|
||||||
'', "+ true\n");
|
|
||||||
|
|
||||||
run_make_test(q!
|
run_make_test(qq!
|
||||||
.SHELLFLAGS = -xec
|
.SHELLFLAGS = -xc
|
||||||
all: ; @true; false; true
|
all: ; \@$script
|
||||||
!,
|
!,
|
||||||
'', "+ true\n+ false\n#MAKE#: *** [all] Error 1\n", 512);
|
'', $out);
|
||||||
|
|
||||||
|
# We can't just use "false" because on different systems it provides a
|
||||||
|
# different exit code.
|
||||||
|
|
||||||
|
my $script = 'r() { return 1; }; true; r; true';
|
||||||
|
my $out = `/bin/sh -xec '$script' 2>&1`;
|
||||||
|
|
||||||
|
run_make_test(qq!
|
||||||
|
.SHELLFLAGS = -xec
|
||||||
|
all: ; \@$script
|
||||||
|
!,
|
||||||
|
'', "$out#MAKE#: *** [all] Error 1\n", 512);
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
6
vpath.c
6
vpath.c
@ -192,7 +192,8 @@ construct_vpath_list (char *pattern, char *dirpath)
|
|||||||
lastpath->next = next;
|
lastpath->next = next;
|
||||||
|
|
||||||
/* Free its unused storage. */
|
/* Free its unused storage. */
|
||||||
free (path->searchpath);
|
/* MSVC erroneously warns without a cast here. */
|
||||||
|
free ((void *)path->searchpath);
|
||||||
free (path);
|
free (path);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -297,7 +298,8 @@ construct_vpath_list (char *pattern, char *dirpath)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
/* There were no entries, so free whatever space we allocated. */
|
/* There were no entries, so free whatever space we allocated. */
|
||||||
free (vpath);
|
/* MSVC erroneously warns without a cast here. */
|
||||||
|
free ((void *)vpath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Search the GPATH list for a pathname string that matches the one passed
|
/* Search the GPATH list for a pathname string that matches the one passed
|
||||||
|
@ -16,6 +16,7 @@ You should have received a copy of the GNU General Public License along with
|
|||||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -132,7 +133,7 @@ readdir(DIR* pDir)
|
|||||||
pDir->dir_nNumFiles++;
|
pDir->dir_nNumFiles++;
|
||||||
|
|
||||||
/* fill in struct dirent values */
|
/* fill in struct dirent values */
|
||||||
pDir->dir_sdReturn.d_ino = -1;
|
pDir->dir_sdReturn.d_ino = (ino_t)-1;
|
||||||
strcpy(pDir->dir_sdReturn.d_name, wfdFindData.cFileName);
|
strcpy(pDir->dir_sdReturn.d_name, wfdFindData.cFileName);
|
||||||
|
|
||||||
return &pDir->dir_sdReturn;
|
return &pDir->dir_sdReturn;
|
||||||
|
@ -15,9 +15,9 @@ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|||||||
You should have received a copy of the GNU General Public License along with
|
You should have received a copy of the GNU General Public License along with
|
||||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#include "make.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "make.h"
|
|
||||||
#include "pathstuff.h"
|
#include "pathstuff.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -15,6 +15,7 @@ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|||||||
You should have received a copy of the GNU General Public License along with
|
You should have received a copy of the GNU General Public License along with
|
||||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -77,6 +78,6 @@ arr2envblk(char **arr, char **envblk_out)
|
|||||||
arrcnt++;
|
arrcnt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
free(tmp);
|
free(tmp);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -15,9 +15,14 @@ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|||||||
You should have received a copy of the GNU General Public License along with
|
You should have received a copy of the GNU General Public License along with
|
||||||
this program. If not, see <http://www.gnu.org/licenses/>. */
|
this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdint.h>
|
#ifdef _MSC_VER
|
||||||
|
# include <stddef.h> /* for intptr_t */
|
||||||
|
#else
|
||||||
|
# include <stdint.h>
|
||||||
|
#endif
|
||||||
#include <process.h> /* for msvc _beginthreadex, _endthreadex */
|
#include <process.h> /* for msvc _beginthreadex, _endthreadex */
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
@ -25,7 +30,6 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||||||
#include "sub_proc.h"
|
#include "sub_proc.h"
|
||||||
#include "proc.h"
|
#include "proc.h"
|
||||||
#include "w32err.h"
|
#include "w32err.h"
|
||||||
#include "config.h"
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
static char *make_command_line(char *shell_name, char *exec_path, char **argv);
|
static char *make_command_line(char *shell_name, char *exec_path, char **argv);
|
||||||
|
Loading…
Reference in New Issue
Block a user