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