diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-21 15:47:26 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-21 15:47:26 +0000 |
commit | 4ba7095c8b1e78642662b76b43ac3fa8cbda5537 (patch) | |
tree | 64079ec2b7f69684200a6694d7556804680117ef | |
parent | dafca956013a09f7b5201b464199f47cf100f00f (diff) | |
download | perl-4ba7095c8b1e78642662b76b43ac3fa8cbda5537.tar.gz |
Robustness support for #8218 (symlink forest) since the GNU
tools seem to be overly picky about symlinkage depths.
p4raw-id: //depot/perl@8220
-rw-r--r-- | Makefile.SH | 7 | ||||
-rwxr-xr-x | t/io/fs.t | 9 |
2 files changed, 13 insertions, 3 deletions
diff --git a/Makefile.SH b/Makefile.SH index f9ae6b72a1..5c543355bf 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -137,6 +137,7 @@ CLDFLAGS = $ldflags mallocsrc = $mallocsrc mallocobj = $mallocobj LNS = $lns +CPS = $cp -f RMS = rm -f ranlib = $ranlib @@ -300,9 +301,13 @@ utilities: miniperl lib/Config.pm $(plextract) lib/lib.pm FORCE FORCE: @sh -c true +# We do a copy of the op.c instead of a symlink because gcc gets huffy +# if we have a symlink forest to another disk (it complains about too many +# levels of symbolic links, even if we have only two) + opmini$(OBJ_EXT): op.c config.h $(RMS) opmini.c - $(LNS) op.c opmini.c + $(CPS) op.c opmini.c $(CCCMD) $(PLDLFLAGS) -DPERL_EXTERNAL_GLOB opmini.c $(RMS) opmini.c @@ -129,10 +129,15 @@ chdir $wd || die "Can't cd back to $wd"; unlink 'c'; if ($^O ne 'MSWin32' and `ls -l perl 2>/dev/null` =~ /^l.*->/) { # we have symbolic links - if (symlink("TEST","c")) {print "ok 21\n";} else {print "not ok 21\n";} - $foo = `grep perl c`; + system("cp TEST TEST$$"); + # we have to copy because e.g. GNU grep gets huffy if we have + # a symlink forest to another disk (it complains about too many + # levels of symbolic links, even if we have only two) + if (symlink("TEST$$","c")) {print "ok 21\n";} else {print "not ok 21\n";} + $foo = `grep perl c 2>&1`; if ($foo) {print "ok 22\n";} else {print "not ok 22\n";} unlink 'c'; + unlink("TEST$$"); } else { print "ok 21\nok 22\n"; |