This patch backs out the installscripts option from changes 7146 and 7147
and replaces that by a Configure versiononly option.

Why?  Two reasons.  First and foremost, the 'installscripts' approach was
mostly duplicating the existing versiononly functionality in installperl
(though that functionality wasn't documented).  Second, the name was
slightly misleading:  We do want to install scripts such as xsubpp that
are installed into version-specific directories, but we don't want to
install binaries such as a2p that don't have a version number attached to
them.

All that was really missing was the Configure hook to get installperl to 
operate in versiononly mode.

This patch changes the installscripts hook to 'versiononly', and it now
maps exactly onto installperl's versiononly variable.

-- 
    Andy Dougherty              [EMAIL PROTECTED]
    Dept. of Physics
    Lafayette College, Easton PA 18042

diff -r -u perl-p4/Configure perl-versiononly/Configure
--- perl-p4/Configure   Tue Oct 10 09:15:06 2000
+++ perl-versiononly/Configure  Tue Oct 10 16:20:39 2000
@@ -709,7 +709,7 @@
 inc_version_list_init=''
 installprefix=''
 installprefixexp=''
-installscripts=''
+versiononly=''
 installstyle=''
 installusrbinperl=''
 intsize=''
@@ -6271,26 +6271,6 @@
 esac
 $rm -f getverlist
 
-: determine whether to install the scripts
-
-echo " "
-$cat <<EOM
-Do you want to install the various scripts accompanying Perl?
-Usually you do want this.
-EOM
-case "$installscripts" in
-"$undef"|[nN]*)        dflt='n';;
-*)             dflt='y';;
-esac
-rp="Do you want to install the scripts?"
-. ./myread
-case "$ans" in
-[yY]*) val="$define";;
-*)     val="$undef" ;;
-esac
-set installscripts
-eval $setvar
-
 : determine whether to install perl also as /usr/bin/perl
 
 echo " "
@@ -7464,6 +7444,25 @@
        installvendorbin="$vendorbinexp"
 fi
 
+: determine whether to only install version-specific parts.
+echo " "
+$cat <<EOM
+Do you want to install only the version-specific parts of the perl
+distribution?  Usually you do *not* want to do this.
+EOM
+case "$versiononly" in
+"$define"|[Yy]*|true) dflt='y' ;;
+*) dflt='n';
+esac
+rp="Do you want to install only the version-specific parts of perl?"
+. ./myread
+case "$ans" in
+[yY]*) val="$define";;
+*)     val="$undef" ;;
+esac
+set versiononly
+eval $setvar
+
 : see if qgcvt exists
 set qgcvt d_qgcvt
 eval $inlibc
@@ -15767,7 +15766,6 @@
 installprefixexp='$installprefixexp'
 installprivlib='$installprivlib'
 installscript='$installscript'
-installscripts='$installscripts'
 installsitearch='$installsitearch'
 installsitebin='$installsitebin'
 installsitelib='$installsitelib'
@@ -16032,6 +16030,7 @@
 vendorprefix='$vendorprefix'
 vendorprefixexp='$vendorprefixexp'
 version='$version'
+versiononly='$versiononly'
 vi='$vi'
 voidflags='$voidflags'
 xlibpth='$xlibpth'
Only in perl-versiononly: Configure~
diff -r -u perl-p4/INSTALL perl-versiononly/INSTALL
--- perl-p4/INSTALL     Thu Oct  5 14:12:54 2000
+++ perl-versiononly/INSTALL    Tue Oct 10 16:20:39 2000
@@ -85,7 +85,7 @@
 with:
 
        perl Makefile.PL POLLUTE=1
-       
+
 Alternatively, you can enable CPP symbol pollution wholesale by
 building perl itself with:
 
@@ -1838,10 +1838,10 @@
                        will be a link to perl.
        suidperl,
            sperl5.nnn  If you requested setuid emulation.
+       a2p             awk-to-perl translator
 
     scripts
 
-       a2p             awk-to-perl translator
        cppstdin        This is used by perl -P, if your cc -E can't
                        read from stdin.
        c2ph, pstruct   Scripts for handling C structures in header files.
@@ -1882,16 +1882,22 @@
 optional Perl compiler, or embed the perl interpreter into another
 program even if the Perl source is no longer available.
 
