summaryrefslogtreecommitdiff
path: root/tests/scripts/features/vpathplus
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2002-09-04 07:26:19 +0000
committerPaul Smith <psmith@gnu.org>2002-09-04 07:26:19 +0000
commit988deb489b89889b97f82e3095d267d09ff7e7ab (patch)
tree8127d7aa6cfedde3f284f5c6ae77e4f2eefee59e /tests/scripts/features/vpathplus
parentd2429d7508169501d2dfeefca5608005142fe236 (diff)
downloadgunmake-988deb489b89889b97f82e3095d267d09ff7e7ab.tar.gz
Fix for complex situations where directories are declared as prerequisites.
Info on this fix from barkalow@reputation.com: thanks! Some updates/cleanups of some of the tests; added a forgotten -t test, etc.
Diffstat (limited to 'tests/scripts/features/vpathplus')
-rw-r--r--tests/scripts/features/vpathplus21
1 files changed, 13 insertions, 8 deletions
diff --git a/tests/scripts/features/vpathplus b/tests/scripts/features/vpathplus
index 76312b3..a37fbed 100644
--- a/tests/scripts/features/vpathplus
+++ b/tests/scripts/features/vpathplus
@@ -55,18 +55,19 @@ close(MAKEFILE);
@touchedfiles = ();
+$off = -500;
+
sub touchfiles {
foreach (@_) {
- sleep($wtime);
- ($f = $_) =~ s,VP/,$VP,g;
- &touch($f);
- push(@touchedfiles, $f);
+ &utouch($off, $_);
+ $off += 10;
+ push(@touchedfiles, $_);
}
}
# Run the general-case test
-&touchfiles("VP/foo.d", "VP/bar.d", "VP/foo.c", "VP/bar.c", "foo.b", "bar.d");
+&touchfiles("$VP/foo.d", "$VP/bar.d", "$VP/foo.c", "$VP/bar.c", "foo.b", "bar.d");
&run_make_with_options($makefile,"general",&get_logfile);
@@ -79,7 +80,7 @@ cat ${VP}foo.c bar.c > foo.b 2>/dev/null || exit 1
# Test rules that don't make the target correctly
-&touchfiles("VP/notarget.c", "notarget.b", "notarget.d");
+&touchfiles("$VP/notarget.c", "notarget.b", "notarget.d");
&run_make_with_options($makefile,"notarget",&get_logfile,512);
@@ -92,7 +93,7 @@ $make_name: *** [notarget.b] Error 1
# Test intermediate file handling (part 1)
-&touchfiles("VP/inter.d");
+&touchfiles("$VP/inter.d");
&run_make_with_options($makefile,"intermediate",&get_logfile);
@@ -107,7 +108,11 @@ rm inter.b inter.c
# Test intermediate file handling (part 2)
-&touchfiles("VP/inter.b", "VP/inter.d");
+&utouch(-20, "inter.a");
+&utouch(-10, "$VP/inter.b");
+&touch("$VP/inter.d");
+
+push(@touchedfiles, "$VP/inter.b", "$VP/inter.d");
&run_make_with_options($makefile,"intermediate",&get_logfile);