summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/pod/roffitall
blob: 9ab7f29bdeb667739661cc77944bcbf3140809e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
#!/bin/sh
#
# Usage: roffitall [-nroff|-psroff|-groff]
#
# Authors: Tom Christiansen, Raphael Manfredi

me=roffitall
tmp=.

if test -f ../config.sh; then
	. ../config.sh
fi

mandir=$installman1dir
libdir=$installman3dir

test -d $mandir || mandir=/usr/new/man/man1
test -d $libdir || libdir=/usr/new/man/man3

case "$1" in
-nroff) cmd="nroff -man"; ext='txt';;
-psroff) cmd="psroff -t"; ext='ps';;
-groff) cmd="groff -man"; ext='ps';;
*)
	echo "Usage: roffitall [-nroff|-psroff|-groff]" >&2
	exit 1
	;;
esac

toroff=`
	echo		\
    $mandir/perl.1	\
    $mandir/perldata.1	\
    $mandir/perlsyn.1	\
    $mandir/perlop.1	\
    $mandir/perlre.1	\
    $mandir/perlrun.1	\
    $mandir/perlfunc.1	\
    $mandir/perlopentut.1	\
    $mandir/perlvar.1	\
    $mandir/perlsub.1	\
    $mandir/perlmod.1	\
    $mandir/perlmodlib.1	\
    $mandir/perlmodinstall.1	\
    $mandir/perlform.1	\
    $mandir/perllocale.1	\
    $mandir/perlref.1	\
    $mandir/perlreftut.1	\
    $mandir/perldsc.1	\
    $mandir/perllol.1	\
    $mandir/perltoot.1	\
    $mandir/perlobj.1	\
    $mandir/perltie.1	\
    $mandir/perlbot.1	\
    $mandir/perlipc.1	\
    $mandir/perldebug.1	\
    $mandir/perldiag.1	\
    $mandir/perlsec.1	\
    $mandir/perltrap.1	\
    $mandir/perlport.1	\
    $mandir/perlstyle.1	\
    $mandir/perlpod.1	\
    $mandir/perlbook.1	\
    $mandir/perlembed.1	\
    $mandir/perlapio.1	\
    $mandir/perlxs.1	\
    $mandir/perlxstut.1	\
    $mandir/perlguts.1	\
    $mandir/perlcall.1	\
    $mandir/perlthrtut.1	\
    $mandir/perlhist.1	\
    $mandir/perldelta.1	\
    $mandir/perl5004delta.1	\
    $mandir/perlfaq.1	\
    $mandir/perlfaq1.1	\
    $mandir/perlfaq2.1	\
    $mandir/perlfaq3.1	\
    $mandir/perlfaq4.1	\
    $mandir/perlfaq5.1	\
    $mandir/perlfaq6.1	\
    $mandir/perlfaq7.1	\
    $mandir/perlfaq8.1	\
    $mandir/perlfaq9.1	\
	\
    $mandir/a2p.1	\
    $mandir/c2ph.1	\
    $mandir/h2ph.1	\
    $mandir/h2xs.1	\
    $mandir/perlbug.1	\
    $mandir/perldoc.1	\
    $mandir/pl2pm.1	\
    $mandir/pod2html.1	\
    $mandir/pod2man.1	\
    $mandir/s2p.1	\
    $mandir/splain.1	\
    $mandir/xsubpp.1	\
			\
    $libdir/attrs.3	\
    $libdir/autouse.3	\
    $libdir/base.3	\
    $libdir/blib.3	\
    $libdir/constant.3	\
    $libdir/diagnostics.3	\
    $libdir/fields.3	\
    $libdir/integer.3	\
    $libdir/less.3	\
    $libdir/lib.3	\
    $libdir/locale.3	\
    $libdir/ops.3	\
    $libdir/overload.3	\
    $libdir/re.3	\
    $libdir/sigtrap.3	\
    $libdir/strict.3	\
    $libdir/subs.3	\
    $libdir/vars.3	\
	\
    $libdir/AnyDBM_File.3	\
    $libdir/AutoLoader.3	\
    $libdir/AutoSplit.3	\
    $libdir/B.3	\
    $libdir/B::Asmdata.3	\
    $libdir/B::Assembler.3	\
    $libdir/B::Bblock.3	\
    $libdir/B::Bytecode.3	\
    $libdir/B::C.3	\
    $libdir/B::CC.3	\
    $libdir/B::Debug.3	\
    $libdir/B::Deparse.3	\
    $libdir/B::Disassembler.3	\
    $libdir/B::Lint.3	\
    $libdir/B::Showlex.3	\
    $libdir/B::Stackobj.3	\
    $libdir/B::Terse.3	\
    $libdir/B::Xref.3	\
    $libdir/Benchmark.3	\
    $libdir/Carp.3	\
    $libdir/CGI.3	\
    $libdir/CGI::Apache.3	\
    $libdir/CGI::Carp.3	\
    $libdir/CGI::Cookie.3	\
    $libdir/CGI::Fast.3	\
    $libdir/CGI::Push.3	\
    $libdir/CGI::Switch.3	\
    $libdir/Class::Struct.3	\
    $libdir/Config.3	\
    $libdir/CPAN.3	\
    $libdir/CPAN::FirstTime.3	\
    $libdir/CPAN::Nox.3	\
    $libdir/Cwd.3	\
    $libdir/Data::Dumper.3	\
    $libdir/DB_File.3	\
    $libdir/Devel::SelfStubber.3	\
    $libdir/DirHandle.3	\
    $libdir/DynaLoader.3	\
    $libdir/Dumpvalue.3	\
    $libdir/English.3	\
    $libdir/Env.3	\
    $libdir/Errno.3	\
    $libdir/Exporter.3	\
    $libdir/ExtUtils::Command.3	\
    $libdir/ExtUtils::Embed.3	\
    $libdir/ExtUtils::Install.3	\
    $libdir/ExtUtils::Installed.3	\
    $libdir/ExtUtils::Liblist.3	\
    $libdir/ExtUtils::MakeMaker.3	\
    $libdir/ExtUtils::Manifest.3	\
    $libdir/ExtUtils::Miniperl.3	\
    $libdir/ExtUtils::Mkbootstrap.3	\
    $libdir/ExtUtils::Mksymlists.3	\
    $libdir/ExtUtils::MM_OS2.3	\
    $libdir/ExtUtils::MM_Unix.3	\
    $libdir/ExtUtils::MM_VMS.3	\
    $libdir/ExtUtils::MM_Win32.3	\
    $libdir/ExtUtils::Packlist.3	\
    $libdir/ExtUtils::testlib.3	\
    $libdir/Fatal.3	\
    $libdir/Fcntl.3	\
    $libdir/File::Basename.3	\
    $libdir/File::CheckTree.3	\
    $libdir/File::Compare.3	\
    $libdir/File::Copy.3	\
    $libdir/File::DosGlob.3	\
    $libdir/File::Find.3	\
    $libdir/File::Path.3	\
    $libdir/File::Spec.3	\
    $libdir/File::Spec::Mac.3	\
    $libdir/File::Spec::OS2.3	\
    $libdir/File::Spec::Unix.3	\
    $libdir/File::Spec::VMS.3	\
    $libdir/File::Spec::Win32.3	\
    $libdir/File::stat.3	\
    $libdir/FileCache.3	\
    $libdir/FileHandle.3	\
    $libdir/FindBin.3	\
    $libdir/GDBM_File.3	\
    $libdir/Getopt::Long.3	\
    $libdir/Getopt::Std.3	\
    $libdir/I18N::Collate.3	\
    $libdir/IO.3 \
    $libdir/IO::File.3 \
    $libdir/IO::Handle.3 \
    $libdir/IO::Pipe.3 \
    $libdir/IO::Seekable.3 \
    $libdir/IO::Select.3 \
    $libdir/IO::Socket.3 \
    $libdir/IPC::Msg.3	\
    $libdir/IPC::Open2.3	\
    $libdir/IPC::Open3.3	\
    $libdir/IPC::Semaphore.3	\
    $libdir/IPC::SysV.3	\
    $libdir/Math::BigFloat.3	\
    $libdir/Math::BigInt.3	\
    $libdir/Math::Complex.3	\
    $libdir/Math::Trig.3	\
    $libdir/NDBM_File.3	\
    $libdir/Net::hostent.3	\
    $libdir/Net::netent.3	\
    $libdir/Net::Ping.3	\
    $libdir/Net::protoent.3	\
    $libdir/Net::servent.3	\
    $libdir/O.3	\
    $libdir/Opcode.3	\
    $libdir/Pod::Html.3	\
    $libdir/Pod::Text.3	\
    $libdir/POSIX.3	\
    $libdir/Safe.3	\
    $libdir/SDBM_File.3	\
    $libdir/Search::Dict.3	\
    $libdir/SelectSaver.3	\
    $libdir/SelfLoader.3	\
    $libdir/Shell.3	\
    $libdir/Socket.3	\
    $libdir/Symbol.3	\
    $libdir/Sys::Hostname.3	\
    $libdir/Sys::Syslog.3	\
    $libdir/Term::Cap.3	\
    $libdir/Term::Complete.3	\
    $libdir/Term::ReadLine.3	\
    $libdir/Test.3	\
    $libdir/Test::Harness.3	\
    $libdir/Text::Abbrev.3	\
    $libdir/Text::ParseWords.3	\
    $libdir/Text::Soundex.3	\
    $libdir/Text::Tabs.3	\
    $libdir/Text::Wrap.3	\
    $libdir/Tie::Array.3	\
    $libdir/Tie::Handle.3	\
    $libdir/Tie::Hash.3	\
    $libdir/Tie::RefHash.3	\
    $libdir/Tie::Scalar.3	\
    $libdir/Tie::SubstrHash.3	\
    $libdir/Time::gmtime.3	\
    $libdir/Time::Local.3	\
    $libdir/Time::localtime.3	\
    $libdir/Time::tm.3		\
    $libdir/UNIVERSAL.3		\
    $libdir/User::grent.3		\
    $libdir/User::pwent.3 | \
    perl -ne 'map { -r && print "$_ " } split'`

    # Bypass internal shell buffer limit -- can't use case
    if perl -e '$a = shift; exit($a =~ m|/|)' $toroff; then
	echo "$me: empty file list -- did you run install?" >&2
	exit 1
    fi

    #psroff -t -man -rC1 -rD1 -rF1 > $tmp/PerlDoc.ps 2>$tmp/PerlTOC.raw
    #nroff -man -rC1 -rD1 -rF1 > $tmp/PerlDoc.txt 2>$tmp/PerlTOC.nr.raw

    # First, create the raw data
    run="$cmd -rC1 -rD1 -rF1 >$tmp/PerlDoc.$ext 2>$tmp/PerlTOC.$ext.raw"
    echo "$me: running $run"
    eval $run $toroff

    #Now create the TOC
    echo "$me: parsing TOC"
    ./rofftoc $tmp/PerlTOC.$ext.raw > $tmp/PerlTOC.tmp.man
    run="$cmd $tmp/PerlTOC.tmp.man >$tmp/PerlTOC.$ext"
    echo "$me: running $run"
    eval $run

    # Finally, recreate the Doc, without the blank page 0
    run="$cmd -rC1 -rD1 >$tmp/PerlDoc.$ext 2>$tmp/PerlTOC.$ext.raw"
    echo "$me: running $run"
    eval $run $toroff
    rm -f $tmp/PerlTOC.tmp.man $tmp/PerlTOC.$ext.raw
    echo "$me: leaving you with $tmp/PerlDoc.$ext and $tmp/PerlTOC.$ext"

OpenPOWER on IntegriCloud