develooper Front page | perl.perl5.porters | Postings from September 2000

[PATCH] Updated Man5 and Man8 in Configure et al

Thread Next
From:
Howard Owen
Date:
September 14, 2000 09:54
Subject:
[PATCH] Updated Man5 and Man8 in Configure et al
Message ID:
39C1048B.DE6F384A@egbok.com

Some kind souls pointed out misspellings in the first version
of this patch. The typos are corrected here.


diff -ru perl-5.7.0.orig/Configure perl-5.7.0/Configure
--- perl-5.7.0.orig/Configure   Sat Sep  2 08:40:39 2000
+++ perl-5.7.0/Configure        Sun Sep 10 01:38:15 2000
@@ -761,6 +761,14 @@
 man3dir=''
 man3direxp=''
 man3ext=''
+installman5dir=''
+man5dir=''
+man5direxp=''
+man5ext=''
+installman8dir=''
+man8dir=''
+man8direxp=''
+man8ext=''
 huge=''
 large=''
 medium=''
@@ -6948,7 +6956,7 @@
 eval $prefixit
 $cat <<EOM
 
-$spackage has manual pages available in source form.
+$spackage has user program manual pages available in source form.
 EOM
 case "$nroff" in
 nroff)
@@ -6978,7 +6986,7 @@
 esac
 echo " "
 fn=dn+~
-rp="Where do the main $spackage manual pages (source) go?"
+rp="Where do the $spackage user program manual pages (source) go?"
 . ./getfile
 if $test "X$man1direxp" != "X$ansexp"; then
        installman1dir=''
@@ -7004,7 +7012,7 @@
        man1ext='0'
        ;;
 *)
-       rp="What suffix should be used for the main $spackage man pages?"
+       rp="What suffix should be used for the $spackage user program man pages?"
        case "$man1ext" in
        '')     case "$man1dir" in
                *1)  dflt=1 ;;
@@ -7055,7 +7063,7 @@
 eval $prefixit
 $cat <<EOM
 
-$spackage has manual pages for many of the library modules.
+$spackage has manual pages for many of its library modules.
 EOM
 
 case "$nroff" in
@@ -7151,6 +7159,208 @@
        ;;
 esac
 