-Sometimes you do no want to install the scripts.  This may be the case
-for example when installing a newer version of perl alongside an
-already installed production version of perl without disabling
-installation of new modules for the production version.  To not to
-install the scripts run
-
-       Configure -Uinstallscripts
-
-(note the plural 'scripts') or by answering 'no' to the appropriate
-Configure prompt.
+Sometimes you only want to install the version-specific parts of the perl
+installation.  For example, you may wish to install a newer version of
+perl alongside an already installed production version of perl without
+disabling installation of new modules for the production version.
+To only install the version-specific parts of the perl installation, run
+
+       Configure -Dversiononly
+
+or answer 'y' to the appropriate Configure prompt.  Alternatively,
+you can just manually run
+
+       ./perl installperl -v
+
+and skip installman altogether.
+See also L<"Maintaining completely separate versions"> for another
+approach.
 
 =head1 Coexistence with earlier versions of perl5
 
diff -r -u perl-p4/Makefile.SH perl-versiononly/Makefile.SH
--- perl-p4/Makefile.SH Thu Oct  5 14:13:06 2000
+++ perl-versiononly/Makefile.SH        Tue Oct 10 16:20:39 2000
@@ -204,12 +204,12 @@
 # how to tr(anslate) newlines
 TRNL = '$trnl'
 
+!GROK!THIS!
 # not used by Makefile but by installperl;
 # mentioned here so that metaconfig picks these up
-INSTALL_USR_BIN_PERL = $installusrbinperl
-INSTALL_SCRIPTS = $installscripts
+# $installusrbinperl
+# $versiononly
 
-!GROK!THIS!
 
 ## In the following dollars and backticks do not need the extra backslash.
 $spitshell >>Makefile <<'!NO!SUBS!'
diff -r -u perl-p4/Porting/Glossary perl-versiononly/Porting/Glossary
--- perl-p4/Porting/Glossary    Thu Oct  5 14:13:22 2000
+++ perl-versiononly/Porting/Glossary   Tue Oct 10 16:20:39 2000
@@ -2351,10 +2351,6 @@
        a system running AFS, in which case they may differ slightly. You
        should always use this variable within your makefiles for portability.
 
-installscripts (installscripts.U):
-       This variable tells whether the various scripts accompanying
-       Perl should be installed.    Usually this is the case.
-
 installsitearch (sitearch.U):
        This variable is really the same as sitearchexp but may differ on
        those systems using AFS. For extra portability, only this variable
@@ -3689,6 +3685,18 @@
        full version number, including any possible subversions.
        This is suitable for use as a directory name, and hence is
        filesystem dependent.
+
+versiononly (versiononly.U):
+       If set, this symbol indicates that only the version-specific
+       components of a perl installation should be installed.
+       This may be useful for making a test installation of a new
+       version without disturbing the existing installation.
+       Setting versiononly is equivalent to setting installperl's -v option.
+       In particular, the non-versioned scripts and programs such as
+       a2p, c2ph, h2xs, pod2*, and perldoc are not installed
+       (see INSTALL for a more complete list).  Nor are the man
+       pages installed.
+       Usually, this is undef.
 
 vi (Loc.U):
        This variable is defined but not used by Configure.
Only in perl-versiononly/Porting: Glossary~
diff -r -u perl-p4/Porting/config.sh perl-versiononly/Porting/config.sh
--- perl-p4/Porting/config.sh   Thu Oct  5 14:13:22 2000
+++ perl-versiononly/Porting/config.sh  Tue Oct 10 16:21:34 2000
@@ -530,7 +530,6 @@
 installprefixexp='/opt/perl'
 installprivlib='/opt/perl/lib/5.7.0'
 installscript='/opt/perl/bin'
-installscripts='define'
 installsitearch='/opt/perl/lib/site_perl/5.7.0/alpha-dec_osf-thread'
 installsitebin='/opt/perl/bin'
 installsitelib='/opt/perl/lib/site_perl/5.7.0'
@@ -795,6 +794,7 @@
 vendorprefix=''
 vendorprefixexp=''
 version='5.7.0'
+versiononly='undef'
 vi=''
 voidflags='15'
 xlibpth='/usr/lib/386 /lib/386'
Only in perl-versiononly/Porting: config.sh~
Only in perl-versiononly/Porting: config_H~
diff -r -u perl-p4/epoc/config.sh perl-versiononly/epoc/config.sh
--- perl-p4/epoc/config.sh      Thu Oct  5 14:14:40 2000
+++ perl-versiononly/epoc/config.sh     Tue Oct 10 16:20:40 2000
@@ -494,7 +494,6 @@
 installscript='/home/of/PERL/bin/'
 installsitearch='/home/of/PERL/site/lib/site_perl/5.6.0/epoc'
 installsitelib='/home/of/PERL/perl/lib/site_perl/5.6.0'
-installscripts='define'
 installstyle=''
 installusrbinperl='undef'
 installvendorlib=''
@@ -706,6 +705,7 @@
 vendorprefix=''
 vendorprefixexp=''
 version='5.7.0'
