From: Jarkko Hietaniemi Date: Thu, 21 Dec 2000 15:47:26 +0000 (+0000) Subject: Robustness support for #8218 (symlink forest) since the GNU X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4ba7095c8b1e78642662b76b43ac3fa8cbda5537;p=p5sagit%2Fp5-mst-13.2.git Robustness support for #8218 (symlink forest) since the GNU tools seem to be overly picky about symlinkage depths. p4raw-id: //depot/perl@8220 --- diff --git a/Makefile.SH b/Makefile.SH index f9ae6b7..5c54335 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 diff --git a/t/io/fs.t b/t/io/fs.t index 7182c24..b401450 100755 --- a/t/io/fs.t +++ b/t/io/fs.t @@ -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";