mirror of
https://github.com/mirror/make.git
synced 2026-08-10 17:14:33 +00:00
Implement linker-compatible library search.
This commit is contained in:
50
tests/scripts/features/vpath3
Normal file
50
tests/scripts/features/vpath3
Normal file
@@ -0,0 +1,50 @@
|
||||
# -*-perl-*-
|
||||
|
||||
$description = "Test the interaction of the -lfoo feature and vpath";
|
||||
$details = "";
|
||||
|
||||
open(MAKEFILE,"> $makefile");
|
||||
|
||||
# The Contents of the MAKEFILE ...
|
||||
|
||||
print MAKEFILE "vpath %.a a1\n";
|
||||
print MAKEFILE "vpath %.so b1\n";
|
||||
print MAKEFILE "vpath % a2 b2\n";
|
||||
print MAKEFILE "vpath % b3\n";
|
||||
print MAKEFILE "all: -l1 -l2 -l3; \@echo \$^\n";
|
||||
|
||||
# END of Contents of MAKEFILE
|
||||
|
||||
close(MAKEFILE);
|
||||
|
||||
mkdir("a1", 0777);
|
||||
mkdir("b1", 0777);
|
||||
mkdir("a2", 0777);
|
||||
mkdir("b2", 0777);
|
||||
mkdir("b3", 0777);
|
||||
|
||||
@files_to_touch = ("a1${pathsep}lib1.a",
|
||||
"b1${pathsep}lib1.so",
|
||||
"a2${pathsep}lib2.a",
|
||||
"b2${pathsep}lib2.so",
|
||||
"lib3.a",
|
||||
"b3${pathsep}lib3.so");
|
||||
|
||||
&touch(@files_to_touch);
|
||||
|
||||
&run_make_with_options($makefile,"",&get_logfile);
|
||||
|
||||
# Create the answer to what should be produced by this Makefile
|
||||
$answer = "a1${pathsep}lib1.a a2${pathsep}lib2.a lib3.a\n";
|
||||
|
||||
if (&compare_output($answer,&get_logfile(1)))
|
||||
{
|
||||
unlink @files_to_touch;
|
||||
rmdir("a1");
|
||||
rmdir("b1");
|
||||
rmdir("a2");
|
||||
rmdir("b2");
|
||||
rmdir("b3");
|
||||
}
|
||||
|
||||
1;
|
||||
Reference in New Issue
Block a user