+: determine where file format manual pages go
+set man5dir man5dir none
+eval $prefixit
+$cat <<EOM
+
+$spackage modules sometimes have manual pages that describe file formats
+EOM
+
+case "$nroff" in
+nroff)
+       $cat <<'EOM'
+However, you don't have nroff, so they're probably useless to you.
+EOM
+       case "$man5dir" in
+       '') man5dir="none";;
+       esac;;
+esac
+
+case "$d_flexfnam" in
+undef)
+       $cat <<'EOM'
+However, your system can't handle the long file names like File::Basename.3. 
+EOM
+       case "$man5dir" in
+       '') man5dir="none";;
+       esac;;
+esac
+
+echo "If you don't want the manual sources installed, answer 'none'."
+prog=`echo $package | $sed 's/-*[0-9.]*$//'`
+case "$man5dir" in
+'')    dflt=`echo "$man1dir" | $sed -e 's/man1/man5/g' -e 's/man\.1/man\.5/g'`
+       if $test -d "$privlib/man/man1"; then
+               cat <<EOM >&4
+
+WARNING:  Previous versions of perl installed man5 pages into
+$privlib/man/man1.  This version will suggest a 
+new default of $dflt.  
+EOM
+               tdflt=$dflt
+               dflt='n'
+               rp='Do you wish to preserve the old behavior?(y/n)'
+               . ./myread
+               case "$ans" in
+               y*) dflt="$privlib/man/man1" ;;
+               *)  dflt=$tdflt ;;
+               esac
+    fi
+       ;;
+*)     dflt="$man5dir" ;;
+esac
+case "$dflt" in
+' ') dflt=none ;;
+esac
+echo " "
+fn=dn+~
+rp="Where do the $package file format man pages (source) go?"
+. ./getfile
+man5dir="$ans"
+man5direxp="$ansexp"
+case "$man5dir" in
+'')    man5dir=' '
+       installman5dir='';;
+esac
+
+: Change installation prefix, if necessary.
+if $test X"$prefix" != X"$installprefix"; then
+       installman5dir=`echo $man5direxp | $sed "s#^$prefix#$installprefix#"`
+else
+       installman5dir="$man5direxp"
+fi
+
+: What suffix to use on installed man pages
+case "$man5dir" in
+' ')
+       man5ext='0'
+       ;;
+*)
+       rp="What suffix should be used for the $package file format man pages?"
+       case "$man5ext" in
+       '')     case "$man5dir" in
+               *5)  dflt=5 ;;
+               *4) dflt=4 ;;
+               *4pm) dflt=4pm ;;
+               *l) dflt=l;;
+               *n) dflt=n;;
+               *o) dflt=o;;
+               *p) dflt=p;;
+               *C) dflt=C;;
+               *L) dflt=L;;
+               *L3) dflt=L3;;
+               *) dflt=5;;
+               esac
+               ;;
+       *)      dflt="$man5ext";;
+       esac
+       . ./myread
+       man5ext="$ans"
+       ;;
+esac
+
+: determine where system management  module manual pages go
+set man8dir man8dir none
+eval $prefixit
+$cat <<EOM
+
+$spackage programs sometimes have manual pages relating to system management
+EOM
+
+case "$nroff" in
+nroff)
+       $cat <<'EOM'
+However, you don't have nroff, so they're probably useless to you.
+EOM
+       case "$man8dir" in
+       '') man8dir="none";;
+       esac;;
+esac
+
+case "$d_flexfnam" in
+undef)
+       $cat <<'EOM'
+However, your system can't handle the long file names like File::Basename.3. 
+EOM
+       case "$man8dir" in
+       '') man8dir="none";;
+       esac;;
+esac
+
+echo "If you don't want the manual sources installed, answer 'none'."
+prog=`echo $package | $sed 's/-*[0-9.]*$//'`
+case "$man8dir" in
+'')    dflt=`echo "$man1dir" | $sed -e 's/man1/man8/g' -e 's/man\.1/man\.8/g'`
+       if $test -d "$privlib/man/man1"; then
+               cat <<EOM >&4
+
+WARNING:  Previous versions of perl installed man8 pages into
+$privlib/man/man1.  This version will suggest a 
+new default of $dflt.  
+EOM
+               tdflt=$dflt
+               dflt='n'
+               rp='Do you wish to preserve the old behavior?(y/n)'
+               . ./myread
+               case "$ans" in
+               y*) dflt="$privlib/man/man1" ;;
+               *)  dflt=$tdflt ;;
+               esac
+    fi
+       ;;
+*)     dflt="$man8dir" ;;
+esac
+case "$dflt" in
+' ') dflt=none ;;
+esac
+echo " "
+fn=dn+~
+rp="Where do the $package system management man pages (source) go?"
+. ./getfile
+man8dir="$ans"
+man8direxp="$ansexp"
+case "$man8dir" in
+'')    man8dir=' '
+       installman8dir='';;
+esac
+
+: Change installation prefix, if necessary.
+if $test X"$prefix" != X"$installprefix"; then
+       installman8dir=`echo $man8direxp | $sed "s#^$prefix#$installprefix#"`
+else
+       installman8dir="$man8direxp"
+fi
+
+: What suffix to use on installed man pages
+case "$man8dir" in
+' ')
+       man8ext='0'
+       ;;
+*)
+       rp="What suffix should be used for the $package system management man pages?"
+       case "$man8ext" in
+       '')     case "$man8dir" in
+               *8)  dflt=8 ;;
+               *1m) dflt=1m ;;
+               *8p) dflt=8p ;;
+               *l) dflt=l;;
+               *n) dflt=n;;
+               *o) dflt=o;;
+               *p) dflt=p;;
+               *C) dflt=C;;
+               *L) dflt=L;;
+               *L8) dflt=L8;;
+               *) dflt=8;;
+               esac
+               ;;
+       *)      dflt="$man8ext";;
+       esac
+       . ./myread
+       man8ext="$ans"
+       ;;
+esac
+
 : see if we have to deal with yellow pages, now NIS.
 if $test -d /usr/etc/yp || $test -d /etc/yp; then
        if $test -f /usr/etc/nibindd; then