+versiononly='undef'
 vi=''
 voidflags='15'
 xlibpth=''
diff -r -u perl-p4/installman perl-versiononly/installman
--- perl-p4/installman  Thu Oct  5 14:19:04 2000
+++ perl-versiononly/installman Tue Oct 10 16:20:40 2000
@@ -52,6 +52,12 @@
 $opts{notify} ||= $opts{n};
 $opts{verbose} ||= $opts{V} || $opts{notify};
 
+if ($Config{versiononly}) {
+    print "Skipping man page installation since you asked only for\n",
+         "the version-specific parts of perl to be installed.\n";
+    exit 0;
+}
+
 #Sanity checks
 
 -x  "./perl$Config{exe_ext}" 
diff -r -u perl-p4/installperl perl-versiononly/installperl
--- perl-p4/installperl Thu Oct  5 14:19:08 2000
+++ perl-versiononly/installperl        Tue Oct 10 16:20:40 2000
@@ -60,6 +60,8 @@
     shift;
 }
 
+$versiononly = 1 if $Config{versiononly};
+
 my @scripts = qw(utils/c2ph utils/h2ph utils/h2xs utils/perlbug utils/perldoc
                utils/pl2pm utils/splain utils/perlcc utils/dprofpp
                x2p/s2p x2p/find2perl 
@@ -364,30 +366,25 @@
     chmod(0755, "$installbin/cppstdin");
 }
 
