From 58c0852f6968d0b4520a03e22a56226185ab78c6 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Sun, 23 Feb 1997 16:27:19 +0200 Subject: Digital UNIX and 3_28 Please try this on 3_28 in as many Digital UNIX / DEC OSF/1 boxes you can and report the results back to me. I have already 100% positive make test results from Digital UNIX 4.0 cc static/shared, gcc static/shared Digital UNIX 4.0B cc static/shared, gcc static/shared DEC OSF/1 3.2C cc static/shared, gcc static/shared so you can test some other os / compiler combinations first. p5p-msgid: <199702231427.QAA13807@alpha.hut.fi> --- Configure | 2 +- MANIFEST | 1 + ext/NDBM_File/hints/dec_osf.pl | 2 + ext/ODBM_File/hints/dec_osf.pl | 4 ++ hints/dec_osf.sh | 120 ++++++++++++++++++++++++++++++----------- pdutest | 37 +++++++++++++ 6 files changed, 135 insertions(+), 31 deletions(-) create mode 100644 ext/NDBM_File/hints/dec_osf.pl create mode 100644 pdutest diff --git a/Configure b/Configure index 72c1a39d22..60ed79c6a6 100755 --- a/Configure +++ b/Configure @@ -4718,7 +4718,7 @@ if "$useshrplib"; then freebsd) xxx="-Wl,-R$shrpdir" ;; - linux|irix*) + linux|irix*|dec_osf) xxx="-Wl,-rpath,$shrpdir" ;; *) diff --git a/MANIFEST b/MANIFEST index 7a79d90cd8..29657cbdb0 100644 --- a/MANIFEST +++ b/MANIFEST @@ -120,6 +120,7 @@ ext/IO/lib/IO/Socket.pm IO::Socket extension Perl module ext/NDBM_File/Makefile.PL NDBM extension makefile writer ext/NDBM_File/NDBM_File.pm NDBM extension Perl module ext/NDBM_File/NDBM_File.xs NDBM extension external subroutines +ext/NDBM_File/hints/dec_osf.pl Hint for NDBM_File for named architecture ext/NDBM_File/hints/dynixptx.pl Hint for NDBM_File for named architecture ext/NDBM_File/hints/solaris.pl Hint for NDBM_File for named architecture ext/NDBM_File/hints/svr4.pl Hint for NDBM_File for named architecture diff --git a/ext/NDBM_File/hints/dec_osf.pl b/ext/NDBM_File/hints/dec_osf.pl new file mode 100644 index 0000000000..e96d907e10 --- /dev/null +++ b/ext/NDBM_File/hints/dec_osf.pl @@ -0,0 +1,2 @@ +# Spider Boardman +$self->{LIBS} = ['']; diff --git a/ext/ODBM_File/hints/dec_osf.pl b/ext/ODBM_File/hints/dec_osf.pl index f041bf96c0..febb7cdb21 100644 --- a/ext/ODBM_File/hints/dec_osf.pl +++ b/ext/ODBM_File/hints/dec_osf.pl @@ -3,3 +3,7 @@ # Sat Jan 13 16:29:52 EST 1996 $self->{LDDLFLAGS} = $Config{lddlflags}; $self->{LDDLFLAGS} =~ s/-hidden//; +# As long as we're hinting, note the known location of the dbm routines. +# Spider Boardman +# Fri Feb 21 14:50:31 EST 1997 +$self->{LIBS} = ['-ldbm']; diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh index 6bde1b4514..d50c4c60dc 100644 --- a/hints/dec_osf.sh +++ b/hints/dec_osf.sh @@ -1,9 +1,6 @@ # hints/dec_osf.sh -# -# How to make a DEBUGGING VERSION of perl for DECs cc compiler -# -# If you want to debug perl or want to send a +# * If you want to debug perl or want to send a # stack trace for inclusion into an bug report, call # Configure with the additional argument -Doptimize=-g2 # or uncomment this assignment to "optimize": @@ -13,19 +10,19 @@ # If you want both to optimise and debug with the DEC cc # you must have -g3, e.g. "-O4 -g3", and (re)run Configure. # -# Note 1: gcc can always have both -g and optimisation on. +# * gcc can always have both -g and optimisation on. # -# Note 2: debugging optimised code, no matter what compiler +# * debugging optimised code, no matter what compiler # one is using, can be surprising and confusing because of # the optimisation tricks like code motion, code removal, # loop unrolling, and inlining. The source code and the # executable code simply do not agree any more while in # mid-execution, the optimiser only cares about the results. # -# Note 3: Configure will automatically add the often quoted +# * Configure will automatically add the often quoted # -DDEBUGGING for you if the -g is specified. # -# Note 4: There is even more optimisation available in the new +# * There is even more optimisation available in the new # (GEM) DEC cc: -O5 and -fast. "man cc" will tell more about them. # The jury is still out whether either or neither help for Perl # and how much. Based on very quick testing, -fast boosts @@ -34,7 +31,7 @@ # hand searching things (index, m//, s///), seems to get slower. # Your mileage will vary. # -# Note 5: The -std is needed because the following compiled +# * The -std is needed because the following compiled # without the -std and linked with -lm # # #include @@ -45,6 +42,14 @@ # UNIX 4.0{,a} dump core: Floating point exception in the printf(), # the y has become a signaling NaN. # +# * Compilation warnings like: +# +# "Undefined the ANSI standard macro ..." +# +# can be ignored, at least while compiling the POSIX extension +# and especially if using the sfio (the latter is not a standard +# part of Perl, never mind if it says little to you). +# # If using the DEC compiler we must find out the DEC compiler style: # the style changed between Digital UNIX (aka DEC OSF/1) 3 and @@ -53,8 +58,13 @@ # and it is called GEM. Many of the options we are going to use depend # on the compiler style. -# do NOT, I repeat, *NOT* take away that leading tab +# do NOT, I repeat, *NOT* take away those leading tabs + # reset + _DEC_uname_r= _DEC_cc_style= + # set + _DEC_uname_r=`uname -r` + # _DEC_cc_style set soon below # Configure Black Magic (TM) case "$cc" in @@ -74,6 +84,17 @@ case "$cc" in ;; esac +# be nauseatingly ANSI +case "$cc" in +gcc) ccflags="$ccflags -ansi" + ;; +*) ccflags="$ccflags -std" + ;; +esac + +# for gcc the Configure knows about the -fpic: +# position-independent code for dynamic loading + # we want optimisation case "$optimize" in @@ -84,48 +105,60 @@ case "$optimize" in new) optimize='-O4' ;; old) optimize='-O2 -Olimit 3200' ;; esac + ccflags="$ccflags -D_INTRINSICS" ;; esac ;; esac -# all compilers are ANSI -ccflags="$ccflags -DSTANDARD_C" - -# be nauseatingly ANSI -case "$cc" in -gcc) ccflags="$ccflags -ansi" - ;; -*) ccflags="$ccflags -std" - ;; -esac - # dlopen() is in libc libswanted="`echo $libswanted | sed -e 's/ dl / /'`" -# PW contains nothing useful for perl +# libPW contains nothing useful for perl libswanted="`echo $libswanted | sed -e 's/ PW / /'`" -# bsd contains nothing used by perl that is not already in libc +# libbsd contains nothing used by perl that is not already in libc libswanted="`echo $libswanted | sed -e 's/ bsd / /'`" -# c need not be separately listed +# libc need not be separately listed libswanted="`echo $libswanted | sed -e 's/ c / /'`" -# dbm is already in libc (as is ndbm) -libswanted="`echo $libswanted | sed -e 's/ dbm / /'`" +# ndbm is already in libc +libswanted="`echo $libswanted | sed -e 's/ ndbm / /'`" # the basic lddlflags used always lddlflags='-shared -expect_unresolved "*"' -# Check if it's a CMW version of OSF1, -# if so, do not hide the symbols. -test `uname -s` = "MLS+" || lddlflags="$lddlflags -hidden" +# Fancy compiler suites use optimising linker as well as compiler. +# +case "$_DEC_uname_r" in +*[123].*) # old loader + lddlflags="$lddlflags -O3" + ;; +*) lddlflags="$lddlflags $optimize -msym" + # -msym: If using a sufficiently recent /sbin/loader, + # keep the module symbols with the modules. + ;; +esac +# Yes, the above loses if gcc does not use the system linker. +# If that happens, let me know about it. + -# If debugging (-g) do not strip the objects, otherwise, strip. +# If debugging or (old systems and doing shared) +# then do not strip the lib, otherwise, strip. +# As noted above the -DDEBUGGING is added automagically by Configure if -g. case "$optimize" in *-g*) ;; # left intentionally blank +*) case "$_DEC_uname_r" in + *[123].*) + case "$useshrplib" in + false|undef|'') lddlflags="$lddlflags -s" ;; + esac + ;; *) lddlflags="$lddlflags -s" + ;; + esac + ;; esac # @@ -133,10 +166,37 @@ esac # unset _DEC_cc_style +unset _DEC_uname_r # # History: # +# perl5.003_28: +# +# 22-Feb-1997 Jarkko Hietaniemi +# +# * Restructuring Spider's suggestions. +# +# * Older Digital UNIXes cannot handle -Olimit ... for $lddlflags. +# +# * ld -s cannot be used in older Digital UNIXes when doing shared. +# +# +# 21-Feb-1997 Spider Boardman +# +# * -hidden removed. +# +# * -DSTANDARD_C removed. +# +# * -D_INTRINSICS added. (that -fast does not seem to buy much confirmed) +# +# * odbm not in libc, only ndbm. Therefore dbm back to $libswanted. +# +# * -msym for the newer runtime loaders. +# +# * $optimize also in $lddflags. +# +# # perl5.003_27: # # 18-Feb-1997 Jarkko Hietaniemi diff --git a/pdutest b/pdutest new file mode 100644 index 0000000000..41f967cd4a --- /dev/null +++ b/pdutest @@ -0,0 +1,37 @@ +#!/bin/sh + +# +# test perl compilation with different compilers and library schema +# + +for cc in cc gcc +do + for Duseshrplib in '' '-Duseshrplib' + do + rm -f config.sh *.a *.so *.o */*.o */*/*.o + log=log-$cc$Duseshrplib + rm -f $log + ( + nproc=`sizer -p` + if test -x /p/bin/pmake + then + make="pmake -J$nproc -L$nproc" + else + make="gmake -k -j$nproc;make" + fi + + date + sh Configure -ders -Dcc=$cc $Duseshrplib + date + + LD_LIBRARY_PATH=`pwd` + export LD_LIBRARY_PATH + + date + eval "$make test" + date + ) 2>&1 > $log + done +done + +# eof -- cgit v1.2.1 From b8e6d11c134e93a7795379ceb62b7f950607c667 Mon Sep 17 00:00:00 2001 From: Norbert Pueschel Date: Sat, 22 Feb 1997 18:08:02 +0100 Subject: AmigaOS patches to 5.003_28 Here are some patches for AmigaOS, mainly to switch of unwanted tests. With these patches, perl 5.003_28 passes all tests under AmigaOS. You should check if there are other hint files that need the new dont_use_nlink variable added. p5p-msgid: <77724759@Armageddon.meb.uni-bonn.de> --- README.amiga | 41 ++++++++++++++++++++++------------------- hints/amigaos.sh | 8 ++++++++ t/io/fs.t | 4 ++-- t/lib/anydbm.t | 3 ++- t/lib/db-btree.t | 2 +- t/lib/db-hash.t | 2 +- t/lib/db-recno.t | 2 +- t/lib/gdbm.t | 3 ++- t/lib/ndbm.t | 3 ++- t/lib/odbm.t | 3 ++- t/lib/sdbm.t | 3 ++- t/op/magic.t | 4 ++++ t/op/stat.t | 4 +++- 13 files changed, 52 insertions(+), 30 deletions(-) diff --git a/README.amiga b/README.amiga index 110f9cf696..e4d4071188 100644 --- a/README.amiga +++ b/README.amiga @@ -27,6 +27,7 @@ Contents DESCRIPTION - Prerequisites - Starting Perl programs under AmigaOS + - Shortcomings of Perl under AmigaOS INSTALLATION Accessing documentation - Manpages @@ -94,6 +95,24 @@ of your scripts. Then you can invoke your scripts like under UNIX with necessary, F would be enough, but having full path would make it easier to use your script under *nix.) +=head2 Shortcomings of Perl under AmigaOS + +Perl under AmigaOS lacks some features of perl under UNIX because of +deficiencies in the UNIX-emulation, most notably: + +=over 6 + +=item fork() + +=item some features of the UNIX filesystem regarding link count and file dates + +=item inplace operation (the -i switch) without backup file + +=item umask() works, but the correct permissions are only set when the file is + finally close()d + +=back + =head1 INSTALLATION Change to the installation directory (most probably ADE:), and @@ -199,26 +218,10 @@ Now run make test -Some tests will fail. Here is which, and why: - -=over 8 - -=item F, F, F, F - -Check I operations. Failures result from the inability to -emulate some Unixisms with the standard Amiga filesystem. - -=item F, F, F, F, - F, F, F +Some tests will be skipped because they need the fork() function: -These tests will be skipped because they use the fork() function, which is not -supported under AmigaOS. - -=item F - -The ixemul.library doesn't set the expected values for $0 and $^X. - -=back +F, F, F, F, F, +F, F =head2 Installing the built perl diff --git a/hints/amigaos.sh b/hints/amigaos.sh index 5f10e1144d..28a95c0fcd 100644 --- a/hints/amigaos.sh +++ b/hints/amigaos.sh @@ -52,3 +52,11 @@ optimize='-O2 -fomit-frame-pointer' # Avoid telldir prototype conflict in pp_sys.c (AmigaOS uses const DIR *) # Configure should test for this. Volunteers? pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"' + +# AmigaOS always reports only two links to directories, even if they +# contain subdirectories. Consequently, we use this variable to stop +# File::Find using the link count to determine whether there are +# subdirectories to be searched. This will generate a harmless message: +# Hmm...You had some extra variables I don't know about...I'll try to keep 'em. +# Propagating recommended variable dont_use_nlink +dont_use_nlink='define' diff --git a/t/io/fs.t b/t/io/fs.t index ce4e56bb9e..4d5a4e92f1 100755 --- a/t/io/fs.t +++ b/t/io/fs.t @@ -36,7 +36,7 @@ if (eval {link('b','c')}) {print "ok 3\n";} else {print "not ok 3\n";} if ($Config{dont_use_nlink} || $nlink == 3) {print "ok 4\n";} else {print "not ok 4\n";} -if (($mode & 0777) == 0666) {print "ok 5\n";} else {print "not ok 5\n";} +if (($mode & 0777) == 0666 || $^O eq 'amigaos') {print "ok 5\n";} else {print "not ok 5\n";} if ((chmod 0777,'a') == 1) {print "ok 6\n";} else {print "not ok 6\n";} @@ -70,7 +70,7 @@ if ($foo == 1) {print "ok 16\n";} else {print "not ok 16 $foo\n";} ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat('b'); if ($ino) {print "ok 17\n";} else {print "not ok 17\n";} -if (($atime == 500000000 && $mtime == 500000001) || $wd =~ m#/afs/#) +if (($atime == 500000000 && $mtime == 500000001) || $wd =~ m#/afs/# || $^O eq 'amigaos') {print "ok 18\n";} else {print "not ok 18 $atime $mtime\n";} diff --git a/t/lib/anydbm.t b/t/lib/anydbm.t index 52ab22b13e..832d6a8e9c 100755 --- a/t/lib/anydbm.t +++ b/t/lib/anydbm.t @@ -23,7 +23,8 @@ if (! -e $Dfile) { } ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat($Dfile); -print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ? "ok 2\n" : "not ok 2\n"); +print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos' + ? "ok 2\n" : "not ok 2\n"); while (($key,$value) = each(%h)) { $i++; } diff --git a/t/lib/db-btree.t b/t/lib/db-btree.t index 0e2a7c34eb..10f585304a 100755 --- a/t/lib/db-btree.t +++ b/t/lib/db-btree.t @@ -94,7 +94,7 @@ ok(19, $X = tie(%h, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $DB_BTREE )) ; ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat($Dfile); -ok(20, ($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ); +ok(20, ($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos'); while (($key,$value) = each(%h)) { $i++; diff --git a/t/lib/db-hash.t b/t/lib/db-hash.t index 09c0ee2151..9ebd060e0a 100755 --- a/t/lib/db-hash.t +++ b/t/lib/db-hash.t @@ -72,7 +72,7 @@ ok(15, $X = tie(%h, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) ); ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat($Dfile); -ok(16, ($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ); +ok(16, ($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos'); while (($key,$value) = each(%h)) { $i++; diff --git a/t/lib/db-recno.t b/t/lib/db-recno.t index 045ddd99b0..39bb364ba3 100755 --- a/t/lib/db-recno.t +++ b/t/lib/db-recno.t @@ -93,7 +93,7 @@ my $X ; my @h ; ok(17, $X = tie @h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_RECNO ) ; -ok(18, ( (stat($Dfile))[2] & 0777) == ($^O eq 'os2' ? 0666 : 0640)) ; +ok(18, ( (stat($Dfile))[2] & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos') ; #my $l = @h ; my $l = $X->length ; diff --git a/t/lib/gdbm.t b/t/lib/gdbm.t index 62bb936ff1..6a2d5fa54e 100755 --- a/t/lib/gdbm.t +++ b/t/lib/gdbm.t @@ -26,7 +26,8 @@ if (! -e $Dfile) { } ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat($Dfile); -print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ? "ok 2\n" : "not ok 2\n"); +print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos' + ? "ok 2\n" : "not ok 2\n"); while (($key,$value) = each(%h)) { $i++; } diff --git a/t/lib/ndbm.t b/t/lib/ndbm.t index 8e2ba8164a..48f64fef09 100755 --- a/t/lib/ndbm.t +++ b/t/lib/ndbm.t @@ -29,7 +29,8 @@ if (! -e $Dfile) { } ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat($Dfile); -print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ? "ok 2\n" : "not ok 2\n"); +print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos' + ? "ok 2\n" : "not ok 2\n"); while (($key,$value) = each(%h)) { $i++; } diff --git a/t/lib/odbm.t b/t/lib/odbm.t index 0c530d2238..e83d0f979c 100755 --- a/t/lib/odbm.t +++ b/t/lib/odbm.t @@ -29,7 +29,8 @@ if (! -e $Dfile) { } ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat($Dfile); -print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ? "ok 2\n" : "not ok 2\n"); +print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos' + ? "ok 2\n" : "not ok 2\n"); while (($key,$value) = each(%h)) { $i++; } diff --git a/t/lib/sdbm.t b/t/lib/sdbm.t index 65419f9711..b8e02ec3c6 100755 --- a/t/lib/sdbm.t +++ b/t/lib/sdbm.t @@ -28,7 +28,8 @@ if (! -e $Dfile) { } ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat($Dfile); -print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) ? "ok 2\n" : "not ok 2\n"); +print (($mode & 0777) == ($^O eq 'os2' ? 0666 : 0640) || $^O eq 'amigaos' + ? "ok 2\n" : "not ok 2\n"); while (($key,$value) = each(%h)) { $i++; } diff --git a/t/op/magic.t b/t/op/magic.t index f3e6ba3cc2..e83c9d7fe9 100755 --- a/t/op/magic.t +++ b/t/op/magic.t @@ -109,6 +109,10 @@ if ($^O eq 'os2') { # Started by ksh, which adds suffixes '.exe' and '.' to perl and script $s2 = "\$^X is $wd/perl.exe, \$0 is $script.\n"; } +if ($^O eq 'amigaos') { + chomp($s2 = `pwd`); + $s2 = "\$^X is $script, \$0 is $s2/show-shebang\n"; +} ok 19, open(SCRIPT, ">$script"), $!; ok 20, print(SCRIPT < Date: Mon, 24 Feb 1997 16:07:07 -0500 Subject: Re: ccdlflags don't quite work On Mon, 24 Feb 1997, Matthias Urlichs wrote: > Two problems: > > # How will the perl executable find the installed shared $libperl? > # Add $xxx to ccdlflags. > ... and it does this every time I reconfigure Perl without first saying > "rm config.sh", so the list grows longer and longer and... Ugh. Probably > the best solution is to add a Configure variable which does nothing but > remember if we have added $xxx yet. I think this will fix the problem. p5p-msgid: private-msgid: &4 + *) + # Only add $xxx if it isn't already in ccdlflags. + case "$ccdlflags" in + *${xxx}*) ;; + *) ccdlflags="$ccdlflags $xxx" + cat <&4 Adding $xxx to the flags passed to $ld so that the perl executable will find the installed shared $libperl. EOM + ;; + esac ;; esac fi -- cgit v1.2.1 From 7287d43f85a3731984c0e0ef1f20e1515b4140f2 Mon Sep 17 00:00:00 2001 From: Spider Boardman Date: Mon, 24 Feb 1997 08:42:59 -0500 Subject: 'installperl -v' doesn't do enough "installperl -v" doesn't install enough for even "perl5.00328 -V" to work. It should install the version-dependent portions of the "lib" directory as well as the perl executable. p5p-msgid: <199702241342.IAA25945@Orb.Nashua.NH.US> --- installperl | 78 ++++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 44 insertions(+), 34 deletions(-) diff --git a/installperl b/installperl index d4cb71185a..aaa67733ba 100755 --- a/installperl +++ b/installperl @@ -90,18 +90,16 @@ if ($d_dosuid) { &chmod(04711, "$installbin/sperl$ver$exe_ext"); } -exit 0 if $versiononly; - # Make links to ordinary names if installbin directory isn't current directory. -if (! &samepath($installbin, '.')) { +if (! $versiononly && ! &samepath($installbin, '.')) { &safe_unlink("$installbin/perl$exe_ext", "$installbin/suidperl$exe_ext"); &link("$installbin/perl$ver$exe_ext", "$installbin/perl$exe_ext"); &link("$installbin/sperl$ver$exe_ext", "$installbin/suidperl$exe_ext") if $d_dosuid; } -if (! &samepath($installbin, 'x2p')) { +if (!$versiononly && ! &samepath($installbin, 'x2p')) { &safe_unlink("$installbin/a2p$exe_ext"); &cmd("cp x2p/a2p$exe_ext $installbin/a2p$exe_ext"); &chmod(0755, "$installbin/a2p$exe_ext"); @@ -111,7 +109,7 @@ if (! &samepath($installbin, 'x2p')) { # it can't safely be shared. Place it in $installbin. # Note that Configure doesn't build cppstin if it isn't needed, so # we skip this if cppstdin doesn't exist. -if ((-f cppstdin) && (! &samepath($installbin, '.'))) { +if (! $versiononly && (-f cppstdin) && (! &samepath($installbin, '.'))) { &safe_unlink("$installbin/cppstdin"); &cmd("cp cppstdin $installbin/cppstdin"); &chmod(0755, "$installbin/cppstdin"); @@ -121,21 +119,28 @@ if ((-f cppstdin) && (! &samepath($installbin, '.'))) { mkpath($installscript, 1, 0777); -for (@scripts) { - &cmd("cp $_ $installscript"); - s#.*/##; &chmod(0755, "$installscript/$_"); +if (! $versiononly) { + for (@scripts) { + &cmd("cp $_ $installscript"); + s#.*/##; &chmod(0755, "$installscript/$_"); + } } # pstruct should be a link to c2ph -&safe_unlink("$installscript/pstruct"); -&link("$installscript/c2ph","$installscript/pstruct"); +if (! $versiononly) { + &safe_unlink("$installscript/pstruct"); + &link("$installscript/c2ph","$installscript/pstruct"); +} # Install pod pages. Where? I guess in $installprivlib/pod. -mkpath("${installprivlib}/pod", 1, 0777); -foreach $file (@pods) { - # $file is a name like pod/perl.pod - cp_if_diff($file, "${installprivlib}/${file}"); + +if (! $versiononly && !($installprivlib =~ m/\Q$]/)) { + mkpath("${installprivlib}/pod", 1, 0777); + foreach $file (@pods) { + # $file is a name like pod/perl.pod + cp_if_diff($file, "${installprivlib}/${file}"); + } } # Install library files. @@ -150,6 +155,7 @@ mkpath($installsitearch, 1, 0777) if ($installsitearch); if (chdir "lib") { $do_installarchlib = ! &samepath($installarchlib, '.'); $do_installprivlib = ! &samepath($installprivlib, '.'); + $do_installprivlib = 0 if $versiononly && !($installprivlib =~ m/\Q$]/); if ($do_installarchlib || $do_installprivlib) { find(\&installlib, '.'); @@ -179,7 +185,7 @@ foreach $file (@corefiles) { $mainperl_is_instperl = 0; -if (!$nonono && -t STDIN && -t STDERR +if (!$versiononly && !$nonono && -t STDIN && -t STDERR && -w $mainperldir && ! &samepath($mainperldir, $installbin)) { local($usrbinperl) = "$mainperldir/perl$exe_ext"; local($instperl) = "$installbin/perl$exe_ext"; @@ -216,26 +222,30 @@ if (!$nonono && -t STDIN && -t STDERR # Also skip $mainperl if the user opted to have it be a link to the # installed perl. -$dirsep = ($^O eq 'os2') ? ';' : ':' ; -($path = $ENV{"PATH"}) =~ s:\\:/:g ; -@path = split(/$dirsep/, $path); -@otherperls = (); -for (@path) { - next unless m,^/,; - next if ($_ eq $binexp); - # Use &samepath here because some systems have other dirs linked - # to $mainperldir (like SunOS) - next if ($mainperl_is_instperl && &samepath($_, $mainperldir)); - push(@otherperls, "$_/perl$exe_ext") - if (-x "$_/perl$exe_ext" && ! -d "$_/perl$exe_ext"); -} -if (@otherperls) { - print STDERR "\nWarning: perl appears in your path in the following " . - "locations beyond where\nwe just installed it:\n"; - for (@otherperls) { - print STDERR " ", $_, "\n"; +if (!$versiononly) { + + $dirsep = ($^O eq 'os2') ? ';' : ':' ; + ($path = $ENV{"PATH"}) =~ s:\\:/:g ; + @path = split(/$dirsep/, $path); + @otherperls = (); + for (@path) { + next unless m,^/,; + next if ($_ eq $binexp); + # Use &samepath here because some systems have other dirs linked + # to $mainperldir (like SunOS) + next if ($mainperl_is_instperl && &samepath($_, $mainperldir)); + push(@otherperls, "$_/perl$exe_ext") + if (-x "$_/perl$exe_ext" && ! -d "$_/perl$exe_ext"); + } + if (@otherperls) { + print STDERR "\nWarning: perl appears in your path in the following " . + "locations beyond where\nwe just installed it:\n"; + for (@otherperls) { + print STDERR " ", $_, "\n"; + } + print STDERR "\n"; } - print STDERR "\n"; + } print STDERR " Installation complete\n"; -- cgit v1.2.1 From ec2a3d87ba26a9586ad981051a949403027c147a Mon Sep 17 00:00:00 2001 From: Spider Boardman Date: Mon, 24 Feb 1997 09:12:11 -0500 Subject: installperl breaks running system (for a while) "installperl" causes scripts with "/usr/bin/perl" or equivalent to fail during the process of installation, which can take a while with slow disks and/or slow CPUs. It should install the libraries and such *before* linking "$installbin/perl" to the version-dependent executable. p5p-msgid: <199702241412.JAA11829@Orb.Nashua.NH.US> --- installperl | 108 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/installperl b/installperl index aaa67733ba..1267f49efc 100755 --- a/installperl +++ b/installperl @@ -90,59 +90,6 @@ if ($d_dosuid) { &chmod(04711, "$installbin/sperl$ver$exe_ext"); } -# Make links to ordinary names if installbin directory isn't current directory. - -if (! $versiononly && ! &samepath($installbin, '.')) { - &safe_unlink("$installbin/perl$exe_ext", "$installbin/suidperl$exe_ext"); - &link("$installbin/perl$ver$exe_ext", "$installbin/perl$exe_ext"); - &link("$installbin/sperl$ver$exe_ext", "$installbin/suidperl$exe_ext") - if $d_dosuid; -} - -if (!$versiononly && ! &samepath($installbin, 'x2p')) { - &safe_unlink("$installbin/a2p$exe_ext"); - &cmd("cp x2p/a2p$exe_ext $installbin/a2p$exe_ext"); - &chmod(0755, "$installbin/a2p$exe_ext"); -} - -# cppstdin is just a script, but it is architecture-dependent, so -# it can't safely be shared. Place it in $installbin. -# Note that Configure doesn't build cppstin if it isn't needed, so -# we skip this if cppstdin doesn't exist. -if (! $versiononly && (-f cppstdin) && (! &samepath($installbin, '.'))) { - &safe_unlink("$installbin/cppstdin"); - &cmd("cp cppstdin $installbin/cppstdin"); - &chmod(0755, "$installbin/cppstdin"); -} - -# Install scripts. - -mkpath($installscript, 1, 0777); - -if (! $versiononly) { - for (@scripts) { - &cmd("cp $_ $installscript"); - s#.*/##; &chmod(0755, "$installscript/$_"); - } -} - -# pstruct should be a link to c2ph - -if (! $versiononly) { - &safe_unlink("$installscript/pstruct"); - &link("$installscript/c2ph","$installscript/pstruct"); -} - -# Install pod pages. Where? I guess in $installprivlib/pod. - -if (! $versiononly && !($installprivlib =~ m/\Q$]/)) { - mkpath("${installprivlib}/pod", 1, 0777); - foreach $file (@pods) { - # $file is a name like pod/perl.pod - cp_if_diff($file, "${installprivlib}/${file}"); - } -} - # Install library files. $do_installarchlib = $do_installprivlib = 0; @@ -216,6 +163,59 @@ if (!$versiononly && !$nonono && -t STDIN && -t STDERR } } +# Make links to ordinary names if installbin directory isn't current directory. + +if (! $versiononly && ! &samepath($installbin, '.')) { + &safe_unlink("$installbin/perl$exe_ext", "$installbin/suidperl$exe_ext"); + &link("$installbin/perl$ver$exe_ext", "$installbin/perl$exe_ext"); + &link("$installbin/sperl$ver$exe_ext", "$installbin/suidperl$exe_ext") + if $d_dosuid; +} + +if (!$versiononly && ! &samepath($installbin, 'x2p')) { + &safe_unlink("$installbin/a2p$exe_ext"); + &cmd("cp x2p/a2p$exe_ext $installbin/a2p$exe_ext"); + &chmod(0755, "$installbin/a2p$exe_ext"); +} + +# cppstdin is just a script, but it is architecture-dependent, so +# it can't safely be shared. Place it in $installbin. +# Note that Configure doesn't build cppstin if it isn't needed, so +# we skip this if cppstdin doesn't exist. +if (! $versiononly && (-f cppstdin) && (! &samepath($installbin, '.'))) { + &safe_unlink("$installbin/cppstdin"); + &cmd("cp cppstdin $installbin/cppstdin"); + &chmod(0755, "$installbin/cppstdin"); +} + +# Install scripts. + +mkpath($installscript, 1, 0777); + +if (! $versiononly) { + for (@scripts) { + &cmd("cp $_ $installscript"); + s#.*/##; &chmod(0755, "$installscript/$_"); + } +} + +# pstruct should be a link to c2ph + +if (! $versiononly) { + &safe_unlink("$installscript/pstruct"); + &link("$installscript/c2ph","$installscript/pstruct"); +} + +# Install pod pages. Where? I guess in $installprivlib/pod. + +if (! $versiononly && !($installprivlib =~ m/\Q$]/)) { + mkpath("${installprivlib}/pod", 1, 0777); + foreach $file (@pods) { + # $file is a name like pod/perl.pod + cp_if_diff($file, "${installprivlib}/${file}"); + } +} + # Check to make sure there aren't other perls around in installer's # path. This is probably UNIX-specific. Check all absolute directories # in the path except for where public executables are supposed to live. @@ -230,9 +230,9 @@ if (!$versiononly) { @otherperls = (); for (@path) { next unless m,^/,; - next if ($_ eq $binexp); # Use &samepath here because some systems have other dirs linked # to $mainperldir (like SunOS) + next if &samepath($_, $binexp); next if ($mainperl_is_instperl && &samepath($_, $mainperldir)); push(@otherperls, "$_/perl$exe_ext") if (-x "$_/perl$exe_ext" && ! -d "$_/perl$exe_ext"); -- cgit v1.2.1