mirror of
https://github.com/mirror/make.git
synced 2025-01-29 13:50:20 +08:00
Bump the version to 3.82.90.
Fix some doc bugs. Implement the --trace flag. Show filename/linenumber on error.
This commit is contained in:
parent
3b1432d86a
commit
a86d1693ba
22
ChangeLog
22
ChangeLog
@ -1,5 +1,27 @@
|
|||||||
2010-08-29 Paul Smith <psmith@gnu.org>
|
2010-08-29 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* doc/make.texi (Implicit Variables): Document LDLIBS and LOADLIBES.
|
||||||
|
Fixes Savannah bug #30807.
|
||||||
|
(Instead of Execution): Mention that included makefiles are still
|
||||||
|
rebuilt even with -n. Fixes Savannah bug #30762.
|
||||||
|
|
||||||
|
* configure.in: Bump to 3.82.90.
|
||||||
|
|
||||||
|
* make.h: Add trace_flag variable.
|
||||||
|
* main.c (switches): Add --trace option.
|
||||||
|
(trace_flag): Declare variable.
|
||||||
|
* job.c (start_job_command): Show recipe if trace_flag is set.
|
||||||
|
(new_job): Show trace messages if trace_flag is set.
|
||||||
|
* doc/make.texi (Options Summary): Document the new --trace option.
|
||||||
|
* make.1: Add --trace documentation.
|
||||||
|
* NEWS: Mention --trace.
|
||||||
|
|
||||||
|
* job.c (child_error): Show recipe filename/linenumber on error.
|
||||||
|
Also show "(ignored)" when appropriate even for signals/coredumps.
|
||||||
|
* NEWS: Mention file/linenumber change.
|
||||||
|
|
||||||
|
* main.c (main): Print version info when DB_BASIC is set.
|
||||||
|
|
||||||
* job.c (construct_command_argv_internal): If shellflags is not
|
* job.c (construct_command_argv_internal): If shellflags is not
|
||||||
set, choose an appropriate default value. Fixes Savannah bug #30748.
|
set, choose an appropriate default value. Fixes Savannah bug #30748.
|
||||||
|
|
||||||
|
18
NEWS
18
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.
|
||||||
28 July 2010
|
29 August 2010
|
||||||
|
|
||||||
See the end of this file for copyrights and conditions.
|
See the end of this file for copyrights and conditions.
|
||||||
|
|
||||||
@ -8,6 +8,22 @@ All changes mentioned here are more fully described in the GNU make
|
|||||||
manual, which is contained in this distribution as the file doc/make.texi.
|
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.82.90
|
||||||
|
|
||||||
|
A complete list of bugs fixed in this version is available here:
|
||||||
|
|
||||||
|
http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=101&set=custom
|
||||||
|
|
||||||
|
* New command line option: --trace enables tracing of targets. When enabled
|
||||||
|
the recipe to be invoked is printed even if it would otherwise be suppressed
|
||||||
|
by .SILENT or a "@" prefix character. Also before each recipe is run the
|
||||||
|
makefile name and linenumber where it was defined are shown as well as the
|
||||||
|
prerequisites that caused the target to be considered out of date.
|
||||||
|
|
||||||
|
* On failure, the makefile name and linenumber of the recipe that failed are
|
||||||
|
shown.
|
||||||
|
|
||||||
|
|
||||||
Version 3.82
|
Version 3.82
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
# 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/>.
|
||||||
|
|
||||||
AC_INIT([GNU make],[3.82],[bug-make@gnu.org])
|
AC_INIT([GNU make],[3.82.90],[bug-make@gnu.org])
|
||||||
|
|
||||||
AC_PREREQ(2.59)
|
AC_PREREQ(2.59)
|
||||||
AC_REVISION([[$Id$]])
|
AC_REVISION([[$Id$]])
|
||||||
|
@ -3286,10 +3286,11 @@ main.o : main.c defs.h
|
|||||||
Thus you no longer have to write all those rules yourself.
|
Thus you no longer have to write all those rules yourself.
|
||||||
The compiler will do it for you.
|
The compiler will do it for you.
|
||||||
|
|
||||||
Note that such a prerequisite constitutes mentioning @file{main.o} in a
|
Note that such a rule constitutes mentioning @file{main.o} in a
|
||||||
makefile, so it can never be considered an intermediate file by implicit
|
makefile, so it can never be considered an intermediate file by
|
||||||
rule search. This means that @code{make} won't ever remove the file
|
implicit rule search. This means that @code{make} won't ever remove
|
||||||
after using it; @pxref{Chained Rules, ,Chains of Implicit Rules}.
|
the file after using it; @pxref{Chained Rules, ,Chains of Implicit
|
||||||
|
Rules}.
|
||||||
|
|
||||||
@cindex @code{make depend}
|
@cindex @code{make depend}
|
||||||
With old @code{make} programs, it was traditional practice to use this
|
With old @code{make} programs, it was traditional practice to use this
|
||||||
@ -7918,9 +7919,12 @@ what you want. Certain options specify other activities for @code{make}.
|
|||||||
@cindex @code{--recon}
|
@cindex @code{--recon}
|
||||||
@cindex @code{-n}
|
@cindex @code{-n}
|
||||||
|
|
||||||
``No-op''. The activity is to print what recipe would be used to make
|
``No-op''. Causes @code{make} to print the recipes that are needed to
|
||||||
the targets up to date, but not actually execute it. Some recipes are
|
make the targets up to date, but not actually execute them. Note that
|
||||||
still executed, even with this flag (@pxref{MAKE Variable, ,How the @code{MAKE} Variable Works}).
|
some recipes are still executed, even with this flag (@pxref{MAKE
|
||||||
|
Variable, ,How the @code{MAKE} Variable Works}). Also any recipes
|
||||||
|
needed to update included makefiles are still executed
|
||||||
|
(@pxref{Remaking Makefiles, ,How Makefiles Are Remade}).
|
||||||
|
|
||||||
@item -t
|
@item -t
|
||||||
@itemx --touch
|
@itemx --touch
|
||||||
@ -7929,9 +7933,10 @@ still executed, even with this flag (@pxref{MAKE Variable, ,How the @code{MAKE}
|
|||||||
@cindex target, touching
|
@cindex target, touching
|
||||||
@cindex @code{-t}
|
@cindex @code{-t}
|
||||||
|
|
||||||
``Touch''. The activity is to mark the targets as up to date without
|
``Touch''. Marks targets as up to date without actually changing
|
||||||
actually changing them. In other words, @code{make} pretends to compile
|
them. In other words, @code{make} pretends to update the targets but
|
||||||
the targets but does not really change their contents.
|
does not really change their contents; instead only their modified
|
||||||
|
times are updated.
|
||||||
|
|
||||||
@item -q
|
@item -q
|
||||||
@itemx --question
|
@itemx --question
|
||||||
@ -7939,9 +7944,9 @@ the targets but does not really change their contents.
|
|||||||
@cindex @code{-q}
|
@cindex @code{-q}
|
||||||
@cindex question mode
|
@cindex question mode
|
||||||
|
|
||||||
``Question''. The activity is to find out silently whether the targets
|
``Question''. Silently check whether the targets are up to date, but
|
||||||
are up to date already; but execute no recipe in either case. In other
|
do not execute recipes; the exit code shows whether any updates are
|
||||||
words, neither compilation nor output will occur.
|
needed.
|
||||||
|
|
||||||
@item -W @var{file}
|
@item -W @var{file}
|
||||||
@itemx --what-if=@var{file}
|
@itemx --what-if=@var{file}
|
||||||
@ -8454,6 +8459,14 @@ instead of running their recipes. This is used to pretend that the
|
|||||||
recipes were done, in order to fool future invocations of
|
recipes were done, in order to fool future invocations of
|
||||||
@code{make}. @xref{Instead of Execution, ,Instead of Executing Recipes}.
|
@code{make}. @xref{Instead of Execution, ,Instead of Executing Recipes}.
|
||||||
|
|
||||||
|
@item --trace
|
||||||
|
@cindex @code{--trace}
|
||||||
|
@c Extra blank line here makes the table look better.
|
||||||
|
|
||||||
|
Print the entire recipe to be executed, even for recipes that are
|
||||||
|
normally silent (due to @code{.SILENT} or @samp{@@}). Also print the
|
||||||
|
makefile name and linenumber where the recipe was defined.
|
||||||
|
|
||||||
@item -v
|
@item -v
|
||||||
@cindex @code{-v}
|
@cindex @code{-v}
|
||||||
@itemx --version
|
@itemx --version
|
||||||
@ -8986,7 +8999,6 @@ 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
|
Here is a table of some of the more common variables used as names of
|
||||||
programs in built-in rules:
|
programs in built-in rules:
|
||||||
makefiles.
|
|
||||||
|
|
||||||
@table @code
|
@table @code
|
||||||
@item AR
|
@item AR
|
||||||
@ -9143,6 +9155,13 @@ Extra flags to give to the SCCS @code{get} program.
|
|||||||
Extra flags to give to compilers when they are supposed to invoke the linker,
|
Extra flags to give to compilers when they are supposed to invoke the linker,
|
||||||
@samp{ld}.
|
@samp{ld}.
|
||||||
|
|
||||||
|
@item LDLIBS
|
||||||
|
@vindex LDLIBS
|
||||||
|
@vindex LOADLIBES
|
||||||
|
Library flags or names given to compilers when they are supposed to
|
||||||
|
invoke the linker, @samp{ld}. @code{LOADLIBES} is a deprecated (but
|
||||||
|
still supported) alternative to @code{LDLIBS}.
|
||||||
|
|
||||||
@item LFLAGS
|
@item LFLAGS
|
||||||
@vindex LFLAGS
|
@vindex LFLAGS
|
||||||
Extra flags to give to Lex.
|
Extra flags to give to Lex.
|
||||||
|
85
job.c
85
job.c
@ -437,27 +437,46 @@ is_bourne_compatible_shell (const char *path)
|
|||||||
Append "(ignored)" if IGNORED is nonzero. */
|
Append "(ignored)" if IGNORED is nonzero. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
child_error (const char *target_name,
|
child_error (const struct file *file,
|
||||||
int exit_code, int exit_sig, int coredump, int ignored)
|
int exit_code, int exit_sig, int coredump, int ignored)
|
||||||
{
|
{
|
||||||
|
const char *nm;
|
||||||
|
const char *pre = "*** ";
|
||||||
|
const char *post = "";
|
||||||
|
const char *dump = "";
|
||||||
|
struct floc *flocp = &file->cmds->fileinfo;
|
||||||
|
|
||||||
if (ignored && silent_flag)
|
if (ignored && silent_flag)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (exit_sig && coredump)
|
||||||
|
dump = _(" (core dumped)");
|
||||||
|
|
||||||
|
if (ignored)
|
||||||
|
{
|
||||||
|
pre = "";
|
||||||
|
post = _(" (ignored)");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! flocp->filenm)
|
||||||
|
nm = _("<builtin>");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
char *a = alloca (strlen (flocp->filenm) + 1 + 11 + 1);
|
||||||
|
sprintf (a, "%s:%lu", flocp->filenm, flocp->lineno);
|
||||||
|
nm = a;
|
||||||
|
}
|
||||||
|
message (0, _("%s: recipe for target `%s' failed"), nm, file->name);
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
if (!(exit_code & 1))
|
if (!(exit_code & 1))
|
||||||
error (NILF,
|
error (NILF, _("%s[%s] Error 0x%x%s"), pre, file->name, exit_code, post);
|
||||||
(ignored ? _("*** [%s] Error 0x%x (ignored)")
|
|
||||||
: _("*** [%s] Error 0x%x")),
|
|
||||||
target_name, exit_code);
|
|
||||||
#else
|
#else
|
||||||
if (exit_sig == 0)
|
if (exit_sig == 0)
|
||||||
error (NILF, ignored ? _("[%s] Error %d (ignored)") :
|
error (NILF, _("%s[%s] Error %d%s"), pre, file->name, exit_code, post);
|
||||||
_("*** [%s] Error %d"),
|
|
||||||
target_name, exit_code);
|
|
||||||
else
|
else
|
||||||
error (NILF, "*** [%s] %s%s",
|
error (NILF, _("%s[%s] %s%s%s"),
|
||||||
target_name, strsignal (exit_sig),
|
pre, file->name, strsignal (exit_sig), dump, post);
|
||||||
coredump ? _(" (core dumped)") : "");
|
|
||||||
#endif /* VMS */
|
#endif /* VMS */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -533,7 +552,7 @@ reap_children (int block, int err)
|
|||||||
int remote = 0;
|
int remote = 0;
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
int exit_code, exit_sig, coredump;
|
int exit_code, exit_sig, coredump;
|
||||||
register struct child *lastc, *c;
|
struct child *lastc, *c;
|
||||||
int child_failed;
|
int child_failed;
|
||||||
int any_remote, any_local;
|
int any_remote, any_local;
|
||||||
int dontcare;
|
int dontcare;
|
||||||
@ -784,7 +803,7 @@ reap_children (int block, int err)
|
|||||||
static int delete_on_error = -1;
|
static int delete_on_error = -1;
|
||||||
|
|
||||||
if (!dontcare)
|
if (!dontcare)
|
||||||
child_error (c->file->name, exit_code, exit_sig, coredump, 0);
|
child_error (c->file, exit_code, exit_sig, coredump, 0);
|
||||||
|
|
||||||
c->file->update_status = 2;
|
c->file->update_status = 2;
|
||||||
if (delete_on_error == -1)
|
if (delete_on_error == -1)
|
||||||
@ -800,8 +819,7 @@ reap_children (int block, int err)
|
|||||||
if (child_failed)
|
if (child_failed)
|
||||||
{
|
{
|
||||||
/* The commands failed, but we don't care. */
|
/* The commands failed, but we don't care. */
|
||||||
child_error (c->file->name,
|
child_error (c->file, exit_code, exit_sig, coredump, 1);
|
||||||
exit_code, exit_sig, coredump, 1);
|
|
||||||
child_failed = 0;
|
child_failed = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1143,7 +1161,8 @@ start_job_command (struct child *child)
|
|||||||
can log the working directory before the command's own error messages
|
can log the working directory before the command's own error messages
|
||||||
appear. */
|
appear. */
|
||||||
|
|
||||||
message (0, (just_print_flag || (!(flags & COMMANDS_SILENT) && !silent_flag))
|
message (0, (just_print_flag || trace_flag
|
||||||
|
|| (!(flags & COMMANDS_SILENT) && !silent_flag))
|
||||||
? "%s" : (char *) 0, p);
|
? "%s" : (char *) 0, p);
|
||||||
|
|
||||||
/* Tell update_goal_chain that a command has been started on behalf of
|
/* Tell update_goal_chain that a command has been started on behalf of
|
||||||
@ -1792,17 +1811,33 @@ new_job (struct file *file)
|
|||||||
|
|
||||||
++jobserver_tokens;
|
++jobserver_tokens;
|
||||||
|
|
||||||
|
/* Trace the build.
|
||||||
|
Use message here so that changes to working directories are logged. */
|
||||||
|
if (trace_flag)
|
||||||
|
{
|
||||||
|
char *newer = allocated_variable_expand_for_file ("$?", c->file);
|
||||||
|
char *nm;
|
||||||
|
|
||||||
|
if (! cmds->fileinfo.filenm)
|
||||||
|
nm = _("<builtin>");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nm = alloca (strlen (cmds->fileinfo.filenm) + 1 + 11 + 1);
|
||||||
|
sprintf (nm, "%s:%lu", cmds->fileinfo.filenm, cmds->fileinfo.lineno);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newer[0] == '\0')
|
||||||
|
message (0, _("%s: target `%s' does not exist"), nm, c->file->name);
|
||||||
|
else
|
||||||
|
message (0, _("%s: update target `%s' due to: %s"), nm,
|
||||||
|
c->file->name, newer);
|
||||||
|
|
||||||
|
free (newer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* The job is now primed. Start it running.
|
/* The job is now primed. Start it running.
|
||||||
(This will notice if there is in fact no recipe.) */
|
(This will notice if there is in fact no recipe.) */
|
||||||
if (cmds->fileinfo.filenm)
|
|
||||||
DB (DB_BASIC, (_("Invoking recipe from %s:%lu to update target `%s'.\n"),
|
|
||||||
cmds->fileinfo.filenm, cmds->fileinfo.lineno,
|
|
||||||
c->file->name));
|
|
||||||
else
|
|
||||||
DB (DB_BASIC, (_("Invoking builtin recipe to update target `%s'.\n"),
|
|
||||||
c->file->name));
|
|
||||||
|
|
||||||
|
|
||||||
start_waiting_job (c);
|
start_waiting_job (c);
|
||||||
|
|
||||||
if (job_slots == 1 || not_parallel)
|
if (job_slots == 1 || not_parallel)
|
||||||
|
11
main.c
11
main.c
@ -151,9 +151,9 @@ static int debug_flag = 0;
|
|||||||
|
|
||||||
int db_level = 0;
|
int db_level = 0;
|
||||||
|
|
||||||
/* Output level (--verbosity). */
|
/* Tracing (--trace). */
|
||||||
|
|
||||||
static struct stringlist *verbosity_flags;
|
int trace_flag = 0;
|
||||||
|
|
||||||
#ifdef WINDOWS32
|
#ifdef WINDOWS32
|
||||||
/* Suspend make in main for a short time to allow debugger to attach */
|
/* Suspend make in main for a short time to allow debugger to attach */
|
||||||
@ -358,6 +358,8 @@ static const char *const usage[] =
|
|||||||
N_("\
|
N_("\
|
||||||
-t, --touch Touch targets instead of remaking them.\n"),
|
-t, --touch Touch targets instead of remaking them.\n"),
|
||||||
N_("\
|
N_("\
|
||||||
|
--trace Print tracing information.\n"),
|
||||||
|
N_("\
|
||||||
-v, --version Print the version number of make and exit.\n"),
|
-v, --version Print the version number of make and exit.\n"),
|
||||||
N_("\
|
N_("\
|
||||||
-w, --print-directory Print the current directory.\n"),
|
-w, --print-directory Print the current directory.\n"),
|
||||||
@ -414,9 +416,8 @@ static const struct command_switch switches[] =
|
|||||||
{ 'S', flag_off, &keep_going_flag, 1, 1, 0, 0, &default_keep_going_flag,
|
{ 'S', flag_off, &keep_going_flag, 1, 1, 0, 0, &default_keep_going_flag,
|
||||||
"no-keep-going" },
|
"no-keep-going" },
|
||||||
{ 't', flag, &touch_flag, 1, 1, 1, 0, 0, "touch" },
|
{ 't', flag, &touch_flag, 1, 1, 1, 0, 0, "touch" },
|
||||||
|
{ CHAR_MAX+3, flag, &trace_flag, 1, 1, 0, 0, 0, "trace" },
|
||||||
{ 'v', flag, &print_version_flag, 1, 1, 0, 0, 0, "version" },
|
{ 'v', flag, &print_version_flag, 1, 1, 0, 0, 0, "version" },
|
||||||
{ CHAR_MAX+3, string, &verbosity_flags, 1, 1, 0, 0, 0,
|
|
||||||
"verbosity" },
|
|
||||||
{ 'w', flag, &print_directory_flag, 1, 1, 0, 0, 0, "print-directory" },
|
{ 'w', flag, &print_directory_flag, 1, 1, 0, 0, 0, "print-directory" },
|
||||||
{ CHAR_MAX+4, flag, &inhibit_print_directory_flag, 1, 1, 0, 0, 0,
|
{ CHAR_MAX+4, flag, &inhibit_print_directory_flag, 1, 1, 0, 0, 0,
|
||||||
"no-print-directory" },
|
"no-print-directory" },
|
||||||
@ -1282,7 +1283,7 @@ main (int argc, char **argv, char **envp)
|
|||||||
always_make_flag = always_make_set && (restarts == 0);
|
always_make_flag = always_make_set && (restarts == 0);
|
||||||
|
|
||||||
/* Print version information. */
|
/* Print version information. */
|
||||||
if (print_version_flag || print_data_base_flag || db_level)
|
if (print_version_flag || print_data_base_flag || ISDB (DB_BASIC))
|
||||||
{
|
{
|
||||||
print_version ();
|
print_version ();
|
||||||
|
|
||||||
|
10
make.1
10
make.1
@ -283,6 +283,10 @@ This is used to pretend that the commands were done, in order to fool
|
|||||||
future invocations of
|
future invocations of
|
||||||
.IR make .
|
.IR make .
|
||||||
.TP 0.5i
|
.TP 0.5i
|
||||||
|
.B \-\-trace
|
||||||
|
Print information about the commands invoked by
|
||||||
|
.IR make.
|
||||||
|
.TP 0.5i
|
||||||
.BR \-v , " \-\-version"
|
.BR \-v , " \-\-version"
|
||||||
Print the version of the
|
Print the version of the
|
||||||
.I make
|
.I make
|
||||||
@ -338,10 +342,10 @@ See the chapter `Problems and Bugs' in
|
|||||||
.IR "The GNU Make Manual" .
|
.IR "The GNU Make Manual" .
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
This manual page contributed by Dennis Morse of Stanford University.
|
This manual page contributed by Dennis Morse of Stanford University.
|
||||||
It has been reworked by Roland McGrath. Further updates contributed by
|
Further updates contributed by Mike Frysinger. It has been reworked by Roland
|
||||||
Mike Frysinger.
|
McGrath. Maintained by Paul Smith.
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
Copyright (C) 1992, 1993, 1996, 1999, 2007 Free Software Foundation, Inc.
|
Copyright (C) 1992, 1993, 1996, 1999, 2007, 2010 Free Software Foundation, Inc.
|
||||||
This file is part of GNU
|
This file is part of GNU
|
||||||
.IR make .
|
.IR make .
|
||||||
.LP
|
.LP
|
||||||
|
6
make.h
6
make.h
@ -511,9 +511,9 @@ extern int just_print_flag, silent_flag, ignore_errors_flag, keep_going_flag;
|
|||||||
extern int print_data_base_flag, question_flag, touch_flag, always_make_flag;
|
extern int print_data_base_flag, question_flag, touch_flag, always_make_flag;
|
||||||
extern int env_overrides, no_builtin_rules_flag, no_builtin_variables_flag;
|
extern int env_overrides, no_builtin_rules_flag, no_builtin_variables_flag;
|
||||||
extern int print_version_flag, print_directory_flag, check_symlink_flag;
|
extern int print_version_flag, print_directory_flag, check_symlink_flag;
|
||||||
extern int warn_undefined_variables_flag, posix_pedantic, not_parallel;
|
extern int warn_undefined_variables_flag, trace_flag, posix_pedantic;
|
||||||
extern int second_expansion, clock_skew_detected, rebuilding_makefiles;
|
extern int not_parallel, second_expansion, clock_skew_detected;
|
||||||
extern int one_shell;
|
extern int rebuilding_makefiles, one_shell;
|
||||||
|
|
||||||
/* can we run commands via 'sh -c xxx' or must we use batch files? */
|
/* can we run commands via 'sh -c xxx' or must we use batch files? */
|
||||||
extern int batch_mode_shell;
|
extern int batch_mode_shell;
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
2010-08-29 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* scripts/features/errors: Add new error message to output text.
|
||||||
|
* scripts/variables/SHELL: Ditto.
|
||||||
|
* scripts/targets/POSIX: Ditto.
|
||||||
|
* scripts/options/dash-k: Ditto.
|
||||||
|
* scripts/features/vpathplus: Ditto.
|
||||||
|
* scripts/features/patternrules: Ditto.
|
||||||
|
* scripts/features/parallelism: Ditto.
|
||||||
|
|
||||||
2010-08-13 Paul Smith <psmith@gnu.org>
|
2010-08-13 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
* scripts/features/archives: New regression tests for archive
|
* scripts/features/archives: New regression tests for archive
|
||||||
|
@ -42,15 +42,17 @@ close(MAKEFILE);
|
|||||||
|
|
||||||
unlink("cleanit");
|
unlink("cleanit");
|
||||||
$cleanit_error = `sh -c "$rm_command cleanit 2>&1"`;
|
$cleanit_error = `sh -c "$rm_command cleanit 2>&1"`;
|
||||||
|
chomp $cleanit_error;
|
||||||
$delete_error_code = $? >> 8;
|
$delete_error_code = $? >> 8;
|
||||||
|
|
||||||
# TEST #1
|
# TEST #1
|
||||||
# -------
|
# -------
|
||||||
|
|
||||||
$answer = "$rm_command cleanit\n"
|
$answer = "$rm_command cleanit
|
||||||
. $cleanit_error
|
$cleanit_error
|
||||||
."$make_name: [clean] Error $delete_error_code (ignored)\n"
|
$makefile:2: recipe for target `clean' failed
|
||||||
."$rm_command foo\n";
|
$make_name: [clean] Error $delete_error_code (ignored)
|
||||||
|
$rm_command foo\n";
|
||||||
|
|
||||||
&run_make_with_options($makefile,"",&get_logfile);
|
&run_make_with_options($makefile,"",&get_logfile);
|
||||||
|
|
||||||
@ -74,10 +76,11 @@ if (!$vos)
|
|||||||
# TEST #2
|
# TEST #2
|
||||||
# -------
|
# -------
|
||||||
|
|
||||||
$answer = "$rm_command cleanit\n"
|
$answer = "$rm_command cleanit
|
||||||
. $cleanit_error
|
$cleanit_error
|
||||||
."$make_name: [clean2] Error $delete_error_code (ignored)\n"
|
$makefile:5: recipe for target `clean2' failed
|
||||||
."$rm_command foo\n";
|
$make_name: [clean2] Error $delete_error_code (ignored)
|
||||||
|
$rm_command foo\n";
|
||||||
|
|
||||||
&run_make_with_options($makefile,"clean2 -i",&get_logfile);
|
&run_make_with_options($makefile,"clean2 -i",&get_logfile);
|
||||||
|
|
||||||
|
@ -98,14 +98,17 @@ fail.1 fail.2 fail.3:
|
|||||||
ok:
|
ok:
|
||||||
\@sleep 4
|
\@sleep 4
|
||||||
\@echo Ok done",
|
\@echo Ok done",
|
||||||
'-rR -j5', 'Fail
|
'-rR -j5', "Fail
|
||||||
|
#MAKEFILE#:6: recipe for target `fail.1' failed
|
||||||
#MAKE#: *** [fail.1] Error 1
|
#MAKE#: *** [fail.1] Error 1
|
||||||
#MAKE#: *** Waiting for unfinished jobs....
|
#MAKE#: *** Waiting for unfinished jobs....
|
||||||
Fail
|
Fail
|
||||||
|
#MAKEFILE#:6: recipe for target `fail.2' failed
|
||||||
#MAKE#: *** [fail.2] Error 1
|
#MAKE#: *** [fail.2] Error 1
|
||||||
Fail
|
Fail
|
||||||
|
#MAKEFILE#:6: recipe for target `fail.3' failed
|
||||||
#MAKE#: *** [fail.3] Error 1
|
#MAKE#: *** [fail.3] Error 1
|
||||||
Ok done',
|
Ok done",
|
||||||
512);
|
512);
|
||||||
|
|
||||||
|
|
||||||
|
@ -110,7 +110,8 @@ $(dir)/foo.bar:
|
|||||||
|
|
||||||
',
|
',
|
||||||
"dir=$dir",
|
"dir=$dir",
|
||||||
"#MAKE#: *** [$dir/foo.bar] Error 1",
|
"#MAKEFILE#:6: recipe for target `$dir/foo.bar' failed
|
||||||
|
#MAKE#: *** [$dir/foo.bar] Error 1",
|
||||||
512);
|
512);
|
||||||
|
|
||||||
unlink("$dir/foo.bar");
|
unlink("$dir/foo.bar");
|
||||||
|
@ -86,6 +86,7 @@ cat ${VP}foo.c bar.c > foo.b 2>/dev/null || exit 1
|
|||||||
|
|
||||||
$answer = "not creating notarget.c from notarget.d
|
$answer = "not creating notarget.c from notarget.d
|
||||||
cat notarget.c > notarget.b 2>/dev/null || exit 1
|
cat notarget.c > notarget.b 2>/dev/null || exit 1
|
||||||
|
$makefile:16: recipe for target `notarget.b' failed
|
||||||
$make_name: *** [notarget.b] Error 1
|
$make_name: *** [notarget.b] Error 1
|
||||||
";
|
";
|
||||||
|
|
||||||
|
@ -92,6 +92,7 @@ close(MAKEFILE);
|
|||||||
&run_make_with_options($makefile2, "-k", &get_logfile, $error_code);
|
&run_make_with_options($makefile2, "-k", &get_logfile, $error_code);
|
||||||
|
|
||||||
$answer = "exit 1
|
$answer = "exit 1
|
||||||
|
$makefile2:9: recipe for target `foo.o' failed
|
||||||
$make_name: *** [foo.o] Error 1
|
$make_name: *** [foo.o] Error 1
|
||||||
$make_name: Target `all' not remade because of errors.\n";
|
$make_name: Target `all' not remade because of errors.\n";
|
||||||
|
|
||||||
|
@ -17,7 +17,8 @@ run_make_test(qq!
|
|||||||
.POSIX:
|
.POSIX:
|
||||||
all: ; \@$script
|
all: ; \@$script
|
||||||
!,
|
!,
|
||||||
'', "#MAKE#: *** [all] Error $err\n", 512);
|
'', "#MAKEFILE#:3: recipe for target `all' failed
|
||||||
|
#MAKE#: *** [all] Error $err\n", 512);
|
||||||
|
|
||||||
# User settings must override .POSIX
|
# User settings must override .POSIX
|
||||||
$flags = '-xc';
|
$flags = '-xc';
|
||||||
|
@ -81,6 +81,7 @@ run_make_test(qq!
|
|||||||
.SHELLFLAGS = $flags
|
.SHELLFLAGS = $flags
|
||||||
all: ; \@$script
|
all: ; \@$script
|
||||||
!,
|
!,
|
||||||
'', "$out#MAKE#: *** [all] Error $err\n", 512);
|
'', "$out#MAKEFILE#:3: recipe for target `all' failed
|
||||||
|
#MAKE#: *** [all] Error $err\n", 512);
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Loading…
Reference in New Issue
Block a user