mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2024-12-29 08:09:03 +00:00
[SV 39203] Don't set MAKEFLAGS when restarting.
We are restarting with the original command line flags, so if we set MAKEFLAGS as well that will cause double flags.
This commit is contained in:
parent
3aa2aa7e82
commit
0a81d50d66
4 changed files with 29 additions and 12 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2013-09-15 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
Fix Savannah bug #39203.
|
||||||
|
|
||||||
|
* main.c (main): Don't set MAKEFLAGS in the environment when we
|
||||||
|
restart. We have the original command line flags so keep the
|
||||||
|
original MAKEFLAGS settings as well.
|
||||||
|
|
||||||
2013-09-14 Paul Smith <psmith@gnu.org>
|
2013-09-14 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
Fix Savannah bug #35248.
|
Fix Savannah bug #35248.
|
||||||
|
|
18
main.c
18
main.c
|
@ -1887,12 +1887,14 @@ main (int argc, char **argv, char **envp)
|
||||||
jobserver. If !job_slots and we don't have a pipe, we can start
|
jobserver. If !job_slots and we don't have a pipe, we can start
|
||||||
infinite jobs. If we see both a pipe and job_slots >0 that means the
|
infinite jobs. If we see both a pipe and job_slots >0 that means the
|
||||||
user set -j explicitly. This is broken; in this case obey the user
|
user set -j explicitly. This is broken; in this case obey the user
|
||||||
(ignore the jobserver pipe for this make) but print a message. */
|
(ignore the jobserver pipe for this make) but print a message.
|
||||||
|
If we've restarted, we already printed this the first time. */
|
||||||
|
|
||||||
if (job_slots > 0)
|
if (job_slots > 0)
|
||||||
error (NILF,
|
{
|
||||||
_("warning: -jN forced in submake: disabling jobserver mode."));
|
if (! restarts)
|
||||||
|
error (NILF, _("warning: -jN forced in submake: disabling jobserver mode."));
|
||||||
|
}
|
||||||
#ifndef WINDOWS32
|
#ifndef WINDOWS32
|
||||||
/* Create a duplicate pipe, that will be closed in the SIGCHLD
|
/* Create a duplicate pipe, that will be closed in the SIGCHLD
|
||||||
handler. If this fails with EBADF, the parent has closed the pipe
|
handler. If this fails with EBADF, the parent has closed the pipe
|
||||||
|
@ -2279,14 +2281,6 @@ main (int argc, char **argv, char **envp)
|
||||||
if (master_job_slots)
|
if (master_job_slots)
|
||||||
job_slots = master_job_slots;
|
job_slots = master_job_slots;
|
||||||
|
|
||||||
/* Reset makeflags in case they were changed. */
|
|
||||||
{
|
|
||||||
const char *pv = define_makeflags (1, 0);
|
|
||||||
char *p = alloca (CSTRLEN ("MAKEFLAGS=") + strlen (pv) + 1);
|
|
||||||
sprintf (p, "MAKEFLAGS=%s", pv);
|
|
||||||
putenv (allocated_variable_expand (p));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ISDB (DB_BASIC))
|
if (ISDB (DB_BASIC))
|
||||||
{
|
{
|
||||||
char **p;
|
char **p;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2013-09-15 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* scripts/options/eval: Verify --eval during restart.
|
||||||
|
Test for Savannah bug #39203.
|
||||||
|
|
||||||
2013-09-14 Paul Smith <psmith@gnu.org>
|
2013-09-14 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
* scripts/features/output-sync: Verify -Orecurse properly.
|
* scripts/features/output-sync: Verify -Orecurse properly.
|
||||||
|
|
|
@ -16,4 +16,14 @@ recurse: ; @$(MAKE) -f #MAKEFILE# && echo recurse!,
|
||||||
run_make_test(undef, '--no-print-directory --eval=\$\(info\ eval\) recurse',
|
run_make_test(undef, '--no-print-directory --eval=\$\(info\ eval\) recurse',
|
||||||
"eval\neval\nall\nrecurse");
|
"eval\neval\nall\nrecurse");
|
||||||
|
|
||||||
|
# Make sure that --eval is handled correctly during restarting
|
||||||
|
run_make_test(q!
|
||||||
|
all: ; @echo $@
|
||||||
|
-include gen.mk
|
||||||
|
gen.mk: ; @echo > $@
|
||||||
|
!,
|
||||||
|
'--eval=\$\(info\ eval\)', "eval\neval\nall");
|
||||||
|
|
||||||
|
unlink('gen.mk');
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
Loading…
Reference in a new issue