README.vms and related updates (from Peter Prymmer <pvhp@best.com>)
[p5sagit/p5-mst-13.2.git] / pod / roffitall
CommitLineData
cb1a09d0 1#!/bin/sh
44a8e56a 2#
3# Usage: roffitall [-nroff|-psroff|-groff]
4#
5# Authors: Tom Christiansen, Raphael Manfredi
6
7me=roffitall
8tmp=.
9
34a2a22e 10if test -f ../config.sh; then
11 . ../config.sh
12fi
44a8e56a 13
34a2a22e 14mandir=$installman1dir
15libdir=$installman3dir
16
39246fa0 17test -d $mandir || mandir=/usr/new/man/man1
18test -d $libdir || libdir=/usr/new/man/man3
44a8e56a 19
20case "$1" in
21-nroff) cmd="nroff -man"; ext='txt';;
22-psroff) cmd="psroff -t"; ext='ps';;
23-groff) cmd="groff -man"; ext='ps';;
24*)
25 echo "Usage: roffitall [-nroff|-psroff|-groff]" >&2
26 exit 1
27 ;;
28esac
29
30toroff=`
31 echo \
34a2a22e 32 $mandir/perl.1 \
34a2a22e 33 $mandir/perldata.1 \
34 $mandir/perlsyn.1 \
35 $mandir/perlop.1 \
36 $mandir/perlre.1 \
37 $mandir/perlrun.1 \
34a2a22e 38 $mandir/perlfunc.1 \
39 $mandir/perlvar.1 \
40 $mandir/perlsub.1 \
f8284313 41 $mandir/perlopentut.1 \
34a2a22e 42 $mandir/perlmod.1 \
f102b883 43 $mandir/perlmodlib.1 \
39246fa0 44 $mandir/perlmodinstall.1 \
7766f137 45 $mandir/perlfork.1 \
39246fa0 46 $mandir/perlform.1 \
47 $mandir/perllocale.1 \
34a2a22e 48 $mandir/perlref.1 \
a1e2a320 49 $mandir/perlreftut.1 \
34a2a22e 50 $mandir/perldsc.1 \
51 $mandir/perllol.1 \
39246fa0 52 $mandir/perltoot.1 \
34a2a22e 53 $mandir/perlobj.1 \
54 $mandir/perltie.1 \
34a2a22e 55 $mandir/perlbot.1 \
39246fa0 56 $mandir/perlipc.1 \
2605996a 57 $mandir/perlthrtut.1 \
34a2a22e 58 $mandir/perldebug.1 \
59 $mandir/perldiag.1 \
34a2a22e 60 $mandir/perlsec.1 \
61 $mandir/perltrap.1 \
39246fa0 62 $mandir/perlport.1 \
34a2a22e 63 $mandir/perlstyle.1 \
39246fa0 64 $mandir/perlpod.1 \
65 $mandir/perlbook.1 \
66 $mandir/perlembed.1 \
34a2a22e 67 $mandir/perlapio.1 \
68 $mandir/perlxs.1 \
69 $mandir/perlxstut.1 \
70 $mandir/perlguts.1 \
71 $mandir/perlcall.1 \
54a137f5 72 $mandir/perlcompile.1 \
e50bb9a1 73 $mandir/perltodo.1 \
954c1994 74 $mandir/perlapi.1 \
75 $mandir/perlintern.1 \
e8cd7eae 76 $mandir/perlhack.1 \
39246fa0 77 $mandir/perlhist.1 \
78 $mandir/perldelta.1 \
79 $mandir/perl5004delta.1 \
e50bb9a1 80 $mandir/perl5005delta.1 \
68dc0745 81 $mandir/perlfaq.1 \
82 $mandir/perlfaq1.1 \
83 $mandir/perlfaq2.1 \
84 $mandir/perlfaq3.1 \
85 $mandir/perlfaq4.1 \
86 $mandir/perlfaq5.1 \
87 $mandir/perlfaq6.1 \
88 $mandir/perlfaq7.1 \
89 $mandir/perlfaq8.1 \
90 $mandir/perlfaq9.1 \
cb1a09d0 91 \
39246fa0 92 $mandir/a2p.1 \
93 $mandir/c2ph.1 \
95667ae4 94 $mandir/dprofpp.1 \
39246fa0 95 $mandir/h2ph.1 \
96 $mandir/h2xs.1 \
97 $mandir/perlbug.1 \
98 $mandir/perldoc.1 \
99 $mandir/pl2pm.1 \
100 $mandir/pod2html.1 \
101 $mandir/pod2man.1 \
102 $mandir/s2p.1 \
103 $mandir/splain.1 \
104 $mandir/xsubpp.1 \
105 \
106 $libdir/attrs.3 \
107 $libdir/autouse.3 \
108 $libdir/base.3 \
34a2a22e 109 $libdir/blib.3 \
39246fa0 110 $libdir/constant.3 \
34a2a22e 111 $libdir/diagnostics.3 \
39246fa0 112 $libdir/fields.3 \
2605996a 113 $libdir/filetest.3 \
34a2a22e 114 $libdir/integer.3 \
115 $libdir/less.3 \
116 $libdir/lib.3 \
f86702cc 117 $libdir/locale.3 \
39246fa0 118 $libdir/ops.3 \
34a2a22e 119 $libdir/overload.3 \
39246fa0 120 $libdir/re.3 \
34a2a22e 121 $libdir/sigtrap.3 \
122 $libdir/strict.3 \
123 $libdir/subs.3 \
124 $libdir/vars.3 \
cb1a09d0 125 \
34a2a22e 126 $libdir/AnyDBM_File.3 \
127 $libdir/AutoLoader.3 \
128 $libdir/AutoSplit.3 \
39246fa0 129 $libdir/B.3 \
130 $libdir/B::Asmdata.3 \
131 $libdir/B::Assembler.3 \
132 $libdir/B::Bblock.3 \
133 $libdir/B::Bytecode.3 \
134 $libdir/B::C.3 \
135 $libdir/B::CC.3 \
136 $libdir/B::Debug.3 \
137 $libdir/B::Deparse.3 \
138 $libdir/B::Disassembler.3 \
139 $libdir/B::Lint.3 \
140 $libdir/B::Showlex.3 \
141 $libdir/B::Stackobj.3 \
142 $libdir/B::Terse.3 \
143 $libdir/B::Xref.3 \
34a2a22e 144 $libdir/Benchmark.3 \
145 $libdir/Carp.3 \
39246fa0 146 $libdir/CGI.3 \
147 $libdir/CGI::Apache.3 \
148 $libdir/CGI::Carp.3 \
149 $libdir/CGI::Cookie.3 \
150 $libdir/CGI::Fast.3 \
151 $libdir/CGI::Push.3 \
152 $libdir/CGI::Switch.3 \
153 $libdir/Class::Struct.3 \
34a2a22e 154 $libdir/Config.3 \
39246fa0 155 $libdir/CPAN.3 \
156 $libdir/CPAN::FirstTime.3 \
157 $libdir/CPAN::Nox.3 \
34a2a22e 158 $libdir/Cwd.3 \
39246fa0 159 $libdir/Data::Dumper.3 \
34a2a22e 160 $libdir/DB_File.3 \
161 $libdir/Devel::SelfStubber.3 \
39246fa0 162 $libdir/DirHandle.3 \
34a2a22e 163 $libdir/DynaLoader.3 \
2605996a 164 $libdir/Dumpvalue.3 \
34a2a22e 165 $libdir/English.3 \
166 $libdir/Env.3 \
39246fa0 167 $libdir/Errno.3 \
34a2a22e 168 $libdir/Exporter.3 \
39246fa0 169 $libdir/ExtUtils::Command.3 \
34a2a22e 170 $libdir/ExtUtils::Embed.3 \
171 $libdir/ExtUtils::Install.3 \
39246fa0 172 $libdir/ExtUtils::Installed.3 \
34a2a22e 173 $libdir/ExtUtils::Liblist.3 \
174 $libdir/ExtUtils::MakeMaker.3 \
175 $libdir/ExtUtils::Manifest.3 \
39246fa0 176 $libdir/ExtUtils::Miniperl.3 \
34a2a22e 177 $libdir/ExtUtils::Mkbootstrap.3 \
178 $libdir/ExtUtils::Mksymlists.3 \
39246fa0 179 $libdir/ExtUtils::MM_OS2.3 \
180 $libdir/ExtUtils::MM_Unix.3 \
181 $libdir/ExtUtils::MM_VMS.3 \
182 $libdir/ExtUtils::MM_Win32.3 \
183 $libdir/ExtUtils::Packlist.3 \
184 $libdir/ExtUtils::testlib.3 \
185 $libdir/Fatal.3 \
34a2a22e 186 $libdir/Fcntl.3 \
187 $libdir/File::Basename.3 \
188 $libdir/File::CheckTree.3 \
34a2a22e 189 $libdir/File::Compare.3 \
39246fa0 190 $libdir/File::Copy.3 \
191 $libdir/File::DosGlob.3 \
34a2a22e 192 $libdir/File::Find.3 \
193 $libdir/File::Path.3 \
39246fa0 194 $libdir/File::Spec.3 \
195 $libdir/File::Spec::Mac.3 \
196 $libdir/File::Spec::OS2.3 \
197 $libdir/File::Spec::Unix.3 \
198 $libdir/File::Spec::VMS.3 \
199 $libdir/File::Spec::Win32.3 \
34a2a22e 200 $libdir/File::stat.3 \
201 $libdir/FileCache.3 \
202 $libdir/FileHandle.3 \
203 $libdir/FindBin.3 \
39246fa0 204 $libdir/GDBM_File.3 \
34a2a22e 205 $libdir/Getopt::Long.3 \
206 $libdir/Getopt::Std.3 \
207 $libdir/I18N::Collate.3 \
208 $libdir/IO.3 \
209 $libdir/IO::File.3 \
210 $libdir/IO::Handle.3 \
211 $libdir/IO::Pipe.3 \
212 $libdir/IO::Seekable.3 \
213 $libdir/IO::Select.3 \
214 $libdir/IO::Socket.3 \
39246fa0 215 $libdir/IPC::Msg.3 \
34a2a22e 216 $libdir/IPC::Open2.3 \
217 $libdir/IPC::Open3.3 \
39246fa0 218 $libdir/IPC::Semaphore.3 \
219 $libdir/IPC::SysV.3 \
34a2a22e 220 $libdir/Math::BigFloat.3 \
221 $libdir/Math::BigInt.3 \
222 $libdir/Math::Complex.3 \
ace5de91 223 $libdir/Math::Trig.3 \
39246fa0 224 $libdir/NDBM_File.3 \
34a2a22e 225 $libdir/Net::hostent.3 \
226 $libdir/Net::netent.3 \
39246fa0 227 $libdir/Net::Ping.3 \
34a2a22e 228 $libdir/Net::protoent.3 \
229 $libdir/Net::servent.3 \
39246fa0 230 $libdir/O.3 \
34a2a22e 231 $libdir/Opcode.3 \
39246fa0 232 $libdir/Pod::Html.3 \
34a2a22e 233 $libdir/Pod::Text.3 \
39246fa0 234 $libdir/POSIX.3 \
34a2a22e 235 $libdir/Safe.3 \
39246fa0 236 $libdir/SDBM_File.3 \
34a2a22e 237 $libdir/Search::Dict.3 \
238 $libdir/SelectSaver.3 \
239 $libdir/SelfLoader.3 \
240 $libdir/Shell.3 \
241 $libdir/Socket.3 \
242 $libdir/Symbol.3 \
243 $libdir/Sys::Hostname.3 \
244 $libdir/Sys::Syslog.3 \
245 $libdir/Term::Cap.3 \
246 $libdir/Term::Complete.3 \
39246fa0 247 $libdir/Term::ReadLine.3 \
248 $libdir/Test.3 \
34a2a22e 249 $libdir/Test::Harness.3 \
250 $libdir/Text::Abbrev.3 \
251 $libdir/Text::ParseWords.3 \
252 $libdir/Text::Soundex.3 \
253 $libdir/Text::Tabs.3 \
39246fa0 254 $libdir/Text::Wrap.3 \
255 $libdir/Tie::Array.3 \
256 $libdir/Tie::Handle.3 \
34a2a22e 257 $libdir/Tie::Hash.3 \
258 $libdir/Tie::RefHash.3 \
259 $libdir/Tie::Scalar.3 \
260 $libdir/Tie::SubstrHash.3 \
34a2a22e 261 $libdir/Time::gmtime.3 \
39246fa0 262 $libdir/Time::Local.3 \
34a2a22e 263 $libdir/Time::localtime.3 \
264 $libdir/Time::tm.3 \
265 $libdir/UNIVERSAL.3 \
266 $libdir/User::grent.3 \
267 $libdir/User::pwent.3 | \
39246fa0 268 perl -ne 'map { -r && print "$_ " } split'`
44a8e56a 269
39246fa0 270 # Bypass internal shell buffer limit -- can't use case
271 if perl -e '$a = shift; exit($a =~ m|/|)' $toroff; then
34a2a22e 272 echo "$me: empty file list -- did you run install?" >&2
273 exit 1
39246fa0 274 fi
44a8e56a 275
39246fa0 276 #psroff -t -man -rC1 -rD1 -rF1 > $tmp/PerlDoc.ps 2>$tmp/PerlTOC.raw
277 #nroff -man -rC1 -rD1 -rF1 > $tmp/PerlDoc.txt 2>$tmp/PerlTOC.nr.raw
2ceaccd7 278
39246fa0 279 # First, create the raw data
280 run="$cmd -rC1 -rD1 -rF1 >$tmp/PerlDoc.$ext 2>$tmp/PerlTOC.$ext.raw"
281 echo "$me: running $run"
282 eval $run $toroff
2ceaccd7 283
39246fa0 284 #Now create the TOC
285 echo "$me: parsing TOC"
286 ./rofftoc $tmp/PerlTOC.$ext.raw > $tmp/PerlTOC.tmp.man
287 run="$cmd $tmp/PerlTOC.tmp.man >$tmp/PerlTOC.$ext"
288 echo "$me: running $run"
289 eval $run
44a8e56a 290
39246fa0 291 # Finally, recreate the Doc, without the blank page 0
292 run="$cmd -rC1 -rD1 >$tmp/PerlDoc.$ext 2>$tmp/PerlTOC.$ext.raw"
293 echo "$me: running $run"
294 eval $run $toroff
295 rm -f $tmp/PerlTOC.tmp.man $tmp/PerlTOC.$ext.raw
296 echo "$me: leaving you with $tmp/PerlDoc.$ext and $tmp/PerlTOC.$ext"
7b8d334a 297