Blame tests/scripts/variables/LIBPATTERNS

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