@@ -15908,6 +16118,8 @@
 installbin='$installbin'
 installman1dir='$installman1dir'
 installman3dir='$installman3dir'
+installman5dir='$installman5dir'
+installman8dir='$installman8dir'
 installprefix='$installprefix'
 installprefixexp='$installprefixexp'
 installprivlib='$installprivlib'
@@ -15972,6 +16184,12 @@
 man3dir='$man3dir'
 man3direxp='$man3direxp'
 man3ext='$man3ext'
+man5dir='$man5dir'
+man5direxp='$man5direxp'
+man5ext='$man5ext'
+man8dir='$man8dir'
+man8direxp='$man8direxp'
+man8ext='$man8ext'
 medium='$medium'
 mips_type='$mips_type'
 mkdir='$mkdir'
diff -ru perl-5.7.0.orig/INSTALL perl-5.7.0/INSTALL
--- perl-5.7.0.orig/INSTALL     Thu Aug 31 06:46:18 2000
+++ perl-5.7.0/INSTALL  Sun Sep 10 01:38:15 2000
@@ -406,8 +406,12 @@
     $archlib           $prefix/lib/perl5/$version/$archname
     $man1dir           $prefix/man/man1
     $man3dir           $prefix/man/man3
+    $man5dir           $prefix/man/man5
+    $man8dir           $prefix/man/man8
     $html1dir          (none)
     $html3dir          (none)
+    $html5dir          (none)
+    $html8dir          (none)
 
 Actually, Configure recognizes the SVR3-style
 /usr/local/man/l_man/man1 directories, if present, and uses those
@@ -429,8 +433,12 @@
     $sitearch          $siteprefix/lib/perl5/site_perl/$version/$archname
     $siteman1          $siteprefix/man/man1
     $siteman3          $siteprefix/man/man3
+    $siteman5          $siteprefix/man/man5
+    $siteman8          $siteprefix/man/man8
     $sitehtml1         (none)
     $sitehtml3         (none)
+    $sitehtml5         (none)
+    $sitehtml8         (none)
 
 By default, ExtUtils::MakeMaker will install architecture-independent
 modules into $sitelib and architecture-dependent modules into $sitearch.
@@ -454,8 +462,12 @@
     $vendorarch                $vendorprefix/lib/perl5/vendor_perl/$version/$archname
     $vendorman1                $vendorprefix/man/man1
     $vendorman3                $vendorprefix/man/man3
+    $vendorman5                $vendorprefix/man/man5
+    $vendorman8                $vendorprefix/man/man8
     $vendorhtml1       (none)
     $vendorhtml3       (none)
+    $vendorhtml5       (none)
+    $vendorhtml8       (none)
 
 These are normally empty, but may be set as needed.  For example,
 a vendor might choose the following settings:
@@ -472,6 +484,8 @@
        $archlib        /usr/lib/perl5/$version/$archname
        $man1dir        /usr/man/man1
        $man3dir        /usr/man/man3
+       $man5dir        /usr/man/man5
+       $man5dir        /usr/man/man8
 
        $sitebin        /usr/local/bin
        $sitescript     /usr/local/bin
@@ -479,6 +493,8 @@
        $sitearch       /usr/local/lib/perl5/site_perl/$version/$archname
        $siteman1       /usr/local/man/man1
        $siteman3       /usr/local/man/man3
+       $siteman5       /usr/local/man/man5
+       $siteman8       /usr/local/man/man8
 
        $vendorbin      /usr/bin
        $vendorscript   /usr/bin
@@ -486,6 +502,8 @@
        $vendorarch     /usr/lib/perl5/vendor_perl/$version/$archname
        $vendorman1     /usr/man/man1
        $vendorman3     /usr/man/man3