-if ($Config{installscripts} eq 'define') {
+if (! $versiononly) {
     # Install scripts.
 
     mkpath($installscript, $verbose, 0777);
 
-    if (! $versiononly) {
-       for (@scripts) {
-           (my $base = $_) =~ s#.*/##;
-           copy($_, "$installscript/$base");
-           chmod(0755, "$installscript/$base");
-       }
+    for (@scripts) {
+       (my $base = $_) =~ s#.*/##;
+       copy($_, "$installscript/$base");
+       chmod(0755, "$installscript/$base");
     }
 
     # pstruct should be a link to c2ph
-    
-    if (! $versiononly) {
-       safe_unlink("$installscript/pstruct$scr_ext");
-       if ($^O eq 'dos' or $Is_VMS or $^O eq 'transit') {
-           copy("$installscript/c2ph$scr_ext",
-                "$installscript/pstruct$scr_ext"); 
-       } else {
-           link("$installscript/c2ph$scr_ext",
-                "$installscript/pstruct$scr_ext");
-       }
+    safe_unlink("$installscript/pstruct$scr_ext");
+    if ($^O eq 'dos' or $Is_VMS or $^O eq 'transit') {
+       copy("$installscript/c2ph$scr_ext",
+            "$installscript/pstruct$scr_ext"); 
+    } else {
+       link("$installscript/c2ph$scr_ext",
+            "$installscript/pstruct$scr_ext");
     }
 }
 
@@ -395,7 +392,7 @@
 # ($installprivlib/pods for cygwin).
 
 my $pod = $Is_Cygwin ? 'pods' : 'pod';
-unless ( $versiononly && !($installprivlib =~ m/\Q$ver/)) {
+if ( !$versiononly || ($installprivlib =~ m/\Q$ver/)) {
     mkpath("${installprivlib}/$pod", $verbose, 0777);
 
     # If Perl 5.003's perldiag.pod is there, rename it.
diff -r -u perl-p4/pod/perltoc.pod perl-versiononly/pod/perltoc.pod
--- perl-p4/pod/perltoc.pod     Thu Oct  5 14:22:22 2000
+++ perl-versiononly/pod/perltoc.pod    Tue Oct 10 16:20:40 2000
@@ -7999,7 +7999,7 @@
 C<inc_version_list>, C<inc_version_list_init>, C<incpath>, C<inews>,
 C<installarchlib>, C<installbin>, C<installman1dir>, C<installman3dir>,
 C<installprefix>, C<installprefixexp>, C<installprivlib>, C<installscript>,
-C<installscripts>, C<installsitearch>, C<installsitebin>,
+C<installsitearch>, C<installsitebin>,
 C<installsitelib>, C<installstyle>, C<installusrbinperl>,
 C<installvendorarch>, C<installvendorbin>, C<installvendorlib>, C<intsize>,
 C<ivdformat>, C<ivsize>, C<ivtype>
@@ -8099,7 +8099,7 @@
 
 C<vendorarch>, C<vendorarchexp>, C<vendorbin>, C<vendorbinexp>,
 C<vendorlib>, C<vendorlib_stem>, C<vendorlibexp>, C<vendorprefix>,
-C<vendorprefixexp>, C<version>, C<vi>, C<voidflags>
+C<vendorprefixexp>, C<version>, C<versiononly>, C<vi>, C<voidflags>
 
 =item x
 
diff -r -u perl-p4/uconfig.sh perl-versiononly/uconfig.sh
--- perl-p4/uconfig.sh  Thu Oct  5 14:25:23 2000
+++ perl-versiononly/uconfig.sh Tue Oct 10 16:20:40 2000
@@ -406,7 +406,6 @@
 i_varhdr='stdarg.h'
 i_vfork='undef'
 ignore_versioned_solibs='y'
-installscripts='undef'
 installstyle='lib/perl5'
 installusrbinperl='undef'
 intsize='4'
@@ -530,6 +529,7 @@
 uvtype='unsigned long'
 uvuformat='"lu"'
 uvxformat='"lx"'
+versiononly='undef'
 voidflags=1
 xs_apiversion='5.005'
 d_getfsstat='undef'
diff -r -u perl-p4/vos/config.def perl-versiononly/vos/config.def
--- perl-p4/vos/config.def      Thu Oct  5 14:26:24 2000
+++ perl-versiononly/vos/config.def     Tue Oct 10 16:20:40 2000
@@ -379,7 +379,6 @@
 $i_vfork='undef'
 $Id='$Id'
 $inc_version_list_init='0'
-$installscripts='define'
 $installusrbinperl='undef'
 $intsize='4'
 $ivdformat='"d"'
@@ -483,5 +482,6 @@
 $vendorarchexp=''
 $vendorlib_stem=''
 $vendorlibexp=''
+$versiononly='undef'
 $voidflags='15'
 $xs_apiversion='5.00563'
diff -r -u perl-p4/win32/config.bc perl-versiononly/win32/config.bc
--- perl-p4/win32/config.bc     Thu Oct  5 14:26:26 2000
+++ perl-versiononly/win32/config.bc    Tue Oct 10 16:20:40 2000
@@ -513,7 +513,6 @@
 installhtmlhelpdir='~INST_TOP~~INST_VER~\htmlhelp'
 installprivlib='~INST_TOP~~INST_VER~\lib'
 installscript='~INST_TOP~~INST_VER~\bin'
-installscripts='define'
 installsitearch='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~'
 installsitebin='~INST_TOP~~INST_VER~\bin~INST_ARCH~'
 installsitelib='~INST_TOP~\site~INST_VER~\lib'
@@ -770,6 +769,7 @@
 vendorprefix=''
 vendorprefixexp=''
 version='~VERSION~'
+versiononly='undef'
 vi=''
 voidflags='15'
 xlibpth='/usr/lib/386 /lib/386'
diff -r -u perl-p4/win32/config.gc perl-versiononly/win32/config.gc
--- perl-p4/win32/config.gc     Thu Oct  5 14:26:29 2000
+++ perl-versiononly/win32/config.gc    Tue Oct 10 16:20:40 2000
@@ -513,7 +513,6 @@
 installhtmlhelpdir='~INST_TOP~~INST_VER~\htmlhelp'
 installprivlib='~INST_TOP~~INST_VER~\lib'
 installscript='~INST_TOP~~INST_VER~\bin'
-installscripts='define'
 installsitearch='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~'
 installsitebin='~INST_TOP~~INST_VER~\bin~INST_ARCH~'
 installsitelib='~INST_TOP~\site~INST_VER~\lib'
@@ -770,6 +769,7 @@
 vendorprefix=''
 vendorprefixexp=''
 version='~VERSION~'
+versiononly='undef'
 vi=''
 voidflags='15'
 xlibpth='/usr/lib/386 /lib/386'
diff -r -u perl-p4/win32/config.vc perl-versiononly/win32/config.vc
--- perl-p4/win32/config.vc     Thu Oct  5 14:26:30 2000
+++ perl-versiononly/win32/config.vc    Tue Oct 10 16:20:40 2000
@@ -513,7 +513,6 @@
 installhtmlhelpdir='~INST_TOP~~INST_VER~\htmlhelp'
 installprivlib='~INST_TOP~~INST_VER~\lib'
 installscript='~INST_TOP~~INST_VER~\bin'
-installscripts='define'
 installsitearch='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~'
 installsitebin='~INST_TOP~~INST_VER~\bin~INST_ARCH~'
 installsitelib='~INST_TOP~\site~INST_VER~\lib'
@@ -770,6 +769,7 @@
 vendorprefix=''
 vendorprefixexp=''
 version='~VERSION~'
+versiononly='undef'
 vi=''
 voidflags='15'
 xlibpth='/usr/lib/386 /lib/386'


Reply via email to