[SV 47151] Exit with 1 when checking recursive make -q

* job.h (struct child): New bit to mark recursive command lines.
* job.c (start_job_command): Set the recursive command line bit.
(reap_children): If the child is a recursive command and it exits
with 1 during question mode, don't print an error and exit with 1.
* tests/scripts/options/dash-q: Add a regression test.
This commit is contained in:
Paul Smith
2016-02-28 20:20:18 -05:00
parent bccd01354b
commit 89e18c12eb
3 changed files with 25 additions and 7 deletions

View File

@@ -74,4 +74,13 @@ build-y: build-x
',
'-q build-y', "#MAKE#: *** No rule to make target 'build-stamp-2', needed by 'build-arch'. Stop.\n", 512);
# TEST 9 : Savannah bug # 47151
# Make sure we exit with 1 when invoking a recursive make
run_make_test('
foo: bar ; echo foo
bar: ; @$(MAKE) -f #MAKEFILE# baz
baz: ; echo baz
',
'-q foo', '', 256);
1;