diff options
author | Boris Kolpackov <boris@kolpackov.net> | 2009-11-12 16:42:36 +0000 |
---|---|---|
committer | Boris Kolpackov <boris@kolpackov.net> | 2009-11-12 16:42:36 +0000 |
commit | fe43fa9de38d9e1f18bdc1924a2cee72f244bdd5 (patch) | |
tree | 7d0ef232e5e4c9b694784fe3b76f5006ced0e5e7 /tests | |
parent | 5f188b39a49a7eb0d06979b451863dd7ff26a074 (diff) | |
download | gunmake-fe43fa9de38d9e1f18bdc1924a2cee72f244bdd5.tar.gz |
Implement linker-compatible library search.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ChangeLog | 5 | ||||
-rw-r--r-- | tests/scripts/features/vpath3 | 50 |
2 files changed, 55 insertions, 0 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index f446dcb..eaacaec 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2009-11-12 Boris Kolpackov <boris@codesynthesis.com> + + * scripts/features/vpath3: Test for the new library search + behavior. + 2009-10-06 Boris Kolpackov <boris@codesynthesis.com> * scripts/features/se_explicit: Enable the test for now fixed diff --git a/tests/scripts/features/vpath3 b/tests/scripts/features/vpath3 new file mode 100644 index 0000000..978c5ee --- /dev/null +++ b/tests/scripts/features/vpath3 @@ -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; |