2000-06-23 15:55:46 +00:00
|
|
|
# -*-perl-*-
|
|
|
|
$description = "Test the -q option.\n";
|
|
|
|
|
|
|
|
$details = "Try various uses of -q and ensure they all give the correct results.\n";
|
|
|
|
|
2005-02-28 09:41:25 +00:00
|
|
|
# TEST 0
|
2000-06-23 15:55:46 +00:00
|
|
|
|
2014-05-01 13:48:10 +00:00
|
|
|
run_make_test(qq!
|
2000-06-23 15:55:46 +00:00
|
|
|
one:
|
|
|
|
two: ;
|
|
|
|
three: ; :
|
2014-05-01 13:48:10 +00:00
|
|
|
four: ; \$(.XY)
|
|
|
|
five: ; \\
|
|
|
|
\$(.XY)
|
|
|
|
six: ; \\
|
|
|
|
\$(.XY)
|
|
|
|
\t\$(.XY)
|
|
|
|
seven: ; \\
|
|
|
|
\$(.XY)
|
|
|
|
\t: foo
|
|
|
|
\t\$(.XY)
|
|
|
|
!,
|
2005-02-28 09:41:25 +00:00
|
|
|
'-q one', '');
|
2000-06-23 15:55:46 +00:00
|
|
|
|
|
|
|
# TEST 1
|
|
|
|
|
2005-02-28 09:41:25 +00:00
|
|
|
run_make_test(undef, '-q two', '');
|
2000-06-23 15:55:46 +00:00
|
|
|
|
|
|
|
# TEST 2
|
|
|
|
|
2005-02-28 09:41:25 +00:00
|
|
|
run_make_test(undef, '-q three', '', 256);
|
2000-06-23 15:55:46 +00:00
|
|
|
|
|
|
|
# TEST 3
|
|
|
|
|
2005-02-28 09:41:25 +00:00
|
|
|
run_make_test(undef, '-q four', '');
|
2000-06-23 15:55:46 +00:00
|
|
|
|
|
|
|
# TEST 4
|
|
|
|
|
2005-02-28 09:41:25 +00:00
|
|
|
run_make_test(undef, '-q five', '');
|
2000-06-23 15:55:46 +00:00
|
|
|
|
|
|
|
# TEST 5
|
|
|
|
|
2005-02-28 09:41:25 +00:00
|
|
|
run_make_test(undef, '-q six', '');
|
2000-06-23 15:55:46 +00:00
|
|
|
|
|
|
|
# TEST 6
|
|
|
|
|
2005-02-28 09:41:25 +00:00
|
|
|
run_make_test(undef, '-q seven', '', 256);
|
|
|
|
|
|
|
|
# TEST 7 : Savannah bug # 7144
|
|
|
|
|
|
|
|
run_make_test('
|
|
|
|
one:: ; @echo one
|
|
|
|
one:: ; @echo two
|
|
|
|
',
|
|
|
|
'-q', '', 256);
|
2000-06-23 15:55:46 +00:00
|
|
|
|
2014-05-01 13:48:10 +00:00
|
|
|
# TEST 7 : Savannah bug # 42249
|
|
|
|
# Make sure we exit with 1 even for prerequisite updates
|
|
|
|
run_make_test('
|
|
|
|
build-stamp: ; echo $@
|
|
|
|
build-arch: build-stamp
|
|
|
|
build-x: build-arch
|
|
|
|
build-y: build-x
|
|
|
|
',
|
|
|
|
'-q build-y', '', 256);
|
|
|
|
|
|
|
|
# TEST 8
|
|
|
|
# Make sure we exit with 2 on error even with -q
|
|
|
|
run_make_test('
|
|
|
|
build-stamp: ; echo $@
|
|
|
|
build-arch: build-stamp-2
|
|
|
|
build-x: build-arch
|
|
|
|
build-y: build-x
|
|
|
|
',
|
|
|
|
'-q build-y', "#MAKE#: *** No rule to make target 'build-stamp-2', needed by 'build-arch'. Stop.\n", 512);
|
|
|
|
|
2016-02-29 01:20:18 +00:00
|
|
|
# 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);
|
|
|
|
|
2000-06-23 15:55:46 +00:00
|
|
|
1;
|