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