+       $vendorman5     /usr/man/man5
+       $vendorman8     /usr/man/man8
 
 Note how in this example, the vendor-supplied directories are in the
 /usr hierarchy, while the directories reserved for the end-user are in
@@ -1856,9 +1874,13 @@
 
        library files   in $privlib and $archlib specified to
                        Configure, usually under /usr/local/lib/perl5/.
-       man pages       in $man1dir, usually /usr/local/man/man1.
+       user man pages  in $man1dir, usually /usr/local/man/man1.
        module man
        pages           in $man3dir, usually /usr/local/man/man3.
+       file format
+       man pages       in $man5dir, usually /usr/local/man/man5.
+       system management
+       man pages       in $man8dir, usually /usr/local/man/man8.
        pod/*.pod       in $privlib/pod/.
 
 Installperl will also create the directories listed above
diff -ru perl-5.7.0.orig/Policy_sh.SH perl-5.7.0/Policy_sh.SH
--- perl-5.7.0.orig/Policy_sh.SH        Sun Aug 13 11:33:02 2000
+++ perl-5.7.0/Policy_sh.SH     Sun Sep 10 01:38:15 2000
@@ -121,11 +121,14 @@
 !GROK!THIS!
 
 for var in \
-       bin scriptdir privlib archlib man1dir man3dir html1dir html3dir \
+       bin scriptdir privlib archlib man1dir man3dir man5dir man8dir \
+       html1dir html3dir html5dir html8dir \
        sitebin sitescript sitelib sitearch \
-               siteman1 siteman3 sitehtml1 sitehtml3 \
+               siteman1 siteman3 siteman5 siteman8 \
+               sitehtml1 sitehtml3 sitehtml5 sitehtml8 \
        vendorbin vendorscript vendorlib vendorarch \
-               vendorman1 vendorman3 vendorhtml1 vendorhtml3
+               vendorman1 vendorman3 vendorman5 vendorman8 \
+               vendorhtml1 vendorhtml3 vendorhtml5 vendorhtml8
 do
 
     case "$var" in
@@ -150,13 +153,20 @@
 
     man1dir)   dflt="$prefix/man/man1" ;;
     man3dir)   dflt="$prefix/man/man3" ;;
+    man5dir)   dflt="$prefix/man/man5" ;;
+    man8dir)   dflt="$prefix/man/man8" ;;
     # Can we assume all sed's have greedy matching?
     man1ext)   dflt=`echo $man1dir | sed -e 's!.*man!!' -e 's!^\.!!'` ;;
     man3ext)   dflt=`echo $man3dir | sed -e 's!.*man!!' -e 's!^\.!!'` ;;
+    man5ext)   dflt=`echo $man5dir | sed -e 's!.*man!!' -e 's!^\.!!'` ;;
+    man8ext)   dflt=`echo $man8dir | sed -e 's!.*man!!' -e 's!^\.!!'` ;;
 
     # We don't know what to do with these yet.
     html1dir)  dflt='' ;;
     htm31dir)  dflt='' ;;
+    # Or these, presumably.
+    htm51dir)  dflt='' ;;
+    htm81dir)  dflt='' ;;
 
     # Directories for site-specific add-on files
     sitebin)   dflt=$siteprefix/bin ;;
@@ -177,9 +187,13 @@
 
     siteman1)  dflt="$siteprefix/man/man1" ;;
     siteman3)  dflt="$siteprefix/man/man3" ;;
+    siteman5)  dflt="$siteprefix/man/man5" ;;
+    siteman8)  dflt="$siteprefix/man/man8" ;;
     # We don't know what to do with these yet.
     sitehtml1) dflt='' ;;
-    sitehtm31dir)      dflt='' ;;
+    sitehtml3) dflt='' ;;
+    sitehtml5) dflt='' ;;
+    sitehtml8) dflt='' ;;
     
     # Directories for vendor-supplied add-on files
     # These are all usually empty.
@@ -206,9 +220,13 @@
 
            vendorman1) dflt="$vendorprefix/man/man1" ;;
            vendorman3) dflt="$vendorprefix/man/man3" ;;
+           vendorman5) dflt="$vendorprefix/man/man5" ;;
+           vendorman8) dflt="$vendorprefix/man/man8" ;;
            # We don't know what to do with these yet.
            vendorhtml1)        dflt='' ;;
-           vendorhtm3) dflt='' ;;
+           vendorhtml3)        dflt='' ;;
+           vendorhtml5)        dflt='' ;;
+           vendorhtml8)        dflt='' ;;
 
            esac  # End of vendorprefix != ''
        fi
diff -ru perl-5.7.0.orig/Porting/Glossary perl-5.7.0/Porting/Glossary
--- perl-5.7.0.orig/Porting/Glossary    Fri Sep  1 11:13:44 2000
+++ perl-5.7.0/Porting/Glossary Sun Sep 10 01:38:42 2000
@@ -2335,6 +2335,18 @@
        man3direxp only points to the read-only access location. For extra
        portability, you should only use this variable within your makefiles.
 
+installman5dir (man5dir.U):
+       This variable is really the same as man5direxp, unless you are using
+       AFS in which case it points to the read/write location whereas
+       man5direxp only points to the read-only access location. For extra
+       portability, you should only use this variable within your makefiles.
+
+installman8dir (man8dir.U):
+       This variable is really the same as man8direxp, unless you are using
+       AFS in which case it points to the read/write location whereas
+       man8direxp only points to the read-only access location. For extra
+       portability, you should only use this variable within your makefiles.
+
 installprefix (installprefix.U):
        This variable holds the name of the directory below which 
        "make install" will install the package.  For most users, this
@@ -2626,8 +2638,8 @@
        This variable contains the kind of ptr returned by malloc and realloc.
 
 man1dir (man1dir.U):
-       This variable contains the name of the directory in which manual
-       source pages are to be put.  It is the responsibility of the
+       This variable contains the name of the directory in which user
+       manual source pages are to be put.  It is the responsibility of the
        Makefile.SH to get the value of this into the proper command.
        You must be prepared to do the ~name expansion yourself.
 
@@ -2641,8 +2653,8 @@
        See man1dir.
 
 man3dir (man3dir.U):
-       This variable contains the name of the directory in which manual
-       source pages are to be put.  It is the responsibility of the
+       This variable contains the name of the directory in which library
+       manual source pages are to be put.  It is the responsibility of the
        Makefile.SH to get the value of this into the proper command.
        You must be prepared to do the ~name expansion yourself.
 
@@ -2654,6 +2666,37 @@
        This variable contains the extension that the manual page should
        have: one of 'n', 'l', or '3'.  The Makefile must supply the '.'.
        See man3dir.
+
+man5dir (man5dir.U):
+       This variable contains the name of the directory in which file
+       format manual source pages are to be put.  It is the responsibility
+       of the Makefile.SH to get the value of this into the proper command.
+       You must be prepared to do the ~name expansion yourself.
+
+man5direxp (man5dir.U):
+       This variable is the same as the man5dir variable, but is filename
+       expanded at configuration time, for convenient use in makefiles.
+
+man5ext (man5dir.U):
+       This variable contains the extension that the manual page should
+       have: one of 'n', 'l', or '5'.  The Makefile must supply the '.'.
+       See man5dir.
+
+man8dir (man8dir.U):
+       This variable contains the name of the directory in which system
+       management manual source pages are to be put.  It is the 
+       responsibility of the Makefile.SH to get the value of this into
+       the proper command. You must be prepared to do the ~name expansion
+       yourself.
+
+man8direxp (man8dir.U):
+       This variable is the same as the man8dir variable, but is filename
+       expanded at configuration time, for convenient use in makefiles.
+
+man8ext (man8dir.U):
+       This variable contains the extension that the manual page should
+       have: one of 'n', 'l', or '8'.  The Makefile must supply the '.'.
+       See man8dir.
 
 Mcc (Loc.U):
        This variable is used internally by Configure to determine the

============ End of Patch =============

-- 
Howard Owen  -  hbo@egbok.com  -  +1-831-477-1123
"Even if you are on the right track, you'll get run over if you just sit there."

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About