summaryrefslogtreecommitdiff
path: root/installperl
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1996-07-05 04:40:23 +0000
committerCharles Bailey <bailey@genetics.upenn.edu>1996-07-05 04:40:23 +0000
commit340f689c41694bab56df5a2a3520c89fb672771d (patch)
tree287f1ce6f22c281eefac61b7ab1dd49628ff4777 /installperl
parentbf6bd8876f5c82478753ddc8ce036db60ddde40e (diff)
downloadperl-340f689c41694bab56df5a2a3520c89fb672771d.tar.gz
perl 5.003_01: installperl
Put cppstdin in architecture-dependent directory Make sure file permissions are set correctly on CORE headers and libperl
Diffstat (limited to 'installperl')
-rwxr-xr-xinstallperl34
1 files changed, 20 insertions, 14 deletions
diff --git a/installperl b/installperl
index bf8e6927ea..b79ca58483 100755
--- a/installperl
+++ b/installperl
@@ -16,8 +16,7 @@ while (@ARGV) {
umask 022;
-@scripts = qw(cppstdin
- utils/c2ph utils/h2ph utils/h2xs utils/pstruct
+@scripts = qw( utils/c2ph utils/h2ph utils/h2xs utils/pstruct
utils/perlbug utils/perldoc
x2p/s2p x2p/find2perl
pod/pod2man pod/pod2html pod/pod2latex pod/pod2text);
@@ -109,15 +108,23 @@ if (! &samepath($installbin, 'x2p')) {
&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 ((-f cppstdin) && (! &samepath($installbin, '.'))) {
+ &safe_unlink("$installbin/cppstdin");
+ &cmd("cp cppstdin $installbin/cppstdin");
+ &chmod(0755, "$installbin/cppstdin");
+}
+
# Install scripts.
mkpath($installscript, 1, 0777);
for (@scripts) {
- if (-f $_) { # cppstdin might not exist on this system.
- &cmd("cp $_ $installscript");
- s#.*/##; &chmod(0755, "$installscript/$_");
- }
+ &cmd("cp $_ $installscript");
+ s#.*/##; &chmod(0755, "$installscript/$_");
}
# Install pod pages. Where? I guess in $installprivlib/pod.
@@ -175,16 +182,15 @@ else {
# Install header files and libraries.
mkpath("$installarchlib/CORE", 1, 0777);
-foreach $file (<*.h libperl*.*>) {
- cp_if_diff($file,"$installarchlib/CORE/$file");
- &chmod(0444,"$installarchlib/CORE/$file");
-}
+@corefiles = <*.h libperl*.*>;
# AIX needs perl.exp installed as well.
-cp_if_diff("perl.exp" ,"$installarchlib/CORE/perl.exp") if ($^O eq 'aix');
-
+push(@corefiles,'perl.exp') if $^O eq 'aix';
# If they have built sperl.o...
-cp_if_diff("sperl.o" ,"$installarchlib/CORE/sperl.o") if (-f 'sperl.o');
-
+push(@corefiles,'sperl.o') if -f 'sperl.o';
+foreach $file (@corefiles) {
+ cp_if_diff($file,"$installarchlib/CORE/$file");
+ &chmod($file =~ /^libperl/ ? 0555 : 0444,"$installarchlib/CORE/$file");
+}
# Offer to install perl in a "standard" location