2009-06-07 17:40:06 +00:00
|
|
|
# -*-perl-*-
|
|
|
|
|
|
|
|
$description = "Test .LIBPATTERNS special variable.";
|
|
|
|
|
|
|
|
$details = "";
|
|
|
|
|
|
|
|
# TEST 0: basics
|
|
|
|
|
|
|
|
touch('mtest_foo.a');
|
|
|
|
|
|
|
|
run_make_test('
|
|
|
|
.LIBPATTERNS = mtest_%.a
|
|
|
|
all: -lfoo ; @echo "build $@ from $<"
|
|
|
|
',
|
|
|
|
'', "build all from mtest_foo.a\n");
|
|
|
|
|
|
|
|
# TEST 1: Handle elements that are not patterns.
|
|
|
|
|
|
|
|
run_make_test('
|
|
|
|
.LIBPATTERNS = mtest_foo.a mtest_%.a
|
|
|
|
all: -lfoo ; @echo "build $@ from $<"
|
|
|
|
',
|
2012-03-04 00:24:20 +00:00
|
|
|
'', "#MAKE#: .LIBPATTERNS element 'mtest_foo.a' is not a pattern
|
2009-06-07 17:40:06 +00:00
|
|
|
build all from mtest_foo.a\n");
|
|
|
|
|
|
|
|
# TEST 2: target-specific override
|
|
|
|
|
|
|
|
# Uncomment this when we add support, see Savannah bug #25703
|
|
|
|
# run_make_test('
|
|
|
|
# .LIBPATTERNS = mbad_%.a
|
|
|
|
# all: .LIBPATTERNS += mtest_%.a
|
|
|
|
# all: -lfoo ; @echo "build $@ from $<"
|
|
|
|
# ',
|
|
|
|
# '', "build all from mtest_foo.a\n");
|
|
|
|
|
|
|
|
unlink('mtest_foo.a');
|
|
|
|
|
|
|
|
1;
|