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 RM |
10 | if test -f ../config.sh; then |
11 | . ../config.sh | |
12 | fi | |
44a8e56a | 13 | |
34a2a22e RM |
14 | mandir=$installman1dir |
15 | libdir=$installman3dir | |
16 | ||
17 | test -d $mandir || mandir=/usr/local/man/man1 | |
18 | test -d $libdir || libdir=/usr/local/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 \ |
774d564b | 33 | $mandir/perldelta.1 \ |
34a2a22e RM |
34 | $mandir/perldata.1 \ |
35 | $mandir/perlsyn.1 \ | |
36 | $mandir/perlop.1 \ | |
37 | $mandir/perlre.1 \ | |
38 | $mandir/perlrun.1 \ | |
39 | $mandir/perllocale.1 \ | |
40 | $mandir/perlfunc.1 \ | |
41 | $mandir/perlvar.1 \ | |
42 | $mandir/perlsub.1 \ | |
43 | $mandir/perlmod.1 \ | |
f102b883 | 44 | $mandir/perlmodlib.1 \ |
34a2a22e RM |
45 | $mandir/perlref.1 \ |
46 | $mandir/perldsc.1 \ | |
47 | $mandir/perllol.1 \ | |
48 | $mandir/perlobj.1 \ | |
49 | $mandir/perltie.1 \ | |
50 | $mandir/perltoot.1 \ | |
51 | $mandir/perlbot.1 \ | |
52 | $mandir/perldebug.1 \ | |
53 | $mandir/perldiag.1 \ | |
54 | $mandir/perlform.1 \ | |
55 | $mandir/perlipc.1 \ | |
56 | $mandir/perlsec.1 \ | |
57 | $mandir/perltrap.1 \ | |
58 | $mandir/perlstyle.1 \ | |
59 | $mandir/perlapio.1 \ | |
60 | $mandir/perlxs.1 \ | |
61 | $mandir/perlxstut.1 \ | |
62 | $mandir/perlguts.1 \ | |
63 | $mandir/perlcall.1 \ | |
64 | $mandir/perlembed.1 \ | |
65 | $mandir/perlpod.1 \ | |
66 | $mandir/perlbook.1 \ | |
68dc0745 | 67 | $mandir/perlfaq.1 \ |
68 | $mandir/perlfaq1.1 \ | |
69 | $mandir/perlfaq2.1 \ | |
70 | $mandir/perlfaq3.1 \ | |
71 | $mandir/perlfaq4.1 \ | |
72 | $mandir/perlfaq5.1 \ | |
73 | $mandir/perlfaq6.1 \ | |
74 | $mandir/perlfaq7.1 \ | |
75 | $mandir/perlfaq8.1 \ | |
76 | $mandir/perlfaq9.1 \ | |
cb1a09d0 | 77 | \ |
34a2a22e RM |
78 | $libdir/blib.3 \ |
79 | $libdir/diagnostics.3 \ | |
80 | $libdir/integer.3 \ | |
81 | $libdir/less.3 \ | |
82 | $libdir/lib.3 \ | |
f86702cc | 83 | $libdir/locale.3 \ |
34a2a22e RM |
84 | $libdir/overload.3 \ |
85 | $libdir/sigtrap.3 \ | |
86 | $libdir/strict.3 \ | |
87 | $libdir/subs.3 \ | |
88 | $libdir/vars.3 \ | |
cb1a09d0 | 89 | \ |
34a2a22e RM |
90 | $libdir/AnyDBM_File.3 \ |
91 | $libdir/AutoLoader.3 \ | |
92 | $libdir/AutoSplit.3 \ | |
93 | $libdir/Benchmark.3 \ | |
94 | $libdir/Carp.3 \ | |
95 | $libdir/Config.3 \ | |
96 | $libdir/Cwd.3 \ | |
97 | $libdir/DB_File.3 \ | |
98 | $libdir/Devel::SelfStubber.3 \ | |
99 | $libdir/DynaLoader.3 \ | |
100 | $libdir/English.3 \ | |
101 | $libdir/Env.3 \ | |
102 | $libdir/Exporter.3 \ | |
103 | $libdir/ExtUtils::Embed.3 \ | |
104 | $libdir/ExtUtils::Install.3 \ | |
105 | $libdir/ExtUtils::Liblist.3 \ | |
106 | $libdir/ExtUtils::MakeMaker.3 \ | |
107 | $libdir/ExtUtils::Manifest.3 \ | |
108 | $libdir/ExtUtils::Mkbootstrap.3 \ | |
109 | $libdir/ExtUtils::Mksymlists.3 \ | |
34a2a22e RM |
110 | $libdir/Fcntl.3 \ |
111 | $libdir/File::Basename.3 \ | |
112 | $libdir/File::CheckTree.3 \ | |
113 | $libdir/File::Copy.3 \ | |
114 | $libdir/File::Compare.3 \ | |
115 | $libdir/File::Find.3 \ | |
116 | $libdir/File::Path.3 \ | |
117 | $libdir/File::stat.3 \ | |
118 | $libdir/FileCache.3 \ | |
119 | $libdir/FileHandle.3 \ | |
120 | $libdir/FindBin.3 \ | |
121 | $libdir/Getopt::Long.3 \ | |
122 | $libdir/Getopt::Std.3 \ | |
123 | $libdir/I18N::Collate.3 \ | |
124 | $libdir/IO.3 \ | |
125 | $libdir/IO::File.3 \ | |
126 | $libdir/IO::Handle.3 \ | |
127 | $libdir/IO::Pipe.3 \ | |
128 | $libdir/IO::Seekable.3 \ | |
129 | $libdir/IO::Select.3 \ | |
130 | $libdir/IO::Socket.3 \ | |
131 | $libdir/IPC::Open2.3 \ | |
132 | $libdir/IPC::Open3.3 \ | |
133 | $libdir/Math::BigFloat.3 \ | |
134 | $libdir/Math::BigInt.3 \ | |
135 | $libdir/Math::Complex.3 \ | |
ace5de91 | 136 | $libdir/Math::Trig.3 \ |
34a2a22e RM |
137 | $libdir/Net::Ping.3 \ |
138 | $libdir/Net::hostent.3 \ | |
139 | $libdir/Net::netent.3 \ | |
140 | $libdir/Net::protoent.3 \ | |
141 | $libdir/Net::servent.3 \ | |
142 | $libdir/Opcode.3 \ | |
143 | $libdir/POSIX.3 \ | |
144 | $libdir/Pod::Text.3 \ | |
145 | $libdir/Safe.3 \ | |
146 | $libdir/Search::Dict.3 \ | |
147 | $libdir/SelectSaver.3 \ | |
148 | $libdir/SelfLoader.3 \ | |
149 | $libdir/Shell.3 \ | |
150 | $libdir/Socket.3 \ | |
151 | $libdir/Symbol.3 \ | |
152 | $libdir/Sys::Hostname.3 \ | |
153 | $libdir/Sys::Syslog.3 \ | |
154 | $libdir/Term::Cap.3 \ | |
155 | $libdir/Term::Complete.3 \ | |
156 | $libdir/Test::Harness.3 \ | |
157 | $libdir/Text::Abbrev.3 \ | |
158 | $libdir/Text::ParseWords.3 \ | |
159 | $libdir/Text::Soundex.3 \ | |
160 | $libdir/Text::Tabs.3 \ | |
161 | $libdir/Tie::Hash.3 \ | |
162 | $libdir/Tie::RefHash.3 \ | |
163 | $libdir/Tie::Scalar.3 \ | |
164 | $libdir/Tie::SubstrHash.3 \ | |
165 | $libdir/Time::Local.3 \ | |
166 | $libdir/Time::gmtime.3 \ | |
167 | $libdir/Time::localtime.3 \ | |
168 | $libdir/Time::tm.3 \ | |
169 | $libdir/UNIVERSAL.3 \ | |
170 | $libdir/User::grent.3 \ | |
171 | $libdir/User::pwent.3 | \ | |
44a8e56a | 172 | perl -ne 'map { -r && print "$_ " } split'` |
173 | ||
34a2a22e RM |
174 | # Bypass internal shell buffer limit -- can't use case |
175 | if perl -e '$a = shift; exit($a =~ m|/|)' $toroff; then | |
176 | echo "$me: empty file list -- did you run install?" >&2 | |
177 | exit 1 | |
178 | fi | |
179 | ||
44a8e56a | 180 | #psroff -t -man -rC1 -rD1 -rF1 > $tmp/PerlDoc.ps 2>$tmp/PerlTOC.raw |
181 | #nroff -man -rC1 -rD1 -rF1 > $tmp/PerlDoc.txt 2>$tmp/PerlTOC.nr.raw | |
182 | ||
2ceaccd7 | 183 | # First, create the raw data |
44a8e56a | 184 | run="$cmd -rC1 -rD1 -rF1 >$tmp/PerlDoc.$ext 2>$tmp/PerlTOC.$ext.raw" |
185 | echo "$me: running $run" | |
186 | eval $run $toroff | |
2ceaccd7 LV |
187 | |
188 | #Now create the TOC | |
44a8e56a | 189 | echo "$me: parsing TOC" |
190 | ./rofftoc $tmp/PerlTOC.$ext.raw > $tmp/PerlTOC.tmp.man | |
191 | run="$cmd $tmp/PerlTOC.tmp.man >$tmp/PerlTOC.$ext" | |
192 | echo "$me: running $run" | |
193 | eval $run | |
2ceaccd7 LV |
194 | |
195 | # Finally, recreate the Doc, without the blank page 0 | |
196 | run="$cmd -rC1 -rD1 >$tmp/PerlDoc.$ext 2>$tmp/PerlTOC.$ext.raw" | |
197 | echo "$me: running $run" | |
198 | eval $run $toroff | |
44a8e56a | 199 | rm -f $tmp/PerlTOC.tmp.man $tmp/PerlTOC.$ext.raw |
200 | echo "$me: leaving you with $tmp/PerlDoc.$ext and $tmp/PerlTOC.$ext" | |
201 |