diff options
Diffstat (limited to 'tests/scripts')
-rw-r--r-- | tests/scripts/options/symlinks | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/scripts/options/symlinks b/tests/scripts/options/symlinks index 4dcc67a..d63e222 100644 --- a/tests/scripts/options/symlinks +++ b/tests/scripts/options/symlinks @@ -42,6 +42,19 @@ if (eval { symlink("",""); 1 }) { run_make_test(undef, '-L', "make targ from sym"); rmfiles('targ', 'dep', 'sym', 'dep1'); + + # Check handling when symlinks point to non-existent files. Without -L we + # should get an error: with -L we should use the timestamp of the symlink. + + symlink("../$dirname/dep", 'sym'); + run_make_test('targ: sym ; @echo make $@ from $<', '', + "#MAKE#: *** No rule to make target `sym', needed by `targ'. Stop.", 512); + + run_make_test('targ: sym ; @echo make $@ from $<', '-L', + 'make targ from sym'); + + + rmfiles('targ', 'sym'); } 1; |